/* Notebook surfaces. Typography comes exclusively from the global role system. */
:root {--notebook-paper:#fffdf7;--notebook-rule:#dce6ee;--notebook-margin:#b7cadc;--notebook-grid:repeating-linear-gradient(to bottom,transparent 0,transparent 31px,var(--notebook-rule) 31px,var(--notebook-rule) 32px);}
.notes-page .topbar {position:static;min-height:104px;background:transparent;border:0;padding-bottom:10px;}
.notes-page .topbar h1 > [lang=ru] {color:var(--most-ink);}
.notes-page .note-type-icon::before {width:85%;height:85%;}
.notes-page .workspace {padding-top:12px;max-width:1420px;}
.notes-page :where(button,input,select,summary) {min-height:44px;}
.notes-page .save-state {display:inline-block !important;color:var(--most-success);}
.notes-home {display:grid;gap:20px;min-width:0;}
.notes-home p {margin:0;color:var(--most-helper);}
.notes-home-head {display:flex;gap:18px;align-items:center;justify-content:space-between;}
.notes-create {display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.notes-create select {background:#fff;border:1px solid var(--most-border);border-radius:12px;padding:9px 12px;color:var(--most-secondary);max-width:180px;}
.notes-page .notebook-category-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.notes-page .category-card {padding:14px 16px;min-height:96px;box-shadow:none;display:grid;grid-template-columns:30px minmax(0,1fr);align-content:center;column-gap:12px;row-gap:5px;text-align:left;}
.notes-page .notebook-category-grid .category-card .note-type-icon {grid-row:1 / 3;width:30px;height:30px;align-self:center;}
.notes-page .category-card small {grid-column:2;}
.notes-collection {padding:20px;background:var(--most-surface);border:1px solid var(--most-border);border-radius:var(--most-radius);min-width:0;}
.notes-collection-head {display:flex;gap:16px;align-items:center;justify-content:space-between;margin-bottom:14px;}
.notes-collection h2 {margin:0;}
.notes-search-label {width:260px;max-width:100%;position:relative;}
.notes-search-label input {width:100%;min-width:0;background:#f5f8fd;border:1px solid var(--most-border);border-radius:12px;padding:10px 12px;}
.notes-filters {display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px;}
.notes-filters button {background:transparent;border:1px solid transparent;color:var(--most-helper);padding:7px 12px;}
.notes-filters button[aria-pressed=true] {background:#eaf3ff;border-color:#c1d9f9;color:var(--most-primary-strong);}
.note-row {display:flex;width:100%;gap:14px;align-items:center;padding:16px 8px;text-align:left;border:0;border-bottom:1px solid #e8eef6;border-radius:0;background:#fff;min-width:0;}
.note-row:last-child {border-bottom:0;}
.note-row:hover {background:#f5f9ff;border-radius:12px;}
.note-row-copy {min-width:0;flex:1;display:grid;gap:5px;}
.note-row strong {color:var(--most-ink);overflow-wrap:anywhere;}
.note-row-preview {display:block;color:var(--most-helper);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.note-row-meta {color:var(--most-helper);}
.note-row-icon {width:30px;height:30px;flex-shrink:0;}
.note-row-arrow {color:var(--most-primary);}
.notes-empty {padding:38px 16px;text-align:center;}
.notes-empty-icon {display:grid;place-items:center;margin:0 auto 12px;width:48px;height:48px;background:#edf5ff;border-radius:14px;color:var(--most-primary);}
.notes-empty h2 {margin-bottom:8px;}
.notes-empty p {max-width:370px;margin-inline:auto;}
.notes-muted {color:var(--most-helper);}
.notes-status:empty {display:none;}
.notes-status {display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:12px;background:#fff4e5;color:#735025;}
.notes-page .notebook-context {padding:0;margin-bottom:16px;border:0;background:transparent;}
.notes-back {border:0;padding:8px 0;color:var(--most-primary-strong);background:transparent;margin-bottom:6px;}
.notes-page .notebook-tabs {gap:6px;border:0;padding:0;}
.notes-page .notebook-tab {min-height:52px;padding:8px 14px;}
.notes-page .layout-grid,.notes-page .fehler-wrap {grid-template-columns:minmax(0,1fr) 260px;gap:20px;}
.notes-page .paper-card {background:var(--notebook-paper);box-shadow:0 6px 22px #16396808;border-color:#d6e0e9;overflow:hidden;}
.notes-page .entry-meta {display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:end;gap:12px;padding:20px 24px;background:var(--notebook-paper);border-bottom:1px solid #e3e8eb;}
.notes-page .entry-meta label {display:grid;gap:var(--space-label-below);min-width:0;color:var(--most-helper);}
.notes-page .title-input,.notes-page .date-input {width:100%;padding:10px 12px;background:#ffffffa8;border-color:#d8e1e9;}
.notes-page .tools-column {position:static;gap:12px;grid-template-columns:minmax(0,1fr);min-width:0;align-content:start;}
.notes-page .tool-card {min-width:0;}
.notes-page .timer-actions {display:flex;flex-wrap:wrap;}
.notes-page .timer-actions button {flex:1 1 74px;min-width:0;}
.notes-page .lined-wrap {background:var(--notebook-paper);position:relative;}
.notes-page .lined-wrap::before {display:block;content:"";position:absolute;left:36px;top:0;bottom:0;width:1px;background:var(--notebook-margin);opacity:.65;pointer-events:none;}
.notes-page :where(#mainText,#notesText) {background-color:var(--notebook-paper);background-image:var(--notebook-grid);background-position:0 16px;background-attachment:local;min-height:400px;padding:24px 28px 40px 60px;color:var(--most-ink);overflow-wrap:anywhere;word-break:normal;max-width:100%;}
.notes-page .notes-primary #notesText {min-height:400px;}
.notes-page #mainText {min-height:480px;}
.notes-page #mainText :where(p,div,li) {font-size:inherit;line-height:inherit;}
.notes-page :where(#mainText,#notesText):focus-visible {outline:2px solid #bfd8f7;outline-offset:-2px;border-radius:0;}
.notes-page :where(#mainText,#notesText)::placeholder {color:#677c8f;}
.notes-page .answer-sheet {background:var(--notebook-paper);padding:20px 24px 28px;}
.notes-page .answer-mode-tabs {margin:0;gap:8px;}
.notes-page .answer-mode-tabs button {min-width:0;flex:1 1 140px;}
.notes-page .answer-mode-tabs button small {display:block;font:var(--type-meta);margin-top:4px;color:var(--most-helper);}
.notes-page .mode-help {margin:16px 0 20px;max-width:620px;color:var(--most-helper);}
.notes-page .answer-head {padding:12px 0;flex-wrap:wrap;}
.notes-page .answer-list {border-top:1px solid var(--notebook-rule);}
.notes-page .answer-row {grid-template-columns:40px minmax(0,1fr);min-height:56px;border-color:var(--notebook-rule);}
.notes-page .answer-num {border-color:var(--notebook-margin);font-weight:550;color:var(--most-primary-strong);}
.notes-page .answer-input {min-width:0;width:100%;padding:14px 16px;background:transparent;}
.notes-page .answer-input:focus {background:#edf5ff80;}
.notes-page .notes-block {margin-top:24px;padding-top:16px;border-top:1px solid var(--notebook-rule);}
.notes-page .notes-block.notes-primary {margin-top:0;padding-top:0;border:0;}
.notes-page .notes-block > label {display:block;margin-bottom:12px;}
.notes-page .notes-block .lined-wrap {border:1px solid #d8e1e9;border-radius:12px;overflow:hidden;}
.writing-page .writing-meta-row {display:block;padding:14px 24px 0;background:var(--notebook-paper);}
.writing-page .entry-meta {grid-template-columns:minmax(0,1fr);}
.writing-more-controls .entry-date-label {display:grid;gap:4px;}
.writing-page .writing-status-field {color:var(--most-helper);display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
.writing-page #writingStatus {min-height:44px;background:#fffaf0;}
.writing-page .writing-format-toolbar {position:static;display:flex;flex-wrap:wrap;gap:5px;padding:12px 24px;border:0;border-bottom:1px solid #e3e8eb;background:var(--notebook-paper);align-items:center;}
.writing-page .writing-format-toolbar button {min-width:42px;background:#fff;color:var(--most-secondary);padding:7px 10px;border:1px solid #d8e1e9;}
.writing-more summary {list-style:none;padding:10px 12px;border:1px solid #d8e1e9;border-radius:10px;color:var(--most-secondary);cursor:pointer;background:#fff;}
.writing-more[open] {flex-basis:100%;}
.writing-more-controls {display:flex;flex-wrap:wrap;gap:6px;padding-top:8px;align-items:center;}
.writing-page .writing-footer {border:0;border-top:1px solid #d8e1e9;border-radius:0;padding:14px 24px;background:var(--notebook-paper);}
.writing-footer .stat-grid {display:flex;gap:18px;margin:0;}
.writing-footer .stat {display:flex;align-items:baseline;gap:5px;padding:0;background:transparent;}
.writing-footer > .tool-label {display:none;}
.writing-analysis-details {margin-top:10px;color:var(--most-helper);}
.writing-analysis-details summary {cursor:pointer;display:inline-flex;align-items:center;min-height:44px;}
.writing-history-card {padding:18px;border:1px solid var(--most-border);border-radius:var(--most-radius);background:#fff;}
.writing-history-card h2 {margin:0 0 6px;}
.writing-history-row {display:grid;gap:5px;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid #e8eef6;border-radius:0;padding:12px 0;}
.writing-history-row strong {overflow-wrap:anywhere;}
.writing-history-row small {color:var(--most-helper);}
.writing-history-all {width:100%;margin-top:8px;background:#f3f7fd;color:var(--most-primary-strong);}
.notebook-optional {border:1px solid var(--most-border);border-radius:var(--most-radius);background:#fff;overflow:hidden;}
.notebook-optional > summary {padding:14px 18px;cursor:pointer;color:var(--most-secondary);}
.notebook-optional .tool-card {border:0;border-radius:0;}
.notebook-optional:has(.tool-card[hidden]) {display:none;}
.notes-page .history-main strong {overflow-wrap:anywhere;}
.notes-page .linked-learning-notes {margin-top:0;box-shadow:none;}
.notes-page .fehler-form {background:var(--notebook-paper);padding:28px;box-shadow:0 6px 22px #16396808;border-color:#d6e0e9;}
.notes-page .fehler-form > p {color:var(--most-helper);max-width:600px;}
.notes-page .fehler-form .field {margin-top:24px;gap:10px;}
.notes-page .fehler-form label {display:flex;align-items:center;gap:10px;color:var(--most-secondary);}
.worksheet-step {display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#edf3f8;color:#416a91;flex-shrink:0;}
.notes-page .fehler-form textarea {width:100%;min-width:0;background-color:var(--notebook-paper);background-image:var(--notebook-grid);background-position:0 8px;padding:16px 20px;min-height:112px;border-color:#d8e1e9;color:var(--most-ink);}
.notes-page .fehler-form textarea:focus {background-color:#fffefb;border-color:#8cb0d4;}
.notes-page .fehler-list-card {padding:18px;box-shadow:none;min-width:0;align-self:start;}
.notes-page .fehler-list {max-height:none;overflow:visible;}
.notes-page .error-card {padding:16px;background:#f8fbff;}
.notes-page .error-card .right {font-weight:550;}
.notes-page .error-card footer {flex-wrap:wrap;color:var(--most-helper);}
@media(max-width:1100px) {.notes-page .layout-grid,.notes-page .fehler-wrap {grid-template-columns:minmax(0,1fr) 220px;}.notes-page .category-card {padding:12px;column-gap:8px;}}
@media(max-width:900px) {.notes-page .layout-grid,.notes-page .fehler-wrap {grid-template-columns:minmax(0,1fr);}.notes-page .tools-column {display:grid;grid-template-columns:minmax(0,1fr);}.notes-page .notebook-category-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px) {
 .notes-page .topbar {display:grid;grid-template-columns:minmax(0,1fr) auto;padding:16px 16px 8px;gap:12px 8px;min-height:0;}.notes-page .top-actions {grid-column:1/-1;justify-content:flex-start;gap:8px;}.notes-page .learn-language-slot {order:0;width:auto;grid-column:2;grid-row:1;margin:0;}.notes-page .learn-language-slot .study-language-switch button {min-width:64px;min-height:44px;padding:6px;}
 .notes-page .workspace {padding:12px 16px 100px;}.notes-home {gap:16px;}.notes-home-head {align-items:flex-start;flex-direction:column;gap:12px;}.notes-create {width:100%;}.notes-create .primary {flex:1;padding:10px;}.notes-create select {max-width:130px;}
 .notes-page .category-card {min-height:74px;padding:12px 10px;grid-template-columns:24px minmax(0,1fr);row-gap:0;}.notes-page .notebook-category-grid .category-card .note-type-icon {width:24px;height:24px;grid-row:1;}.notes-page .category-card > small {display:none;}
 .notes-page .notebook-tabs {flex-wrap:nowrap;overflow-x:auto;}.notes-page .notebook-tab {flex:0 0 auto;padding:7px 10px;}
 .notes-collection {padding:16px 12px;}.notes-collection-head {align-items:flex-start;flex-direction:column;gap:12px;}.notes-search-label {width:100%;}.notes-filters {gap:2px;}.notes-filters button {padding:7px 8px;}
 .note-row {gap:10px;padding:14px 2px;}.note-row-icon {width:24px;height:24px;}.notes-empty {padding:28px 8px;}
 .notes-page .entry-meta {padding:16px;grid-template-columns:minmax(0,1fr);gap:10px;}.notes-page .entry-meta .entry-date-label {max-width:170px;}
 .notes-page .answer-sheet {padding:16px;}.notes-page .answer-head {gap:6px;}.notes-page .answer-row {grid-template-columns:30px minmax(0,1fr);}.notes-page .answer-input {padding-inline:12px;}
 .notes-page .lined-wrap::before {left:26px;}.notes-page :where(#mainText,#notesText) {padding:24px 16px 32px 44px;min-height:360px;}
 .writing-page .writing-meta-row {padding:12px 16px 0;}.writing-page .writing-format-toolbar {padding:10px 16px;gap:5px;}.writing-page .writing-footer {padding:12px 16px;}.notes-status {flex-wrap:wrap;}
 .notes-page .fehler-form {padding:20px 16px;}.notes-page .fehler-form textarea {padding-inline:14px;}.notes-page .fehler-actions button {width:100%;}
}
