:root{color-scheme:light;--ink:#1d1d1f;--muted:#6e6e73;--accent:#26734d;--blue:var(--accent);--line:#e5e5e8;--paper:#ffffff;--shelf:#f5f5f7;--selected:#e5eee8;--white:#ffffff;--serif:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:var(--accent)}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.6;cursor:wait}button,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #4d875c;outline-offset:4px}[hidden]{display:none!important}
h1,h2,h3,h4,p{margin:0}h1,h2,h3{font-family:var(--serif);font-weight:400;line-height:1.25;letter-spacing:-.6px}h1{font-size:32px}h2{font-size:28px}h3{font-size:26px}h4{font-size:14px;font-weight:500}p{overflow-wrap:anywhere}
:root{--sidebar-width:236px;--sidebar-entry-width:32px}
/* Drag handles occupy the tool-list indent and the gutter beside section headers, preserving link targets. */
.nav-groups{display:flex;flex-direction:column;gap:8px}.tool-links li,.nav-group,.nav-group-head{position:relative}.reorder-handle{position:absolute;left:-25px;top:0;width:24px;height:100%;min-height:0;padding:5px;border:0;border-radius:4px;display:grid;place-items:center;background:#f0f3e9;color:var(--muted);cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.nav-group-head>.reorder-handle{left:-17px;width:16px;padding:5px 2px}.reorder-handle svg{width:12px;height:20px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;pointer-events:none}.reorder-handle:hover,.reorder-handle:focus-visible{background:var(--selected);color:var(--accent)}.reorder-handle:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.tool-links .reorder-dragging,.nav-group.reorder-dragging{z-index:2;background:var(--selected);border-radius:5px;box-shadow:0 3px 12px #23382026;opacity:.9;pointer-events:none}.nav-group.reorder-dragging{background:var(--paper)}.reorder-dragging>.reorder-handle,.reorder-dragging>.nav-group-head>.reorder-handle{cursor:grabbing}.tool-links .reorder-moving a,.nav-group.reorder-moving>.nav-group-head>.nav-parent{outline:2px solid var(--accent);outline-offset:-2px}.reorder-drop-before::before,.reorder-drop-after::after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--accent);pointer-events:none}.reorder-drop-before::before{top:-3px}.reorder-drop-after::after{bottom:-3px}.nav-group.reorder-drop-before::before{top:-5px}.nav-group.reorder-drop-after::after{bottom:-5px}
/* Reveal secondary controls without removing keyboard or touch access. */
@media (hover:hover) and (pointer:fine){
  .reorder-handle{opacity:0}
  .tool-links li:hover>.reorder-handle,
  .tool-links li:focus-within>.reorder-handle,
  .nav-group-head:hover>.reorder-handle,
  .nav-group-head:focus-within>.reorder-handle,
  :is(.reorder-dragging,.reorder-moving)>.reorder-handle,
  :is(.reorder-dragging,.reorder-moving)>.nav-group-head>.reorder-handle{opacity:1}
}
@media (any-pointer:coarse){.reorder-handle{opacity:1}}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);z-index:30;display:flex;flex-direction:column;padding:0;background:#f0f3e9;border-right:1px solid var(--line);transition:transform 220ms ease,visibility 0s;overflow:hidden}.sidebar-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 8px 30px}.brand{font:34px/1 var(--serif);letter-spacing:-1.4px;color:var(--accent);text-decoration:none}.icon-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;padding:7px;border:0;border-radius:5px;background:transparent;color:var(--muted)}.icon-button:hover{background:var(--selected);color:var(--accent)}.icon-button svg,.nav-parent svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.sidebar-nav{display:flex;flex-direction:column;gap:8px;flex:1}.nav-parent{width:100%;display:flex;align-items:center;gap:11px;border:0;background:transparent;padding:11px 12px;border-radius:5px;font-size:14px;line-height:1.6;text-align:left;color:var(--muted);text-decoration:none}.nav-parent:hover{background:#e8ecef;color:var(--accent)}.nav-parent.current{color:var(--accent)}.nav-parent[aria-current=page]{background:var(--selected);color:var(--accent)}.nav-parent .chevron{margin-left:auto;width:16px;transition:transform 180ms ease}.nav-parent[aria-expanded=false] .chevron{transform:rotate(-90deg)}.tool-links{list-style:none;margin:4px 0 8px 21px;padding:0 0 0 10px;border-left:1px solid #c9d5c2}.tool-links li+li{margin-top:4px}.tool-links a{display:block;padding:9px 10px;border-radius:5px;font-size:14px;line-height:1.6;color:var(--muted);text-decoration:none;overflow-wrap:anywhere}.tool-links a:hover{background:#e8ecef;color:var(--accent)}.tool-links a[aria-current=page]{background:var(--selected);color:var(--accent);font-weight:500}.sidebar-nav>form{margin-top:auto;padding:24px 12px 0}.signout{font-size:14px;line-height:1.6;color:var(--muted);background:none;border:0;padding:0;cursor:pointer}.signout:hover{color:var(--accent);text-decoration:underline}.app-shell{margin-left:var(--sidebar-width);min-width:0;transition:margin-left 220ms ease}#sidebar-toggle{position:fixed;left:0;z-index:10}.sidebar-backdrop{display:none}body[data-sidebar-open=false] .sidebar{transform:translateX(-100%);visibility:hidden;transition:transform 220ms ease,visibility 0s 220ms}body[data-sidebar-open=false] .app-shell{margin-left:var(--sidebar-entry-width)}body:not([data-sidebar-open=false]) #sidebar-toggle{display:none}#tools,#projects{scroll-margin-top:24px}main{max-width:1320px;margin:auto;padding:28px 32px 64px}
/* Full-height pane rails share the graph pattern; touch uses the existing navigation input mode. */
.sidebar-scroll{display:flex;flex-direction:column;min-height:0;width:calc(100% - 32px);height:100%;overflow-y:auto;overscroll-behavior:contain;padding:26px 8px 22px 18px}
.sidebar-rail{position:absolute;inset:0 0 0 auto;display:flex;align-items:center;justify-content:center;width:32px;height:100%;padding:0;border:0;border-left:1px solid transparent;border-radius:0;background:transparent;color:var(--muted);z-index:1}
.sidebar-rail svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:0;pointer-events:none}
body:has(#nav-groups[data-nav-input=touch]) .sidebar-rail{background:var(--shelf);border-left-color:var(--line)}
body:has(#nav-groups[data-nav-input=touch]) .sidebar-rail svg{opacity:1}
@media(any-hover:hover){body:has(#nav-groups[data-nav-input=pointer]) .sidebar-rail:hover{background:var(--selected);border-left-color:var(--line);color:var(--accent)}body:has(#nav-groups[data-nav-input=pointer]) .sidebar-rail:hover svg{opacity:1}}
.sidebar-rail:focus-visible{background:var(--selected);border-left-color:var(--line);color:var(--accent);outline-offset:-3px}
.sidebar-rail:focus-visible svg{opacity:1}
.workspace{border:1px solid var(--line);border-radius:10px;background:var(--white);overflow:hidden}.padded-workspace{padding:30px}.workspace-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:24px}.workspace-heading h1{font-size:28px}
.library-layout{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:510px}.library-shelf{background:var(--shelf);border-right:1px solid var(--line);padding:25px 18px}.shelf-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:0 12px;margin-bottom:17px}.shelf-heading h1,.shelf-title{font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0;color:var(--accent)}.shelf-title{margin-bottom:14px}.meta,.document-meta{font-size:12px;color:var(--muted)}.saved-list{display:flex;flex-direction:column}.saved-book{width:100%;text-align:left;border:0;border-left:2px solid transparent;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);padding:17px 12px;overflow-wrap:anywhere}.saved-book strong{display:block;font-size:14px;font-weight:500;line-height:1.5}.saved-book span{display:block;margin-top:6px;font-size:12px;color:var(--muted)}.saved-book:hover{background:#e8ecef}.saved-book.selected{border-left-color:var(--accent);background:var(--selected);color:var(--accent)}.reading-area{padding:31px 40px;min-width:0}.reading-empty{padding:32px 0}.reading-empty h2{font-size:28px;margin-bottom:12px}.reading-empty p{color:var(--muted);font-size:16px;max-width:45ch}.empty{color:var(--muted);font-size:14px;padding:14px 12px}.summary-panel{min-width:0}.summary-panel>h3{margin:12px 0 16px}.summary-panel h4{margin:22px 0 10px}.summary-panel p{line-height:1.7}.document-header h2{font-size:34px;margin:10px 0 13px;overflow-wrap:anywhere}.document-header .hint{margin:0}.reading-tabs{display:flex;gap:26px;border-bottom:1px solid var(--line);margin-top:23px}.reading-tabs button{font-size:14px;padding:0 0 12px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted)}.reading-tabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}.reading-copy{font-family:var(--serif);font-size:18px;line-height:1.8;margin:0;padding:10px 0 0;list-style:none;max-width:70ch}.reading-copy li{padding:20px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.reading-copy li:last-child{border:0}.reading-footer{border-top:1px solid var(--line);margin-top:24px;padding-top:18px;display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.download{font-size:14px;color:var(--accent);text-underline-offset:4px}.reading-concepts{padding-top:20px}.reading-concepts .hint{margin-top:12px}
details{border-top:1px solid var(--line);padding-top:16px;margin-top:24px}summary{cursor:pointer;color:var(--accent);font-size:14px;font-weight:500;width:fit-content}.upload-panel{margin:0 0 22px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--shelf)}.upload-panel>summary{padding:15px 18px;width:100%}.upload-panel form{padding:0 18px 18px}.upload-panel:not([open]){display:none}.upload{display:flex;flex-direction:column;gap:8px}.upload input{width:100%;min-width:0;font-size:14px}.upload input::file-selector-button{border:1px solid var(--line);background:var(--white);color:var(--accent);font:inherit;border-radius:4px;padding:8px 12px;margin-right:10px;cursor:pointer}label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:500}input:not([type=file]),textarea{width:100%;min-width:0;padding:11px 13px;border:1px solid #b8c1cb;border-radius:5px;background:var(--white);color:var(--ink);font-size:16px}.form-row{display:flex;gap:16px;align-items:flex-end;margin-top:18px}.form-row label{flex:1}.primary{border:1px solid var(--accent);border-radius:5px;background:var(--accent);color:white;padding:11px 18px;font-size:14px;font-weight:500;line-height:1.6;white-space:nowrap}.primary:hover{background:#1e4b32}.primary.compact{padding:8px 16px}.hint{font-size:13px;color:var(--muted);line-height:1.6;margin-top:12px}.badge{display:inline-block;background:var(--selected);color:var(--accent);font-size:12px;border-radius:4px;padding:4px 9px}.concept-list{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.concept-list button{border:1px solid #c6ced8;background:var(--shelf);color:var(--accent);padding:7px 11px;border-radius:4px;font-size:14px}.concept-list button:hover{background:var(--selected)}.graph-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(230px,1fr);gap:30px}.graph-surface{background:var(--shelf);border:1px solid var(--line);border-radius:6px;min-height:330px;display:grid;place-items:center}.graph-surface svg{width:100%;height:auto}.graph-surface .empty{text-align:center;max-width:42ch;padding:30px}.discussion form{display:grid;gap:16px;padding-top:20px}.discussion .primary{justify-self:start}.summary-panel details p{margin-top:12px}#book-status,#discussion-status,#youtube-status{font-size:14px;color:var(--accent);margin:16px 0}#book-status:empty,#discussion-status:empty,#youtube-status:empty{display:none}
.page-heading{padding:14px 0 28px}.project{border-top:1px solid var(--line);padding:26px 0;max-width:740px}.project-heading{display:flex;align-items:center;gap:18px;margin-bottom:12px}.project p,.project ul{color:var(--muted)}.project ul{padding-left:20px}.project li+li{margin-top:10px}
#industry-research-panel .industry-project-link{display:inline-flex;align-items:center;min-height:44px;margin-top:12px;text-underline-offset:4px}
#industry-research-panel .industry-study-link{display:inline-flex;align-items:center;min-height:44px;margin-top:20px;text-decoration:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.secondary{font-size:14px;border:1px solid #c6ced8;background:var(--shelf);border-radius:4px;padding:7px 11px;color:var(--accent);text-decoration:none}.transcript-workspace{container-type:inline-size;container-name:transcript}.youtube-entry{padding:20px 24px;border-bottom:1px solid var(--line)}#youtube-form{display:flex;align-items:stretch;gap:12px}#youtube-form label{flex:1;min-width:0}#youtube-form input{height:100%}#youtube-form button:disabled{cursor:not-allowed}.youtube-add{margin:0;padding:0;border:0}.youtube-add>h2{font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0;color:var(--accent);margin-bottom:14px}.youtube-add>.hint{margin-top:8px}.youtube-recent{margin:0;padding:0;border:0}.youtube-recent>h2{width:100%;padding:0 8px;margin-bottom:12px}.youtube-recent>h2 .meta{float:right}.youtube-notice{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 16px;margin-top:16px;border:1px solid #dfd4b7;border-radius:5px;background:#fff8e8;color:#735723;font-size:14px}.youtube-notice p{line-height:1.6}.youtube-notice .secondary{flex:none;color:inherit;background:transparent;border-color:#d8c9a5}#youtube-status{font-size:14px;margin:10px 0 0}#youtube-status[data-state=error]{color:#90402f}.youtube-layout{display:grid;grid-template-columns:210px minmax(0,1fr);min-height:460px}.youtube-layout>*{min-width:0}.transcript-shelf{background:var(--shelf);border-right:1px solid var(--line);padding:23px 12px}.transcript-shelf .shelf-heading{padding:0 8px;margin-bottom:12px}.transcript-shelf h2{font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0;color:var(--accent)}.transcript-shelf .saved-list{max-height:65vh;overflow:auto}.transcript-reader{padding:30px 32px;min-width:0}.transcript-empty{padding:26px 0;max-width:42ch}.transcript-empty h1,.transcript-empty h2{font-size:28px;line-height:1.4;margin:10px 0 12px}.transcript-empty p{color:var(--muted);font-size:16px;line-height:1.75}.transcript-empty .secondary{margin-top:18px}.transcript-heading h1{font-size:28px;line-height:1.4;letter-spacing:-.4px;overflow-wrap:anywhere;margin:10px 0 14px}.transcript-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:25px;border-bottom:1px solid var(--line)}.transcript-controls .reading-tabs{margin:0;border:0;gap:22px;align-self:end}.youtube-actions{display:flex;align-items:center;gap:8px;padding-bottom:10px}.youtube-download{position:relative;border:0;padding:0;margin:0}.youtube-download>summary{width:auto;list-style:none;font-weight:400}.youtube-download>summary::-webkit-details-marker{display:none}.youtube-download>div{position:absolute;right:0;top:calc(100% + 6px);z-index:2;min-width:145px;padding:6px;background:var(--white);border:1px solid var(--line);border-radius:6px;box-shadow:0 5px 16px #23382014}.youtube-download a{display:block;padding:8px 12px;font-size:14px;text-decoration:none;border-radius:4px}.youtube-download a:hover{background:var(--selected)}.youtube-search{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:10px;margin:18px 0 4px}.youtube-search input{flex:1;min-width:150px!important}.youtube-lines{max-height:none;overflow:visible}.youtube-line{display:grid;grid-template-columns:72px minmax(0,1fr);gap:16px;padding:18px 0;border-bottom:1px solid var(--line);align-items:start}.youtube-line>a{font:12px/1.8 ui-monospace,monospace;color:var(--muted);text-decoration:none;white-space:nowrap}.youtube-line>a:hover{color:var(--accent);text-decoration:underline}.youtube-line p{font:18px/1.85 var(--serif);overflow-wrap:anywhere;margin:0;max-width:74ch}.youtube-lines[data-format=reading] .youtube-line{display:block;padding:22px 0}.youtube-lines[data-format=reading] .youtube-line>a{display:inline-block;margin-bottom:7px}.youtube-line mark{background:#f8dfa0;color:inherit;padding:1px 0}.transcript-footnote{padding-top:20px}
@container transcript (max-width:720px){.youtube-layout{grid-template-columns:1fr;min-height:0}.transcript-shelf{border-right:0;border-bottom:1px solid var(--line);padding:17px 18px}.transcript-shelf .saved-list{max-height:160px}.transcript-shelf .saved-book{padding:11px 10px}.transcript-shelf .empty{padding:4px 8px}.transcript-reader{padding:24px}.transcript-heading h1{font-size:25px}}
@container transcript (max-width:430px){.youtube-entry{padding:16px}.youtube-notice{align-items:flex-start;flex-direction:column;gap:10px}.transcript-reader{padding:21px 18px}.transcript-controls{align-items:flex-start;gap:14px}.transcript-controls .reading-tabs{order:2;width:100%}.youtube-actions{padding:0}.youtube-line{grid-template-columns:1fr;gap:5px}.youtube-line p{font-size:17px}#youtube-form{flex-direction:column}#youtube-form .primary{align-self:flex-end}.transcript-heading h1{font-size:24px}}
.login-shell{max-width:450px;margin:8vh auto;padding:32px 28px}.login-brand{font:38px/1 var(--serif);color:var(--accent);letter-spacing:-1.5px;margin-bottom:40px}.login-shell h1{font-size:32px}.login-form{display:grid;gap:19px;margin-top:26px}.login-form .primary{font-size:16px}.login-password-group{display:grid;gap:7px}.login-password-field{position:relative}.login-password-field input{padding-right:76px}.password-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);min-width:64px;min-height:44px;padding:8px 10px;border:0;border-radius:4px;background:transparent;color:var(--accent);font-size:14px;font-weight:500;line-height:1.5}.password-toggle:hover{background:var(--selected)}.password-toggle:focus-visible{outline-offset:0}.login-form [role=status]{font-size:14px;color:#993e33;margin:0}.login-form [role=status]:empty{display:none}.google-button{display:inline-block;padding:12px 20px;margin:22px 0;border:1px solid var(--line);background:var(--white);color:var(--accent);border-radius:5px;text-decoration:none}.mark{background:var(--accent);color:white;width:40px;height:40px;display:grid;place-items:center;border-radius:8px;font:32px/1 var(--serif)}
@media(max-width:900px){.bar{padding:23px 26px}main{padding:22px 26px 48px}.library-layout{grid-template-columns:215px minmax(0,1fr)}.reading-area{padding:27px}.tool-tabs{gap:22px}.graph-layout{grid-template-columns:minmax(0,1.3fr) minmax(200px,1fr);gap:20px}}
@media(max-width:660px){.bar{padding:22px 20px}.brand{font-size:31px}.nav{gap:18px}main{padding:16px 16px 40px}.tool-bar{align-items:flex-start;gap:14px;flex-wrap:wrap}.tool-tabs{gap:18px}.tool-tabs button{padding:8px 0}.library-layout,.graph-layout,.youtube-layout{grid-template-columns:1fr}.library-layout{min-height:0}.library-shelf{border-right:0;border-bottom:1px solid var(--line);padding:19px 14px}.saved-list{max-height:225px;overflow:auto}.reading-area{padding:25px 22px}.document-header h2{font-size:30px}.reading-copy{font-size:17px}.padded-workspace{padding:23px 20px}.form-row{flex-direction:column;align-items:stretch;gap:16px}.form-row label{width:100%}.graph-surface{min-height:270px}.workspace-heading h1{font-size:27px}.youtube-layout{gap:24px}.youtube-line{grid-template-columns:65px minmax(0,1fr);gap:10px}.youtube-line p{font-size:17px}.project-heading{flex-wrap:wrap}.login-shell{margin:5vh auto}}
@media(max-width:380px){.bar{gap:14px;flex-wrap:wrap}.nav{gap:16px}.tool-tabs{gap:13px}.tool-tabs button{font-size:13px}.reading-area{padding:23px 18px}}
@media(pointer:coarse){button,summary,.nav a,.signout{min-height:44px}.nav a,.signout{display:inline-flex;align-items:center}.tool-tabs button{min-height:44px}}

.node-actions,.dialog-actions{display:flex;gap:10px;flex-wrap:wrap}.node-actions .secondary,.dialog-actions .secondary,.danger{border:1px solid var(--line);border-radius:8px;padding:10px 15px;background:white;font-size:14px;font-weight:600;color:var(--ink)}.node-actions .secondary:hover,.dialog-actions .secondary:hover{background:#f0f3fc}.danger{border-color:#e6baba;color:#a62626}.danger:hover{background:#fff1f1}.node-notes{white-space:pre-wrap}.concept-list button[aria-pressed=true]{background:#2748ef;color:white;border-color:#2748ef}.graph-node{cursor:pointer}#concept-list{max-height:240px;overflow:auto;padding:4px}#graph-status{color:#34478b;font-size:14px}#graph-status:empty,.form-error:empty{display:none}dialog{width:min(540px,calc(100% - 32px));max-height:90dvh;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:28px;color:var(--ink);box-shadow:0 20px 70px #101c3b30}dialog::backdrop{background:#14204080}dialog form{display:grid;gap:13px}dialog h2{margin-bottom:8px}dialog input,dialog textarea{font-size:16px}dialog label{display:block;font-size:15px}dialog textarea{resize:vertical}dialog p{margin:0;overflow-wrap:anywhere}.dialog-actions{justify-content:flex-end;margin-top:8px}.optional{font-weight:400;color:var(--muted)}.form-error{color:#a62626;font-size:14px}.summary-panel h3{overflow-wrap:anywhere}@media(max-width:720px){.workspace-heading #add-node{margin-top:16px}dialog{padding:22px}}
.youtube-layout{display:grid;grid-template-columns:minmax(180px,230px) minmax(0,1fr);gap:26px;margin-top:0;border-top:0;padding-top:0}.youtube-layout>*{min-width:0}.youtube-actions{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.secondary{font:inherit;font-size:14px;border:1px solid var(--line);background:#f7f9ff;border-radius:7px;padding:7px 11px;color:var(--blue);text-decoration:none}.youtube-search{margin:18px 0}.youtube-lines{max-height:65vh;overflow:auto;border-top:1px solid var(--line)}.youtube-line{display:grid;grid-template-columns:78px minmax(0,1fr);gap:14px;padding:15px 0;border-bottom:1px solid var(--line);align-items:start}.youtube-line>a{font:13px/1.8 monospace;color:var(--blue);text-decoration:none}.youtube-line p{font-size:16px;line-height:1.65;overflow-wrap:anywhere;margin:0}#youtube-status{font-size:14px;color:#34478b}#youtube-status:empty{display:none}.tool-tabs{flex-wrap:wrap}.youtube-layout aside .saved-list{max-height:70vh;overflow:auto}@media(max-width:720px){.youtube-layout{grid-template-columns:1fr}.youtube-layout aside .saved-list{max-height:200px}.tool-tabs button{min-width:130px}.youtube-line{grid-template-columns:70px minmax(0,1fr);gap:8px}.youtube-lines{max-height:60vh}}

.selection-controls{align-items:center;padding:14px;background:#f5f7ff;border:1px solid var(--line);border-radius:10px;margin-bottom:16px}.selection-controls span{font-size:14px;font-weight:600;margin-right:auto}

.model-row{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:20px 0;border-bottom:1px solid var(--line);margin-bottom:20px}select{font:inherit;padding:12px;border:1px solid var(--line);border-radius:6px;background:white;color:var(--ink);max-width:100%}main:has(#models-panel:not([hidden])){max-width:none}#models-panel{width:100%;max-width:none}#provider-status,#model-settings-status,#connect-status{font-size:14px;overflow-wrap:anywhere}@media(max-width:700px){.model-row{grid-template-columns:1fr}}

.book-review{border-top:1px solid var(--line);margin-top:32px;padding-top:24px}.book-review form{display:grid;gap:12px}.book-review h4{margin-top:24px}.review-message{padding:14px;border-left:3px solid var(--line);margin:14px 0;background:#f5f6f8}.review-message p{white-space:pre-wrap;margin:6px 0}.review-history{max-height:420px;overflow:auto}#review-status{font-size:14px}
@media(max-width:900px){main{padding:22px 26px 48px}.library-layout{grid-template-columns:215px minmax(0,1fr)}.reading-area{padding:27px}.graph-layout{grid-template-columns:minmax(0,1.3fr) minmax(200px,1fr);gap:20px}}
@media(max-width:660px){main{padding:16px 16px 40px}.library-layout,.graph-layout,.youtube-layout{grid-template-columns:1fr}.library-layout{min-height:0}.library-shelf{border-right:0;border-bottom:1px solid var(--line);padding:19px 14px}.saved-list{max-height:225px;overflow:auto}.reading-area{padding:25px 22px}.document-header h2{font-size:30px}.reading-copy{font-size:17px}.padded-workspace{padding:23px 20px}.form-row{flex-direction:column;align-items:stretch;gap:16px}.form-row label{width:100%}.graph-surface{min-height:270px}.workspace-heading h1{font-size:27px}.project-heading{flex-wrap:wrap}.login-shell{margin:5vh auto}}
@media(max-width:380px){.reading-area{padding:23px 18px}}
@media(max-width:1080px) and (min-width:761px){body:not([data-sidebar-open=false]) .library-layout{grid-template-columns:190px minmax(0,1fr)}body:not([data-sidebar-open=false]) .form-row{flex-direction:column;align-items:stretch}body:not([data-sidebar-open=false]) .reading-area{padding:26px}}
@media(max-width:760px){.sidebar{width:min(280px,calc(100vw - 48px));transform:translateX(-100%);visibility:hidden;transition:transform 220ms ease,visibility 0s 220ms}.app-shell{margin-left:var(--sidebar-entry-width);transition:none}body[data-sidebar-open=true]{overflow:hidden}body[data-sidebar-open=true] .sidebar{transform:translateX(0);visibility:visible;transition:transform 220ms ease,visibility 0s}.sidebar-backdrop{display:block;position:fixed;inset:0;z-index:20;background:rgb(30 47 31 / 28%);opacity:0;visibility:hidden;transition:opacity 220ms ease,visibility 0s 220ms}body[data-sidebar-open=true] .sidebar-backdrop{opacity:1;visibility:visible;transition:opacity 220ms ease,visibility 0s}.icon-button{width:40px;height:40px}.tool-links a,.nav-parent{padding-top:12px;padding-bottom:12px}}
@media(pointer:coarse){button,summary,.tool-links a,.nav-parent,.signout{min-height:44px}.icon-button{width:44px}.signout{display:inline-flex;align-items:center}}
@media(prefers-reduced-motion:reduce){.sidebar,.app-shell,.sidebar-backdrop,.nav-parent .chevron{transition:none!important}}

/* Transcript history: independent open and remove controls. */
.transcript-recent{position:relative;border-left:2px solid transparent;border-bottom:1px solid var(--line);min-width:0}.transcript-recent.selected{border-left-color:var(--accent);background:var(--selected);color:var(--accent)}.recent-open{display:block;width:100%;text-align:left;border:0;border-radius:0;background:transparent;color:inherit;padding:15px 38px 15px 12px;overflow-wrap:anywhere}.recent-open:hover{background:#23382008}.recent-open strong{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;font-weight:500;line-height:1.6}.recent-open span{display:block;margin-top:7px;font-size:12px;color:var(--muted)}.recent-remove{position:absolute;top:7px;right:3px;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:22px;line-height:1}.recent-remove:hover{color:#90402f;background:#90402f0d}.recent-remove:disabled{opacity:.5;cursor:wait}.recent-open:focus-visible,.recent-remove:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.youtube-removed{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 8px;font-size:12px;color:var(--muted)}.youtube-removed p{margin:0}.youtube-removed .secondary{padding:4px 9px;font-size:12px}

.provider-quotas{margin:24px 0 32px}.quota-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.quota-heading h2{margin:0;font-size:24px}.quota-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.quota-card{border:1px solid var(--line);border-radius:12px;padding:20px;min-width:0}.quota-card h3{font-size:18px;margin:0 0 16px}.quota-window{margin:14px 0}.quota-window strong,.quota-window small{display:block}.quota-window small{font-size:12px;line-height:1.5;margin-top:6px}.quota-window progress{width:100%;height:8px;accent-color:#285d40}.quota-card p{font-size:14px}

.model-actions{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding-top:4px}.model-test{display:flex;align-items:flex-end;gap:12px}.model-test label{display:flex;flex-direction:column;gap:8px;margin:0;font-size:14px}.model-actions button,.model-test select{min-height:46px;height:46px;margin:0;padding:10px 18px;font-size:14px;line-height:24px;white-space:nowrap}.model-test .secondary{border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font-weight:600}.model-test .secondary:hover{background:#eef3eb}#model-settings-status{margin:16px 0 0;min-height:22px;line-height:1.5}@media(max-width:700px){.model-actions{align-items:stretch;flex-direction:column;gap:22px}.model-save{width:100%}.model-test{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.model-test select{width:100%;min-width:0}}@media(max-width:380px){.model-test{grid-template-columns:1fr}}

/* Time awareness follows the existing green reading-room palette. */
.time-workspace{padding:32px;max-width:1500px;margin:auto}.time-heading,.time-toolbar,.time-section-heading,.time-session-heading,.time-session-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.time-heading{justify-content:space-between;margin-bottom:24px}.time-heading h1{margin:4px 0 10px;font-family:Georgia,serif;font-size:clamp(1.8rem,3vw,2.6rem);font-weight:400}.time-heading .eyebrow{font-size:.8rem;letter-spacing:.13em;color:#477157;margin:0}.time-heading [role=status]{margin:0;color:#656e67;font-size:.9rem}.time-heading [data-recording=true]{color:#285d40}.time-toolbar{border-block:1px solid #dce5dc;padding:16px 0;align-items:end}.time-toolbar label{display:flex;flex-direction:column;gap:6px;margin:0}.time-toolbar input{width:auto}.time-toolbar a{text-decoration:none;display:inline-block}.time-toolbar .text-button{margin-left:auto}.time-totals{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;padding:24px 0 14px}.time-totals>div{border-left:2px solid #d8e4d7;padding-left:16px}.time-totals span{display:block;font-size:.9rem;color:#56675b}.time-totals strong{font-size:clamp(1.5rem,2.6vw,2.2rem);font-family:Georgia,serif;font-weight:400;display:block;margin-top:7px;font-variant-numeric:tabular-nums}.time-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:36px;margin-top:28px}.time-section-heading{justify-content:space-between;border-bottom:1px solid #dce5dc;padding-bottom:12px}.time-section-heading h2{font-size:1.25rem;margin:0}.time-timeline{list-style:none;margin:0;padding:0}.time-session{display:grid;grid-template-columns:76px minmax(0,1fr);gap:16px;padding:20px 0;border-bottom:1px solid #e4e9e2}.time-session-clock{font-size:.85rem;font-variant-numeric:tabular-nums;display:flex;flex-direction:column;gap:7px;color:#637168}.time-session-clock time{color:#263e2d}.time-session-body{min-width:0}.time-session-heading{gap:8px}.time-session-heading strong{font-size:1rem;overflow-wrap:anywhere}.time-label{font-size:.8rem;background:#e9f1e6;padding:3px 8px;border-radius:4px;color:#28513b}.time-title{font-size:.95rem;line-height:1.5;overflow-wrap:anywhere;margin:9px 0}.time-session .hint{margin:9px 0;font-size:.875rem}.time-session-actions .meta{margin-right:auto}.time-session-actions .compact{padding:5px 10px;font-size:.875rem;min-height:32px}.time-session[data-state=idle],.time-session[data-state=excluded],.time-session[data-state=unknown]{opacity:.75}.text-button{background:transparent;border:0;color:#3c654a;padding:8px 0;text-decoration:underline;text-underline-offset:3px;cursor:pointer;font:inherit;font-size:.875rem}.text-button:disabled{opacity:.45;cursor:default}.time-empty{padding:40px 0;color:#5a695e;line-height:1.6}.time-empty h2{font-family:Georgia,serif;font-weight:400;font-size:1.6rem;color:#28513b}.time-summary{align-self:start;padding:20px;background:#f0f5ed;border-radius:8px}.time-summary>label{margin-top:0;font-size:.875rem}.time-breakdown-row{margin-top:20px}.time-breakdown-row>div{display:flex;justify-content:space-between;gap:12px;line-height:1.4;font-size:.9rem;overflow-wrap:anywhere}.time-breakdown-row progress{width:100%;height:6px;accent-color:#477957;margin-top:8px}.time-explanation{border-top:1px solid #d5e0d1;margin-top:28px;padding-top:16px;font-size:.875rem;line-height:1.6}.time-explanation summary{font-weight:600;cursor:pointer}.time-settings{border-top:1px solid #dce5dc;margin-top:36px;padding-top:22px}.time-settings>summary{font-size:1rem;font-weight:600;cursor:pointer}.time-settings form{max-width:620px;margin-top:20px}.time-settings .time-checkbox{display:flex;align-items:center;gap:10px}.time-checkbox input{width:auto;margin:0}.time-permission{padding:16px;border:1px solid #d8c58e;background:#fffae9;margin:16px 0;line-height:1.5}.time-permission code{overflow-wrap:anywhere;font-size:.8rem}.time-rules{list-style:none;margin:0;padding:0;max-width:750px}.time-rules>li{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid #e4e9e2}.time-rules p{overflow-wrap:anywhere}.time-settings h2{font-size:1.2rem;margin-top:30px}#time-label-dialog,#time-delete-dialog{max-width:min(560px,calc(100vw - 32px));box-sizing:border-box}#time-label-evidence{overflow-wrap:anywhere}#time-label-dialog input,#time-label-dialog select{width:100%}#time-label-dialog .dialog-actions{flex-wrap:wrap}#time-message:empty{display:none}
@media(max-width:1000px){.time-layout{grid-template-columns:minmax(0,1fr) 235px;gap:20px}.time-workspace{padding:24px}}
@media(max-width:760px){.time-workspace{padding:20px 16px}.time-layout{grid-template-columns:1fr}.time-summary{grid-row:1}.time-totals{grid-template-columns:repeat(2,1fr)}.time-toolbar .text-button{margin-left:0}.time-session{grid-template-columns:60px minmax(0,1fr);gap:10px}.time-heading{align-items:start}.time-heading h1{font-size:1.9rem}.time-heading>.primary{width:100%}.time-toolbar{gap:10px}.time-rules>li{align-items:start}.time-timeline-section{min-width:0}}
.transcript-author{margin:0 0 18px;color:var(--muted);font-size:16px}.recent-open .recent-author{margin-top:3px}.transcript-summary{max-width:850px;padding:22px 0}.summary-takeaways{padding-left:25px;font-family:var(--serif,Georgia,serif);font-size:19px;line-height:1.85}.summary-takeaways li{padding-left:6px;margin:0 0 20px;overflow-wrap:anywhere}.transcript-summary .download{margin-left:16px}.transcript-controls .reading-tabs{flex-wrap:wrap}

.summary-error{color:#a62626}.badge.summary-error-badge{color:#a62626;background:#fff1f1;border:1px solid #e6baba}

#model-troubleshooting>.model-test{margin-top:20px}#model-test-status{font-size:14px;overflow-wrap:anywhere}#kimi-maintenance:empty,#kimi-setup:empty{display:none}

/* To-do workspace */
.todo-workspace{max-width:1100px;padding:24px}.todo-workspace h1{margin:0 0 18px}.todo-add{display:grid;grid-template-columns:minmax(180px,2fr) minmax(150px,1fr) 170px auto;align-items:end;gap:12px}.todo-add label{min-width:0;font-size:14px}.todo-add input{height:44px}.todo-add .primary{height:44px;padding:8px 16px}.todo-categories-section{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.todo-categories-section h2{font-size:16px;margin:0 0 10px}.todo-category-filters{display:flex;flex-wrap:wrap;gap:6px}.todo-category-filters button{padding:5px 10px;overflow-wrap:anywhere;max-width:100%}.todo-category-filters [aria-pressed=true]{background:var(--accent);color:white;border-color:var(--accent)}.todo-toolbar{display:flex;align-items:center;gap:16px;margin-top:16px}.todo-toolbar label{flex-direction:row;align-items:center;gap:10px}.todo-toolbar select{width:auto;min-width:130px}.todo-list{list-style:none;padding:0;margin:12px 0 0}.todo-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.todo-check{display:flex;flex-direction:row;align-items:center;gap:10px;flex:1;min-width:0;margin:0;text-align:left}.todo-check input[type=checkbox]{width:18px;height:18px;padding:0;flex:0 0 18px;margin:0;accent-color:var(--accent)}.todo-check span{overflow-wrap:anywhere;font-size:16px;font-weight:400}.todo-completed .todo-check span{text-decoration:line-through;color:var(--muted)}.todo-category-badge{font-size:14px;background:#e7eee4;color:#355843;border-radius:5px;padding:3px 7px;max-width:150px;overflow-wrap:anywhere}.todo-date{font-size:14px;white-space:nowrap}.todo-overdue{color:#b42318}.todo-actions{display:flex;align-items:center;gap:12px;margin-left:auto;flex-shrink:0}.todo-actions button{font-size:14px}.todo-actions .text-button{margin:0;padding:7px 0}#todo-status,#todo-edit-error{color:#b42318}#todo-dialog{width:min(520px,90vw)}.todo-toast{position:fixed;top:20px;right:20px;z-index:1000;display:flex;align-items:center;gap:20px;max-width:calc(100vw - 40px);padding:12px 16px;background:#24533a;color:white;border-radius:8px;box-shadow:0 6px 24px #0002;font-size:14px}.todo-toast[hidden]{display:none}.todo-toast button{border:0;background:none;color:inherit;font-size:22px;padding:0 3px;cursor:pointer}
@media(max-width:1050px){.todo-add{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.todo-title-label{grid-column:1/-1}}
@media(max-width:760px){.todo-workspace{padding:18px}.todo-add{grid-template-columns:minmax(0,1fr) auto}.todo-add label:nth-child(2){grid-column:1/-1}.todo-toolbar{flex-wrap:wrap;gap:8px}.todo-row{flex-wrap:wrap;gap:10px}.todo-check{flex-basis:100%}.todo-category-badge{margin-left:28px}.todo-actions{margin-left:auto}.todo-toast{top:12px;right:12px}}

.todo-categories-heading{display:flex;align-items:center;gap:16px;margin-bottom:10px}.todo-categories-heading h2{margin:0}.todo-categories-heading button{margin:0;padding:0;font-size:14px}#todo-category-dialog{width:min(420px,90vw)}#todo-category-error{color:#b42318}
/* Porcelain: neutral surfaces with green reserved for actions and selection. */
.sidebar,.reorder-handle{background:var(--shelf);border-right-color:var(--line)}
.brand,.login-brand{color:var(--ink);font-weight:600;letter-spacing:-1px}
h1,h2,h3{font-weight:600}
.sidebar .tool-links{border-left-color:var(--line)}
.nav-parent:hover,.tool-links a:hover,.saved-book:hover,.recent-open:hover,.icon-button:hover,.reorder-handle:hover{background:#ebebee;color:var(--ink)}
.nav-parent.current,.shelf-heading h1,.shelf-title,.transcript-shelf h2,.youtube-add>h2{color:var(--ink)}
.tool-links a[aria-current=page],.nav-parent[aria-current=page],.saved-book.selected{background:var(--selected);color:var(--accent)}
.workspace-bar,.workspace,.youtube-entry{background:var(--white)}
.library-shelf,.transcript-shelf,.upload-panel,.graph-surface,.selection-controls,.time-summary,.review-message{background:var(--shelf)}
.primary:hover{background:#1d5d3d}
input:not([type=file]),textarea,select,.secondary,.concept-list button{border-color:#d2d2d7}
.secondary,.node-actions .secondary,.dialog-actions .secondary,.model-test .secondary{background:var(--white);color:var(--ink)}
.secondary:hover,.node-actions .secondary:hover,.dialog-actions .secondary:hover,.model-test .secondary:hover{background:var(--shelf)}
.concept-list button{background:var(--shelf);color:var(--ink)}
.concept-list button:hover{background:var(--selected)}
.concept-list button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:white}
.graph-node circle{fill:var(--accent)}
.graph-node circle[r="12"]{fill:#174a31}
.graph-node text{fill:var(--ink);stroke:var(--shelf)}
.graph-surface line{stroke:#d2d2d7}
.quota-card{background:var(--white)}
.quota-window progress,.time-breakdown-row progress{accent-color:var(--accent)}
.time-heading h1,.time-totals strong,.time-empty h2{font-family:var(--serif)}
.time-totals>div{border-left-color:var(--line)}
.time-totals span,.time-session-clock,.time-empty,.time-heading [role=status],.time-heading .eyebrow{color:var(--muted)}
.time-heading [data-recording=true]{color:var(--accent)}
.time-session-clock time,.time-empty h2{color:var(--ink)}
.time-label{background:var(--shelf);color:var(--muted)}
.time-toolbar,.time-section-heading,.time-session,.time-settings,.time-rules>li,.time-explanation{border-color:var(--line)}
.text-button{color:var(--accent)}
#graph-status,#youtube-status{color:var(--accent)}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline-color:var(--accent)}
select:focus-visible{outline-style:solid;outline-width:3px;outline-offset:4px}
/* Time reports: compact statistics above a true time-axis calendar. */
.time-workspace{max-width:none!important}.time-heading .eyebrow{display:none}.time-calendar-section{margin:24px 0;border-top:1px solid var(--line,var(--line));padding-top:20px}.time-calendar{max-height:650px;overflow:auto;border:1px solid var(--line);border-radius:10px;background:var(--white)}.time-grid{display:grid;grid-template-columns:72px repeat(var(--days),minmax(110px,1fr));min-width:calc(72px + var(--days)*110px)}.time-grid-head{position:sticky;top:0;z-index:3;background:var(--shelf);padding:12px 6px;border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:12px;color:var(--ink)}.time-hours{position:relative;background:var(--shelf)}.time-hours span{position:absolute;right:8px;font-size:11px;color:var(--muted)}.time-day-column{position:relative;border-left:1px solid var(--line);background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(60px*var(--scale) - 1px),var(--line) calc(60px*var(--scale) - 1px),var(--line) calc(60px*var(--scale)));cursor:crosshair}.time-block{position:absolute;left:3px;right:3px;width:calc(100% - 6px);padding:0 5px;border:0;border-radius:2px;min-height:0;background:var(--accent);color:white;overflow:hidden;font-size:11px;text-align:left;line-height:18px;cursor:pointer}.time-block[data-state=idle]{background:#a6b1a0;color:#233322}.time-block[data-state=excluded]{background:#ceb98a;color:#443617}.time-block:focus{z-index:2;outline:3px solid #db973c}.time-day-stats{display:flex;gap:6px;overflow:auto;margin-bottom:15px}.time-stat-day{min-width:72px;flex:1;padding:8px;border:1px solid var(--line);background:transparent;color:inherit}.time-stat-day span,.time-stat-day strong{display:block;font-size:11px}.time-stat-day progress{width:100%;height:5px}.time-month{display:grid;grid-template-columns:repeat(7,minmax(85px,1fr));min-width:600px;gap:1px;background:var(--line)}.time-month>strong{padding:10px;text-align:center;background:var(--shelf);font-size:12px}.time-month-day{min-height:110px;border:0;border-radius:0;background:var(--white);color:inherit;padding:12px;text-align:left}.time-month-day span,.time-month-day small{display:block;margin-top:8px;font-size:12px}.time-minute{margin-top:16px;padding:16px;background:var(--shelf);border-radius:8px}.time-minute-row{display:flex;gap:14px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line);padding:10px 0}.time-minute-row span{font-size:13px}.time-toolbar{flex-wrap:wrap}.time-calendar-section h2{margin:0}.time-layout{margin-top:24px}.time-timeline{max-height:460px;overflow:auto}
.time-cloud-note{font-size:13px;color:var(--muted);margin:8px 0 20px}.time-cloud-note a{color:inherit;text-decoration:underline}.time-heading h1{font-size:32px}

/* Daily learning schedule */
.schedule-page-heading{margin-bottom:24px}.schedule-page-heading h1{font-size:28px;margin-bottom:8px}.schedule-card{padding:28px;max-width:960px}.schedule-card-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.schedule-eyebrow{font-size:11px;letter-spacing:1.4px;font-weight:600;color:var(--muted);margin-bottom:10px}.schedule-card h2{font-size:26px}.schedule-description{max-width:65ch;margin-top:16px;color:var(--muted)}.schedule-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:24px 0;margin:24px 0;border-block:1px solid var(--line)}.schedule-facts dt{font-size:12px;color:var(--muted);margin-bottom:7px}.schedule-facts dd{margin:0;font-size:14px}.schedule-facts dd.hint{font-size:12px;margin-top:4px}.schedule-sources h3{font-size:17px;letter-spacing:0}.schedule-sources ul{list-style:none;padding:0;margin:8px 0 24px}.schedule-sources li{display:flex;justify-content:space-between;align-items:start;gap:24px;padding:16px 0;border-bottom:1px solid var(--line)}.schedule-sources strong{font-size:14px;font-weight:500}.schedule-sources p{font-size:13px;color:var(--muted);max-width:60ch;margin-top:4px}.schedule-source-label{font-size:12px;color:var(--muted);text-align:right;flex-shrink:0;max-width:160px}.schedule-details{padding:14px 0;border-bottom:1px solid var(--line);font-size:14px}.schedule-details summary{cursor:pointer;font-weight:500}.schedule-details p,.schedule-details ul{margin-top:12px;color:var(--muted)}.schedule-details code{overflow-wrap:anywhere;font-size:12px}.schedule-footer{font-size:12px;color:var(--muted);margin-top:24px;max-width:85ch}
@media(max-width:760px){.schedule-card{padding:20px}.schedule-card-heading{align-items:start}.schedule-card h2{font-size:23px}.schedule-facts{grid-template-columns:1fr;gap:18px}.schedule-sources li{flex-direction:column;gap:8px}.schedule-source-label{text-align:left;max-width:none}.schedule-page-heading h1{font-size:26px}}

/* Compact time tracker: show recorded hours first and retain full-day inspection. */
.time-workspace{padding:20px 24px!important}.time-heading{margin-bottom:8px}.time-heading h1{font-size:25px!important;margin-bottom:5px}.time-heading p{font-size:12px}.time-toolbar{padding:10px 0;margin:10px 0;gap:8px}.time-toolbar label{font-size:12px}.time-toolbar input,.time-toolbar select{padding:7px 9px}.time-toolbar button,.time-toolbar a{padding:8px 10px;font-size:12px}.time-totals{gap:14px;margin:14px 0}.time-totals strong{font-size:26px!important}.time-totals span{font-size:12px}.time-calendar-section{margin:14px 0;padding-top:12px}.time-calendar{max-height:430px}.time-section-heading{margin-bottom:8px}.time-section-heading h2{font-size:18px}.time-section-heading .hint{font-size:12px;margin:4px 0}.time-minute{padding:10px 14px}.time-month-day{min-height:76px;padding:8px}.time-cloud-note{margin:5px 0 10px}.time-session{padding:9px 0}.time-layout{gap:18px}.time-timeline{max-height:320px}

/* Keep task creation separate from the shared list filters. */
.todo-add{align-items:start}.todo-add>.primary{margin-top:28px}.todo-category-field{min-width:0}.todo-category-field>button{font-size:14px;margin:6px 0 0;padding:0}.todo-toolbar{border-top:1px solid var(--line);padding-top:16px;flex-wrap:wrap}.todo-toolbar label{min-width:0}.todo-toolbar select{max-width:240px}.todo-toolbar .meta{margin-left:auto}@media(max-width:760px){.todo-category-field{grid-column:1/-1}.todo-add label:nth-child(3){grid-column:1}.todo-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:12px}.todo-toolbar label{flex-direction:column;align-items:stretch;gap:6px}.todo-toolbar select{width:100%;min-width:0}.todo-toolbar .meta{grid-column:1/-1;margin-left:0}}

.todo-add{grid-template-columns:minmax(140px,2fr) minmax(120px,1fr) minmax(130px,.8fr) auto;align-items:end;gap:10px}.todo-add .todo-title-label,.todo-add .todo-category-field,.todo-add label:nth-child(3){grid-column:auto}.todo-add>.primary{margin-top:0}.todo-picker{position:relative;display:block;min-width:0}.todo-picker-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;height:44px;padding:10px 12px;border:1px solid #d2d2d7;border-radius:6px;background:var(--white);color:var(--ink);font:inherit;font-size:14px;text-align:left;white-space:nowrap;overflow:hidden}.todo-picker-trigger:after{content:'⌄';color:var(--muted);margin-left:auto}.todo-picker-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:100%;width:max-content;max-width:min(280px,80vw);max-height:260px;overflow:auto;z-index:30;background:var(--white);border:1px solid var(--line);box-shadow:0 6px 20px #0002;border-radius:8px;padding:5px}.todo-picker-menu[hidden]{display:none}.todo-picker-menu button{display:block;width:100%;border:0;border-radius:4px;background:transparent;color:var(--ink);padding:9px 12px;text-align:left;font:inherit;font-size:14px;overflow-wrap:anywhere}.todo-picker-menu button:hover,.todo-picker-menu button:focus{background:var(--selected);outline:none}.todo-picker-menu [aria-selected=true]{color:var(--accent);background:var(--selected)}.todo-picker-menu .todo-picker-create{border-top:1px solid var(--line);border-radius:0;margin-top:4px;color:var(--accent)}.todo-toolbar .todo-picker{min-width:145px}.todo-picker:has(select){display:block}@media(max-width:540px){.todo-add{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.todo-add .todo-title-label{grid-column:1/-1}.todo-add>.primary{grid-column:2}.todo-toolbar .todo-picker{min-width:0}}
.schedule-progress{white-space:nowrap;background:var(--shelf);color:var(--muted);border:1px solid var(--line);font-size:12px}.schedule-card-heading{flex-wrap:wrap}

/* Compact category dialog with a clear label/input boundary. */
#todo-category-dialog{width:min(380px,calc(100vw - 32px));padding:24px;border-radius:12px;background:var(--white);box-shadow:0 16px 48px #10182826}
#todo-category-dialog::backdrop{background:rgb(20 24 32 / 32%)}
#todo-category-form{gap:20px}
#todo-category-heading{font-size:22px;line-height:1.25;letter-spacing:-.3px;margin:0;font-weight:600}
#todo-category-form label{display:flex;flex-direction:column;gap:9px;font-size:14px;line-height:1.4}
#todo-category-name{height:44px;padding:10px 12px;border-radius:6px;font-size:16px}
#todo-category-name:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
#todo-category-error:empty{display:none}
#todo-category-error{font-size:14px;line-height:1.5}
#todo-category-form .dialog-actions{margin:0;gap:8px}
#todo-category-form .dialog-actions button{height:40px;padding:8px 14px;font-size:14px;line-height:1.4;border-radius:6px}

.todo-selection{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0;font-size:14px}.todo-selection .danger{margin-left:auto}.todo-row>.todo-select-check[type=checkbox]{width:18px;height:18px;flex:0 0 18px;padding:0;accent-color:var(--accent)}

.todo-task-content{display:flex;flex-direction:column;gap:3px}.todo-task-times{font-size:12px;font-weight:400;color:var(--muted);line-height:1.5}.todo-completed .todo-check .todo-task-content{text-decoration:none}.todo-completed .todo-task-content>span{text-decoration:line-through}

.todo-table-scroll{overflow-x:auto;margin-top:16px}.todo-table{width:100%;min-width:820px;border-collapse:collapse;table-layout:fixed}.todo-title-col{width:32%}.todo-table col:last-child{width:88px}.todo-table th{font-size:14px;color:var(--muted);font-weight:500;text-align:left;padding:10px 12px;border-bottom:1px solid var(--line)}.todo-table .todo-row{display:table-row;border-bottom:1px solid var(--line)}.todo-table td{padding:14px 12px;vertical-align:middle;overflow-wrap:anywhere;font-size:14px}.todo-table td:first-child,.todo-table th:first-child{padding-left:0}.todo-task-cell{display:flex;align-items:center;gap:10px}.todo-task-cell>.todo-select-check[type=checkbox]{width:18px;height:18px;flex:0 0 18px;padding:0}.todo-table .todo-check{flex-basis:auto}.todo-table .todo-check span{font-size:16px}.todo-table .todo-category-badge{display:inline-block;margin:0;max-width:100%}.todo-time-cell{font-variant-numeric:tabular-nums;color:var(--muted);line-height:1.5}.todo-table .empty{padding:20px 0}

/* Owner-selected Time tracker palette; text stays neutral on pale category fills. */
.time-category-legend{display:flex;flex-wrap:wrap;gap:12px 24px;margin-top:18px;font-size:14px}.time-category-legend>span{display:inline-flex;align-items:center;gap:7px}.time-category-legend i{width:10px;height:10px;border-radius:3px;background:var(--time-color)}.time-category-legend strong{font-weight:500;color:var(--muted)}
.time-block[data-state=active]{background:color-mix(in srgb,var(--time-color) 20%,var(--white));border-left:3px solid var(--time-color);color:var(--ink)}
.time-block[data-state=idle],.time-block[data-state=excluded],.time-block[data-state=unknown]{background:#e4e5e9;color:#565b65;border-left:3px solid #9699a2}
.time-label{background:color-mix(in srgb,var(--time-color,#9699a2) 13%,var(--white));border-left:3px solid var(--time-color,#9699a2);color:var(--ink)}
.time-breakdown-row progress{accent-color:var(--time-color,#9699a2)}.time-breakdown-row progress::-webkit-progress-value{background:var(--time-color,#9699a2)}.time-breakdown-row progress::-moz-progress-bar{background:var(--time-color,#9699a2)}
#time-category-preview{padding:8px 12px;width:fit-content;font-size:14px}

/* Chat shares Buddy's Porcelain surfaces and existing button controls. */
.chat-workspace{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:calc(100dvh - 130px);padding:0;overflow:hidden}
.chat-history{padding:20px 14px;border-right:1px solid var(--line,#e2e5e9);min-width:0}.chat-history>.primary{width:100%;margin-bottom:18px}.chat-thread{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;text-align:left;background:transparent;border:0;border-radius:10px;padding:12px;margin-bottom:4px}.chat-thread strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-weight:500}.chat-thread:hover,.chat-thread.selected{background:#eef2f4}.chat-main{min-width:0;display:flex;flex-direction:column}.chat-toolbar{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line,#e2e5e9)}.chat-toolbar h1{font-size:18px;margin:0;overflow-wrap:anywhere}.chat-actions{display:flex;gap:8px;flex-shrink:0}.chat-messages{flex:1;max-height:65dvh;min-height:240px;overflow-y:auto;padding:24px;scroll-behavior:smooth}.chat-empty{padding:55px 16px;text-align:center;color:var(--muted,#626b75)}.chat-empty h2{font-size:24px;color:var(--text,#20262d)}.chat-message{max-width:820px;margin:0 auto 28px}.chat-user{background:#f2f4f6;padding:16px 20px;border-radius:16px}.chat-message-label{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;margin-bottom:10px}.chat-message-label strong{font-size:14px}.chat-message-label time{margin-left:auto}.chat-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:1.65}.chat-composer{padding:16px 24px 20px;border-top:1px solid var(--line,#e2e5e9)}.chat-model-row{display:flex;align-items:end;gap:16px;justify-content:space-between;margin-bottom:12px}.chat-model-row label{max-width:75%;min-width:0}.chat-model-row select{max-width:100%}.chat-model-row a{font-size:14px}.chat-composer textarea{width:100%;resize:vertical;min-height:88px;font-size:16px}.chat-send-row{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:10px}.chat-send-row .hint{margin-right:auto}#chat-status{font-size:14px;overflow-wrap:anywhere}.chat-composer>.hint{margin-bottom:0}.chat-workspace[hidden]{display:none}
@media(max-width:1000px){.chat-workspace{grid-template-columns:180px minmax(0,1fr)}.chat-toolbar{align-items:flex-start;flex-direction:column}.chat-toolbar,.chat-messages,.chat-composer{padding:16px}}
@media(max-width:600px){.chat-workspace{display:flex;flex-direction:column}.chat-history{border-right:0;border-bottom:1px solid #e2e5e9;padding:12px}.chat-history>.primary{width:auto;margin-bottom:8px}#chat-threads{display:flex;overflow-x:auto;gap:6px}.chat-thread{min-width:150px;max-width:190px}.chat-messages{max-height:none}.chat-send-row{flex-wrap:wrap}.chat-send-row .hint{width:100%}.chat-model-row{align-items:start;flex-direction:column;gap:8px}.chat-model-row label{max-width:100%;width:100%}.chat-actions{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.chat-messages{scroll-behavior:auto}}
.chat-attachments{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}.chat-attachments:empty{display:none}
.chat-attachment{position:relative;width:72px;height:72px}.chat-attachment img{width:72px;height:72px;object-fit:cover;border-radius:10px;border:1px solid var(--line,#e2e5e9)}
.chat-attachment button{position:absolute;top:-7px;right:-7px;width:22px;height:22px;border-radius:50%;border:1px solid var(--line,#e2e5e9);background:var(--paper,#fff);color:var(--ink,#1d1d1f);font-size:14px;line-height:1;padding:0;cursor:pointer}
.chat-images{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}.chat-images img{max-width:260px;max-height:260px;border-radius:12px;border:1px solid var(--line,#e2e5e9);display:block}
@media(min-width:601px){.chat-workspace{height:calc(100dvh - 130px);min-height:580px}.chat-main{min-height:0}.chat-messages{min-height:100px;max-height:none}.chat-toolbar h1{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.chat-history{overflow-y:auto}.chat-composer{flex-shrink:0}}

/* Edit-task dialog: even padding, and a focus ring that stays inside it. */
#todo-dialog{width:min(440px,calc(100vw - 32px));padding:24px;border-radius:12px;background:var(--white);box-shadow:0 16px 48px #10182826}
#todo-dialog::backdrop{background:rgb(20 24 32 / 32%)}
#todo-edit{gap:18px}
#todo-edit-heading{font-size:22px;line-height:1.25;letter-spacing:-.3px;margin:0;font-weight:600}
#todo-edit label{display:flex;flex-direction:column;gap:9px;font-size:14px;line-height:1.4}
#todo-edit input,#todo-edit .todo-picker-trigger{height:44px;padding:10px 12px;border-radius:6px;font-size:16px;box-sizing:border-box}
#todo-edit-error:empty{display:none}
#todo-edit-error{font-size:14px;line-height:1.5}
#todo-edit .dialog-actions{margin:0;gap:8px}
#todo-edit .dialog-actions button{height:40px;padding:8px 14px;font-size:14px;line-height:1.4;border-radius:6px}
dialog input:focus-visible,dialog textarea:focus-visible,dialog select:focus-visible,dialog .todo-picker-trigger:focus-visible{outline-width:2px;outline-offset:2px}

/* Category badges carry their own colour, set per category in todo-client.js. */
.todo-category-badge{font-weight:500}
/* Keep the row action on one line; it wrapped to "Ed it" in the old column width. */
.todo-table td:last-child button{white-space:nowrap}

/* Library: browse the whole shelf, then open one book to read. */
.book-workspace>.upload-panel{margin:24px 28px 0}
.book-workspace>#book-status{margin:16px 28px}
.book-browse{padding:26px 28px 34px;container-type:inline-size}
.browse-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:18px}
.browse-heading h1{font-size:28px}
.browse-toolbar{display:grid;grid-template-columns:minmax(190px,1fr) minmax(140px,170px) minmax(190px,220px);align-items:end;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.browse-toolbar label{min-width:0;font-size:13px;font-weight:500;color:var(--muted);gap:8px}
.browse-toolbar input,.browse-toolbar select{box-sizing:border-box;width:100%;height:44px;min-height:44px;margin:0;font:inherit;font-size:14px;line-height:normal;padding:10px 12px;border:1px solid #d2d2d7;border-radius:6px;background:var(--white);color:var(--ink);-webkit-appearance:none;appearance:none}
.browse-toolbar select{padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px}
.browse-search{min-width:0}
.browse-search input{width:100%}
.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(156px,1fr));gap:28px 24px;padding-top:24px}
.book-grid .empty{grid-column:1/-1;padding:26px 0}
.book-card{display:flex;flex-direction:column;min-width:0;gap:12px;padding:0;border:0;border-radius:8px;background:none;color:var(--ink);text-align:left}
.book-card:hover .book-cover{transform:translateY(-3px);box-shadow:0 10px 22px #1d1d1f1f}
.book-cover{display:flex;flex-direction:column;justify-content:space-between;gap:5px;aspect-ratio:3/4;padding:16px 14px;border:1px solid var(--line);border-left:3px solid var(--spine);border-radius:2px 4px 4px 2px;background:var(--cover);box-shadow:0 2px 8px #1d1d1f14;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}
.book-cover[data-tone="0"]{--cover:#e5eee8;--spine:#2b6b4a}
.book-cover[data-tone="1"]{--cover:#eceef1;--spine:#5a6b7b}
.book-cover[data-tone="2"]{--cover:#f0ece6;--spine:#8a7350}
.book-cover[data-tone="3"]{--cover:#e9eeec;--spine:#3f7268}
.book-cover[data-tone="4"]{--cover:#eeeced;--spine:#6e6473}
.book-cover[data-tone="5"]{--cover:#edeeea;--spine:#6d7a56}
.book-cover-title{font-family:var(--serif);font-size:16px;font-weight:600;line-height:1.3;letter-spacing:-.1px;overflow-wrap:break-word;hyphens:auto;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.book-cover-format{font-size:11px;font-weight:500;letter-spacing:.06em;color:var(--muted)}
.book-card-body{display:grid;grid-template-rows:40px 36px 54px 4px auto;gap:8px;min-width:0;font-size:14px}
.book-card strong{font-size:14px;font-weight:500;line-height:20px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.book-card-meta,.book-card-state,.book-card-note{font-size:12px;line-height:1.45;color:var(--muted)}
.book-card-note{overflow-wrap:anywhere}
.book-card-meta{display:flex;flex-direction:column;gap:2px}
.book-meta-label{color:var(--muted)}
.book-card-meta time{display:flex;flex-direction:column;gap:2px}
.book-date,.book-clock{white-space:nowrap;font-variant-numeric:tabular-nums}
.book-meta-value{line-height:1.4}
.book-card.selected .book-cover{outline:2px solid var(--accent);outline-offset:2px}
.book-progress{display:block;height:4px;border-radius:2px;background:var(--line);overflow:hidden}
.book-progress>span{display:block;height:100%;border-radius:2px;background:var(--accent)}
.book-progress[data-state=unread]>span{background:transparent}
.reading-area>.back-link{display:inline-block;margin:0 0 10px;padding:4px 0;color:var(--muted);text-decoration:none}
.reading-area>.back-link:hover{color:var(--accent);text-decoration:underline}
@media(max-width:660px){.book-workspace>.upload-panel{margin:18px 16px 0}.book-workspace>#book-status{margin:14px 16px}.book-browse{padding:20px 16px 26px}.browse-heading h1{font-size:25px}.browse-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.browse-search{grid-column:1/-1}.book-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:24px 18px}.book-cover{padding:14px 12px}.book-cover-title{font-size:15px}}
@container(max-width:580px){.browse-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.browse-search{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.book-cover{transition:none}.book-card:hover .book-cover{transform:none}}

/* Reading view: the imported text reflowed into pages, with the reader's own
   type size, spacing, measure and background. */
.reader{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:var(--reader-bg);color:var(--reader-ink);--reader-pad:clamp(18px,5vw,44px)}
.reader[open]{display:flex;flex-direction:column}
.reader.reader-expanded{width:100vw;height:100dvh;margin:0;border:0;border-radius:0}
.reader::backdrop{background:#000}
.reader[data-theme=paper]{--reader-bg:#fdfdfb;--reader-ink:#1d1d1f;--reader-soft:#6e6e73;--reader-line:#e4e4e7;--reader-chrome:#f5f5f7}
.reader[data-theme=sepia]{--reader-bg:#f6efe1;--reader-ink:#463a29;--reader-soft:#8a7a60;--reader-line:#e3d8c3;--reader-chrome:#efe6d4}
.reader[data-theme=sage]{--reader-bg:#e8f2e6;--reader-ink:#25382b;--reader-soft:#536b58;--reader-line:#cbdcc9;--reader-chrome:#deebdb}
.reader[data-theme=gray]{--reader-bg:#e6e7e8;--reader-ink:#26282b;--reader-soft:#6b6e73;--reader-line:#d2d4d7;--reader-chrome:#dcdee0}
.reader[data-theme=night]{--reader-bg:#15171a;--reader-ink:#c6cad0;--reader-soft:#868c95;--reader-line:#272b31;--reader-chrome:#1d2024}
.reader[data-family=serif] .reader-column{font-family:Georgia,"Songti SC","Noto Serif CJK SC","Source Han Serif SC",serif}
.reader[data-family=sans] .reader-column{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Noto Sans CJK SC",sans-serif}
.reader-bar{position:relative;display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--reader-line);background:var(--reader-chrome);flex:none}
.reader-title{flex:1 1 0;margin:0;min-width:64px;font-size:14px;font-weight:500;line-height:1.4;text-align:left;color:var(--reader-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:inherit;letter-spacing:0}
.reader-bar-tools{flex:0 1 auto;display:flex;align-items:center;justify-content:flex-start;margin-left:auto;flex-wrap:nowrap;gap:8px;min-width:0;max-width:calc(100% - 132px);overflow-x:auto;padding:4px;scrollbar-width:thin}
.reader-button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;font-family:inherit;text-decoration:none;flex-shrink:0;border:1px solid var(--reader-line);border-radius:6px;background:var(--reader-bg);color:var(--reader-ink);font-size:13px;line-height:1.4;padding:7px 11px;white-space:nowrap}
.reader-button:hover{border-color:var(--reader-soft)}
.reader-button[aria-pressed=true],.reader-button[aria-expanded=true]{background:var(--reader-ink);border-color:var(--reader-ink);color:var(--reader-bg)}
.reader-settings{display:flex;flex-wrap:wrap;gap:14px 28px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--reader-line);background:var(--reader-chrome);flex:none}
.reader-field{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:500;color:var(--reader-soft);flex-direction:row}
.reader-field input[type=range]{width:120px;accent-color:var(--reader-ink)}
.reader-controls{display:flex;align-items:center;gap:8px}
.reader-value{font-size:13px;color:var(--reader-soft);min-width:44px;text-align:center}
.reader-swatch{appearance:none;-webkit-appearance:none;box-sizing:border-box;flex:0 0 44px;width:44px;height:44px;min-width:44px;max-width:44px;min-height:44px;max-height:44px;aspect-ratio:1;border-radius:50%;border:1px solid var(--reader-line);padding:0}
.reader-swatch[data-theme-choice=paper]{background:#fdfdfb}
.reader-swatch[data-theme-choice=sepia]{background:#f6efe1}
.reader-swatch[data-theme-choice=sage]{background:#e8f2e6}
.reader-swatch[data-theme-choice=gray]{background:#e6e7e8}
.reader-swatch[data-theme-choice=night]{background:#15171a}
.reader-swatch[aria-pressed=true]{outline:2px solid var(--reader-ink);outline-offset:2px}
.reader-body{touch-action:pan-y pinch-zoom;position:relative;flex:1;min-height:0;display:flex;justify-content:center}
.reader-page-frame{position:relative;flex:none;width:min(100%,calc(var(--reader-width) + var(--reader-pad) * 2));padding:clamp(16px,3.5vh,34px) var(--reader-pad);overflow:hidden;font-size:var(--reader-size)}
.reader-scroll{position:relative;width:100%;height:100%;padding:0;overflow:hidden;font-size:var(--reader-size)}
.reader-scroll:focus{outline:none}
.reader-column{height:100%;column-gap:var(--reader-pad);column-fill:auto;font-size:var(--reader-size);line-height:var(--reader-spacing);text-align:justify;hyphens:auto}
.reader-column p{margin:0 0 .85em;text-indent:0;overflow-wrap:break-word}
.reader-column .reader-list-item{margin-bottom:.4em;text-align:left;break-inside:avoid-column}
.reader-column .reader-list-item[data-level="2"]{padding-left:1.5em}
.reader-column .reader-list-item[data-level="3"]{padding-left:3em}
.reader-column h2,.reader-column h3{margin:1.55em 0 .72em;color:var(--reader-ink);font-family:inherit;font-weight:600;line-height:1.28;letter-spacing:-.015em;text-align:left;hyphens:none;overflow-wrap:break-word;break-after:avoid-column}
.reader-column h2{font-size:1.4em}.reader-column h3{font-size:1.22em;margin-top:1.35em}
.reader-column .reader-illustration{margin:0 0 .85em;break-inside:avoid-column;text-align:center} .reader-illustration img{display:block;max-width:100%;max-height:var(--reader-image-height,60vh);width:auto;height:auto;object-fit:contain;margin-inline:auto}
.reader-inline-image{display:inline-block;vertical-align:middle} .reader-inline-image img{max-width:100%;max-height:2em;width:auto;height:auto;vertical-align:middle} .reader-image-source{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.reader-column>:first-child{margin-top:0}
.reader-contents{position:absolute;z-index:4;inset:0 auto 0 0;width:min(360px,88vw);padding:18px 14px 24px;border-right:1px solid var(--reader-line);background:var(--reader-bg);color:var(--reader-ink);box-shadow:18px 0 44px #0002;overflow:auto}
.reader-contents-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:0 4px 13px;border-bottom:1px solid var(--reader-line)}
.reader-contents-head h3{margin:0;font-size:20px}.reader-contents-head p{margin:3px 0 0;color:var(--reader-soft);font-size:12px}
.reader-contents-close{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:var(--reader-chrome);color:var(--reader-ink);font:inherit;font-size:24px;line-height:1}
.reader-contents ol{display:grid;gap:2px;margin:12px 0 0;padding:0;list-style:none}.reader-contents button[data-reader-heading]{width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--reader-ink);font:inherit;font-size:14px;line-height:1.35;text-align:left}
.reader-contents button[data-reader-heading][data-level="2"]{padding-left:24px;color:var(--reader-soft);font-size:13px}.reader-contents button[data-reader-heading][aria-current=location]{background:var(--reader-chrome);color:var(--reader-ink);font-weight:600}
.reader-contents button[data-reader-heading]:hover,.reader-contents button[data-reader-heading]:focus-visible,.reader-contents-close:focus-visible{outline:2px solid var(--reader-ink);outline-offset:1px}
.reader-contents-empty{margin:18px 10px;color:var(--reader-soft);font-size:14px;line-height:1.5}
.reader-edge{flex:1;min-width:0;border:0;background:none;padding:0;cursor:pointer}
.reader-edge:disabled{cursor:default}
.reader-note{position:absolute;inset:auto 0 auto 0;top:50%;transform:translateY(-50%);margin:0;padding:0 24px;text-align:center;font-size:15px;line-height:1.7;color:var(--reader-soft)}
.reader-foot{display:flex;align-items:center;gap:16px;padding:10px 16px;border-top:1px solid var(--reader-line);background:var(--reader-chrome);flex:none}
.reader-slider{flex:1;min-width:0;accent-color:var(--reader-ink)}
.reader-progress{font-size:12px;color:var(--reader-soft);white-space:nowrap;min-width:30ch;text-align:right;font-variant-numeric:tabular-nums}
.reader-button:focus-visible,.reader-swatch:focus-visible,.reader-slider:focus-visible,.reader-field input:focus-visible{outline:3px solid var(--reader-ink);outline-offset:3px}
.read-book{display:inline-flex;align-items:center;gap:8px;margin:16px 0 0}
@media(max-width:660px){.reader-bar{gap:8px;padding:8px 12px}.reader-title{font-size:13px}.reader-button{padding:8px 10px;font-size:12px}.reader-settings{gap:12px 18px;padding:12px}.reader-field input[type=range]{width:96px}.reader-edge{flex:none;width:11%}.reader-foot{padding:8px 12px;gap:10px}.reader-progress{font-size:11px;min-width:0}}
/* Life uses the same Porcelain surfaces and spacing rhythm as the rest of Buddy. */
#main-content:has(#life-panel:not([hidden])){max-width:none;padding:20px 20px 48px}
.recordings-workspace{display:grid;grid-template-columns:minmax(240px,310px) minmax(0,1fr);min-height:calc(100dvh - 210px);padding:0;background:var(--shelf)}
/* Each day section is one bounded card on the neutral canvas: same corner
   radius, hairline and padding everywhere, so the eye reads section edges
   instead of hunting for them. The day stack itself owns the spacing. */
#day-content{display:grid;gap:14px}
#day-content>*{min-width:0}
.life-card{margin:0;padding:18px 20px;border:1px solid var(--line);border-radius:14px;background:var(--white);box-shadow:0 1px 2px #23382008}
.life-card .life-section-heading{margin-top:0}
.recordings-shelf{min-width:0;padding:16px 12px;border-right:1px solid var(--line);background:var(--shelf)}
.recordings-shelf .saved-book{padding:14px 10px}
.recordings-shelf-heading,.recording-heading,.recording-section-heading,.recording-player-heading,.recording-search-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.recordings-shelf-heading h1,.recording-heading h2,.day-heading h1{margin:2px 0 0}.recordings-shelf .eyebrow,.recording-reader .eyebrow{margin:0;color:var(--accent);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
/* Shelf heading holds a hover/focus-expanding search control instead of a
   permanent search row: collapsed, it is just the icon button (36px, right-
   aligned where Refresh used to sit); expanded, it spans the whole heading
   row (position:relative anchor below) and may sit over the eyebrow text.
   :has(#recordings-query:not(:placeholder-shown)) keeps it open while there
   is text, with no extra JS state to track. */
.recordings-shelf-heading{position:relative;min-height:36px}
.recordings-search{position:absolute;top:0;right:0;z-index:2;display:flex;align-items:center;width:36px;height:36px;transition:width 220ms ease}
.recordings-search-toggle{order:2;flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:0;border-radius:999px;background:transparent;color:var(--accent)}
.recordings-search-toggle:hover{background:var(--selected)}
.recordings-search-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.recordings-search input{order:1;width:0;min-width:0;padding:0;border:1px solid transparent;border-radius:999px;background:var(--white);color:var(--ink);font-size:14px;opacity:0;box-shadow:none;transition:width 220ms ease,opacity 150ms ease,padding 220ms ease,border-color 150ms ease,box-shadow 150ms ease}
.recordings-search:hover,.recordings-search:focus-within,.recordings-search:has(#recordings-query:not(:placeholder-shown)){width:100%}
.recordings-search:hover input,.recordings-search:focus-within input,.recordings-search:has(#recordings-query:not(:placeholder-shown)) input{width:calc(100% - 44px);margin-right:8px;opacity:1;padding:7px 14px;border-color:var(--line);box-shadow:0 4px 16px #23382014}
.recordings-search input#recordings-query:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px #285d4024,0 4px 16px #23382014}
.recordings-shelf-heading .eyebrow{transition:opacity 150ms ease}.recordings-shelf-heading:has(.recordings-search:hover,.recordings-search:focus-within,#recordings-query:not(:placeholder-shown)) .eyebrow{opacity:0}
@media(prefers-reduced-motion:reduce){.recordings-search,.recordings-search input,.recordings-shelf-heading .eyebrow,.recording-reader #day-content{transition:none}.recording-reader.is-loading::before{width:100%!important;transform:none!important;animation:none!important}}
.recording-results{max-height:310px;overflow:auto;margin:14px -6px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--white)}
.recording-search-heading{align-items:center;padding:4px 6px 8px}.recording-search-result{display:grid;grid-template-columns:62px minmax(0,1fr);gap:10px;width:100%;padding:11px 8px;border:0;border-top:1px solid var(--line);background:transparent;text-align:left}.recording-search-result:hover,.recording-search-result:focus-visible{background:var(--selected)}.recording-search-result time{display:flex;flex-direction:column;gap:2px;font-variant-numeric:tabular-nums;color:var(--accent);font-size:11px}.recording-search-result span{display:grid;gap:4px;line-height:1.4;font-size:13px}.recording-search-result strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recording-row{border-left:3px solid transparent!important}.recording-row.selected{border-left-color:var(--accent)!important}.recording-reader{position:relative;min-width:0;padding:10px clamp(16px,2.4vw,32px) 56px;overflow:auto}.recording-reader::before{content:"";position:absolute;z-index:3;top:0;left:0;width:34%;height:2px;border-radius:999px;background:var(--accent);opacity:0;transform:translateX(-105%);pointer-events:none}.recording-reader.is-loading::before{opacity:.7;animation:life-day-loading 1.15s cubic-bezier(.4,0,.2,1) infinite}.recording-reader #day-content{transition:opacity 160ms ease}.recording-reader.is-loading #day-content{opacity:.76}.recording-empty{max-width:520px;margin:15vh auto;text-align:center;color:var(--muted)}.recording-empty h2{color:var(--ink);font-size:30px}.recording-orbit{width:76px;height:76px;margin:0 auto 24px;border:1px solid #285d4060;border-radius:50%;display:grid;place-items:center;box-shadow:0 0 0 12px #285d400a,0 0 0 24px #285d4006}.recording-orbit span{width:12px;height:34px;border-radius:9px;background:var(--accent);box-shadow:20px 5px 0 -2px #8fad9b,-20px 5px 0 -2px #8fad9b}
@keyframes life-day-loading{0%{transform:translateX(-105%)}100%{transform:translateX(305%)}}
.recording-heading{padding-bottom:8px;border-bottom:1px solid var(--line);margin-top:0}.recording-heading h2{font-family:Georgia,serif;font-size:clamp(19px,2.6vw,26px);line-height:1.1}.recording-player,.recording-transcript{margin:0;border:0;border-top:1px solid var(--line);border-radius:0}.recording-player{display:flex;align-items:center;gap:12px;padding:11px 14px;background:var(--shelf)}.recording-transcript{padding:14px 16px 10px;background:var(--white)}.recording-section-heading h3{margin:0 0 8px;font-size:16px}.recording-player audio{display:none}.recording-play-toggle{display:grid;flex:none;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:999px;background:var(--white);color:var(--accent);font:inherit;font-size:13px;cursor:pointer}.recording-play-toggle:hover,.recording-play-toggle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.recording-player-time{flex:none;min-width:76px;color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums}.recording-progress{flex:1;min-width:80px}
input.player-progress{--player-progress:0%;-webkit-appearance:none;appearance:none;height:20px;margin:0;padding:0;border:0;border-radius:0;background:linear-gradient(to right,var(--accent) 0 var(--player-progress),var(--line) var(--player-progress) 100%) center/calc(100% - 16px) 4px no-repeat;box-shadow:none;cursor:pointer}input.player-progress::-webkit-slider-runnable-track{height:4px;background:transparent}input.player-progress::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;margin-top:-6px;border:0;border-radius:50%;background:var(--accent);box-shadow:0 0 0 1px #fff}input.player-progress::-moz-range-track,input.player-progress::-moz-range-progress{height:4px;background:transparent}input.player-progress::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:var(--accent);box-shadow:0 0 0 1px #fff}input.player-progress:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.recording-transcript-line{display:grid;grid-template-columns:minmax(58px,max-content) minmax(0,1fr);align-items:start;gap:12px;width:100%;padding:10px 12px;border-bottom:1px solid var(--line);border-radius:8px;background:transparent}.recording-transcript-line:hover,.recording-transcript-line:focus-within{background:var(--selected)}.recording-transcript-content{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;width:100%;padding:4px 0;border:0;background:transparent;text-align:left;font:inherit;line-height:1.5;cursor:pointer}.recording-transcript-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}.recording-transcript-line time{display:block;white-space:nowrap;color:var(--accent);font-variant-numeric:tabular-nums;font-size:13px}.recording-action-status{min-height:24px}.recordings-workspace [data-state=error]{color:#9a351f}
#recording-delete-dialog{width:min(470px,calc(100vw - 32px));padding:26px;border-radius:14px}#recording-delete-dialog::backdrop{background:#15201970}#recording-delete-form{display:grid;gap:17px}#recording-delete-form h2,#recording-delete-form p{margin:0}#recording-delete-error{color:#9a351f}#recording-delete-error:empty{display:none}
/* Life day list (left column: days instead of individual recordings). */
.recordings-month-heading{margin:18px 0 4px;padding:0 12px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.recordings-month-heading:first-child{margin-top:0}
/* Life day page (right column): header, stat tiles, diary, 24h timeline, recordings list. */
.day-heading{padding-bottom:2px}.day-heading h1{font-family:Georgia,serif;font-size:clamp(22px,3vw,30px);line-height:1.1}
.day-heading{display:flex;justify-content:space-between;gap:16px;align-items:end}.life-date-controls{display:flex;align-items:center;gap:5px}.life-date-controls button{min-height:34px;padding:4px 10px;border:1px solid var(--line);border-radius:7px;background:var(--white);color:var(--ink);font:inherit;cursor:pointer}.life-date-controls input{min-height:34px;border:1px solid var(--line);border-radius:7px;background:var(--white);color:var(--ink);font:inherit;padding:3px 6px}.life-date-controls button:hover,.life-date-controls button:focus-visible{border-color:var(--accent);background:var(--selected)}
.life-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:16px}.life-section-heading .eyebrow{margin:0}.life-section-heading [role=status]{font-size:12px;color:var(--muted)}.life-photo-strip{display:flex;gap:8px;overflow-x:auto;padding:8px 1px;min-height:48px}.life-photo-strip:empty{min-height:0;padding:0}.life-photo{flex:none;width:104px;height:78px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--shelf);overflow:hidden;cursor:pointer}.life-photo img{display:block;width:100%;height:100%;object-fit:cover}.life-photo-fallback{display:grid;height:100%;place-items:center;padding:6px;color:var(--muted);font-size:11px;text-align:center}.life-photo:hover,.life-photo:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.life-battery-history{margin:18px 0 0;padding-top:18px;border-top:1px solid var(--line)}.life-battery-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.life-battery-heading .eyebrow{margin:0 0 3px}.life-battery-heading h3{margin:0;font-size:16px}.life-battery-heading [role=status]{color:var(--muted);font-size:12px}.life-battery-latest{display:flex;flex-wrap:wrap;gap:10px 24px;margin:12px 0 8px}.life-battery-reading{display:grid;grid-template-columns:10px auto auto;align-items:baseline;gap:3px 7px;color:var(--muted);font-size:12px}.life-battery-reading .life-battery-key{grid-row:1/3;align-self:center;width:10px;height:10px;border-radius:50%;background:var(--accent)}.life-battery-reading.phone .life-battery-key{border:2px solid #415c71;background:transparent;box-sizing:border-box}.life-battery-reading strong{color:var(--ink);font-size:15px;font-variant-numeric:tabular-nums}.life-battery-reading time{grid-column:2/4;color:var(--muted);font-size:10px;font-variant-numeric:tabular-nums}.life-battery-chart{min-height:210px}.life-battery-chart>.empty{display:grid;min-height:190px;margin:0;place-items:center;color:var(--muted)}.life-battery-chart svg{display:block;width:100%;height:auto;min-height:210px;overflow:visible}.battery-grid line{stroke:var(--line);stroke-width:1}.battery-grid text,.battery-time-tick{fill:var(--muted);font:11px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.battery-series polyline{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.battery-series circle{stroke-width:2.5;cursor:help}.battery-series.glasses polyline{stroke:var(--accent)}.battery-series.glasses circle{fill:var(--white);stroke:var(--accent)}.battery-series.phone polyline{stroke:#415c71;stroke-dasharray:10 7}.battery-series.phone circle{fill:var(--white);stroke:#415c71}.life-battery-help{margin:5px 0 0;color:var(--muted);font-size:11px}.life-date-controls button,.life-date-controls input{min-height:44px}.life-date-controls button{min-width:44px}#life-photo-dialog{width:min(720px,calc(100vw - 28px));max-height:calc(100vh - 28px);padding:20px;border:0;border-radius:14px;background:var(--paper);color:var(--ink)}#life-photo-dialog::backdrop{background:#15201970}.life-photo-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.life-photo-dialog-head h2{margin:0;font-size:18px}#life-photo-dialog-body{display:grid;gap:12px;margin-top:14px}#life-photo-dialog-body img{max-width:100%;max-height:60vh;margin:auto;border-radius:8px;background:var(--shelf)}#life-photo-dialog-body dl{display:grid;grid-template-columns:max-content 1fr;gap:5px 12px;margin:0;font-size:13px}#life-photo-dialog-body dt{color:var(--muted)}#life-photo-dialog-body dd{margin:0;overflow-wrap:anywhere}
.life-route-section .life-route-map{margin-top:12px}.life-route-map{position:relative;overflow:hidden;aspect-ratio:20/9;min-height:240px;border-radius:12px;background:#dfe8df}.life-route-map>.empty{display:grid;place-items:center;height:100%;margin:0}.life-map-tiles{position:absolute;inset:0}.life-map-tiles img{position:absolute;width:256px;height:256px;max-width:none;user-select:none}.life-route-map svg{position:absolute;inset:0;width:100%;height:100%}.route-lines polyline{fill:none;stroke:#175f42;stroke-width:7;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke;filter:drop-shadow(0 1px 1px #fff)}.route-lines .route-gap{stroke:#175f42;stroke-width:4;stroke-dasharray:12 12;opacity:.62}.route-start{fill:#fff;stroke:#175f42;stroke-width:5}#life-route-marker{fill:#e34b3f;stroke:#fff;stroke-width:5;filter:drop-shadow(0 2px 3px #15201980)}.life-map-attribution{position:absolute;right:4px;bottom:3px;padding:2px 4px;border-radius:3px;background:#ffffffd9;color:#42534a;font-size:10px}.life-route-controls{display:grid;grid-template-columns:44px max-content minmax(120px,1fr) 70px;align-items:center;gap:10px;margin-top:10px}.life-route-controls button{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:50%;background:var(--white);color:var(--accent)}.life-route-controls button:disabled{color:var(--muted);background:var(--surface);cursor:not-allowed}.life-route-controls input{width:100%;accent-color:var(--accent)}.life-route-controls input:disabled{opacity:.45}.life-route-controls output{font-variant-numeric:tabular-nums;text-align:right}.life-route-summary{margin:8px 0 0;color:var(--muted);font-size:12px}
/* Compact single-row stat strip: six equal tiles on desktop, two columns on
   mobile (see the 480px block below). Each tile's own content stays short
   (two lines max) even with the Mac-time category dots. */
/* One inline strip instead of six tiles: a single ~56-64px row on desktop
   (see the min-height below), wrapping to 2-3 rows on mobile via flex-wrap
   rather than a grid whose narrow columns forced labels onto 2-3 lines each. */
.day-stats{display:flex;flex-wrap:wrap;align-items:center;row-gap:6px;column-gap:10px;padding:12px 14px;min-height:56px;overflow-wrap:anywhere}
.day-stat-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:13px}
.day-stat-label{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.03em}
.day-stat-item strong{font-variant-numeric:tabular-nums;font-weight:600}
.day-stat-sep{color:var(--line)}
.day-mac-bar{display:inline-block;width:48px;height:6px;border-radius:3px;overflow:hidden;background:#e4e5e9;vertical-align:middle}
.day-mac-bar span{display:inline-block;height:100%}
/* Photos has no real state yet, so it's the item allowed to shrink at
   >=1300px (below the "Not set up" media query) to help the whole strip
   fit on one line; the full text moves into the title attribute. */
.stat-photos-short{display:none}
@media(min-width:1300px){
  .day-stats{column-gap:6px;padding:8px 12px;min-height:0}
  .day-stat-label{font-size:9.5px}
  .day-stat-item{font-size:12px}
  .stat-photos-full{display:none}
  .stat-photos-short{display:inline}
}
.day-summary-card{container:daily-summary/inline-size}.day-summary-heading .eyebrow{margin:0 0 3px;color:var(--accent)}.day-summary-heading h2{margin:0;font-size:22px;font-weight:650;letter-spacing:-.02em}.day-summary-actions{display:grid;grid-template-columns:minmax(300px,1.35fr) minmax(240px,.85fr) auto;align-items:end;gap:12px;margin-top:18px}.day-summary-actions label{display:grid;min-width:0;gap:6px;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:0}.day-summary-actions select{width:100%;min-width:0;height:44px;padding:8px 38px 8px 12px;border:1px solid #d2d2d7;border-radius:10px;background:var(--paper);color:var(--ink);font:inherit;font-size:14px;font-weight:500;letter-spacing:-.01em}.day-summary-actions select:hover{border-color:#aeb0b5}.day-summary-actions select:focus-visible{border-color:var(--accent);outline:3px solid #26734d24;outline-offset:0}.day-summary-actions button{min-width:190px;height:44px;border-radius:10px;white-space:nowrap}.day-summary-content{margin-top:18px;font-size:15px;line-height:1.65;color:var(--ink)}.day-summary-history{display:grid;gap:12px}.day-summary-result{position:relative;padding:16px 17px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.day-summary-result-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}.day-summary-result-heading strong{padding-top:5px;font-size:12px;color:var(--accent)}.day-summary-result-tools{display:flex;align-items:center;gap:12px}.day-summary-result-heading time{display:grid;gap:1px;color:var(--ink);font-size:11px;font-variant-numeric:tabular-nums;text-align:right}.day-summary-result-heading time span{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.05em}.day-summary-drag-handle{display:grid;width:32px;height:32px;min-width:32px;padding:4px;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.day-summary-drag-handle:hover,.day-summary-drag-handle:focus-visible{background:var(--selected);color:var(--accent);outline:none}.day-summary-drag-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.day-summary-drag-handle svg{width:14px;height:22px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;pointer-events:none}.day-summary-result.reorder-dragging{z-index:2;background:var(--white);box-shadow:0 10px 28px #15201924;opacity:.92;pointer-events:none}.day-summary-result.reorder-dragging .day-summary-drag-handle{cursor:grabbing}.day-summary-result.reorder-moving{box-shadow:0 0 0 2px var(--accent)}.day-summary-result.reorder-drop-before::before,.day-summary-result.reorder-drop-after::after{left:8px;right:8px}.day-summary-text p{margin:0 0 10px}.day-summary-text p:last-child{margin-bottom:0}.day-summary-placeholder{margin:0;color:var(--muted)}.day-summary-meta{margin:15px 0 0;padding-top:11px;border-top:1px solid var(--line);color:var(--muted);font-size:11px;line-height:1.55}.day-summary-status{min-height:18px;margin:8px 0 -4px;color:var(--muted);font-size:12px}.day-summary-status:empty{min-height:0;margin:0}.day-summary-status[data-state=error]{color:#9a351f}
@media (hover:hover) and (pointer:fine){.day-summary-drag-handle{opacity:0}.day-summary-result:hover .day-summary-drag-handle,.day-summary-result:focus-within .day-summary-drag-handle,.day-summary-result:is(.reorder-dragging,.reorder-moving) .day-summary-drag-handle{opacity:1}}
.day-reflection-loading{margin:16px 0 0;color:var(--muted);font-size:13px}.day-reflection-loading[data-state=error]{color:#9a351f}.day-reflection-view{margin-top:17px}.day-reflection-body{max-width:76ch;color:var(--ink);font-size:16px;line-height:1.75}.day-reflection-body p{margin:0 0 14px}.day-reflection-body p:last-child{margin-bottom:0}.day-reflection-updated{margin:17px 0 0;padding-top:11px;border-top:1px solid var(--line);color:var(--muted);font-size:11px}.day-reflection-card form{margin-top:16px}.day-reflection-card textarea{display:block;width:100%;min-height:160px;resize:vertical;padding:14px 15px;border:1px solid #d2d2d7;border-radius:10px;background:var(--paper);color:var(--ink);font:inherit;font-size:15px;line-height:1.65}.day-reflection-card textarea:focus{border-color:var(--accent);outline:3px solid #26734d24}.day-reflection-actions{display:flex;align-items:center;gap:10px;margin-top:11px}.day-reflection-actions span{margin-left:2px;color:var(--muted);font-size:12px}.day-reflection-actions span[data-state=error]{color:#9a351f}
@container daily-summary (max-width:850px){.day-summary-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.day-summary-actions button{grid-column:1/-1;justify-self:end}}
@container daily-summary (max-width:560px){.day-summary-actions{grid-template-columns:1fr}.day-summary-actions button{grid-column:auto;justify-self:stretch;width:100%}}
@media(max-width:700px){.day-summary-card{padding:16px}.day-summary-result-heading{align-items:flex-start;flex-direction:column;gap:1px}.day-reflection-actions{align-items:stretch;flex-direction:column}.day-reflection-actions button{width:100%}}
.day-timeline-section .day-timeline{position:relative;margin-top:12px}
.day-timeline-ticks{position:relative;height:16px}
.day-timeline-track{position:relative;height:48px;margin-top:4px;border-radius:8px;background:repeating-linear-gradient(90deg,rgba(0,0,0,.07) 0,rgba(0,0,0,.07) 1px,transparent 1px,transparent 12.5%),repeating-linear-gradient(45deg,var(--shelf),var(--shelf) 6px,var(--line) 6px,var(--line) 12px);border:1px solid var(--line);overflow:hidden}
.day-timeline-block{position:absolute;top:0;bottom:0;border:0;border-radius:0;background:var(--timeline-color);cursor:pointer;padding:0}.day-timeline-block:hover,.day-timeline-block:focus-visible{outline:2px solid var(--ink);outline-offset:-2px;z-index:2}.day-timeline-block.continued{background:repeating-linear-gradient(135deg,var(--timeline-color),var(--timeline-color) 4px,color-mix(in srgb,var(--timeline-color) 55%,white) 4px,color-mix(in srgb,var(--timeline-color) 55%,white) 8px)}
.day-timeline-tick{position:absolute;top:0;transform:translateX(-50%);font-size:10px;color:var(--muted);white-space:nowrap}
.day-recordings-section .day-recordings-list{margin-top:12px}
/* One outline owns each recording summary, player and transcript. Interior
   hairlines express hierarchy without nested cards or decorative rails. */
.day-recordings-list{display:grid;gap:10px}
.recording-item-wrapper{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--white);transition:border-color 150ms ease,box-shadow 150ms ease}
.recording-item-wrapper:has(.recording-row-toggle[aria-expanded=true]){border-color:#285d4052;box-shadow:0 1px 2px #2338200a,0 6px 18px #2338200a}
.recording-item-wrapper.continued{opacity:.85}
.recording-row-toggle{width:100%;min-width:0;display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:12px 14px;text-align:left;color:var(--ink);cursor:pointer;border-radius:0}
.recording-row-toggle:hover,.recording-row-toggle:focus-visible{background:var(--selected)}
.recording-row-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.recording-row-text{flex:1;min-width:0;overflow-wrap:anywhere}
.recording-row-text strong{display:block;font-size:14px}
.recording-row-meta{display:block;margin-top:3px;font-size:12px;color:var(--muted)}
.recording-status-note.interrupted{color:#a35b1f;font-weight:600;cursor:help;text-decoration:underline dotted}
.recording-title-loading{color:var(--muted);font-weight:400;font-style:italic}
.recording-row-chevron{flex:none;width:16px;height:16px;stroke:var(--muted);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform 150ms ease}
.recording-row-toggle[aria-expanded=true] .recording-row-chevron{transform:rotate(180deg);stroke:var(--accent)}
/* Recording-level destructive action: quiet in the audio row, explicit in its confirmation. */
.recording-delete-btn{flex:none;align-self:center;min-height:32px;padding:5px 10px;border:1px solid transparent;border-radius:999px;background:transparent;color:var(--muted);font:inherit;font-size:12.5px;font-weight:500;cursor:pointer;transition:color 140ms ease,background-color 140ms ease,border-color 140ms ease}
.recording-delete-btn:hover,.recording-delete-btn:focus-visible{border-color:#9a351f30;background:#9a351f0d;color:#9a351f}
.recording-delete-btn:focus-visible{outline:2px solid #a62626;outline-offset:2px}
.recording-accordion-body{padding:0}
.recording-detail-loading{background:var(--white)}
.recording-player-placeholder{pointer-events:none}
.recording-transcript-placeholder{display:grid;grid-template-columns:1fr;gap:13px;min-height:210px;pointer-events:none}
.recording-placeholder-circle,.recording-placeholder-time,.recording-placeholder-progress,.recording-placeholder-heading,.recording-placeholder-chip,.recording-placeholder-line{display:block;border-radius:999px;background:#e5e8e6}
.recording-placeholder-circle{flex:none;width:34px;height:34px;background:var(--white)}
.recording-placeholder-time{flex:none;width:76px;height:13px}
.recording-placeholder-progress{flex:1;height:4px}
.recording-placeholder-heading{width:92px;height:16px}
.recording-placeholder-chip{width:58px;height:28px}
.recording-placeholder-line{width:100%;height:44px;border-radius:7px}.recording-placeholder-line.short{width:72%}
.recording-transcript-line.active{background:var(--selected)}.recording-transcript-line.active time{color:var(--accent);font-weight:700}
/* The transcript scrolls within its own box on desktop; auto-scrolling the
   active line only ever adjusts this box's scrollTop (see scrollLineIntoView
   in recordings-client.js), never the page. */
#recording-transcript-lines{max-height:280px;overflow:auto}
@media(max-width:820px){#main-content:has(#life-panel:not([hidden])){padding:16px 16px 40px}.recordings-workspace{display:block}.recordings-shelf{border-right:0;border-bottom:1px solid var(--line);padding:14px 12px}.recording-reader{padding:24px 16px 48px}.recording-heading,.recording-section-heading{align-items:flex-start;flex-direction:column}.recording-player{padding:10px 12px}.recording-transcript{padding:16px 14px 10px}.recording-empty{margin:10vh auto}.recording-heading h2{font-size:28px}.day-heading h1{font-size:30px}.day-heading{align-items:flex-start;flex-direction:column}.life-battery-latest{gap:8px 16px}.life-battery-chart{overflow-x:auto}.life-battery-chart svg{min-width:660px}}
@media(max-width:480px){.day-stats{padding:10px 12px}.day-timeline-tick[data-hour="3"],.day-timeline-tick[data-hour="9"],.day-timeline-tick[data-hour="15"],.day-timeline-tick[data-hour="21"]{display:none}#recording-transcript-lines{max-height:none;overflow:visible}}
.speaker-chip{min-height:28px;padding:3px 12px;border:1px dashed #b8b8bf;border-radius:999px;background:var(--paper);color:var(--muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer}.speaker-chip.named{border-style:solid;border-color:var(--line);background:var(--shelf);color:var(--ink)}.speaker-chip.self{border-color:transparent;background:var(--selected);color:var(--accent)}.speaker-chip:hover,.speaker-chip:focus-visible{border-color:var(--accent);color:var(--accent)}.speaker-chip[aria-expanded=true]{border-color:var(--accent)}
.recording-line-speaker{justify-self:start;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recording-line-speaker.unknown{font-weight:500}
.speaker-editor{display:grid;gap:10px;margin:8px 4px 4px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--shelf)}.speaker-editor-title{margin:0;font-size:13px;color:var(--muted)}.speaker-choices{display:flex;flex-wrap:wrap;gap:8px}.speaker-choices:empty{display:none}.speaker-choice{min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:999px;background:var(--paper);color:var(--ink);font:inherit;font-size:13px;cursor:pointer}.speaker-choice:hover,.speaker-choice:focus-visible{border-color:var(--accent);color:var(--accent)}.speaker-choice[data-speaker-self]{background:var(--selected);border-color:transparent;color:var(--accent);font-weight:600}
.speaker-name-row{display:flex;gap:8px}.speaker-name-row input{flex:1;min-width:0;min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);font:inherit}.speaker-name-row button{min-height:36px}.speaker-editor-actions{display:flex;flex-wrap:wrap;gap:12px}.speaker-scope{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px;color:var(--muted)}.speaker-scope select{min-height:36px;max-width:100%;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit}.speaker-editor [data-speaker-status]:empty,#recording-transcript-status:empty{display:none}.speaker-editor [data-speaker-status],#recording-transcript-status{margin:0;font-size:13px}.speaker-chip:focus-visible,.speaker-choice:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Life media library: the day stays scannable even with thousands of photos
   and hours of transcript. The page shows a visual digest; raw evidence opens
   in focused, keyboard-accessible readers. */
.day-heading h1{font-family:inherit;font-size:clamp(26px,3vw,38px);font-weight:680;letter-spacing:-.035em}
.life-section-heading{align-items:end;margin-top:22px}.life-section-heading>div:first-child{display:grid;gap:3px}.life-section-heading h2{margin:0;font-size:20px;letter-spacing:-.02em}.life-section-actions{display:flex;align-items:center;gap:12px}.life-section-actions .text-button{font-weight:600}.life-section-heading [role=status]{font-variant-numeric:tabular-nums}
.life-photo-mosaic{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:88px;gap:4px;margin-top:10px;overflow:hidden;border-radius:14px;background:var(--shelf)}
.life-photo-mosaic:empty{display:none}.life-photo{position:relative;width:auto;height:auto;min-width:0;border:0;border-radius:0}.life-photo:first-child{grid-column:span 2;grid-row:span 2}.life-photo img{transition:transform 240ms ease,filter 180ms ease}.life-photo:hover img,.life-photo:focus-visible img{transform:scale(1.025);filter:brightness(.88)}.life-photo:focus-visible{z-index:2;outline:3px solid var(--white);outline-offset:-4px;box-shadow:inset 0 0 0 6px var(--accent)}.life-photo time{position:absolute;left:8px;bottom:7px;padding:3px 6px;border-radius:999px;background:#152019b8;color:#fff;font-size:10px;font-weight:600;font-variant-numeric:tabular-nums;opacity:0;transform:translateY(3px);transition:opacity 140ms ease,transform 140ms ease}.life-photo:hover time,.life-photo:focus-visible time{opacity:1;transform:none}
#life-photo-dialog{width:min(1100px,calc(100vw - 32px));height:min(820px,calc(100dvh - 32px));max-height:none;padding:0;overflow:hidden;border:1px solid #ffffff5c;border-radius:20px;background:#111713;color:#fff;box-shadow:0 30px 90px #07100a80}
#life-photo-dialog::backdrop{background:#07100ad9;backdrop-filter:blur(12px)}.life-photo-dialog-head{height:68px;padding:0 18px 0 24px;border-bottom:1px solid #ffffff1c}.life-photo-dialog-head>div{display:grid;gap:2px}.life-photo-dialog-head .eyebrow{margin:0;color:#a9c7b5;font-size:10px}.life-photo-dialog-head h2{color:#fff;font-size:18px}.transcript-dialog-close{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:999px;background:var(--shelf);color:var(--ink);font:inherit;font-size:27px;line-height:1;cursor:pointer}.life-photo-dialog-head .transcript-dialog-close{background:#ffffff17;color:#fff}.transcript-dialog-close:hover,.transcript-dialog-close:focus-visible{background:var(--selected);color:var(--accent);outline:2px solid currentColor;outline-offset:2px}.life-photo-dialog-head .transcript-dialog-close:hover,.life-photo-dialog-head .transcript-dialog-close:focus-visible{background:#ffffff2b;color:#fff}
#life-photo-dialog-body{display:grid;grid-template-rows:minmax(0,1fr) 82px auto;gap:0;height:calc(100% - 68px);margin:0}.life-photo-stage{position:relative;display:grid;place-items:center;min-height:0;overflow:hidden;background:#090d0a}.life-photo-stage>img{width:100%;height:100%;max-width:none!important;max-height:none!important;object-fit:contain;margin:0!important;border-radius:0!important;background:#090d0a!important}.life-photo-nav{position:absolute;z-index:2;top:50%;display:grid;place-items:center;width:46px;height:46px;padding:0;border:0;border-radius:999px;background:#07100abf;color:#fff;cursor:pointer;transform:translateY(-50%);backdrop-filter:blur(8px)}.life-photo-nav svg{width:22px;height:22px;overflow:visible;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.life-photo-nav.previous{inset-inline-start:20px}.life-photo-nav.next{inset-inline-end:20px}.life-photo-nav:disabled{opacity:.2;cursor:default}.life-photo-nav:not(:disabled):hover,.life-photo-nav:not(:disabled):focus-visible{background:#fff;color:#152019}.life-photo-filmstrip{display:flex;gap:7px;overflow-x:auto;padding:10px 18px;background:#111713;scroll-padding-inline:18px}.life-photo-filmstrip button{flex:none;width:76px;height:58px;padding:0;overflow:hidden;border:2px solid transparent;border-radius:7px;background:#202923;opacity:.62;cursor:pointer}.life-photo-filmstrip button.selected{border-color:#fff;opacity:1}.life-photo-filmstrip img{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover;margin:0!important;border-radius:5px!important}.life-photo-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:68px;padding:10px 20px;border-top:1px solid #ffffff1c;color:#aeb8b1;font-size:12px}#life-photo-dialog-body .life-photo-metadata{display:flex;grid-template-columns:none;align-items:flex-start;flex:1;flex-wrap:wrap;gap:8px 18px;margin:0;min-width:0;font-size:12px}#life-photo-dialog-body .life-photo-metadata>div{display:grid;gap:2px}#life-photo-dialog-body .life-photo-metadata dt{color:#7f9186;font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}#life-photo-dialog-body .life-photo-metadata dd{margin:0;color:#dce4df;font-variant-numeric:tabular-nums;white-space:nowrap}.life-photo-dialog-actions{display:flex;align-items:center;flex:none;gap:12px}.life-photo-dialog-footer .text-button{color:#fff}

.recording-transcript-preview{padding:16px 16px 14px}.recording-transcript-preview .recording-section-heading{align-items:center}.recording-transcript-preview .recording-section-heading>div{display:flex;align-items:baseline;gap:10px}.recording-transcript-preview .recording-section-heading h3{margin:0}.recording-transcript-summary{color:var(--muted);font-size:12px}.recording-transcript-preview .secondary{min-height:34px;padding:5px 11px;border-radius:999px;font-size:12px;font-weight:600}
#recording-transcript-preview-lines{display:grid;margin-top:10px}.transcript-preview-line{display:grid;grid-template-columns:minmax(58px,max-content) minmax(0,1fr);align-items:center;gap:10px;width:100%;min-height:44px;padding:7px 2px;border-top:1px solid var(--line);background:transparent;color:var(--ink)}.transcript-preview-line .speaker-chip{max-width:120px;font-size:12px}.transcript-preview-content{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:10px;min-width:0;min-height:36px;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.transcript-preview-line time{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.transcript-preview-line strong{overflow:hidden;font-size:13px;font-weight:450;text-overflow:ellipsis;white-space:nowrap}.transcript-preview-line:hover,.transcript-preview-line:focus-within{border-radius:8px;background:var(--selected)}.transcript-preview-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}.transcript-preview-line.active{background:var(--selected)}
.transcript-reader-dialog{width:min(980px,calc(100vw - 32px));height:min(850px,calc(100dvh - 32px));max-height:none;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--paper);color:var(--ink);box-shadow:0 30px 90px #15201938}.transcript-reader-dialog::backdrop{background:#15201966;backdrop-filter:blur(8px)}.transcript-dialog-shell{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;height:100%}.transcript-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px 15px;border-bottom:1px solid var(--line);background:var(--paper)}.transcript-dialog-header .eyebrow{margin:0 0 3px}.transcript-dialog-header h2{margin:0;font-size:24px;letter-spacing:-.025em}.transcript-dialog-player{display:flex;align-items:center;gap:12px;padding:11px 24px;border-bottom:1px solid var(--line);background:var(--shelf)}.transcript-dialog-player .recording-play-toggle{background:var(--white)}.transcript-dialog-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 24px;border-bottom:1px solid var(--line);background:var(--white)}.transcript-dialog-tools label{flex:1;max-width:460px}.transcript-dialog-tools input{width:100%;min-height:36px;padding:7px 13px;border:1px solid var(--line);border-radius:999px;background:var(--shelf);font:inherit;font-size:13px}.transcript-dialog-tools input:focus-visible{border-color:var(--accent);outline:3px solid #285d401d}.transcript-dialog-tools>span{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.transcript-dialog-lines{min-height:0;overflow:auto;padding:8px 22px 26px;scroll-padding:40% 0}.transcript-dialog-lines .recording-transcript-line{grid-template-columns:minmax(64px,max-content) minmax(0,1fr);padding:12px 10px}.transcript-dialog-lines .recording-transcript-content{grid-template-columns:48px minmax(0,1fr);line-height:1.6}.transcript-dialog-footer{min-height:48px;padding:8px 24px;border-top:1px solid var(--line);background:var(--paper)}
.transcript-no-matches{max-width:420px;margin:16vh auto 0;color:var(--muted);text-align:center}
#recording-transcript-lines{max-height:none;overflow:auto}

@media(max-width:820px){.life-photo-mosaic{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:78px}.life-photo-mosaic .life-photo:nth-child(n+7){display:none}.transcript-reader-dialog,#life-photo-dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;margin:0;box-sizing:border-box;border:0;border-radius:0}.transcript-dialog-header{padding:16px}.transcript-dialog-player,.transcript-dialog-tools{padding-left:16px;padding-right:16px}.transcript-dialog-lines{padding-left:8px;padding-right:8px}.life-photo-nav.previous{inset-inline-start:12px}.life-photo-nav.next{inset-inline-end:12px}.life-photo-dialog-footer{align-items:flex-start;flex-direction:column;gap:10px}.life-photo-dialog-actions{align-self:stretch;justify-content:flex-end}.recording-transcript-preview .recording-section-heading{align-items:center;flex-direction:row}.transcript-preview-content{grid-template-columns:38px minmax(0,1fr)}}
@media(max-width:480px){.life-photo-mosaic{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:72px}.life-photo-mosaic .life-photo:nth-child(n+6){display:none}.life-photo:first-child{grid-column:span 2}.life-section-heading{align-items:flex-end}.life-section-actions{align-items:flex-end;flex-direction:column;gap:2px}.transcript-dialog-tools{align-items:stretch;flex-direction:column;gap:6px}.transcript-dialog-tools label{max-width:none}.transcript-preview-line{gap:8px}.transcript-preview-line .speaker-chip{max-width:100px}.transcript-preview-content{grid-template-columns:minmax(0,1fr)}.transcript-preview-line time{display:none}.recording-transcript-preview .recording-section-heading>div{align-items:flex-start;flex-direction:column;gap:2px}}
@media(prefers-reduced-motion:reduce){.life-photo img,.life-photo time{transition:none}}

.upload-panel.drop-active{outline:3px solid var(--accent);outline-offset:3px}
.reader-foot{flex-wrap:wrap}.reader-save-status{font-size:12px;color:var(--reader-soft)}.reader-save-status[data-state="error"]{color:var(--reader-ink);font-weight:600}.reader-save-retry{font-size:12px}
@media(max-width:660px){.reader-save-status{flex-basis:100%;text-align:center}}

.reader-import-note{flex:none;margin:0;padding:7px 16px;background:var(--reader-chrome);color:var(--reader-soft);font-size:12px;text-align:center}.reader-bar-tools a{text-decoration:none}
@media(max-width:660px){.reader-import-note{padding:6px 12px}}

/* Civilization atlas: all selectors are scoped to its Tools panel. */
.technology-tree{container:technology-tree/inline-size}.technology-tree .tt-heading{padding:28px 28px 22px}.technology-tree .tt-eyebrow{font-size:11px;letter-spacing:.08em;color:var(--accent);font-weight:600;margin:0 0 8px}.technology-tree h1{font-size:30px;line-height:1.4;letter-spacing:-.04em;margin:0 0 12px}.technology-tree .tt-heading>p:last-child{color:var(--muted);font-size:14px;max-width:68ch;margin:0}.technology-tree .tt-toolbar{padding:0 28px 18px;display:flex;justify-content:space-between;gap:18px;align-items:center;flex-wrap:wrap}.technology-tree button{font:inherit}.technology-tree .tt-modes{display:flex;background:var(--shelf);border:1px solid var(--line);padding:3px;border-radius:9px;gap:3px}.technology-tree .tt-modes button{background:transparent;border:0;border-radius:6px;padding:9px 12px;font-size:13px;color:var(--muted);min-height:40px}.technology-tree .tt-modes button[aria-pressed=true]{background:var(--white);color:var(--accent);box-shadow:0 1px 4px #00000013;font-weight:600}.technology-tree .tt-search-label{flex:1;max-width:330px;min-width:180px}.technology-tree .tt-search{font-size:14px}.technology-tree .tt-results{margin:0 28px 16px;max-height:240px;overflow:auto;padding:12px;border:1px solid var(--line);border-radius:8px}.technology-tree .tt-results>p{width:100%;margin:0;font-size:13px;color:var(--muted)}.technology-tree .tt-map-meta{padding:10px 28px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:16px;font-size:11px;color:var(--muted)}.technology-tree .tt-map-meta p{margin:0;max-width:70ch}.technology-tree .tt-visible-count{white-space:nowrap}.technology-tree .tt-viewport{position:relative;height:540px;background-color:#f8f9fa;background-image:radial-gradient(#dfe3e4 1px,transparent 1px);background-size:20px 20px;overflow:hidden;cursor:grab;touch-action:none;border-block:1px solid var(--line)}.technology-tree .tt-viewport:focus-visible{outline-offset:-4px}.technology-tree .tt-dragging{cursor:grabbing}.technology-tree .tt-world{position:absolute;left:0;top:0;transform-origin:0 0}.technology-tree .tt-edges{position:absolute;pointer-events:none;overflow:visible}.technology-tree .tt-edge{fill:none;stroke:#a8b4ae;stroke-width:1.4;opacity:.2}.technology-tree .tt-edge-optional{stroke-dasharray:7 5}.technology-tree .tt-edge-active{stroke:var(--accent);stroke-width:2.8;opacity:1}.technology-tree .tt-edge-consumer{stroke:#677e96;stroke-width:2.4;opacity:.8}.technology-tree .tt-column{position:absolute;top:24px;color:var(--muted);font-size:13px;letter-spacing:.04em}.technology-tree .tt-node{position:absolute;display:grid;grid-template-columns:34px 1fr;grid-template-rows:1fr 18px;gap:0 8px;align-items:center;text-align:left;padding:11px 12px;background:var(--white);color:var(--ink);border:1px solid #d3d9d6;border-radius:10px;box-shadow:0 2px 4px #1a302806;cursor:pointer}.technology-tree .tt-node-id{grid-row:1/3;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;background:var(--shelf);border-radius:6px;text-align:center;padding:7px 0;color:var(--muted)}.technology-tree .tt-node-name{font-size:15px;line-height:1.45;font-weight:550;overflow-wrap:anywhere}.technology-tree .tt-node-role{font-size:10px;line-height:1;color:var(--muted)}.technology-tree .tt-node[data-relation=selected]{background:var(--accent);border:2px solid var(--accent);color:#fff;box-shadow:0 5px 16px #26734d20}.technology-tree .tt-node[data-relation=selected] .tt-node-role{color:#fff}.technology-tree .tt-node[data-relation=selected] .tt-node-id{background:#ffffff22;color:#fff}.technology-tree .tt-node[data-relation=dependency]{border:2px solid var(--accent);background:#eef5f0}.technology-tree .tt-node[data-relation=optional]{border:2px dashed var(--accent);background:#f5f8f5}.technology-tree .tt-node[data-relation=consumer]{border:2px solid #8295a8;background:#f1f5f9}.technology-tree .tt-node[data-relation=other]{opacity:.65}.technology-tree .tt-node:hover,.technology-tree .tt-node:focus-visible{opacity:1}.technology-tree .tt-tooltip{position:absolute;z-index:3;pointer-events:none;width:min(340px,calc(100% - 16px));padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--white);box-shadow:0 8px 28px #182d2526;color:var(--ink);font-size:12px;line-height:1.7;cursor:default}.technology-tree .tt-tooltip strong{display:block;font-size:14px;line-height:1.5}.technology-tree .tt-tooltip p{margin:7px 0}.technology-tree .tt-tooltip small{color:var(--muted);font-size:10px}.technology-tree .tt-map-footer{padding:14px 20px;display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.technology-tree .tt-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11px;color:var(--muted)}.technology-tree .tt-legend span{display:flex;gap:5px;align-items:center}.technology-tree .tt-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--white)}.technology-tree .tt-key-current{background:var(--accent)!important}.technology-tree .tt-key-dependency{border:2px solid var(--accent)}.technology-tree .tt-key-optional{border:1px dashed var(--accent)}.technology-tree .tt-key-consumer{border:2px solid #8295a8}.technology-tree .tt-zoom{display:flex;align-items:center;gap:4px}.technology-tree .tt-zoom button{background:var(--white);border:1px solid var(--line);border-radius:6px;padding:7px 10px;min-height:36px;font-size:12px;color:var(--ink)}.technology-tree .tt-zoom button:hover,.technology-tree .tt-chips button:hover{background:var(--selected)}.technology-tree .tt-scale{font-size:11px;min-width:43px;text-align:center;color:var(--muted)}.technology-tree .tt-upstream-label{display:flex;flex-direction:row;align-items:center;gap:8px;margin:0 28px 18px;font-size:12px;font-weight:400;color:var(--muted)}.technology-tree .tt-upstream{width:16px;height:16px;margin:0;accent-color:var(--accent)}.technology-tree .tt-detail{border-top:1px solid var(--line);padding:25px 28px}.technology-tree .tt-detail-heading{display:flex;justify-content:space-between;gap:15px;align-items:start;margin-bottom:24px}.technology-tree .tt-detail h2{font-size:24px;line-height:1.4;margin:0;letter-spacing:-.03em}.technology-tree .tt-status{font-size:11px;color:var(--accent);border:1px solid #c9d9cf;background:#f2f6f3;padding:5px 8px;border-radius:5px;white-space:nowrap}.technology-tree .tt-detail-columns{display:grid;grid-template-columns:1fr 1fr;gap:32px}.technology-tree h3{font:600 13px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;margin:0 0 9px;letter-spacing:0}.technology-tree .tt-detail h3:not(:first-child){margin-top:20px}.technology-tree h3>span{color:var(--muted);font-weight:400;font-size:11px;padding-left:5px}.technology-tree .tt-detail p,.technology-tree .tt-context p{font-size:13px;line-height:1.9;margin:0 0 16px;color:var(--muted)}.technology-tree .tt-chips{display:flex;flex-wrap:wrap;gap:6px}.technology-tree .tt-chips button{display:inline-block;text-align:left;min-height:36px;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:var(--white);font-size:12px;line-height:1.5;color:var(--ink)}.technology-tree .tt-chips button>span{color:var(--accent);font-size:10px;margin-right:4px}.technology-tree .tt-optional-chips button{border-style:dashed}.technology-tree .tt-sources{display:flex;gap:8px 16px;flex-wrap:wrap;margin-top:20px}.technology-tree .tt-sources a,.technology-tree .tt-context a{font-size:11px;text-underline-offset:4px}.technology-tree .tt-context{padding:18px 28px 24px;margin:0;background:var(--shelf)}.technology-tree .tt-context summary{font-size:13px}.technology-tree .tt-context-grid{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:22px}.technology-tree .tt-context .tt-method{margin:22px 0 0;padding-top:16px;border-top:1px solid var(--line);font-size:11px}
@container technology-tree (max-width:600px){.technology-tree .tt-heading{padding:22px 18px}.technology-tree h1{font-size:25px}.technology-tree .tt-toolbar{padding:0 18px 16px;gap:12px}.technology-tree .tt-search-label{max-width:none;flex-basis:100%}.technology-tree .tt-map-meta{padding:10px 18px}.technology-tree .tt-viewport{height:470px}.technology-tree .tt-detail{padding:22px 18px}.technology-tree .tt-detail-heading{flex-direction:column;gap:12px}.technology-tree .tt-detail-columns,.technology-tree .tt-context-grid{grid-template-columns:1fr;gap:20px}.technology-tree .tt-upstream-label{margin-inline:18px}.technology-tree .tt-context{padding:18px}.technology-tree .tt-results{margin-inline:18px}.technology-tree .tt-map-footer{padding:12px 18px}.technology-tree .tt-modes{width:100%}.technology-tree .tt-modes button{flex:1}.technology-tree .tt-legend{gap:10px}.technology-tree .tt-zoom button{min-height:44px}}

/* Quiet direct Rename; editing stays at the name, with one checkmark to save. */
.tool-links a{padding-right:40px}.nav-group-head .nav-parent{padding-right:42px;min-width:0}.nav-parent>span{min-width:0;overflow-wrap:anywhere}
.nav-rename-button{position:absolute;right:0;top:0;width:36px;height:100%;min-height:44px;padding:9px;border:0;border-radius:6px;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center}
.nav-rename-button svg,.nav-rename-save svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.nav-rename-button:hover,.nav-rename-button:focus-visible{background:var(--selected);color:var(--accent)}
.nav-rename-editor{margin:0;padding:0;min-width:0}.nav-rename-field{position:relative;min-width:0}.nav-rename-field input{display:block;width:100%;min-width:0;min-height:44px;padding:10px 44px 10px 10px;border:1px solid #b8c1cb;border-radius:6px;background:var(--paper);color:var(--ink);font-size:14px;line-height:22px}
.nav-rename-save{position:absolute;inset:0 0 0 auto;width:44px;min-height:44px;padding:12px;border:0;border-radius:0 6px 6px 0;color:var(--accent);background:transparent;display:grid;place-items:center}.nav-rename-save:hover{background:var(--selected)}.nav-rename-save:focus-visible{outline-offset:-3px}
.nav-rename-group{display:grid;grid-template-columns:19px minmax(0,1fr);column-gap:11px;align-items:start;padding-left:12px}.nav-rename-group-icon{width:19px;height:19px;margin-top:12px;fill:none;stroke:var(--muted);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.nav-rename-group .nav-rename-error{grid-column:2}.nav-rename-error{font-size:12px;line-height:1.5;color:#a62626;margin:6px 0 4px;overflow-wrap:anywhere}.nav-renaming>.reorder-handle{visibility:hidden}
.nav-link-drop>.nav-group-head{outline:2px solid var(--accent);outline-offset:-2px;border-radius:5px}.project-cards{display:grid;gap:16px}.project-cards h2{margin:0 0 12px}.project-cards a{color:var(--ink);text-underline-offset:4px}
.nav-rename-button{opacity:0;pointer-events:none;transition:opacity 120ms ease}
[data-nav-input=touch] .nav-rename-selected>.nav-rename-button,[data-nav-input=keyboard] li:focus-within>.nav-rename-button,[data-nav-input=keyboard] .nav-group-head:focus-within>.nav-rename-button,.nav-rename-button:focus-visible{opacity:1;pointer-events:auto}
@media(any-hover:hover){[data-nav-input=pointer] li:hover>.nav-rename-button,[data-nav-input=pointer] li:focus-within>.nav-rename-button,[data-nav-input=pointer] .nav-group-head:hover>.nav-rename-button,[data-nav-input=pointer] .nav-group-head:focus-within>.nav-rename-button{opacity:1;pointer-events:auto}}
@media(any-pointer:coarse){.nav-rename-button{width:44px}.tool-links a{padding-right:48px}.nav-group-head .nav-parent{padding-right:48px}}
@media(max-width:760px){.nav-rename-button{width:44px}.nav-rename-field input{font-size:16px}}
@media(prefers-reduced-motion:reduce){.nav-rename-button{transition:none}}

/* Dependency atlas: categories color cards; topology determines positions. */
.technology-tree [data-category=F]{--tt-color:#327859;--tt-tint:#eaf4ed}.technology-tree [data-category=M]{--tt-color:#257b86;--tt-tint:#e8f3f4}.technology-tree [data-category=E]{--tt-color:#996719;--tt-tint:#fbf2df}.technology-tree [data-category=C]{--tt-color:#426fb3;--tt-tint:#edf2fb}.technology-tree [data-category=B]{--tt-color:#6a7838;--tt-tint:#f0f4e5}.technology-tree [data-category=R]{--tt-color:#a35555;--tt-tint:#faeceb}.technology-tree [data-category=S]{--tt-color:#725ab0;--tt-tint:#f1edfa}.technology-tree [data-category=X]{--tt-color:#946080;--tt-tint:#f7edf3}
.technology-tree .tt-category-legend{display:flex;flex-wrap:wrap;gap:10px 20px;padding:0 28px 18px;font-size:12px;color:var(--muted)}.technology-tree .tt-category-legend span{display:flex;align-items:center;gap:7px}.technology-tree .tt-category-legend i{width:11px;height:11px;border-radius:3px;background:var(--tt-color)}
.technology-tree .tt-goals{padding:16px 28px;background:var(--shelf);border-top:1px solid var(--line)}.technology-tree .tt-goals p{font-size:12px;color:var(--muted);margin:0 0 10px}.technology-tree .tt-goals strong{color:var(--ink)}.technology-tree .tt-goals .tt-branch-goals{margin:10px 0 0}.technology-tree .tt-branch-goals button{border:0;background:transparent;color:var(--accent);padding:5px 7px;text-decoration:underline;text-underline-offset:3px;font-size:12px}
.technology-tree .tt-viewport{height:600px}.technology-tree .tt-tier-label{position:absolute;font-size:12px;font-weight:650;color:var(--muted);background:#f8f9fa;padding:3px 8px;border-radius:4px}.technology-tree .tt-loop{position:absolute;border:1px dashed #83918b;border-radius:12px;background:#ffffff55;pointer-events:none}.technology-tree .tt-loop>span{position:absolute;top:4px;left:10px;color:#53625b;font-size:11px}
.technology-tree .tt-node[data-relation]{background:var(--tt-tint);border:1px solid var(--tt-color);border-left:5px solid var(--tt-color);color:var(--ink);opacity:1;box-shadow:0 2px 5px #182d250a}.technology-tree .tt-node[data-relation] .tt-node-id{background:#ffffffb0;color:var(--tt-color)}.technology-tree .tt-node[data-relation] .tt-node-role{color:var(--muted)}.technology-tree .tt-node[data-relation=selected]{outline:3px solid #26382f;outline-offset:3px;box-shadow:0 4px 12px #182d251a}.technology-tree .tt-node[data-relation=dependency],.technology-tree .tt-node[data-relation=consumer]{border-width:2px;border-left-width:5px}.technology-tree .tt-node[data-relation=optional]{border:2px dashed var(--tt-color);border-left-width:5px}.technology-tree .tt-node:focus-visible{outline:3px solid var(--accent);outline-offset:5px}
.technology-tree .tt-edge{opacity:0;stroke:#7b8b83;stroke-width:1.5}.technology-tree .tt-show-all-edges .tt-edge{opacity:.22}.technology-tree .tt-edge-feedback{stroke-dasharray:3 4}.technology-tree .tt-edge-active,.technology-tree .tt-show-all-edges .tt-edge-active{opacity:1;stroke:#334d40;stroke-width:2.8}.technology-tree .tt-edge-consumer,.technology-tree .tt-show-all-edges .tt-edge-consumer{opacity:.85;stroke:#677e96;stroke-width:2.4}
.technology-tree .tt-map-options{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;padding:0 28px 10px}.technology-tree .tt-map-options label{display:flex;flex-direction:row;align-items:center;gap:7px;font-size:12px;font-weight:400;color:var(--muted)}.technology-tree .tt-map-options input{width:16px;height:16px;margin:0;accent-color:var(--accent)}.technology-tree .tt-layer-label{max-width:100%}.technology-tree .tt-layer-jump{width:250px;max-width:100%;font-size:12px;min-height:40px}.technology-tree .tt-layout-note{font-size:11px;color:var(--muted);line-height:1.8;padding:0 28px 18px;margin:0}.technology-tree .tt-zoom{flex-wrap:wrap}
@container technology-tree (max-width:600px){.technology-tree .tt-category-legend{padding-inline:18px;gap:8px 13px;font-size:11px}.technology-tree .tt-goals{padding:14px 18px}.technology-tree .tt-map-options{padding-inline:18px}.technology-tree .tt-layout-note{padding-inline:18px}.technology-tree .tt-viewport{height:500px}.technology-tree .tt-zoom{gap:6px}.technology-tree .tt-map-options label{min-height:40px}.technology-tree .tt-node-name{font-size:15px}}
/* Source bookmarks share the Contents drawer and the reader's theme tokens. */
.reader-bookmarks #reader-bookmarks-status{margin:14px 8px;color:var(--reader-soft);font-size:13px;line-height:1.5}
.reader-bookmarks-actions{display:flex;gap:8px;margin:0 8px}
.reader-bookmarks li{position:relative;display:flex;align-items:flex-start;border-bottom:1px solid var(--reader-line);padding:5px 0}
.reader-bookmark-jump{flex:1;min-width:0;display:grid;gap:6px;padding:12px 48px 12px 10px;border:0;border-radius:7px;background:transparent;color:var(--reader-ink);font:inherit;font-size:14px;line-height:1.4;text-align:left;overflow-wrap:anywhere}
.reader-bookmark-jump strong{font-weight:600}.reader-bookmark-jump span{color:var(--reader-soft);font-size:13px}
.reader-bookmark-jump[aria-current=location]{background:var(--reader-chrome);font-weight:600}
.reader-bookmark-remove{position:absolute;top:5px;right:0;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--reader-soft);font:inherit;font-size:22px;line-height:1}
.reader-bookmark-remove:hover{background:var(--reader-chrome);color:var(--reader-ink)}
.reader-bookmark-jump:hover,.reader-bookmark-jump:focus-visible,.reader-bookmark-remove:focus-visible{outline:2px solid var(--reader-ink);outline-offset:1px}
#reader-bookmark-feedback{flex-shrink:0;max-width:100%;overflow-wrap:anywhere}
#reader-bookmark-feedback:empty{display:none}
.reader-bookmark-jump span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-weight:400}
.reader-bookmarks #reader-bookmarks-status:empty{display:none}
.book-title-heading{display:flex;align-items:flex-start;gap:16px;margin:14px 0 24px}
.book-title-heading h1{flex:1;min-width:0;margin:0;overflow-wrap:anywhere}
.book-title-heading button,.book-rename-actions button{min-height:44px;padding:9px 14px;border:1px solid var(--line);border-radius:6px;background:var(--white);color:var(--ink);font:inherit;font-size:14px}
.book-title-heading button{flex:none}.book-rename-form{display:grid;gap:10px;margin:0 0 20px}.book-rename-form input{width:100%;min-width:0}.book-rename-actions{display:flex;gap:8px}.book-rename-actions .primary{background:var(--accent);color:var(--white);border-color:var(--accent)}
#book-rename-status:empty{display:none}#book-rename-status{font-size:14px;margin:0 0 16px}
@media(max-width:540px){.book-title-heading{gap:12px}}
.book-summary-tools{margin:20px 0;padding:14px 0;border-block:1px solid var(--line)}.book-summary-tools summary{cursor:pointer;font-weight:600}.book-summary-tools textarea,.book-summary-tools select{width:100%;max-width:100%;min-width:0}.book-summary-tools pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto;background:var(--shelf);border:1px solid var(--line);padding:14px;border-radius:6px;font:inherit;font-size:14px;line-height:1.6}.book-summary-tools label{margin-top:14px}.book-summary-tools h5{font-size:14px;margin:18px 0 8px}.book-summary-tools article{padding:12px 0}.book-summary-tools article li,.book-summary-tools article p{overflow-wrap:anywhere}.book-summary-tools .node-actions{flex-wrap:wrap}

.reader-swipe-hint{display:none;color:var(--reader-soft);font-size:11px;line-height:1.4}
@media(pointer:coarse){.reader-foot{flex-wrap:wrap}.reader-swipe-hint{display:block;flex-basis:100%;text-align:center}}

/* Book details use the full workspace; All books is the single book list. */
.book-detail{min-width:0;min-height:510px}

.reader-page-motion{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:3;background:var(--reader-bg);user-select:none;-webkit-user-select:none}
.reader-page-track{display:flex;height:100%;will-change:transform}
.reader-page-preview{display:flex;justify-content:center;flex:none;height:100%;background:var(--reader-bg);box-shadow:inset 1px 0 var(--reader-line)}
.reader-surface{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;background:var(--reader-bg);color:var(--reader-ink);overflow:hidden}

/* One reader header row: title on the left, scrollable actions on the right. */

.reader-import-info{flex:none;margin:0;padding:0;border:0}
.reader-import-info>summary{display:grid;place-items:center;width:44px;height:44px;border-radius:6px;font-size:22px;color:var(--reader-soft);list-style:none}
.reader-import-info>summary::-webkit-details-marker{display:none}
.reader-import-info>summary:hover{background:var(--reader-bg)}
.reader-import-info>summary:focus-visible{outline:3px solid var(--reader-ink);outline-offset:-3px}
.reader-import-info .reader-import-note{position:absolute;z-index:6;top:54px;right:16px;width:min(360px,calc(100% - 32px));padding:14px 16px;border:1px solid var(--reader-line);border-radius:8px;background:var(--reader-bg);box-shadow:0 8px 28px #0002;color:var(--reader-ink);text-align:left;line-height:1.6}
@media(max-width:660px){.reader-bar-tools{justify-content:flex-start}}

/* Book details: reading first, summary content and its tools grouped together. */
.book-detail .reading-area{max-width:960px;margin:0 auto;padding:28px 40px 40px}
.book-detail .back-link{min-height:44px;display:inline-flex;align-items:center;margin-bottom:12px}
.book-detail-header .book-title-heading{align-items:center;margin:0 0 20px}
.book-detail-header h1{font-size:30px;line-height:1.35;letter-spacing:-.02em}
.book-detail-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.book-offline-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;max-width:100%}
.book-detail-actions .secondary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;font-size:14px;line-height:22px;white-space:nowrap}
.book-summary-section{margin-top:32px;padding-top:24px;border-top:1px solid var(--line)}
.book-summary-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.book-summary-heading h2{margin:0;font-size:20px;line-height:1.4;letter-spacing:-.01em}
.book-summary-heading button{min-height:44px}
.book-summary-actions{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;min-width:0}
.book-summary-actions label{display:flex;flex-direction:column;gap:6px;margin:0;font-size:13px;color:var(--muted);min-width:0}
.book-summary-actions select{width:250px;max-width:100%;min-height:44px;margin:0;font-size:14px;color:var(--ink)}
@media(max-width:660px){.book-summary-actions{width:100%}.book-summary-actions label{flex:1 1 180px}.book-summary-actions select{width:100%}}
.book-summary-empty{margin:16px 0 0;color:var(--muted);font-size:14px}
#book-offline-status{margin:12px 0 0;font-size:14px;overflow-wrap:anywhere}
#book-offline-status:empty{display:none}
.offline-workspace{max-width:1280px;margin:0 auto;padding:32px}
.offline-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.offline-heading h1{margin:20px 0 8px}.offline-heading p{margin:0}
.offline-search{display:block;max-width:480px;margin:24px 0 16px}
.offline-card{min-width:0}.offline-card .book-card{width:100%}
.offline-card-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 24px;flex-wrap:wrap}
.offline-card-actions .secondary{min-height:44px;font-size:13px;padding:8px 12px}
@media(max-width:660px){.offline-workspace{padding:20px}.offline-heading{align-items:flex-start}.offline-card-actions{align-items:flex-start}}
#book-generation-status:empty{display:none}
#book-generation-status{margin-top:16px;font-size:14px;color:var(--muted)}
.book-summary-current>ul{margin:20px 0;padding-left:22px;line-height:1.8}
.book-summary-current>ul li{margin:10px 0;overflow-wrap:anywhere}
.book-summary-current>h3{margin:24px 0 12px;font-size:16px}
.book-summary-section>.book-summary-tools,.book-summary-review{margin:20px 0 0;padding:0;border:0}
.book-summary-section>.book-summary-tools>summary,.book-summary-review>summary{min-height:44px;display:flex;align-items:center;gap:8px;font-weight:500}
.book-summary-section details>summary::before{content:"›";font-size:22px;line-height:1}
.book-summary-section details[open]>summary::before{transform:rotate(90deg)}
@media(max-width:660px){.book-detail .reading-area{padding:20px 20px 28px}.book-detail-header h1{font-size:25px}.book-summary-section{margin-top:24px;padding-top:20px}}

/* Book import: a compact task flow, with one file identity and one main action. */
.book-workspace>.book-import{width:calc(100% - 56px);max-width:760px;margin:24px auto;background:var(--white);border-radius:12px}
.book-import>summary{padding:20px 24px;color:var(--ink);font-size:18px;font-weight:600}
.book-import form{padding:0 24px 24px}
.book-file-choice{position:relative;display:flex;flex-direction:row;align-items:center;gap:14px;padding:18px 16px;border:1px dashed #a5b8ac;border-radius:8px;background:var(--shelf);cursor:pointer;min-width:0}
.book-file-choice.has-file{border-style:solid;border-color:var(--line)}
.book-file-choice:hover{border-color:var(--accent)}
.book-file-icon{flex:none;color:var(--accent)}
.book-file-copy{flex:1;min-width:0;display:grid;gap:5px}
#book-file-name{font-size:15px;font-weight:500;overflow-wrap:anywhere}
#book-file-meta{font-size:13px;font-weight:400;color:var(--muted);line-height:1.5}
.book-file-browse{flex:none;font-size:14px;color:var(--accent);font-weight:500}
.book-file-choice input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;padding:0;cursor:pointer}
.book-file-choice:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
.book-title-field{margin-top:20px}
.book-import .book-title-field input{height:44px;border-color:var(--line);border-radius:8px}
.book-import-footer{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-top:20px}
.book-import-footer .primary{min-height:44px;border-radius:8px;flex:none}
.book-format-help{border:0;padding:0;margin:10px 0 0;min-width:0}
.book-format-help summary{font-size:13px;color:var(--muted)}
.book-format-help p{font-size:13px;color:var(--muted);line-height:1.6;max-width:45ch;margin:8px 0 0}
@media(max-width:660px){.book-workspace>.book-import{width:calc(100% - 32px);margin:18px auto}.book-import>summary{padding:18px 18px}.book-import form{padding:0 18px 18px}.book-file-choice{padding:14px 12px;gap:10px}.book-import-footer{flex-direction:column;gap:16px}.book-import-footer .primary{width:100%}}
/* Native range semantics; explicit geometry gives 0% no completed segment. */
input.reader-slider{-webkit-appearance:none;appearance:none;height:44px;padding:0;margin:0;border:0;border-radius:0;background:linear-gradient(to right,var(--reader-ink) 0 var(--reader-progress,0%),var(--reader-line) var(--reader-progress,0%) 100%) center/calc(100% - 18px) 4px no-repeat;box-shadow:none;cursor:pointer}
input.reader-slider::-webkit-slider-runnable-track{height:4px;background:transparent}
input.reader-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;margin-top:-7px;border:0;border-radius:50%;background:var(--reader-ink)}
input.reader-slider::-moz-range-track,input.reader-slider::-moz-range-progress{height:4px;background:transparent}
input.reader-slider::-moz-range-thumb{width:18px;height:18px;border:0;border-radius:50%;background:var(--reader-ink)}
input.reader-slider:focus-visible{border-radius:4px}

/* Fixed metadata slots keep the one-row track independent of changing labels. */
.reader-foot{display:grid;grid-template-columns:minmax(0,1fr) 180px 112px;grid-template-rows:44px;position:relative}
.reader-foot.reader-finished{grid-template-columns:minmax(0,1fr) 230px 112px}
.reader-foot.reader-reviewing{grid-template-columns:minmax(0,1fr) 300px 112px}
.reader-foot .reader-slider{grid-column:1;grid-row:1;width:100%}
.reader-foot .reader-progress{grid-column:2;grid-row:1;min-width:0;display:flex;justify-content:flex-end;overflow:hidden}
.reader-page-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reader-percent-label{flex:none;white-space:pre}
.reader-foot #reader-save-status{grid-column:3;grid-row:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:18px;line-height:18px}
/* Save feedback stays in its reserved slot and fades without covering text. */
.reader-foot #reader-save-status{opacity:1;transition:opacity .2s ease}
.reader-foot #reader-save-status[data-visible="false"]{opacity:0;pointer-events:none}
.reader-save-details{margin:4px 10px 8px;max-width:30ch;font-size:12px;line-height:1.5;color:var(--reader-soft);overflow-wrap:anywhere}
.reader-more .reader-save-retry{min-height:44px}
@media(prefers-reduced-motion:reduce){.reader-foot #reader-save-status{transition:none}}
/* Bookmark and fullscreen notices retain their existing recovery area. */
.reader-notices{position:absolute;bottom:100%;left:16px;right:16px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;max-height:50dvh;overflow:auto;background:var(--reader-bg);z-index:9}
.reader-notices:has(> :not([hidden]):not(:empty)){padding:8px 0}
.reader-foot .reader-notices #reader-save-status,.reader-notices #reader-bookmark-feedback{width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:18px;grid-column:auto;grid-row:auto;overflow:visible}
.reader-notices #reader-bookmark-feedback:empty{display:none}
.reader-notices .reader-save-retry{flex:none;min-height:44px}
@media(max-width:660px){
  .reader-foot{grid-template-columns:minmax(0,1fr) 112px 76px}
  .reader-foot.reader-finished,.reader-foot.reader-reviewing{grid-template-columns:minmax(0,1fr) 184px 76px}
  .reader-progress-word{display:none}
}

/* Book Library reading room: one layout family, measured controls and quiet metadata. */
.book-workspace{border:0;border-radius:0;background:transparent;max-width:1280px;margin-inline:auto;overflow:visible}
.book-browse{padding:12px 8px 48px}
.book-heading-title,.book-heading-actions{display:flex;align-items:center;gap:14px;min-width:0}.browse-heading{align-items:center;margin-bottom:28px;flex-wrap:wrap}.browse-heading h1{font-size:30px;font-weight:600;margin:0}.book-heading-title .meta{font-size:13px}.book-heading-actions{margin-left:auto}
.book-heading-actions .primary,.book-heading-actions .secondary,.book-detail-actions .primary{min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;border-radius:8px;font-size:14px;line-height:22px}
.browse-toolbar{grid-template-columns:minmax(160px,1fr) 160px 180px;gap:16px;border:0;padding:0 0 8px}.browse-toolbar input,.browse-toolbar select{border-radius:8px}.book-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:32px 24px}.book-cover{width:100%;aspect-ratio:3/4;padding:18px 16px;box-shadow:0 3px 9px #1d1d1f0c}.book-cover-title{font-size:16px;font-weight:500;line-height:1.45}.book-card-body{display:grid;grid-template-rows:40px 20px 3px 18px;gap:8px;width:100%}.book-card strong{font-weight:600}.book-card-meta{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.book-card-meta time{display:inline}.book-card-state{font-size:12px}.book-progress{height:3px}.book-empty{grid-column:1/-1;text-align:center;padding:64px 16px;color:var(--muted)}.book-empty h2{font-size:22px;color:var(--ink);font-weight:500;margin-bottom:10px}.book-empty p{margin-bottom:20px}.book-empty button{min-height:44px}
@container(max-width:1050px){.book-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@container(max-width:880px){.book-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@container(max-width:690px){.book-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container(max-width:460px){.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px}}
.book-import{width:min(560px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);overflow:auto;box-shadow:0 24px 90px #16291d30}.book-import::backdrop{background:#17221a66}.book-modal-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px}.book-modal-heading h2{font-size:22px;font-weight:600}.book-icon-close{display:grid;place-items:center;width:44px;height:44px;flex:none;padding:0;border:0;border-radius:50%;background:var(--shelf);color:var(--muted);font-size:25px}.book-import form{padding:0 24px 24px}.book-import #book-status{padding:0 24px 20px;margin:0;font-size:14px}.book-import #book-status:empty{display:none}.book-import-footer{display:grid;gap:20px}.book-import-actions{display:flex;justify-content:flex-end;gap:10px}.book-import-actions button{min-height:44px;border-radius:8px}.book-import .book-format-help{margin:0}.book-import.drop-active .book-file-choice{background:var(--selected);border-color:var(--accent)}
.book-detail .reading-area{max-width:1040px;padding:8px 8px 48px}.book-detail .back-link{margin-bottom:24px}.book-identity{display:grid;grid-template-columns:112px minmax(0,1fr);gap:28px;align-items:start}.book-identity-body{min-width:0}.book-identity .book-cover-title{font-size:13px;-webkit-line-clamp:4}.book-identity .book-cover{padding:14px 12px}.book-detail-header .book-title-heading{margin:0 0 10px}.book-detail-header h1{font-size:30px;font-weight:600;line-height:1.35}.book-identity-meta{font-size:13px;color:var(--muted);margin-bottom:22px}.book-detail-actions{gap:10px}.book-offline-actions{gap:10px}.book-detail-actions .primary{background:var(--accent);color:white}.book-detail-actions .secondary{border-radius:8px}.book-options{position:relative;margin:0;border:0;padding:0;flex:none}.book-options>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-size:14px;list-style:none;cursor:pointer}.book-options>summary::-webkit-details-marker{display:none}.book-options[open]>summary{background:var(--selected);border-color:var(--accent);color:var(--accent)}.book-options-panel{position:absolute;z-index:10;top:calc(100% + 8px);right:0;min-width:220px;max-width:min(320px,calc(100vw - 32px));padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--paper);box-shadow:0 12px 32px #1d1d1f20;color:var(--ink)}.book-options-panel>a,.book-options-panel>button{display:flex;align-items:center;min-height:44px;width:100%;border:0;border-radius:6px;padding:10px 12px;background:transparent;color:inherit;font-size:14px;text-align:left;text-decoration:none}.book-options-panel>a:hover,.book-options-panel>button:hover{background:var(--shelf)}.book-file-info{border-top:1px solid var(--line);margin-top:6px;padding:10px 12px;display:grid;gap:8px;overflow-wrap:anywhere;font-size:12px;color:var(--muted)}.book-rename-form{max-width:560px;margin:16px 0 20px}.book-summary-section{margin-top:36px;padding-top:28px}.book-summary-heading h2{font-size:22px;font-weight:600}.book-summary-actions{gap:10px}.book-summary-actions select{width:220px}.book-summary-actions button{border-radius:8px}
@media(max-width:660px){.book-browse{padding:0 0 32px}.browse-heading{gap:16px;margin-bottom:20px}.browse-heading h1{font-size:26px}.book-heading-title{gap:8px}.book-heading-actions{gap:8px}.book-heading-actions .secondary,.book-heading-actions .primary{padding:10px 12px;font-size:13px}.book-detail .reading-area{padding:0 0 32px}.book-identity{grid-template-columns:72px minmax(0,1fr);gap:16px}.book-identity .book-cover{padding:10px 8px}.book-identity .book-cover-title{font-size:10px}.book-detail-header h1{font-size:24px}.book-identity-meta{margin-bottom:16px}.book-detail-actions .primary{flex-basis:100%}.book-offline-actions{flex-wrap:wrap}.book-detail-actions .secondary{padding:10px 12px;font-size:13px}.book-import form{padding:0 20px 20px}.book-import .book-import-footer{display:grid}.book-import-actions .primary{width:auto}.book-import-actions{width:100%}.book-import-actions button{flex:1}}
.book-summary-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin:22px 0 24px;overflow:auto}.book-summary-tabs button{flex:none;min-height:44px;padding:10px 0;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-size:14px;border-radius:0}.book-summary-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent);font-weight:600}.book-summary-workspace{min-width:0}.book-summary-current{max-width:75ch}.book-summary-current>ul,.book-summary-current>ol{font-size:16px;line-height:1.85;padding-left:24px}.book-summary-empty{padding:28px 0 40px}.book-summary-empty h3{font-size:20px;font-weight:500;color:var(--ink);margin-bottom:10px}.book-summary-empty p{font-size:14px;color:var(--muted)}.book-view-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.book-view-heading h3{font-size:18px;font-weight:600}.book-scope{display:inline-flex;align-items:center;font-size:11px;line-height:1.4;font-weight:500;color:var(--muted);background:var(--shelf);border-radius:5px;padding:4px 7px;white-space:nowrap}.book-summary-workspace .hint{font-size:13px;line-height:1.6}.book-summary-workspace textarea{width:100%;min-width:0;max-width:100%;border-radius:8px;font-size:15px;line-height:1.65;padding:14px}.book-prompt-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.book-prompt-actions button{min-height:44px;border-radius:8px}.book-summary-workspace [role=status]{margin-top:12px;font-size:13px;color:var(--muted)}.book-summary-workspace [role=status]:empty{display:none}.book-history-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:28px;margin-top:20px}.book-history-list{display:flex;flex-direction:column;gap:8px}.book-history-list button{display:grid;gap:6px;width:100%;padding:14px;text-align:left;border:1px solid transparent;border-radius:8px;background:var(--shelf);color:var(--muted);font-size:12px;overflow-wrap:anywhere}.book-history-list button[aria-pressed=true]{border-color:var(--accent);background:var(--selected)}.book-version-title{display:flex;justify-content:space-between;gap:10px;font-size:14px;font-weight:600;color:var(--ink)}.book-version-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.book-version-meta{font-size:12px;color:var(--muted);margin-bottom:16px}#book-summary-version h4{font-size:16px;font-weight:600;margin:16px 0 12px}#book-summary-version li{padding:0 0 12px;line-height:1.75;overflow-wrap:anywhere}.book-history-prompt{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}.book-history-prompt>summary{min-height:44px;display:flex;align-items:center;font-size:14px;font-weight:500;cursor:pointer}.book-history-prompt pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:280px;overflow:auto;background:var(--shelf);padding:14px;border-radius:8px;font:inherit;font-size:13px;line-height:1.7}.book-summary-review{border-top:1px solid var(--line);padding-top:16px!important}.book-review{margin-top:16px}.book-review h4{margin:20px 0 10px}.book-review .hint{margin-bottom:16px}.book-review>button{min-height:44px}.book-summary-current .concept-list{gap:8px}.book-summary-current .hint{margin-top:16px}
@media(max-width:760px){.book-history-layout{grid-template-columns:minmax(0,1fr);gap:20px}.book-history-list{flex-direction:row;overflow:auto;padding-bottom:8px}.book-history-list button{width:210px;flex:none}.book-summary-tabs{gap:20px}.book-summary-heading{align-items:flex-start}.book-summary-actions{flex:1}.book-summary-actions select{width:100%}}
.reader-surface{position:relative}.reader-bar-tools{overflow:visible;max-width:calc(100% - 56px);flex:none;padding:0;gap:6px}.reader-more{position:static}.reader-more>summary{background:var(--reader-bg);border-color:var(--reader-line);color:var(--reader-ink);font-size:13px;padding:7px 11px}.reader-more[open]>summary{background:var(--reader-ink);color:var(--reader-bg);border-color:var(--reader-ink)}.reader-more .book-options-panel{top:calc(100% + 4px);right:16px;background:var(--reader-bg);border-color:var(--reader-line);color:var(--reader-ink)}.reader-more .book-options-panel button:hover,.reader-more .book-options-panel a:hover{background:var(--reader-chrome)}.reader-more .reader-import-info{margin:4px 6px;border-top:1px solid var(--reader-line)}.reader-more .reader-import-info>summary{display:flex;width:100%;height:auto;min-height:44px;padding:8px 6px;font-size:13px}.reader-more .reader-import-info .reader-import-note{position:static;width:auto;border:0;padding:6px;box-shadow:none;font-size:12px}.reader-settings{position:absolute;z-index:8;top:68px;right:16px;display:grid;grid-template-columns:minmax(0,1fr);gap:20px;width:min(360px,calc(100% - 32px));max-height:calc(100% - 140px);overflow:auto;padding:20px;border:1px solid var(--reader-line);border-radius:14px;background:var(--reader-bg);box-shadow:0 14px 40px #0002}.reader-settings-head{display:flex;justify-content:space-between;align-items:center;gap:14px}.reader-settings-head h3{font-size:17px;font-weight:600;line-height:1.4;letter-spacing:0}.reader-field{display:flex;align-items:center;justify-content:space-between;gap:14px}.reader-field input[type=range]{width:150px;padding:0}.reader-settings .reader-field:has(.reader-swatch){display:grid;justify-content:stretch;gap:12px}.reader-settings .reader-controls{gap:10px}.reader-contents-close{width:44px;height:44px;flex:none}.reader-bookmark-compact{font-size:0;width:44px;padding:0}.reader-bookmark-compact::before{content:"";width:17px;height:22px;display:block;background:currentColor;clip-path:polygon(0 0,100% 0,100% 100%,50% 75%,0 100%)}.reader-bookmark-compact:not([aria-pressed=true])::after{content:"+";position:absolute;font-size:14px;color:var(--reader-bg);font-weight:600;line-height:1}.reader-bookmark-compact{position:relative}.reader-swipe-hint{display:none!important}.reader-foot{gap:12px;padding-block:4px}.reader-foot .reader-save-status{font-size:11px}.reader-title{min-width:40px}.reader-bar{gap:10px}.reader-body:has(~.reader-foot){min-height:0}
@media(max-width:660px){.reader-bar{gap:6px;padding:8px}.reader-title{font-size:12px}.reader-button{padding:7px 8px;font-size:12px}.reader-bar-tools{gap:4px;max-width:calc(100% - 56px);flex:0 1 auto;overflow-x:auto;overflow-y:visible;scrollbar-width:none}.reader-more>summary{font-size:12px;padding:7px 8px}.reader-bookmark-compact{font-size:0;width:36px;flex-shrink:0}.reader-settings{top:64px;right:12px;width:calc(100% - 24px);max-height:calc(100% - 130px)}.reader-save-status{flex-basis:auto!important;max-width:100%;text-align:left!important}.reader-progress{font-size:11px}.reader-foot{gap:8px}.reader-field{font-size:13px}.reader-settings .reader-controls{gap:8px}}
.offline-workspace{max-width:1280px;padding:32px;container-type:inline-size}.offline-back{display:inline-flex;align-items:center;min-height:44px;text-decoration:none;margin-bottom:24px}.offline-heading{margin-bottom:24px;align-items:center}.offline-heading h1{font-weight:600;font-size:30px;margin:0}.offline-heading #offline-count{font-size:13px;color:var(--muted);margin-top:8px}.offline-sync-group{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.offline-sync-group [role=status]{font-size:13px;color:var(--muted)}.offline-sync-group button{min-height:44px;border-radius:8px}.offline-search{margin:0 0 8px;max-width:480px;font-size:13px;color:var(--muted)}.offline-search input{height:44px;border-radius:8px}.offline-card-actions{margin:8px 0 0;gap:8px;flex-wrap:nowrap}.offline-card-state{font-size:11px;color:var(--muted)}.offline-card-actions .book-options>summary{min-width:44px;width:44px;padding:0;border:0;background:transparent;font-size:22px}.offline-card .book-options-panel{min-width:190px}.offline-help{margin-top:48px;padding-top:20px;border-top:1px solid var(--line);color:var(--muted);font-size:13px}.offline-help summary{min-height:44px;cursor:pointer}.offline-help .hint{margin-top:12px;max-width:65ch}.offline-workspace #offline-status:empty{display:none}.offline-workspace #offline-status{font-size:14px;margin:16px 0}.offline-workspace .book-card-body{grid-template-rows:40px 20px 3px 18px}
@media(max-width:660px){.offline-workspace{padding:20px}.offline-heading h1{font-size:26px}.offline-sync-group{width:100%;justify-content:space-between}.offline-back{margin-bottom:16px}.offline-card-actions .book-options-panel{right:0}.offline-heading .book-heading-title{flex-wrap:wrap}}
@container(max-width:580px){.browse-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.browse-search{grid-column:1/-1}}
@media(max-width:660px){.browse-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.browse-search{grid-column:1/-1}}
@media(max-width:480px){.reader-bar{padding-inline:6px;gap:4px}.reader-bar-tools{max-width:calc(100% - 56px);gap:4px}.reader-bookmark-compact{width:44px}.reader-settings-toggle{min-width:44px}#reader-settings-toggle{min-width:44px}#reader-bookmarks-toggle{font-size:0;min-width:52px;padding:7px 8px;gap:5px}#reader-bookmarks-toggle::before{content:"";width:12px;height:17px;background:currentColor;clip-path:polygon(0 0,100% 0,100% 100%,50% 75%,0 100%)}#reader-bookmarks-toggle::after{content:attr(data-count);font-size:11px}.reader-more>summary{font-size:0;width:44px;padding:0}.reader-more>summary span{font-size:22px}}

#book-offline-download:disabled:not([aria-busy=true]){cursor:default}
/* Book concepts reuse the reading room's type, controls and restrained surfaces. */
.book-analysis-tabs{margin:28px 0 20px}.book-concepts-workspace{max-width:1100px}.book-concepts-workspace .book-summary-heading>label{min-width:220px}.concept-review-item{padding:24px 0;border-bottom:1px solid var(--border,#e6e7eb);display:grid;gap:12px}.concept-item-heading{display:flex;align-items:center;gap:16px}.concept-item-heading>input{font-size:1.1rem;font-weight:600;flex:1;min-width:0}.concept-select{display:flex;align-items:center;gap:10px;margin:0}.concept-select input{width:20px;height:20px;flex:none}.concept-review-item textarea{resize:vertical}.concept-review-item details{margin-top:4px}.concept-evidence{margin:12px 0;padding-left:16px;border-left:3px solid var(--border,#e6e7eb)}.concept-evidence p{white-space:pre-wrap}.concept-comparison-controls,.concept-comparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.concept-comparison{margin-top:24px}.concept-comparison article{min-width:0}.concept-comparison pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:.9rem}.concept-comparison section{margin:24px 0}.concept-comparison h5{font-size:1rem;margin:0 0 8px}.concept-compare-warning{grid-column:1/-1}.knowledge-edge{cursor:pointer}.knowledge-relations{display:grid;gap:12px}.knowledge-relations details{padding:12px 0;border-bottom:1px solid var(--border,#e6e7eb)}.knowledge-relations summary{font-weight:600}.knowledge-setup{margin-bottom:16px}
@media(max-width:700px){.concept-item-heading{align-items:stretch;flex-direction:column}.concept-comparison,.concept-comparison-controls{grid-template-columns:minmax(0,1fr)}.book-concepts-workspace .book-summary-heading{align-items:stretch;flex-direction:column}.book-concepts-workspace .book-summary-heading>label{min-width:0;width:100%}}
/* Live conversation map: current position first, stable outline, quiet evidence. */
.conversation-map{max-width:1440px;min-width:0}.conversation-map h1{margin-bottom:4px}.conversation-map h2{font-size:18px;margin:0 0 12px}.map-capture{display:grid;grid-template-columns:minmax(160px,1fr) minmax(180px,1fr);gap:12px 20px;align-items:end}.map-capture label,.map-saved-bar label,.map-node-editor label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:13px;color:var(--muted)}.map-capture input,.map-capture select,.map-saved-bar select,.map-node-editor input,.map-node-editor select{width:100%;min-height:44px;min-width:0;box-sizing:border-box}.map-capture-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap;align-items:center}.map-file-choice{position:relative;display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;cursor:pointer;overflow:hidden}.map-file-choice input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}.map-file-choice:focus-within{outline:2px solid var(--accent);outline-offset:3px}.map-saved-bar{display:flex;gap:8px;align-items:end;margin:24px 0}.map-saved-bar label{flex:1;max-width:500px}.map-current{border-left:3px solid var(--accent);background:var(--shelf);padding:20px 24px;margin:24px 0}.map-current-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.map-current-heading h2{margin:0}.map-path{font-size:20px;font-weight:600;line-height:1.5;overflow-wrap:anywhere;margin:12px 0}.map-columns{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);gap:40px;margin:32px 0}.map-tree{display:flex;flex-direction:column;gap:4px}.map-node{display:flex;min-width:0;padding-left:calc(var(--map-depth)*16px);align-items:stretch;border-radius:8px}.map-node.is-active{background:var(--selected)}.map-node.on-path .map-node-label>span:first-child{font-weight:600}.map-fold{flex:0 0 36px;min-height:44px;padding:0;border:0;background:transparent;font-size:20px;color:var(--muted)}.map-fold:disabled{opacity:.4}.map-node-label{min-width:0;flex:1;text-align:left;border:0;background:transparent;padding:8px 12px;display:flex;flex-direction:column;gap:4px;min-height:44px;color:var(--ink);overflow-wrap:anywhere}.map-node-label .meta{font-size:11px}.map-question{display:block;width:100%;text-align:left;min-height:44px;margin-bottom:8px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--white);overflow-wrap:anywhere}.map-node-editor{border-top:1px solid var(--line);padding:24px 0}.map-node-editor form{display:flex;gap:12px;flex-wrap:wrap;align-items:end}.map-node-editor label{flex:1 1 200px}.map-evidence{border-top:1px solid var(--line);padding:24px 0}.map-evidence audio{max-width:100%;width:100%;margin-top:12px}.map-quote{display:flex;flex-direction:column;gap:6px;text-align:left;border:0;border-bottom:1px solid var(--line);background:transparent;padding:16px 0;width:100%;line-height:1.6;overflow-wrap:anywhere;color:var(--ink)}.map-bottom-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.conversation-map button{min-height:44px}.conversation-map [data-map-feedback]:empty{display:none}.conversation-map [data-recording-status]{font-size:13px}.map-questions .empty{font-size:14px}.conversation-map select{white-space:nowrap;text-overflow:ellipsis}.conversation-map input:focus-visible,.conversation-map select:focus-visible,.conversation-map button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:900px){.map-columns{grid-template-columns:minmax(0,1fr);gap:24px}.map-capture{grid-template-columns:minmax(0,1fr)}.map-current{padding:16px}.map-path{font-size:18px}}@media(max-width:480px){.conversation-map.padded-workspace{padding:16px}.map-saved-bar{align-items:stretch;flex-direction:column}.map-capture-actions>*{flex:1 1 140px}.map-node{padding-left:calc(min(var(--map-depth),5)*10px)}.map-fold{flex-basis:28px}.map-current-heading .text-button{padding-left:0}.map-node-editor form>*{flex-basis:100%}}

.map-settings{margin:20px 0;max-width:900px}.map-settings summary,.map-usage summary{cursor:pointer;min-height:44px;display:list-item;align-content:center}.map-settings label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:var(--muted)}.map-settings textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:150px;font:inherit;line-height:1.6}.map-settings textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.map-settings .map-capture-actions{margin-top:12px}.map-usage{margin:24px 0;padding-top:20px;border-top:1px solid var(--line);overflow-wrap:anywhere}.map-usage li{margin-bottom:10px;font-size:13px;line-height:1.6}
/* Live conversation: transcript beside the visual workspace. */
.conversation-map.workspace{max-width:none;padding:16px;border:0;border-radius:0;background:var(--white);min-width:0}
.conversation-map h1{font-size:20px;line-height:1.3;letter-spacing:-.02em;margin:0;white-space:nowrap}
.conversation-map h2{font-size:14px;margin:0}.conversation-map h3{font-size:20px;line-height:1.4;margin:0 0 10px}
.map-workspace-toolbar{position:relative;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.map-workspace-toolbar>.map-capture-actions{margin-left:auto;gap:8px}
.map-workspace-toolbar button,.map-workspace-toolbar select{font-size:13px;padding:10px 14px;min-height:44px}.map-model-choice{margin:0;max-width:230px;min-width:150px}.map-model-choice select{width:100%;min-width:0}
.map-options,.map-usage{position:relative;margin:0;padding:0;border:0;font-size:13px}.map-options>summary,.map-usage>summary{min-height:44px;padding:12px 8px;box-sizing:border-box;cursor:pointer;white-space:nowrap}
.map-workspace-toolbar>.map-options,.map-workspace-toolbar>.map-usage{position:static}
.map-options-body{position:absolute;right:0;top:calc(100% + 8px);z-index:12;width:380px;max-width:calc(100vw - 48px);max-height:70vh;overflow:auto;box-sizing:border-box;padding:20px;background:var(--white);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 36px #21372b1a}
.map-options-body label{font-size:13px;display:flex;flex-direction:column;gap:6px;color:var(--muted)}.map-options-body input,.map-options-body select{min-width:0;width:100%;box-sizing:border-box;min-height:44px}.map-options-body .map-file-choice{width:auto;display:inline-flex;flex-direction:row;margin-top:12px}.map-options-body .map-saved-bar{margin:16px 0;flex-direction:row}.map-options-body .map-bottom-actions{margin-top:16px}.map-options-body .map-bottom-actions>*{font-size:12px}.map-settings{margin:16px 0}.map-options-body .hint,.map-options-body [role=status]{font-size:12px;line-height:1.6}
.map-session-status{display:flex;gap:8px 20px;flex-wrap:wrap;font-size:12px;line-height:1.5;color:var(--muted);min-height:22px;margin:8px 0 12px}.map-session-status p{margin:0!important}.map-session-status [data-map-feedback]:empty{display:none}
.map-live-workspace{display:grid;grid-template-columns:minmax(220px,25%) minmax(0,1fr);gap:0;min-height:500px;height:max(520px,calc(100dvh - 218px));border:1px solid var(--line);border-radius:12px;overflow:hidden}
.map-transcript-pane{min-width:0;min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--line);background:var(--white)}.map-transcript-pane>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 16px;border-bottom:1px solid var(--line);flex-shrink:0}
.map-live-transcript{overflow:auto;flex:1;min-height:120px;padding:4px 16px 20px;scrollbar-gutter:stable}.map-live-transcript:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.map-transcript-word{width:100%;min-height:44px!important;display:flex;flex-direction:column;gap:6px;padding:14px 0;text-align:left;border:0;border-bottom:1px solid var(--line);background:none;font-size:13px;line-height:1.7;color:var(--ink);overflow-wrap:anywhere}.map-transcript-word .meta{font-size:10px;color:var(--muted)}.map-transcript-word:last-child{border-bottom:0}.map-transcript-word:hover{color:var(--accent)}.map-transcript-pane .empty{font-size:13px;line-height:1.8}.map-transcript-pane>audio{max-width:100%;width:100%;flex-shrink:0;height:42px}.map-transcript-pane>[data-transcript-earlier]{flex-shrink:0;padding:8px 16px;text-align:left;border-top:1px solid var(--line)}
.map-topic-inspector{border-top:1px solid var(--line);flex-shrink:0;max-height:52%;overflow:auto}.map-topic-inspector>summary{padding:12px 16px;font-size:12px;min-height:44px;box-sizing:border-box;cursor:pointer}.map-topic-inspector summary span{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere;margin-top:5px}.map-topic-details{padding:0 16px 16px}.map-node-editor{padding:8px 0;border:0}.map-node-editor h2{margin-bottom:10px}.map-node-editor form{display:flex;flex-direction:column;gap:10px;align-items:stretch}.map-node-editor label{flex:none}.map-node-editor input,.map-node-editor select{font-size:12px;padding:9px;min-height:44px}.map-node-editor button{font-size:12px;padding:8px 10px}.map-evidence{padding:12px 0 0}.map-evidence .map-current-heading{gap:8px}.map-quote{font-size:12px;padding:12px 0}.map-quote .meta{font-size:10px}
.map-visual-pane{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--shelf)}.map-current{border:0;border-bottom:1px solid var(--line);padding:12px 20px;margin:0;background:var(--white);flex-shrink:0}.map-location-label{font-size:10px;font-weight:650;letter-spacing:.08em;color:var(--accent)}.map-current .map-current-heading{flex-wrap:nowrap}.map-current [data-pause-map]{font-size:11px;min-height:32px;padding:4px 0}.map-path{font-size:15px;line-height:1.5;margin:4px 0;font-weight:600;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.map-current [data-map-explanation]{font-size:12px;line-height:1.6;color:var(--muted);margin:4px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.map-current [data-map-progress]{font-size:10px;margin:4px 0 0}
.map-diagram-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:8px 14px;flex-shrink:0}.map-diagram-toolbar>div{display:flex;align-items:center;gap:6px}.map-diagram-toolbar button{padding:6px 12px;min-height:36px;font-size:12px;background:var(--white)}.map-diagram-toolbar [aria-pressed=true]{border-color:var(--accent);background:var(--selected);color:var(--accent)}.map-diagram-zoom button{width:44px;min-height:44px;padding:0;font-size:18px}.map-diagram-zoom span{font-size:10px;width:34px;text-align:center;color:var(--muted)}
.map-diagram-viewport{position:relative;flex:1;min-height:280px;overflow:hidden;cursor:grab;touch-action:pan-y pinch-zoom;background:radial-gradient(var(--line) .8px,transparent .8px);background-size:22px 22px}.map-diagram-viewport:active{cursor:grabbing}.map-diagram-viewport:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}.map-diagram-world{position:absolute;left:0;top:0;transform-origin:0 0}.map-diagram-lines{position:absolute;inset:0;pointer-events:none;overflow:visible}.map-diagram-lines path{fill:none;stroke:#b9c9c0;stroke-width:2}.map-diagram-lines .on-current-path{stroke:var(--accent);stroke-width:3}
.map-diagram-node{position:absolute;border:1px solid var(--line);border-radius:12px;background:var(--white);box-shadow:0 3px 10px #24382d06;box-sizing:border-box;cursor:default}.map-diagram-node.on-path{border-color:#80a38e;background:#f5faf7}.map-diagram-node.is-active{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 5px #26734d14,0 4px 16px #26734d18}.map-diagram-label{width:100%;height:100%;min-height:0!important;background:none;border:0;border-radius:inherit;padding:14px 20px;text-align:left;display:flex;flex-direction:column;justify-content:center;gap:7px;color:var(--ink)}.map-diagram-kind{font-size:10px;line-height:1.2;color:var(--muted);text-transform:capitalize}.map-diagram-title{font-size:15px;line-height:1.45;font-weight:600;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.is-active .map-diagram-label,.is-active .map-diagram-kind{color:white}.map-diagram-fold{position:absolute;right:-22px;top:34px;width:44px;height:44px;min-height:44px!important;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--white);font-size:20px;color:var(--accent)}.map-diagram-fold:disabled{visibility:hidden}
.map-diagram-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;color:var(--muted);pointer-events:none}.map-diagram-empty h3{color:var(--ink)}.map-diagram-empty p{font-size:13px;line-height:1.7;max-width:320px;margin:0}.map-empty-branches{font-family:monospace;font-size:36px;line-height:1.1;color:var(--accent);margin-bottom:24px;text-align:left}
.map-diagram-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 16px;border-top:1px solid var(--line);font-size:10px;color:var(--muted);flex-shrink:0}.map-diagram-footer>span{white-space:nowrap}.map-legend-path{color:var(--accent);margin-left:10px}.map-questions{position:relative;font-size:12px}.map-questions>summary{min-height:36px;align-content:center;cursor:pointer}.map-questions[open]>div{position:absolute;bottom:calc(100% + 8px);right:0;width:260px;max-width:calc(100vw - 48px);max-height:240px;overflow:auto;background:var(--white);border:1px solid var(--line);border-radius:10px;padding:12px;box-shadow:0 8px 24px #233b291a;z-index:5}.map-question{font-size:12px;margin:0 0 6px}
@media(max-width:1050px){.map-workspace-toolbar{gap:8px}.map-workspace-toolbar h1{flex:1}.map-model-choice{max-width:200px}.map-workspace-toolbar .map-options{margin-left:auto}.map-live-workspace{height:max(560px,calc(100dvh - 258px));grid-template-columns:minmax(200px,28%) minmax(0,1fr)}}
@media(max-width:700px){.conversation-map.workspace{padding:12px}.map-workspace-toolbar h1{font-size:18px}.map-workspace-toolbar>.map-capture-actions{margin-left:0}.map-workspace-toolbar .map-model-choice{max-width:none;flex:1}.map-live-workspace{grid-template-columns:1fr;grid-template-rows:minmax(420px,1fr) 220px;height:auto;min-height:660px}.map-visual-pane{grid-row:1}.map-transcript-pane{grid-row:2;border-right:0;border-top:1px solid var(--line)}.map-current{padding:12px 14px}.map-diagram-footer{gap:6px;padding:6px 10px}.map-diagram-footer>span{font-size:9px}.map-location-label{font-size:9px}.map-diagram-toolbar{padding:6px 10px}.map-diagram-toolbar button{min-height:44px;padding:6px 8px}.map-diagram-zoom button{width:36px}.map-options-body{position:fixed;top:160px;right:12px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 184px)}.map-topic-inspector[open]{max-height:70%}.map-live-transcript{min-height:72px}.map-diagram-empty h3{font-size:18px}}
body:has(#conversation-map-panel:not([hidden])) .workspace-bar{min-height:56px;padding-block:12px}
main:has(#conversation-map-panel:not([hidden])){padding:12px 16px 16px}
.map-live-workspace{height:var(--map-workspace-height,calc(100dvh - 190px));min-height:350px}.map-diagram-viewport{min-height:180px}
@media(max-width:700px){main:has(#conversation-map-panel:not([hidden])){padding:8px}.map-live-workspace{height:auto;min-height:660px}.map-diagram-viewport{min-height:220px}}
.map-current [data-map-explanation]{-webkit-line-clamp:1}.map-diagram-viewport{min-height:100px}
.map-current{padding:8px 16px}.map-current .map-path{min-width:0;flex:1;-webkit-line-clamp:1}.map-current [data-pause-map]{flex-shrink:0}.map-capture-actions:has([data-stop-recording]:not([hidden])) [data-start-recording]{display:none}
.map-current [data-map-progress]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-diagram-footer{padding-block:4px}
.map-current{display:flex;align-items:center;gap:12px}.map-position-details{position:relative;margin:0;padding:0;border:0;min-width:0;flex:1}.map-position-details>summary{display:flex;align-items:center;gap:8px;min-height:44px;width:100%;color:var(--ink)}.map-position-details>summary::before{content:'▸';color:var(--accent);font-size:12px}.map-position-details[open]>summary::before{content:'▾'}.map-position-details>div{position:absolute;left:0;top:calc(100% + 8px);z-index:5;background:var(--white);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #233b291a;padding:14px;width:100%;min-width:200px}.map-position-details[open] [data-map-explanation]{display:block}.map-position-details[open] [data-map-progress]{white-space:normal;overflow:visible}.map-current .map-path{margin:0}
@media(max-width:700px){.map-diagram-viewport{min-height:220px}}
.conversation-map .map-questions{margin:0;padding:0;border:0}.conversation-map .map-topic-inspector{margin:0;padding:0}

.map-interval-choice{margin:0;min-width:160px;max-width:190px}.map-interval-choice select{width:100%;min-width:0}

/* Book-scoped sphere, using shared Porcelain tokens. */

.book-graph-sphere{--sg-bg:var(--paper);--sg-soft:var(--shelf);--sg-ink:var(--ink);--sg-muted:var(--muted);--sg-green:var(--accent);--sg-dot:var(--accent);--sg-line:var(--line);--sg-selected:var(--selected);color:var(--ink);min-width:0;overflow-wrap:anywhere;}
.book-graph-sphere *{box-sizing:border-box}
.book-graph-sphere [hidden]{display:none!important}
.book-graph-sphere button,.book-graph-sphere input,.book-graph-sphere select,.book-graph-sphere textarea{font:inherit;color:inherit}
.book-graph-sphere button{cursor:inherit}
.book-graph-sphere .sg-header{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 24px;border-bottom:1px solid var(--sg-line);color:var(--sg-muted)}
.book-graph-sphere .sg-header strong{font-size:23px;color:var(--sg-ink);font-weight:600;letter-spacing:-1px}
.book-graph-sphere .sg-scope{margin-left:auto}
.book-graph-sphere .sg-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:20px 24px 12px}
.book-graph-sphere h2{margin:0;font-size:23px;font-weight:600}
.book-graph-sphere .sg-count{color:var(--sg-muted);font-size:13px}
.book-graph-sphere .sg-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:0 24px 20px}
.book-graph-sphere .sg-controls label{display:grid;gap:5px;color:var(--sg-muted);font-size:12px}
.book-graph-sphere .sg-speed{grid-template-columns:1fr auto;min-width:136px}
.book-graph-sphere .sg-speed input{grid-column:1/3;width:136px;min-height:40px;accent-color:var(--sg-green);margin:0}
.book-graph-sphere .sg-controls select{min-height:40px;max-width:100%;padding:7px 8px;border:1px solid var(--sg-line);border-radius:8px;background:var(--sg-bg);color:var(--sg-ink);font-size:14px}
.book-graph-sphere .sg-picker-label{flex:1;min-width:180px;max-width:255px}
.book-graph-sphere .sg-picker{width:100%}
.book-graph-sphere .sg-motion,.book-graph-sphere .sg-overview,.book-graph-sphere .sg-edit,.book-graph-sphere .sg-action{min-height:40px;padding:8px 12px;border:1px solid var(--sg-line);border-radius:8px;background:var(--sg-bg);color:var(--sg-ink)}
.book-graph-sphere .sg-workspace{display:grid;grid-template-columns:minmax(0,1fr) 320px;border-top:1px solid var(--sg-line)}
.book-graph-sphere .sg-map{min-width:0;padding:12px}
.book-graph-sphere .sg-graph{position:relative;min-width:0;height:740px;background:var(--sg-soft);touch-action:pan-y;overflow:hidden}
.book-graph-sphere .sg-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.book-graph-sphere .sg-envelope{stroke:var(--sg-line);fill:none;stroke-width:1;opacity:.65}
.book-graph-sphere .sg-edge{stroke:var(--sg-line);fill:none;stroke-width:1;opacity:.6}
.book-graph-sphere .sg-edge.sg-connected{stroke:var(--sg-green);stroke-width:1.6;opacity:.95}
.book-graph-sphere .sg-edge.sg-picked{stroke-width:2.6}
.book-graph-sphere .sg-edge-hit{stroke:transparent;stroke-width:24;fill:none;pointer-events:stroke}
.book-graph-sphere .sg-edge-label{fill:var(--sg-ink);font:12px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;paint-order:stroke;stroke:var(--sg-soft);stroke-width:5px;stroke-linejoin:round;pointer-events:all}
.book-graph-sphere .sg-source{stroke:var(--sg-line);stroke-width:1;stroke-dasharray:2 5;fill:none;opacity:.5}
.book-graph-sphere .sg-label-leader{stroke:var(--sg-line);stroke-width:1;fill:none;opacity:.7}
.book-graph-sphere .sg-node{position:absolute;transform:translate(-50%,-50%);width:32px;height:32px;border:0;border-radius:50%;background:transparent;display:flex;align-items:center;justify-content:center;padding:0;touch-action:none;cursor:grab;user-select:none;will-change:left,top}
.book-graph-sphere .sg-node::before{content:"";display:block;width:9px;height:9px;border-radius:50%;background:var(--sg-dot)}
.book-graph-sphere .sg-node.sg-core::before{width:15px;height:15px}
.book-graph-sphere .sg-node.sg-book::before{width:24px;height:24px;border:2px solid var(--sg-green);background:var(--sg-bg)}
.book-graph-sphere .sg-node.sg-related::before{background:var(--sg-green);box-shadow:0 0 0 3px var(--sg-selected)}
.book-graph-sphere .sg-node[aria-pressed=true]::before{width:18px;height:18px;background:var(--sg-green);box-shadow:0 0 0 5px var(--sg-selected)}
.book-graph-sphere .sg-node.sg-dragging{cursor:grabbing}
.book-graph-sphere .sg-node span{position:absolute;left:16px;top:16px;width:max-content;max-width:118px;padding:2px 5px;border-radius:4px;background:var(--sg-soft);color:var(--sg-ink);font-size:13px;line-height:1.45;text-align:left;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;pointer-events:auto;cursor:inherit}
.book-graph-sphere .sg-node[aria-pressed=true] span,.book-graph-sphere .sg-node.sg-related span{background:var(--sg-selected);font-weight:500}
.book-graph-sphere .sg-node:disabled span{pointer-events:none}
.book-graph-sphere .sg-legend{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--sg-muted);padding:12px 4px}
.book-graph-sphere .sg-detail{min-width:0;padding:24px;border-left:1px solid var(--sg-line)}
.book-graph-sphere .sg-detail h3{font-size:21px;line-height:1.45;margin:0 0 12px;font-weight:600}
.book-graph-sphere .sg-detail h4{font-size:13px;font-weight:500;color:var(--sg-muted);margin:20px 0 6px}
.book-graph-sphere .sg-detail p{margin:0 0 12px}
.book-graph-sphere .sg-detail .sg-copy{font-size:15px;line-height:1.8}
.book-graph-sphere .sg-kicker{font-size:12px;color:var(--sg-muted)}
.book-graph-sphere .sg-edit{color:var(--sg-green);margin:0 0 4px}
.book-graph-sphere .sg-detail details{padding:10px 0;border-top:1px solid var(--sg-line);margin:12px 0}
.book-graph-sphere .sg-detail summary{color:var(--sg-green)}
.book-graph-sphere .sg-related-info{border-bottom:1px solid var(--sg-line);padding:14px 0}
.book-graph-sphere .sg-related-info button,.book-graph-sphere .sg-core-link{border:0;background:transparent;text-align:left;padding:4px 0;color:var(--sg-green);min-height:32px;display:block}
.book-graph-sphere .sg-related-info .sg-relation-button{font-size:12px;color:var(--sg-muted);padding-top:0}
.book-graph-sphere .sg-related-info p{font-size:13px;line-height:1.7;margin:6px 0}
.book-graph-sphere .sg-related-info h4{margin:8px 0;color:var(--sg-ink)}
.book-graph-sphere .sg-overview-concept{display:block;width:100%;text-align:left;padding:10px 0;min-height:44px;border:0;border-bottom:1px solid var(--sg-line);color:var(--sg-green);background:transparent}
.book-graph-sphere .sg-field{display:block;font-size:13px;margin:14px 0;color:var(--sg-muted)}
.book-graph-sphere .sg-field input,.book-graph-sphere .sg-field textarea,.book-graph-sphere .sg-field select{display:block;width:100%;padding:10px;margin-top:6px;background:var(--sg-bg);color:var(--sg-ink);border:1px solid var(--sg-line);border-radius:8px;font-size:15px;resize:vertical}
.book-graph-sphere .sg-field textarea{min-height:100px;line-height:1.7}
.book-graph-sphere .sg-actions{display:flex;gap:8px;flex-wrap:wrap}
.book-graph-sphere .sg-save{background:var(--sg-green);color:light-dark(#fff,#132619);border:0}
.book-graph-sphere .sg-footer{padding:14px 24px;border-top:1px solid var(--sg-line);font-size:12px;color:var(--sg-muted)}
.book-graph-sphere .sg-narrow-names button{display:block;min-height:44px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--sg-line);background:transparent;padding:8px;color:var(--sg-ink)}
@media(max-width:800px){.book-graph-sphere .sg-workspace{grid-template-columns:1fr}.book-graph-sphere .sg-detail{border-left:0;border-top:1px solid var(--sg-line)}.book-graph-sphere .sg-graph{height:680px}}
@media(max-width:440px){.book-graph-sphere .sg-header,.book-graph-sphere .sg-heading,.book-graph-sphere .sg-detail{padding:16px}.book-graph-sphere .sg-controls{padding:0 16px 16px;gap:10px}.book-graph-sphere .sg-picker-label{max-width:none;min-width:100%;order:5}.book-graph-sphere .sg-graph{height:420px}.book-graph-sphere .sg-node{width:36px;height:36px}.book-graph-sphere .sg-node span{left:18px;top:18px}.book-graph-sphere .sg-controls select,.book-graph-sphere .sg-field input,.book-graph-sphere .sg-field textarea,.book-graph-sphere .sg-field select{font-size:16px}}
@media(pointer:coarse){.book-graph-sphere .sg-node{width:44px;height:44px}.book-graph-sphere button,.book-graph-sphere .sg-controls select{min-height:44px}.book-graph-sphere .sg-node span{left:22px;top:22px}}

.book-graph-sphere .sg-field input[type=checkbox]{width:18px;display:inline-block;margin:0 8px 0 0}.book-graph-sphere .sg-field select{max-width:100%}.book-graph-sphere .sg-detail .concept-select{margin:12px 0;font-size:13px}.book-graph-sphere .sg-review-hint{font-size:12px;color:var(--muted);margin:12px 0}.book-graph-sphere .sg-node[hidden]{display:none!important}

.book-graph-sphere .sg-detail{max-height:var(--sg-map-height,710px);overflow:auto}.book-graph-sphere .sg-detail textarea{overflow-wrap:anywhere}@media(max-width:800px){.book-graph-sphere .sg-detail{max-height:none;overflow:visible}}
/* Understanding maps keep text at reading size; scope and depth change locally. */
.map-diagram-toolbar[hidden]{display:none}.map-prompt-panel{padding:16px 0;border-bottom:1px solid var(--line);margin:0 0 12px}.map-prompt-panel>summary{cursor:pointer;color:var(--accent);min-height:44px;align-content:center}.map-prompt-panel form{max-width:960px;padding:12px 0}.map-prompt-panel textarea{width:100%;font-size:14px;line-height:1.6}.map-live-workspace{grid-template-columns:minmax(220px,25%) minmax(0,1fr)}
.understanding-map{overflow:auto;cursor:auto;touch-action:auto;background:var(--surface);min-width:0;font-size:14px;line-height:1.6;scrollbar-gutter:stable}.understanding-map:active{cursor:auto}.understanding-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;background:var(--white);border-bottom:1px solid var(--line)}.understanding-controls label{display:flex;align-items:center;gap:8px;margin:0;font-size:14px}.understanding-controls select{width:auto;min-height:44px;font-size:14px}.understanding-controls button{font-size:14px;min-height:44px}.map-segmented{display:flex;gap:4px}.map-segmented button{background:var(--white);border:1px solid var(--line);padding:8px 12px}.map-segmented [aria-pressed=true]{background:var(--selected);color:var(--accent);border-color:var(--accent)}
.understanding-tree{padding:20px;min-height:280px}.understanding-roots{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:24px;align-items:start}.understanding-node{position:relative;min-width:0;overflow-wrap:anywhere;background:var(--white)}.understanding-node.level-0{border:1px solid var(--line);border-radius:12px;padding:16px}.understanding-node.level-0:has(.understanding-children){border-top:3px solid var(--accent)}.understanding-node.is-focus,.understanding-node.is-selected{outline:2px solid var(--accent);outline-offset:2px}.understanding-node.is-current{background:var(--selected);border-radius:8px}.understanding-node-heading{display:flex;align-items:start;gap:8px}.understanding-node-heading>[data-node]{border:0;background:none;text-align:left;display:flex;flex-direction:column;gap:4px;padding:4px 0;color:var(--ink);flex:1;min-width:0}.map-node-meta{color:var(--muted);font-size:14px;font-weight:400}.map-node-title{font-size:17px;line-height:1.5;font-weight:600}.level-0>.understanding-node-heading .map-node-title{font-size:21px;color:var(--accent)}.map-node-edit{font-size:14px;min-height:44px;padding:4px 8px}.map-node-summary{margin:8px 0 12px;line-height:1.7;font-size:15px;color:var(--ink)}.understanding-children{border-left:2px solid #cfdbd4;margin:16px 0 8px 8px;padding-left:18px;display:flex;flex-direction:column;gap:16px}.understanding-children>.understanding-node:before{content:'';position:absolute;left:-20px;top:24px;width:16px;height:2px;background:#cfdbd4}.understanding-node .map-source,.understanding-node .map-expand{min-height:44px;font-size:14px;padding:4px 0}.map-source{color:var(--muted)}.understanding-node p{font-size:15px;margin:8px 0;line-height:1.7}.understanding-relations{border-top:1px solid var(--line);padding:16px 0;margin-top:24px}.understanding-relations h3{font-size:17px}.understanding-relations button{display:flex;flex-direction:column;align-items:start;gap:4px;text-align:left;border:0;border-left:3px solid var(--accent);background:var(--selected);padding:12px 16px;margin:8px 0;font-size:14px;min-height:44px;width:100%}.understanding-tree .map-diagram-empty{position:relative;min-height:320px}.map-workspace-toolbar button,.map-workspace-toolbar select,.map-session-status{font-size:14px}.map-current [data-map-explanation],.map-current [data-map-progress]{font-size:14px;display:block}.map-diagram-footer,.map-diagram-footer>span,.map-question{font-size:14px}
@media(max-width:1050px){.map-live-workspace{grid-template-columns:minmax(200px,25%) minmax(0,1fr)}.understanding-tree{padding:16px}.understanding-roots{gap:16px}}
@media(max-width:700px){.map-live-workspace{grid-template-columns:1fr;grid-template-rows:minmax(480px,1fr) 280px;height:auto}.map-diagram-footer>span{font-size:14px;white-space:normal}.understanding-tree{padding:12px}.understanding-controls{padding:12px;gap:8px}.understanding-children{padding-left:12px;margin-left:4px}.understanding-children>.understanding-node:before{left:-14px;width:10px}.understanding-node.level-0{padding:12px}}
@media(prefers-reduced-motion:reduce){.understanding-map *{scroll-behavior:auto;transition:none;animation:none}}
.map-prompt-panel:not([open]){display:none}.understanding-node.level-0:has(.understanding-children){border-top-width:1px}.understanding-node .map-source{margin-left:12px}
/* Full-input understanding shares the map and prompt controls with Live. */
.global-map.workspace{max-width:none;padding:24px;background:var(--white);min-width:0}.global-map h1{font-size:26px;margin:0 0 4px}.global-map h2{font-size:19px;margin:0}.global-map h3{font-size:17px}.global-map-heading{display:flex;align-items:start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}.global-entry{border-bottom:1px solid var(--line);padding:16px 0 24px;margin-bottom:16px}.global-entry form{max-width:1040px}.global-entry label{font-size:14px}.global-source-inputs{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.global-source-inputs>label:first-child{flex:1;min-width:min(360px,100%)}.global-entry input,.global-source-bar select,.global-history select{font-size:15px;min-height:44px}.global-source-bar{position:relative;display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding:12px 16px;background:var(--surface);border-radius:10px}.global-source-bar>label{margin:0;display:flex;align-items:center;gap:8px;font-size:14px}.global-source-bar select{width:230px;max-width:100%}.global-source-bar>span{flex:1;min-width:160px;overflow-wrap:anywhere;font-size:14px;color:var(--muted)}.global-progress{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 0}.global-progress>p:first-child{flex:1;min-width:220px}.global-progress p{margin:0;font-size:14px}.global-progress progress{width:180px;accent-color:var(--accent)}.global-progress>span{font-size:14px;color:var(--muted)}.global-progress [data-global-feedback]{flex-basis:100%}.global-map-content{display:flex;align-items:start;gap:20px}.global-visual{min-width:0;flex:1}.global-result-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}.global-result-heading label{display:flex;gap:8px;align-items:center;margin:0;font-size:14px}.global-result-heading select{min-height:44px;max-width:260px;font-size:14px}.global-map .understanding-map{border-radius:12px;border:1px solid var(--line);max-height:calc(100dvh - 220px);min-height:440px}.global-transcript{flex:0 0 25%;min-width:220px;max-height:calc(100dvh - 200px);overflow:auto;border-right:1px solid var(--line);padding-right:16px}.global-transcript audio{width:100%;margin:12px 0}.global-transcript .map-quote{font-size:14px}.global-history{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:16px 0}.global-history label{flex:1;max-width:700px}.global-history[hidden],.global-transcript[hidden]{display:none}.global-inspector{padding:16px 0;border-top:1px solid var(--line);margin-top:16px}.global-inspector summary{cursor:pointer;font-size:15px;min-height:44px;align-content:center}.global-inspector form{max-width:900px}.global-inspector input,.global-inspector textarea,.global-inspector select{font-size:15px;line-height:1.6}.global-map-footer{display:flex;gap:20px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line);padding:20px 0;margin-top:20px}.global-map-footer[hidden]{display:none}.global-map-footer form{display:flex;align-items:end;gap:12px;flex:1}.global-map-footer label{margin:0;flex:1;font-size:14px}.global-map-footer input{font-size:15px;min-height:44px}.global-source-bar details{position:static;font-size:14px}.global-source-bar summary{cursor:pointer;min-height:44px;align-content:center;color:var(--accent)}.global-usage-body{position:absolute;right:0;top:calc(100% + 8px);width:440px;max-width:100%;box-sizing:border-box;max-height:420px;overflow:auto;z-index:5;padding:16px;border:1px solid var(--line);background:var(--white);border-radius:12px;box-shadow:0 6px 24px #18332214}.global-map pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6;background:var(--surface);padding:12px;border-radius:8px}.global-map .map-prompt-panel section{margin:16px 0 24px}.global-map .map-prompt-panel form{max-width:1040px}.global-map .map-quote{font-size:14px;line-height:1.7}
@media(max-width:1050px){.global-map.workspace{padding:16px}.global-source-bar{gap:12px}.global-transcript{min-width:200px}.global-map-content{gap:12px}}
@media(max-width:700px){.global-map.workspace{padding:12px}.global-map-heading{gap:12px;margin-bottom:12px}.global-map h1{font-size:23px}.global-source-inputs{gap:8px}.global-source-inputs>label:first-child{flex-basis:100%;min-width:0}.global-source-bar>label{flex-wrap:wrap}.global-source-bar{padding:12px;gap:8px}.global-map-content{flex-direction:column}.global-visual{width:100%;order:0}.global-transcript{order:1;width:100%;min-width:0;max-height:360px;border-right:0;border-top:1px solid var(--line);padding:16px 0}.global-map .understanding-map{max-height:640px;min-height:480px}.global-progress>p:first-child{min-width:0;flex-basis:100%}.global-map-footer{gap:12px}.global-map-footer form{flex-basis:100%;flex-wrap:wrap}.global-usage-body{position:fixed;left:12px;right:12px;top:140px;width:auto;max-width:none}.global-result-heading label{max-width:100%;flex-wrap:wrap}}
.global-map [hidden]{display:none!important}
/* A central thesis can have several explanatory branches; keep that whole map spatial. */
.understanding-roots:has(>.understanding-node:only-child)>.understanding-node>.understanding-children{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:20px;border-left:0;margin:20px 0 0;padding:16px 0 0;border-top:2px solid #cfdbd4;align-items:start}
.understanding-roots:has(>.understanding-node:only-child)>.understanding-node>.understanding-children>.understanding-node{border:1px solid var(--line);border-radius:10px;padding:12px}
.understanding-roots:has(>.understanding-node:only-child)>.understanding-node>.understanding-children>.understanding-node:before{left:50%;top:-18px;width:2px;height:16px}
.understanding-controls [data-map-change]{flex-basis:100%;min-width:0;overflow-wrap:anywhere}.understanding-controls [data-map-change]:empty{display:none}
/* Book graph: directory → inspector → spatial view. Each pane owns its scrolling. */
.book-concepts-workspace{max-width:none;min-width:0;scroll-margin-top:100px}
.concept-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px;position:relative;z-index:2}
.concept-title{min-width:0}.concept-title h2{font-size:20px;line-height:1.4;margin:0}.concept-review-state{font-size:12px;color:var(--muted);margin:4px 0 0}
.concept-toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.concept-toolbar-actions>button,.concept-menu>summary{min-height:44px;padding:10px 14px;border-radius:8px;font-size:13px}
.concept-menu{position:relative;margin:0;border:0;padding:0}.concept-menu>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;border:1px solid var(--line);background:var(--paper);color:var(--ink)}.concept-menu>summary:after{content:'⌄';color:var(--muted)}.concept-menu>summary::-webkit-details-marker{display:none}.concept-menu[open]>summary{background:var(--selected);color:var(--accent)}
.concept-menu-panel{position:absolute;z-index:30;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 40px);padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--paper);box-shadow:0 8px 24px #1d1d1f16}.concept-menu-panel label{font-size:12px;color:var(--muted);display:grid;gap:6px}.concept-menu-panel select{width:100%;min-height:44px}.concept-menu-panel .node-actions{margin:12px 0}.concept-menu-panel .hint{font-size:12px;margin:12px 0;line-height:1.6}.concept-menu-panel .book-summary-tabs{gap:14px;margin:12px 0 0}.concept-menu-panel .book-summary-tabs button{font-size:12px}#concept-local-setup{padding:0 0 12px;margin:0 0 12px;border-bottom:1px solid var(--line)}
#concept-status{font-size:13px;margin:8px 0;color:var(--muted)}#concept-status:empty{display:none}.concept-return{min-height:44px;margin-bottom:12px}
.book-graph-sphere{container-type:inline-size;--sg-height:clamp(460px,calc(100dvh - 160px),1000px);--sg-bg:var(--paper);--sg-soft:var(--shelf)}
.book-graph-sphere .sg-workspace{grid-template-columns:var(--sg-directory-width,200px) var(--sg-detail-width,300px) var(--sg-map-width,minmax(0,1fr));height:var(--sg-height);border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--paper)}
.book-graph-sphere .sg-directory{min-width:0;overflow:auto;border-right:1px solid var(--line);padding:12px;background:var(--shelf);scrollbar-width:thin}
.book-graph-sphere .sg-directory-heading{position:sticky;top:-12px;background:var(--shelf);z-index:2;padding:12px 0 8px;margin-top:-12px}.sg-directory-heading h3{font-size:12px;color:var(--muted);font-weight:500;margin:0 8px 10px}.book-graph-sphere .sg-search{width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;font-size:13px}
.sg-directory-list{display:grid;gap:2px}.book-graph-sphere .sg-directory-node{display:block;width:100%;text-align:left;border:0;border-radius:6px;background:transparent;color:var(--ink);font-size:13px;line-height:1.5;padding:10px;min-height:44px;overflow-wrap:anywhere}.sg-directory-node:hover{background:var(--paper)}.book-graph-sphere .sg-directory-node[aria-current]{background:var(--selected);color:var(--accent);font-weight:600}.sg-directory-row{display:flex;align-items:center}.sg-directory-row>.sg-directory-node{flex:1;min-width:0}.book-graph-sphere .sg-directory-toggle{flex:none;width:28px;min-height:44px;border:0;background:transparent;color:var(--muted);padding:0;font-size:20px}.sg-directory-toggle[aria-expanded=true]{transform:rotate(90deg)}.sg-directory-children{padding-left:20px}.sg-directory-children .sg-directory-node{font-size:12px;min-height:40px}.sg-search-status{font-size:12px;color:var(--muted);padding:0 8px}
.book-graph-sphere .sg-detail{padding:24px;max-height:none;overflow:auto;min-height:0;border-left:0;border-right:1px solid var(--line);scrollbar-width:thin}.book-graph-sphere .sg-detail h3{font-size:20px}.book-graph-sphere .sg-detail .sg-copy{font-size:14px;line-height:1.8}.sg-detail .sg-related-info{padding:10px 0}.sg-detail .sg-related-info>p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.sg-detail .sg-kicker{font-size:11px;margin-bottom:8px}
.book-graph-sphere .sg-map{display:flex;flex-direction:column;padding:0;min-width:0;min-height:0;background:var(--paper);overflow:hidden}.sg-map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;flex-wrap:wrap;flex:none;border-bottom:1px solid var(--line)}.book-graph-sphere .sg-count{font-size:11px;white-space:nowrap}.sg-map-actions{display:flex;align-items:center;gap:4px}.book-graph-sphere .sg-motion,.book-graph-sphere .sg-overview,.sg-settings>summary{font-size:12px;min-height:40px;padding:8px 10px;border:0;background:transparent;white-space:nowrap}.sg-settings{position:relative;border:0;padding:0;margin:0}.sg-settings>summary{cursor:pointer;color:var(--muted);list-style:none;display:flex;align-items:center}.sg-settings>summary::-webkit-details-marker{display:none}.sg-settings[open]>summary{color:var(--accent);background:var(--selected);border-radius:6px}.book-graph-sphere .sg-controls{position:absolute;z-index:20;right:0;top:calc(100% + 4px);width:240px;padding:16px;display:grid;gap:16px;border:1px solid var(--line);border-radius:10px;background:var(--paper);box-shadow:0 8px 24px #1d1d1f16}.book-graph-sphere .sg-speed,.book-graph-sphere .sg-size{display:grid;grid-template-columns:1fr auto;font-size:12px;color:var(--muted)}.book-graph-sphere .sg-controls input[type=range]{grid-column:1/3;width:100%;min-height:40px;padding:0;margin:0;accent-color:var(--accent)}
.book-graph-sphere .sg-graph{height:auto;min-height:0;flex:1;background:var(--paper);isolation:isolate}.book-graph-sphere .sg-envelope>circle{fill:color-mix(in srgb,var(--accent) 9%,transparent);stroke:color-mix(in srgb,var(--accent) 28%,transparent);stroke-width:1.2}.book-graph-sphere .sg-envelope>ellipse{stroke:color-mix(in srgb,var(--accent) 14%,transparent)}
.book-graph-sphere .sg-node span{left:0;top:0;padding:0;background:transparent;border-radius:0;font-size:10px;line-height:1.4;max-width:132px;pointer-events:none;color:var(--ink);text-shadow:0 1px 2px var(--paper),0 -1px 2px var(--paper)}.book-graph-sphere .sg-node[aria-pressed=true] span,.book-graph-sphere .sg-node.sg-related span{background:transparent;font-size:13px;font-weight:600}.book-graph-sphere .sg-node:hover,.book-graph-sphere .sg-node:focus-visible{opacity:1!important}.book-graph-sphere .sg-node:hover span,.book-graph-sphere .sg-node:focus-visible span{font-size:13px;font-weight:600}.book-graph-sphere .sg-label-leader{display:none!important}
.book-graph-sphere .sg-legend{font-size:11px;padding:10px 16px;flex:none;border-top:1px solid var(--line)}.sg-pane-tabs{display:none}.book-graph-sphere [hidden]{display:none!important}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@container(max-width:1200px){.book-graph-sphere .sg-workspace{grid-template-columns:var(--sg-directory-width,180px) var(--sg-detail-width,270px) var(--sg-map-width,minmax(0,1fr))}.book-graph-sphere .sg-detail{padding:20px}.sg-map-toolbar{padding:8px 12px}}
@container(max-width:920px){.sg-pane-tabs{display:flex;gap:8px;margin-bottom:8px}.sg-pane-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;min-height:44px;padding:8px 16px;color:var(--muted)}.sg-pane-tabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}.book-graph-sphere .sg-workspace{grid-template-columns:1fr}.book-graph-sphere[data-pane=map] .sg-directory,.book-graph-sphere[data-pane=map] .sg-inspector,.book-graph-sphere[data-pane=directory] .sg-inspector,.book-graph-sphere[data-pane=directory] .sg-map,.book-graph-sphere[data-pane=detail] .sg-directory,.book-graph-sphere[data-pane=detail] .sg-map{display:none}.book-graph-sphere .sg-directory,.book-graph-sphere .sg-detail{border:0}.book-graph-sphere .sg-detail{padding:24px;max-height:none;overflow:auto}.book-graph-sphere .sg-directory{padding:16px}.book-graph-sphere .sg-directory-heading{top:-16px;margin-top:-16px;padding-top:16px}}
@media(max-width:660px){.concept-toolbar{align-items:start;flex-direction:column;gap:12px}.concept-toolbar-actions{width:100%;gap:6px}.concept-toolbar-actions>button,.concept-menu>summary{font-size:12px;padding:8px 10px}.concept-add-menu .concept-menu-panel{left:0;right:auto}.concept-generation .concept-menu-panel{right:0}.book-concepts-workspace{scroll-margin-top:90px}.book-graph-sphere{--sg-height:clamp(420px,calc(100dvh - 240px),800px)}.book-graph-sphere .sg-node span{font-size:9px}.book-graph-sphere .sg-map-toolbar{gap:0}.book-graph-sphere .sg-map-actions{margin-left:auto}.sg-directory-search input,.book-graph-sphere .sg-search{font-size:16px}}
@media(pointer:coarse){.book-graph-sphere .sg-directory-toggle{width:44px}.book-graph-sphere .sg-directory-node,.book-graph-sphere .sg-motion,.book-graph-sphere .sg-overview,.sg-settings>summary{min-height:44px}}
.sg-directory-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.sg-directory-title h3{margin:0 8px}.sg-create-menu{position:relative;margin:0;padding:0;border:0}.sg-create-menu>summary{display:flex;align-items:center;justify-content:center;min-height:40px;width:40px;list-style:none;font-size:20px;cursor:pointer;color:var(--accent)}.sg-create-menu>summary::-webkit-details-marker{display:none}.sg-create-menu>div{position:absolute;z-index:25;right:0;top:100%;width:160px;padding:4px;background:var(--paper);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 20px #1d1d1f16}.sg-create-menu button,.sg-removed button{display:block;width:100%;text-align:left;min-height:44px;border:0;background:transparent;color:var(--ink);padding:8px 12px;font-size:13px}.sg-create-menu button:hover{background:var(--shelf)}.sg-removed{font-size:12px;border-top:1px solid var(--line);margin:16px 0;padding:12px 0}.sg-removed summary{min-height:40px;color:var(--muted)}.sg-removed button{color:var(--muted);font-size:12px}.sg-context-actions{display:flex;gap:12px;margin:8px 0 16px}.sg-context-actions .text-button{font-size:12px;min-height:40px;color:var(--muted)}
.sg-create-dialog,.concept-sync-review{width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);box-shadow:0 20px 80px #1d1d1f30}.sg-create-dialog::backdrop,.concept-sync-review::backdrop{background:#172b2245}.sg-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.sg-dialog-heading h3{margin:0;font-size:20px}.sg-dialog-heading button{min-height:44px;min-width:44px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:24px}.sg-create-form label{display:grid;gap:6px;margin:14px 0;font-size:13px}.sg-create-form input,.sg-create-form textarea,.sg-create-form select{width:100%;font-size:16px;border-radius:8px;padding:10px;min-height:44px;background:var(--paper);color:var(--ink);border:1px solid var(--line)}.sg-create-form textarea{resize:vertical;line-height:1.65}.sg-dialog-actions{display:flex;justify-content:end;gap:8px;flex-wrap:wrap;margin-top:24px}.sg-dialog-actions button{min-height:44px;border-radius:8px}.sg-form-status,.concept-sync-status{font-size:13px;color:var(--accent)}.concept-sync-review .hint,.sg-create-dialog .hint{font-size:12px;line-height:1.65;color:var(--muted)}.concept-sync-review section{border-top:1px solid var(--line);margin-top:20px;padding-top:12px}.concept-sync-review h4{font-size:14px;margin:8px 0}.concept-sync-review details{padding:8px 0}.concept-sync-review summary{min-height:32px;cursor:pointer;font-size:13px}.concept-sync-review ul{margin:8px 0;padding-left:22px}.concept-sync-review li{padding:8px 0;font-size:14px;overflow-wrap:anywhere}.concept-sync-review li .hint{margin:4px 0}.concept-delta-field{border-left:2px solid var(--line);padding-left:12px;margin:12px 0}.concept-delta-field h5{margin:8px 0;font-size:13px}.concept-delta-field p{font-size:13px;white-space:pre-wrap;line-height:1.65}.concept-delta-field span{color:var(--muted)}.book-graph-sphere .sg-direction-label{display:flex;align-items:center;gap:8px}.sg-direction-label input[type=checkbox]{width:18px;height:18px;margin:0}
.sg-labels{position:absolute;inset:0;z-index:1;pointer-events:none}.sg-nodes{position:absolute;inset:0;z-index:2;pointer-events:none}.sg-node-label{position:absolute;display:block;padding:0;background:transparent;font-size:10px;line-height:1.4;color:var(--muted);max-width:132px;pointer-events:none;text-shadow:0 1px 2px var(--paper),0 -1px 2px var(--paper)}.sg-node-label.sg-emphasized{font-size:13px;font-weight:600;color:var(--ink)}.sg-node-label:not(.sg-emphasized){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-node-label.sg-emphasized{display:block}.book-graph-sphere .sg-lines{z-index:0}.book-graph-sphere .sg-node{pointer-events:auto}.book-graph-sphere .sg-edge-label{pointer-events:none}.sg-direction-label{font-size:12px}
@media(max-width:660px){.sg-node-label{font-size:9px}.sg-node-label.sg-emphasized{font-size:12px}}


.book-graph-sphere:has(.sg-label-mode option[value=all]:checked) .sg-node-label:not(.sg-emphasized){font-size:9px;line-height:1.35}

/* Independent pane rails preserve reversible focus and use the freed space. */
.sg-inspector{min-width:0;min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--line);overflow:hidden}.sg-inspector .sg-detail{flex:1;border-right:0}.sg-pane-heading{display:flex;align-items:center;justify-content:space-between;flex:none;padding:4px 12px 4px 20px;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}.book-graph-sphere .sg-pane-collapse{border:0;background:transparent;min-height:40px;width:32px;flex:none;padding:0;font-size:22px;color:var(--muted);border-radius:6px}.sg-pane-collapse:hover{background:var(--selected);color:var(--accent)}.sg-pane-restore{display:none;border:0;background:transparent;color:var(--accent);width:44px;min-height:100%;padding:10px 8px;align-items:center;gap:12px;flex-direction:column}.sg-pane-restore>span:last-child{writing-mode:vertical-rl;font-size:12px;letter-spacing:3px}.sg-pane-restore>span:first-child{font-size:22px}.book-graph-sphere .sg-directory-title{gap:0}.sg-directory-title h3{margin-right:auto}.sg-directory{position:relative}.sg-pane-restore:focus-visible{outline-offset:-4px}
.book-graph-sphere[data-collapse-directory=true]{--sg-directory-width:44px}.book-graph-sphere[data-collapse-detail=true]{--sg-detail-width:44px}.book-graph-sphere[data-collapse-map=true]{--sg-map-width:44px}.book-graph-sphere[data-collapse-map=true]:not([data-collapse-detail=true]){--sg-detail-width:minmax(270px,1fr)}
.book-graph-sphere[data-collapse-directory=true] .sg-directory{padding:0;overflow:hidden}.book-graph-sphere[data-collapse-directory=true] .sg-directory>:not(.sg-pane-restore),.book-graph-sphere[data-collapse-detail=true] .sg-inspector>:not(.sg-pane-restore),.book-graph-sphere[data-collapse-map=true] .sg-map>:not(.sg-pane-restore){display:none}
.book-graph-sphere[data-collapse-directory=true] .sg-directory>.sg-pane-restore,.book-graph-sphere[data-collapse-detail=true] .sg-inspector>.sg-pane-restore,.book-graph-sphere[data-collapse-map=true] .sg-map>.sg-pane-restore{display:flex}
@container(max-width:920px){.book-graph-sphere .sg-workspace{grid-template-columns:1fr}.sg-pane-restore{width:100%;min-height:44px;justify-content:center;flex-direction:row}.sg-pane-restore>span:last-child{writing-mode:horizontal-tb;letter-spacing:0}.book-graph-sphere[data-collapse-directory=true] .sg-directory>.sg-pane-restore,.book-graph-sphere[data-collapse-detail=true] .sg-inspector>.sg-pane-restore,.book-graph-sphere[data-collapse-map=true] .sg-map>.sg-pane-restore{min-height:100%;width:100%}}
@media(pointer:coarse){.book-graph-sphere .sg-pane-collapse{width:44px;min-height:44px}}
@container(max-width:920px){.book-graph-sphere .sg-workspace{height:min(var(--sg-height),max(420px,100cqw))}.book-graph-sphere[data-pane=directory][data-collapse-directory=true] .sg-workspace,.book-graph-sphere[data-pane=detail][data-collapse-detail=true] .sg-workspace,.book-graph-sphere[data-pane=map][data-collapse-map=true] .sg-workspace{height:44px}}

/* Fullscreen preserves the editable book workspace, its dialogs and pane rails. */
.concept-fullscreen-status{font-size:12px;color:var(--muted);margin:0 0 8px}.concept-fullscreen-status:empty{display:none}
.book-concepts-workspace.concept-is-fullscreen{position:fixed;inset:0;z-index:100;width:100%;height:100dvh;max-width:none;box-sizing:border-box;background:var(--paper);padding:16px;display:flex;flex-direction:column;overflow:auto}
.concept-is-fullscreen>.concept-toolbar{flex:none}.concept-is-fullscreen>#concept-current-panel{flex:1;min-height:0;display:flex;flex-direction:column}.concept-is-fullscreen>#concept-current-panel[hidden]{display:none}
.concept-is-fullscreen #concept-draft,.concept-is-fullscreen .book-graph-sphere{flex:1;min-height:0;display:flex;flex-direction:column}.concept-is-fullscreen .book-graph-sphere .sg-workspace{height:auto;flex:1;min-height:0}
.concept-is-fullscreen>#concept-prompt-panel,.concept-is-fullscreen>#concept-history-panel{overflow:auto;min-height:0}
@media(max-width:600px){.book-concepts-workspace.concept-is-fullscreen{padding:8px}.concept-is-fullscreen .concept-toolbar{gap:8px;flex-wrap:wrap}.concept-is-fullscreen .concept-toolbar-actions{gap:4px}.concept-is-fullscreen .concept-toolbar-actions>button,.concept-is-fullscreen .concept-menu>summary{padding:8px;font-size:12px}}

.sg-layout-mode{border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);min-height:40px;font-size:12px;padding:6px;max-width:90px}.sg-zoom-controls{display:flex;gap:0}.sg-zoom-controls button{min-width:36px;min-height:40px;padding:4px;border:0;background:transparent;color:var(--ink);font-size:20px}.book-graph-sphere[data-layout=plane] .sg-source{stroke-opacity:.35}.book-graph-sphere[data-layout=plane] .sg-graph{cursor:grab}.book-graph-sphere[data-layout=plane] .sg-node{cursor:grab}.book-graph-sphere[data-layout=plane] .sg-node:active{cursor:grabbing}

.book-graph-sphere .sg-map-actions{flex-wrap:wrap;max-width:100%;justify-content:flex-end}.book-graph-sphere .sg-graph{touch-action:none}
@container(max-width:400px){.book-graph-sphere .sg-count{white-space:normal}.book-graph-sphere .sg-map-toolbar{gap:6px}.book-graph-sphere .sg-map-actions{width:100%}.sg-settings{margin-left:auto}.book-graph-sphere .sg-controls{width:min(240px,calc(100cqw - 40px))}}

/* Real fullscreen: iPad's browser exit owns the left toolbar slot. */
.reader-surface.reader-native-fullscreen{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;box-sizing:border-box}
.reader-system-fullscreen-exit .reader-bar{padding-left:92px}
.reader-fullscreen-status{font-size:12px;color:var(--reader-soft);white-space:normal;overflow-wrap:anywhere;line-height:18px}
.reader-expand{width:44px;min-width:44px;padding:0}
.reader-expand svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.reader-expand-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.reader-expand .reader-expand-restore{display:none}
.reader-expand[aria-pressed=true] .reader-expand-open{display:none}
.reader-expand[aria-pressed=true] .reader-expand-restore{display:block}
.reader.reader-expanded .reader-expand[aria-pressed=true]{background:var(--reader-bg);border-color:var(--reader-line);color:var(--reader-ink)}
@media(max-width:660px){.reader-more .book-options-panel{position:absolute;top:calc(100% + 4px);right:8px;max-width:calc(100% - 16px)}}

@media(max-width:360px){.reader .reader-foot{grid-template-columns:minmax(0,1fr) 96px 60px}}
@media(max-width:360px){.reader .reader-foot.reader-finished{grid-template-columns:minmax(0,1fr) 156px 60px}}

/* Analytics uses the existing Porcelain controls and keeps wide data inside its own scroll region. */
#analytics-panel{min-width:0}#analytics-panel .workspace-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.analytics-controls{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:24px 0 16px}.analytics-controls label{display:grid;gap:4px;font-size:13px;color:var(--muted)}.analytics-controls select{height:44px;max-width:230px;min-width:130px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:8px 12px;font:inherit}.analytics-overview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px;padding:24px 0;border-bottom:1px solid var(--line);margin:0}.analytics-overview dt{color:var(--muted);font-size:13px}.analytics-overview dd{margin:4px 0 0;font-size:28px;line-height:1.2;font-variant-numeric:tabular-nums}.analytics-tabs{display:flex;gap:8px;margin:24px 0 16px}.analytics-tabs button{min-height:44px;padding:8px 20px;border:0;border-radius:8px;background:transparent;color:var(--muted)}.analytics-tabs button[aria-pressed=true]{background:var(--selected);color:var(--accent)}.analytics-table{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border-bottom:1px solid var(--line)}.analytics-table table{border-collapse:collapse;width:100%;min-width:660px;font-size:14px;text-align:left}.analytics-table th,.analytics-table td{padding:16px 12px;border-top:1px solid var(--line);vertical-align:top}.analytics-table thead th{font-size:12px;font-weight:500;color:var(--muted);white-space:nowrap}.analytics-table tbody th{min-width:175px;font-weight:400}.analytics-table small{display:block;color:var(--muted);font-size:12px;overflow-wrap:anywhere}.analytics-table .text-button{min-height:44px;text-align:left;padding:0}.analytics-detail{margin-top:32px;min-width:0}.analytics-detail h3{font-size:20px;margin:24px 0 12px}.analytics-stages{display:flex;flex-wrap:wrap;gap:24px;margin:20px 0}.analytics-stages dt{color:var(--muted);font-size:12px}.analytics-stages dd{margin:4px 0;font-size:18px}.analytics-definitions{margin-top:32px;color:var(--muted);font-size:13px}.analytics-definitions summary{min-height:44px;cursor:pointer}.analytics-definitions p{max-width:76ch;margin:12px 0}.analytics-table:focus-visible{outline:3px solid #4d875c;outline-offset:-3px}@media(max-width:760px){.analytics-overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 12px}.analytics-overview dd{font-size:24px}.analytics-controls label{flex:1;min-width:110px}.analytics-controls select{width:100%;min-width:0}.analytics-tabs button{flex:1;padding:8px}.analytics-table table{min-width:680px}.analytics-detail h2{font-size:24px}}@media(max-width:380px){.analytics-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Book review: fixed rails, movable pane boundaries, stable graph geometry. */
.book-graph-sphere .sg-workspace{justify-content:start;grid-template-rows:minmax(0,1fr);gap:0;border-radius:12px;overflow:hidden}
.book-graph-sphere .sg-directory,.book-graph-sphere .sg-map,.book-graph-sphere .sg-inspector{position:relative;padding-left:32px;min-height:0;overflow:hidden;border-right:0}
.book-graph-sphere .sg-pane-collapse,.book-graph-sphere .sg-pane-restore{position:absolute;inset:0 auto 0 0;width:32px;min-width:32px;height:100%;border:0;border-right:1px solid var(--line);border-radius:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;padding:0;background:var(--surface);font-size:18px;color:var(--muted);z-index:4}
.book-graph-sphere .sg-pane-restore{display:none}.book-graph-sphere .sg-rail-title{writing-mode:vertical-rl;font-size:11px;letter-spacing:3px}.book-graph-sphere .sg-pane-collapse:hover,.book-graph-sphere .sg-pane-restore:hover{background:var(--selected);color:var(--accent)}
.book-graph-sphere[data-collapse-directory=true] .sg-directory,.book-graph-sphere[data-collapse-detail=true] .sg-inspector,.book-graph-sphere[data-collapse-map=true] .sg-map{padding:0}.book-graph-sphere[data-collapse-directory=true] .sg-directory>.sg-pane-restore,.book-graph-sphere[data-collapse-detail=true] .sg-inspector>.sg-pane-restore,.book-graph-sphere[data-collapse-map=true] .sg-map>.sg-pane-restore{display:flex;width:32px;min-height:100%}
.sg-splitter{position:relative;touch-action:none;cursor:col-resize;background:var(--surface);border-inline:1px solid var(--line)}.sg-splitter:after{content:'';position:absolute;left:2px;top:calc(50% - 16px);width:2px;height:32px;border-radius:2px;background:#c6d0ca}.sg-splitter:hover,.sg-splitter:focus-visible{background:var(--selected)}
.sg-pane-reorder{border:0;background:transparent;color:var(--muted);min-width:28px;min-height:40px;padding:0;cursor:grab;opacity:.4;font-size:16px}.sg-pane-reorder:hover,.sg-pane-reorder:focus-visible{opacity:1}.book-graph-sphere .sg-map-title{font-size:13px;font-weight:600}.book-graph-sphere .sg-count{font-size:12px;margin-right:auto;white-space:normal}.book-graph-sphere .sg-map-toolbar,.book-graph-sphere .sg-pane-heading,.book-graph-sphere .sg-directory-title{min-height:60px;margin:0;gap:8px;padding:8px 16px;border-bottom:1px solid var(--line);justify-content:flex-start}.book-graph-sphere .sg-directory-heading{padding:0}.book-graph-sphere .sg-directory-heading>label{display:block;padding:12px}.book-graph-sphere .sg-map-toolbar{flex-wrap:wrap}.book-graph-sphere .sg-pane-heading{font-size:13px}.book-graph-sphere .sg-map-actions{margin-left:auto}.book-graph-sphere .sg-graph{user-select:none;background:var(--paper);flex:1;min-height:0;margin:0}.book-graph-sphere .sg-map{display:flex;flex-direction:column}
.book-graph-sphere .sg-node::before,.book-graph-sphere .sg-node.sg-core::before,.book-graph-sphere .sg-node.sg-related::before,.book-graph-sphere .sg-node[aria-pressed=true]::before{flex:none;width:calc(var(--sg-diameter,9px)*var(--sg-node-scale,1));height:calc(var(--sg-diameter,9px)*var(--sg-node-scale,1));border-radius:50%;background:var(--sg-dot-color,var(--accent))}.book-graph-sphere .sg-node.sg-related::before{box-shadow:0 0 0 3px var(--paper),0 0 0 4px var(--sg-ring-color)}.book-graph-sphere .sg-node[aria-pressed=true]::before{box-shadow:0 0 0 5px var(--selected),0 0 0 6px var(--sg-ring-color)}.book-graph-sphere .sg-node.sg-book::before{background:var(--paper)}.sg-node-label{max-width:none;text-shadow:none;overflow:visible!important;white-space:nowrap}.book-graph-sphere .sg-edge{stroke:#668779;stroke-width:.9}.book-graph-sphere .sg-edge.sg-connected{stroke:#668779;stroke-width:1.1}
.book-graph-sphere .sg-emphasis,.book-graph-sphere .sg-edge-thickness,.book-graph-sphere .sg-edge-transparency{display:grid;grid-template-columns:1fr auto;font-size:12px;color:var(--muted)}.book-graph-sphere .sg-emphasis input{grid-column:1/3;width:100%;accent-color:var(--accent);min-height:44px;margin:0}.book-graph-sphere .sg-emphasis-reset{font-size:12px;min-height:40px;border:1px solid var(--line);border-radius:6px;background:var(--paper);padding:8px}.sg-controls{max-height:70dvh;overflow:auto}
.book-graph-sphere .sg-detail-actions{display:flex;align-items:center;gap:8px;margin:16px 0 24px;padding-bottom:20px;border-bottom:1px solid var(--line)}.sg-detail-actions>button{font-size:12px;min-height:40px;border:1px solid var(--line);border-radius:8px;background:var(--paper);padding:8px 12px;color:var(--ink);cursor:pointer}.sg-content-editor:not([open]){display:none}.concept-review-state{margin:0!important}.concept-toolbar .concept-title{display:flex;flex-direction:column;gap:4px}.concept-review-state:empty{display:none}
@container(max-width:920px){.book-graph-sphere .sg-workspace{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)}.book-graph-sphere .sg-workspace>section,.book-graph-sphere .sg-workspace>nav{grid-column:1!important;grid-row:1!important}.book-graph-sphere .sg-splitter{display:none}.book-graph-sphere[data-pane=map] .sg-map,.book-graph-sphere[data-pane=directory] .sg-directory,.book-graph-sphere[data-pane=detail] .sg-inspector{padding-left:32px}.book-graph-sphere .sg-count{display:none}.book-graph-sphere .sg-map-toolbar{padding:8px}.book-graph-sphere .sg-map-actions{gap:4px}}
.sg-figures{margin:24px 0}.sg-figures figure{margin:12px 0}.sg-figures figure button{display:block;width:100%;border:1px solid var(--line);border-radius:8px;background:var(--paper);padding:8px;cursor:zoom-in}.sg-figures img{width:100%;height:auto;max-height:280px;object-fit:contain}.sg-figures figcaption{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.5}.sg-figure-dialog{max-width:90vw;max-height:90dvh;border:1px solid var(--line);border-radius:12px;padding:20px;background:var(--paper);color:var(--ink)}.sg-figure-dialog::backdrop{background:#15261e66}.sg-figure-dialog img{display:block;max-width:80vw;max-height:75dvh;width:auto;height:auto;object-fit:contain}.sg-figure-dialog button{display:block;margin-left:auto;min-width:44px;min-height:44px;border:0;background:transparent;font-size:24px;cursor:pointer}.sg-figure-dialog p{font-size:13px}

/* Concept reading: keep the title and its actions together, with room to wrap. */
.book-graph-sphere .sg-detail{padding:16px;font-size:15px;line-height:1.65;overflow-wrap:anywhere}
.book-graph-sphere .sg-detail .sg-kicker{margin:0 0 4px}
.book-graph-sphere .sg-detail h4{margin:16px 0 4px}
.book-graph-sphere .sg-detail .sg-copy{font-size:15px;line-height:1.65;margin:0}
.book-graph-sphere .sg-detail-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-bottom:16px}
.book-graph-sphere .sg-detail-heading>h3{flex:1 1 180px;min-width:0;margin:0;overflow-wrap:anywhere}
.book-graph-sphere .sg-detail .sg-detail-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:100%;margin:0;padding:0;border:0}
.book-graph-sphere .sg-detail-heading>.sg-detail-actions{flex:0 1 auto}
.book-graph-sphere .sg-detail>.sg-detail-actions{margin:16px 0}
.book-graph-sphere .sg-detail .sg-detail-actions>button{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;white-space:nowrap;padding:8px 12px;color:var(--ink)}
.book-graph-sphere .sg-detail .sg-detail-actions>.sg-detail-delete{flex:none;width:44px;height:44px;margin-left:auto;padding:0;color:#a23e3e}
.book-graph-sphere .sg-detail-delete svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.book-graph-sphere .sg-detail .sg-content-editor>.sg-editor-include{display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;gap:8px;width:max-content;max-width:100%;min-height:44px;margin:0;font-size:13px;color:var(--ink);cursor:pointer}
.book-graph-sphere .sg-detail .sg-editor-include input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--accent)}
.book-graph-sphere .sg-detail .sg-editor-include span{white-space:nowrap}
.book-graph-sphere .sg-detail>details>summary,.book-graph-sphere .sg-detail .sg-related-info button{min-height:44px;align-content:center}
.book-graph-sphere .sg-controls select,.book-graph-sphere .sg-field select{appearance:none;padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:12px 8px;background-position:right 16px center}
.book-concepts-workspace .sg-figure-dialog{width:min(1000px,90vw);max-width:90vw;max-height:90dvh;overflow:auto}.book-concepts-workspace .sg-figure-dialog img{width:100%;max-width:100%;height:auto;max-height:75dvh;object-fit:contain}

/* Book graph workspace uses the available page width; other book pages keep their reading measure. */
.book-graph-sphere .sg-directory{display:flex;flex-direction:column;padding-bottom:0}
.book-graph-sphere .sg-directory-heading{position:static;flex:none;margin:0}
.book-graph-sphere .sg-directory-list{display:block;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 12px 12px;scrollbar-width:thin}
.book-graph-sphere .sg-search-status{flex:none;margin:0;padding:0 12px}
.book-graph-sphere .sg-directory>.sg-removed,.book-graph-sphere .sg-directory>[data-undo-review]{flex:none}
/* A quiet strip sits above each pane's heading. Hover/focus reveals it without shifting content. */
.book-graph-sphere .sg-directory,.book-graph-sphere .sg-map,.book-graph-sphere .sg-inspector{padding-top:0}
.book-graph-sphere .sg-pane-reorder{position:relative;width:100%;height:16px;min-height:16px;min-width:0;display:grid;place-items:center;padding:0;border:0;border-radius:0;background:var(--surface);opacity:0;z-index:6;touch-action:none;transition:opacity 120ms ease,background 120ms ease}
.book-graph-sphere .sg-pane-reorder svg{width:10px;height:14px;fill:currentColor;pointer-events:none}
.book-graph-sphere .sg-pane-reorder:hover,.book-graph-sphere .sg-pane-reorder:focus-visible,.book-graph-sphere .sg-pane-dragging>.sg-pane-reorder{opacity:1;background:var(--selected);color:var(--accent)}
.book-graph-sphere .sg-pane-reorder:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.book-graph-sphere .sg-pane-collapse,.book-graph-sphere .sg-pane-restore{top:0;height:100%}
.book-graph-sphere[data-collapse-directory=true] .sg-directory>.sg-pane-reorder,.book-graph-sphere[data-collapse-detail=true] .sg-inspector>.sg-pane-reorder,.book-graph-sphere[data-collapse-map=true] .sg-map>.sg-pane-reorder{display:grid}
.book-graph-sphere[data-collapse-directory=true] .sg-directory>.sg-pane-restore,.book-graph-sphere[data-collapse-detail=true] .sg-inspector>.sg-pane-restore,.book-graph-sphere[data-collapse-map=true] .sg-map>.sg-pane-restore{min-height:0}
.sg-pane-dragging{opacity:.35}
.sg-pane-drop-target{box-shadow:inset 0 0 0 2px var(--accent)}
.book-graph-sphere.sg-pane-drag-ghost{position:fixed;z-index:1000;pointer-events:none;opacity:.92;margin:0;min-height:0;overflow:hidden;border-radius:10px;background:var(--paper);box-shadow:0 12px 36px #15251d30;will-change:transform}
.sg-pane-drag-ghost>:is(.sg-directory,.sg-inspector,.sg-map){width:100%;height:100%;grid-column:auto!important;grid-row:auto!important;background:var(--paper)}
@media(any-pointer:coarse){.book-graph-sphere .sg-pane-reorder{opacity:.7;height:32px;min-height:32px}}
@media(prefers-reduced-motion:reduce){.book-graph-sphere .sg-pane-reorder{transition:none}}

/* Grouped navigation and book tools retain one clear content hierarchy. */
.book-summary-section{margin-top:0;padding-top:4px;border-top:0}
.book-summary-toolbar{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:16px;margin:0 0 24px}
.book-summary-view-actions{display:flex;align-items:center;gap:20px}.book-summary-view-actions button,.book-summary-return{min-height:44px;font-size:14px}
.book-summary-view-actions [aria-expanded=true]{color:var(--accent)}.book-summary-return{margin-bottom:16px}
.book-detail-header .book-file-info{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:12px;border:0;padding:0}
.book-summary-actions select,#concept-model{appearance:none;padding-right:52px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:12px 8px;background-position:right 24px center}
.book-graph-sphere .sg-pane-handles{display:grid;flex:none;height:16px;margin-bottom:6px;min-width:0}
.book-graph-sphere .sg-directory-row{position:relative;min-height:44px}
.book-graph-sphere .sg-directory-children .sg-directory-node{font-size:13px;min-height:44px}
.sg-directory-delete{flex:none;width:32px;min-height:44px;border:0;background:transparent;color:var(--muted);padding:6px;opacity:0;border-radius:6px}
.sg-directory-delete svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;pointer-events:none}
.sg-directory-row:hover>.sg-directory-delete,.sg-directory-row:focus-within>.sg-directory-delete{opacity:1}.sg-directory-delete:hover{color:#ac3c39;background:#ac3c3910}
@container(max-width:920px){.book-graph-sphere .sg-pane-handles{grid-template-columns:repeat(3,minmax(0,1fr))!important}.book-graph-sphere .sg-pane-reorder{grid-column:auto!important}}
@media(any-pointer:coarse){.book-graph-sphere .sg-pane-handles{height:32px}.sg-directory-delete{opacity:1;width:44px}}
@media(max-width:760px){.book-summary-toolbar{align-items:stretch}.book-summary-toolbar>.book-summary-actions{width:100%}}
/* Chapter conclusions retain author text and share the existing reading assets. */
.book-chapters{margin-top:32px;border-top:1px solid var(--line);padding-top:24px;min-width:0}.book-chapters h3{font-size:18px;line-height:1.5}.book-chapters h3 .book-scope{font-size:12px;font-weight:400;margin-left:8px}.book-chapter{border-bottom:1px solid var(--line)}.book-chapter>summary{padding:18px 0;cursor:pointer;font-weight:600;line-height:1.6}.book-chapter-body{padding:0 0 24px}.chapter-original-paragraph{white-space:pre-line;line-height:1.9;margin:12px 0;overflow-wrap:anywhere}.chapter-image{display:block;width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--paper);cursor:zoom-in;margin:14px 0}.chapter-image img{display:block;width:100%;height:auto;max-height:480px;object-fit:contain}.chapter-image-inline{display:inline-block;width:auto;padding:0;border:0;border-radius:0;background:transparent;margin:0 4px;vertical-align:middle}.chapter-image-inline img{width:auto;height:1em;max-width:3em;object-fit:contain}.chapter-illustrations{margin:20px 0}.chapter-illustrations>summary{cursor:pointer;color:var(--muted);font-size:13px;min-height:44px;line-height:44px}.chapter-illustrations figure{margin:12px 0 24px}.chapter-illustrations figcaption{font-size:12px;color:var(--muted);line-height:1.6}.chapter-source-status:empty{display:none}.sg-detail .book-chapters{margin-top:24px}.sg-detail .book-chapters h3{font-size:16px}.sg-detail .book-chapter>summary{font-size:14px}.sg-detail .chapter-original-paragraph{font-size:14px}.book-summary-current>h3{font-size:18px;margin-bottom:20px}.book-summary-current>h3 .book-scope{font-size:12px;font-weight:400;margin-left:8px}
/* Sticky headers remain inside their own group, so the next group pushes them away. */
.sg-directory-group{position:relative}.sg-directory-group>.sg-directory-row{position:sticky;top:0;z-index:2;background:var(--shelf);border-bottom:1px solid transparent}.sg-directory-group>.sg-directory-row:has(.sg-directory-toggle[aria-expanded=true]){border-bottom-color:var(--line)}.sg-directory-group[hidden]{display:none}.sg-directory-group .sg-directory-children[hidden]{display:none}

.book-chapter,.chapter-illustrations{padding-top:0;margin-top:0;border-top:0}.book-chapter>summary,.chapter-illustrations>summary{list-style:none;width:100%;color:var(--ink)}.book-chapter>summary::-webkit-details-marker,.chapter-illustrations>summary::-webkit-details-marker{display:none}.book-chapter>summary::marker,.chapter-illustrations>summary::marker{content:""}
.book-summary-workspace .sg-figure-dialog{width:min(1000px,90vw);max-width:90vw;max-height:90dvh;overflow:auto}.book-summary-workspace .sg-figure-dialog img{width:100%;max-width:100%;height:auto;max-height:75dvh;object-fit:contain}

.book-finished-status{color:var(--accent)}

/* The frequent close action stays outside the scrolling reader tools. */
.reader-bar{padding-right:max(16px,env(safe-area-inset-right))}
.reader-bar-tools{min-width:0;max-width:calc(100% - 106px);flex:0 1 auto}
.reader-close-direct{width:44px;height:44px;flex:0 0 44px;margin-left:4px;padding:0}
.reader-close-direct svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
@media(max-width:660px){.reader-bar{padding-right:max(8px,env(safe-area-inset-right))}.reader-bar-tools{max-width:calc(100% - 96px)}.reader-close-direct{margin-left:0}}
@media(max-width:480px){.reader-bar{padding-right:max(6px,env(safe-area-inset-right))}}

/* The collection graph uses the same three-pane workspace as a book graph. */
main:has(#graph-panel:not([hidden])){max-width:none}
.global-graph-panel{min-width:0;width:100%}
.global-graph-panel .workspace-heading{align-items:center;margin:4px 0 18px}
.global-graph-panel .workspace-heading .hint{margin:4px 0 0}
.global-graph-panel .book-graph-sphere{--sg-height:clamp(500px,calc(100dvh - 210px),1000px)}
.global-graph-panel .book-graph-sphere .sg-detail .concept-list{display:flex;flex-wrap:wrap;gap:8px}
.global-graph-panel .book-graph-sphere .sg-detail .knowledge-relations details{margin:8px 0;padding:10px 0}
.global-graph-panel .book-graph-sphere .sg-detail .knowledge-relations details details{margin-top:12px}
.global-graph-panel .book-graph-sphere[data-selecting=true] .sg-directory-node[data-browse-node]:not([data-browse-node=""]):before{content:'☐';margin-right:8px;color:var(--muted)}
.global-graph-panel .book-graph-sphere[data-selecting=true] .sg-directory-node.sg-batch-checked:before{content:'☑';color:var(--accent)}
.global-graph-panel .book-graph-sphere[data-selecting=true] .sg-node.sg-batch-checked:before{box-shadow:0 0 0 5px var(--selected),0 0 0 7px var(--accent)}
.global-graph-panel .discussion{margin-top:20px}
@media(max-width:660px){.global-graph-panel .workspace-heading{align-items:flex-start;flex-direction:column}.global-graph-panel .book-graph-sphere{--sg-height:clamp(460px,calc(100dvh - 240px),800px)}}

/* Book detail: identity, analysis task and content share a measure and hierarchy. */
.book-detail{--book-control-font:14px}
.book-detail .reading-area{max-width:1040px;padding:8px 8px 48px}
.book-detail .back-link{display:inline-flex;align-items:center;min-height:44px;margin-bottom:20px;color:var(--muted);font-size:14px;text-decoration:none}
.book-identity{grid-template-columns:88px minmax(0,1fr);gap:24px}
.book-identity .book-cover{padding:12px 10px}.book-identity .book-cover-title{font-size:12px}
.book-detail-header .book-title-heading{margin:0 0 8px}.book-detail-header h1{font-size:28px;line-height:1.35;font-weight:600}
.book-identity-meta{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:0 10px;margin:0 0 12px;color:var(--muted);font-size:13px;line-height:20px}
.book-time-line{white-space:normal}.book-file-disclosure{position:static;display:inline-block;margin:0;padding:0;border:0}
.book-file-disclosure>summary{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0;font-size:13px;font-weight:400;line-height:20px;color:var(--muted);list-style:none;cursor:pointer;text-decoration:none}
.book-file-disclosure>summary::-webkit-details-marker{display:none}.book-file-disclosure>summary::after{content:'⌄'}.book-file-disclosure[open]>summary::after{content:'⌃'}
.book-file-disclosure p{position:absolute;z-index:15;top:100%;right:auto;left:0;width:min(480px,100%);margin:0;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--shelf);font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.book-detail-actions,.book-offline-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.book-detail-actions{margin-top:2px}
.book-detail-actions .primary,.book-detail-actions .secondary,
.analysis-task-controls button,.analysis-task-controls select,
.analysis-review-controls>button,.analysis-review-controls>details>summary,
.prompt-editor-heading-actions>button,.prompt-editor-actions>button,
.book-rename-actions>button,.concept-comparison-controls select,#concept-history-more,
.history-surface .secondary,.concept-menu-panel button,
.book-detail .book-graph-sphere :is(.sg-motion,.sg-overview,.sg-edit,.sg-action,.sg-search),.book-detail .book-graph-sphere .sg-settings>summary{
 display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;min-height:44px;margin:0;padding:0 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ink);font:500 var(--book-control-font)/20px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;text-decoration:none;white-space:nowrap;box-sizing:border-box
}
.book-detail-actions .primary,.analysis-task-controls .primary,.analysis-review-controls .primary,.prompt-editor-actions>.primary,.book-rename-actions>.primary{background:var(--accent);border-color:var(--accent);color:white}
.book-detail-actions .primary{padding:0 16px}
.book-detail-actions .secondary:hover,.analysis-task-controls .secondary:hover,.analysis-review-controls .secondary:hover,.analysis-review-controls>details>summary:hover,.prompt-editor-heading-actions>button:hover,.prompt-editor-actions>.secondary:hover{background:var(--shelf)}
.book-detail-actions button:disabled,.analysis-task-controls button:disabled,.analysis-review-controls button:disabled,.prompt-editor-actions button:disabled{opacity:1;color:var(--muted);background:transparent;border-color:transparent;cursor:default}
.book-rename-form{max-width:100%;margin:12px 0;gap:8px}.book-rename-actions{display:flex;gap:8px}.book-rename-form input{min-height:44px;font-size:15px}
#book-rename-status:empty,#book-completion-status:empty,#book-offline-status:empty{display:none}
.book-analysis-tabs{display:flex;gap:24px;margin:28px 0 24px;padding:0;border-bottom:1px solid var(--line);overflow:visible}
.book-analysis-tabs>button{height:44px;min-height:44px;margin:0;padding:0;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--muted);font:500 var(--book-control-font)/20px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;text-decoration:none}
.book-analysis-tabs>button[aria-selected=true]{border-color:var(--accent);color:var(--accent);font-weight:500}
.book-summary-section{margin:0;padding:0;border:0}
.analysis-task-controls{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap;min-width:0;margin:0 0 24px}
.book-summary-actions,.book-summary-view-actions{display:contents}
.book-summary-actions label,.analysis-task-controls label{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0;margin:0;color:var(--ink);font:500 var(--book-control-font)/20px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.book-summary-actions select,.analysis-task-controls select{appearance:none;width:230px;max-width:100%;border:1px solid var(--line);background:var(--paper);padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:12px 8px;background-position:right 14px center}
.analysis-task-controls .primary{margin-right:8px}
.book-detail .book-graph-sphere .sg-search{justify-content:flex-start;border-color:var(--line);background:var(--paper)}
.concept-menu-panel .primary{background:var(--accent);border-color:var(--accent);color:white}.concept-menu-panel button{white-space:normal;height:auto;min-height:44px}
.analysis-message{margin:8px 0 0;max-width:75ch}.analysis-message:empty{display:none}
.analysis-message h2{margin:0 0 8px;color:var(--ink);font-size:20px;font-weight:600;line-height:1.4}
.analysis-message p{margin:0;font-size:15px;line-height:1.8;color:var(--muted)}.analysis-message a{color:var(--accent)}
.analysis-error-details{border:0;padding:0;margin:12px 0 0}.analysis-error-details>summary{display:inline-flex;align-items:center;min-height:44px;cursor:pointer;font-size:13px;color:var(--muted)}.analysis-error-details p{font-size:13px;overflow-wrap:anywhere}
.book-summary-empty{padding:0;margin:0}.book-summary-current{max-width:75ch}.book-summary-current>h3{font-size:20px;line-height:1.4;font-weight:600;margin:0 0 16px}.book-summary-current>ul{font-size:15px;line-height:1.85;margin:0;padding-left:24px}.book-summary-current>ul li{margin:12px 0}
.book-chapters{margin-top:32px}.book-chapters h3{font-size:20px;font-weight:600}
.concept-review-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px}
.concept-review-state{font-size:13px;line-height:1.7;color:var(--muted)}
.analysis-review-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.analysis-review-controls>.concept-add-menu>summary{background:var(--accent);border-color:var(--accent);color:white}
.concept-fullscreen-status:empty,#concept-status:empty,#concept-history-status:empty{display:none}
.concept-is-fullscreen>.analysis-task-controls,.concept-is-fullscreen>.concept-review-row{flex:none}
.prompt-editor{width:100%;max-width:720px;min-width:0;margin:0}
.prompt-editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 8px}
.prompt-editor-heading-main{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;min-width:0;padding-top:8px}
.prompt-editor-heading-main h2{font-size:20px;font-weight:600;line-height:1.4;letter-spacing:-.02em;margin:0;color:var(--ink)}
.prompt-editor-heading-main .book-scope{font-size:12px;line-height:1.4}
.prompt-editor-heading-actions{display:flex;align-items:center;gap:8px;flex:none}
.prompt-editor-heading-actions>.editor-close{width:44px;padding:0}.editor-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.prompt-editor-description{font-size:15px;line-height:1.7;color:var(--muted);margin:0 0 16px;max-width:70ch}
.prompt-editor form{margin:0;padding:0;display:block}.prompt-editor form>label{font-size:13px;line-height:20px;margin:0 0 8px;color:var(--ink)}
.prompt-editor textarea,.book-summary-workspace .prompt-editor textarea{display:block;width:100%;max-width:100%;min-width:0;height:260px;min-height:200px;max-height:none;resize:vertical;overflow-y:auto;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:400 15px/1.7 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;margin:0;box-sizing:border-box}
.prompt-editor .prompt-editor-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0 0;padding:0}
.prompt-editor .prompt-editor-actions>.secondary{border-color:transparent;background:transparent;padding:0 12px;font:500 var(--book-control-font)/20px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.prompt-editor .prompt-editor-actions>.secondary:hover{background:var(--shelf)}
.prompt-editor form>[role=status]{font-size:13px;line-height:1.6;margin:8px 0 0}.prompt-editor form>[role=status]:empty{display:none}
.history-surface>.hint{margin:0 0 16px;font-size:15px;line-height:1.7}.history-surface .book-history-layout{margin-top:16px;gap:20px}.history-surface .concept-comparison-controls{margin-top:16px}
@media(max-width:760px){.concept-review-row{align-items:flex-start;flex-direction:column;gap:8px}.book-summary-toolbar>.book-summary-actions{width:auto}}
@media(max-width:660px){
 .book-detail{--book-control-font:16px}.book-detail .reading-area{padding:0 0 32px}.book-detail .back-link{margin-bottom:16px}
 .book-identity{grid-template-columns:72px minmax(0,1fr);row-gap:8px;column-gap:16px}.book-identity-body{display:contents}.book-identity>.book-cover{grid-column:1;grid-row:1 / span 2}.book-title-heading,.book-identity-meta{grid-column:2}
 .book-detail-header h1{font-size:24px;line-height:1.35}.book-detail-header .book-title-heading{margin:0}.book-identity-meta{margin:0 0 4px;row-gap:8px}
 .book-detail-actions,.book-rename-form,#book-rename-status,#book-completion-status,#book-offline-status{grid-column:1 / -1}.book-detail-actions{margin-top:8px;gap:0 8px}
 .book-detail-actions .primary{width:100%;flex-basis:100%;margin-bottom:4px}.book-detail-actions .secondary{white-space:normal;text-align:center;max-width:100%;padding:0 8px}
 .book-file-disclosure p{left:-88px;width:calc(100% + 88px);max-width:none}
 .book-analysis-tabs{margin:20px 0;gap:24px}.analysis-task-controls{gap:8px;margin-bottom:20px}.book-summary-actions label,.analysis-task-controls label{width:100%}
 .book-summary-actions select,.analysis-task-controls select{flex:1;width:auto;min-width:0}.analysis-task-controls .primary{margin:0;flex-basis:100%;width:100%}
 .prompt-editor-heading{gap:12px}.prompt-editor-heading-main{gap:4px 8px}.prompt-editor textarea,.book-summary-workspace .prompt-editor textarea{height:240px;font-size:16px}
 .book-rename-form input{font-size:16px}
}

/* Contents metadata follows the current reader pagination. */
.reader-contents button[data-reader-heading]{display:grid;grid-template-columns:minmax(0,1fr) minmax(4ch,max-content);align-items:start;column-gap:12px;min-height:44px}
.reader-contents-label{min-width:0;overflow-wrap:anywhere}
.reader-contents-page{color:var(--reader-soft);font-size:12px;font-weight:400;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap;padding-top:1px}
.reader-contents button[data-reader-heading][aria-current=location] .reader-contents-page{color:var(--reader-ink)}

/* Quant: Porcelain task workspace, scoped to its own panel. */
#quant-panel{max-width:1240px;margin:0 auto;width:100%;min-width:0}.quant-workspace{padding:30px 36px 70px;color:var(--ink);line-height:1.65}.quant-workspace h1{font-size:29px;line-height:1.3;margin:0 0 8px}.quant-workspace h2{font-size:23px;line-height:1.35;margin:0 0 12px}.quant-workspace h3{font-size:16px;line-height:1.5;margin:22px 0 8px}.quant-workspace p{margin:8px 0 16px}.quant-workspace button,.quant-workspace input,.quant-workspace select{min-height:44px}.quant-workspace button{white-space:normal}.quant-workspace input,.quant-workspace select,.quant-workspace textarea{width:100%;min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--paper,#fff);color:var(--ink);padding:10px;font:inherit}.quant-workspace textarea{min-height:110px;resize:vertical}.quant-workspace label{display:block;font-size:13px;margin:14px 0}.quant-workspace button:focus-visible,.quant-workspace input:focus-visible,.quant-workspace select:focus-visible,.quant-workspace textarea:focus-visible,.quant-workspace summary:focus-visible,.quant-table-scroll:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.quant-heading{display:flex;justify-content:space-between;gap:20px;align-items:start;margin-bottom:24px}.quant-heading p{color:var(--muted)}.quant-eyebrow{color:var(--muted);font-size:12px;letter-spacing:.05em}.quant-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);padding-bottom:8px;flex-wrap:wrap}.quant-tabs button{border:0;background:transparent;color:var(--muted);padding:8px 14px}.quant-tabs button[aria-current="page"]{color:var(--accent);background:var(--selected);border-radius:6px}.quant-notice{font-size:12px;color:var(--muted)}#quant-message:empty{display:none}#quant-message{padding:12px 16px;background:var(--shelf);border-radius:6px;margin:14px 0;overflow-wrap:anywhere}#quant-message[role="alert"]{border-left:3px solid #a56540}.quant-two-column{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:36px;margin-top:28px}.quant-two-column>section{min-width:0}.quant-context{border-left:1px solid var(--line);padding-left:24px;font-size:13px;color:var(--muted)}.quant-context h3{margin-top:0;color:var(--ink)}.quant-context h3:not(:first-child){margin-top:28px}.quant-context ol{padding-left:20px}.quant-context li{margin:10px 0}.quant-data-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:18px 0}.quant-help{border:0;background:transparent;color:var(--accent);font-size:12px;text-align:left;padding:5px 4px;display:inline-flex;align-items:center;gap:4px}.quant-workspace label>.quant-help{display:block}.quant-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.quant-caption,.quant-provenance{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.quant-check{display:flex!important;gap:10px;align-items:start}.quant-check input{width:20px;flex:none}.quant-card{padding:18px 20px;border-radius:8px;background:var(--shelf);margin:16px 0;overflow-wrap:anywhere}.quant-card h3:first-child{margin-top:0}.quant-card button{margin-right:8px}.quant-workspace pre{max-width:100%;overflow:auto;font-size:11px}.quant-run-list{display:flex;flex-direction:column;max-height:300px;overflow:auto;gap:4px;margin:16px 0}.quant-run-list button{text-align:left;display:flex;flex-direction:column;padding:10px 12px;background:transparent;border:0;overflow-wrap:anywhere;flex-shrink:0}.quant-run-list button[aria-current],.quant-run-list button:hover{background:var(--selected)}.quant-run-list small{font-size:11px;color:var(--muted)}.quant-period{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.quant-period button[aria-pressed="true"]{background:var(--selected);color:var(--accent)}.quant-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}.quant-metric span,.quant-metric strong,.quant-metric small{display:block}.quant-metric span,.quant-metric small{font-size:12px;color:var(--muted)}.quant-metric strong{font-size:25px;font-weight:500}.quant-chart-legend{display:flex;flex-wrap:wrap;gap:16px;font-size:12px}.quant-chart-legend span:first-child{color:var(--accent)}.quant-chart-legend span:last-child{color:var(--muted)}#quant-equity-chart svg{display:block;width:100%;height:auto}#quant-equity-chart text{font-size:11px;fill:var(--muted)}.quant-strategy-line{stroke:var(--accent);stroke-width:2}.quant-benchmark-line{stroke:#a6aaa7;stroke-width:1.5}.quant-table-scroll{overflow:auto;max-height:480px}.quant-table-scroll table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}.quant-table-scroll th,.quant-table-scroll td{padding:10px;border-bottom:1px solid var(--line);white-space:nowrap}.quant-table-scroll caption{text-align:left;color:var(--muted);padding:12px 0}.quant-workspace summary{min-height:44px;padding:10px 0;cursor:pointer}.quant-workspace dl{font-size:12px}.quant-workspace dd{margin:0 0 12px;overflow-wrap:anywhere;color:var(--muted)}.guide-header{margin:28px 0}.guide-layout{display:grid;grid-template-columns:205px minmax(0,1fr);gap:36px;max-width:990px}.guide-directory>summary{display:none}.guide-directory nav{display:flex;flex-direction:column;gap:3px}.guide-directory nav>p{font-size:11px;color:var(--muted);margin:12px 0 8px}.guide-directory button{display:flex;gap:10px;text-align:left;border:0;background:transparent;color:var(--muted);padding:9px 10px;border-radius:6px;font-size:13px}.guide-directory button span{min-width:16px;font-size:11px}.guide-directory button[aria-current]{background:var(--selected);color:var(--accent)}.guide-lesson{max-width:650px;min-width:0}.guide-lesson h2{font-size:27px}.guide-subtitle{color:var(--muted);font-size:15px}.definition{font-size:15px;line-height:1.85}.teaching-example{background:var(--shelf);padding:18px 20px;border-radius:8px;margin-top:22px}.teaching-example h3{margin-top:0}.teaching-example small,.guide-version{font-size:11px;color:var(--muted)}.in-buddy{margin:24px 0}.in-buddy p{color:var(--muted);font-size:14px}.check-question{border-top:1px solid var(--line);padding-top:16px}.check-question strong{display:block;color:var(--muted);font-size:12px}.guide-source{font-size:12px;color:var(--muted)}.guide-footer{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0}.guide-lesson h2:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
@media(max-width:1100px){.quant-workspace{padding:24px}.quant-two-column{grid-template-columns:minmax(0,1fr) 190px;gap:24px}.guide-layout{grid-template-columns:185px minmax(0,1fr);gap:24px}}
@media(max-width:760px){.quant-workspace{padding:20px 16px 50px}.quant-heading{flex-wrap:wrap}.quant-heading h1{font-size:25px}.quant-two-column{display:block}.quant-context{border-left:0;border-top:1px solid var(--line);padding:24px 0;margin-top:30px}.quant-workspace input,.quant-workspace select,.quant-workspace textarea,.quant-workspace button{font-size:16px}.quant-help{font-size:13px!important}.quant-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.quant-form-grid{gap:0 12px}.quant-card{padding:14px}.quant-tabs{gap:2px}.quant-tabs button{padding:8px}.quant-workspace label{font-size:14px}}
@media(max-width:620px){.guide-layout{display:block}.guide-directory{border-block:1px solid var(--line);margin-bottom:24px}.guide-directory>summary{display:block}.guide-directory nav{max-height:280px;overflow:auto;padding:8px 0 12px}.guide-directory button{font-size:15px}.guide-header h2{font-size:22px}.guide-lesson h2{font-size:26px}.definition{font-size:16px}.in-buddy p,.teaching-example p{font-size:15px}}
@media(max-width:390px){.quant-form-grid{grid-template-columns:1fr}.quant-metric strong{font-size:22px}}

#quant-panel .guide-header{display:flex;justify-content:space-between;align-items:start;gap:16px}#quant-panel .quant-benchmark-line{stroke-dasharray:7 4}

#quant-panel .quant-field{margin:14px 0}#quant-panel .quant-field label{margin:0}#quant-panel .quant-form-grid{align-items:end}

#quant-panel{container-type:inline-size;container-name:quant}.quant-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quant-form-grid>label,.quant-form-grid>.quant-field{min-width:0}#quant-panel .guide-header>div{min-width:0}#quant-guide-close{flex:none;white-space:nowrap}.quant-guide-close-short{display:none}
@container quant (max-width:760px){.quant-two-column{grid-template-columns:minmax(0,1fr);gap:24px}.quant-context{border-left:0;border-top:1px solid var(--line);padding:18px 0 0}.guide-layout{display:block}.guide-directory{border-block:1px solid var(--line);margin-bottom:24px}.guide-directory>summary{display:block}.guide-directory nav{max-height:280px;overflow:auto;padding:8px 0 12px}.quant-guide-close-full{display:none}.quant-guide-close-short{display:inline}#quant-guide-close{min-width:44px;padding:8px}.guide-header h2{font-size:22px}}
@container quant (max-width:500px){.quant-form-grid{grid-template-columns:minmax(0,1fr)}.quant-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Dated trading workspace: container width follows the available Buddy panel. */
.quant-reports-layout,.quant-reports-layout>section,.quant-trading-layout>*{min-width:0}.quant-report-picker{border-bottom:1px solid var(--line);margin-bottom:16px}.quant-run-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin:12px 0}.quant-run-status h3,.quant-run-status p{margin:0}.quant-run-status p{overflow-wrap:anywhere}.quant-run-status button{margin-left:auto}.quant-trading-layout{display:grid;grid-template-columns:140px minmax(0,1fr) 250px;gap:20px;align-items:start;margin-top:16px}.quant-price-workspace{min-width:0}.quant-trading-layout h4{margin:0 0 12px;font-size:13px}.quant-watchlist-buttons{display:flex;flex-direction:column;gap:4px}.quant-watchlist-buttons button{display:flex;flex-direction:column;align-items:start;text-align:left;background:transparent;border:0;padding:10px 12px;border-radius:6px;overflow-wrap:anywhere}.quant-watchlist-buttons button[aria-pressed="true"]{background:var(--selected);color:var(--accent)}.quant-watchlist-buttons span{font-size:11px;color:var(--muted)}.quant-symbol-picker{display:none!important}.quant-chart-tools{display:flex;gap:4px;align-items:center;flex-wrap:wrap}.quant-chart-tools>span{font-size:12px;margin-right:6px}.quant-chart-tools button{padding:6px 10px;font-size:13px}.quant-chart-tools label{display:flex;gap:6px;align-items:center;margin:0 8px 0 0;min-height:44px}.quant-chart-tools input[type="checkbox"]{min-height:0;width:18px;height:18px;padding:0}.quant-workspace .quant-chart-reference,.quant-chart-attribution{font-size:11px;color:var(--muted);margin:8px 0;overflow-wrap:anywhere}.quant-date-row{display:flex;align-items:center;gap:8px;margin:12px 0}.quant-date-row label{display:flex;align-items:center;gap:10px;margin:0;font-size:12px;flex:1;min-width:0}.quant-date-row input{width:auto;max-width:190px;flex:1}.quant-date-row button{min-width:44px;font-size:20px}.quant-price-workspace #quant-hover-ohlc{min-height:44px;font-size:12px;line-height:1.7;overflow-wrap:anywhere}#quant-chart-status{font-size:12px;color:var(--muted);overflow-wrap:anywhere}#quant-price-chart{width:100%;min-height:360px;outline-offset:3px}#quant-price-chart:focus-visible{outline:3px solid var(--accent)}#quant-decision-panel{border-left:1px solid var(--line);padding-left:20px;font-size:12px;overflow-wrap:anywhere}#quant-decision-panel h3{font-size:15px;margin:16px 0 8px}#quant-decision-panel p{margin:8px 0;line-height:1.8}.quant-decision-time{color:var(--muted)}.quant-account-workspace{border-top:1px solid var(--line);margin-top:24px;padding-top:8px}.quant-bottom-tabs{display:flex;gap:6px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:16px}.quant-bottom-tabs button{border:0;background:transparent;white-space:nowrap;flex:none;padding:10px 14px}.quant-bottom-tabs button[aria-selected="true"]{color:var(--accent);box-shadow:inset 0 -2px var(--accent)}.quant-account-totals{display:flex;gap:24px;flex-wrap:wrap;margin:16px 0}.quant-account-totals span{font-size:12px;color:var(--muted)}.quant-account-totals strong{display:block;font-size:20px;font-weight:500;color:var(--ink)}.quant-selected-transaction{background:var(--selected)}#quant-transaction-jump{max-width:110px}.quant-account-workspace [hidden],.quant-reports-layout [hidden]{display:none!important}
@container quant (max-width:1100px){.quant-trading-layout{grid-template-columns:minmax(0,1fr) 245px;gap:20px}#quant-watchlist{grid-column:1/-1}.quant-symbol-picker{display:flex!important;align-items:center;gap:12px;max-width:320px;margin:0!important}.quant-symbol-picker select{flex:1}.quant-watchlist-buttons,#quant-watchlist h4{display:none}}
@container quant (max-width:850px){.quant-trading-layout{grid-template-columns:minmax(0,1fr)}#quant-decision-panel{border-left:0;border-top:1px solid var(--line);padding:20px 0 0}.quant-trading-layout{gap:16px}.quant-date-row label{flex-wrap:wrap}.quant-run-status button{margin-left:0}}
@container quant (max-width:500px){.quant-account-totals{gap:16px}.quant-chart-tools button{font-size:13px}.quant-date-row label{gap:4px}.quant-date-row input{max-width:100%;width:100%;font-size:14px}.quant-bottom-tabs{gap:0}.quant-bottom-tabs button{padding:8px 12px}.quant-chart-attribution{line-height:1.9}}
#main-content:has(#quant-panel:not([hidden])){max-width:none;padding:16px 0 48px}
@container quant (max-width:500px){.quant-workspace{padding-inline:8px}}
#quant-date-feedback:empty{display:none}.quant-native-values dd{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

/* Retain complete saved-report identities at narrow widths. */
.quant-report-metadata,.quant-report-metadata dd,.quant-run-status p{min-width:0;max-width:100%;overflow-wrap:anywhere}

/* Trading View: independent chart workspace in the existing Buddy shell. */
#main-content:has(#trading-view-panel:not([hidden])){max-width:1380px;padding:26px 28px 64px}
#trading-view-panel{width:100%;max-width:1240px;margin:auto;min-width:0;container-type:inline-size;container-name:trading}
#trading-view-panel .trading-workspace{min-width:0;font-size:14px;line-height:1.65}
#trading-view-panel h1{font-size:29px;letter-spacing:-.5px}
#trading-view-panel h2{font-size:21px;letter-spacing:-.3px}
#trading-view-panel h3{font-size:14px;font-weight:500;letter-spacing:0;line-height:1.6}
#trading-view-panel button{min-height:44px;min-width:44px;border:0;border-radius:7px;background:transparent;color:var(--ink);padding:8px 12px;font-size:14px;line-height:1.5}
#trading-view-panel button:hover{background:var(--shelf)}
#trading-view-panel button:disabled{cursor:not-allowed}
#trading-view-panel select{font:inherit;min-height:44px;max-width:100%;border:1px solid #c8ccd0;border-radius:7px;background:var(--paper);padding:8px 10px;color:var(--ink)}
#trading-view-panel select:focus-visible{outline:3px solid #4d875c;outline-offset:3px}
#trading-view-panel .trading-heading{display:flex;justify-content:space-between;align-items:center;gap:18px}
#trading-view-panel .trading-eyebrow,#trading-view-panel .trading-meta{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
#trading-view-panel .trading-eyebrow{margin-bottom:3px}
#trading-view-panel .trading-intro,#trading-view-panel .trading-muted{color:var(--muted);margin-top:8px}
#trading-view-panel .trading-quiet{color:var(--muted);text-decoration:none;display:inline-flex;align-items:center;min-height:44px;white-space:normal}
#trading-view-panel .trading-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:10px 0 8px;margin-top:12px;border-bottom:1px solid var(--line)}
#trading-view-panel .trading-tabs button:first-child{background:var(--selected);color:var(--accent)}
#trading-view-panel .trading-tabs button{color:var(--muted)}
#trading-view-panel .trading-source-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px 0 4px}
#trading-view-panel .trading-source-row label{flex-direction:row;align-items:center;font-size:13px;gap:10px}
#trading-view-panel .trading-source-row p{flex:1;min-width:180px;text-align:right}
#trading-view-panel .trading-status{font-size:13px;color:var(--muted);margin:8px 0;min-height:22px}
#trading-view-panel .trading-daily-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:28px;margin-top:15px}
#trading-view-panel .trading-daily-layout>*{min-width:0}
#trading-view-panel .trading-quote{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
#trading-view-panel .trading-quote strong{font-size:30px;font-weight:500;letter-spacing:-.6px;line-height:1.3}
#trading-view-panel .trading-quote span{font-size:13px;color:var(--accent)}
#trading-view-panel .trading-quote span[data-direction=down]{color:#9b6150}
#trading-view-panel .trading-quote small{font-size:12px;color:var(--muted)}
#trading-view-panel .trading-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:2px;margin:12px 0 4px}
#trading-view-panel .trading-toolbar button{font-size:12px;padding:8px}
#trading-view-panel .trading-toolbar button[aria-pressed=true]{background:var(--selected);color:var(--accent)}
#trading-view-panel .trading-toolbar label,#trading-view-panel .trading-checkbox,#trading-view-panel .trading-setting-row label{display:flex;flex-direction:row;align-items:center;gap:7px;font-size:12px;min-height:44px;padding:0 6px;font-weight:400}
#trading-view-panel input[type=checkbox]{width:16px;min-width:16px;height:16px;padding:0;accent-color:var(--accent)}
#trading-view-panel .trading-ohlc{font-size:12px;color:var(--muted);padding:8px 0;min-height:36px;font-variant-numeric:tabular-nums}
#trading-view-panel .trading-chart{width:100%;height:350px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);position:relative;min-width:0}
#trading-view-panel .trading-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;gap:12px;background:var(--shelf);color:var(--muted)}
#trading-view-panel .trading-empty p{max-width:45ch}
#trading-view-panel .trading-chart-caption{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;font-size:11px;color:var(--muted);margin-top:8px}
#trading-view-panel .trading-chart-caption a{color:var(--muted);text-underline-offset:3px}
#trading-view-panel .trading-date-row{display:flex;align-items:center;justify-content:flex-start;gap:8px;margin-top:12px}
#trading-view-panel .trading-date-row input{width:155px;max-width:100%;height:44px;font-size:16px;padding:8px;border-color:#c8ccd0;border-radius:7px}
#trading-view-panel .trading-date-row button{font-size:22px;width:44px;padding:8px}
#trading-view-panel .trading-date-row>.trading-meta{margin-left:auto}
#trading-view-panel .trading-conclusion{border-left:1px solid var(--line);padding-left:28px}
#trading-view-panel .trading-conclusion h2{margin:6px 0 12px}
#trading-view-panel .trading-record-status{font-size:12px;color:var(--accent);margin-bottom:12px}
#trading-view-panel .trading-trend{display:grid;gap:7px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:16px}
#trading-view-panel .trading-trend p{display:flex;gap:10px;justify-content:space-between;font-size:13px;color:var(--muted)}
#trading-view-panel .trading-trend strong{font-weight:500;color:var(--ink)}
#trading-view-panel .trading-proxy{margin-top:16px;padding:14px 16px;background:var(--shelf);border-radius:6px}
#trading-view-panel .trading-proxy>strong{display:block;font-size:24px;font-weight:500;color:var(--accent);margin:4px 0}
#trading-view-panel .trading-result{margin-top:16px}
#trading-view-panel .trading-result p{margin-top:5px}
#trading-view-panel .trading-evidence{margin-top:16px;padding-top:12px}
#trading-view-panel .trading-evidence dl{font-size:12px;display:grid;gap:4px;margin:12px 0}
#trading-view-panel .trading-evidence dt{color:var(--muted)}
#trading-view-panel .trading-evidence dd{margin:0 0 6px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#trading-view-panel .trading-notes{border-top:1px solid var(--line);padding-top:16px;margin-top:12px}
#trading-view-panel .trading-notes textarea{margin-top:10px;font-size:16px;resize:vertical;padding:10px;border-color:#c8ccd0}
#trading-view-panel .trading-notes>button{margin-top:6px;color:var(--accent)}
#trading-view-panel .trading-feedback{margin-top:10px;border-bottom:1px solid var(--line);padding-bottom:10px}
#trading-view-panel .trading-feedback p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
#trading-view-panel .trading-calibration{border-top:1px solid var(--line);margin-top:28px;padding-top:22px;scroll-margin-top:16px}
#trading-view-panel .trading-calibration h2{margin-bottom:12px}
#trading-view-panel .trading-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;padding:18px 0}
#trading-view-panel .trading-metrics span{display:block;color:var(--muted);font-size:12px}
#trading-view-panel .trading-metrics strong{display:block;font-size:20px;line-height:1.4;font-weight:500;margin-top:4px;font-variant-numeric:tabular-nums}
#trading-view-panel .trading-table-scroll{margin-top:18px;max-width:100%;overflow:auto}
#trading-view-panel table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}
#trading-view-panel th{color:var(--muted);font-size:12px;font-weight:400}
#trading-view-panel th,#trading-view-panel td{padding:10px 8px;border-bottom:1px solid var(--line);vertical-align:top}
#trading-view-panel td:first-child,#trading-view-panel th:first-child{padding-left:0}
#trading-view-panel td button{padding:0 4px;color:var(--accent);font-size:12px;white-space:nowrap}
#trading-view-panel td small{display:block;color:var(--muted);font-size:11px;margin-top:4px;overflow-wrap:anywhere}
#trading-view-panel tr.selected{background:var(--selected)}
#trading-view-panel .trading-setup{margin-top:22px;scroll-margin-top:16px}
#trading-view-panel .trading-setup>details{padding-top:18px}
#trading-view-panel .trading-setup>details>p{margin-top:12px}
#trading-view-panel .trading-setting-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
#trading-view-panel .trading-import{border-top:1px solid var(--line);padding-top:18px;margin-top:18px;display:grid;gap:12px;max-width:760px}
#trading-view-panel .trading-import-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
#trading-view-panel .trading-import textarea{font:14px/1.6 ui-monospace,monospace;resize:vertical}
#trading-view-panel .trading-import>button{justify-self:start;background:var(--selected);color:var(--accent)}
@container trading (max-width:900px){#trading-view-panel .trading-daily-layout{grid-template-columns:1fr;gap:24px}#trading-view-panel .trading-conclusion{border-left:0;border-top:1px solid var(--line);padding:20px 0 0}#trading-view-panel .trading-chart{height:320px}#trading-view-panel .trading-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}#trading-view-panel .trading-source-row p{text-align:left;flex-basis:100%}}
@container trading (max-width:500px){#trading-view-panel h1{font-size:25px}#trading-view-panel .trading-heading{align-items:flex-start;gap:8px}#trading-view-panel .trading-intro{font-size:13px}#trading-view-panel .trading-tabs{gap:0}#trading-view-panel .trading-tabs button{font-size:13px;padding:8px}#trading-view-panel .trading-chart{height:285px}#trading-view-panel .trading-quote strong{font-size:28px}#trading-view-panel .trading-date-row{gap:3px}#trading-view-panel .trading-date-row>.trading-meta{font-size:10px;margin-left:0}#trading-view-panel .trading-metrics strong{font-size:18px}#trading-view-panel .trading-import-fields{grid-template-columns:1fr}#trading-view-panel .trading-import textarea{font-size:16px}#trading-view-panel th,#trading-view-panel td{padding:8px 4px;font-size:12px}#trading-view-panel td small{font-size:10px}#trading-view-panel .trading-ohlc{font-size:12px}}
@media(max-width:660px){#main-content:has(#trading-view-panel:not([hidden])){padding:18px 12px 48px}}

/* Video studio: scoped to preserve the existing Buddy shell and other tools. */
#video-panel{container-type:inline-size;container-name:video-studio;--video-ink:#1d1d1f;--video-muted:#6e6e73;--video-accent:#26734d;--video-line:#e5e5e8;--video-shelf:#f5f5f7;color:var(--video-ink);font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;border:0;border-radius:0;overflow:visible;background:#fff;min-width:0;padding:2px 4px 24px}
#video-panel :is(h1,h2,h3){font-family:inherit;color:inherit}#video-panel h1{font-size:28px;font-weight:600;line-height:1.3;letter-spacing:-.6px}#video-panel h2{font-size:20px;font-weight:600;letter-spacing:-.3px}#video-panel h3{font-size:15px;font-weight:600;letter-spacing:0;line-height:1.5}#video-panel :is(button,input,textarea,select){font:inherit}#video-panel :is(button,a,input,textarea,select,summary):focus-visible{outline:3px solid #4d875c;outline-offset:3px}#video-panel button:disabled{cursor:not-allowed;opacity:.5}#video-panel button,#video-panel a.video-secondary{min-height:44px;padding:10px 15px;border-radius:8px;line-height:22px;border:0;background:transparent;color:var(--video-ink);font-weight:400;text-align:center;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}#video-panel .video-primary{background:var(--video-accent);color:#fff;font-weight:550;width:100%;margin-top:4px}#video-panel .video-primary:hover:enabled{background:#1d5d3d}#video-panel .video-quiet:hover{background:var(--video-shelf)}#video-panel .video-secondary{border:1px solid #d2d2d7;background:#fff}#video-panel .video-hint,#video-panel .video-meta{color:var(--video-muted);font-size:13px;line-height:1.6}#video-panel .video-error{color:#a13e32;font-size:13px;overflow-wrap:anywhere}#video-panel .video-pagehead{display:flex;align-items:center;justify-content:space-between;gap:18px}#video-panel .video-pagehead p{margin-top:8px;color:var(--video-muted)}#video-panel .video-connection{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--video-muted);flex:none}#video-panel .video-connection:before{content:"";width:6px;height:6px;border-radius:50%;background:#97979b}#video-panel .video-connection[data-ready=true]:before{background:var(--video-accent)}#video-panel .video-tabs{display:flex;gap:26px;border-bottom:1px solid var(--video-line);margin:24px 0 28px}#video-panel .video-tabs button{padding:10px 0 13px;border-radius:0;border-bottom:2px solid transparent;color:var(--video-muted)}#video-panel .video-tabs button[aria-selected=true]{color:var(--video-ink);border-bottom-color:var(--video-accent);font-weight:550}#video-panel .video-layout{display:grid;grid-template-columns:minmax(290px,350px) minmax(0,1fr);gap:32px}#video-panel .video-composer{padding-right:28px;border-right:1px solid var(--video-line);min-width:0}#video-panel .video-field{display:block;margin-bottom:20px}#video-panel .video-field>span{display:block;margin-bottom:8px;font-size:14px;font-weight:550}#video-panel :is(textarea,input,select){font-weight:400;border:1px solid #d2d2d7;border-radius:8px;background:#fff;color:var(--video-ink);padding:11px 12px;width:100%;max-width:100%}#video-panel textarea{min-height:172px;resize:vertical;line-height:1.7}#video-panel select{height:46px;padding-right:28px}#video-panel input{height:44px}#video-panel .video-field .video-hint{display:block;margin-top:6px;font-weight:400}#video-panel .video-mode{display:flex;background:var(--video-shelf);border-radius:9px;padding:3px;margin:20px 0}#video-panel .video-mode button{flex:1;font-size:14px;min-height:38px;padding:6px}#video-panel .video-mode button[aria-pressed=true]{background:#fff;box-shadow:0 1px 4px #00000016}#video-panel .video-parameters{display:grid;grid-template-columns:1fr 1fr;gap:12px}#video-panel .video-parameters .video-field{margin-bottom:16px}#video-panel .video-advanced{border-top:1px solid var(--video-line);margin:0 0 20px;padding:10px 0 0;background:transparent;border-radius:0;border-right:0;border-left:0;border-bottom:0}#video-panel summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px;color:var(--video-muted);font-weight:400;list-style:none}#video-panel summary:after{content:"⌄";margin-left:auto}#video-panel .video-localnote{margin-top:12px;line-height:1.7}#video-panel .video-notice{font-size:12px;color:var(--video-muted);margin:-8px 0 16px}#video-panel .video-modelrow{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--video-line);padding:11px 0}#video-panel .video-modelrow input{width:18px;height:18px;accent-color:var(--video-accent);flex:none;opacity:1}#video-panel .video-modelrow div{flex:1;min-width:0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}#video-panel .video-modelrow small{display:block;font-size:12px;color:var(--video-muted)}#video-panel #video-model-rows{margin-bottom:20px}#video-panel .video-result{min-width:0}#video-panel .video-sectionhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}#video-panel .video-sectionhead .video-quiet{font-size:13px;padding-right:0}#video-panel .video-wrap{aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:#e9edf0;position:relative;border:1px solid #e2e5e9}#video-panel video{width:100%;height:100%;object-fit:contain;display:block;background:#20282c}#video-panel .video-resultactions{display:flex;gap:4px;margin-top:16px;flex-wrap:wrap;align-items:center}#video-panel .video-record-details{border-top:1px solid var(--video-line);margin:20px 0 0;padding:12px 0 0;background:transparent;border-right:0;border-left:0;border-bottom:0;border-radius:0}#video-panel .video-record-details dl{display:grid;grid-template-columns:74px minmax(0,1fr);gap:8px;font-size:13px;margin:12px 0;overflow-wrap:anywhere}#video-panel .video-record-details dt{color:var(--video-muted)}#video-panel .video-record-details dd{margin:0;white-space:pre-wrap}#video-panel .video-empty{min-height:300px;display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:column;background:var(--video-shelf);border-radius:10px;padding:32px}#video-panel .video-empty p{color:var(--video-muted);margin-top:8px;max-width:32ch}#video-panel .video-queue-banner{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--video-shelf);border-radius:8px;margin-bottom:16px}#video-panel .video-queue-banner p{font-size:13px}#video-panel .video-queue-banner button{margin-left:auto;font-size:13px;padding:6px 8px}#video-panel .video-spinner{width:16px;height:16px;border:2px solid #cdd9d2;border-top-color:var(--video-accent);border-radius:50%;animation:video-spin 1.3s linear infinite;flex:none}@keyframes video-spin{to{transform:rotate(360deg)}}#video-panel .video-comparison{display:grid;grid-template-columns:1fr 1fr;gap:20px 16px}#video-panel .video-comparecard{min-width:0;border-bottom:1px solid var(--video-line);padding-bottom:14px}#video-panel .video-comparecard h3{margin-top:9px;font-size:13px;overflow-wrap:anywhere}#video-panel .video-single-result h3{font-size:17px;margin-top:16px}#video-panel .video-statuscard{aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;gap:9px;background:var(--video-shelf);border:1px dashed #d4d6dc;border-radius:8px;font-size:13px;color:var(--video-muted);padding:16px;text-align:center}#video-panel .video-fail{color:#a13e32;background:#fcf7f6}#video-panel .video-historyitem{display:grid;grid-template-columns:112px minmax(0,1fr) auto;gap:20px;align-items:center;border-bottom:1px solid var(--video-line);padding:20px 0}#video-panel .video-historyitem p{font-size:13px;color:var(--video-muted);margin-top:4px}#video-panel .video-history-mark{min-height:74px;border-radius:8px;background:var(--video-shelf);display:flex;align-items:center;justify-content:center;font-size:13px;padding:10px}#video-panel [hidden]{display:none!important}
@media(min-width:1450px){#video-panel .video-layout{grid-template-columns:360px minmax(0,1fr);gap:44px}#video-panel .video-composer{padding-right:36px}}
@media(max-width:1150px){#video-panel .video-layout{grid-template-columns:minmax(260px,310px) minmax(0,1fr);gap:24px}#video-panel .video-composer{padding-right:24px}#video-panel .video-comparison{grid-template-columns:1fr}}
@media(max-width:950px){#video-panel .video-pagehead{align-items:flex-start}#video-panel .video-pagehead p{font-size:14px}#video-panel .video-pagehead>.video-connection{padding-top:10px}#video-panel .video-layout{grid-template-columns:minmax(260px,310px) minmax(0,1fr);gap:26px}#video-panel .video-comparison{grid-template-columns:1fr}}
@media(max-width:660px){#video-panel{font-size:16px;padding:0 0 24px}#video-panel h1{font-size:24px}#video-panel .video-pagehead{display:block}#video-panel .video-pagehead>.video-connection{margin-top:12px;padding:0;font-size:12px}#video-panel .video-pagehead p{margin-top:6px;font-size:13px}#video-panel .video-tabs{margin:20px 0 24px;gap:24px}#video-panel .video-tabs button{font-size:15px}#video-panel .video-layout{display:flex;flex-direction:column;gap:28px}#video-panel .video-composer{border-right:0;padding:0}#video-panel .video-field>span{font-size:15px}#video-panel textarea{min-height:156px;font-size:16px}#video-panel :is(input,select){font-size:16px}#video-panel .video-mode button{font-size:15px}#video-panel .video-result{border-top:1px solid var(--video-line);padding-top:24px}#video-panel .video-resultactions button{font-size:15px}#video-panel .video-sectionhead h2{font-size:19px}#video-panel .video-historyitem{grid-template-columns:80px minmax(0,1fr);gap:12px}#video-panel .video-historyitem>button{grid-column:2;justify-self:start;padding-left:0}#video-panel .video-historyitem h3{font-size:15px}#video-panel .video-historyitem p{font-size:12px}#video-panel .video-queue-banner{flex-wrap:wrap;gap:9px}#video-panel .video-modelrow div{font-size:14px}}
@media(prefers-reduced-motion:reduce){#video-panel .video-spinner{animation:none;border-style:dotted}}

/* Video on narrow screens uses the full sheet below the existing nav toggle. */
@media(max-width:600px){.app-shell:has(#video-panel:not([hidden])){margin-left:0}#video-panel{padding-left:2px;padding-right:2px}#video-panel .video-pagehead{padding-left:44px;align-items:flex-start}}

@container video-studio (max-width:740px){#video-panel .video-layout{display:flex;flex-direction:column;gap:28px}#video-panel .video-composer{border-right:0;padding-right:0}#video-panel .video-result{border-top:1px solid var(--video-line);padding-top:24px}}

/* Book import: measured expectations and real pipeline milestones. */
.book-workspace>dialog.book-import{width:min(560px,calc(100vw - 32px));max-width:none;margin:auto}
.book-import .book-import-estimate{margin:16px 0 0;color:var(--ink);font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.book-import-estimate p{margin:0}.book-import-estimate .book-import-estimate-note{color:var(--muted);font-size:13px;margin-top:4px}
.book-import .book-import-progress{border-top:1px solid var(--line);margin-top:24px;padding-top:20px}
.book-import-activity{display:flex;align-items:flex-start;gap:12px}.book-import-activity>div{min-width:0}
.book-import #book-import-phase{font-size:16px;font-weight:600;line-height:1.5;margin:0}
.book-import #book-import-elapsed{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;line-height:1.5;margin:4px 0 0}
.book-import-spinner{flex:none;width:20px;height:20px;margin-top:2px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:book-import-spin 1s linear infinite}
.book-import-steps{display:flex;flex-wrap:wrap;gap:12px 20px;padding:0;margin:20px 0 16px;list-style:none;color:var(--muted);font-size:13px;line-height:1.5}
.book-import-steps li{display:flex;align-items:center;gap:6px}.book-import-steps li::before{content:'○';font-size:15px}
.book-import-steps li[data-state="active"]{color:var(--ink);font-weight:600}.book-import-steps li[data-state="active"]::before{content:'●';color:var(--accent)}
.book-import-steps li[data-state="complete"]::before{content:'✓';color:var(--accent)}
.book-import #book-import-guidance,.book-import #book-import-detail,.book-import #book-import-overrun{font-size:13px;line-height:1.65;color:var(--muted);margin:12px 0 0}
.book-import #book-import-overrun{color:var(--ink)}.book-import #book-import-detail:empty,.book-import #book-import-overrun:empty{display:none}
.book-import[data-busy="true"] #book-file-action,.book-import[data-busy="true"] #book-status{display:none}.book-import[data-busy="false"] #book-status{color:var(--ink)}
.book-import .book-file-copy{min-width:0}.book-import #book-file-name{overflow-wrap:anywhere}.book-import .book-title-field input{font-size:16px}
@keyframes book-import-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.book-import-spinner{animation:none}}
@media(max-width:400px){.book-import-steps{gap:10px 16px}}

/* Offline download feedback stays next to the book task actions. */
#book-offline-status{width:100%;max-width:560px;color:var(--muted);line-height:1.5}
.offline-download-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;color:var(--ink)}
.offline-download-row>span:last-child{flex:none;color:var(--muted);font-variant-numeric:tabular-nums}
#book-offline-status progress{display:block;appearance:none;-webkit-appearance:none;width:100%;height:6px;margin:8px 0 10px;border:0;border-radius:4px;overflow:hidden;background:var(--line);color:var(--accent)}
#book-offline-status progress::-webkit-progress-bar{background:var(--line);border-radius:4px}
#book-offline-status progress::-webkit-progress-value{background:var(--accent);border-radius:4px}
#book-offline-status progress::-moz-progress-bar{background:var(--accent);border-radius:4px}
#book-offline-status progress:indeterminate{background:linear-gradient(90deg,var(--line) 0 30%,var(--accent) 30% 60%,var(--line) 60%);background-size:200% 100%;animation:offline-download-active 1.5s linear infinite}
#book-offline-status progress:indeterminate::-webkit-progress-bar{background:transparent}
#book-offline-status progress[hidden]{display:none}
#book-offline-status p{margin:4px 0 0;font-size:13px}
#book-offline-status p:empty{display:none}
#book-offline-status[data-state=error] .offline-download-row>span:first-child{color:var(--danger,#b42318)}
@keyframes offline-download-active{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){#book-offline-status progress:indeterminate{animation:none}}
/* People News follows the shared Porcelain reading hierarchy. */
.news-workspace-panel{width:100%;min-width:0}.news-workspace{max-width:980px;margin:0 auto;padding:12px 18px 70px;color:var(--ink,#1d1d1f)}.news-workspace [hidden]{display:none!important}.news-workspace button,.news-workspace input,.news-workspace select,.news-workspace textarea{font:inherit}.news-workspace button{min-height:44px;cursor:pointer}.news-workspace button:not(.primary){background:transparent;color:#26734d;border:0;border-radius:8px;padding:8px 12px}.news-workspace button:hover{background:#f5f5f7}.news-workspace button:focus-visible,.news-workspace a:focus-visible,.news-transcript:focus-visible{outline:2px solid #26734d;outline-offset:3px}.news-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:12px 0 24px}.news-header h1{font-size:32px;margin:0 0 8px;letter-spacing:-.025em}.news-header p{margin:0;color:#6e6e73;font-size:14px}.news-header .primary{white-space:nowrap;background:#26734d;color:white;border:0;border-radius:9px;padding:11px 19px}.news-header .primary:disabled{opacity:.6;cursor:default}.news-schedule{display:flex;flex-wrap:wrap;align-items:center;gap:10px;border-block:1px solid #e5e5e8;padding:7px 0;color:#6e6e73;font-size:14px}.news-schedule button{margin-left:auto}.news-following{padding:22px 0 15px}.news-chips,.news-people-actions{display:flex;flex-wrap:wrap;gap:7px}.news-chips button[aria-pressed=true],.news-filters button[aria-pressed=true]{background:#e5eee8;color:#205e40}.news-chips button:not([aria-pressed=true]){background:#f5f5f7;color:#52525a}.news-people-actions{margin-top:8px}.news-filters{display:flex;flex-wrap:wrap;gap:6px;align-items:center;border-bottom:1px solid #e5e5e8;padding-bottom:12px}.news-filters span{margin-left:auto;color:#6e6e73;font-size:13px}.news-status{font-size:14px;line-height:1.6;color:#6e6e73;margin:14px 0}.news-status:empty{display:none}.news-row{padding:25px 0;border-bottom:1px solid #e5e5e8;overflow-wrap:anywhere}.news-row-top{display:flex;align-items:center;gap:12px}.news-person{font-weight:600;font-size:14px}.news-new{color:#26734d;font-size:12px;border-radius:4px;background:#e5eee8;padding:2px 6px}.news-meta{color:#6e6e73;font-size:13px;line-height:1.6;margin:5px 0}.news-row h2{font-size:21px;line-height:1.35;margin:8px 0}.news-row h2 button{color:#1d1d1f!important;text-align:left;font-size:inherit;font-weight:600;padding:0!important;line-height:inherit}.news-description{line-height:1.6;margin:8px 0 13px;color:#52525a;max-width:78ch}.news-importance{font-size:13px;line-height:1.55;margin:12px 0;color:#52525a}.news-importance>span{font-weight:600;color:#1d1d1f}.news-importance.news-high>span{color:#26734d}.news-importance small{margin-left:12px;color:#6e6e73}.news-importance p{margin:3px 0;max-width:84ch}.news-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:16px}.news-workspace a{color:#26734d;text-decoration:none;display:inline-flex;align-items:center;min-height:44px}.news-row-actions>button{padding-left:0!important}.news-more{display:block;margin:20px auto}.news-coverage{margin-top:28px;font-size:14px;line-height:1.7;color:#6e6e73}.news-coverage summary{cursor:pointer;padding:12px 0;min-height:44px}.news-coverage p{overflow-wrap:anywhere}.news-detail-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}.news-detail h2{font-size:27px;line-height:1.3;margin:10px 0;overflow-wrap:anywhere}.news-detail-heading>button{flex-shrink:0}.news-generation{display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid #e5e5e8;padding:8px 0 18px;margin-bottom:24px}.news-generation button:first-child{margin-right:auto}.news-video-section{border-top:1px solid #e5e5e8;padding:18px 0}.news-video-section h3{font-size:18px;margin:4px 0 12px}.news-video-section p{line-height:1.7}.news-video-section ol{padding-left:23px}.news-video-section li{padding:6px 0;line-height:1.65}.news-video-section li a{margin-right:12px}.news-summary{white-space:pre-wrap}.news-transcript{max-height:420px;overflow:auto;background:#f5f5f7;padding:14px 18px;border-radius:10px;margin-top:12px;overscroll-behavior:contain}.news-transcript p{display:flex;gap:15px;margin:5px 0}.news-transcript a{flex-shrink:0;min-width:48px;align-self:start}.news-transcript span{padding-top:9px;overflow-wrap:anywhere}.news-video-section summary{min-height:44px;cursor:pointer;padding:10px 0}.news-notice{background:#f5f5f7;padding:12px}.news-dialog{max-width:min(680px,calc(100vw - 32px));width:580px;border:1px solid #e5e5e8;border-radius:15px;padding:24px;color:#1d1d1f;max-height:85vh;overflow:auto}.news-dialog::backdrop{background:#0005}.news-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}.news-dialog h2{font-size:22px;margin:0}.news-dialog label{display:block;margin:16px 0;font-size:14px}.news-dialog input:not([type=checkbox]),.news-dialog select,.news-dialog textarea{display:block;width:100%;margin-top:8px;min-height:44px;padding:10px;border:1px solid #d2d2d7;border-radius:8px;background:white;box-sizing:border-box}.news-dialog textarea{resize:vertical;line-height:1.6}.news-dialog p{color:#6e6e73;font-size:14px;line-height:1.6}.news-dialog .news-form-error{color:#a12d24}.news-dialog .primary{background:#26734d;color:white;border:0;border-radius:8px;padding:10px 20px}.news-manage-row,.news-history-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0;border-bottom:1px solid #e5e5e8}.news-manage-row span,.news-history-row span{flex:1;min-width:130px}.news-history-row{font-size:14px}@media(max-width:600px){.news-workspace{padding:8px 0 45px}.news-header{gap:10px}.news-header h1{font-size:28px}.news-header .primary{padding:10px 13px}.news-schedule{gap:0;font-size:13px}.news-schedule span{flex-basis:100%}.news-schedule button{margin-left:0;padding-left:0!important}.news-following{padding-top:16px}.news-row h2{font-size:19px}.news-row{padding:21px 0}.news-filters span{width:100%;margin:4px 0}.news-detail h2{font-size:23px}.news-transcript{padding:10px;max-height:360px}.news-dialog{padding:18px}.news-generation{gap:0}.news-generation button{padding:8px!important}}
.news-header .primary:hover,.news-dialog .primary:hover{background:#205e40;color:white}.news-detail-status{color:#6e6e73;font-size:14px;line-height:1.6}.news-detail-status:empty{display:none}.news-source-note{margin-top:24px}
.news-new{flex-shrink:0;white-space:nowrap}
