/* Three complete reading environments. The classic shell stays in style.css. */
.themed-pages {
  --ink:#242830;
  --muted:#626b78;
  --accent:#135edb;
  --accent-soft:#edf4ff;
  --line:#e0e5eb;
  --surface:#f7f9fc;
  --serif:'Palatino Linotype','Book Antiqua',Palatino,Georgia,serif;
  background:#fff;
  color:var(--ink);
  min-height:100vh;
}
.themed-pages a { text-underline-offset:4px; }
.suite-skip { position:fixed; top:-100px; left:20px; z-index:150; padding:12px 18px; background:#242830; color:white; border-radius:6px; }
.suite-skip:focus { top:12px; }
.themed-pages ::selection { background:#d9e9ff; color:#162b4a; }
.themed-pages input,.themed-pages textarea { caret-color:var(--accent); }
.themed-pages :focus-visible { outline:3px solid #81b6ff; outline-offset:4px; }
.themed-pages .suite-shell { max-width:1440px; margin:auto; padding:0 56px; }
.suite-header { min-height:100px; display:flex; align-items:center; gap:32px; border-bottom:1px solid var(--line); }
.suite-brand { font-size:24px; letter-spacing:-1px; color:var(--ink); text-decoration:none; white-space:nowrap; }
.suite-brand em { font-family:var(--serif); font-weight:400; }
.suite-brand>span { color:var(--accent); }
.suite-navigation { display:flex; align-items:center; flex:1; justify-content:flex-end; gap:22px; }
.suite-navigation a { display:flex; align-items:center; gap:6px; min-height:44px; color:var(--muted); font-size:13px; text-decoration:none; white-space:nowrap; }
.suite-navigation a[aria-current],.suite-navigation a:hover { color:var(--accent); }
.suite-navigation small { font-size:12px; font-variant-numeric:tabular-nums; }
.suite-nav-mark { display:none; }
.suite-search { display:flex; align-items:center; gap:8px; width:138px; }
.suite-search svg,.suite-menu svg { width:20px; height:20px; stroke:currentColor; stroke-width:1.65; fill:none; stroke-linecap:round; }
.suite-search input { width:100%; min-width:0; height:40px; border:0; background:transparent; font-size:13px; padding:6px 0; }
.suite-menu { display:none; }
.suite-location { display:flex; gap:14px; padding:24px 0; color:var(--muted); font-size:12px; }
.suite-location a { color:inherit; text-decoration:none; }
.suite-body { display:grid; grid-template-columns:100px minmax(0,1fr); column-gap:36px; }
.suite-margin { padding-top:9px; display:flex; flex-direction:column; align-items:flex-start; gap:18px; font-size:12px; color:var(--muted); }
.suite-margin .suite-page-mark { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); font-size:18px; color:var(--ink); }
.suite-margin>a { margin-top:24px; color:var(--muted); text-decoration:none; }
.suite-content { min-width:0; padding:0 0 64px; outline:none; }
.suite-content>.intro { margin:0 0 34px; min-height:64px; }
.suite-content>.intro h1 { font-size:32px; line-height:1.3; font-weight:500; letter-spacing:-.025em; }
.suite-content .intro .subtle { margin-top:10px; font-size:13px; }
.suite-content .filters { gap:20px; margin-bottom:22px; }
.suite-content .topic-row { margin-bottom:32px; }
.suite-content .panel { box-shadow:none; }
.suite-content .empty { background:var(--surface); border:0; border-radius:12px; padding:64px 24px; }
.suite-content .empty p { font-size:14px; }
.themed-pages .storage-notice { padding:16px; border:1px solid #b66a1a; border-radius:8px; color:#784200; background:#fff9f0; margin-bottom:24px; }
.suite-footer { border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:20px; padding:28px 0 36px; font-size:12px; color:var(--muted); }
.suite-footer a { color:inherit; text-decoration:none; }
.themed-pages .btn,.themed-pages .tab,.themed-pages .topic { transition:background-color 160ms ease,border-color 160ms ease,color 160ms ease; }
.themed-pages .article-card { min-width:0; }
.themed-pages .card-art { width:100%; min-width:0; }
.themed-pages .article-card h3 { overflow-wrap:anywhere; }
.themed-pages .article-card:hover { transform:none; }
.themed-pages .reader-layout { grid-template-columns:minmax(0,1fr) 300px; gap:40px; align-items:start; }
.themed-pages .reading-paper { min-width:0; border:0; border-radius:0; box-shadow:none; padding:20px 0 40px; }
.themed-pages .reading-paper h1 { font-family:var(--serif); font-size:40px; font-weight:400; line-height:1.2; letter-spacing:-.025em; margin:20px 0 14px; }
.themed-pages .reader-title-zh { font-size:17px; line-height:1.8; margin-bottom:28px; }
.themed-pages .english { font-family:var(--serif); font-size:20px; line-height:1.95; overflow-wrap:anywhere; }
.themed-pages .translation { font-size:15px; line-height:1.9; color:#586373; }
.themed-pages .reader-tools { margin-bottom:16px; }
.themed-pages .audio-bar { margin:0 0 12px; box-shadow:none; border:0; border-radius:8px; background:var(--surface); }
.themed-pages .reader-aside { top:24px; }
.themed-pages .word-panel { border-radius:0; border-width:1px 0; padding:24px 0; }
.themed-pages .word-heading h2 { font-family:var(--serif); font-weight:400; font-size:30px; }
.themed-pages .word-content .example { font-family:var(--serif); font-size:16px; }
.themed-pages .word-footer { background:#fff; }
.themed-pages .word-panel .recent-row { border-radius:0; }
.themed-pages .hint-box { background:none; border:0; padding:18px 0; }
.themed-pages .review-prompt { min-width:0; }
.themed-pages .flashcard { display:block; box-shadow:none; }
.themed-pages .vocab-row h3 { font-family:var(--serif); font-weight:400; font-size:26px; }
.themed-pages .vocab-row>div:nth-child(2)>p { font-family:var(--serif); font-size:15px; line-height:1.8; }
.themed-pages .vocab-row .due-label { font-size:12px; }
.themed-pages .setting-row p { max-width:62ch; }
.themed-pages .settings-block>h3,.themed-pages .settings-block .panel-heading h3 { font-size:19px; font-weight:500; }
.themed-pages .source-feed-head { border-radius:0; }
.themed-pages .source-feed-head h2 { font-size:23px; font-weight:500; }
.themed-pages .source-article h3 { font-family:var(--serif); font-size:23px; font-weight:400; }
.themed-pages .photo-credit-grid { gap:28px; }
.themed-pages[data-scheme=folio] .photo-credit-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.themed-pages[data-scheme=folio] .photo-credit { border-radius:2px; box-shadow:none; }
.themed-pages[data-scheme=gallery] .photo-credit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:44px; }
.themed-pages[data-scheme=gallery] .photo-credit { border:0; border-radius:0; box-shadow:none; }
.themed-pages[data-scheme=gallery] .photo-credit img { aspect-ratio:1.5; height:auto; }
.themed-pages[data-scheme=gallery] .photo-credit figcaption { padding:20px 0; }
.themed-pages[data-scheme=pathway] .photo-credit-grid { grid-template-columns:minmax(0,1fr); }
.themed-pages[data-scheme=pathway] .photo-credit { display:grid; grid-template-columns:220px minmax(0,1fr); border:0; border-bottom:1px solid var(--line); border-radius:0; padding-bottom:24px; box-shadow:none; }
.themed-pages[data-scheme=pathway] .photo-credit img { height:180px; }
.themed-pages[data-scheme=pathway] .photo-credit figcaption { padding:0 28px; }

/* A / Open folio: a narrow book index, facing pages and marginal notes. */
.themed-pages[data-scheme=folio] .suite-shell { max-width:1480px; padding:0 48px; }
.themed-pages[data-scheme=folio] .suite-header { align-items:center; }
.themed-pages[data-scheme=folio] .suite-brand { font-family:var(--serif); }
.themed-pages[data-scheme=folio] .suite-body { grid-template-columns:148px minmax(0,1fr); gap:40px; }
.themed-pages[data-scheme=folio] .suite-margin { position:sticky; top:30px; align-self:start; min-height:240px; border-right:1px solid var(--line); }
.themed-pages[data-scheme=folio] .suite-page-mark { font-family:var(--serif); border:0; font-size:28px; height:auto; justify-content:start; }
.themed-pages[data-scheme=folio] .suite-content>.intro h1 { font-family:var(--serif); font-size:34px; }
.themed-pages[data-scheme=folio] .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 36px; border-top:1px solid var(--line); }
.themed-pages[data-scheme=folio] .library-grid .article-card { display:grid; grid-template-columns:112px minmax(0,1fr); align-items:start; gap:20px; background:transparent; padding:28px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; box-shadow:none; }
.themed-pages[data-scheme=folio] .library-grid .card-art { height:154px; aspect-ratio:auto; border-radius:2px; }
.themed-pages[data-scheme=folio] .library-grid .card-content { padding:0; }
.themed-pages[data-scheme=folio] .library-grid h3 { font-family:var(--serif); font-size:22px; line-height:1.3; margin:12px 0 8px; }
.themed-pages[data-scheme=folio] .library-grid .card-content>p { font-size:13px; }
.themed-pages[data-scheme=folio] .library-grid .card-footer { flex-wrap:wrap; gap:8px; margin-top:16px; }
.themed-pages[data-scheme=folio][data-page=read] .suite-body { grid-template-columns:80px minmax(0,1fr); gap:30px; }
.themed-pages[data-scheme=folio] .reader-layout { gap:0; grid-template-columns:minmax(0,1fr) 300px; }
.themed-pages[data-scheme=folio] .reading-paper { padding-right:44px; }
.themed-pages[data-scheme=folio] .reader-aside { padding-left:30px; border-left:1px solid var(--line); }
.themed-pages[data-scheme=folio] .word-panel { border-top:0; }
.themed-pages[data-scheme=folio] .read-paragraph { border-bottom:1px solid #edf0f3; padding-bottom:26px; }
.themed-pages[data-scheme=folio] .reader-tools .tabs { background:none; border-bottom:1px solid var(--line); border-radius:0; padding:0; }
.themed-pages[data-scheme=folio] .reader-tools .tab { border-radius:0; padding:10px 8px; }
.themed-pages[data-scheme=folio] .reader-tools .tab.active { box-shadow:inset 0 -1px var(--accent); background:#fff; }
.themed-pages[data-scheme=folio] .vocab-list { gap:0; border-top:1px solid var(--line); }
.themed-pages[data-scheme=folio] .vocab-row { grid-template-columns:minmax(140px,.65fr) minmax(0,1.35fr) auto; gap:24px; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:26px 0; box-shadow:none; }
.themed-pages[data-scheme=folio] .vocab-row .due-label { grid-column:2; }
.themed-pages[data-scheme=folio] .vocab-row>div:last-child { grid-column:3; grid-row:1 / span 2; display:flex; }
.themed-pages[data-scheme=folio] .vocab-row.long-expression>div:first-child { grid-column:1 / -1; }
.themed-pages[data-scheme=folio] .vocab-row.long-expression>div:nth-child(2) { grid-column:1 / 3; }
.themed-pages[data-scheme=folio] .vocab-row.long-expression .due-label { grid-column:1 / 3; }
.themed-pages[data-scheme=folio] .vocab-row.long-expression>div:last-child { grid-column:3; grid-row:2 / span 2; }
.themed-pages[data-scheme=folio] .flash-wrap { max-width:100%; }
.themed-pages[data-scheme=folio] .flashcard { border:1px solid var(--line); border-radius:3px; padding:44px; text-align:left; min-height:360px; }
.themed-pages[data-scheme=folio] .flashcard:has(.flash-answer) { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px; }
.themed-pages[data-scheme=folio] .flashcard h2 { font-family:var(--serif); font-size:42px; font-weight:400; }
.themed-pages[data-scheme=folio] .flash-answer { margin:0; padding:0 0 0 32px; border-top:0; border-left:1px solid var(--line); }
.themed-pages[data-scheme=folio] .ratings { gap:0; }
.themed-pages[data-scheme=folio] .rating { border-radius:0; }
.themed-pages[data-scheme=folio] .settings-block { border-width:1px 0 0; border-radius:0; padding:28px 0; margin:0 0 24px; }
.themed-pages[data-scheme=folio] .theme-preview { border-radius:3px; }
.themed-pages[data-scheme=folio] .stat-card { background:transparent; border:0; border-radius:0; padding:14px 0 24px; border-bottom:1px solid var(--line); }
.themed-pages[data-scheme=folio] .stat-card strong { font-family:var(--serif); font-weight:400; }
.themed-pages[data-scheme=folio][data-page=stats] .suite-content>.panel { border:0; border-radius:0; padding:32px 0; }
.themed-pages[data-scheme=folio] .source-layout { grid-template-columns:220px minmax(0,1fr); gap:36px; }
.themed-pages[data-scheme=folio] .source-card { border:0; border-bottom:1px solid var(--line); border-radius:0; padding:18px 10px; }
.themed-pages[data-scheme=folio] .source-card.active { background:var(--accent-soft); }
.themed-pages[data-scheme=folio] .source-feed-head { border:0; border-bottom:1px solid var(--line); padding:0 0 24px; }
.themed-pages[data-scheme=folio] .source-article { border-width:0 0 1px; border-radius:0; padding:26px 0; }

/* B / Gallery: an open reading canvas and quiet labels under each object. */
.themed-pages[data-scheme=gallery] .suite-body { display:block; }
.themed-pages[data-scheme=gallery] .suite-margin { display:none; }
.themed-pages[data-scheme=gallery] .suite-content>.intro { padding-bottom:30px; margin-bottom:32px; border-bottom:1px solid var(--line); }
.themed-pages[data-scheme=gallery] .suite-content>.intro h1 { font-size:38px; font-weight:350; letter-spacing:-.03em; }
.themed-pages[data-scheme=gallery] .filters .tabs { background:none; padding:0; gap:8px; }
.themed-pages[data-scheme=gallery] .filters .tab { border-radius:0; background:#fff; border-bottom:1px solid transparent; padding:10px 12px; }
.themed-pages[data-scheme=gallery] .filters .tab.active { border-bottom-color:var(--accent); box-shadow:none; }
.themed-pages[data-scheme=gallery] .topic { background:none; border:0; padding:7px 10px; border-radius:4px; }
.themed-pages[data-scheme=gallery] .topic.active { background:var(--accent-soft); }
.themed-pages[data-scheme=gallery] .library-grid { grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:36px; row-gap:52px; }
.themed-pages[data-scheme=gallery] .library-grid .article-card { border:0; border-radius:0; box-shadow:none; overflow:visible; background:#fff; }
.themed-pages[data-scheme=gallery] .library-grid .card-art { height:auto; aspect-ratio:1.5; border-radius:0; overflow:hidden; }
.themed-pages[data-scheme=gallery] .library-grid .article-card:nth-child(3n+2) .card-art { aspect-ratio:1.25; }
.themed-pages[data-scheme=gallery] .library-grid .card-content { padding:20px 0 0; }
.themed-pages[data-scheme=gallery] .library-grid h3 { font-size:23px; font-weight:400; line-height:1.35; letter-spacing:-.025em; margin:12px 0 10px; }
.themed-pages[data-scheme=gallery] .library-grid .card-footer { border-top:1px solid var(--line); padding-top:14px; margin-top:20px; }
.themed-pages[data-scheme=gallery] .reading-paper { padding:8px 42px 40px 32px; }
.themed-pages[data-scheme=gallery] .reading-paper h1 { font-size:46px; max-width:22ch; }
.themed-pages[data-scheme=gallery] .reader-aside { background:var(--surface); padding:24px; border-radius:12px; }
.themed-pages[data-scheme=gallery] .word-panel { background:transparent; border:0; padding:0; }
.themed-pages[data-scheme=gallery] .word-footer { background:var(--surface); }
.themed-pages[data-scheme=gallery] .read-paragraph { padding:22px 0; }
.themed-pages[data-scheme=gallery] .read-paragraph:first-child { padding-top:8px; }
.themed-pages[data-scheme=gallery] .vocab-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px 48px; }
.themed-pages[data-scheme=gallery] .vocab-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; border:0; border-top:1px solid var(--line); border-radius:0; padding:28px 0 12px; box-shadow:none; align-items:start; }
.themed-pages[data-scheme=gallery] .vocab-row>div:first-child { grid-column:1; }
.themed-pages[data-scheme=gallery] .vocab-row>div:nth-child(2) { grid-column:1 / -1; grid-row:2; }
.themed-pages[data-scheme=gallery] .vocab-row>div:last-child { grid-column:2; grid-row:1; display:flex; }
.themed-pages[data-scheme=gallery] .vocab-row .due-label { grid-column:1 / -1; grid-row:3; }
.themed-pages[data-scheme=gallery] .vocab-row.long-expression { grid-column:1 / -1; }
.themed-pages[data-scheme=gallery] .vocab-row.long-expression>div:first-child { grid-column:1 / -1; }
.themed-pages[data-scheme=gallery] .vocab-row.long-expression>div:last-child { grid-column:1 / -1; grid-row:4; justify-content:flex-end; }
.themed-pages[data-scheme=gallery] .vocab-row h3 { font-size:32px; }
.themed-pages[data-scheme=gallery] .flash-wrap { max-width:820px; }
.themed-pages[data-scheme=gallery] .flashcard { border:0; border-radius:0; padding:54px 48px; background:var(--surface); min-height:380px; }
.themed-pages[data-scheme=gallery] .flashcard h2 { font-family:var(--serif); font-size:48px; font-weight:400; }
.themed-pages[data-scheme=gallery] .flashcard .eyebrow { color:var(--muted); }
.themed-pages[data-scheme=gallery] .flash-answer { margin-top:32px; padding-top:28px; }
.themed-pages[data-scheme=gallery] .stat-card { border:0; border-left:1px solid var(--line); border-radius:0; background:#fff; padding:12px 28px; }
.themed-pages[data-scheme=gallery] .stat-card:first-child { border-left:0; }
.themed-pages[data-scheme=gallery] .stat-card strong { font-size:46px; font-weight:300; }
.themed-pages[data-scheme=gallery][data-page=stats] .suite-content>.panel { border:0; border-radius:0; background:var(--surface); padding:34px; margin:42px 0; }
.themed-pages[data-scheme=gallery][data-page=settings] .suite-content { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px 48px; }
.themed-pages[data-scheme=gallery][data-page=settings] .intro,.themed-pages[data-scheme=gallery] .theme-settings { grid-column:1 / -1; }
.themed-pages[data-scheme=gallery] .settings-block { background:#fff; border:0; border-top:1px solid var(--line); border-radius:0; padding:28px 0; margin:0; }
.themed-pages[data-scheme=gallery] .theme-settings { border:0; padding-top:0; }
.themed-pages[data-scheme=gallery] .theme-options { grid-template-columns:repeat(4,minmax(0,1fr)); }
.themed-pages[data-scheme=gallery] .setting-row { align-items:start; }
.themed-pages[data-scheme=gallery] .source-layout { grid-template-columns:240px minmax(0,1fr); gap:52px; }
.themed-pages[data-scheme=gallery] .source-card { border:0; background:var(--surface); padding:20px; border-radius:8px; }
.themed-pages[data-scheme=gallery] .source-card.active { background:var(--accent-soft); }
.themed-pages[data-scheme=gallery] .source-feed-head { border:0; padding:0 0 28px; border-bottom:1px solid var(--line); }
.themed-pages[data-scheme=gallery] .source-article { border:0; border-bottom:1px solid var(--line); border-radius:0; padding:28px 0; }

/* C / Reading path: a continuous index, linear lists and a visible task rail. */
.themed-pages[data-scheme=pathway] .suite-body { grid-template-columns:116px minmax(0,1fr); gap:48px; }
.themed-pages[data-scheme=pathway] .suite-margin { align-self:start; position:sticky; top:24px; border-left:1px solid var(--line); padding:0 0 32px 24px; }
.themed-pages[data-scheme=pathway] .suite-page-mark { border-radius:50%; background:var(--accent); border:0; color:#fff; }
.themed-pages[data-scheme=pathway] .suite-navigation { gap:18px; }
.themed-pages[data-scheme=pathway] .suite-nav-mark { display:block; font-size:12px; }
.themed-pages[data-scheme=pathway] .suite-navigation a[aria-current] .suite-nav-mark { text-decoration:underline; text-underline-offset:6px; }
.themed-pages[data-scheme=pathway] .suite-content>.intro { border-bottom:1px solid var(--line); padding-bottom:28px; }
.themed-pages[data-scheme=pathway] .library-grid { grid-template-columns:minmax(0,1fr); gap:0; }
.themed-pages[data-scheme=pathway] .article-card { display:grid; grid-template-columns:200px minmax(0,1fr); gap:32px; padding:28px 0; border:0; border-radius:0; border-bottom:1px solid var(--line); box-shadow:none; background:#fff; }
.themed-pages[data-scheme=pathway] .card-art { height:140px; aspect-ratio:auto; border-radius:4px; }
.themed-pages[data-scheme=pathway] .card-content { padding:0; }
.themed-pages[data-scheme=pathway] .article-card h3 { font-family:var(--serif); font-size:27px; font-weight:400; margin:10px 0; }
.themed-pages[data-scheme=pathway] .card-footer { padding:0; margin-top:18px; border:0; }
.themed-pages[data-scheme=pathway] .reading-paper { padding:8px 36px 32px 0; }
.themed-pages[data-scheme=pathway] .read-paragraph { border-left:1px solid var(--line); padding:0 0 34px 24px; margin:0; position:relative; }
.themed-pages[data-scheme=pathway] .read-paragraph::before { content:''; position:absolute; left:-4px; top:15px; width:7px; height:7px; border-radius:50%; background:#9db9e6; }
.themed-pages[data-scheme=pathway] .reader-aside { border-top:1px solid var(--accent); }
.themed-pages[data-scheme=pathway] .word-panel { border-top:0; }
.themed-pages[data-scheme=pathway] .word-footer .btn { width:100%; }
.themed-pages[data-scheme=pathway] .vocab-list { border-left:1px solid var(--line); margin-left:8px; gap:0; }
.themed-pages[data-scheme=pathway] .vocab-row { position:relative; display:grid; grid-template-columns:minmax(150px,.6fr) minmax(0,1.4fr) auto; gap:24px; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:28px 0 28px 28px; box-shadow:none; }
.themed-pages[data-scheme=pathway] .vocab-row::before { content:''; position:absolute; left:-4px; top:40px; width:7px; height:7px; background:var(--accent); border-radius:50%; }
.themed-pages[data-scheme=pathway] .vocab-row .due-label { grid-column:2; }
.themed-pages[data-scheme=pathway] .vocab-row>div:last-child { grid-column:3; grid-row:1 / span 2; display:flex; }
.themed-pages[data-scheme=pathway] .vocab-row.long-expression>div:first-child { grid-column:1 / -1; }
.themed-pages[data-scheme=pathway] .vocab-row.long-expression>div:nth-child(2) { grid-column:1 / 3; }
.themed-pages[data-scheme=pathway] .vocab-row.long-expression .due-label { grid-column:1 / 3; }
.themed-pages[data-scheme=pathway] .vocab-row.long-expression>div:last-child { grid-column:3; grid-row:2 / span 2; }
.themed-pages[data-scheme=pathway] .flash-wrap { max-width:840px; border-left:1px solid var(--line); padding-left:32px; }
.themed-pages[data-scheme=pathway] .flash-meta { padding:12px 0 24px; border-bottom:1px solid var(--line); }
.themed-pages[data-scheme=pathway] .flashcard { padding:38px 0; border:0; border-radius:0; background:#fff; text-align:left; min-height:300px; }
.themed-pages[data-scheme=pathway] .flashcard h2 { font-family:var(--serif); font-size:42px; font-weight:400; }
.themed-pages[data-scheme=pathway] .ratings { gap:12px; padding-top:24px; border-top:1px solid var(--line); }
.themed-pages[data-scheme=pathway] .settings-block { border:0; border-left:1px solid var(--line); border-radius:0; padding:0 0 28px 28px; margin:0 0 32px; position:relative; }
.themed-pages[data-scheme=pathway] .settings-block::before { content:''; position:absolute; top:8px; left:-4px; width:7px; height:7px; background:var(--accent); border-radius:50%; }
.themed-pages[data-scheme=pathway] .source-layout { grid-template-columns:minmax(0,1fr); gap:28px; }
.themed-pages[data-scheme=pathway] .source-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.themed-pages[data-scheme=pathway] .source-footnote { max-width:70ch; }
.themed-pages[data-scheme=pathway] .source-feed-head { border:0; background:var(--surface); padding:24px; border-radius:8px; }
.themed-pages[data-scheme=pathway] .source-article-list { border-left:1px solid var(--line); margin-left:8px; }
.themed-pages[data-scheme=pathway] .source-article { border:0; border-bottom:1px solid var(--line); border-radius:0; padding:26px 0 26px 28px; }
.themed-pages[data-scheme=pathway] .stat-card { border:0; border-bottom:1px solid var(--line); border-radius:0; background:#fff; padding:12px 0 24px; }
.themed-pages[data-scheme=pathway][data-page=stats] .suite-content>.panel { border:0; border-left:1px solid var(--line); border-radius:0; padding:24px; }
.themed-pages[data-scheme=pathway][data-page=stats] .recent-list { border:0; border-left:1px solid var(--line); border-radius:0; padding-left:24px; }

/* Portal overlays share the selected environment through the body attribute. */
body[data-page-theme=folio] .modal { border-radius:4px; padding:32px; box-shadow:0 18px 60px #17223724; }
body[data-page-theme=folio] .modal-title h2 { font-family:Georgia,serif; font-weight:400; }
body[data-page-theme=gallery] .modal { border-radius:14px; padding:32px; box-shadow:0 18px 60px #17223724; }
body[data-page-theme=gallery] .modal-title { border-bottom:1px solid #e0e5eb; padding-bottom:20px; margin-bottom:24px; }
body[data-page-theme=pathway] .modal { border-radius:8px; padding:30px; }
body[data-page-theme=pathway] .modal-actions { border-top:1px solid #e0e5eb; padding-top:20px; }
body[data-page-theme]:not([data-page-theme=current]) .modal input,body[data-page-theme]:not([data-page-theme=current]) .modal textarea { caret-color:#135edb; }

@media(min-width:1500px) {
  .themed-pages[data-scheme=gallery] .suite-shell { max-width:1480px; padding:0 64px; }
}
@media(max-width:1200px) {
  .themed-pages .suite-shell,.themed-pages[data-scheme=folio] .suite-shell { padding:0 32px; }
  .suite-header { gap:24px; }
  .suite-navigation,.themed-pages[data-scheme=pathway] .suite-navigation { gap:16px; }
  .suite-search { width:108px; }
  .suite-body,.themed-pages[data-scheme=folio] .suite-body,.themed-pages[data-scheme=pathway] .suite-body { grid-template-columns:minmax(0,1fr); }
  .suite-margin { display:none; }
  .themed-pages[data-scheme=folio][data-page=read] .suite-body { grid-template-columns:minmax(0,1fr); }
  .themed-pages .reader-layout { gap:28px; grid-template-columns:minmax(0,1fr) 280px; }
  .themed-pages[data-scheme=folio] .reading-paper { padding-right:28px; }
  .themed-pages[data-scheme=gallery] .reading-paper { padding-left:0; padding-right:0; }
}
@media(max-width:1000px) {
  .suite-header { min-height:84px; gap:20px; position:relative; flex-wrap:wrap; padding:20px 0; }
  .suite-brand { margin-right:auto; }
  .suite-menu { display:inline-flex; order:3; }
  .suite-tools { order:2; }
  .suite-navigation { display:none; order:4; flex-basis:100%; flex-wrap:wrap; justify-content:flex-start; padding-top:16px; border-top:1px solid var(--line); }
  .suite-navigation.is-open { display:flex; }
  .suite-navigation a { padding:8px 12px; min-height:44px; }
  .suite-navigation a[aria-current] { background:var(--accent-soft); border-radius:6px; }
  .themed-pages[data-scheme] .reader-layout { grid-template-columns:minmax(0,1fr); }
  .themed-pages .reading-paper,.themed-pages[data-scheme=folio] .reading-paper,.themed-pages[data-scheme=pathway] .reading-paper { padding:8px 0 32px; max-width:740px; margin:auto; }
  .themed-pages .reader-aside:not(.has-selection) { display:none; }
  .themed-pages .reader-aside.has-selection { position:fixed; inset:auto 12px 12px; z-index:80; max-width:620px; margin:auto; padding:0; background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 48px #1c2c4326; }
  .themed-pages .reader-aside.has-selection .word-panel { max-height:min(68dvh,620px); padding:20px; border:0; background:#fff; border-radius:14px; }
  .themed-pages .reader-aside.has-selection .hint-box { display:none; }
  .themed-pages .reader-aside .word-footer { background:#fff; }
  .themed-pages .reader-aside .word-footer .btn { width:100%; }
  .themed-pages[data-scheme=gallery] .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .themed-pages[data-scheme=folio] .library-grid { column-gap:28px; }
  .themed-pages[data-scheme=folio] .library-grid .article-card { grid-template-columns:88px minmax(0,1fr); gap:16px; }
  .themed-pages[data-scheme=folio] .library-grid .card-art { height:128px; }
  .themed-pages[data-scheme=folio] .source-layout,.themed-pages[data-scheme=gallery] .source-layout { grid-template-columns:minmax(0,1fr); gap:28px; }
  .themed-pages .source-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
  .themed-pages .source-card { min-width:0; width:100%; }
  .themed-pages[data-scheme=folio] .photo-credit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .themed-pages[data-scheme=gallery][data-page=settings] .suite-content { display:block; }
  .themed-pages[data-scheme=gallery] .settings-block { margin-bottom:28px; }
}
@media(max-width:600px) {
  .themed-pages .suite-shell,.themed-pages[data-scheme=folio] .suite-shell { padding:0 20px; }
  .suite-header { min-height:76px; gap:10px; padding:16px 0; }
  .suite-brand { font-size:22px; }
  .suite-tools { display:none; }
  .suite-menu { width:42px; height:42px; }
  .suite-navigation.is-open { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .suite-location { padding:20px 0; }
  .suite-content>.intro,.themed-pages[data-scheme=gallery] .suite-content>.intro,.themed-pages[data-scheme=pathway] .suite-content>.intro { align-items:flex-start; gap:16px; padding-bottom:20px; margin-bottom:24px; }
  .suite-content>.intro h1,.themed-pages[data-scheme=gallery] .suite-content>.intro h1,.themed-pages[data-scheme=folio] .suite-content>.intro h1 { font-size:28px; }
  .suite-content>.intro .btn { padding:10px 12px; min-height:44px; }
  .suite-content .filters { display:flex; flex-direction:column; align-items:stretch; gap:16px; }
  .suite-content .filters .tabs { display:flex; width:100%; max-width:100%; flex-wrap:wrap; }
  .suite-content .filters .tab { flex:1; padding:10px 6px; min-width:0; font-size:12px; }
  .suite-content .search { width:100%; }
  .suite-content .topic-row { gap:8px; flex-wrap:wrap; margin-bottom:24px; }
  .suite-content .topic { font-size:12px; }
  .themed-pages[data-scheme=folio] .library-grid,.themed-pages[data-scheme=gallery] .library-grid { grid-template-columns:minmax(0,1fr); }
  .themed-pages[data-scheme=folio] .library-grid .article-card { grid-template-columns:96px minmax(0,1fr); }
  .themed-pages[data-scheme=folio] .library-grid .card-art { height:140px; }
  .themed-pages[data-scheme=gallery] .library-grid { gap:36px; }
  .themed-pages[data-scheme=gallery] .library-grid .card-art,.themed-pages[data-scheme=gallery] .library-grid .article-card:nth-child(3n+2) .card-art { aspect-ratio:1.5; }
  .themed-pages[data-scheme=pathway] .article-card { grid-template-columns:92px minmax(0,1fr); gap:18px; padding:22px 0; }
  .themed-pages[data-scheme=pathway] .card-art { height:112px; }
  .themed-pages[data-scheme=pathway] .article-card h3 { font-size:22px; line-height:1.3; }
  .themed-pages .reading-paper h1,.themed-pages[data-scheme=gallery] .reading-paper h1 { font-size:33px; }
  .themed-pages .reader-title-zh { font-size:16px; margin-bottom:24px; }
  .themed-pages .reader-tools .tabs { width:100%; padding:3px; display:flex; gap:2px; }
  .themed-pages .reader-tools .tab { flex:1; padding:10px 4px; min-height:42px; font-size:12px; white-space:nowrap; }
  .themed-pages .reader-tools .tab .icon { width:15px; height:15px; }
  .themed-pages .english { font-size:20px; line-height:1.85; }
  .themed-pages .translation { font-size:15px; line-height:1.85; }
  .themed-pages[data-scheme=pathway] .read-paragraph { padding-left:18px; }
  .themed-pages .audio-bar { padding:6px; gap:3px; }
  .themed-pages .audio-bar #audio-label { font-size:12px; }
  .themed-pages .reader-aside.has-selection { inset:auto 8px 8px; }
  .themed-pages .reader-aside.has-selection .word-panel { padding:18px; }
  .themed-pages[data-scheme=gallery] .vocab-list { grid-template-columns:minmax(0,1fr); gap:16px; }
  .themed-pages[data-scheme=folio] .vocab-row,.themed-pages[data-scheme=pathway] .vocab-row { grid-template-columns:minmax(0,1fr) auto; gap:14px; padding-top:22px; padding-bottom:22px; }
  .themed-pages[data-scheme=folio] .vocab-row>div:first-child,.themed-pages[data-scheme=pathway] .vocab-row>div:first-child { grid-column:1; }
  .themed-pages[data-scheme=folio] .vocab-row>div:nth-child(2),.themed-pages[data-scheme=pathway] .vocab-row>div:nth-child(2) { grid-column:1 / -1; grid-row:2; }
  .themed-pages[data-scheme=folio] .vocab-row>div:last-child,.themed-pages[data-scheme=pathway] .vocab-row>div:last-child { grid-column:2; grid-row:1; }
  .themed-pages[data-scheme=folio] .vocab-row .due-label,.themed-pages[data-scheme=pathway] .vocab-row .due-label { grid-column:1 / -1; grid-row:3; }
  .themed-pages .vocab-row h3,.themed-pages[data-scheme=gallery] .vocab-row h3 { font-size:25px; }
  .themed-pages[data-scheme=folio] .vocab-row.long-expression>div:first-child,.themed-pages[data-scheme=pathway] .vocab-row.long-expression>div:first-child { grid-column:1 / -1; }
  .themed-pages[data-scheme=folio] .vocab-row.long-expression>div:last-child,.themed-pages[data-scheme=pathway] .vocab-row.long-expression>div:last-child { grid-column:1 / -1; grid-row:4; justify-content:flex-end; }
  .themed-pages .flash-wrap,.themed-pages[data-scheme=pathway] .flash-wrap { padding-left:0; border:0; width:100%; }
  .themed-pages[data-scheme=folio] .flashcard,.themed-pages[data-scheme=gallery] .flashcard,.themed-pages[data-scheme=pathway] .flashcard { padding:28px 20px; min-height:300px; }
  .themed-pages[data-scheme=folio] .flashcard:has(.flash-answer) { grid-template-columns:minmax(0,1fr); gap:24px; }
  .themed-pages[data-scheme=folio] .flash-answer { padding:24px 0 0; border-left:0; border-top:1px solid var(--line); }
  .themed-pages .flashcard h2,.themed-pages[data-scheme=gallery] .flashcard h2,.themed-pages[data-scheme=folio] .flashcard h2,.themed-pages[data-scheme=pathway] .flashcard h2 { font-size:34px; }
  .themed-pages .flashcard.expression-card h2 { font-size:25px; line-height:1.5; }
  .themed-pages .ratings { gap:6px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .themed-pages .rating { min-height:64px; }
  .themed-pages .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  .themed-pages[data-scheme=gallery] .stat-card { border:0; border-bottom:1px solid var(--line); padding:12px 0 20px; }
  .themed-pages .stat-card strong,.themed-pages[data-scheme=gallery] .stat-card strong { font-size:38px; }
  .themed-pages[data-page=stats] .suite-content>.panel,.themed-pages[data-scheme=gallery][data-page=stats] .suite-content>.panel { padding:22px 12px; }
  .themed-pages .activity-grid { gap:6px; }
  .themed-pages .activity-column { min-width:0; font-size:11px; }
  .themed-pages .setting-row { gap:16px; flex-wrap:wrap; }
  .themed-pages .setting-row>div { flex:1; min-width:170px; }
  .themed-pages[data-scheme=pathway] .settings-block { padding-left:20px; }
  .themed-pages[data-scheme=gallery] .theme-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .themed-pages .source-list,.themed-pages[data-scheme=pathway] .source-list { grid-template-columns:minmax(0,1fr); }
  .themed-pages[data-scheme=folio] .photo-credit-grid,.themed-pages[data-scheme=gallery] .photo-credit-grid { grid-template-columns:minmax(0,1fr); }
  .themed-pages[data-scheme=pathway] .photo-credit { grid-template-columns:minmax(0,1fr); }
  .themed-pages[data-scheme=pathway] .photo-credit figcaption { padding:18px 0 0; }
  .themed-pages .source-feed-head { padding:0 0 24px; }
  .themed-pages[data-scheme=pathway] .source-feed-head { padding:20px; }
  .themed-pages .source-feed-actions { flex-wrap:wrap; gap:10px; }
  .themed-pages .source-article { grid-template-columns:24px minmax(0,1fr); }
  .themed-pages .source-article>.btn { grid-column:2; justify-self:start; }
  .themed-pages[data-scheme=pathway] .source-article { padding-left:16px; }
  .suite-footer { flex-wrap:wrap; gap:16px; padding:24px 0; }
  .suite-footer>span { order:3; width:100%; }
  body[data-page-theme=folio] .modal,body[data-page-theme=gallery] .modal,body[data-page-theme=pathway] .modal { padding:22px; }
}
@media(prefers-reduced-motion:reduce) {
  .themed-pages *,.themed-pages *::before,.themed-pages *::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; }
}
