/* Thinking Life · design.markdown V2.1. Shared visual layer for every entry page. */
:root {
  --ds-surface: #fff; --ds-paper: #FAFBF8; --ds-ink: #222721;
  --ds-muted: #686A64; --ds-line: #E3E6DF; --ds-edge: #D4D9CE;
  --ds-soft: #F2F4ED; --ds-lime: #E9F4BD; --ds-accent: #B33A13;
  --ds-orange: #FA572B; --ds-on-lime: #222721; --ds-grid: rgba(34,39,33,.035);
  --font-body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: var(--font-body); --sans: var(--font-body); --serif: var(--font-body);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg: var(--ds-paper); --paper: var(--ds-surface); --ink: var(--ds-ink);
  --text: var(--ds-ink); --muted: var(--ds-muted); --card: var(--ds-surface);
  --card-strong: var(--ds-surface); --line: var(--ds-line); --soft: var(--ds-soft);
  --gray-1: var(--ds-ink); --gray-2: var(--ds-muted); --gray-3: var(--ds-edge); --gray-4: var(--ds-soft);
  --blue: var(--ds-accent); --red: var(--ds-accent); --yellow: var(--ds-lime);
  --accent: var(--ds-accent); --accent2: var(--ds-accent); --mint: #2E7D5B;
  --bauhaus-blue: var(--ds-accent); --bauhaus-red: var(--ds-accent); --bauhaus-yellow: var(--ds-lime);
  --vermilion: var(--ds-accent); --shadow: none; --radius: 8px;
  --home-gold: var(--ds-accent); --nav-height: 60px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ds-surface: #20211D; --ds-paper: #171815; --ds-ink: #F4F5ED;
  --ds-muted: #B4B7A9; --ds-line: #41443A; --ds-edge: #4A5143;
  --ds-soft: #2B2E25; --ds-accent: #FF9972; --ds-orange: #FF8056;
  --ds-grid: rgba(244,245,237,.04); --mint: #91CDAE; color-scheme: dark;
}
html { scroll-padding-top: calc(var(--nav-height) + 24px); }
html body { background: var(--ds-paper); color: var(--ds-ink); font-family: var(--font-body); font-size: 16px; line-height: 1.75; }
body::before, body::after { display: none; }
body :is(h1,h2,h3,h4,h5,h6) { font-family: var(--font-body); font-weight: 650; letter-spacing: -.025em; text-shadow: none; -webkit-text-stroke: 0; }
body h1::first-line { color: inherit; }
body h1 { font-size: 32px; line-height: 1.25; }
body h2 { font-size: 24px; line-height: 1.4; border: 0; padding-bottom: 0; }
body h3 { font-size: 19px; line-height: 1.5; }
body :is(button,input,textarea,select) { font-family: var(--font-body); }
body :is(p,li) { overflow-wrap: anywhere; }
body :is(input,textarea,select) { color: var(--ds-ink); background: var(--ds-surface); border: 1px solid var(--ds-edge); border-radius: 8px; }
body input::placeholder, body textarea::placeholder { color: var(--ds-muted); opacity: 1; }
body :is(a,button,input,textarea,select,[tabindex]):focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 3px; }
body :is(button,a) { -webkit-tap-highlight-color: transparent; }
body :is(button,a,.card) { transition-property: background-color, color, border-color; transition-duration: .16s; }
body :is(.wrap,.shell) { max-width: 1144px; padding: 0 28px 64px; margin-inline: auto; }
body :is(.hero,.flu-hero) { padding: 40px 0 32px; gap: 32px; border-bottom: 1px solid var(--ds-line); }
body .hero { grid-template-columns: minmax(0,1fr) 220px; align-items: center; }
body :is(.hero,.flu-hero) h1 { margin: 12px 0 16px; font-size: 32px; line-height: 1.3; }
body :is(.hero,.flu-hero) p { font-size: 16px; line-height: 1.75; color: var(--ds-muted); }
body .hero::after, body .card::before, body .card::after, body .product-card::after, body .flu-stat::after { display: none; }
body :is(.kicker,.eyebrow,.home-kicker,.flu-kicker) { font-size: 11px; line-height: 1.5; font-weight: 650; letter-spacing: .12em; color: var(--ds-accent); }
body .hero-card { min-height: 148px; padding: 20px; border: 1px solid var(--ds-edge); border-radius: 10px; background: var(--ds-soft); color: var(--ds-ink); transform: none; }
body .hero-card .big { color: var(--ds-accent); font-size: 52px; line-height: 1.05; font-weight: 650; }
body .hero-card .small { font-size: 13px; line-height: 1.7; font-weight: 400; color: var(--ds-muted); margin-top: 12px; }
body .notice { border: 1px solid var(--ds-line); border-radius: 8px; background: var(--ds-soft); color: var(--ds-muted); font-size: 13px; font-weight: 400; padding: 12px 14px; }

/* A steady, compact header shared by the atlas pages and the home page. */
body :is(.nav,.home-nav) { height: var(--nav-height); min-height: var(--nav-height); position: sticky; top: 0; z-index: 40; margin: 0; padding: 0; gap: 16px; flex-wrap: nowrap; border: 0; border-bottom: 1px solid var(--ds-line); border-radius: 0; background: var(--ds-paper); box-shadow: none; backdrop-filter: none; }
body :is(.brand,.home-brand) { gap: 10px; flex-shrink: 0; }
body :is(.mark,.home-mark,.shelf-brand-logo) { width: 32px; height: 32px; flex-basis: 32px; border: 1px solid var(--ds-edge); border-radius: 8px; box-shadow: none; background: var(--ds-surface); }
body :is(.mark img,.home-mark img) { border-radius: 7px; }
body :is(.brand-text b,.home-brand-text b) { font-size: 15px; font-weight: 650; line-height: 1.4; color: var(--ds-ink); }
body :is(.brand-text span,.home-brand-text span) { display: none; }
body :is(.nav-actions,.home-links) { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
/* Keep the first link reachable when the single-row navigation overflows. */
body .home-links { justify-content: flex-start; justify-content: safe flex-end; overflow-y: hidden; }
body :is(.nav-actions .btn,.home-link,.home-link.primary,.home-link.current,.nav-actions .btn.nav-home) { min-height: 36px; padding: 7px 9px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; line-height: 1.5; font-weight: 500; white-space: nowrap; color: var(--ds-muted); background: transparent; flex-shrink: 0; }
body :is(.nav-actions .btn:hover,.home-link:hover,.home-link.primary:hover,.nav-actions .btn.nav-home:hover) { color: var(--ds-ink); background: var(--ds-soft); border-color: var(--ds-line); transform: none; box-shadow: none; }
body :is(.home-link.current,.home-link[aria-current="page"],.nav-actions .btn[aria-current="page"]) { background: var(--ds-lime); border-color: var(--ds-edge); color: var(--ds-on-lime); }
.site-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
body .site-switch { max-width: 148px; height: 36px; font-size: 12px; padding: 5px 26px 5px 9px; }
body .site-theme { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ds-edge); border-radius: 8px; background: var(--ds-surface); color: var(--ds-muted); cursor: pointer; }
.site-theme svg { width: 17px; height: 17px; }
body .site-theme:hover { background: var(--ds-soft); color: var(--ds-accent); }

/* Browse, filter and read. Content widths are shared; illustrations keep their meaning. */
body .toolbar { margin: 24px 0; gap: 16px; grid-template-columns: minmax(260px,.8fr) 1.4fr; }
body .search { padding: 11px 14px; font-size: 16px; min-height: 46px; border: 1px solid var(--ds-edge); border-radius: 8px; box-shadow: none; }
body .filters { gap: 6px; padding: 4px 2px 6px; scrollbar-width: thin; }
body :is(.filter,.tag,.evidence,.badge,.pill) { border: 1px solid var(--ds-line); border-radius: 6px; font-weight: 500; }
body .filter { padding: 7px 11px; background: var(--ds-surface); color: var(--ds-muted); font-size: 13px; }
body :is(.filter.active,.filter[aria-pressed="true"]) { background: var(--ds-lime); border-color: var(--ds-edge); color: var(--ds-on-lime); font-weight: 650; }
body .grid { gap: 16px; grid-template-columns: repeat(3,minmax(0,1fr)); }
body .grid .card { min-height: 224px; padding: 20px; border: 1px solid var(--ds-line); border-radius: 10px; background: var(--ds-surface); box-shadow: none; }
body .grid .card:hover { background: var(--ds-surface); border-color: var(--ds-accent); transform: none; box-shadow: none; }
body :is(.num,.no,.detail-num,.detail-no) { font-family: var(--font-body); font-weight: 500; color: var(--ds-accent); }
body .card :is(.num,.no) { font-size: 24px; line-height: 1.2; margin-bottom: 16px; }
body .card .cn { font-family: var(--font-body); font-size: 20px; font-weight: 650; color: var(--ds-ink); line-height: 1.4; }
body .card :is(.en,.desc,.source-title) { color: var(--ds-muted); }
body .card .desc { font-size: 14px; line-height: 1.75; margin-top: 14px; }
body :is(.tag,.evidence) { padding: 4px 8px; font-size: 11px; background: var(--ds-soft); color: var(--ds-muted); }
body .section { margin-top: 48px; scroll-margin-top: calc(var(--nav-height) + 24px); }
body :is(.section-title,.section-head) { align-items: start; gap: 32px; margin-bottom: 20px; }
body :is(.section-title,.section-head) h2 { font-size: 24px; line-height: 1.45; }
body :is(.section-title,.section-head) p { color: var(--ds-muted); font-size: 15px; line-height: 1.75; }
body :is(.flow-item,.scenario,.stat-card,.map-card,.method-card,.book-card,.concept-card,.concept-group,.mapping-card,.filter-panel) { border: 1px solid var(--ds-line); border-radius: 8px; background: var(--ds-surface); box-shadow: none; }
body :is(.flow-item,.scenario,.stat-card,.method-card) { padding: 20px; }
body :is(.flow-item span,.scenario p,.scenario ol,.stat-card span,.stat-desc,.method-card p) { color: var(--ds-muted); font-size: 14px; line-height: 1.75; }
body :is(.flow-item b,.scenario h3,.stat-card b) { font-size: 17px; font-weight: 650; }
body :is(.flow-item .num,.flow-item .no,.method-num,.stat-num) { color: var(--ds-accent); font-size: 30px; }
body :is(.footer,.home-footer,.flu-footer) { margin-top: 48px; border-top: 1px solid var(--ds-line); padding-top: 20px; color: var(--ds-muted); font-size: 12px; font-weight: 400; }
body .empty { border: 1px dashed var(--ds-edge); border-radius: 8px; background: var(--ds-soft); color: var(--ds-muted); }
body .panel { width: min(768px,100vw); padding: 24px 36px 48px; background: var(--ds-surface); border-left: 1px solid var(--ds-edge); box-shadow: none; }
body .panel-head { padding-bottom: 20px; border-bottom: 1px solid var(--ds-line); }
body :is(.detail-num,.detail-no) { font-size: 24px; line-height: 1.4; }
body :is(.detail-cn,.panel-head h2) { font-size: 32px; line-height: 1.35; font-weight: 650; color: var(--ds-ink); }
body :is(.detail,.entry-content) { color: var(--ds-ink); font-size: 16px; line-height: 1.75; }
body .detail :is(p,li,ul,ol) { color: var(--ds-ink); font-size: 16px; line-height: 1.75; }
body .detail h3 { color: var(--ds-ink); font-size: 20px; font-weight: 650; text-shadow: none; -webkit-text-stroke: 0; letter-spacing: -.02em; margin-top: 28px; }
body :is(.quote,.practice,.practice-card,.d-principle,.d-risk,.d-quote,.d-notapply,.training-stage,.lesson-turn,.distinction-card,.concept-contrast,.training-guide) { border: 1px solid var(--ds-line); border-radius: 8px; background: var(--ds-soft); box-shadow: none; color: var(--ds-ink); }
body .concept-board { min-height: 128px; border: 1px solid var(--ds-line); border-radius: 8px; background: var(--ds-soft); box-shadow: none; display: grid; align-items: center; padding: 20px; }
body .concept-board::before, body .concept-board::after { display: none; }
body .board-card { position: static; min-height: 0; border: 0; padding: 0; background: transparent; box-shadow: none; }
body .board-card b { font-size: 22px; color: var(--ds-ink); }
body .board-card span { color: var(--ds-muted); font-size: 14px; }
body .training-kicker, body .fact-table th { background: var(--ds-lime); color: var(--ds-on-lime); border: 1px solid var(--ds-edge); border-radius: 6px; }
body .training-stage[class] { background: var(--ds-soft); }
body .training-stage::before { border: 1px solid var(--ds-edge); border-radius: 6px; background: var(--ds-lime); color: var(--ds-on-lime); }
body .lesson-turn, body .concept-contrast { border: 0; background: transparent; }
body .lesson-turn > div, body .concept-contrast > div { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 8px; }
body .training-option, body .training-feedback, body .answer-key, body .training-field textarea { background: var(--ds-surface); color: var(--ds-ink); border: 1px solid var(--ds-edge); border-radius: 8px; }
body .training-option:hover, body .training-option:focus-visible { transform: none; }
body .training-option.is-correct { background: var(--ds-soft); border-color: var(--mint); }
body .training-option.is-wrong { background: var(--ds-soft); border-color: var(--ds-accent); }
body .method-num { background: var(--ds-soft); color: var(--ds-accent); border-radius: 6px; }
body :is(.btn,.close,.source-link,.cid-btn,.cid-cta,.flu-btn) { border: 1px solid var(--ds-edge); border-radius: 8px; box-shadow: none; font-weight: 650; color: var(--ds-ink); background: var(--ds-surface); }
body :is(.btn:hover,.close:hover,.source-link:hover,.cid-btn:hover,.cid-cta:hover,.flu-btn:hover) { transform: none; box-shadow: none; background: var(--ds-soft); }
body :is(.btn-primary,.cid-btn.primary,.cid-cta,.flu-btn-primary,.flu-btn-yellow) { color: var(--ds-on-lime); background: var(--ds-lime); border-color: var(--ds-edge); }
body :is(.btn-primary:hover,.cid-btn.primary:hover,.cid-cta:hover,.flu-btn-primary:hover) { background: var(--ds-lime); border-color: var(--ds-accent); color: var(--ds-on-lime); }
body .cid { margin-top: 24px; border: 1px solid var(--ds-edge); border-radius: 10px; background: var(--ds-soft); box-shadow: none; }
body :is(.cid-title,.cid-kicker,.cid-sub) { color: var(--ds-ink); }
body :is(.cid-panel,.cid-drop,.cid-result .rbox) { background: var(--ds-surface); border: 1px solid var(--ds-edge); border-radius: 10px; box-shadow: none; color: var(--ds-ink); }

/* Homepage: quiet grid paper, an existing illustration, and clear entry points. */
body .system-home { background: var(--ds-paper); }
body .home-shell { max-width: 1136px; margin-inline: auto; padding: 0 28px 40px; }
body .home-hero { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); padding: 48px 0; gap: 48px; align-items: center; border-bottom: 1px solid var(--ds-line); background-image: linear-gradient(var(--ds-grid) 1px,transparent 1px),linear-gradient(90deg,var(--ds-grid) 1px,transparent 1px); background-size: 24px 24px; }
body .home-hero h1 { font-size: clamp(44px,5vw,64px); line-height: 1.15; font-weight: 650; letter-spacing: -.045em; margin: 18px 0 20px; }
body .home-title-accent { color: var(--ds-accent); }
body .home-hero p { color: var(--ds-muted); font-size: 16px; line-height: 1.75; max-width: 500px; }
body .home-hero-card { min-height: 340px; height: 100%; max-height: 410px; border: 1px solid var(--ds-line); border-radius: 10px; background: var(--ds-surface); padding: 0; overflow: hidden; box-shadow: none; transform: none; }
body .home-hero-card:hover { transform: none; box-shadow: none; border-color: var(--ds-edge); }
body .home-hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; mix-blend-mode: normal; filter: none; }
body .home-hero-card:hover img { transform: none; }
body .home-hero-card::after { background: linear-gradient(transparent 48%,rgba(20,24,18,.8)); }
body .home-hero-card .big { position: absolute; inset: auto auto 76px 24px; margin: 0; padding: 0; border: 0; background: transparent; font-size: 44px; font-weight: 500; color: #fff; }
body .home-hero-card .small { position: absolute; inset: auto 24px 22px 24px; color: #fff; padding: 0; margin: 0; border: 0; font-size: 13px; font-weight: 400; line-height: 1.6; }
body .home-section { margin-top: 0; padding: 40px 0; border-bottom: 1px solid var(--ds-line); }
body .home-section-head { grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 24px; }
body .home-section h2 { font-size: 28px; line-height: 1.35; font-weight: 650; }
body .entry-title span { display: inline; white-space: normal; }
body .home-section-head p { font-size: 15px; color: var(--ds-muted); line-height: 1.75; }
body .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
body .home-shell .product-card { min-height: 240px; padding: 22px; border: 1px solid var(--ds-line); border-radius: 10px; box-shadow: none; background: var(--ds-surface); }
body .product-card.locked { background: var(--ds-soft); }
body .product-card:hover { transform: none; box-shadow: none; border-color: var(--ds-accent); }
body .product-count { font-size: 32px; color: var(--ds-accent); font-weight: 500; line-height: 1.2; }
body .product-badge { border: 0; padding: 0; font-size: 10px; color: var(--ds-muted); background: transparent; font-weight: 500; letter-spacing: .1em; }
body .product-card h3 { font-size: 21px; font-weight: 650; margin: 18px 0 10px; }
body .product-card p { font-size: 14px; line-height: 1.75; color: var(--ds-muted); }
body .product-action { border: 1px solid var(--ds-edge); border-radius: 6px; background: var(--ds-lime); color: var(--ds-on-lime); font-size: 12px; font-weight: 650; align-self: start; padding: 6px 10px; margin-top: 20px; }
body :is(.workflow,.task-grid) { gap: 16px; }
body :is(.workflow-step,.task-card) { border: 1px solid var(--ds-line); border-radius: 8px; background: var(--ds-surface); padding: 20px; }
body :is(.workflow-step b,.task-card b) { font-size: 17px; color: var(--ds-ink); font-weight: 650; }
body :is(.workflow-step span,.task-card span) { color: var(--ds-muted); font-size: 14px; line-height: 1.75; }
body .interest-section { padding-top: 48px; }
body .interest-heading { align-items: end; }
body .interest-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
body .interest-grid button { position: relative; min-height: 142px; display: flex; flex-direction: column; align-items: flex-start; padding: 18px 20px; overflow: hidden; border: 1px solid var(--ds-line); border-radius: 10px; background: var(--ds-surface); color: var(--ds-ink); text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
body .interest-grid button::after { content: "↘"; position: absolute; right: 17px; bottom: 13px; color: var(--ds-line); font-size: 28px; font-weight: 400; transition: color .16s ease, transform .16s ease; }
body .interest-grid button:hover, body .interest-grid button.active { border-color: var(--ds-accent); background: color-mix(in srgb,var(--ds-soft) 70%,var(--ds-surface)); transform: translateY(-2px); }
body .interest-grid button:hover::after, body .interest-grid button.active::after { color: var(--ds-accent); transform: translate(2px,2px); }
body .interest-grid span { color: var(--ds-accent); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; }
body .interest-grid b { max-width: 88%; margin-top: 20px; font-size: 17px; line-height: 1.45; font-weight: 650; }
body .interest-grid small { margin-top: 5px; color: var(--ds-muted); font-size: 12px; }

/* Global graph: a restrained, explorable map built from the site's real content relations. */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
body .global-graph-section { padding-top: 48px; }
body .global-graph-heading { align-items: end; }
body .global-graph-heading .home-kicker { margin-bottom: 10px; }
body .global-graph-shell { overflow: hidden; border: 1px solid var(--ds-line); border-radius: 18px; background: var(--ds-surface); box-shadow: 0 18px 54px rgba(40,45,38,.06); }
body .global-graph-toolbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--ds-line); background: color-mix(in srgb,var(--ds-surface) 82%,var(--ds-soft)); }
body .global-graph-counts { display: flex; align-items: center; gap: 18px; flex-shrink: 0; color: var(--ds-muted); font-size: 12px; line-height: 1.4; }
body .global-graph-counts span { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
body .global-graph-counts b { color: var(--ds-ink); font-family: var(--mono); font-size: 16px; font-weight: 600; }
body .global-graph-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
body .global-graph-mode { display: inline-flex; padding: 3px; border: 1px solid var(--ds-edge); border-radius: 999px; background: var(--ds-paper); }
body .global-graph-mode button { height: 32px; padding: 5px 10px; border: 1px solid transparent; background: transparent; }
body .global-graph-mode button[aria-pressed="true"] { border-color: var(--ds-line); background: var(--ds-surface); color: var(--ds-ink); box-shadow: 0 1px 5px rgba(30,34,28,.08); }
body .global-graph-controls label { position: relative; display: block; min-width: 0; }
body .global-graph-controls input { width: min(310px,31vw); min-width: 180px; height: 40px; padding: 8px 12px 8px 34px; border: 1px solid var(--ds-edge); background: var(--ds-paper); font-size: 13px; }
body .global-graph-search-wrap::before { content: ""; position: absolute; z-index: 2; left: 12px; top: 13px; width: 12px; height: 12px; border: 1.5px solid var(--ds-muted); border-radius: 50%; pointer-events: none; }
body .global-graph-search-wrap::after { content: ""; position: absolute; z-index: 2; left: 22px; top: 24px; width: 6px; border-top: 1.5px solid var(--ds-muted); transform: rotate(45deg); pointer-events: none; }
body .global-graph-controls select { width: 160px; height: 40px; padding: 7px 30px 7px 10px; border: 1px solid var(--ds-edge); background-color: var(--ds-paper); font-size: 12px; }
body .global-graph-controls button { height: 40px; padding: 7px 12px; border: 1px solid var(--ds-edge); border-radius: 999px; background: var(--ds-paper); color: var(--ds-muted); font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
body .global-graph-controls :is(input,select,button):focus-visible { border-color: var(--ds-accent); outline: 2px solid color-mix(in srgb,var(--ds-accent) 22%,transparent); outline-offset: 1px; }
body .global-graph-controls .global-graph-mode button { border-color: transparent; }
body .global-graph-controls .global-graph-mode button[aria-pressed="true"] { border-color: var(--ds-line); }
body .global-graph-controls button:hover { border-color: var(--ds-accent); background: var(--ds-soft); }
body .global-graph-results { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; width: min(390px,80vw); max-height: 338px; overflow: auto; padding: 6px; border: 1px solid var(--ds-edge); border-radius: 10px; background: var(--ds-surface); box-shadow: 0 14px 36px rgba(25,28,24,.16); }
body .global-graph-results button { width: 100%; height: auto; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 0; background: transparent; text-align: left; }
body .global-graph-results button:hover { background: var(--ds-soft); border: 0; }
body .global-graph-results button > span { width: 7px; height: 7px; border-radius: 50%; background: var(--node-color); }
body .global-graph-results button b { overflow: hidden; color: var(--ds-ink); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
body .global-graph-results button small { color: var(--ds-muted); font-size: 10px; white-space: nowrap; }
body .global-graph-no-result { padding: 14px; color: var(--ds-muted); font-size: 13px; }
body .global-graph-stage { position: relative; min-height: 620px; display: grid; grid-template-columns: minmax(0,1fr) 280px; background: var(--ds-paper); }
body #globalGraphCanvas { grid-column: 1; display: block; width: 100%; height: 620px; touch-action: none; cursor: grab; }
body #globalGraphCanvas:active { cursor: grabbing; }
body .global-graph-browse { grid-column: 1; height: 620px; overflow: auto; padding: 24px; background: var(--ds-paper); }
body .global-graph-browse[hidden], body #globalGraphCanvas[hidden] { display: none; }
body .global-graph-browse-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--ds-line); }
body .global-graph-browse-head span { color: var(--ds-accent); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
body .global-graph-browse-head h3 { margin: 5px 0 0; color: var(--ds-ink); font-size: 20px; line-height: 1.4; }
body .global-graph-browse-head > b { flex-shrink: 0; color: var(--ds-muted); font-size: 11px; font-weight: 500; }
body .global-graph-card-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding-top: 14px; }
body .global-graph-card { min-height: 176px; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--ds-line); border-radius: 9px; background: var(--ds-surface); }
body .global-graph-card-meta { display: flex; align-items: center; gap: 6px; color: var(--ds-muted); font-size: 9px; }
body .global-graph-card-meta span { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--node-color); }
body .global-graph-card h4 { margin: 11px 0 6px; color: var(--ds-ink); font-size: 16px; line-height: 1.4; }
body .global-graph-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ds-muted); font-size: 11px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
body .global-graph-card-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; }
body .global-graph-card-actions :is(button,a) { padding: 0; border: 0; background: transparent; color: var(--ds-muted); font-size: 10px; font-weight: 600; cursor: pointer; }
body .global-graph-card-actions a { color: var(--ds-accent); }
body .global-graph-card-actions :is(button,a):hover { color: var(--ds-ink); }
body .global-graph-more { display: block; margin: 18px auto 0; padding: 9px 14px; border: 1px solid var(--ds-line); border-radius: 999px; background: var(--ds-surface); color: var(--ds-muted); font-size: 11px; cursor: pointer; }
body .global-graph-more[hidden] { display: none; }
body .global-graph-browse-empty { grid-column: 1 / -1; padding: 56px 20px; color: var(--ds-muted); text-align: center; font-size: 13px; }
body .global-graph-inspector { position: relative; z-index: 3; grid-column: 2; width: 100%; max-height: 620px; overflow: auto; padding: 28px 24px; border: 0; border-left: 1px solid var(--ds-line); border-radius: 0; background: linear-gradient(150deg,color-mix(in srgb,var(--ds-surface) 96%,transparent),color-mix(in srgb,var(--ds-soft) 78%,var(--ds-surface))); box-shadow: none; backdrop-filter: none; }
body .global-graph-inspector-kicker { display: flex; align-items: center; gap: 8px; color: var(--ds-muted); font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
body .global-graph-inspector-kicker span { width: 8px; height: 8px; border-radius: 50%; background: var(--node-color); }
body .global-graph-inspector h3 { margin: 14px 0 5px; color: var(--ds-ink); font-size: 20px; line-height: 1.42; }
body .global-graph-node-meta { color: var(--ds-accent); font-family: var(--mono); font-size: 10px; line-height: 1.6; }
body .global-graph-inspector p { margin: 16px 0 0; color: var(--ds-muted); font-size: 13px; line-height: 1.78; }
body .global-graph-related { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
body .global-graph-related b { width: 100%; margin-bottom: 2px; color: var(--ds-muted); font-size: 10px; font-weight: 500; }
body .global-graph-related button { max-width: 100%; overflow: hidden; padding: 5px 9px; border: 0; border-radius: 999px; background: var(--ds-surface); color: var(--ds-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
body .global-graph-related button:hover { color: var(--ds-ink); border-color: var(--ds-accent); }
body .global-graph-related.is-cross-library button { align-items: flex-start; border: 1px dashed color-mix(in srgb,#235fa8 42%,var(--ds-line)); border-radius: 8px; color: var(--ds-ink); text-align: left; }
body .global-graph-related.is-cross-library button span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
body .global-graph-related.is-cross-library button small { display: block; margin-top: 2px; color: #235fa8; font-size: 9px; }
body .global-graph-open { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; padding: 8px 12px; border: 0; border-radius: 999px; background: var(--ds-lime); color: var(--ds-on-lime); font-size: 11px; font-weight: 650; }
body .global-graph-hint { position: absolute; left: 18px; bottom: 16px; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb,var(--ds-surface) 86%,transparent); color: var(--ds-muted); font-size: 10px; pointer-events: none; }
body .global-graph-legend { min-height: 54px; display: flex; align-items: center; gap: 15px; padding: 12px 16px; border-top: 1px solid var(--ds-line); color: var(--ds-muted); font-size: 10px; }
body .global-graph-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
body .global-graph-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--node-color); }
body .global-graph-legend small { margin-left: auto; max-width: 330px; color: var(--ds-muted); font-size: 10px; line-height: 1.5; text-align: right; }
:root[data-theme="dark"] body .global-graph-shell { box-shadow: 0 18px 54px rgba(0,0,0,.18); }

/* Shelf and its article / editor / chat views. */
body #shelfTopbar { display: flex; align-items: center; min-height: 60px; padding: 10px 28px; background: var(--ds-paper); border-bottom: 1px solid var(--ds-line); gap: 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body #shelfTopbar::-webkit-scrollbar { display: none; }
body #shelfTopbar .logo { font-size: 19px; font-weight: 650; }
body #shelfTopbar .sub { display: none; }
body #shelfTopbar .search-input { border: 1px solid var(--ds-edge); border-radius: 8px; background: var(--ds-surface); min-height: 38px; flex: 1 1 220px; min-width: 120px; width: auto; max-width: 400px; }
body #shelfTopbar .site-switch { max-width: 116px; }
body #shelfTopbar .top-actions { flex-shrink: 0; }
body #app { max-width: 1144px; margin-inline: auto; padding: 28px; }
body #app > .page { padding: 0; }
body .entry-page { max-width: 768px; padding: 24px 36px 48px; border: 1px solid var(--ds-line); border-radius: 10px; background: var(--ds-surface); }
body .entry-head h1 { font-size: 32px; font-weight: 650; line-height: 1.35; }
body .entry-content { font-size: 16px; line-height: 1.75; }
body .entry-content :is(p,li), body .my-note-block .content, body .ai-summary-content { font-size: 16px; line-height: 1.75; }
body .type-tabs { background: transparent; border-color: var(--ds-line); gap: 6px; padding-bottom: 8px; }
body .type-tab { border: 1px solid transparent; border-radius: 6px; padding: 9px 14px; min-height: 42px; color: var(--ds-muted); }
body .type-tab.active { background: var(--ds-lime); color: var(--ds-on-lime); border-color: var(--ds-edge); }
body .type-tab.active::after { display: none; }
body .type-tab .count { color: var(--ds-muted); }
body .type-tab.active .count { color: var(--ds-on-lime); }
body .view-switch button { border: 1px solid var(--ds-edge); border-radius: 6px; background: var(--ds-surface); color: var(--ds-muted); }
body .view-switch button.active { background: var(--ds-lime); color: var(--ds-on-lime); }
body .tag-chip { background: var(--ds-lime) !important; color: var(--ds-on-lime) !important; border: 1px solid var(--ds-edge); border-radius: 6px; }
body :is(.ai-summary-block,.mindmap-block) { border: 1px solid var(--ds-line); border-radius: 8px; background: var(--ds-surface); }
body :is(.subj-head,.mindmap-head,.mindmap-heading,.mindmap-foot) { border-color: var(--ds-line); border-width: 1px; }
body .subj-info h1 { font-size: 32px; line-height: 1.35; }
body .ai-summary-content .placeholder { color: var(--ds-muted); }
body .mindmap-canvas { background-image: none; }
body :is(.entry-card,.topic-card,.subject-card,.collection-card,.stat-card,.my-note-block,.getnote-item,.update-day,.access-card,.modal,.chat-panel) { border: 1px solid var(--ds-line); border-radius: 8px; box-shadow: none; background: var(--ds-surface); }
body .entry-card:hover { transform: none; box-shadow: none; border-color: var(--ds-accent); }
body .entry-head, body .access-card-head, body .modal-header { border-bottom: 1px solid var(--ds-line); }
body .access-gate { background: var(--ds-paper); }
body .access-card { max-width: 460px; }
body .access-card-head h1 { font-size: 28px; line-height: 1.3; }
body :is(.tabs,.home-tools,.stats-strip,.section-tabs,.subject-tabs,.chat-form) { border-color: var(--ds-line); }
body .shelf-system { border: 1px solid var(--ds-line); border-radius: 10px; background: var(--ds-soft); box-shadow: none; padding-top: 0; }
body .shelf { background: var(--ds-soft); height: 220px; gap: 8px; border-bottom: 1px solid var(--ds-edge); border-image: none; box-shadow: none; }
body .shelf-system > .shelf { height: 248px; padding-top: 24px; }
body .shelf:has(.shelf-empty) { height: 80px; }
body .shelf-empty { padding: 20px 0; color: var(--ds-muted); font-style: normal; }
body .book { height: min(var(--spine-height, 210px), 220px); max-height: 100%; min-height: 0; padding: 32px 4px 12px; border: 1px solid rgba(34,39,33,.16); border-left: 5px solid rgba(34,39,33,.2); border-radius: 6px 6px 0 0; box-shadow: none; }
body .book .spine-text { padding: 0; letter-spacing: 2px; max-height: 100%; }
body .book::before, body .book::after, body .stat-card::after { display: none; }
body .book .badge { background: #F4EEE3; color: #292620; border: 1px solid rgba(34,39,33,.16); }
body .shelf-system::before { display: none; }
body .book:hover { transform: none; outline: 2px solid var(--ds-accent); outline-offset: 3px; }
body :is(.menu-pop,.mindmap-view,.mindmap-canvas) { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 8px; box-shadow: none; }

/* Fluency retains timer, recording and practice state; tabs stay within reach. */
body[data-page="fluency"] > .home-nav { max-width: 1088px; margin-inline: auto; }
body .flu-hero h1 em { color: var(--ds-accent); }
body .flu-demo { border: 1px solid var(--ds-edge); border-radius: 10px; background: var(--ds-soft); box-shadow: none; padding: 24px; }
body .flu-tabs { position: sticky; top: var(--nav-height); z-index: 30; background: var(--ds-paper); border-bottom: 1px solid var(--ds-line); flex-wrap: nowrap; overflow-x: auto; padding: 8px 0; gap: 6px; margin-top: 24px; }
body .flu-tab { min-height: 42px; border: 1px solid transparent; border-radius: 6px; padding: 9px 14px; margin: 0; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
body .flu-tab.active { background: var(--ds-lime); color: var(--ds-on-lime); border-color: var(--ds-edge); }
body .flu-panel { border: 1px solid var(--ds-line); border-radius: 10px; padding: 28px; margin-top: 16px; background: var(--ds-surface); scroll-margin-top: calc(var(--nav-height) + 78px); }
body .flu-panel-head h2 { font-size: 24px; }
body .flu-panel-head p { font-size: 16px; line-height: 1.75; }
body :is(.flu-topic,.flu-round,.flu-row,.flu-live-cell,.flu-transcript,.flu-repair-stage,.flu-shadow-item,.flu-stat,.flu-mile,.flu-chart-wrap,.flu-result,.flu-note,.flu-warn) { border: 1px solid var(--ds-line); border-radius: 8px; background: var(--ds-paper); box-shadow: none; }
body :is(.flu-topic.on,.flu-round.now,.flu-shadow-item.on) { border-color: var(--ds-accent); background: var(--ds-soft); box-shadow: none; }
body .flu-topic:hover { transform: none; box-shadow: none; border-color: var(--ds-accent); background: var(--ds-soft); }
body .flu-transcript .ph { color: var(--ds-muted); }
body .flu-bar { height: 22px; border: 1px solid var(--ds-edge); border-radius: 6px; }
body .flu-clock { font-size: clamp(52px,7vw,76px); line-height: 1.1; }
body .flu-btn { letter-spacing: 0; font-size: 14px; }
body .flu-btn-red { color: var(--ds-accent); background: var(--ds-surface); }
body .flu-btn:active { transform: none; }

@media (max-width: 1000px) {
  body .grid, body .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .interest-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .toolbar { grid-template-columns: 1fr; gap: 10px; }
  body .home-hero { gap: 28px; }
  body .nav-actions .btn { padding-inline: 7px; }
  body .global-graph-toolbar { align-items: flex-start; flex-direction: column; }
  body .global-graph-controls { width: 100%; justify-content: flex-start; }
  body .global-graph-search-wrap { flex: 1; }
  body .global-graph-controls input { width: 100%; }
  body .global-graph-legend { align-items: flex-start; flex-wrap: wrap; }
  body .global-graph-legend small { width: 100%; max-width: none; margin-left: 0; text-align: left; }
}
@media (max-width: 760px) {
  :root { --nav-height: 104px; }
  body :is(.wrap,.shell,.home-shell) { padding: 0 20px 40px; }
  body :is(.nav,.home-nav) { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 52px 52px; gap: 0 12px; align-items: center; }
  body :is(.brand,.home-brand) { grid-column: 1; grid-row: 1; }
  body :is(.nav-actions,.home-links) { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; width: 100%; height: 52px; }
  body .site-tools { grid-column: 2; grid-row: 1; }
  body .site-switch { max-width: 132px; }
  body :is(.hero,.flu-hero) { grid-template-columns: 1fr; gap: 20px; padding: 28px 0 24px; }
  body :is(.hero,.flu-hero) h1 { font-size: 27px; line-height: 1.35; }
  body .hero-card { min-height: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px; padding: 16px; }
  body .hero-card .big { font-size: 38px; }
  body .hero-card .small { margin: 0; }
  body .home-hero { grid-template-columns: 1fr; padding: 32px 0; gap: 24px; }
  body .home-hero h1 { font-size: clamp(34px,9vw,52px); margin-top: 14px; }
  body .home-hero-card { min-height: 270px; height: 270px; }
  body .home-section { padding: 32px 0; }
  body .home-section-head { display: block; }
  body .home-section-head p { margin-top: 14px; }
  body .home-section h2 { font-size: 25px; }
  body .interest-section { padding-top: 36px; }
  body .interest-grid { display: flex; gap: 9px; margin-right: -20px; padding-right: 20px; overflow-x: auto; scroll-snap-type: x mandatory; }
  body .interest-grid button { min-width: 235px; min-height: 132px; scroll-snap-align: start; }
  body .global-graph-section { padding-top: 36px; }
  body .global-graph-toolbar { gap: 12px; }
  body .global-graph-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  body .global-graph-mode { grid-column: 1 / -1; justify-self: start; }
  body .global-graph-search-wrap { grid-column: 1 / -1; }
  body .global-graph-controls select { width: 100%; }
  body .global-graph-stage { min-height: 620px; display: flex; flex-direction: column; }
  body #globalGraphCanvas { height: 430px; flex: 0 0 430px; }
  body .global-graph-browse { width: 100%; height: auto; max-height: 680px; padding: 18px; }
  body .global-graph-card-list { grid-template-columns: 1fr; }
  body .global-graph-card { min-height: 164px; }
  body .global-graph-inspector { position: static; width: auto; max-height: none; min-height: 190px; margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
  body .global-graph-hint { top: 396px; bottom: auto; }
  body :is(.section-title,.section-head) { display: block; }
  body :is(.section-title,.section-head) p { margin-top: 12px; }
  body .panel { padding: 24px 20px 40px; }
  body :is(.detail-cn,.panel-head h2) { font-size: 26px; }
  body .footer { flex-direction: column; gap: 6px; }
  body #shelfTopbar { padding: 0 20px; display: grid; height: 104px; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 52px 52px; gap: 0 10px; }
  body #shelfTopbar .brand { grid-column: 1; grid-row: 1; }
  body #shelfTopbar .top-actions { grid-column: 2; grid-row: 2; margin: 0; gap: 6px; }
  body #shelfTopbar .access-role-badge { display: none; }
  body #shelfTopbar .top-actions .btn { display: inline-flex; padding: 7px 9px; font-size: 12px; }
  body #shelfTopbar .search-input { grid-column: 1; grid-row: 2; min-width: 0; width: 100%; max-width: none; }
  body #app { padding: 20px; }
  body .entry-page { padding: 24px 20px 40px; }
  body .entry-head h1 { font-size: 26px; }
  body .subj-info h1 { font-size: 26px; }
  body[data-page="fluency"] > .home-nav { margin-inline: 20px; }
  body .flu-panel { padding: 20px; }
  body .flu-live, body .flu-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .flu-topic-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  body #shelfTopbar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    height: 60px;
    min-height: 60px;
    padding: 8px 14px;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  body #shelfTopbar::-webkit-scrollbar { display: none; }
  body #shelfTopbar .brand { flex: 0 0 auto; }
  body #shelfTopbar .shelf-brand-logo { width: 34px; height: 34px; }
  body #shelfTopbar .logo { font-size: 16px; }
  body #shelfTopbar .search-input {
    flex: 1 1 180px;
    min-width: 140px;
    width: auto;
    max-width: 320px;
    height: 38px;
  }
  body #shelfTopbar .top-actions {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
    gap: 6px;
  }
  body #shelfTopbar .access-role-badge { display: inline-flex; }
  body #shelfTopbar .site-tools { flex: 0 0 auto; }
}
@media (max-width: 560px) {
  body .grid, body .product-grid, body .workflow, body .task-grid, body .map-grid, body .flow, body .method-grid { grid-template-columns: 1fr; }
  body .grid .card { min-height: 0; }
  body .product-card { min-height: 224px; }
  body .section { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  :root { --ds-surface: #fff; --ds-paper: #fff; --ds-ink: #222721; --ds-muted: #686A64; --ds-line: #D4D9CE; --ds-soft: #F2F4ED; color-scheme: light; }
  body :is(.nav,.home-nav,.topbar,.site-tools,.toolbar,.filters,.close,.cid,.flu-controls,.flu-tabs,.controls) { display: none !important; }
  body .drawer.open { position: static; }
  body:has(.drawer.open) > .wrap { display: none; }
  body .drawer.open .panel { position: static; width: 100%; height: auto; overflow: visible; transform: none; border: 0; }
  body .drawer.open .shade { display: none; }
  body :is(.card,.product-card,.entry-page,.flow-item) { break-inside: avoid; box-shadow: none; }
  body .home-hero { background-image: none; }
}
