/* [KMA] Alliance Handbook — component styles: game artwork and interactive tools.
   Split from styles.css, which holds the core theme, layout and typography. */
/* ---------- game artwork: banner, gallery, buildings, screenshots ---------- */
.hero.has-banner { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); padding: 0; margin-bottom: 26px; }
.hero.has-banner .banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: 0.55; }
.hero.has-banner .hero-inner { position: relative; padding: 34px 26px 26px; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 55%, color-mix(in srgb, var(--bg) 30%, transparent) 100%); }
.hero.has-banner .hero-inner p { color: var(--text); }
.hero.has-banner .kicker { color: var(--accent); }
.gallery-wrap { margin: 16px 0 24px; }
.gallery-head { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; margin: 14px 0 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.gcard { position: relative; display: block; padding: 8px 8px 9px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--fc, var(--line-strong)); border-radius: var(--radius); color: var(--text); text-align: center; }
.gcard:hover { text-decoration: none; border-color: var(--fc, var(--accent)); }
.gcard img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--surface-2); display: block; }
.gname { font-weight: 700; font-size: 13.5px; margin-top: 6px; line-height: 1.15; }
.gmeta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gtier { position: absolute; top: 10px; left: 10px; }
.fig-credit { font-size: 12px; color: var(--muted); margin-top: 10px; }
.art-strip { display: flex; gap: 10px; overflow-x: auto; padding: 6px 0 10px; margin: 12px 0 20px; scroll-snap-type: x mandatory; }
.art { flex: 0 0 150px; margin: 0; scroll-snap-align: start; background: radial-gradient(ellipse at 50% 80%, var(--accent-soft), transparent 70%), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 6px 6px; text-align: center; }
.art img { width: 100%; height: 150px; object-fit: contain; display: block; }
.art figcaption { font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 14px 0 10px; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 8px 9px; text-align: center; }
.bcard img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 4px; }
.bname { font-weight: 700; font-size: 13px; line-height: 1.15; }
.bmeta { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); margin: 2px 0; }
.bdesc { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
figure.shot { margin: 16px 0 22px; }
figure.shot img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
figure.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
/* official square posters: keep them poster-sized, not page-wide */
figure.shot:has(img[src*="img/official/"]) { max-width: 440px; }
figure.shot:has(img[src*="heroes-lineup"]) { max-width: none; }
@media (max-width: 860px) { .hero.has-banner .hero-inner { padding: 24px 16px 20px; } .gallery { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }

/* ---------- interactive tools ---------- */
.tool { margin: 18px 0 26px; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.tool.mini { padding: 14px; }
.tool-head { margin-bottom: 12px; }
.tool-title { font-family: var(--font-display); font-size: 22px; font-weight: 750; line-height: 1.15; letter-spacing: -0.02em; }
.tool-sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; max-width: 70ch; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 14px; margin: 12px 0; }
.fld { display: flex; flex-direction: column; gap: 3px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.fld .fin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.fld input, .fld select { flex: 1 1 110px; min-width: 0; max-width: 100%; font: inherit; font-size: 15px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); background: var(--bg-deep); border: 1px solid var(--line-strong); border-radius: 4px; padding: 6px 8px; }
.fld .hint { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 11.5px; line-height: 1.4; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.fld .hint-block { flex: 1 0 100%; font-size: 12.5px; line-height: 1.45; }
.fld-wide { grid-column: 1 / -1; }
.fld-wide input { flex: 0 1 180px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.tool-actions .btn { padding: 7px 12px; font-size: 14px; }
.tool-actions .hint { font-size: 13px; color: var(--green); }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }
.mcard { padding: 11px 13px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius); }
.mval { font-family: var(--font-display); font-size: 24px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 2px 0 2px; }
.msub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar span { display: block; height: 100%; border-radius: 3px; transition: width 0.2s ease; }
.note { font-size: 13.5px; line-height: 1.45; padding: 9px 12px; border-left: 3px solid var(--line-strong); background: var(--bg-deep); border-radius: 0 4px 4px 0; margin: 6px 0; }
.note-warn { border-left-color: var(--red); background: var(--red-soft); }
.note-good { border-left-color: var(--green); background: var(--green-soft); }
.note-info { border-left-color: var(--blue); background: var(--blue-soft); }
.notes { margin: 10px 0; }
.est { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 3px; }
tr.row-warn td { background: var(--red-soft) !important; }
/* squad builder */
.slotrow { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; }
.slot-group { flex: 1 1 auto; min-width: 0; }
.bench-group { flex: 0 1 auto; border-left: 1px dashed var(--line-strong); padding-left: 16px; }
.sg-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.slot { flex: 0 0 104px; min-height: 128px; border: 1px solid var(--line); border-top: 3px solid var(--fc, var(--line-strong)); border-radius: var(--radius); background: var(--bg-deep); padding: 8px 6px 6px; text-align: center; font: inherit; color: var(--text); cursor: pointer; }
.slot.empty { display: flex; align-items: center; justify-content: center; border-style: dashed; border-top-style: dashed; color: var(--muted); font-size: 12px; cursor: default; }
.slot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; }
.slot .sname { font-weight: 700; font-size: 12.5px; margin-top: 5px; line-height: 1.15; }
.slot .srole { font-size: 11px; color: var(--muted); }
.slot.filled:hover { border-color: var(--red); }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.picker { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.pick-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.pf { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-deep); color: var(--text-soft); cursor: pointer; }
.pf.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.pickgrid .gcard { font: inherit; color: var(--text); cursor: pointer; text-align: center; }
.pickgrid .gcard.used { opacity: 0.35; cursor: not-allowed; }
/* duel planner */
.duel-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 12px 0; }
.dd { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; }
.dd-head { display: flex; align-items: baseline; gap: 8px; }
.dd-n { font-family: var(--font-display); font-size: 23px; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.dd-name { font-weight: 700; font-size: 15px; flex: 1; }
.dd-pts { font-size: 14px; color: var(--text-soft); }
.dd-items { margin-top: 8px; display: grid; gap: 4px; }
.di { display: grid; grid-template-columns: 1fr 76px auto; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-soft); }
.di input { font: inherit; font-family: var(--font-mono); font-size: 13px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--text); width: 100%; }
.di em { font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.dd-flag { margin-top: 8px; font-size: 12px; color: var(--muted); }
.dd-flag.good { color: var(--green); font-weight: 700; }
/* timeline */
.timeline { margin: 12px 0; border-left: 2px solid var(--line); padding-left: 14px; }
.tl { position: relative; padding: 7px 0; }
.tl::before { content: ""; position: absolute; left: -20px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.tl.past::before { background: var(--accent); border-color: var(--accent); }
.tl-day { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 600; }
.tl-when { color: var(--muted); margin-left: 8px; font-weight: 400; }
.tl-what { font-size: 14.5px; }
.tl.past .tl-what { color: var(--muted); }
/* home strips */
.strip-cta, .strip-you { margin: 14px 0 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.strip-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cta-t { font-family: var(--font-display); font-size: 20px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.1; margin: 2px 0; }
.cta-d { font-size: 13.5px; color: var(--muted); max-width: 60ch; }
.you-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-top: 4px; font-size: 14px; color: var(--text-soft); }
.you-row b { font-family: var(--font-mono); color: var(--text); font-size: 16px; }
.you-next { margin-top: 7px; font-size: 13.5px; color: var(--text-soft); }
@media (max-width: 860px) { .slot { flex: 1 1 92px; } .di { grid-template-columns: 1fr 66px auto; }
  .bench-group { border-left: 0; border-top: 1px dashed var(--line-strong); padding-left: 0; padding-top: 10px; flex: 1 1 100%; } }

/* ---------- home dashboard ---------- */
.dash { margin: 0 0 24px; }
.dash-you { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); margin-bottom: 10px; }
.dash-id { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; flex: 1 1 260px; }
.dchip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 9px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 999px; }
.dchip em { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.dchip b { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.dash-edit { font-size: 13px; white-space: nowrap; }
.dash-cta { padding: 22px 24px; background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); margin-bottom: 10px; }
.dash-cta-h { font-family: var(--font-display); font-size: 31px; font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; margin: 3px 0 8px; }
.dash-cta p { font-size: 15.5px; color: var(--text-soft); max-width: 62ch; margin: 0 0 10px; }
.dash-cta-list { margin: 0 0 16px; padding-left: 20px; font-size: 14px; color: var(--text-soft); }
.dash-cta-list li { margin-bottom: 3px; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.dash-card { padding: 13px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.dash-today { border-color: var(--accent); }
.dash-big { font-family: var(--font-display); font-size: 22px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; margin: 3px 0 5px; }
.dash-timer { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.dash-timer b { color: var(--text); }
.dash-todo { font-size: 13.5px; color: var(--text-soft); line-height: 1.4; flex: 1; }
.dash-extra { font-size: 12px; color: var(--muted); margin-top: 6px; }
.dash-link { font-size: 13px; margin-top: 8px; display: inline-block; }
.side-acct { position: relative; }
.side-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.article blockquote.unver { border-left-color: var(--muted); background: var(--surface-2); border-left-style: dashed; }
.article blockquote.unver strong:first-child { color: var(--muted); }
@media (max-width: 860px) { .dash-cta { padding: 18px 16px; } .dash-cta-h { font-size: 27px; } }

/* server-clock notes */
.cd-note { font-size: .78rem; color: var(--muted); margin-top: .25rem; letter-spacing: .01em; }
.cd-note b { color: var(--text); font-variant-numeric: tabular-nums; }
.tz-clock.tz-primary { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.codes-warn { margin: .5rem 0 .75rem; padding: .55rem .7rem; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 4px 4px 0; font-size: .86rem; color: var(--text-soft); }

/* ---------- portrait hero gallery ---------- */
.gallery-portraits { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.pcard { position: relative; display: block; padding: 0; margin: 0; overflow: hidden; cursor: pointer;
  aspect-ratio: 3 / 4; border: 1px solid var(--line); border-bottom: 3px solid var(--fc, var(--line-strong));
  border-radius: var(--radius); background: #181a2b; font: inherit; color: #fff; text-align: left; }
.pcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%;
  transition: transform .25s ease; }
.pcard:hover img, .pcard:focus-visible img { transform: scale(1.04); }
.pcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard.on { border-color: var(--fc, var(--accent)); box-shadow: 0 0 0 2px var(--fc, var(--accent)); }
.pcard .gtier { top: 7px; left: 7px; z-index: 1; }
.pcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 8px 7px;
  background: linear-gradient(to top, rgba(10, 11, 20, .92) 30%, rgba(10, 11, 20, 0)); display: flex; flex-direction: column; }
.pcap .gname { color: #fff; margin: 0; font-size: 13.5px; }
.pcap .gmeta { color: rgba(255, 255, 255, .72); margin: 1px 0 0; font-size: 10.5px; }

.hsheet-slot { margin: 4px 0 10px; }
.hsheet-hint { font-size: 12.5px; color: var(--muted); padding: 2px 0; }
.hsheet { position: relative; display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 18px;
  padding: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--fc, var(--accent));
  border-radius: var(--radius); }
.hs-portrait { width: 100%; aspect-ratio: 486 / 828; object-fit: cover; border-radius: 6px; background: #181a2b; display: block; }
.hs-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hs-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hs-name { margin: 0; font-size: 26px; line-height: 1.1; text-wrap: balance; }
.hs-facts { display: flex; gap: 22px; margin: 0; }
.hs-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hs-facts dd { margin: 1px 0 0; font-weight: 700; }
.hs-note { margin: 0; color: var(--text-soft); max-width: 52ch; }
.hs-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 2px; }
.hs-skills { display: flex; gap: 8px; flex-wrap: wrap; }
.hs-skill { width: 54px; height: 54px; border-radius: 10px; background: #181a2b; border: 1px solid var(--line); }
.hs-links { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; font-size: 13.5px; }
.hs-close { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: transparent;
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 6px; }
.hs-close:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 560px) {
  .gallery-portraits { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .hsheet { grid-template-columns: 110px 1fr; gap: 12px; padding: 12px; }
  .hs-name { font-size: 20px; }
  .hs-skill { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .pcard img { transition: none; } }

/* in-guide banner art */
.article img.wide-art { width: 100%; border-radius: var(--radius); display: block; }
.side-art { float: right; width: 120px; margin: 0 0 10px 16px; }
@media (max-width: 560px) { .side-art { width: 84px; } }
.article .hsheet .hs-name { margin: 0; font-size: 28px; line-height: 1.05; }
@media (max-width: 560px) { .article .hsheet .hs-name { font-size: 21px; } }

/* ---------- maker's mark ---------- */
.maker { display: flex; align-items: center; gap: 9px; min-width: 0; margin-left: 4px; padding-left: 14px;
  border-left: 1px solid var(--line); cursor: default; user-select: none; }
.maker-lips { width: 27px; height: 17px; flex: 0 0 27px; color: var(--accent); transform-origin: 50% 60%; }
.maker-txt { display: flex; flex-direction: column; line-height: 1.02; min-width: 0; }
.maker-by { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); white-space: nowrap; }
.maker-by b { color: var(--text); font-weight: 800; letter-spacing: 0.12em; }
.maker-epithet { font-family: var(--font-flourish); font-style: italic; font-weight: 600; font-size: 16.5px;
  color: var(--accent); white-space: nowrap; letter-spacing: 0.01em; }
.maker:hover .maker-lips { animation: pucker 0.7s ease; }
@keyframes pucker { 0%, 100% { transform: scale(1) rotate(0); } 35% { transform: scale(1.22) rotate(-8deg); } 60% { transform: scale(0.94) rotate(3deg); } }

.maker-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.maker-inline .maker-lips { width: 22px; height: 14px; flex-basis: 22px; }
.maker-inline b { color: var(--text); }
.maker-inline i { font-family: var(--font-flourish); font-style: italic; font-weight: 600; font-size: 1.12em; color: var(--accent); }
.maker-mobile { display: none; margin: 8px 0 2px; }
.hero.has-banner .maker-inline { color: rgba(255, 255, 255, .78); }
.hero.has-banner .maker-inline b { color: #fff; }
.side-foot .maker-inline { margin-bottom: 6px; font-size: 12.5px; }

@media (max-width: 1040px) { .maker-epithet { font-size: 15px; } .brand-name { display: none; } }
@media (max-width: 860px) { .maker { display: none; } .maker-mobile { display: flex; } }
@media (prefers-reduced-motion: reduce) { .maker:hover .maker-lips { animation: none; } }

/* ---------- sidebar: pinned links + collapsible sections ---------- */
.side-pins { display: grid; gap: 1px; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.side-pins a, .side-sec .sec-body a {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px;
  color: var(--text-soft); font-size: 14.5px; line-height: 1.3; text-decoration: none; position: relative;
}
.side-pins a:hover, .side-sec .sec-body a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.side-pins a.active, .side-sec .sec-body a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.side-pins .g-ico { width: 17px; height: 17px; flex: 0 0 17px; opacity: .8; }
.side-pins a.active .g-ico { opacity: 1; }

.side-browse { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 6px 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.side-all { white-space: nowrap; border: 0; background: none; padding: 3px 6px; border-radius: 6px; color: var(--muted); cursor: pointer;
  font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.side-all:hover { color: var(--accent); background: var(--surface); }

.side-sec { margin: 0 0 2px; }
.side-sec > summary {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 6px; border-radius: 8px; cursor: pointer;
  list-style: none; color: var(--text); font-weight: 650; font-size: 14px; user-select: none;
}
.side-sec > summary::-webkit-details-marker { display: none; }
.side-sec > summary:hover { background: var(--surface); }
.side-sec .chev { width: 12px; height: 12px; flex: 0 0 12px; color: var(--muted); transition: transform .15s ease; }
.side-sec[open] > summary .chev { transform: rotate(90deg); }
.side-sec > summary .g-ico { width: 16px; height: 16px; flex: 0 0 16px; color: var(--muted); }
.side-sec[open] > summary .g-ico { color: var(--accent); }
.sec-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-count { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px;
  padding: 1px 7px; font-variant-numeric: tabular-nums; }
.side-sec .sec-body { margin: 2px 0 8px 17px; padding-left: 9px; border-left: 1px solid var(--line); display: grid; gap: 1px; }
.side-sec .sec-body a { font-size: 14px; padding: 5px 9px; }
.side-sec .sec-body a.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 2px;
  border-radius: 2px; background: var(--accent); }
.side-sub { margin: 8px 0 2px 9px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.side-sub:first-child { margin-top: 2px; }
.side-foot { margin: 18px 6px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.side-acct .side-dot { margin-left: auto; }

/* topbar and search, modern pass */
.topbar { height: 58px; }
.search-wrap input { border-radius: 999px !important; }
.icon-btn { border-radius: 10px; }
.sidebar { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
@media (max-width: 860px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar .spacer { display: none; }
  .search-wrap { flex: 1 1 auto; }
}

/* ============ content blocks (site/blocks.js) ============ */
.bk { margin: 22px 0 26px; }
.bk-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; margin: 0 0 10px; color: var(--text); }
.bk-unit { font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-left: 6px; }
.bk-note { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); max-width: 70ch; }
.bk-ico { width: 16px; height: 16px; flex: 0 0 16px; }
.bk-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
pre.bk-broken { border: 1px dashed var(--red); }

/* event card */
.bk-event { position: relative; overflow: hidden; margin: 6px 0 28px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0%, var(--surface) 55%); box-shadow: var(--shadow-sm); }
.bk-event.has-art { background: #0d0f17; border-color: #262b40; color: #eceef5; }
.bk-event-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.bk-event.has-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,11,18,.94) 0%, rgba(9,11,18,.78) 55%, rgba(9,11,18,.45) 100%); }
.bk-event-in { position: relative; z-index: 1; padding: 20px 22px 18px; }
.bk-event-top { display: flex; align-items: center; gap: 8px; }
.bk-event-ico { width: 20px; height: 20px; color: var(--accent); }
.bk-event.has-art .bk-event-ico { color: #f2b544; }
.bk-kind { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.bk-event.has-art .bk-kind { color: #f2b544; }
.bk-headline { font-family: var(--font-display); font-size: 21px; font-weight: 650; line-height: 1.25; letter-spacing: -0.015em; margin: 8px 0 14px; max-width: 46ch; }
.bk-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; margin: 0; }
.bk-fact { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; align-items: start; }
.bk-fact .bk-ico { grid-row: span 2; margin-top: 2px; color: var(--muted); }
.bk-event.has-art .bk-fact .bk-ico { color: rgba(236,238,245,.6); }
.bk-fact dt { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.bk-event.has-art .bk-fact dt { color: rgba(236,238,245,.62); }
.bk-fact dd { margin: 1px 0 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.bk-rewards { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.bk-event.has-art .bk-rewards { border-top-color: rgba(255,255,255,.12); }
.bk-rewards .bk-ico { color: var(--accent); }
.bk-rw-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-right: 4px; }
.bk-event.has-art .bk-chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #eceef5; }

/* steps */
.bk-steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; counter-reset: none; }
.bk-step { position: relative; display: flex; gap: 10px; padding: 12px 12px 12px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.bk-step-n { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; }
.bk-step-body { min-width: 0; }
.bk-when { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 1px; }
.bk-step-label { display: block; font-size: 15px; line-height: 1.25; }
.bk-step p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.45; max-width: none; }
@media (max-width: 640px) {
  .bk-steps-list { grid-template-columns: 1fr; gap: 0; }
  .bk-step { background: none; border: 0; box-shadow: none; padding: 0 0 16px; }
  .bk-step:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
}

/* bars */
.bk-bars-grid { display: grid; gap: 7px; }
.bk-bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr minmax(64px, auto); align-items: center; gap: 4px 12px; }
.bk-bar-label { font-size: 14px; font-weight: 600; color: var(--text-soft); }
.bk-bar-track { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bk-bar-fill { display: block; height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); }
.bk-bar-row.hi .bk-bar-fill { background: var(--accent); }
.bk-bar-row.hi .bk-bar-label { color: var(--accent); font-weight: 800; }
.bk-bar-val { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bk-bar-sub { grid-column: 2 / -1; font-size: 12px; color: var(--muted); margin-top: -3px; }
@media (max-width: 520px) { .bk-bar-row { grid-template-columns: 1fr auto; } .bk-bar-track { grid-column: 1 / -1; order: 3; } .bk-bar-sub { grid-column: 1 / -1; order: 4; } }

/* lineup */
.bk-lineup-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.bk-hero { display: flex; flex-direction: column; min-width: 0; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  border-bottom: 3px solid var(--fc); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.bk-hero:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.bk-hero-img { position: relative; display: block; aspect-ratio: 4 / 5; background: #181a2b; }
.bk-hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.bk-hero-rar { position: absolute; top: 6px; left: 6px; background: rgba(9,11,18,.72); padding: 1px 6px; border-radius: 6px; }
.bk-hero-name { font-weight: 700; font-size: 14px; padding: 8px 9px 0; line-height: 1.2; }
.bk-hero-role { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); padding: 2px 9px 0; }
.bk-hero-why { font-size: 12.5px; color: var(--text-soft); padding: 4px 9px 10px; line-height: 1.4; }
.bk-hero-role:last-child { padding-bottom: 10px; }
.bk-alts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; }
.bk-alts-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.bk-alt { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.bk-alt img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.bk-alt em { font-style: normal; font-weight: 400; color: var(--muted); }

/* do / don't */
.bk-dd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.bk-dd { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.bk-dd.do { border-top: 3px solid var(--green); }
.bk-dd.dont { border-top: 3px solid var(--red); }
.bk-dd-head { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.bk-dd.do .bk-dd-head { color: var(--green); }
.bk-dd.dont .bk-dd-head { color: var(--red); }
.bk-dd ul { margin: 0; padding-left: 18px; }
.bk-dd li { font-size: 14.5px; margin-bottom: 5px; }

/* tiles */
.bk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.bk-tile { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.bk-tile-big { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.bk-tile-label { font-weight: 700; font-size: 14px; margin-top: 6px; }
.bk-tile-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* map */
.bk-map-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 0) 0 0 / 22px 22px, var(--surface); }
.bk-map-svg { display: block; width: 100%; min-width: 460px; height: auto; }
.bk-map-label { font: 700 12.5px var(--font-body); fill: var(--text); }
.bk-map-sub { font: 500 11px var(--font-body); fill: var(--muted); }
.bk-map-short { font: 800 12px var(--font-mono); }
.bk-map-link { font: 700 11px var(--font-body); fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.bk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.bk-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid; margin-right: 6px; vertical-align: -1px; }

/* ============ Quiz of Wisdom answer finder ============ */
.quiz-bar { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px; margin: -4px -4px 10px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-radius: 12px; }
.quiz-bar input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 12px 16px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--bg-deep); color: var(--text); outline: none; }
.quiz-bar input:focus { box-shadow: 0 0 0 4px var(--accent-soft); }
.quiz-count { flex: 0 0 auto; font-family: var(--font-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.quiz-cat { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-soft); cursor: pointer; }
.quiz-cat.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.quiz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quiz-row { display: grid; grid-template-columns: 1fr minmax(120px, 34%); gap: 6px 16px; align-items: center; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.quiz-q { font-size: 15px; line-height: 1.4; color: var(--text); }
.quiz-a { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 8px; background: var(--green-soft); color: var(--green);
  font-weight: 800; font-size: 16px; line-height: 1.25; }
.quiz-a-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; opacity: .8; }
.quiz-row mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.quiz-empty { padding: 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
@media (max-width: 640px) {
  .quiz-bar { top: 60px; }
  .quiz-row { grid-template-columns: 1fr; }
  .quiz-a { flex-direction: row; align-items: baseline; gap: 8px; }
}
.article ol.quiz-list, .article ol.bk-steps-list { padding-left: 0; max-width: none; margin: 0; }
.article .quiz-list li, .article .bk-steps-list li { margin-bottom: 0; }

/* ---------- mobile menu: easier to find and open ---------- */
.nav-fab, .side-head { display: none; }
@media (max-width: 860px) {
  .menu-btn { width: auto !important; flex: 0 0 auto !important; padding: 0 12px 0 10px; gap: 6px; height: 40px;
    border: 1.5px solid var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 800; font-size: 14px; }
  .menu-btn svg { width: 18px; height: 18px; }
  .menu-label { letter-spacing: .02em; }
  .nav-fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 34;
    display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px 0 16px; border: 0; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink); font: 800 15px var(--font-body); letter-spacing: .02em;
    box-shadow: 0 6px 20px rgba(0,0,0,.35), 0 0 0 4px var(--glow); cursor: pointer; }
  .nav-fab svg { width: 20px; height: 20px; }
  .nav-fab:active { transform: scale(.97); }
  body.nav-open .nav-fab { display: none; }
  .side-head { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .side-head span { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
  .side-close { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: 700 13px var(--font-body); cursor: pointer; }
  .sidebar { width: min(88vw, 340px) !important; }
  .content { padding-bottom: 96px !important; }
}
@media print { .nav-fab { display: none !important; } }
@media (max-width: 860px) {
  .topbar .brand { flex: 0 0 auto; }
  .topbar .search-wrap { flex: 1 1 0; min-width: 0; }
  .search-wrap input { min-width: 0; width: 100%; }
}
@media (max-width: 340px) { .menu-label { display: none; } .menu-btn { padding: 0 10px; } }

/* tap-to-enlarge images */
img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 56px 12px 20px; background: rgba(6, 7, 12, .92); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox-cap { color: #dfe2ec; font-size: 14px; text-align: center; max-width: 60ch; }
.lightbox-close { position: absolute; top: 12px; right: 12px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff;
  border-radius: 999px; padding: 8px 14px; font: 700 14px var(--font-body); cursor: pointer; }

/* server timeline, verified calendar */
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 4px; font-size: 12.5px; color: var(--muted); }
.tl-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: var(--muted); }
.tl-key.tl-war::before, .tl.tl-war::before { background: var(--red); }
.tl-key.tl-event::before, .tl.tl-event::before { background: var(--accent); }
.tl-key.tl-hero::before, .tl.tl-hero::before { background: var(--blue); }
.tl-key.tl-unlock::before, .tl.tl-unlock::before { background: var(--green); }
.tl-head { margin: 18px 0 4px !important; }
.tl::before { content: ""; position: absolute; left: -20px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--bg); }
.tl.today { background: var(--accent-soft); border-radius: 8px; padding-left: 8px; margin-left: -8px; }
.tl-date { color: var(--text-soft); margin-left: 8px; font-family: var(--font-body); font-weight: 600; }
.tl-conf { margin-left: 8px; font-family: var(--font-body); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; }
.tl-toggle { margin-top: 12px; }
.tl.tl-war .tl-what { font-weight: 600; }
.cards3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
