/* Desktop interface: platform typography, continuous surfaces and quiet controls.
   One shared layer for Academy, the directory and X Check. */
:root, .page-coins {
  --bg: #fafafa;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f2f2f4;
  --surface-hover: #f0f0f3;
  --toolbar: #f6f6f7;
  --ink: #242428;
  --muted: #65656f;
  --subtle: #71717b;
  --line: #e4e4e8;
  --border-strong: #b9bac3;
  --accent: #3568a8;
  --accent-solid: #3568a8;
  --accent-hover: #28568f;
  --accent-on: #ffffff;
  --accent-soft: #eaf0f8;
  --focus: #4c82c7;
  --segment-track: #e9e9ed;
  --segment-selected: #ffffff;
  --segment-shadow: 0 1px 3px #1717211a, 0 0 0 1px #17172105;
  --match-bg: #eaf0f8;
  --match-hover: #e1eaf6;
  --match-border: #9db4d1;
  --match-accent: #315f98;
  --dialog-shadow: 0 24px 90px #15152124;
}
@media (prefers-color-scheme: dark) {
  :root, .page-coins {
    --bg: #1c1d20;
    --paper: #232428;
    --surface: #232428;
    --surface-raised: #292a2f;
    --surface-soft: #292a2f;
    --surface-hover: #2b2c31;
    --toolbar: #222327;
    --ink: #ececf0;
    --muted: #afb0bb;
    --subtle: #a0a1ad;
    --line: #35363d;
    --border-strong: #5c5e69;
    --accent: #a6c5ef;
    --accent-solid: #4977b4;
    --accent-hover: #436d9f;
    --accent-on: #ffffff;
    --accent-soft: #2b3749;
    --focus: #a6c5ef;
    --segment-track: #303137;
    --segment-selected: #4a4b53;
    --segment-shadow: 0 1px 3px #00000024, 0 0 0 1px #ffffff08;
    --match-bg: #29364a;
    --match-hover: #30415a;
    --match-border: #617a9a;
    --match-accent: #b7d0f1;
    --dialog-shadow: 0 24px 90px #00000060;
  }
}
body, button, input, select, textarea {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
body { font-size: 14px; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, .btn, a { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
button:active, .btn:active, .track-card:active, .coin-card:active { transform: none; }
:is(button, a, input, select, summary):focus-visible,
:is(.track-card, .back-link, .course-row, .check-controls button):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.course-row:focus-visible { outline-offset: -3px; }
main:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
input, select, textarea { border-radius: 6px; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--toolbar); border-bottom: 1px solid var(--line); }
.site-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); max-width: 1184px; height: 64px; min-height: 64px; padding: 0 32px; gap: 24px; }
.site-header .brand { justify-self: start; font-size: 16px; font-weight: 600; letter-spacing: -.35px; gap: 8px; }
.site-header .brand img { width: 24px; height: 24px; }
.site-header #navigation { order: initial; width: auto; align-self: center; display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--segment-track); min-width: 322px; }
.site-header .nav-link { display: flex; flex: 1; justify-content: center; padding: 6px 16px; min-height: 30px; margin: 0; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 450; white-space: nowrap; }
.site-header .nav-link:hover { color: var(--ink); background: color-mix(in srgb, var(--segment-selected) 40%, transparent); }
.site-header .nav-link.active { color: var(--ink); background: var(--segment-selected); box-shadow: var(--segment-shadow); font-weight: 550; }
.site-header .nav-link.active::after { display: none; }
.site-tools { justify-self: end; gap: 16px; margin-left: 0; }
.workspace { min-height: calc(100dvh - 64px); }
main, .page-coins #main { width: 100%; max-width: 1064px; padding: 48px 32px 72px; margin: 0 auto; }
.footer { width: calc(100% - 64px); max-width: 1000px; padding: 22px 0; font-size: 11px; border-top-color: var(--line); }
.academy-heading, .track-heading, .directory-heading, .xcheck-heading { margin: 0 0 30px; }
.academy-heading h1, .track-heading h1, .directory-heading h1, .xcheck h1 { font-size: 30px; font-weight: 600; line-height: 1.3; letter-spacing: -.65px; margin: 0; }
.academy-heading p, .track-heading p, .xcheck-heading > p:last-child { max-width: 660px; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.academy-heading .eyebrow, .track-heading .eyebrow, .xcheck-heading .xcheck-kicker { display: none; }
.back-link { min-height: 36px; margin: -8px 0 14px; padding: 7px 0; font-size: 12px; color: var(--muted); }
.back-link:hover { color: var(--ink); }

/* Course families are two open columns; only their content creates the hierarchy. */
.academy-tracks { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.track-card, .track-trading { min-height: 290px; padding: 28px 30px 28px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.track-card + .track-card { padding-left: 30px; padding-right: 0; border-left: 1px solid var(--line); }
.track-card:hover, .track-trading:hover { transform: none; box-shadow: none; background: transparent; border-color: var(--line); }
.track-top { margin: 0 0 24px; }
.track-icon, .track-trading .track-icon { width: 30px; height: 30px; color: var(--muted); background: transparent; }
.track-icon svg { width: 25px; height: 25px; stroke-width: 1.45; }
.track-count { font-size: 12px; color: var(--muted); }
.track-card h2 { margin-bottom: 12px; font-size: 23px; font-weight: 550; letter-spacing: -.5px; }
.track-card > p { font-size: 14px; line-height: 1.8; color: var(--muted); margin-bottom: 16px; }
.track-topics { gap: 7px 16px; font-size: 12px; color: var(--muted); margin-bottom: 26px; }
.track-topics > span::before { display: none; }
.track-bottom, .track-trading .track-bottom { padding-top: 0; border: 0; font-size: 12px; color: var(--muted); }
.track-action { gap: 9px; font-size: 13px; font-weight: 500; color: var(--accent); }
.track-card:hover .track-action { text-decoration: underline; text-underline-offset: 4px; }
.track-progress { padding-top: 6px; color: var(--muted); font-size: 12px; }
.course-search { padding: 0 0 22px; gap: 12px 24px; }
.course-search .search-field { max-width: 320px; }
.search-field input, .asset-search input { min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px 9px 36px; color: var(--ink); font-size: 13px; background: var(--surface); box-shadow: none; }
.search-field input { height: 40px; }
.search-field svg, .asset-search svg { width: 16px; height: 16px; left: 12px; top: 12px; }
.course-search small { font-size: 12px; }
.course-group { margin-top: 30px; }
.course-group-heading { margin: 0 0 8px; gap: 10px; }
.course-group-heading h2 { font-size: 14px; font-weight: 600; }
.course-group-heading .group-number { font-size: 11px; color: var(--muted); letter-spacing: 0; }
.course-list { border: 0; background: transparent; border-radius: 0; }
.course-row { padding: 19px 8px; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 16px; border-bottom: 1px solid var(--line); }
.course-row:hover { background: var(--surface-hover); }
.course-index { color: var(--subtle); font-size: 12px; }
.course-copy strong { font-size: 15px; font-weight: 500; line-height: 1.6; }
.course-copy > span { margin-top: 4px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.course-meta { font-size: 12px; }
.course-state { font-size: 12px; }

/* Directory: quiet filters and stable two-column reading alignment. */
.directory-heading { align-items: center; gap: 24px; }
.asset-search { width: 290px; }
.asset-search input { height: 38px; font-size: 13px; }
.asset-filters, html[lang="en"] .asset-filters { gap: 4px; padding: 0 0 18px; border-bottom-color: var(--line); }
.asset-filters button { min-height: 34px; border-radius: 6px; padding: 7px 12px; border: 0; font-weight: 400; font-size: 12px; }
.asset-filters button:last-child { margin-left: 0; }
.asset-filters button:hover { background: var(--surface-hover); }
.asset-filters button[aria-pressed="true"] { background: var(--segment-track); color: var(--ink); font-weight: 550; }
.asset-filters button[aria-pressed="true"]::after { display: none; }
.asset-results-heading { margin: 22px 0 0; }
.asset-results-heading h2 { font-size: 12px; font-weight: 500; }
#coin-results .coin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; }
#coin-results .coin-card { grid-template-columns: 36px minmax(0, 1fr) 16px; gap: 14px; min-height: 154px; padding: 25px 0; border-radius: 0; box-shadow: none; background: transparent; }
#coin-results .coin-card:hover { background: transparent; transform: none; box-shadow: none; }
.asset-mark.coin-avatar { width: 36px; height: 36px; }
.asset-title { gap: 5px 8px; margin-bottom: 8px; }
#coin-results .coin-card h2 { font-size: 16px; font-weight: 550; }
.coin-name { font-size: 12px; }
#coin-results .coin-card .coin-lead { font-size: 13px; line-height: 1.85; margin: 0; }
.asset-open { width: 26px; height: 34px; }
.asset-open::after { border-radius: 6px; }
.coin-card:hover .asset-title { color: var(--accent); }

/* X Check: compact search, prominent results, supporting diagnostics on demand. */
.xcheck { max-width: 920px; line-height: 1.7; }
.xcheck-search-panel { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.xcheck-search-form { grid-template-columns: minmax(0, 1fr) minmax(140px, 190px) auto; gap: 12px; }
.xcheck-search-form label { font-size: 12px; font-weight: 500; margin-bottom: 8px; color: var(--muted); }
.xcheck-search-form input, .xcheck-search-form select { height: 40px; padding: 0 12px; background: var(--bg); border-color: var(--line); border-radius: 6px; font-size: 14px; }
.xcheck-submit { height: 40px; padding: 0 18px; gap: 12px; border-radius: 6px; border-color: transparent; font-size: 13px !important; font-weight: 500 !important; }
.xcheck-panel-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; }
.xcheck #xcheck-search-help { margin: 0; max-width: 480px; font-size: 12px; }
.xcheck-shortcuts { margin: 0; gap: 3px; font-size: 11px; }
.xcheck-shortcuts > span { margin-right: 7px; }
.xcheck-shortcuts button { border: 0; min-height: 30px; padding: 4px 9px; font-size: 12px; border-radius: 5px; background: transparent; color: var(--muted); }
.xcheck-shortcuts button:hover { background: var(--surface-soft); color: var(--ink); }
.xcheck-network-coverage { margin-top: 12px; color: var(--muted); font-size: 12px; }
.xcheck-network-coverage > summary { width: fit-content; padding: 4px 0; cursor: pointer; }
#xcheck-network-note { font-size: 12px; margin-top: 10px; }
.xcheck-status { margin-top: 22px; font-size: 12px; min-height: 0; }
.xcheck-status:empty { display: none; }
.xcheck:has(.xcheck-search-results, .xcheck-report) .xcheck-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#xcheck-output { margin-top: 10px; }
.xcheck-empty { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; border: 0; }
.xcheck-empty-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; color: var(--subtle); }
.xcheck-empty-icon svg { width: 26px; height: 26px; }
.xcheck-empty > p { max-width: 450px; font-size: 13px; line-height: 1.8; }
.xcheck-search-results > header { margin: 24px 0 16px; }
.xcheck h2 { font-size: 20px; line-height: 1.5; font-weight: 550; letter-spacing: -.3px; }
.xcheck .xcheck-note { font-size: 12px; line-height: 1.8; }
.xcheck-search-results > header p { margin-top: 6px; }
.xcheck-source-status { font-size: 12px; color: var(--muted); margin: 12px 0 !important; }
.xcheck-candidate-list { border: 0; }
.xcheck-candidate-list > li { border: 0; }
.xcheck-candidate { display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: start; gap: 14px; padding: 19px 16px; border-radius: 7px; border: 1px solid transparent; background: transparent; }
.xcheck-candidate-list > li + li { border-top: 1px solid var(--line); }
.xcheck-candidate-list > li:has(.xcheck-candidate-highlight) + li { border-top: 0; }
.xcheck-candidate:hover { background: var(--surface-hover); }
.xcheck-candidate-highlight { --ink: inherit; --muted: inherit; --match-bg: inherit; --match-hover: inherit; --match-border: inherit; --match-accent: inherit; color: var(--ink); background: var(--match-bg); border-color: var(--match-border); box-shadow: none; border-radius: 8px; margin: 0 0 5px; }
.xcheck-candidate-highlight:hover { background: var(--match-hover); }
.xcheck-candidate-highlight .xcheck-match-label { color: var(--match-accent); }
.xcheck-asset-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-top: 2px; color: var(--subtle); flex: none; }
.xcheck-asset-icon img { display: block; width: 30px; height: 30px; object-fit: contain; }
.xcheck-asset-icon svg { width: 28px; height: 28px; stroke-width: 1.3; }
.xcheck-asset-name { font-size: 15px; font-weight: 550; line-height: 1.5; }
.xcheck-asset-name small { font-size: 12px; }
.xcheck-asset-meta { font-size: 12px; margin-top: 4px; }
.xcheck-address, .xcheck-no-address { font-size: 12px; margin-top: 5px; line-height: 1.6; color: var(--muted); }
.xcheck-match-label { font-size: 11px; font-weight: 550; margin-bottom: 7px; }
.xcheck-match-reason { margin-top: 8px; font-size: 12px; line-height: 1.7; }
.xcheck-candidate-arrow { margin-top: 8px; font-size: 17px; color: var(--muted); }
.xcheck-candidate-copy { max-width: none; }
.xcheck-query-notes { margin-top: 22px; border-top: 1px solid var(--line); }
.xcheck .xcheck-notices { font-size: 12px; line-height: 1.85; }
.xcheck-report { margin-top: 24px; padding-top: 24px; }
.xcheck-report-header { gap: 20px; }
.xcheck-report-header .xcheck-kicker { font-size: 11px; letter-spacing: 0; }
.xcheck-report-header h2 { font-size: 24px; letter-spacing: -.4px; }
.xcheck-plain-button { min-height: 36px; padding: 7px 12px; border-radius: 6px; border-color: var(--line); font-size: 12px !important; background: var(--surface); }
.xcheck-verdict { background: transparent; margin-top: 22px; padding: 20px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; gap: 20px; }
.xcheck-lights { gap: 9px; padding: 11px 14px; background: var(--surface-soft); border-color: var(--line); }
.xcheck-light { width: 20px; height: 20px; }
.xcheck .xcheck-risk-label { font-size: 23px; font-weight: 550; letter-spacing: -.35px; }
.xcheck-scope-results { margin-top: 26px; }
.xcheck-scope-results ul { gap: 0 32px; }
.xcheck-scope-name { font-size: 13px; }
.xcheck-scope-state, .xcheck-scope-count { font-size: 12px; }
.xcheck-findings, .xcheck-actions, .xcheck-limitations { margin-top: 28px; }
.xcheck h3 { font-size: 15px; font-weight: 550; }
.xcheck h4 { font-size: 14px; font-weight: 550; }
.xcheck-finding { border-radius: 6px; }
.xcheck-detail > summary { padding-top: 16px; padding-bottom: 16px; font-size: 12px; }

/* Reading surfaces remain opaque and keep illustrations beside their text. */
dialog { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--dialog-shadow); }
.lesson-dialog { border-radius: 12px; }
.dialog-tools { background: var(--surface); }
.dialog-tools .dialog-close { width: 36px; height: 36px; color: var(--muted); }
.dialog-tools .dialog-close:hover { color: var(--ink); background: var(--surface-hover); }
.lesson-intro .dialog-title { font-size: 27px; font-weight: 600; letter-spacing: -.4px; }
.lesson-intro .dialog-summary { font-size: 15px; }
.board-heading h3, .visual-copy h3 { font-size: 18px; font-weight: 550; }
.board-notes p, .visual-copy p, .section-prose p { font-size: 15px; line-height: 1.95; }
.board-notes h4 { font-size: 15px; }
.note-number { color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.board-viewport, .lesson-figure { border-radius: 8px; }
.lesson-dialog .example-box { border-radius: 8px; padding: 22px 24px; }
.example-steps { font-size: 15px; line-height: 1.95; }
.quiz-option { border-radius: 6px; min-height: 42px; }
.coin-dialog { max-width: 840px; border-radius: 12px; }
.coin-detail-header { padding-top: 26px; }
.coin-detail-identity .asset-mark { width: 50px; height: 50px; }
#coin-title { font-size: 26px; font-weight: 550; }
.coin-detail-section p, .coin-example p, .coin-questions p, .coin-risk-section .risk-list { font-size: 15px; line-height: 1.9; }
.coin-example { border: 0; border-radius: 8px; background: var(--surface-soft); }
.coin-detail-section h3, .coin-example h3, .coin-risk-section > h3 { font-size: 18px; font-weight: 550; }
.btn { min-height: 36px; border-radius: 6px; padding: 8px 14px; font-size: 13px; font-weight: 500; box-shadow: none; }
@media (max-width: 800px) {
  .site-header-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; padding: 0 24px; }
  .site-header #navigation { min-width: 0; justify-self: center; }
  .site-header .nav-link { padding: 6px 11px; }
  .site-tools { gap: 10px; }
  main, .page-coins #main { padding: 36px 24px 56px; }
  .footer { width: calc(100% - 48px); }
  .xcheck-search-form { grid-template-columns: minmax(0, 1fr) 150px auto; gap: 10px; }
  .xcheck-submit { padding: 0 14px; }
}
@media (max-width: 760px) {
  .site-header-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; height: auto; min-height: 100px; padding: 10px 18px; gap: 8px 14px; }
  .site-header .brand { font-size: 15px; }
  .site-tools { grid-column: 2; grid-row: 1; }
  .site-header #navigation { grid-column: 1 / -1; grid-row: 2; order: initial; width: 100%; min-height: 36px; }
  .site-header .nav-link { min-height: 32px; font-size: 13px; }
  .workspace { min-height: calc(100dvh - 100px); }
  main, .page-coins #main { padding: 30px 20px 44px; }
  .footer { width: calc(100% - 40px); font-size: 11px; }
  .academy-heading, .track-heading, .directory-heading, .xcheck-heading { margin-bottom: 24px; }
  .academy-heading h1, .track-heading h1, .directory-heading h1, .xcheck h1 { font-size: 26px; }
  .academy-tracks { grid-template-columns: minmax(0, 1fr); }
  .track-card, .track-card + .track-card { min-height: 0; padding: 25px 0; border-left: 0; }
  .track-card + .track-card { border-top: 1px solid var(--line); }
  .track-top { margin-bottom: 20px; }
  .track-card h2 { font-size: 22px; }
  .track-heading { display: block; }
  .track-progress { display: block; padding-top: 14px; }
  .course-search .search-field { flex-basis: 100%; max-width: none; }
  .course-row { grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 17px 2px; }
  .course-meta, html[lang="en"] .course-meta { grid-column: 2; display: flex; align-items: baseline; justify-content: space-between; min-width: 0; padding: 0; gap: 12px; }
  .course-copy strong { font-size: 14px; }
  .course-copy > span { font-size: 13px; }
  .directory-heading { display: block; }
  .asset-search { width: 100%; margin-top: 20px; }
  .asset-search input { height: 42px; }
  .asset-search svg { top: 14px; }
  .asset-filters, html[lang="en"] .asset-filters { gap: 4px; flex-wrap: wrap; }
  .asset-filters button { min-height: 36px; padding: 7px 10px; }
  #coin-results .coin-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #coin-results .coin-card { min-height: 0; padding: 22px 0; }
  .xcheck-search-panel { padding: 16px; border-radius: 10px; }
  .xcheck-search-form { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 10px; }
  .xcheck-input-field { grid-column: 1 / -1; }
  .xcheck-search-form input, .xcheck-search-form select, .xcheck-submit { height: 44px; }
  .xcheck-submit { width: auto; min-width: 100px; align-self: end; }
  .xcheck-panel-footer { gap: 12px; }
  .xcheck-shortcuts { flex-wrap: wrap; }
  .xcheck-shortcuts button { min-height: 34px; }
  .xcheck-candidate, .xcheck-candidate.xcheck-candidate-highlight { grid-template-columns: 28px minmax(0, 1fr) 14px; padding: 17px 10px; gap: 10px; }
  .xcheck-asset-icon { width: 28px; height: 28px; }
  .xcheck-asset-icon img { width: 26px; height: 26px; }
  .xcheck-candidate-copy { max-width: none; }
  .xcheck-asset-name { font-size: 14px; }
  .xcheck-address { font-size: 11px; }
  .xcheck-match-reason { font-size: 12px; }
  .xcheck-report-header h2 { font-size: 22px; }
  .xcheck-verdict { padding: 18px 0; gap: 15px; }
  .xcheck .xcheck-risk-label { font-size: 21px; }
  .xcheck-lights { gap: 7px; padding: 10px 11px; }
  .xcheck-light { width: 20px; height: 20px; }
  .xcheck-scope-results ul { grid-template-columns: minmax(0, 1fr); }
  .lesson-dialog { width: calc(100% - 16px); max-height: 96dvh; height: 96dvh; padding: 14px 12px; }
  .lesson-intro .dialog-title { font-size: 24px; }
  .board-notes p, .visual-copy p, .section-prose p, .example-steps { font-size: 15px; line-height: 1.9; }
  .coin-detail-section p, .coin-example p, .coin-questions p, .coin-risk-section .risk-list { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  button, a, input, select, .track-card, .coin-card { transition: none; }
}
