/* Axiom filter bar (bank + compose). Colours follow the existing compose / bank tokens with safe fallbacks. */
.axf-tabs, .axf-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.axf-tabs { background: #f0ece3; border-radius: 999px; padding: 3px; flex: 0 0 auto; }
.axf-tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--compose-muted, #77776e); font: inherit; white-space: nowrap; }
.axf-tabs button.on { background: #fff; color: var(--compose-accent, #1f5242); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.axf-tabs button:disabled { opacity: .38; cursor: not-allowed; }
.axf-seg button { border: 1px solid var(--compose-line, #e6e1d6); background: #fff; border-radius: 999px; padding: 3px 11px; cursor: pointer; font: inherit; color: inherit; }
.axf-seg button.on { background: #e3efe9; border-color: #b9d6c9; color: #1f5242; font-weight: 600; }
.axf-pill { border: 1px solid var(--compose-line, #e6e1d6); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.axf-pill.active, .axf-pill.axf-primary { background: var(--compose-accent, #2f6f5a); border-color: var(--compose-accent, #2f6f5a); color: #fff; font-weight: 600; }
.axf-pill-val { font-weight: 400; opacity: .92; margin-left: 2px; }
.axf-count { background: #fff; color: #1f5242; border-radius: 999px; padding: 0 8px; font-size: 12px; }
.axf-caret { font-size: 11px; opacity: .8; }
.axf-link { background: none; border: 0; color: var(--compose-accent, #2f6f5a); cursor: pointer; font: inherit; padding: 4px 6px; }
.axf-link:hover:not(:disabled) { text-decoration: underline; } .axf-link:disabled { opacity: .4; cursor: default; }
.axf-hint { color: var(--compose-muted, #77776e); font-size: 12px; } .axf-hint.pad { padding: 12px 10px; }
.axf-spacer { flex: 1; }
.axf-text { width: 100%; border: 1px solid var(--compose-line, #e6e1d6); border-radius: 10px; padding: 7px 10px; font: inherit; background: #fff; min-width: 0; }
.axf-select { border: 1px solid var(--compose-line, #e6e1d6); border-radius: 8px; padding: 3px 6px; background: #fff; font: inherit; }

.axf-row1, .axf-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.axf-row2 { padding: 0 0 12px; }
.axf-quick { display: contents; }
.axf-grp { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.axf-grp > label { color: var(--compose-muted, #77776e); font-size: 12px; }
.axf-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

.bank-page .bank-filter-card, .compose-filter-card { overflow: visible !important; }
.axf-pop-host { position: relative; display: inline-block; }
.axf-pop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; background: #fff; border: 1px solid var(--compose-line, #e6e1d6); border-radius: 16px; box-shadow: 0 14px 40px rgba(40, 50, 45, .16); padding: 14px; }
.axf-pop-year { width: 380px; max-width: 92vw; }
.axf-pop-topic { width: min(860px, 92vw); }
.axf-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; align-items: center; }
.axf-ys { padding: 30px 14px 4px; user-select: none; touch-action: none; }
.axf-ys-track { position: relative; height: 6px; border-radius: 999px; background: #ece7da; cursor: pointer; }
.axf-ys-fill { position: absolute; top: 0; bottom: 0; background: var(--compose-accent, #2f6f5a); border-radius: 999px; opacity: .85; }
.axf-ys-thumb { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid var(--compose-accent, #2f6f5a); background: #fff; cursor: grab; padding: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.axf-ys-thumb:focus-visible { outline: 3px solid #b9d6c9; } .axf-ys-thumb:active { cursor: grabbing; }
.axf-ys-thumb span { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--compose-accent, #2f6f5a); color: #fff; border-radius: 8px; padding: 1px 7px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.axf-ys.near [data-thumb="a"] span { transform: translateX(-85%); } .axf-ys.near [data-thumb="b"] span { transform: translateX(-15%); }
.axf-ys-ticks { position: relative; height: 20px; margin-top: 10px; color: var(--compose-muted, #77776e); font-size: 12px; font-variant-numeric: tabular-nums; }
.axf-ys-ticks i { position: absolute; transform: translateX(-50%); font-style: normal; }
.axf-pop-year .axf-text { margin-top: 8px; }

.axf-pop-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.axf-pop-head .axf-text { flex: 1; }
.axf-cols { display: grid; grid-template-columns: 232px 270px 1fr; border: 1px solid #efeadf; border-radius: 12px; overflow: hidden; height: 340px; }
.axf-cols.two { grid-template-columns: 260px 1fr; }
.axf-cols.axf-search { display: block; overflow: auto; padding: 6px; }
.axf-col { overflow: auto; border-right: 1px solid #efeadf; padding: 6px; } .axf-col:last-child { border-right: 0; }
.axf-col h4 { margin: 6px 8px; font-size: 12px; letter-spacing: .4px; color: var(--compose-muted, #77776e); font-weight: 600; position: sticky; top: 0; background: #fff; }
.axf-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.axf-row:hover { background: #f6f3ec; } .axf-row.on { background: #e3efe9; color: #1f5242; font-weight: 600; } .axf-row.dim { opacity: .55; }
.axf-nm { flex: 1; min-width: 0; } .axf-nm small { display: block; color: var(--compose-muted, #77776e); font-size: 12px; font-weight: 400; }
.axf-ct { color: var(--compose-muted, #77776e); font-size: 12px; font-variant-numeric: tabular-nums; } .axf-go { color: var(--compose-muted, #77776e); }
.axf-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; } .axf-nocheck { width: 16px; flex: none; }
.axf-row input[type=checkbox] { accent-color: var(--compose-accent, #2f6f5a); width: 16px; height: 16px; margin: 0; }
.axf-pop-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.axf-back { display: none; }

/* One typeface for everything in the filter area: the app's sans (system-ui) with tabular figures, so years, counts and
   times line up. Buttons and inputs do not inherit the font by themselves, which is why the year-slider labels used to differ. */
.axf-tabs, .axf-seg, .axf-pill, .axf-pop, .axf-more, .axf-quick, .axf-grp { font-family: var(--axiom-sans, system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif); font-variant-numeric: tabular-nums; }
.axf-tabs button, .axf-seg button, .axf-pill, .axf-link, .axf-ys-thumb, .axf-ys-thumb span, .axf-levels button, .axf-text, .axf-select, .axf-chip, .axf-mgl, .axf-pop h4 { font-family: inherit; font-variant-numeric: tabular-nums; }

/* selected Subjects / chapters / topics shown at the top of the picker, removable one by one */
.axf-sel { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; max-height: 76px; overflow: auto; }
.axf-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #b9d6c9; background: #e3efe9; color: #1f5242; border-radius: 999px; padding: 2px 6px 2px 10px; font-size: 12px; cursor: pointer; max-width: 100%; }
.axf-chip.unit { background: var(--compose-accent, #1f6f68); border-color: var(--compose-accent, #1f6f68); color: #fff; font-weight: 600; }
.axf-chip span { opacity: .75; font-size: 14px; line-height: 1; } .axf-chip:hover span { opacity: 1; }
.axf-chip:focus-visible, .axf-row input[type=checkbox]:focus-visible { outline: 3px solid #b9d6c9; outline-offset: 1px; }
/* Subject rows: a checkbox in front of the colour dot; once ticked the dot grows a ring and the whole row takes the Subject colour */
.axf-unit .axf-dot { width: 10px; height: 10px; transition: transform .15s, box-shadow .15s; }
.axf-unit.chk { background: #d3e8dd; } .axf-unit.on:not(.chk) { background: #f1efe8; color: inherit; }
.axf-unit.chk .axf-dot { transform: scale(1.3); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--dot, #8a9a90); }
.axf-unit.chk .axf-nm { font-weight: 700; }
.axf-part { background: #e3efe9; color: #1f5242; border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; }

/* second filter row sits right under the toolbar of both pages */
.axf-row2-wrap { padding: 0 0 12px; }

@media (max-width: 820px) {
  .axf-pop-head .axf-text { flex: 1 1 100%; order: 3; }
  .axf-cols, .axf-cols.two { display: block; height: auto; max-height: 56vh; overflow: auto; }
  .axf-col { display: none; border-right: 0; } .axf-col.cur { display: block; }
  .axf-back { display: inline-block; }
  .axf-pop-topic, .axf-pop-year { position: fixed; inset: auto 0 0 0; width: auto; max-width: none; top: auto; border-radius: 18px 18px 0 0; max-height: 86vh; overflow: auto; }
  .axf-tabs { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}

/* "更多筛选" panel: a tidy card with a capped width (it never stretches across a 4K screen) and a responsive grid */
.bank-page .bank-filter-panel.axf-more-panel, .compose-filter-card .bank-filter-panel.axf-more-panel { border: 1px solid #e5e1d6; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px rgba(40, 50, 45, .08); max-width: 940px; margin: 0 0 14px; padding: 0; overflow: visible; }
.axf-more-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #efeadf; }
.axf-more-head b { font-size: 14.5px; }
.axf-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px 28px; padding: 16px 18px 18px; }
.axf-field > label { display: block; color: var(--compose-muted, #77776e); font-size: 12px; font-weight: 600; letter-spacing: .3px; margin-bottom: 8px; }
.axf-field > label em { font-style: normal; color: var(--compose-accent, #1f5242); margin-left: 6px; font-weight: 600; }
.axf-field-wide { grid-column: 1 / -1; }
.axf-levels { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.axf-levels button:not(.axf-link) { width: 38px; height: 34px; border: 1px solid var(--compose-line, #e6e1d6); background: #fff; border-radius: 10px; cursor: pointer; font: inherit; font-variant-numeric: tabular-nums; }
.axf-levels button.on { background: #e3efe9; border-color: #b9d6c9; color: #1f5242; font-weight: 700; }
.axf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
@media (max-width: 820px) { .bank-page .bank-filter-panel.axf-more-panel, .compose-filter-card .bank-filter-panel.axf-more-panel { max-width: none; } .axf-more-grid { grid-template-columns: 1fr; } }

/* ---- exam-board colours: the selected state takes the board's own colour (IB teal, CIE blue, Edexcel orange), solid and easy to see ---- */
.axf-row1, .axf-row2, .axf-more-panel { --axf-accent: var(--compose-accent, #1f6f68); --axf-tint: #e3efe9; --axf-edge: #b9d6c9; --axf-ink: #1f5242; }
[data-axf-board="IB"] { --axf-accent: #1f6f68; --axf-tint: #d9eeea; --axf-edge: #8cc3bb; --axf-ink: #14544e; }
[data-axf-board="CIE"] { --axf-accent: #2a5bc8; --axf-tint: #e0e9fb; --axf-edge: #9bb5ee; --axf-ink: #1d47a3; }
[data-axf-board="Edexcel"] { --axf-accent: #b4600f; --axf-tint: #fbe8d0; --axf-edge: #e3b27a; --axf-ink: #8c4707; }
.axf-tabs button.on, .axf-seg button.on, .axf-levels button.on, .axf-pill.active, .axf-pill.axf-primary { background: var(--axf-accent); border-color: var(--axf-accent); color: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.axf-tabs button:hover:not(.on):not(:disabled), .axf-seg button:hover:not(.on), .axf-levels button:hover:not(.on):not(.axf-link) { background: var(--axf-tint); border-color: var(--axf-edge); color: var(--axf-ink); }
.axf-count { color: var(--axf-accent); }
.axf-link { color: var(--axf-accent); }
.axf-chip { background: var(--axf-tint); border-color: var(--axf-edge); color: var(--axf-ink); }
.axf-chip.unit { background: var(--axf-accent); border-color: var(--axf-accent); color: #fff; }
.axf-row.on { background: var(--axf-tint); color: var(--axf-ink); }
.axf-unit.chk { background: var(--axf-tint); box-shadow: inset 3px 0 0 var(--axf-accent); }
.axf-unit.on:not(.chk) { background: #f1efe8; color: inherit; }
.axf-part { background: var(--axf-accent); color: #fff; }
.axf-row input[type=checkbox] { accent-color: var(--axf-accent); }
.axf-ys-fill { background: var(--axf-accent); } .axf-ys-thumb { border-color: var(--axf-accent); } .axf-ys-thumb span { background: var(--axf-accent); }
.axf-ys-thumb:focus-visible, .axf-chip:focus-visible, .axf-row input[type=checkbox]:focus-visible { outline-color: var(--axf-edge); }

/* ---- GCE legacy modules: one tidy card per group (Pure / Further Pure / Mechanics / Statistics / Decision) ---- */
.axf-row2 .bank-filter-toggle { order: 2; }
.axf-modules { order: 3; flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 292px)); gap: 10px; justify-content: start; align-items: stretch; }
.axf-modules > label { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; margin: 2px 0 0; font-weight: 600; letter-spacing: .3px; }
.axf-modules > label small { font-weight: 400; font-size: 12px; color: var(--compose-muted, #77776e); }
.axf-mg { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border: 1px solid var(--compose-line, #e6e1d6); border-radius: 14px; background: #fbfaf6; transition: border-color .15s, background .15s; }
.axf-mg.has { border-color: var(--axf-edge); background: #fff; box-shadow: inset 0 3px 0 var(--axf-accent); }
.axf-mgl { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none; padding: 2px 2px 0; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px; color: var(--compose-ink, #1e2a2e); text-align: left; }
.axf-mgl em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--compose-muted, #77776e); }
.axf-mg.has .axf-mgl em { color: var(--axf-ink); font-weight: 700; }
.axf-mgl:hover span { color: var(--axf-accent); text-decoration: underline; }
.axf-mg .axf-seg { gap: 6px; }
.axf-mg .axf-seg button { min-width: 44px; padding: 5px 10px; text-align: center; }
@media (max-width: 820px) { .axf-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .axf-modules { grid-template-columns: 1fr; } }

.axf-covered { margin: 4px 6px 8px; padding: 8px 10px; border-radius: 10px; background: var(--axf-tint); color: var(--axf-ink); font-size: 12.5px; line-height: 1.5; position: sticky; top: 28px; z-index: 1; border-left: 3px solid var(--axf-accent); }
.axf-covered .axf-link { padding: 0 2px; text-decoration: underline; font-weight: 600; }
.axf-fail { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #fdeee6; color: #9a3d0a; font-size: 13px; border: 1px solid #f0c9ad; }
.axf-pop-foot .axf-hint { flex: 1 1 auto; min-width: 0; }

/* implied ticks: shown because the Subject / topic above is chosen as a whole; tick one to narrow down to just it */
.axf-row.implied input[type=checkbox] { opacity: .5; }
.axf-row.implied .axf-nm { color: var(--compose-muted, #6b6b62); }
