@import url('./tokens.css');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    line-height: 1.75;
}

a {
    color: var(--primary-dark);
}

.site-header {
    background: var(--header-bg);
    color: var(--text);
    position: relative;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
}

.site-nav a:hover {
    color: var(--text);
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 22px 16px 44px;
}

.page-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.eyebrow {
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0 0 6px;
}

h1 {
    margin: 0 0 14px;
    font-size: 2rem;
    line-height: 1.25;
}

h2 {
    margin: 34px 0 12px;
    font-size: 1.45rem;
    border-left: 5px solid var(--primary);
    padding-left: 12px;
}

h3 {
    margin: 24px 0 8px;
    font-size: 1.15rem;
}

p,
li {
    color: var(--text);
}

.lead {
    color: var(--muted);
    font-size: 1.08rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.info-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface-soft);
}

.info-box strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
}

.article-list {
    display: grid;
    gap: 14px;
    margin: 22px 0;
}

.article-link {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
}

.article-link:hover {
    border-color: var(--primary);
    background: var(--surface-soft);
}

.article-link strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.article-link span {
    display: block;
    color: var(--muted);
}

.callout {
    border-left: 5px solid var(--accent);
    background: var(--success-bg);
    padding: 14px 16px;
    margin: 18px 0;
    border-radius: 0 8px 8px 0;
}

.note-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin: 18px 0;
    background: var(--surface-soft);
}

.checklist li {
    margin-bottom: 8px;
}

.article-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.article-nav a {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--surface-soft);
    text-decoration: none;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
    margin: 18px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th,
td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-soft);
    color: var(--text);
}

.question-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin: 14px 0;
    background: var(--surface);
}

.bank-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.bank-stat {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.bank-stat strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1.35rem;
}

.question-list {
    margin-top: 22px;
}

.question-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
    margin: 14px 0;
}

.question-meta {
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.question-title {
    color: var(--text);
    font-weight: 800;
    margin: 0 0 12px;
}

.option-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.option-list li {
    padding: 6px 0;
}

.option-list .correct {
    color: var(--success);
    font-weight: 800;
}

.answer {
    color: var(--success);
    font-weight: 800;
}

.site-footer {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px 30px;
    color: var(--muted);
    font-size: 0.88rem;
}

.site-footer a {
    color: var(--primary-dark);
    margin-right: 12px;
}

@media (max-width: 680px) {
    .site-header-inner {
        display: block;
    }

    .site-nav {
        justify-content: flex-start;
        margin-top: 8px;
    }

    .page-card {
        padding: 22px 18px;
    }

    h1 {
        font-size: 1.65rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .bank-summary {
        grid-template-columns: 1fr;
    }
}

:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 4px; }
.site-header :focus-visible { outline-color: var(--text); }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.brand { white-space: normal; }
.container, .site-header { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

h1, h2 { font-family: var(--font-editorial); color: var(--text-strong); }
.site-nav button { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-height: 44px; font: inherit; cursor: pointer; }
.site-header-inner { min-height: 76px; flex-wrap: wrap; }
.site-nav a[href$="friends.html"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }

/* Editorial provenance uses the existing aviation tokens. */
.content-meta { color: var(--muted); font-size: .875rem; }
.editorial-source { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.editorial-source h2 { margin-top: 0; }
.editorial-source a { overflow-wrap: anywhere; }

.breadcrumbs { color: var(--muted); font-size: .875rem; margin: .5rem 0 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.question-meta[id] { scroll-margin-top: 7rem; }
.question-item:has(.question-meta:target) { outline: 2px solid var(--primary); outline-offset: 4px; }

/* ---- Cheat sheet ---- */
.cheat-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 22px 0 12px; }
.cheat-tabs button { font: inherit; font-weight: 700; min-height: 48px; padding: 8px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.cheat-tabs button:hover { border-color: var(--primary); }
.cheat-tabs button[aria-selected="true"] { color: var(--surface); background: var(--primary); border-color: var(--primary); }
.cheat-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.cheat-search { display: flex; flex: 1 1 240px; align-items: center; gap: 8px; font-weight: 600; }
.cheat-search input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; font: inherit; font-size: max(1rem, 16px); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.cheat-tool { font: inherit; min-height: 44px; padding: 6px 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.cheat-tool:hover { border-color: var(--primary); }
.cheat-tool[aria-pressed="true"] { color: var(--surface); background: var(--primary); border-color: var(--primary); }
.cheat-panel { scroll-margin-top: 1rem; }
.cheat-panel h3 { scroll-margin-top: 1rem; }
.cheat-spec { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cheat-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); font-size: .9375rem; }
.cheat-bars { list-style: none; margin: 12px 0; padding: 0; }
.cheat-bars li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 7em; align-items: center; gap: 10px; margin-bottom: 6px; font-size: .9375rem; }
.cheat-bar { height: 10px; border-radius: 5px; background: var(--surface-soft); border: 1px solid var(--border); overflow: hidden; }
.cheat-bar i { display: block; height: 100%; background: var(--primary); }
.cheat-table table { min-width: 0; }
.cheat-table td:first-child { width: 42%; }
.cheat-ref { width: 7.5em; font-size: .875rem; }
.cheat-ref a { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.cheat-reveal { font: inherit; font-weight: 700; color: var(--text); background: none; border: 0; padding: 0; text-align: left; cursor: text; }
.cheat-recite .cheat-reveal { min-width: 9em; min-height: 44px; padding: 4px 8px; color: var(--muted); font-weight: 400; background: var(--surface-soft); border-radius: 4px; outline: 1px dashed var(--border); cursor: pointer; }
.cheat-recite .cheat-reveal.is-on { color: var(--text); font-weight: 700; background: none; outline: 0; }
.cheat-recite .cheat-reveal.is-on:focus-visible { outline: 3px solid var(--focus, var(--primary)); outline-offset: 3px; }
.cheat-recite .cheat-mnemonic, .cheat-recite .cheat-block { display: none; }
.is-searching .cheat-static { display: none; }
.cheat-mnemonic p { margin: 0 0 8px; }
.cheat-mnemonic ul { margin: 0 0 12px; }
.cheat-mnemonic > :last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .cheat-tabs, .cheat-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cheat-bars li { grid-template-columns: 1fr; gap: 2px; margin-bottom: 10px; }
  .cheat-table td:first-child { width: auto; }
  .cheat-ref { width: 5.5em; }
  .cheat-toc a, .cheat-ref a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
}
.cheat-list li, .cheat-mnemonic li { line-height: 1.65; }
@media (max-width: 760px) { .cheat-table td, .cheat-table th { overflow-wrap: anywhere; } }
@media print {
  .cheat-table tr, .cheat-mnemonic { break-inside: avoid; }
  .cheat-group h3, .cheat-block h3 { break-after: avoid; }
  .site-header, .site-footer, .cheat-tabs, .cheat-tools, .cheat-toc, [data-cheat] .callout, [data-cheat] .editorial-source, [data-cheat] .breadcrumbs, [data-cheat] .article-nav, #cheat-status { display: none !important; }
  .cheat-reveal { color: #000 !important; background: none !important; outline: 0 !important; }
}

/* ---- Dashboard page layout (matches the home dashboard) ---- */
.site-header-inner { max-width: 1248px; padding: 12px 32px; }
.site-footer { max-width: 1248px; padding: 0 32px 30px; }
.container.page-dash { max-width: 1248px; padding: 24px 32px 44px; }
.container.cheat-wide { max-width: 1100px; padding: 24px 32px 44px; }
.cheat-wide .eyebrow { display: none; }
.cheat-wide h1 { font-size: 1.75rem; }
.page-dash .page-card { padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; }
.page-head { margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.75rem; line-height: 1.4; color: var(--text-strong); }
.page-head .breadcrumbs { margin: 0 0 2px; font-size: .8125rem; }
.page-head .content-meta { margin: 2px 0 0; font-size: .8125rem; }
.page-head .lead { margin: 6px 0 0; max-width: 72ch; font-size: .9375rem; line-height: 1.7; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.page-grid.no-side { grid-template-columns: minmax(0, 1fr); }
.page-body, .page-side { display: grid; gap: 12px; min-width: 0; }
.page-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.page-panel { min-width: 0; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; scroll-margin-top: 12px; }
.page-panel > :last-child { margin-bottom: 0; }
.page-panel h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 1.125rem; line-height: 1.5; color: var(--text-strong); scroll-margin-top: 28px; }
.page-panel h3 { margin: 14px 0 6px; font-size: 1rem; }
.page-panel p, .page-panel li { font-size: .9688rem; line-height: 1.75; }
.page-panel p:first-of-type { margin-top: 0; }
.page-panel ul, .page-panel ol { padding-left: 1.3em; }
.page-side .page-panel { padding: 12px 14px; font-size: .875rem; }
.page-side h2 { font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
.page-toc a { display: flex; align-items: center; min-height: 34px; line-height: 1.4; padding: 4px 0; text-decoration: none; }
.page-toc a:hover { text-decoration: underline; }
.page-links .article-nav { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.page-links .article-nav + .article-nav { margin-top: 6px; }
.page-links .article-nav a { min-height: 40px; display: flex; align-items: center; padding: 6px 10px; font-weight: 600; font-size: .875rem; }
.page-source summary { min-height: 34px; display: flex; align-items: center; font-weight: 600; color: var(--primary); cursor: pointer; }
.page-source p, .page-source li { font-size: .8125rem; line-height: 1.65; color: var(--muted); }
.page-source .article-nav { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; }
.page-source .article-nav a { font-size: .8125rem; }
.page-dash .article-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; margin: 0; }
.page-dash .article-link { height: 100%; padding: 12px 14px; background: var(--surface); }
.page-dash .article-link:hover { background: var(--surface-soft); }
.page-dash .article-link strong { font-size: .9688rem; }
.page-dash .article-link span { font-size: .8125rem; line-height: 1.6; }
.page-dash .question-card { margin: 10px 0 0; padding: 12px 14px; background: var(--surface-soft); border-radius: 8px; }
.page-dash .callout, .page-dash .note-box, .page-dash .info-grid { margin: 10px 0; }
.page-dash .info-box { padding: 12px 14px; }
.page-dash .table-wrap { margin: 10px 0 0; }
@media (max-width: 980px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .page-side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  .site-header-inner { padding: 12px 20px; }
  .site-footer { padding: 0 20px 24px; }
  .container.page-dash, .container.cheat-wide { padding: 16px 16px 32px; }
  .page-panel { padding: 14px; }
  .page-dash .info-grid { grid-template-columns: minmax(0, 1fr); }
  .page-dash table { min-width: 0; }
}
@media print {
  .page-side { display: none; }
  .page-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Cheat sheet quiz */
.cheat-quiz { margin-top: 16px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.cheat-quiz h2 { margin: 0 0 4px; font-size: 1.375rem; }
.cheat-quiz h3 { font-size: 1.125rem; }
.cheat-quiz fieldset { margin: 16px 0; padding: 0; border: 0; min-width: 0; }
.cheat-quiz legend { padding: 0; font-weight: 700; }
.cheat-quiz .cheat-bar { display: block; }
.cq-head p { margin: 0; color: var(--muted); }
.cq-progress { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 14px; font-size: .9375rem; }
.cq-quick { display: flex; gap: 6px; margin: 6px 0 10px; }
.cq-quick .cheat-tool { min-height: 44px; padding: 2px 12px; font-size: .9375rem; }
.cq-group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.cq-group { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.cq-group:hover { border-color: var(--primary); }
.cq-group span { flex: 1; }
.cq-group small { color: var(--muted); }
.cq-count { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.cq-count legend { float: left; margin-right: 18px; line-height: 44px; }
.cq-radio, .cq-wrong-only { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.cq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cq-primary { color: var(--surface); font-weight: 700; background: var(--primary); border-color: var(--primary); }
.cq-primary:disabled { opacity: .5; cursor: not-allowed; }
.cq-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; color: var(--muted); font-size: .9375rem; }
.cq-top strong { color: var(--text); }
.cq-top .cq-live { font-weight: 700; color: var(--success); }
.cq-stem { margin: 18px 0 14px; line-height: 1.6; outline: 0; }
.cq-options { display: grid; gap: 8px; }
.cq-option { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; line-height: 1.55; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.cq-option:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-soft); }
.cq-option:disabled { cursor: default; }
.cq-key { flex: none; width: 1.75em; height: 1.75em; line-height: 1.75em; text-align: center; font-weight: 700; background: var(--surface-soft); border-radius: 4px; }
.cq-text { flex: 1; min-width: 0; }
.cq-mark { flex: none; font-size: .875rem; font-weight: 700; }
.cq-option.is-right { color: var(--success); background: var(--success-bg); border-color: var(--success); font-weight: 600; }
.cq-option.is-wrong { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); font-weight: 600; }
.cq-keys { margin: 10px 0 0; }
@media (pointer: coarse) { .cq-keys { display: none; } }
.cq-note { margin-top: 14px; padding: 12px 14px; background: var(--surface-soft); border: 1px solid var(--border); border-left-width: 4px; border-radius: 6px; }
.cq-note.is-right { border-left-color: var(--success); }
.cq-note.is-wrong { border-left-color: var(--danger); }
.cq-note p { margin: 4px 0; }
.cq-hint { color: var(--muted); font-size: .9375rem; }
.cq-next { margin-top: 12px; min-width: 9em; }
.cq-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 12px 0 18px; }
.cq-score strong { font-size: 2.5rem; line-height: 1.1; }
.cq-score small { font-size: 1rem; font-weight: 400; }
.dash-pill { padding: 1px 10px; font-size: .875rem; font-weight: 700; border-radius: 999px; }
.dash-pill.is-right { color: var(--success); background: var(--success-bg); }
.dash-pill.is-wrong { color: var(--danger); background: var(--danger-bg); }
.cq-review { padding-left: 1.25em; }
.cq-review li { margin-bottom: 6px; }
@media screen {
  .cheat-quizzing .cheat-panel, .cheat-quizzing .cheat-search, .cheat-quizzing #cheat-recite, .cheat-quizzing #cheat-print, .cheat-quizzing #cheat-status { display: none; }
  .cheat-quizzing .cheat-tools { justify-content: flex-end; }
  .cheat-quizzing .cheat-tabs { display: none; }
}
@media print {
  .cheat-quiz { display: none !important; }
}
@media (max-width: 640px) {
  .cheat-quiz { padding: 16px 14px; }
  .cq-group-list { grid-template-columns: 1fr; }
  .cq-progress { grid-template-columns: 1fr; gap: 4px; }
  .cq-count legend { float: none; line-height: inherit; }
}

/* Cheat sheet quiz: answers-at-end and ultimate options */
.cq-switches { display: grid; gap: 2px; }
.cq-switches .cq-wrong-only { display: flex; }
.cq-resume { margin-top: 14px; padding: 12px 14px; background: var(--surface-soft); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 6px; }
.cq-resume p { margin: 2px 0 0; }
.cq-training-note { margin: 0 0 14px; font-weight: 700; }
.cq-cards { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.cq-card { padding: 10px 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 6px; }
.cq-card.is-right { border-left-color: var(--success); }
.cq-card.is-wrong { border-left-color: var(--danger); }
.cq-card p { margin: 2px 0; }
.cq-card-stem { font-weight: 700; }
.cq-more { margin: 14px 0; }
.cq-more summary { min-height: 44px; line-height: 44px; font-weight: 700; cursor: pointer; }
.bank-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.bank-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .875rem; text-decoration: none; }
.bank-jump .bank-jump-start { background: var(--danger, #b8361a); border-color: var(--danger, #b8361a); color: #fff; font-weight: 700; }
/* bank pages: 開始練習 / 回到頂端 bar on phones (navigation.js adds it) */
.bank-stick { display: none; }
@media (max-width: 760px) {
  .bank-stick.is-on { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 2px solid var(--edge); }
  .bank-stick a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 44px; border: 2px solid var(--edge); border-radius: 10px; font-weight: 800; text-decoration: none; color: var(--text); background: var(--surface); }
  .bank-stick .bank-stick-start { background: var(--danger); color: #fff; }
  html.dark-mode .bank-stick .bank-stick-start { color: #1d1a17; }
  body:has(.bank-stick.is-on) .site-footer { padding-bottom: 80px; }
  body:has(.acct-banner) .bank-stick { display: none; }
}
@media print { .bank-stick { display: none !important; } }
@media (max-width: 760px) { .page-toc a, .page-source summary, .page-links .article-nav a, .bank-jump a { min-height: 44px; } }
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.jump-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 2px solid var(--edge); border-radius: 10px; font-weight: 700; text-decoration: none; color: var(--text); background: var(--surface); }
section[id] { scroll-margin-top: 12px; }
.cheat-resume { margin: 8px 0 0; }
.cheat-resume[hidden] { display: none; }
@media print { .cheat-resume { display: none !important; } }
@media print {
  .cheat-table tbody tr:nth-child(even) > td, .cheat-block, .cheat-mnemonic { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cheat-table thead { display: table-header-group; }
}
@media (min-width: 381px) and (max-width: 760px) { .learning-filters { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; margin: 14px 0; } }
.cheat-print-title { display: none; }
@media print { .cheat-print-title { display: block; margin: 0 0 8px; color: #000 !important; } }
::highlight(cheat-hit) { background-color: #ffe066; color: #1d1a17; }
@media (max-width: 760px) { .cq-group-list { max-height: 40vh; overflow-y: auto; } .page-panel h3 { margin-top: 18px; } }
