/* Theme controls share one device-local preference, including on the sign-in screen. */
.theme-toggle,.auth-card .theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:42px;height:38px;min-height:38px;margin:0;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--sheet);box-shadow:none;color:var(--body);font-family:inherit;font-size:12px;font-weight:600;line-height:1;cursor:pointer}
.theme-toggle:hover,.auth-card .theme-toggle:hover{background:var(--select);border-color:var(--accent);color:var(--accent)}
.theme-moon,.theme-sun{font-size:18px;line-height:1}.theme-sun{display:none}
html[data-theme=dark] .theme-moon{display:none}html[data-theme=dark] .theme-sun{display:inline}
.auth-card .auth-theme-toggle{position:absolute;top:22px;right:22px}
@media(max-width:860px){header .header-theme-toggle{order:3;width:44px;min-width:44px;height:44px;padding:0}header .header-theme-toggle .theme-toggle-label{display:none}}

html[data-theme=dark]{color-scheme:dark;--bg:#171923;--header:#20212d;--side:#1d1e29;--sheet:#242531;--summary:#302a3e;--line:#41414f;--ink:#f0edf4;--body:#d0ccd7;--muted:#aaa5b4;--accent:#c4aaf2;--select:#3c344d;--danger:#f19ca7}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] .section-nav{background:#191b24;border-color:var(--line)}
html[data-theme=dark] .section-nav .nav-btn[aria-current=page],html[data-theme=dark] .section-nav .nav-btn:hover{background:var(--select);color:var(--accent)}
html[data-theme=dark] .search,html[data-theme=dark] .meta input[type=text],html[data-theme=dark] .meta input[type=date],html[data-theme=dark] .tag-input,html[data-theme=dark] main .note-sheet .meta input,html[data-theme=dark] .title-url-field input{background:#1b1d27;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .search:hover,html[data-theme=dark] .search:focus{background:#242531;border-color:var(--accent)}
html[data-theme=dark] .search-hit.active,html[data-theme=dark] .search-hit:hover,html[data-theme=dark] .palette-option.active{background:var(--select);color:var(--ink)}
html[data-theme=dark] .search-mark{background:#564971;color:#f2e7ff}
html[data-theme=dark] .primary,html[data-theme=dark] main .primary,html[data-theme=dark] .auth-card button:not(.theme-toggle){background:#a98bdc;border-color:#a98bdc;color:#1b1528}
html[data-theme=dark] .primary:hover,html[data-theme=dark] main .primary:hover,html[data-theme=dark] .auth-card button:not(.theme-toggle):hover{background:#c4aaf2;border-color:#c4aaf2;color:#1b1528}
html[data-theme=dark] .sync-pill{background:#27372f;color:#a7d6aa;border-color:#3c5944}
html[data-theme=dark] .sync-pill[data-state=dirty],html[data-theme=dark] .sync-pill[data-state=saving]{background:#493b23;color:#efd18d;border-color:#6a5431}
html[data-theme=dark] .sync-pill[data-state=conflict]{background:#49303b;color:#f7b4bd;border-color:#794754}
html[data-theme=dark] .row:hover,html[data-theme=dark] .row.all-notes:hover{background:#30303c;color:var(--ink)}
html[data-theme=dark] .row.active,html[data-theme=dark] .row.course.active,html[data-theme=dark] .row.all-notes.active{background:var(--select);color:var(--accent);border-color:#615178}
html[data-theme=dark] .row.all-notes,html[data-theme=dark] .library-pulse,html[data-theme=dark] .tile,html[data-theme=dark] .orbit-node{background:var(--sheet);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .row .count,html[data-theme=dark] .row.all-notes .count{background:#363542;color:var(--muted)}
html[data-theme=dark] .layout-switch{background:#171923}html[data-theme=dark] .layout-switch button[aria-pressed=true]{background:#40374e;color:#dfccff}
html[data-theme=dark] .tile.active,html[data-theme=dark] .tile-open:hover,html[data-theme=dark] .orbit-node.center{background:#382f47;border-color:#8d73ad;color:var(--ink)}
html[data-theme=dark] .tile-open{color:var(--ink)}html[data-theme=dark] .tile-meta{color:var(--accent)}
html[data-theme=dark] main .sheet,html[data-theme=dark] main .note-sheet,html[data-theme=dark] main .sheet-head,html[data-theme=dark] main .note-sheet .sheet-head{background:var(--sheet);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] main .note-sheet .cornell,html[data-theme=dark] .cornell,html[data-theme=dark] main .note-sheet .notes-col,html[data-theme=dark] .notes-col{background:var(--sheet);color:var(--body)}
html[data-theme=dark] main .note-sheet .cue-col,html[data-theme=dark] .cue-col{background:#292833;border-color:var(--line);color:var(--body)}
html[data-theme=dark] main .note-sheet .summary,html[data-theme=dark] .summary{background:#302a3e;border-color:#554762;color:var(--body)}
html[data-theme=dark] main .note-sheet .connections,html[data-theme=dark] .connections,html[data-theme=dark] main .note-sheet .sheet-foot,html[data-theme=dark] .sheet-foot{background:#22232e;border-color:var(--line);color:var(--body)}
html[data-theme=dark] .meta-tool[aria-pressed=true],html[data-theme=dark] .tag,html[data-theme=dark] .chip{background:#40364d;border-color:#655473;color:#e1cff6}
html[data-theme=dark] .tag:hover,html[data-theme=dark] .chip:hover,html[data-theme=dark] .ghost:hover,html[data-theme=dark] main .ghost:hover,html[data-theme=dark] .meta-tool:hover{background:#4c405c;border-color:#8e75a7;color:#f0e7ff}
html[data-theme=dark] .ghost,html[data-theme=dark] main .ghost,html[data-theme=dark] .sheet-foot .actions .footer-icon,html[data-theme=dark] .connection-action{background:#302f3c;color:var(--body);border-color:var(--line)}
html[data-theme=dark] .add-cue,html[data-theme=dark] main .add-cue{background:#2c2a34;border-color:#685f59;color:#dbc8a2}
html[data-theme=dark] .add-cue:hover{background:var(--select);border-color:var(--accent);color:var(--accent)}
html[data-theme=dark] .sheet-foot .actions .trash-btn,html[data-theme=dark] .page-foot .library-trash{background:#422d37;color:#ffb2bc;border-color:#714551}
html[data-theme=dark] .sheet-foot .actions .trash-btn:hover,html[data-theme=dark] .page-foot .library-trash:hover{background:#5a3443;color:#ffccd2}
html[data-theme=dark] .reading-time{color:#e6cf98}html[data-theme=dark] .pulse-track{background:#4b4254}html[data-theme=dark] .pulse-fill{background:#b79be9}
html[data-theme=dark] .link-form,html[data-theme=dark] .link-columns{background:#292a35}html[data-theme=dark] .link-form input{background:#1c1e27;color:var(--ink)}html[data-theme=dark] .link-row:hover{background:#393043}
html[data-theme=dark] .markdown-body,html[data-theme=dark] .prose{color:var(--body)}
html[data-theme=dark] .markdown-body h1,html[data-theme=dark] .markdown-body h2,html[data-theme=dark] .markdown-body h3,html[data-theme=dark] .markdown-body h4,html[data-theme=dark] .markdown-body h5,html[data-theme=dark] .markdown-body h6,html[data-theme=dark] .prose strong{color:var(--ink)}
html[data-theme=dark] .markdown-body pre,html[data-theme=dark] .md-file{background:#191b24;border-color:var(--line);color:var(--body)}
html[data-theme=dark] .markdown-body code{background:#3d344c;color:#e6d7fa}html[data-theme=dark] .markdown-body pre code,html[data-theme=dark] .markdown-body pre code.hljs{background:transparent;color:var(--body)}
html[data-theme=dark] .markdown-body th,html[data-theme=dark] .md-toolbar button{background:#34333f;color:var(--body);border-color:var(--line)}
html[data-theme=dark] .hljs-keyword,html[data-theme=dark] .hljs-selector-tag{color:#d5b1ff}html[data-theme=dark] .hljs-string{color:#abd7ae}html[data-theme=dark] .hljs-number,html[data-theme=dark] .hljs-literal{color:#efb89d}
html[data-theme=dark] .orbit-canvas,html[data-theme=dark] .orbit-wrap,html[data-theme=dark] .orbit-workbench,html[data-theme=dark] dialog,html[data-theme=dark] .palette,html[data-theme=dark] .search-results{background:var(--sheet);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .orbit-canvas{--orbit-mutual:#6dce8a}
html[data-theme=dark] .orbit-tabs button[aria-pressed=true]{background:var(--select);color:var(--accent);border-color:#8b76a2}
html[data-theme=dark] .toast{background:#eee8f4;color:#24212b}
html[data-theme=dark] #authGate{background:radial-gradient(ellipse at 18% 20%,#372e47 0,transparent 48%),radial-gradient(ellipse at 85% 85%,#39312d 0,transparent 50%),#171923}
html[data-theme=dark] .auth-card{background:var(--sheet);border-color:var(--line);color:var(--ink)}html[data-theme=dark] .auth-card::before{background:#41354f;color:#dcc5fa}
html[data-theme=dark] .auth-card input{background:#1b1d27;border-color:var(--line);color:var(--ink)}html[data-theme=dark] .auth-card input:focus{border-color:var(--accent)}
html[data-theme=dark] .auth-card button:disabled{background:#5b4d6c;color:#e0d8e7;border-color:#5b4d6c}
html[data-theme=dark] .theme-toggle,html[data-theme=dark] .auth-card .theme-toggle{background:#302f3c;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .theme-toggle:hover,html[data-theme=dark] .auth-card .theme-toggle:hover{background:var(--select);color:var(--accent)}
/* Detached reading windows use the same palette and follow changes from the main tab. */
html[data-theme] body:has(#focus-root){background:var(--bg);color:var(--ink)}
html[data-theme] body:has(#focus-root) .bar,html[data-theme] body:has(#focus-root) .sheet{background:var(--sheet);color:var(--ink);border-color:var(--line)}
html[data-theme] body:has(#focus-root) .sheet-head,html[data-theme] body:has(#focus-root) .cue-col{border-color:var(--line)}
html[data-theme] body:has(#focus-root) .cue-read,html[data-theme] body:has(#focus-root) .prose{color:var(--body)}
html[data-theme] body:has(#focus-root) .prose strong{color:var(--ink)}
html[data-theme] body:has(#focus-root) .ghost{color:var(--body);border-color:var(--line)}
/* Use more of the available workspace while retaining a small outer gutter. */
@media screen{#main:has(>article.sheet){padding-left:clamp(12px,1.2vw,24px);padding-right:clamp(12px,1.2vw,24px)}#main>article.sheet{width:100%;max-width:1600px}}
/* Consistent tag colors make repeated topics easy to spot in notes and the tag index. */
#main [data-tag-color="0"]{--tag-ink:#61509b;--tag-bg:#eee9f8;--tag-line:#ddd3f0}
#main [data-tag-color="1"]{--tag-ink:#276f67;--tag-bg:#e3f2ed;--tag-line:#c8e5da}
#main [data-tag-color="2"]{--tag-ink:#986024;--tag-bg:#fbf0de;--tag-line:#efd8b8}
#main [data-tag-color="3"]{--tag-ink:#a34f65;--tag-bg:#faeaf0;--tag-line:#efd1dc}
#main [data-tag-color="4"]{--tag-ink:#396b93;--tag-bg:#e8f1f9;--tag-line:#cddfee}
#main [data-tag-color="5"]{--tag-ink:#58732d;--tag-bg:#edf3e1;--tag-line:#d8e6bf}
#main .tag-list{gap:6px;min-width:0}
#main .tag-list .tag-pill,#main .tile-tag{display:inline-flex;align-items:center;gap:3px;max-width:100%;min-height:27px;padding:3px 9px;border:1px solid var(--tag-line);border-radius:999px;background:var(--tag-bg);color:var(--tag-ink);font-size:12px;font-weight:600;line-height:1.25;letter-spacing:0;vertical-align:middle}
#main .tag-pill .tag-hash{flex:none;opacity:.7;font-weight:700}
#main .tag-pill .tag-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#main button.tag-pill{cursor:pointer}
#main button.tag-pill:hover{background:var(--tag-bg);border-color:var(--tag-ink);color:var(--tag-ink)}
#main button.tag-pill:focus-visible{outline:2px solid var(--tag-ink);outline-offset:2px}
#main .tag-pill .tag-remove{display:inline-flex;align-items:center;justify-content:center;flex:none;width:17px;height:17px;margin-left:3px;border-radius:50%;background:var(--tag-line);color:var(--tag-ink);font-size:14px;line-height:1}
#main button.tag-pill:hover .tag-remove{background:var(--tag-ink);color:var(--sheet)}
#main .meta .tag-input{width:9rem;min-width:9rem;border:1px dashed #b8a6d0;border-radius:999px;background:transparent;color:var(--ink);padding:4px 12px;font-size:12px}
#main .meta .tag-input::placeholder{color:#81708f;opacity:1}
#main .meta .tag-input:focus{outline:2px solid #a28acb;outline-offset:2px;border-style:solid}
#main .tile-tags{display:flex;flex-wrap:wrap;align-items:center;gap:5px;width:100%;min-width:0}
#main .tile-tag{min-height:23px;max-width:100%;padding:2px 8px;font-size:11px}
#main .tag-overflow{color:var(--muted);font-size:11px;font-weight:600;padding:2px 4px}
#main .tag-index{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;padding:18px 24px 24px}
#main .tag-index li{min-width:0}
#main .tag-index .row{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 12px;border:1px solid var(--tag-line);border-radius:12px;background:var(--tag-bg);color:var(--tag-ink)}
#main .tag-index .row:hover,#main .tag-index .row.active{border-color:var(--tag-ink);box-shadow:0 2px 9px #34264b0c}
#main .tag-index .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600}
#main .tag-index .count{display:inline-flex;align-items:center;justify-content:center;min-width:25px;padding:2px 6px;border-radius:8px;background:var(--sheet);color:var(--tag-ink);font-size:11px}
html[data-theme=dark] #main [data-tag-color="0"]{--tag-ink:#decef9;--tag-bg:#40364e;--tag-line:#665577}
html[data-theme=dark] #main [data-tag-color="1"]{--tag-ink:#a6dfce;--tag-bg:#2b413b;--tag-line:#486a5d}
html[data-theme=dark] #main [data-tag-color="2"]{--tag-ink:#f1cf98;--tag-bg:#493a2b;--tag-line:#6c573e}
html[data-theme=dark] #main [data-tag-color="3"]{--tag-ink:#f2b7c6;--tag-bg:#4a303d;--tag-line:#704d5c}
html[data-theme=dark] #main [data-tag-color="4"]{--tag-ink:#b6d9f2;--tag-bg:#2c3b49;--tag-line:#496373}
html[data-theme=dark] #main [data-tag-color="5"]{--tag-ink:#c9df9c;--tag-bg:#3b4230;--tag-line:#58694a}
html[data-theme=dark] #main .meta .tag-input{background:transparent;border-color:#8b779e;color:var(--ink)}
html[data-theme=dark] #main .meta .tag-input::placeholder{color:#c0aeca}
html[data-theme=dark] #main button.tag-pill:hover{background:var(--tag-bg);border-color:var(--tag-ink);color:var(--tag-ink)}
@media(max-width:860px){#main button.tag-pill{min-height:40px}#main .meta .tag-input{width:100%;min-width:0}#main .tag-index{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:8px;padding:14px}}
/* Note, summary and connections each have a recognizable color. */
#main .meta-tools{gap:6px}
#main .meta-tools .meta-tool[data-action="toggle-notes"]{--view-ink:#2f766d;--view-bg:#e6f4f0;--view-border:#c5e1d8;--view-on:#cbe9e0}
#main .meta-tools .meta-tool[data-action="toggle-summary"]{--view-ink:#91651d;--view-bg:#fbf1dc;--view-border:#ebd8b0;--view-on:#f4dfb4}
#main .meta-tools .meta-tool[data-action="toggle-connections"]{--view-ink:#74539c;--view-bg:#f1eafa;--view-border:#dfd0ef;--view-on:#e5d5f4}
#main .meta-tools .meta-tool{color:var(--view-ink);background:var(--view-bg);border:1px solid var(--view-border);border-radius:10px;opacity:.75}
#main .meta-tools .meta-tool[aria-pressed="true"]{background:var(--view-on);border-color:var(--view-ink);color:var(--view-ink);opacity:1;box-shadow:inset 0 -2px 0 var(--view-ink)}
#main .meta-tools .meta-tool:hover,#main .meta-tools .meta-tool:focus-visible{color:var(--view-ink);background:var(--view-on);border-color:var(--view-ink);opacity:1}
#main .meta-tools .meta-tool:focus-visible{outline:2px solid var(--view-ink);outline-offset:2px}
html[data-theme=dark] #main .meta-tools .meta-tool[data-action="toggle-notes"]{--view-ink:#a3ded0;--view-bg:#263d3b;--view-border:#42675f;--view-on:#335950}
html[data-theme=dark] #main .meta-tools .meta-tool[data-action="toggle-summary"]{--view-ink:#f0d394;--view-bg:#443a28;--view-border:#6c5b3b;--view-on:#645033}
html[data-theme=dark] #main .meta-tools .meta-tool[data-action="toggle-connections"]{--view-ink:#d9bef8;--view-bg:#393044;--view-border:#5f4b70;--view-on:#554064}
/* Orbit's date, time and week readout. */
/* Give sidebar titles their own row; metadata must not squeeze the title to zero width. */
#side .note-row{align-items:center;min-width:0;margin:2px 0}
#side .note-row>.icon-btn{margin-top:0;align-self:center}
#side .note-row .row{min-height:50px;align-items:center;padding:7px 10px;border-radius:12px}
#side .note-row .note-heading{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:3px 8px;width:100%;min-width:0;text-align:left}
#side .note-row .note-heading>.label{display:block;grid-column:1/-1;width:auto;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;line-height:1.4;color:var(--ink)}
#side .note-row .note-heading>.note-id{min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--muted);font-size:9px;line-height:1.3;letter-spacing:.02em;gap:3px}
#side .note-row .note-heading>.note-id .note-id-k{font-size:8px;letter-spacing:.06em;color:var(--muted)}
#side .note-row .note-heading>.reading-time{min-width:0;margin:0;justify-self:start;color:var(--muted);font-size:9px;line-height:1.3;font-variant-numeric:tabular-nums;white-space:nowrap}
#side .note-row .row.active .label{color:var(--accent)}
#side .note-row .row.active{box-shadow:inset 2px 0 var(--accent)}
#side .note-row .row.active .note-id{background:transparent}
/* A compact note tile with a document mark and calm, legible metadata. */
#side .note-row .row{min-height:52px;padding:7px 9px;border:1px solid transparent;border-radius:12px;background:transparent;box-shadow:none}
#side .note-row .row:hover{background:#f8f6fb;border-color:#e6e0eb}
#side .note-row .row.active{background:#f8f5fc;border-color:#d9cce8;box-shadow:0 2px 8px #4737580b}
#side .note-row .note-heading{grid-template-columns:28px max-content minmax(0,1fr);gap:3px 8px;align-items:center}
#side .note-row .note-heading::before{content:"";grid-column:1;grid-row:1/3;align-self:center;width:28px;height:28px;border-radius:9px;background:linear-gradient(#9b81c3,#9b81c3) 8px 9px/12px 1.5px no-repeat,linear-gradient(#9b81c3,#9b81c3) 8px 13px/12px 1.5px no-repeat,linear-gradient(#9b81c3,#9b81c3) 8px 17px/8px 1.5px no-repeat,#eee8f6}
#side .note-row .note-heading>.label{grid-column:2/-1;grid-row:1;font-size:12px;font-weight:600;letter-spacing:.005em}
#side .note-row .note-heading>.note-id{grid-column:2;grid-row:2;color:#857d8a;font-size:10px;line-height:1.2}
#side .note-row .note-heading>.note-id .note-id-k{color:#9a8aa9}
#side .note-row .note-heading>.reading-time{grid-column:3;grid-row:2;color:#918994;font-size:10px;line-height:1.2;overflow:hidden;text-overflow:ellipsis}
#side .note-row .note-heading>.reading-time::before{content:"·";margin-right:8px;color:#b5aaba}
#side .note-row .row.active .label{color:#5d428f}
html[data-theme=dark] #side .note-row .row:hover{background:#302e3a;border-color:#47424f}
html[data-theme=dark] #side .note-row .row.active{background:#393144;border-color:#695777;box-shadow:none}
html[data-theme=dark] #side .note-row .row.active .label{color:#e4d3fa}
html[data-theme=dark] #side .note-row .note-heading::before{background:linear-gradient(#c5afe0,#c5afe0) 8px 9px/12px 1.5px no-repeat,linear-gradient(#c5afe0,#c5afe0) 8px 13px/12px 1.5px no-repeat,linear-gradient(#c5afe0,#c5afe0) 8px 17px/8px 1.5px no-repeat,#4a3d56}
html[data-theme=dark] #side .note-row .note-heading>.note-id,html[data-theme=dark] #side .note-row .note-heading>.reading-time{color:#c0b4c6}
html[data-theme=dark] #side .note-row .note-heading>.note-id .note-id-k{color:#c5afd9}
#side .note-row .note-heading{grid-template-columns:28px minmax(0,1fr)}
#side .note-row .note-heading>.note-id{display:none}
#side .note-row .note-heading>.reading-time{grid-column:2;grid-row:2}
#side .note-row .note-heading>.reading-time::before{content:none}
@media(min-width:861px){#side .note-row>.icon-btn{width:24px;height:32px;font-size:15px}}
/* Keep the drag grip narrow and leave a comfortable touch height. */
#side .note-row>.reorder-handle{display:inline-flex;align-items:center;justify-content:center;flex:none;width:20px;height:32px;min-height:32px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:13px;line-height:1;cursor:grab}
#side .note-row>.reorder-handle:hover{background:var(--select);color:var(--accent)}
#side .note-row>.reorder-handle:active{cursor:grabbing}
#side .note-row>.reorder-handle:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media(max-width:860px){#side .note-row>.reorder-handle{width:32px;height:44px;min-height:44px}}
/* Compact visual button with a generous touch target on mobile. */
#side .note-row>.focus-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:#81778e;isolation:isolate}
#side .note-row>.focus-btn::before{content:"";position:absolute;z-index:-1;width:26px;height:26px;border:1px solid #ded7e8;border-radius:9px;background:#f8f5fb;transition:background .16s,border-color .16s,transform .16s}
#side .note-row>.focus-btn svg{width:12px;height:12px;display:block}
#side .note-row>.focus-btn svg path{stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}
#side .note-row>.focus-btn:hover,#side .note-row>.focus-btn:focus-visible{color:#604693}
#side .note-row>.focus-btn:hover::before,#side .note-row>.focus-btn:focus-visible::before{background:#eae2f5;border-color:#c3b3dc}
#side .note-row>.focus-btn:active::before{transform:scale(.94)}
#side .note-row>.focus-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:10px}
html[data-theme=dark] #side .note-row>.focus-btn{color:#c4b7d4}
html[data-theme=dark] #side .note-row>.focus-btn::before{background:#302c3a;border-color:#51475c}
html[data-theme=dark] #side .note-row>.focus-btn:hover,html[data-theme=dark] #side .note-row>.focus-btn:focus-visible{color:#ebd9ff}
html[data-theme=dark] #side .note-row>.focus-btn:hover::before,html[data-theme=dark] #side .note-row>.focus-btn:focus-visible::before{background:#493d58;border-color:#8d77a5}
@media(min-width:861px){#side .note-row>.focus-btn{width:32px;height:32px}}
@media(max-width:860px){#side .note-row>.focus-btn{width:44px;height:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){#side .note-row>.focus-btn::before{transition:none}}
.orbit-heading .orbit-clock{display:inline-grid;grid-template-columns:auto auto auto;align-items:stretch;gap:0;max-width:100%;padding:0;overflow:hidden;border:1px solid #ded7e9;border-radius:14px;background:#f8f5fb;color:#716a7d;box-shadow:0 4px 14px #34264b08;line-height:1.2}
.orbit-clock-date,.orbit-clock-time,.orbit-clock-week{display:flex;align-items:center;min-height:44px;padding:0 14px;white-space:nowrap}
.orbit-clock-date{font-size:12px;font-weight:600;color:#615969}
.orbit-clock-time{border-left:1px solid #e5deeb;border-right:1px solid #e5deeb;background:#eee8f6;color:#5f4794;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.02em}
.orbit-clock-week{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#81758f}
html[data-theme=dark] .orbit-heading .orbit-clock{background:#292632;border-color:#51465e;color:#c8bfd0;box-shadow:none}
html[data-theme=dark] .orbit-clock-date{color:#ded4e5}
html[data-theme=dark] .orbit-clock-time{background:#40344d;border-color:#554763;color:#e3d0ff}
html[data-theme=dark] .orbit-clock-week{color:#c4afdb}
@media(max-width:520px){.orbit-heading .orbit-clock{width:100%;grid-template-columns:minmax(0,1fr) auto auto}.orbit-clock-date,.orbit-clock-time,.orbit-clock-week{min-height:40px;padding:0 10px}.orbit-clock-date{font-size:11px;overflow:hidden;text-overflow:ellipsis}.orbit-clock-time{font-size:12px}.orbit-clock-week{font-size:10px}}
@media print{html[data-theme=dark] body,html[data-theme=dark] main .sheet,html[data-theme=dark] main .note-sheet,html[data-theme=dark] main .note-sheet .sheet-head,html[data-theme=dark] main .note-sheet .cue-col,html[data-theme=dark] main .note-sheet .notes-col,html[data-theme=dark] main .note-sheet .summary{background:white!important;color:black!important;box-shadow:none}html[data-theme=dark] .markdown-body,html[data-theme=dark] .markdown-body h1,html[data-theme=dark] .markdown-body h2,html[data-theme=dark] .markdown-body h3,html[data-theme=dark] .prose{color:black!important}.theme-toggle{display:none!important}}

/* Floating mobile navigation: translucent shell and rounded segments. */
@media (max-width: 860px) {
  :root {
    --tab-h: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .section-nav {
    left: max(16px, env(safe-area-inset-left, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 440px;
    margin-inline: auto;
    padding: 7px;
    gap: 6px;
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: 32px;
    background: rgb(255 254 250 / 60%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 0 8px 32px rgb(48 39 67 / 12%), inset 0 1px 0 rgb(255 255 255 / 55%);
  }

  .section-nav .nav-btn {
    min-width: 0;
    min-height: 48px;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 25px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
  }

  .section-nav .nav-btn:hover {
    background: rgb(105 82 187 / 8%);
  }

  .section-nav .nav-btn[aria-current=page] {
    background: rgb(105 82 187 / 13%);
    border-color: rgb(105 82 187 / 10%);
    color: var(--accent);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 45%);
  }

  .section-nav .nav-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }

  html[data-theme=dark] .section-nav {
    background: rgb(25 27 36 / 58%);
    border-color: rgb(255 255 255 / 16%);
    box-shadow: 0 8px 32px rgb(0 0 0 / 24%), inset 0 1px 0 rgb(255 255 255 / 8%);
  }

  html[data-theme=dark] .section-nav .nav-btn:hover {
    background: rgb(192 166 240 / 10%);
  }

  html[data-theme=dark] .section-nav .nav-btn[aria-current=page] {
    background: rgb(192 166 240 / 18%);
    border-color: rgb(192 166 240 / 16%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .section-nav .nav-btn { transition: none; }
}

/* Translucent reading companion */
.sheet,.tile{position:relative}
.reading-timer-launch{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--accent);cursor:pointer;transition:background .2s,transform .2s}
.meta-tools>.reading-timer-launch{flex:none;width:32px;height:32px;padding:6px;border-radius:8px}
@media(max-width:860px){.meta-tools>.reading-timer-launch{width:44px;height:44px;min-height:44px;padding:11px}}

.reading-timer-launch svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.reading-timer-launch:hover{background:var(--select);transform:translateY(-2px)}
.reading-timer-launch:disabled{opacity:.35;cursor:default}
.reading-timer-widget{position:fixed;z-index:80;right:28px;bottom:26px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:244px;padding:20px 22px 23px;border:1px solid color-mix(in srgb,var(--accent) 28%,transparent);border-radius:22px;background:color-mix(in srgb,var(--sheet) 62%,transparent);color:var(--ink);backdrop-filter:blur(18px);box-shadow:0 12px 45px #00000012;cursor:pointer;overflow:hidden;text-align:left}
.reading-timer-widget::after{content:"";position:absolute;bottom:0;left:0;height:3px;width:var(--reading-progress,0%);background:var(--accent);transition:width .25s linear}
.reading-timer-widget:hover,.reading-timer-widget:focus-visible{background:color-mix(in srgb,var(--sheet) 90%,transparent)}
.reading-timer-eyebrow,.reading-stats-kicker{font-size:10px;letter-spacing:.13em;font-weight:700;color:var(--accent)}
.reading-timer-note{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--muted)}
.reading-timer-value{font-size:40px;font-weight:400;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.04em}
.reading-timer-hint{font-size:10px;color:var(--muted)}
.reading-timer-widget.is-overtime::after{opacity:.5}
.reading-stats{box-sizing:border-box;width:min(440px,calc(100vw - 32px));padding:32px;border:1px solid var(--line);border-radius:24px;background:var(--sheet);color:var(--ink);box-shadow:0 24px 90px #0003}
.reading-stats::backdrop{background:#15121d55;backdrop-filter:blur(5px)}
.reading-stats h2{font-size:25px;line-height:1.2;margin:12px 0}
.reading-stats-note{color:var(--muted);overflow-wrap:anywhere}
.reading-stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}
.reading-stats-grid>div{border:1px solid var(--line);border-radius:14px;padding:16px}
.reading-stats-grid span{display:block;font-size:12px;color:var(--muted)}
.reading-stats-grid strong{display:block;font-size:30px;font-weight:400;font-variant-numeric:tabular-nums;margin-top:8px}
.reading-stats-comparison{color:var(--accent)}
.reading-stats-footnote{font-size:12px;line-height:1.6;color:var(--muted)}
.reading-stats-close{width:100%;margin-top:16px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--select);color:var(--ink);cursor:pointer}
.reading-timer-launch:focus-visible,.reading-timer-widget:focus-visible,.reading-stats-close:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
@media(max-width:600px){.reading-timer-widget{right:14px;bottom:max(14px,env(safe-area-inset-bottom));width:210px;padding:14px 18px 18px}.reading-timer-value{font-size:32px}}
@media print{.reading-timer-launch,.reading-timer-widget,.reading-stats{display:none!important}}

/* Reading statistics */
.orbit-tabs{flex-wrap:wrap}
.timer-statistics{padding:28px 32px 24px;color:var(--body);font-variant-numeric:tabular-nums}
.stats-header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}
.stats-eyebrow{font-size:10px;font-weight:700;letter-spacing:.14em;color:var(--accent);margin-bottom:8px}
.timer-statistics h2{font-size:24px;font-weight:600;line-height:1.25;letter-spacing:-.6px;margin:0;color:var(--ink)}
.stats-header p{font-size:13px;color:var(--muted);margin:8px 0 0}
.stats-periods{display:flex;flex:none;padding:4px;gap:3px;background:var(--bg);border:1px solid var(--line);border-radius:9px}
.stats-periods button{border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);font-size:12px;font-weight:600;padding:8px 12px;min-height:34px;white-space:nowrap}
.stats-periods button[aria-pressed=true]{background:var(--sheet);color:var(--ink);border-color:var(--line);box-shadow:0 1px 3px #00000008}
.stats-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;margin-bottom:20px;overflow:hidden}
.stats-metric{padding:22px;min-width:0;border-right:1px solid var(--line)}
.stats-metric:last-child{border-right:0}
.stats-metric>span{display:block;font-size:12px;font-weight:500;color:var(--muted)}
.stats-metric strong{display:block;margin:12px 0 8px;font-size:clamp(23px,2.4vw,32px);font-weight:600;letter-spacing:-1px;line-height:1.15;color:var(--ink)}
.stats-metric small{display:block;font-size:11px;line-height:1.5;color:var(--muted)}
.stats-insights{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(240px,1fr);gap:20px;margin-bottom:20px}
.stats-card{min-width:0;border:1px solid var(--line);border-radius:12px;padding:22px;background:var(--sheet)}
.stats-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.stats-section-heading h3{margin:0;font-size:14px;font-weight:600;letter-spacing:-.15px;color:var(--ink)}
.stats-section-heading>span{color:var(--muted);font-size:11px}
.stats-chart{height:172px;display:flex;align-items:stretch;gap:clamp(2px,.5vw,8px);margin-top:28px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--line) 25%);padding:0 2px}
.stats-chart-column{flex:1;min-width:0;display:flex;align-items:flex-end}
.stats-chart-bar{display:block;width:100%;background:var(--accent);border-radius:3px 3px 0 0;opacity:.78;min-height:2px}
.stats-chart-column:hover .stats-chart-bar{opacity:1}
.stats-chart-bar.is-empty{background:var(--line);opacity:1}
.stats-chart-axis{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-top:10px}
.stats-comparison-value{font-size:30px;font-weight:600;letter-spacing:-1px;color:var(--ink);margin-top:26px}
.stats-comparison-caption{font-size:12px;color:var(--muted);margin:5px 0 20px}
.stats-comparison-row{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);margin:12px 0 6px}
.stats-comparison-row strong{font-weight:500;color:var(--ink)}
.stats-meter{display:block;height:5px;background:var(--bg);border-radius:4px;overflow:hidden}
.stats-meter>span{display:block;height:100%;background:var(--accent);border-radius:4px}
.stats-meter>span.is-estimate{background:var(--muted);opacity:.55}
.stats-fineprint{color:var(--muted);font-size:10px;line-height:1.6;margin:18px 0 0}
.stats-notes,.stats-history{margin-bottom:20px}
.stats-table-scroll{overflow-x:auto;margin-top:18px}
.timer-statistics table{border-collapse:collapse;width:100%;text-align:left;font-size:12px;white-space:nowrap}
.timer-statistics th{font-weight:500;font-size:10px;letter-spacing:.04em;color:var(--muted);padding:0 16px 12px;border-bottom:1px solid var(--line)}
.timer-statistics td{padding:16px;border-bottom:1px solid var(--line);color:var(--body);vertical-align:middle}
.timer-statistics th:first-child,.timer-statistics td:first-child{padding-left:0;width:44%;white-space:normal;min-width:150px}
.timer-statistics th:last-child,.timer-statistics td:last-child{padding-right:0;text-align:right}
.timer-statistics tbody tr:last-child td{border-bottom:0}
.stats-note-link,.stats-note-name{display:block;max-width:100%;font-size:12px;font-weight:500;overflow-wrap:anywhere;color:var(--ink);line-height:1.5}
.stats-note-link{padding:0;border:0;background:transparent;text-align:left;min-height:24px;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}
.stats-note-link:hover{color:var(--accent);text-decoration-color:currentColor}
.stats-share{display:flex;align-items:center;gap:12px;justify-content:flex-end}
.stats-share .stats-meter{width:64px}
.stats-share>span:last-child{width:32px;font-size:11px;color:var(--muted)}
.stats-history-header{display:flex;align-items:center;justify-content:space-between;gap:20px}
.stats-history-header .stats-section-heading{display:block}
.stats-history-header .stats-section-heading>span{display:block;margin-top:6px}
.stats-search{width:230px;max-width:100%;min-height:38px;box-sizing:border-box;padding:9px 12px;border:1px solid var(--line);border-radius:7px;background:var(--bg);color:var(--ink);font:inherit;font-size:12px}
.stats-session-date{display:block;color:var(--muted);font-size:10px;margin-top:5px;white-space:nowrap}
.stats-difference{font-size:11px;color:var(--muted)}
.stats-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:16px;font-size:11px;color:var(--muted)}
.stats-pagination>div{display:flex;gap:6px}
.stats-pagination button,.stats-text-button{border:1px solid var(--line);border-radius:6px;padding:7px 10px;background:var(--sheet);color:var(--body);font-size:11px;min-height:32px}
.stats-pagination button:disabled{opacity:.4;cursor:default}
.stats-periods button:hover,.stats-pagination button:enabled:hover,.stats-text-button:hover{color:var(--accent);border-color:var(--accent)}
.stats-footer{font-size:11px;line-height:1.7;color:var(--muted);margin:0}
.stats-empty{text-align:center;border:1px dashed var(--line);border-radius:12px;padding:48px 20px;margin-top:20px}
.stats-empty-symbol{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid var(--line);border-radius:50%;font-size:28px;color:var(--accent);margin-bottom:16px}
.stats-empty h3{margin:0 0 10px;font-size:17px;font-weight:600;color:var(--ink)}
.stats-empty p{max-width:370px;margin:0 auto;color:var(--muted);font-size:13px;line-height:1.7}
.stats-shortcuts{display:flex;justify-content:center;flex-wrap:wrap;gap:16px;margin:24px 0 8px;font-size:11px;color:var(--muted)}
.stats-shortcuts kbd{display:inline-block;padding:4px 6px;border:1px solid var(--line);border-radius:4px;color:var(--ink);background:var(--bg);font:inherit;font-size:10px;margin-right:5px}
.stats-no-results{padding:28px 0;font-size:13px;color:var(--muted)}
.timer-statistics button:focus-visible,.stats-search:focus-visible,.stats-table-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:1050px){.stats-insights{grid-template-columns:1fr}.stats-header{align-items:flex-start;flex-direction:column;gap:18px}.stats-metric{padding:18px 14px}}
@media(max-width:600px){.timer-statistics{padding:20px 16px}.stats-header{margin-bottom:20px}.timer-statistics h2{font-size:21px}.stats-periods{align-self:stretch}.stats-periods button{flex:1;min-height:38px}.stats-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-metric:nth-child(2){border-right:0}.stats-metric:nth-child(-n+2){border-bottom:1px solid var(--line)}.stats-metric strong{font-size:26px}.stats-card{padding:18px 16px}.stats-history-header{align-items:stretch;flex-direction:column;gap:16px}.stats-search{width:100%}.stats-share .stats-meter{width:40px}.timer-statistics td{padding:14px 12px}.stats-pagination button{min-height:38px}.stats-chart{height:145px}.stats-insights{gap:16px}}

/* Timer controls */
#main .reading-timer-launch{color:#db263b;background:#ffe4e7;border-color:#f38b97}
#main .reading-timer-launch:hover,#main .reading-timer-launch:focus-visible{color:#b30d24;background:#ffd0d6;border-color:#e9495b}
html[data-theme=dark] #main .reading-timer-launch{color:#ff8691;background:#542832;border-color:#d35363}
html[data-theme=dark] #main .reading-timer-launch:hover,html[data-theme=dark] #main .reading-timer-launch:focus-visible{color:#ffb2b9;background:#713441;border-color:#ff8691}

#main>.sheet:has(.timer-statistics){min-width:0}
.timer-statistics{min-width:0;box-sizing:border-box}

/* Bright blue sync control in light mode; retain warning colors for unsaved/conflict states. */
html[data-theme="light"] #syncButton[data-state="saved"],html[data-theme="light"] #syncButton[data-state="saving"]{background:#1263d9;border-color:#1263d9;color:#fff}
html[data-theme="light"] #syncButton[data-state="saved"] .sync-dot,html[data-theme="light"] #syncButton[data-state="saving"] .sync-dot{background:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.22)}
html[data-theme="light"] #syncButton[data-state="saved"]:hover,html[data-theme="light"] #syncButton[data-state="saving"]:hover{background:#084fb7;border-color:#084fb7;filter:none}
html[data-theme="light"] #syncButton:focus-visible{outline:2px solid #1263d9;outline-offset:3px}

/* Light-theme activity and link names */
html[data-theme="light"] .heatmap-day[data-level="1"]{background:#79b9ff;border-color:#79b9ff}
html[data-theme="light"] .heatmap-day[data-level="2"]{background:#43a0ff;border-color:#43a0ff}
html[data-theme="light"] .heatmap-day[data-level="3"]{background:#1478ed;border-color:#1478ed}
html[data-theme="light"] .heatmap-day[data-level="4"]{background:#0756c5;border-color:#0756c5}
html[data-theme="light"] .link-name{color:#125b39}

/* New Year countdown */
.heatmap-actions{display:flex;align-items:center;justify-content:flex-end;gap:16px;min-width:0}
.new-year-widget{position:relative;display:flex;align-items:center;gap:12px;min-width:0;box-sizing:border-box;overflow:hidden;padding:8px 12px;border:1px solid #c5d9f6;border-radius:14px;background:linear-gradient(135deg,#edf6ff,#e2ecff);color:#164275}
.new-year-copy{display:flex;flex-direction:column;gap:4px;position:relative;z-index:1}
.new-year-label{font-size:9px;font-weight:700;letter-spacing:.14em;color:#4e75a0;white-space:nowrap}
.new-year-year{font-size:12px;font-weight:600;white-space:nowrap}
.new-year-remaining{display:flex;align-items:baseline;gap:5px;position:relative;z-index:1;white-space:nowrap}
.heatmap-toolbar .new-year-number{font-size:23px;line-height:1;font-weight:700;letter-spacing:-.8px;font-variant-numeric:tabular-nums;color:#145dc6}
.new-year-unit{font-size:10px;font-weight:600;color:#4e75a0}
.new-year-spark{position:absolute;right:-5px;top:-18px;font-size:58px;line-height:1;color:#a8c9f7;opacity:.24;pointer-events:none}
html[data-theme=dark] .new-year-widget{background:linear-gradient(135deg,#25384f,#292f4a);border-color:#405c81;color:#e1edff}
html[data-theme=dark] .new-year-label,html[data-theme=dark] .new-year-unit{color:#a6c0e4}
html[data-theme=dark] .heatmap-toolbar .new-year-number{color:#90c4ff}
html[data-theme=dark] .new-year-spark{color:#82aff1;opacity:.18}
@media(max-width:600px){.heatmap-toolbar{flex-wrap:wrap;align-items:flex-start}.heatmap-overview{flex:1 1 100%}.heatmap-actions{width:100%;justify-content:space-between;gap:10px}.new-year-widget{flex:1;min-width:0;justify-content:space-between;gap:8px;padding:8px 10px}.heatmap-toolbar .new-year-number{font-size:22px}.new-year-label{font-size:8px}.new-year-year{font-size:11px}}

html[data-theme="light"] #main .heatmap-title{color:#65686e}
html[data-theme="light"] #main .links-sheet .link-heading h1.title{color:#121212}

html[data-theme="light"] #main .link-history .link-event > p{color:#125b39}

/* Notes without a course */
.no-course-badge{display:inline-flex;align-items:center;gap:4px;box-sizing:border-box;padding:1px 5px;border:0;border-radius:4px;background:#fff2d9;color:#80500b;font-size:9px;font-weight:600;line-height:1.35;white-space:nowrap}.no-course-badge::before{content:"";width:4px;height:4px;flex:none;border-radius:50%;background:currentColor}
#side .note-row.no-course .note-heading{grid-template-columns:28px minmax(0,1fr) auto}
#side .note-row.no-course .note-heading>.no-course-badge{grid-column:3;grid-row:2;justify-self:end}
#side .note-row.no-course .note-heading>.label{grid-column:2/-1}
#side .note-row.no-course .row{border-left:3px solid #d49330}
#main .tile.no-course{border-top:3px solid #d49330}
html[data-theme=dark] .no-course-badge{background:#483721;border-color:#8a672f;color:#f9d693}
html[data-theme=dark] #side .note-row.no-course .row,html[data-theme=dark] #main .tile.no-course{border-left-color:#d9a750}
html[data-theme=dark] #main .tile.no-course{border-top-color:#d9a750}

/* Note header properties */
#main .note-sheet .meta label.note-property{display:inline-flex;align-items:center;flex:0 1 200px;gap:10px;min-width:0;box-sizing:border-box;min-height:54px;padding:8px 12px;border:1px solid #e2dfe6;border-radius:11px;background:#faf9fc;color:var(--ink);font-weight:400;transition:border-color .15s,box-shadow .15s,background .15s}
#main .note-sheet .meta label.date-label{flex-basis:174px}
.note-property-icon{display:flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border-radius:8px;background:#ede8f6;color:#7957a9}
.note-property-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.date-label .note-property-icon{background:#e7eef9;color:#4671aa}
.note-property-content{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}
.note-property-caption{font-size:9px;line-height:1.2;letter-spacing:.08em;font-weight:600;text-transform:uppercase;color:#817a8c}
#main .note-sheet .meta .note-property input{display:block;box-sizing:border-box;min-width:0;width:100%;max-width:100%;height:21px;min-height:21px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#302d38;font-family:inherit;font-size:12px;font-weight:500;line-height:21px;box-shadow:none;outline:none}
#main .note-sheet .meta .note-property input::placeholder{color:#96909e;font-weight:400;opacity:1}
#main .note-sheet .meta .note-property:has(input:not([readonly])):hover{border-color:#c4b7d8;background:#fff}
#main .note-sheet .meta .note-property:focus-within{border-color:#9a7ac3;box-shadow:0 0 0 3px #9674c314;background:#fff}
#main .note-sheet .meta .note-property:has(input[readonly]){background:transparent;border-color:var(--line)}
#main .note-property input[type=date]::-webkit-calendar-picker-indicator{width:12px;height:12px;margin:0;opacity:.5;cursor:pointer}
#main .note-property input[readonly]::-webkit-calendar-picker-indicator{opacity:.25;cursor:default}
html[data-theme=dark] #main .note-sheet .meta label.note-property{background:#292834;border-color:#45414f;color:#e5dfed}
html[data-theme=dark] .note-property-icon{background:#3f344f;color:#cfb4ef}
html[data-theme=dark] .date-label .note-property-icon{background:#2f3d52;color:#a6c8f6}
html[data-theme=dark] .note-property-caption{color:#aaa0b7}
html[data-theme=dark] #main .note-sheet .meta .note-property input{color:#e5dfed;background:transparent;border:0}
html[data-theme=dark] #main .note-sheet .meta .note-property input::placeholder{color:#92899e}
html[data-theme=dark] #main .note-sheet .meta .note-property:focus-within{border-color:#b99bde;background:#302c3c;box-shadow:0 0 0 3px #b99bde14}
html[data-theme=dark] #main .note-sheet .meta .note-property:has(input:not([readonly])):hover{background:#302c3c;border-color:#8f77ab}
@media(max-width:600px){#main .note-sheet .meta label.note-property{flex:1 1 150px;min-height:54px;padding:8px 10px;gap:8px}#main .note-sheet .meta label.date-label{flex-basis:150px}}

/* Course navigation numbers */
#side .row.course .course-number{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:21px;height:21px;padding:0 4px;box-sizing:border-box;border:1px solid var(--line);border-radius:5px;background:var(--sheet);color:var(--muted);font-size:10px;font-weight:600;font-variant-numeric:tabular-nums;margin-right:6px}
#side .row.course.active .course-number{color:var(--accent);border-color:currentColor}

/* Course groups in the connection tree */
.tree-course-group+.tree-course-group{margin-top:28px;padding-top:22px;border-top:1px solid var(--line)}
.tree-course-heading{display:flex;align-items:center;gap:9px;margin:0 0 14px;color:var(--ink);font-size:14px;font-weight:700;overflow-wrap:anywhere}
.tree-course-heading span{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border-radius:6px;background:var(--select);color:var(--accent);font-size:10px;font-weight:600}

/* Visual tree cards */
html[data-theme=light] #main .tree-controls>label{color:#303039;font-weight:600}
.tree-view-switch{display:inline-flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
.tree-view-switch button{padding:6px 12px;min-height:32px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--muted);font-size:11px;font-weight:600}
.tree-view-switch button[aria-pressed=true]{color:var(--accent);border-color:var(--line);background:var(--sheet)}
.tree-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));gap:14px}
.tree-visual-card{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--sheet);min-width:0;box-shadow:0 3px 10px #00000004}
.tree-card-title{display:flex;align-items:flex-start;flex-direction:column;gap:10px;padding:0 0 14px;border:0;background:transparent;color:var(--ink);width:100%;text-align:left;font:inherit;font-size:13px;font-weight:600;overflow-wrap:anywhere}
.tree-card-title:hover{color:var(--accent)}
.tree-card-caption{display:block;padding-top:12px;border-top:1px solid var(--line);color:var(--muted);font-size:9px;letter-spacing:.08em}
.tree-card-links{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.tree-card-links button{display:flex;gap:8px;align-items:baseline;text-align:left;padding:7px 9px;border:1px solid transparent;border-radius:6px;background:var(--bg);color:var(--body);font-size:11px;overflow-wrap:anywhere}
.tree-card-links button>span{color:var(--accent)}
.tree-card-links button:hover{border-color:var(--line);color:var(--accent)}
.tree-view-switch button:focus-visible,.tree-card-title:focus-visible,.tree-card-links button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:600px){.tree-view-switch{align-self:flex-start}.tree-view-switch button{min-height:40px}.tree-controls [hidden]{display:none}}

.tree-controls [hidden]{display:none}
