:root {
  color-scheme: dark;
  --bg: #0e0c09; --card: #1a1610; --raised: #332a20; --glass: #28241dc9;
  --text: #f7f1e8; --body: #dfd5c7; --muted: #b3a797; --accent: #eab274; --accent-text: #fff6e6;
  --border: #ba97643b; --line: #c1a27530; --shadow: 0 12px 44px #0003;
  --header: #100d09da; --glow: #c776252d; --panel: linear-gradient(145deg, #44332266, #1c1812cc 50%, #15120dd9);
  --gold: linear-gradient(115deg, #342a21, #815326 67%, #bd792f);
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
}
:root[data-theme=light] {
  color-scheme: light;
  --bg: #f3eee5; --card: #fffaf2; --raised: #eadfce; --glass: #fffaf2d9;
  --text: #33261b; --body: #574536; --muted: #786555; --accent: #8a4b17; --accent-text: #fffaf2;
  --border: #a0825559; --line: #a082553d; --shadow: 0 12px 44px #6c482017;
  --header: #f3eee5e0; --glow: #b1732926; --panel: linear-gradient(145deg, #fffcf7eb, #f2e9dce8);
  --gold: linear-gradient(115deg, #8b5c2e, #a16a2d 65%, #bd813f);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 156px; }
body { margin: 0; font: 15px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: radial-gradient(ellipse at 4% 38%, var(--glow), transparent 29%), radial-gradient(ellipse at 93% 67%, var(--glow), transparent 33%), var(--bg); background-attachment: fixed; -webkit-font-smoothing: antialiased; }
body:after { content: ''; position: fixed; inset: 0; background: url('/assets/grain.svg'); opacity: .025; pointer-events: none; z-index: 100; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; color: inherit; }
button { cursor: pointer; border: none; }
button:disabled { opacity: .45; cursor: default; }
a { text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; }
h1 { font-size: 30px; } h2 { font-size: 26px; } h3 { font-size: 20px; }
p { overflow-wrap: anywhere; }
em { font-family: var(--serif); font-weight: 400; color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 12px; line-height: 1.7; }
.eyebrow { font-size: 9px; letter-spacing: 1.5px; font-weight: 600; color: var(--accent); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; border: 1px solid var(--border); border-radius: 99px; background: linear-gradient(140deg, #ffffff0e, #ffffff02), var(--glass); color: var(--body); box-shadow: inset 0 1px 0 #ffffff09; font-size: 12px; font-weight: 450; line-height: 1.3; white-space: nowrap; transition: border-color .18s, background .18s, color .18s, transform .18s; }
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill[aria-pressed=true], .pill.active { background: var(--gold); color: var(--accent-text); border-color: #e6a85c9c; box-shadow: 0 0 20px var(--glow), inset 0 1px 3px #ffd39335; }
.pill:active { transform: scale(.97); }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 14px 24px; border: 1px solid #cda7798c; border-radius: 99px; color: var(--accent-text); background: var(--gold); box-shadow: inset 0 1px 2px #ffdca34d, 0 8px 26px #0002; font-weight: 500; font-size: 14px; line-height: 1.4; }
.primary:hover { filter: brightness(1.12); } .submit { width: 100%; margin-top: 22px; }
.text-button { background: none; color: var(--accent); font-size: 12px; padding: 7px 0; text-align: left; font-weight: 500; }
.brand { display: inline-flex; align-items: baseline; gap: 6px; font: 26px/1.2 var(--serif); letter-spacing: -.9px; white-space: nowrap; }
.brand em { color: var(--text); font-style: normal; }
.brand-dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; margin-left: 1px; }
.brand-mark { display: grid; place-content: center; width: 88px; height: 88px; background: var(--panel); border-radius: 26px; border: 1px solid var(--line); font: italic 52px var(--serif); color: var(--text); box-shadow: 0 0 70px var(--glow); position: relative; }
.brand-mark span { position: absolute; right: 17px; bottom: 10px; font-size: 32px; color: var(--accent); }
.boot { height: 100dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 24px; color: var(--muted); }
.app-shell { display: grid; grid-template-columns: 205px minmax(0, 680px) 260px; gap: 32px; max-width: 1370px; padding: 26px 28px 50px; margin: auto; align-items: start; }
.workspace { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; background: var(--header); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top:after { content: ''; position: absolute; bottom: -12px; left: 0; right: 0; height: 12px; background: linear-gradient(#24180f10, transparent); pointer-events: none; }
.top-inner { position: absolute; right: 9px; top: 9px; display: flex; align-items: center; }
.top-inner > .brand, .top-right .profile-link { display: none; }
.top-right { display: flex; align-items: center; gap: 9px; }
.top-right > .pill { width: 38px; min-height: 38px; padding: 0; }
.top-right svg { width: 17px; height: 17px; }
.account-avatar { display: grid; place-content: center; width: 38px; height: 38px; flex-shrink: 0; border: 1px solid #bc98606b; border-radius: 50%; background: radial-gradient(circle at 25% 20%, #956734, #32281b 65%); color: #fff0d6; font: 19px var(--serif); box-shadow: 0 0 0 3px #c5a4710b; }
.toolbar-inner { display: flex; gap: 8px; align-items: center; padding: 10px 58px 12px 9px; }
.toolbar-inner > .pill { flex: 0 0 40px; height: 40px; padding: 0; }
.toolbar-inner > .pill:last-child { background: radial-gradient(ellipse at 25% 20%, #a76e3329, transparent), var(--glass); border-color: #c69a5969; color: var(--accent); }
.toolbar-inner > .pill:last-child:hover { box-shadow: 0 0 18px var(--glow); }
.specialty-mask { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 7px, #000 calc(100% - 12px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7px, #000 calc(100% - 12px), transparent); }
.specialties { display: flex; gap: 7px; overflow: auto; padding: 2px 6px; scrollbar-width: none; }
.specialties::-webkit-scrollbar { display: none; }
.specialties .pill { min-height: 36px; flex-shrink: 0; padding: 8px 14px; font-size: 11px; }
.specialties .pill[aria-pressed=true] { border-color: #e6a85ca6; color: var(--accent-text); background: var(--gold); }
#connection { display: none; align-items: center; gap: 9px; padding: 0 12px 12px; font-size: 11px; line-height: 1.5; color: var(--body); }
#connection.has-status { display: flex; }
#connection > span:nth-child(2) { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#connection small { margin-left: 10px; color: var(--muted); }
#connection .pill { min-height: 28px; font-size: 10px; padding: 4px 10px; }
.status-dot, .live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.status-dot { box-shadow: 0 0 0 4px var(--glow); } .status-dot.offline { background: #dc9273; }
.aside { display: flex; flex-direction: column; position: sticky; top: 30px; height: calc(100dvh - 60px); min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 8px 10px 0 0; }
.aside-tagline { margin-top: 9px; color: var(--muted); font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 10px; margin-top: 40px; }
.side-nav a { display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 12px 18px; border: 1px solid transparent; border-radius: 99px; font-size: 13px; color: var(--body); }
.side-nav a.selected { color: var(--accent-text); background: var(--gold); border-color: #cda779a3; box-shadow: 0 0 24px var(--glow), inset 0 1px 3px #ffcf9433; }
#aside-stats { display: flex; gap: 28px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--line); }
#aside-stats div { display: flex; flex-direction: column; }
#aside-stats strong { font: 26px var(--serif); color: var(--text); }
#aside-stats span { font-size: 9px; color: var(--muted); line-height: 1.7; max-width: 72px; margin-top: 5px; }
.aside-footer { margin-top: auto; font-size: 11px; color: var(--muted); }
.aside-footer > .pill { font-size: 10px; min-height: 34px; padding: 8px 12px; }
.aside-android { display: flex; gap: 6px; align-items: center; margin: 16px 7px 25px; }
.aside-android svg { width: 12px; height: 12px; }
.side-account { display: flex; align-items: center; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.side-account > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--body); }
.side-account small { display: block; font-size: 9px; color: var(--muted); }
.side-account > svg { width: 14px; height: 14px; margin-left: auto; }
#main { min-width: 0; padding-top: 21px; }
.feed-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.feed-heading > div:first-child { min-width: 0; }
.feed-heading .eyebrow { display: none; }
.feed-heading h1 { font: 19px/1.35 var(--serif); overflow-wrap: anywhere; }
.feed-heading-actions { display: flex; gap: 7px; flex-shrink: 0; }
.feed-heading-actions .pill { min-height: 34px; min-width: 34px; padding: 7px 9px; flex-shrink: 0; font-size: 10px; }
.feed-heading-actions svg { width: 15px; height: 15px; }
.cards { display: flex; flex-direction: column; gap: 22px; }
.post-card { background: var(--panel); border: 1px solid var(--border); border-radius: 23px; padding: 8px; overflow: hidden; box-shadow: var(--shadow), inset 0 1px 0 #ffffff06; scroll-margin-top: 150px; }
.artwork { aspect-ratio: 2.2; position: relative; border-radius: 16px; overflow: hidden; background: #16120b; }
.artwork:after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#0004, transparent 45%, #0009); }
.artwork > img { height: 100%; width: 100%; object-fit: cover; position: absolute; inset: 0; }
.art-placeholder { position: absolute; inset: 0; background: linear-gradient(#1b140820, #08050124), url('/assets/discovery.webp') center/cover; }
.image-ready .art-placeholder { display: none; }
.art-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; z-index: 2; }
.journal-pill { display: block; max-width: calc(100% - 50px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; padding: 6px 10px; line-height: 1.4; color: #f7f0e5; border: 1px solid #e4cba54a; border-radius: 99px; background: #19140d96; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.art-top .pill { border-color: #e4cba54a; background: #19140d96; color: #fff4e6; width: 36px; min-height: 36px; padding: 0; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.art-top .pill svg { width: 19px; height: 19px; }
.art-top .pill.active { background: #88502bd9; color: #ffd7b0; border-color: #f1af797a; }
.art-top .pill.active svg { fill: currentColor; }
.art-caption { position: absolute; z-index: 2; bottom: 10px; left: 12px; right: 12px; font-size: 8px; letter-spacing: .2px; line-height: 1.6; color: #f3e5cfcc; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.post-content { padding: 15px 12px 9px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 9px; line-height: 1.5; letter-spacing: .7px; color: var(--accent); }
.post-meta > span:first-child { text-transform: uppercase; }
.ai-tag { font-size: 9px; color: var(--muted); letter-spacing: 0; }
.read-marker { margin-left: auto; color: var(--muted); font-size: 9px; letter-spacing: 0; }
.part-label { font-size: 9px; letter-spacing: .4px; }
.post-card h2 { font: 29px/1.22 var(--serif); letter-spacing: -.5px; overflow-wrap: anywhere; }
.hook { margin-top: 9px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.explanation { position: relative; margin: 17px 0 13px; padding: 15px; border: 1px solid #c5985559; border-radius: 17px; background: radial-gradient(ellipse at 95% 0, var(--glow), transparent 70%), linear-gradient(150deg, #8a5b2b25, #ffffff01), var(--glass); box-shadow: inset 0 1px 0 #f4c9881a; }
.explanation-label { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--text); font-size: 11px; font-weight: 500; }
.explanation-label svg { width: 19px; height: 19px; color: var(--accent); }
.explanation-text { color: var(--body); font-size: 13px; line-height: 1.8; white-space: pre-line; }
.explanation-text.collapsed { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-right: 39px; }
.expand-button { min-height: 31px; padding: 6px 11px; font-size: 10px; margin-top: 10px; }
.expand-button svg { width: 12px; height: 12px; transform: rotate(-90deg); }
.expand-button[aria-expanded=false] { position: absolute; width: 34px; height: 34px; min-height: 34px; padding: 0; right: 13px; bottom: 15px; font-size: 0; background: linear-gradient(140deg, #af793d75, #55402661); color: #fff1d6; border-color: #d4a76d4a; }
.expand-button[aria-expanded=false] svg { width: 15px; height: 15px; transform: none; }
.post-details { display: flex; flex-wrap: wrap; gap: 8px; }
.post-details > details { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(145deg, #ffffff0a, #ffffff01), var(--glass); }
.post-details > details[open] { flex-basis: 100%; }
details > summary { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 11px; list-style: none; cursor: pointer; font-size: 11px; line-height: 1.4; color: var(--body); }
summary::-webkit-details-marker { display: none; }
summary svg { width: 12px; height: 12px; transition: transform .18s; }
details[open] > summary svg { transform: rotate(90deg); }
.detail-body { padding: 2px 13px 15px; color: var(--body); font-size: 13px; line-height: 1.9; }
.detail-body section { margin-bottom: 15px; } .detail-body h3 { color: var(--accent); font: 500 11px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin-bottom: 5px; }
blockquote { margin: 10px 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--accent); white-space: pre-line; font-size: 13px; color: var(--body); overflow-wrap: anywhere; }
.facts { padding-left: 18px; } .facts li { margin-bottom: 14px; }
.evidence summary { color: var(--accent); font-size: 11px; padding: 7px 0; }
.source-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 0 10px; }
.source-row .pill { min-height: 31px; font-size: 10px; padding: 6px 10px; }
.source-row svg { width: 12px; height: 12px; } .source-link { color: var(--accent); }
.post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); }
.post-actions .pill { min-height: 34px; padding: 7px 11px; font-size: 10px; }
.post-actions .pill svg { width: 15px; height: 15px; }
.post-actions [data-action=open-article] { margin-left: auto; }
.imrad { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 8px; border: 1px solid var(--border); background: #a5866224; color: var(--accent); font: 12px var(--serif); flex-shrink: 0; }
.imrad-M { background: #76aec816; color: #a8c3cd; } .imrad-R { background: #9fc7a11a; color: #b7c8a7; } .imrad-A { background: #ac8cca18; color: #ccbde0; } .imrad-D { background: #cd978d18; color: #d8b7a4; }
:root[data-theme=light] .imrad-M { color: #32687f; } :root[data-theme=light] .imrad-R { color: #47663f; } :root[data-theme=light] .imrad-A { color: #74539b; } :root[data-theme=light] .imrad-D { color: #86514b; }
.right-rail { position: sticky; top: 30px; max-height: calc(100dvh - 60px); overflow: auto; padding: 22px 19px 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: inset 0 1px 0 #ffffff06; scrollbar-width: thin; }
.rail-heading h2 { font-size: 21px; }
.rail-heading > a { display: flex; gap: 7px; align-items: center; margin-top: 10px; color: var(--muted); font-size: 11px; }
.rail-heading svg { width: 12px; height: 12px; }
.rail-article { padding: 25px 0; border-bottom: 1px solid var(--line); }
.rail-source { display: flex; gap: 11px; align-items: flex-start; background: none; padding: 0; text-align: left; width: 100%; }
.rail-source > span:last-child { min-width: 0; }
.rail-source strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; font-weight: 450; line-height: 1.6; }
.rail-source small { display: block; font-size: 9px; color: var(--muted); margin-top: 7px; }
.rail-thumb { width: 52px; height: 68px; position: relative; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border); border-radius: 14px; background: url('/assets/discovery.webp') center/cover; }
.rail-thumb > img { height: 100%; width: 100%; object-fit: cover; }
.rail-progress { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 9px; color: var(--muted); margin: 16px 0 7px; }
.rail-progress strong { color: var(--accent); font-weight: 500; }
.rail-imrad { display: flex; gap: 7px; margin-top: 12px; }
.rail-imrad .imrad { width: 22px; height: 22px; }
.rail-article > .pill { font-size: 10px; min-height: 32px; margin-top: 14px; padding: 7px 11px; }
.rail-empty-art { height: 130px; border-radius: 16px; background: linear-gradient(transparent, #0004), url('/assets/discovery.webp') center/cover; margin: 22px 0; }
.rail-empty h3 { font-size: 23px; margin-top: 12px; }
.rail-empty p { font-size: 12px; line-height: 1.9; color: var(--muted); margin-top: 14px; }
.rail-empty > .pill { min-height: 32px; font-size: 10px; margin-top: 20px; }
.rail-footnote { margin-top: 22px; font-size: 9px; color: var(--muted); } .rail-footnote .live-dot { margin-right: 6px; }
.dock { display: none; position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); gap: 5px; padding: 5px; background: var(--glass); border: 1px solid #c2a47d70; border-radius: 99px; box-shadow: 0 8px 28px #0004, inset 0 1px 2px #ffffff17; backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); z-index: 25; }
.dock a { display: flex; justify-content: center; align-items: center; gap: 10px; width: 126px; min-height: 43px; padding: 10px 18px; border-radius: 99px; font-size: 12px; color: var(--body); border: 1px solid transparent; }
.dock a.selected { background: var(--gold); color: var(--accent-text); border-color: #e0b07181; box-shadow: inset 0 1px 2px #ffd6a33d, 0 0 17px var(--glow); }
.dock svg { width: 20px; height: 20px; }
.seen-divider { display: flex; align-items: center; gap: 12px; padding: 17px 0; color: var(--accent); font-size: 11px; text-align: center; line-height: 1.6; }
.seen-divider:before, .seen-divider:after { content: ''; height: 1px; flex: 1; background: var(--accent); opacity: .55; }
.seen-divider span { padding: 7px 13px; border: 1px solid #b9803870; border-radius: 99px; background: var(--glass); box-shadow: 0 0 14px var(--glow); }
.new-posts-notice { position: fixed; z-index: 24; transform: translateX(-50%); max-width: calc(100% - 24px); }
.new-posts-notice[hidden] { display: none; }
.new-posts-button { color: var(--text); background: var(--glass); border-color: #d294518c; box-shadow: 0 3px 20px var(--glow), inset 0 1px 2px #eebd7126; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); white-space: nowrap; font-size: 11px; min-height: 36px; padding: 9px 15px; }
.new-posts-button svg { color: var(--accent); transform: rotate(-90deg); width: 14px; height: 14px; }
.empty { text-align: center; padding: 65px 20px; border: 1px solid var(--line); border-radius: 23px; background: var(--panel); color: var(--body); }
.empty-icon { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 17px; background: var(--glass); color: var(--accent); display: grid; place-content: center; margin: 0 auto 22px; }
.empty h2 { font-size: 25px; } .empty p { font-size: 13px; max-width: 320px; margin: 14px auto 24px; color: var(--muted); }
.profile-head { display: flex; align-items: center; gap: 15px; margin: 7px 0 24px; }
.profile-head > div:nth-child(2) { min-width: 0; }
.profile-head h1 { font-size: 27px; margin-top: 6px; overflow-wrap: anywhere; }
.profile-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.profile-head > .pill { margin-left: auto; width: 38px; flex-shrink: 0; padding: 0; }
.avatar { display: grid; place-content: center; width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); font: 29px var(--serif); color: var(--accent); }
.mobile-tools { display: none; margin: 0 0 22px; }
.mobile-tools .pill { font-size: 11px; min-height: 34px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.profile-stats div { display: flex; flex-direction: column; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 17px 8px; }
.profile-stats strong { font: 29px var(--serif); } .profile-stats span { font-size: 10px; color: var(--muted); margin-top: 4px; }
.tab-row { display: flex; gap: 7px; overflow: auto; scrollbar-width: none; padding: 3px 0; margin-bottom: 22px; }
.tab-row .pill { font-size: 11px; min-height: 36px; padding: 8px 14px; }
.library-intro { display: flex; align-items: center; gap: 15px; font-size: 12px; line-height: 1.8; margin-bottom: 22px; }
.library-intro .pill { width: 36px; flex-shrink: 0; padding: 0; }
.library-list { display: flex; flex-direction: column; gap: 16px; }
.library-card { padding: 22px; border: 1px solid var(--border); background: var(--panel); border-radius: 23px; }
.library-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 9px; color: var(--accent); margin-bottom: 12px; }
.library-meta span:last-child { color: var(--muted); }
.library-title { display: flex; gap: 15px; align-items: center; background: none; color: var(--text); padding: 0; font: 22px/1.4 var(--serif); text-align: left; width: 100%; }
.library-title svg { width: 15px; height: 15px; margin-left: auto; }
.library-card > p { margin-top: 10px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); margin: 20px 0 8px; }
.progress-label strong { color: var(--accent); font-weight: 500; }
.progress-track { height: 5px; border: 1px solid var(--line); background: #a3825914; border-radius: 99px; overflow: hidden; }
.progress-track div { height: 100%; background: linear-gradient(90deg, #a86329, #e5b270); border-radius: 99px; transition: width .4s; }
.library-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.library-actions .pill { font-size: 10px; min-height: 34px; padding: 7px 12px; }
.library-actions .pill svg { width: 14px; height: 14px; }
.reader-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.reader-top .pill { font-size: 10px; min-height: 34px; padding: 8px 12px; }
.reader-top .eyebrow { letter-spacing: 1px; font-size: 8px; }
.reader-heading { padding: 22px; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); }
.reader-heading h1 { font-size: 29px; margin: 12px 0 16px; line-height: 1.35; overflow-wrap: anywhere; }
.reader-heading > p { font-size: 12px; }
.reader-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.reader-actions .pill { font-size: 10px; }
.imrad-legend { display: flex; flex-wrap: wrap; gap: 8px 15px; margin: 20px 0; font-size: 9px; color: var(--muted); }
.imrad-legend > span { display: flex; align-items: center; gap: 5px; }
.imrad-legend .imrad { width: 20px; height: 20px; font-size: 10px; }
.part-pills { display: flex; gap: 7px; overflow: auto; scrollbar-width: none; padding: 4px 0; margin-bottom: 22px; }
.part-pills .pill { min-height: 36px; padding: 5px 9px; font-size: 12px; gap: 6px; }
.part-pills .pill svg { width: 12px; height: 12px; }
dialog { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 25px; padding: 0; max-width: 520px; width: calc(100% - 32px); max-height: calc(100dvh - 60px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); box-shadow: 0 30px 120px #0009; overscroll-behavior: contain; }
dialog.wide { max-width: 800px; }
dialog::backdrop { background: #080604a8; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 24px 24px 17px; background: var(--card); position: sticky; top: 0; z-index: 2; }
.modal-head h2 { font-size: 26px; }
.modal-head .pill { min-width: 36px; min-height: 36px; padding: 0; }
.modal-body { padding: 0 24px 26px; }
.modal-body > p { font-size: 13px; line-height: 1.8; }
.modal-body h3 { line-height: 1.5; margin-bottom: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
label { display: block; font-size: 12px; color: var(--body); font-weight: 500; margin-top: 22px; }
input:not([type=checkbox]):not([type=file]), textarea { width: 100%; display: block; background: var(--glass); border: 1px solid var(--border); color: var(--text); border-radius: 15px; padding: 13px 15px; margin-top: 9px; outline: none; font-size: 16px; line-height: 1.5; min-height: 48px; }
input::placeholder, textarea::placeholder { color: var(--muted); font-size: 13px; font-weight: 400; }
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 12px; }
.checkbox-label input { width: 18px; height: 18px; margin: 1px 0; accent-color: var(--accent); flex-shrink: 0; }
.checkbox-label:has(input:disabled) { opacity: .6; }
.feed-setting { padding: 18px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; gap: 12px; }
.feed-setting strong { display: block; color: var(--text); font-size: 13px; font-weight: 550; }
.feed-setting small { display: block; color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 8px; }
.form-error { font-size: 12px; color: #e9a58f; margin-top: 15px; min-height: 0; }
.form-error:empty { margin: 0; }
.modal-body form > .small { margin-top: 10px; }
.source-text { font: 13px/1.9 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; margin: 20px 0; color: var(--body); }
.source-heading { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.provenance { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px 18px; font-size: 12px; margin-top: 24px; }
.provenance dt { color: var(--muted); } .provenance dd { margin: 0; overflow-wrap: anywhere; }
.file-label { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px dashed var(--border); border-radius: 18px; padding: 22px; cursor: pointer; }
.file-label input { width: 100%; font-size: 12px; margin-top: 4px; } .file-label > svg { width: 30px; height: 30px; color: var(--accent); }
.folder-list { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; } .folder-list .pill { justify-content: flex-start; }
.install-steps { display: grid; grid-template-columns: 30px 1fr; gap: 16px; margin: 12px 0 25px; font-size: 13px; }
.step { display: grid; place-content: center; height: 28px; width: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--glass); color: var(--accent); }
#toast { position: fixed; left: 50%; transform: translate(-50%, 15px); bottom: calc(96px + env(safe-area-inset-bottom)); max-width: calc(100% - 36px); width: max-content; background: var(--card); border: 1px solid var(--border); border-radius: 17px; padding: 14px 20px; color: var(--text); font-size: 12px; line-height: 1.6; z-index: 101; opacity: 0; pointer-events: none; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
.auth-page { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: linear-gradient(#0003, #0009), url('/assets/discovery.webp') center/cover; display: flex; align-items: center; justify-content: center; min-height: 680px; }
.big { width: 128px; height: 128px; font-size: 78px; border-radius: 36px; z-index: 2; transform: rotate(-8deg); background: #17110a9e; border-color: #e9b37659; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 20px 85px #0005; margin-top: -120px; }
.big span { font-size: 45px; right: 25px; bottom: 17px; }
.orbit { display: none; }
.auth-caption { position: absolute; bottom: 65px; left: 12%; right: 10%; z-index: 2; }
.auth-caption h1 { font-size: 58px; line-height: 1.08; margin: 18px 0; color: #faf3e9; }
.auth-caption p { font-size: 13px; color: #dbceb9; line-height: 1.9; }
.auth-panel { display: flex; flex-direction: column; align-items: center; padding: 42px; min-width: 0; }
.auth-panel > .brand { align-self: flex-start; }
.auth-form-wrap { margin: auto; padding: 45px 0; width: 100%; max-width: 350px; }
.auth-form-wrap h2 { font-size: 34px; margin: 13px 0; }
.auth-form-wrap > .muted { font-size: 13px; }
.auth-switch { font-size: 12px; color: var(--muted); text-align: center; margin-top: 20px; } .auth-switch button { margin-left: 5px; }
.auth-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; font-size: 10px; color: var(--muted); }
.auth-footer > .pill { font-size: 10px; min-height: 34px; }
.auth-footer a { display: flex; align-items: center; gap: 5px; } .auth-footer a svg { width: 12px; height: 12px; }
@media(min-width: 1500px) { .app-shell { max-width: 1450px; grid-template-columns: 220px minmax(0, 720px) 270px; gap: 40px; } }
@media(max-width: 1199px) { .app-shell { grid-template-columns: 205px minmax(0, 680px); max-width: 1020px; gap: 30px; } .right-rail { display: none; } }
@media(max-width: 899px) {
  .app-shell { display: block; max-width: 680px; padding: 0 16px 125px; }
  .aside { display: none; } .dock { display: flex; } .mobile-tools { display: flex; }
  .top { margin: 0 -16px; padding: env(safe-area-inset-top) 16px 0; }
  .top-inner { position: static; justify-content: space-between; padding: 20px 4px 12px; }
  .top-inner > .brand { display: inline-flex; } .top-right .profile-link { display: block; }
  .top-right > .pill { width: 34px; min-height: 34px; } .account-avatar { width: 34px; height: 34px; font-size: 18px; }
  .toolbar-inner { padding: 0 0 15px; gap: 7px; }
  .toolbar-inner > .pill { flex-basis: 38px; height: 38px; min-height: 38px; }
  .specialties .pill { font-size: 11px; min-height: 34px; padding: 8px 13px; }
  #connection { padding: 0 4px 12px; font-size: 10px; }
  #main { padding-top: 17px; }
  .post-card h2 { font-size: 27px; }
  .artwork { aspect-ratio: 1.55; }
  .auth-page { display: block; } .auth-art { min-height: 0; height: 240px; background-position: center 43%; }
  .auth-art .big { display: none; } .auth-caption { bottom: 27px; left: 28px; right: 28px; }
  .auth-caption h1 { font-size: 40px; margin: 10px 0; } .auth-caption p { font-size: 11px; }
  .auth-panel { padding: 29px 28px 35px; } .auth-panel > .brand { display: none; }
  .auth-form-wrap { padding: 8px 0 25px; } .auth-form-wrap h2 { font-size: 30px; }
  .auth-form-wrap > .eyebrow { font-size: 9px; } .auth-footer { padding-bottom: env(safe-area-inset-bottom); }
}
@media(max-width: 420px) {
  .app-shell { padding: 0 10px 125px; } .top { margin: 0 -10px; padding-left: 16px; padding-right: 16px; }
  .brand { font-size: 25px; } .top-inner { padding-top: 18px; }
  .post-card { padding: 7px; border-radius: 21px; } .artwork { border-radius: 14px; }
  .post-content { padding: 13px 10px 8px; } .post-card h2 { font-size: 26px; }
  .explanation { padding: 13px; margin-top: 15px; }
  .explanation-text { font-size: 12px; line-height: 1.8; } .explanation-label { font-size: 10px; }
  .post-meta { font-size: 8px; gap: 7px; } .ai-tag, .read-marker { font-size: 8px; }
  .journal-pill { font-size: 9px; } .art-top { top: 9px; left: 9px; right: 9px; }
  .feed-heading { padding: 0 7px; } .feed-heading h1 { font-size: 18px; }
  .post-details summary { padding: 11px 9px; font-size: 10px; }
  .source-row { gap: 6px; } .source-row .pill { font-size: 9px; padding: 6px 9px; }
  .profile-head { padding: 0 6px; } .profile-head h1 { font-size: 25px; }
  .library-card { padding: 20px; } .library-title { font-size: 21px; }
  .reader-top { padding: 0 6px; } .reader-heading { padding: 20px; } .reader-heading h1 { font-size: 26px; }
  .dock a { width: 122px; } .modal-head { padding: 22px 20px 15px; } .modal-body { padding: 0 20px 24px; }
  .modal-head h2 { font-size: 24px; } .provenance { grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
}
@media(max-width: 350px) { .brand { font-size: 23px; } .top-right { gap: 7px; } .dock a { width: 112px; } .post-details > details { flex-basis: 100%; } }
.post-card h2 a:hover { color: var(--accent); }
.journal-pill { cursor: pointer; font-family: inherit; max-width: calc(100% - 46px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal-pill:hover { border-color: var(--accent); }
.feed-modes { margin-bottom: 20px; }
.full-post .explanation-text { font-size: 15px; line-height: 1.9; }
.full-post .post-details > details { flex-basis: 100%; }
.recommendation-section { margin: 32px 0; padding-top: 24px; border-top: 1px solid var(--border); }
.recommendation-section h2 { margin: 8px 0; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.related-card { min-width: 0; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--panel); }
.related-card:hover { border-color: var(--accent); }
.related-link { display: block; height: 100%; }
.related-art.artwork { border-radius: 0; aspect-ratio: 1.8; }
.related-body { padding: 15px; }
.related-body h3 { font-size: 20px; margin: 8px 0; overflow-wrap: anywhere; }
.related-body p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.collection-folder, .journal-banner, .journal-card { padding: 24px; background: var(--panel); border: 1px solid var(--border); border-radius: 22px; margin-bottom: 18px; }
.collection-folder h2 { margin: 8px 0; }
.collection-folder p { font-size: 13px; margin: 10px 0; }
.journal-banner h1 { margin: 12px 0; overflow-wrap: anywhere; }
.journal-banner p { margin: 12px 0; }
.journal-card > .pill, .journal-banner > .pill { margin-top: 16px; }
.journal-title { display: flex; align-items: center; gap: 13px; }
.journal-title span { flex: 1; min-width: 0; }
.journal-title h2 { font-size: 23px; overflow-wrap: anywhere; }
.journal-title small { color: var(--muted); font-size: 11px; }
.journal-card > p { margin-top: 10px; }
.journal-intro { font-size: 13px; margin: 0 6px 24px; }
@media(max-width: 420px) { .related-grid { grid-template-columns: 1fr; } .related-link { display: grid; grid-template-columns: 90px minmax(0,1fr); } .related-art.artwork { height: 100%; aspect-ratio: auto; } .related-body h3 { font-size: 19px; } .full-post .explanation-text { font-size: 14px; } }
@media(prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
