:root {
  --bg: #fcfbf8;
  --paper: #fff;
  --ink: #26231f;
  --muted: #77716a;
  --line: #e8e4dd;
  --accent: #ce642e;
  --soft: #f3f0ea;
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-bottom: var(--tg-safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button, a, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none!important; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.icon { width: 21px; height: 21px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
button svg, a svg { pointer-events: none; }
.app-shell { max-width: 1040px; margin: auto; min-height: 100dvh; padding: calc(20px + var(--safe-top)) 22px calc(100px + var(--safe-bottom)); }
.topbar { min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 27px; }
.brand { display: inline-flex; align-items: center; gap: 10px; letter-spacing: -.25px; }
.brand-mark { width: 40px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: #f5e8d8; color: #a95c32; }
.brand-mark .icon { width: 27px; height: 27px; }
.brand-name { font-size: 16px; font-weight: 650; line-height: 1.2; }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { font-size: 32px; font-weight: 650; letter-spacing: -1px; line-height: 1.15; margin: 0 0 10px; }
.page-heading>p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }
.library-hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #ecdcd0; border-radius: 20px; background: #f3dfd4; min-height: 264px; margin-bottom: 22px; }
.library-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; z-index: -2; }
.library-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#f7e7dbb0 0%,#f7e7db65 50%,transparent 66%); }
.library-hero-copy { width: 59%; padding: 23px 0 23px 21px; }
.library-hero h2 { color: #382116; font-size: clamp(25px,6.8vw,44px); font-weight: 820; line-height: 1.04; letter-spacing: -.055em; margin: 0 0 13px; }
.library-hero h2 span { display: block; color: #994625; }
.library-hero-copy>p { max-width: 174px; font-size: 12px; line-height: 1.5; color: #7c6250; margin: 0 0 18px; }
.library-hero-button { font-size: 12px; padding: 11px 12px; gap: 6px; min-height: 42px; }
.library-hero-button .icon { width: 16px; height: 16px; }
.library-filters { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-top: 1px; margin-bottom: 25px; }
.search-box { display: flex; gap: 11px; align-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 0 14px; color: var(--muted); }
.search-box .icon { width: 19px; height: 19px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; padding: 12px 0; font-size: 16px; }
.search-box input:focus-visible { outline: 0; }
.search-box input::placeholder { color: #847d74; }
.search-clear { background: none; border: 0; padding: 6px; display: grid; place-items: center; }
.format-tabs { display: flex; align-items: center; gap: 25px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.format-tab { position: relative; white-space: nowrap; padding: 13px 0 12px; font-size: 13px; color: var(--muted); font-weight: 450; }
.format-tab.active { color: var(--ink); font-weight: 600; }
.format-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.filter-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 55px; padding-bottom: 2px; }
.topic-select { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.topic-select select { border: 0; appearance: none; background: transparent; padding: 11px 23px 11px 0; max-width: 100%; font-size: 12px; font-weight: 500; outline-offset: 0; cursor: pointer; }
.topic-select .icon { position: absolute; right: 0; width: 13px; height: 13px; transform: rotate(90deg); pointer-events: none; }
.result-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.article-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.material-card { min-width: 0; }
.cover-link { display: block; background: #f0eeeb; border-radius: 10px; overflow: hidden; margin-bottom: 17px; aspect-ratio: 680/330; }
.cover-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.editorial-cover { background: #f2e9dd; }
.editorial-cover img { object-fit: contain; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 11px; line-height: 1.4; margin-bottom: 8px; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-title-row h2 { font-size: 21px; font-weight: 620; line-height: 1.25; letter-spacing: -.55px; margin: 0 0 10px; }
.card-title-row h2 a { display: block; }
.card-title-row h2 a:hover { color: #98623f; }
.saved-button { background: transparent; padding: 10px; min-width: 44px; min-height: 44px; border: 0; display: grid; place-items: center; color: #8a837b; margin: -8px -10px 0 0; flex-shrink: 0; }
.saved-button .icon { width: 20px; height: 20px; }
.saved-button.saved { color: var(--accent); }
.saved-button.saved .icon { fill: #ce642e15; }
.card-summary { font-size: 14px; line-height: 1.6; color: #797168; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.read-link, .site-link { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; line-height: 1.4; min-height: 44px; }
.read-link { font-weight: 550; }
.read-link .icon { width: 16px; height: 16px; }
.site-link { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.site-link .icon { width: 13px; height: 13px; }
.copy-small { border: 1px solid var(--line); background: none; padding: 8px 10px; border-radius: 7px; font-size: 11px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.copy-small .icon { width: 14px; height: 14px; }
.prompt-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fffefa; }
.prompt-card .card-title-row h2 { font-size: 20px; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3,1fr); width: 100%; max-width: 1040px; padding: 8px 14px calc(11px + var(--safe-bottom)); background: var(--bg); border-top: 1px solid var(--line); z-index: 20; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 46px; font-size: 10px; color: #81786f; }
.nav-item .icon { width: 21px; height: 21px; }
.nav-item.active { color: var(--accent); font-weight: 600; }
.page-heading { margin-bottom: 28px; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; border-radius: 9px; padding: 12px 16px; font-size: 13px; line-height: 1.4; font-weight: 550; border: 0; }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: #bc5825; }
.secondary { background: none; border: 1px solid var(--line); }
.primary .icon, .secondary .icon { width: 17px; height: 17px; }
.full { width: 100%; }
.text-button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; color: var(--accent); border: 0; background: none; padding: 10px 0; font-size: 12px; }
.empty { max-width: 440px; margin: auto; padding: 50px 0; }
.empty h2 { font-size: 25px; font-weight: 600; letter-spacing: -.6px; margin: 0 0 12px; }
.empty p { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0 0 23px; }
.empty .text-button { display: block; margin-top: 9px; }
.article-view { max-width: 700px; margin: auto; }
.article-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
.back-button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; font-size: 13px; color: var(--muted); }
.back-button .icon { width: 18px; height: 18px; }
.article-heading { margin: 0 0 25px; }
.article-meta { color: var(--muted); font-size: 12px; display: flex; gap: 7px; line-height: 1.5; margin-bottom: 14px; }
.article-heading h1 { font-size: 31px; font-weight: 620; line-height: 1.18; letter-spacing: -1px; margin: 0 0 22px; overflow-wrap: anywhere; }
.article-cover { width: 100%; aspect-ratio: 680/330; object-fit: contain; border-radius: 10px; display: block; background: var(--soft); }
.article-toc { border-block: 1px solid var(--line); margin: 25px 0 29px; }
.article-toc summary { display: flex; gap: 12px; list-style: none; cursor: pointer; align-items: center; padding: 17px 0; font-size: 14px; font-weight: 550; }
.article-toc summary::-webkit-details-marker { display: none; }
.article-toc summary span { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: auto; }
.article-toc summary .icon { width: 15px; height: 15px; transform: rotate(90deg); }
.article-toc[open] summary .icon { transform: rotate(-90deg); }
.article-toc>div { padding-bottom: 18px; }
.article-toc button { display: block; text-align: left; border: 0; background: none; font-size: 13px; line-height: 1.5; color: #736a61; padding: 7px 0; }
.article-content { font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.article-content p { margin: 0 0 20px; }
.article-content h2 { font-size: 23px; line-height: 1.3; font-weight: 620; letter-spacing: -.5px; margin: 35px 0 15px; scroll-margin-top: 20px; }
.article-content ul, .article-content ol { padding-left: 23px; margin: 0 0 24px; }
.article-content li { padding: 0 0 9px 3px; }
.article-content li::marker { color: #a89685; }
.note { border-left: 2px solid var(--accent); color: #70604f; font-size: 14px; line-height: 1.7; margin: 28px 0; padding: 1px 0 1px 18px; }
.prompt-block { background: #f4f2ed; border: 1px solid #e8e2d9; border-radius: 10px; overflow: hidden; margin: 26px 0; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e6e0d6; padding: 11px 14px; font-size: 11px; color: #776e64; line-height: 1.5; }
.prompt-head>span { min-width: 0; }
.prompt-head button { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 5px 0; flex-shrink: 0; font-size: 10px; }
.prompt-head .icon { width: 13px; height: 13px; }
.prompt-block pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 17px 15px 20px; font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; user-select: text; }
.source-figure { isolation: isolate; contain: paint; margin: 25px 0; max-width: 100%; overflow: auto; }
.source-figure img { max-width: 100%; height: auto; display: block; }
.source-figure figure { margin: 0; }
.source-figure p { margin: 0; }
.source-figure svg { flex-shrink: 0; }
.source-figure figcaption { font-size: 12px; line-height: 1.5; margin-top: 7px; color: var(--muted); }
.content-image { margin: 27px 0; }
.content-image img, .content-image video { width: 100%; border-radius: 9px; display: block; }
.content-image figcaption { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 9px; }
.content-link a { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.content-link .icon { width: 14px; height: 14px; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 27px; }
.source-credit { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 35px 0 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.source-credit a { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; }
.source-credit .icon { width: 12px; height: 12px; }
.article-end { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px; margin-top: 15px; }
.is-read { background: #ebece6; color: #526148; }
.related { border-top: 1px solid var(--line); margin-top: 45px; padding-top: 27px; }
.related>h2 { font-size: 21px; font-weight: 600; letter-spacing: -.4px; margin-bottom: 24px; }
.article-sources { border-top: 1px solid var(--line); padding: 20px 0; margin-top: 25px; }
.article-sources h3 { font-size: 14px; font-weight: 550; }
.article-sources a { display: flex; gap: 12px; justify-content: space-between; font-size: 12px; padding: 8px 0; color: var(--accent); }
.article-sources .icon { width: 14px; height: 14px; }
.profile-page { max-width: 650px; margin: auto; }
.profile-progress { background: #fffdf9; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 22px; }
.progress-copy { padding: 22px 22px 19px; }
.progress-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.progress-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; margin: 0; }
.progress-heading>strong { font-size: 31px; font-weight: 550; color: #a95c32; letter-spacing: -.8px; }
.progress-heading>strong span { font-size: 17px; margin-left: 2px; }
.progress-caption { font-size: 12px; color: var(--muted); margin: 6px 0 16px; }
.reading-progress { height: 5px; background: #eee4d6; overflow: hidden; border-radius: 3px; margin-bottom: 22px; }
.reading-progress>span { display: block; height: 100%; background: #c67b4b; border-radius: inherit; }
.profile-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.profile-stats>div, .profile-stats>a { display: flex; flex-direction: column; gap: 4px; padding-left: 17px; border-left: 1px solid var(--line); }
.profile-stats>div:first-child { padding-left: 0; border: 0; }
.profile-stats strong { font-size: 25px; font-weight: 550; letter-spacing: -.5px; }
.profile-stats span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.profile-stats span .icon { width: 11px; height: 11px; }
.continue-card { display: flex; align-items: center; gap: 13px; background: #f4eee5; border: 1px solid #e9ddce; border-radius: 11px; padding: 14px 15px; margin-bottom: 24px; min-height: 76px; }
.continue-card:hover { border-color: #cba98b; }
.continue-thumb { width: 55px; height: 55px; object-fit: cover; border: 1px solid #e7d9c7; border-radius: 6px; flex-shrink: 0; }
.continue-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 5px; }
.continue-copy small { font-size: 10px; color: #8f755e; }
.continue-copy strong { font-size: 13px; line-height: 1.45; font-weight: 550; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.continue-card>.icon { width: 17px; height: 17px; color: #987555; }
.sync-status { margin-bottom: 32px; }
.sync-status h2, .settings-section h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.sync-status p { font-size: 13px; line-height: 1.7; color: var(--muted); margin-bottom: 2px; }
.settings-section { margin-bottom: 30px; }
.settings-list { border-top: 1px solid var(--line); }
.setting-row { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 55px; font-size: 13px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 14px 0; }
.setting-row>.icon:first-child { width: 18px; height: 18px; color: #888075; }
.setting-row span { flex: 1; }
.setting-row>.icon:last-child { width: 14px; height: 14px; color: #a69a8e; }
.danger-text { color: #986c58; }
.onboarding { max-width: 440px; margin: auto; padding: calc(22px + var(--safe-top)) 24px calc(30px + var(--safe-bottom)); }
.onboarding .brand { margin-bottom: 28px; }
.onboard-art { width: 100%; aspect-ratio: 1.55; object-fit: cover; object-position: 76% 30%; display: block; border-radius: 14px; margin-bottom: 29px; }
.onboarding h1 { font-size: 38px; font-weight: 630; letter-spacing: -1.4px; line-height: 1.1; margin-bottom: 18px; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 18px; }
.onboard-counts { font-size: 12px; line-height: 1.5; color: var(--muted); padding-bottom: 21px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.check-row { display: flex; align-items: flex-start; gap: 11px; font-size: 11px; line-height: 1.8; margin: 14px 0; color: #777066; }
.check-row input { accent-color: var(--accent); width: 19px; height: 19px; margin: 1px 0 0; flex-shrink: 0; }
.check-row a { color: #8c583b; border-bottom: 1px solid #cfb59c; }
.onboarding>.primary { margin-top: 17px; }
.onboard-footer { display: flex; justify-content: center; gap: 17px; font-size: 10px; color: var(--muted); margin-top: 20px; }
.notice { background: #f5efe5; color: #826b50; border-left: 2px solid #d1b58b; font-size: 12px; line-height: 1.7; padding: 12px 14px; margin-bottom: 20px; }
.document { max-width: 650px; }
.document .article-heading { margin-top: 26px; }
.document .pill { font-size: 11px; color: var(--muted); }
.document .article-heading h1 { font-size: 29px; margin-top: 13px; }
.article-intro { color: var(--muted); font-size: 15px; line-height: 1.7; }
.document .article-content { font-size: 14px; }
.document .article-content h2 { font-size: 20px; }
.loading, .hold { min-height: 100dvh; max-width: 440px; margin: auto; padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.loading { align-items: center; color: var(--muted); font-size: 13px; }
.hold h1 { font-size: 31px; font-weight: 600; letter-spacing: -.8px; line-height: 1.2; }
.hold p { color: var(--muted); font-size: 14px; line-height: 1.8; margin-bottom: 25px; }
.hold .primary { margin-bottom: 10px; }
#toast { position: fixed; left: 50%; bottom: calc(88px + var(--safe-bottom)); transform: translateX(-50%); max-width: min(90vw,420px); width: max-content; font-size: 12px; line-height: 1.55; padding: 11px 15px; border-radius: 8px; background: #302b25; color: #fff; opacity: 0; pointer-events: none; z-index: 50; transition: opacity .15s; }
#toast.show { opacity: 1; }
dialog { border: 1px solid var(--line); background: var(--bg); border-radius: 13px; padding: 25px; color: var(--ink); width: calc(100% - 40px); max-width: 370px; }
dialog::backdrop { background: #241f1866; }
dialog h2 { font-size: 24px; font-weight: 600; letter-spacing: -.6px; margin-bottom: 12px; }
dialog p { font-size: 14px; line-height: 1.7; color: var(--muted); margin-bottom: 23px; }
dialog .secondary { margin-top: 10px; }
.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; }
main:focus { outline: 0; }
@media(min-width:700px) {
 .app-shell { padding: 28px 32px 110px; }
 .topbar { margin-bottom: 36px; }
 .library-filters { margin-bottom: 30px; }
 .search-box { max-width: 520px; }
 .article-list { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 28px; row-gap: 43px; }
 .material-card { display: flex; flex-direction: column; }
 .card-actions { margin-top: auto; }
 .bottom-nav { max-width: 490px; padding-inline: 28px; }
 .article-heading h1 { font-size: 39px; letter-spacing: -1.3px; }
 .article-content { font-size: 17px; }
 .profile-stats, .sync-status, .settings-section { max-width: 650px; }
 .library-hero { min-height: 310px; }
 .library-hero-copy { width: 48%; padding: 29px 0 29px 31px; }
 .library-hero-copy>p { font-size: 14px; max-width: 245px; }
 .library-hero-button { font-size: 13px; padding-inline: 15px; }
 .profile-page .continue-card { margin-bottom: 29px; }
 .progress-copy { padding: 25px 28px; }
 #library-resume { max-width: 520px; }
}
@media(max-width:360px) {
 .app-shell { padding-inline: 18px; }
 .format-tabs { justify-content: space-between; gap: 12px; }
 .format-tab { font-size: 12px; }
 .card-title-row h2 { font-size: 20px; }
 .article-heading h1 { font-size: 28px; }
 .article-content { font-size: 15px; }
 .prompt-head { gap: 7px; padding-inline: 11px; }
 .prompt-head>span { font-size: 10px; }
 .prompt-head button { font-size: 0; }
 .prompt-head button .icon { width: 17px; height: 17px; }
 .onboarding h1 { font-size: 34px; }
 .brand-name { font-size: 14px; }
 .brand-mark { width: 34px; height: 38px; }
 .brand-mark .icon { width: 25px; height: 25px; }
 .topbar { gap: 8px; }
 .continue-thumb { width: 45px; height: 45px; }
 .continue-card { padding-inline: 12px; gap: 10px; }
 .progress-copy { padding: 18px 17px; }
 .profile-stats>div, .profile-stats>a { padding-left: 12px; }
 .library-hero-copy { width: 62%; padding-left: 17px; }
 .library-hero-copy>p { font-size: 11px; max-width: 146px; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto!important; transition: none!important; } }

@media(min-width:900px) {
 .nav-item { flex-direction:row; min-height:42px; font-size:12px; }
 .nav-item .icon { display:none; }
}

/* Mobile library, lessons and workspace */
:root {
 --brown: #2c211b;
 --warm-white: #fcfaf6;
 --accent: #a9502b;
 --muted: #6c645d;
}
.app-shell { max-width: 1120px; }
.topbar { margin-bottom: 22px; }
.tab-heading { margin: 0; }
.tab-heading .brand { gap: 9px; }
.tab-heading .brand-name { font-size: clamp(20px,6.6vw,28px); line-height: 1.12; font-weight: 690; letter-spacing: -.65px; }
.topbar-with-intro { align-items: flex-start; margin-bottom: 28px; }
.tab-intro { min-width: 0; }
.tab-intro .brand-name { font-size: clamp(24px,7.3vw,32px); overflow-wrap: anywhere; }
.tab-intro p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 11px 0 0; }
.library-search { margin-bottom: 18px; }
.library-search .search-box { max-width: none; min-height: 50px; background: #fffdfb; }
.search-box:focus-within { border-color: #b78264; box-shadow: 0 0 0 3px #ebd6c769; }
.search-clear { min-width: 36px; min-height: 36px; margin-right: -8px; border-radius: 8px; }
.library-hero { min-height: 238px; margin-bottom: 17px; }
.library-hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: inherit; padding-block: 20px; }
.library-hero h2 { text-wrap: balance; }
.library-hero-button { min-height: 44px; }
.library-topics { margin: 29px 0 18px; }
.library-topics h2 { margin: 0 0 14px; font-size: 21px; font-weight: 690; letter-spacing: -.45px; }
.topic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.topic-grid>a { display: flex; align-items: center; gap: 8px; min-height: 58px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf9; font-size: 12px; line-height: 1.25; font-weight: 620; transition: border-color .16s, background .16s, transform .16s; }
.topic-grid>a>span:nth-child(2) { flex: 1; min-width: 0; }
.topic-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; }
.topic-icon .icon { width: 18px; height: 18px; color: #9b552f; }
.topic-grid>a>.icon { width: 11px; height: 11px; color: #8f7866; }
.topic-grid>a.topic-routes { color: #fff9f2; background: #814426; border-color: #814426; }
.topic-grid>a.topic-routes .icon { color: #ffe4d0; }
.topic-grid>a.topic-routes>.icon { width: 14px; height: 14px; }
.library-filters { margin-bottom: 18px; }
.format-tab { min-height: 44px; }
.topic-select select { min-height: 44px; }
.material-card { overflow-wrap: anywhere; }
.material-card:not(.prompt-card) { border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.more-row { display: flex; justify-content: center; padding: 24px 0 0; }
[class*="palette-"] { --panel: #f2e7d9; --panel-ink: #64422f; }
.palette-mobile { --panel: #372820; --panel-ink: #ffefe1; }
.palette-video { --panel: #e9e4f0; --panel-ink: #51455e; }
.palette-image { --panel: #f5e4da; --panel-ink: #744b3d; }
.palette-text { --panel: #f2ead8; --panel-ink: #675239; }
.palette-product, .palette-growth { --panel: #e9eadc; --panel-ink: #465139; }
.palette-ai, .palette-development { --panel: #e1eaeb; --panel-ink: #365654; }
.palette-automation { --panel: #eee6da; --panel-ink: #614330; }
.palette-finance { --panel: #ebeadd; --panel-ink: #4a543b; }
.courses-page { max-width: 870px; margin: auto; }
.course-list { display: grid; gap: 12px; }
.course-tile { display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: 6px; min-height: 162px; border-radius: 16px; border: 1px solid #42332712; padding: 17px 18px 14px; color: var(--panel-ink); background: var(--panel); transition: transform .18s, box-shadow .18s; }
.course-icon { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 3px; border: 1px solid currentColor; border-radius: 12px; }
.course-icon .icon { width: 19px; height: 19px; }
.course-tile h2 { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.2; letter-spacing: -.4px; }
.course-tile p { font-size: 13px; line-height: 1.5; margin: 0; opacity: .88; }
.course-footer { display: flex; justify-content: space-between; align-items: center; font-size: 11px; margin-top: 6px; }
.course-footer .icon { width: 17px; height: 17px; }
.course-page, .tool-page, .tool-list { max-width: 700px; margin-inline: auto; }
.course-page>.back-button, .tool-page>.back-button { margin-bottom: 15px; }
.course-intro { border-radius: 19px; overflow: hidden; background: radial-gradient(ellipse at 98% 5%,#fff2 0,transparent 65%),var(--panel); color: var(--panel-ink); padding: 23px; margin-bottom: 25px; }
.course-intro .course-icon { margin: 0 0 17px; }
.course-intro h1 { font-size: clamp(28px,8vw,44px); line-height: 1.1; margin-bottom: 10px; letter-spacing: -1px; text-wrap: balance; }
.course-intro p { font-size: 14px; line-height: 1.55; margin-bottom: 20px; }
.course-count { font-size: 12px; margin-bottom: 7px; }
.course-progress { display: block; width: 100%; height: 5px; border: 0; appearance: none; color: #b15c32; background: #796b5b45; border-radius: 6px; overflow: hidden; margin-bottom: 17px; }
.course-progress::-webkit-progress-bar { background: #796b5b45; }
.course-progress::-webkit-progress-value { background: #b15c32; }
.course-progress::-moz-progress-bar { background: #b15c32; }
.course-intro.palette-mobile .course-progress { background: #fff3; color: #f4a56f; }
.course-intro.palette-mobile .course-progress::-webkit-progress-value { background: #f4a56f; }
.course-intro.palette-mobile .primary { background: #fae7d6; color: #432c20; }
.lessons-title { font-size: 21px; letter-spacing: -.4px; }
.lesson-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lesson-list a { display: grid; grid-template-columns: 32px minmax(0,1fr) 16px; align-items: center; gap: 12px; min-height: 64px; padding: 11px 1px; border-bottom: 1px solid var(--line); }
.lesson-index { display: grid; place-items: center; width: 32px; height: 32px; background: #f1e5d8; color: #8d4e30; border-radius: 9px; font-size: 12px; }
.lesson-index .icon { width: 15px; height: 15px; }
.lesson-list a strong { display: block; line-height: 1.35; font-size: 14px; font-weight: 620; }
.lesson-list a small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.lesson-list a>.icon { width: 14px; height: 14px; }
.article-toolbar { margin-bottom: 19px; }
.article-toolbar .back-button,.course-page>.back-button,.tool-page>.back-button { min-height: 44px; }
.article-course-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--accent); font-size: 12px; }
.article-course-link .icon { width: 15px; height: 15px; }
.editorial-heading { border-radius: 16px; color: var(--panel-ink); background: var(--panel); padding: 24px 20px 20px; }
.editorial-heading .article-meta,.editorial-heading .article-intro { color: inherit; opacity: .88; }
.editorial-heading h1 { margin-bottom: 12px; }
.editorial-heading .article-intro { margin-bottom: 0; }
.article-content .note { border-radius: 0 10px 10px 0; background: #f5e9d8; color: #5a4233; }
.article-sources a { min-height: 44px; align-items: center; }
.workshop-tile { display: flex; align-items: center; gap: 12px; justify-content: space-between; color: var(--ink); padding: 16px 17px; min-height: 56px; border: 1px solid var(--line); background: #f7efe4; border-radius: 12px; transition: border-color .16s, transform .16s, background .16s; }
.workshop-tile strong { display: block; font-size: 15px; line-height: 1.35; font-weight: 620; }
.workshop-tile p { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 5px 0 0; }
.workshop-tile>.icon { width: 17px; height: 17px; color: var(--accent); }
.next-lesson,.inline-tool { margin-top: 20px; }
.next-lesson small { display: block; margin-bottom: 5px; font-size: 11px; color: var(--muted); }
.inline-tool>strong { flex: 1; }
.tool-list { display: grid; gap: 10px; }
.calculator-fields { display: grid; gap: 13px; margin-bottom: 18px; }
.calculator-field { display: grid; gap: 6px; align-content: end; font-size: 13px; color: var(--ink); }
.calculator-field input { width: 100%; min-height: 45px; padding: 9px 12px; border: 1px solid #ddd4ca; border-radius: 8px; font-size: 16px; background: #fffdf9; }
.calculator-output { min-height: 82px; padding: 11px 15px; border-radius: 12px; background: #f1e3d4; color: #543b2c; }
.calculator-output dl { margin: 0; }
.calculator-output dl>div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px; min-height: 37px; border-bottom: 1px solid #d9c4b1; }
.calculator-output dl>div:last-child { border-bottom: 0; }
.calculator-output dt { font-size: 12px; }
.calculator-output dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 650; overflow-wrap: anywhere; }
.calculator-output p,.calculator-note { font-size: 12px; color: #695344; line-height: 1.55; margin: 12px 0; }
.calculator-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.calculator-actions .text-button { min-height: 44px; }
.calculator-actions .text-button .icon { width: 14px; height: 14px; }
.bottom-nav { grid-template-columns: repeat(4,1fr); padding: 6px 9px calc(7px + var(--safe-bottom)); background: #fcfbf8f5; }
.nav-item { margin: 0 1px; gap: 5px; min-height: 49px; border-radius: 11px; transition: background .16s, color .16s; }
.nav-item.active { background: #f2e3d6; color: #874421; }
.loading { min-height: 100vh; min-height: 100dvh; padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); text-align: center; }
.launch-stage {
 --sticker-size: clamp(172px, 53vw, 222px);
 position: relative; isolation: isolate; width: min(318px,100%);
 height: calc(var(--sticker-size) + 40px); margin-bottom: 24px;
}
.launch-ring { position: absolute; inset: 20% 11px 17%; border: 1px solid #ebd6c0; border-radius: 50%; transform: rotate(-16deg); background: radial-gradient(ellipse,#fde7cf80,transparent 72%); }
.launch-sticker { position: absolute; width: var(--sticker-size); height: var(--sticker-size); left: calc((100% - var(--sticker-size))/2); top: 20px; object-fit: contain; filter: drop-shadow(0 7px 12px #69472925); animation: launch-float 3.2s ease-in-out infinite alternate; }
.launch-piece { position: absolute; display: block; animation: launch-float 2.6s ease-in-out infinite alternate; transform: rotate(var(--angle)); }
.launch-book { --angle: -18deg; width: 33px; height: 37px; top: 49%; left: 12px; border-radius: 5px 7px 7px 5px; background: linear-gradient(115deg,#ab522a 2%,#d57a43 12%,#eca968 90%); border-bottom: 6px solid #fff1dc; box-shadow: 1px 3px 0 #9d4924, 2px 6px 9px #88422331; animation-delay: -.65s; }
.launch-book::after { content: ''; position: absolute; top: 10px; left: 9px; width: 15px; height: 2px; border-radius: 2px; background: #ffd0a2; }
.launch-spark { --angle: 13deg; width: 28px; height: 28px; top: 15%; right: 24px; background: linear-gradient(140deg,#ffe3a3,#d77632); clip-path: polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%); animation-delay: -1.1s; }
.launch-bookmark { --angle: 16deg; width: 19px; height: 34px; bottom: 15%; right: 12px; border-radius: 4px 4px 0 0; clip-path: polygon(0 0,100% 0,100% 100%,50% 76%,0 100%); background: linear-gradient(100deg,#b37450,#e8a976 72%,#ffcf96); animation-delay: -.35s; }
.loading strong { color: #382a21; font-size: clamp(24px,7.7vw,33px); line-height: 1.15; font-weight: 670; letter-spacing: -.75px; }
.loading p { margin: 9px 0 20px; font-size: 15px; }
.loading-track { width: min(168px,60%); height: 5px; overflow: hidden; border-radius: 8px; background: #ecdbcb; }
.loading-track span { display: block; width: 43%; height: 100%; border-radius: 8px; background: linear-gradient(90deg,#9f5736,#d9915a); animation: loading-pass 1.4s ease-in-out infinite alternate; }
.article-origin { color: #77563e; font-size: 13px; font-weight: 600; margin: -2px 0 20px; }
.article-origin span { color: var(--muted); font-weight: 400; }
.rich-content :is(h2,h3) { scroll-margin-top: 20px; }
.article-content h3 { font-size: 19px; line-height: 1.35; font-weight: 650; margin: 24px 0 10px; scroll-margin-top: 20px; }
.rich-content a { color: #8d4828; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rich-content img { display: block; max-width: 100%; height: auto; margin: 18px auto; border: 1px solid var(--line); border-radius: 8px; }
.rich-content p:has(>img:only-child) { margin: 0; }
.rich-content code, .rich-content kbd { padding: 2px 4px; color: #674129; background: #f2e8da; border-radius: 4px; font-size: .87em; }
.rich-content :is(li,td,blockquote) p { margin-bottom: 8px; }
.rich-content blockquote { margin: 20px 0; padding: 12px 14px; background: #f7eee4; border-left: 2px solid #c88e62; }
.rich-content blockquote > :last-child { margin-bottom: 0; }
.rich-content hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.source-table { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin: 20px 0; border: 1px solid var(--line); border-radius: 9px; }
.source-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.source-table :is(th,td) { padding: 9px 11px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.source-table th { background: #f2e5d8; }
.source-video { background: #f5ebe1; color: #75452b; padding: 10px 14px; border-radius: 9px; }
.source-credit strong { color: var(--ink); font-size: 13px; }
.source-credit p { margin: 4px 0 0; }
.source-credit-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.lesson-pending { margin: 20px 0 32px; color: var(--muted); font-size: 13px; }
.lesson-pending span { display: block; height: 10px; width: 94%; border-radius: 10px; margin: 12px 0; background: #eee2d4; animation: lesson-pulse 1.2s ease-in-out infinite alternate; }
.lesson-pending span:nth-of-type(2) { width: 82%; }
.lesson-pending span:nth-of-type(3) { width: 59%; }
.screen-enter { animation: screen-in 190ms cubic-bezier(.2,.75,.3,1) both; }
@keyframes screen-in { from { opacity: .35; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes loading-pass { from { transform: translateX(-10%); } to { transform: translateX(132%); } }
@keyframes launch-float { from { transform: translateY(2px) rotate(var(--angle,0deg)); } to { transform: translateY(-5px) rotate(calc(var(--angle,0deg) + 3deg)); } }
@keyframes lesson-pulse { from { opacity: .6; } to { opacity: 1; } }
@media(hover:hover) {
 .topic-grid>a:hover,.workshop-tile:hover { background: #f2e7d9; border-color: #dcbda4; }
 .course-tile:hover { transform: translateY(-2px); box-shadow: 0 9px 20px #42291515; }
 .topic-grid>a.topic-routes:hover { background: #6e371e; border-color: #6e371e; }
}
.topic-grid>a:active,.course-tile:active,.workshop-tile:active { transform: scale(.985); }
@media(min-width:560px) {
 .calculator-fields,.tool-list,.course-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .topic-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .topic-grid>a { font-size: 13px; gap: 9px; }
}
@media(min-width:360px) {
 .calculator-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(min-width:700px) {
 .library-hero { min-height: 314px; background: #f5dbd3; }
 .library-hero-copy { padding-block: 28px; }
 .library-hero-image { inset: 0 0 0 auto; width: min(72%,592px); object-position: 67% 56%; mask-image: linear-gradient(90deg,transparent,#000 28%); }
 .course-intro { padding: 30px; }
 .editorial-heading { padding: 35px; }
}
@media(min-width:900px) {
 .bottom-nav { position: static; flex: 0 1 400px; width: auto; margin-inline: auto; transform: none; padding: 0; background: none; border: 0; }
 .nav-item { min-height: 42px; }
}
@media(max-width:360px) {
 .library-hero { min-height: 233px; }
 .topic-grid>a { min-height: 55px; gap: 6px; padding-inline: 8px; }
 .topic-icon { width: 22px; flex-basis: 22px; }
 .topic-grid>a:not(.topic-routes)>.icon { display: none; }
 .search-box input::placeholder { font-size: 13px; }
}
@media(prefers-reduced-motion:reduce) {
 .screen-enter,.loading-track span,.launch-sticker,.launch-piece,.lesson-pending span { animation: none; }
}
