/* Dark War: Survival — Field Guide (fan site) */
:root {
  --bg: #0d0f10;
  --bg-2: #14171a;
  --panel: #1a1e22;
  --panel-2: #20262b;
  --line: #2c343b;
  --text: #e7e3dc;
  --muted: #9aa3a9;
  --accent: #e8642c;       /* rust orange */
  --accent-2: #f2b23a;     /* hazard amber */
  --toxic: #7fc241;        /* infected green */
  --blood: #c8373a;
  --link: #f2a35e;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --maxw: 1180px;
  --font-head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(232,100,44,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(127,194,65,.06), transparent 60%);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: .02em; line-height: 1.15; margin: 1.6em 0 .5em; text-transform: uppercase; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-top: 0; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); border-left: 4px solid var(--accent); padding-left: .6rem; }
h3 { font-size: 1.2rem; color: var(--accent-2); }
h4 { font-size: 1rem; color: var(--muted); }
p { margin: .6em 0 1em; }
ul, ol { padding-left: 1.3rem; }
li { margin: .25em 0; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #0a0c0d; border: 1px solid var(--line); border-radius: 5px; padding: .05em .4em; font-size: .9em; color: var(--accent-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,15,16,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner { max-width: var(--maxw); margin: 0 auto; padding: .6rem 16px; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-family: var(--font-head); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), var(--blood)); display: grid; place-items: center; font-size: .9rem; color: #fff; box-shadow: 0 0 0 2px #000 inset; }
.brand small { color: var(--accent); font-size: .75em; }
.nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; }
.nav-group { position: relative; }
.nav-btn { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 0; color: var(--muted); padding: .45rem .7rem; border-radius: 6px; font: 600 .9rem var(--font-body); cursor: pointer; white-space: nowrap; }
.nav-btn:hover, .nav-group.open .nav-btn { color: var(--text); background: var(--panel); }
.nav-btn:focus-visible, .nav-menu a:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-group.has-active .nav-btn { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .15s; }
.nav-group.open .caret { transform: rotate(180deg); }
.nav-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 280px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .4rem; z-index: 60; }
.nav-group:last-child .nav-menu { left: auto; right: 0; }
.nav-group.open .nav-menu { display: grid; gap: .1rem; }
.nav-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; } /* hover bridge */
.nav-menu a { display: grid; gap: .1rem; padding: .55rem .7rem; border-radius: 8px; color: var(--text); }
.nav-menu a strong { font-size: .92rem; font-weight: 700; }
.nav-menu a span { font-size: .78rem; color: var(--muted); }
.nav-menu a:hover { background: var(--panel-2); text-decoration: none; }
.nav-menu a.active { background: rgba(232,100,44,.12); box-shadow: inset 3px 0 0 var(--accent); }
.nav-toggle { display: none; margin-left: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .7rem; font-size: 1rem; cursor: pointer; min-width: 40px; }
.foot-h { display: block; color: var(--text); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin: .6rem 0 .2rem; }
.foot-h:first-child { margin-top: 0; }
.search-wrap { position: relative; }
.search-wrap input { width: 170px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .4rem .6rem; font-size: .88rem; }
.search-wrap input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.search-results { position: absolute; right: 0; top: 110%; width: min(380px, 90vw); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto; display: none; }
.search-results a { display: block; padding: .55rem .8rem; border-bottom: 1px solid var(--line); color: var(--text); font-size: .9rem; }
.search-results a small { display: block; color: var(--muted); }
.search-results a:hover { background: var(--panel-2); text-decoration: none; }

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: .6rem 16px 1rem; flex-direction: column; align-items: stretch; max-height: calc(100vh - 60px); overflow-y: auto; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-group { border-bottom: 1px solid var(--line); padding: .3rem 0; }
  .nav-btn { width: 100%; justify-content: space-between; font-size: .95rem; padding: .6rem .4rem; }
  .nav-group.has-active .nav-btn { box-shadow: none; color: var(--accent); }
  .nav-menu { position: static; box-shadow: none; border: 0; background: transparent; min-width: 0; padding: 0 0 .3rem; }
  .nav-menu::before { display: none; }
  .nav-group.has-active .nav-menu { display: grid; }
  .search-wrap input { width: 120px; }
}

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 4rem; }
.page-hero {
  position: relative; margin: 0 -16px 2rem; padding: 3.5rem 16px 2.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(13,15,16,.96) 0%, rgba(13,15,16,.82) 55%, rgba(13,15,16,.45) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 50%), var(--hero-img, none) right center/cover no-repeat;
}
.page-hero .inner { max-width: var(--maxw); margin: 0 auto; }
.page-hero p.lede { max-width: 760px; font-size: 1.1rem; color: #d6d0c6; }
.eyebrow { display: inline-block; font: 700 .75rem/1 var(--font-body); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); background: rgba(232,100,44,.1); border: 1px solid rgba(232,100,44,.35); padding: .35rem .6rem; border-radius: 99px; margin-bottom: 1rem; }

.layout { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; align-items: start; }
.toc { position: sticky; top: 76px; font-size: .88rem; border-left: 1px solid var(--line); padding-left: 1rem; max-height: calc(100vh - 100px); overflow: auto; }
.toc strong { font-family: var(--font-head); text-transform: uppercase; color: var(--muted); letter-spacing: .1em; font-size: .8rem; }
.toc a { display: block; color: var(--muted); padding: .2rem 0; }
.toc a:hover { color: var(--text); }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .toc { display: none; } }
.content > h2:first-child { margin-top: 0; }

/* ---------- Components ---------- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; position: relative; overflow: hidden; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
a.card { color: var(--text); display: block; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
a.card .go { color: var(--accent); font-weight: 700; font-size: .85rem; }
.card .icon { font-size: 1.6rem; margin-bottom: .3rem; }
.card.media { padding: 0; }
.card.media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; }
.card.media .body { padding: 1rem 1.1rem; }

.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent-2); background: rgba(242,178,58,.06); border-radius: 8px; padding: .9rem 1.1rem; margin: 1.2rem 0; }
.callout.tip { border-left-color: var(--toxic); background: rgba(127,194,65,.06); }
.callout.warn { border-left-color: var(--blood); background: rgba(200,55,58,.07); }
.callout > strong:first-child { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.badge.ur, .badge.s { background: rgba(232,100,44,.18); color: #ffb48e; border-color: rgba(232,100,44,.5); }
.badge.ssr, .badge.a { background: rgba(160,100,230,.16); color: #cdb2f5; border-color: rgba(160,100,230,.45); }
.badge.sr, .badge.b { background: rgba(70,140,230,.15); color: #a9c8f5; border-color: rgba(70,140,230,.45); }
.badge.c { background: rgba(127,194,65,.13); color: #bfe39a; border-color: rgba(127,194,65,.4); }
.badge.fighter { color: #ff9b8a; border-color: rgba(200,55,58,.5); }
.badge.rider { color: #ffd27a; border-color: rgba(242,178,58,.5); }
.badge.shooter { color: #9fd0ff; border-color: rgba(70,140,230,.5); }
.badge.unv { color: var(--muted); font-style: italic; font-weight: 500; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; font-size: .85rem; color: var(--accent-2); position: sticky; top: 0; }
tr:nth-child(even) td { background: rgba(255,255,255,.015); }
tr:hover td { background: rgba(232,100,44,.05); }

.figure { margin: 1.3rem 0; }
.figure img { border-radius: var(--radius); border: 1px solid var(--line); background: #000; width: 100%; max-height: 460px; object-fit: cover; }
.figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.gallery { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 1rem 0; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 8px; border: 1px solid var(--line); width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #000; cursor: zoom-in; }
.gallery figcaption { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.img-missing { display: none !important; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: .2rem 0 .8rem 2.8rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: .1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #111; font: 700 .95rem/2rem var(--font-head); text-align: center; }

.tier-row { display: grid; grid-template-columns: 70px 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: .6rem; }
.tier-row .tier { display: grid; place-items: center; font: 700 1.8rem var(--font-head); color: #111; }
.tier-row .tier.t-s { background: #ff7a45; } .tier-row .tier.t-a { background: #f2b23a; } .tier-row .tier.t-b { background: #b9d36a; } .tier-row .tier.t-c { background: #7aa6c9; }
.tier-row .heroes { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem; background: var(--panel); align-items: center; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: .25rem .7rem; font-size: .88rem; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; align-items: center; }
.filters button, .tabs button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: .35rem .85rem; font: 600 .85rem var(--font-body); cursor: pointer; }
.filters button.on, .tabs button.on { background: var(--accent); color: #111; border-color: var(--accent); }
.filters input { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 99px; padding: .35rem .85rem; font-size: .85rem; }

.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0 .5rem; }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

.hero-card { display: flex; gap: .9rem; align-items: flex-start; }
.hero-card .portrait { width: 72px; height: 72px; flex: none; border-radius: 10px; background: linear-gradient(135deg, var(--panel-2), #0a0c0d); border: 1px solid var(--line); display: grid; place-items: center; font: 700 1.5rem var(--font-head); color: var(--accent); overflow: hidden; }
.hero-card .portrait { position: relative; }
.hero-card .portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: linear-gradient(135deg, var(--panel-2), #0a0c0d); }
.hero-card h3 { margin: 0 0 .25rem; color: var(--text); }
.hero-card .meta { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .4rem; }
.hero-card p { font-size: .9rem; color: #cfcac2; margin: .3rem 0 0; }

.checklist { list-style: none; padding: 0; }
.checklist li { padding: .35rem 0 .35rem 2rem; position: relative; border-bottom: 1px dashed var(--line); cursor: pointer; user-select: none; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .5rem; width: 1.1rem; height: 1.1rem; border: 2px solid var(--muted); border-radius: 4px; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.checklist li.done::before { background: var(--toxic); border-color: var(--toxic); }

.counter-diagram { display: flex; justify-content: center; margin: 1rem 0; }
.counter-diagram svg { max-width: 420px; width: 100%; height: auto; }

.code-list { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.code-item { display: flex; justify-content: space-between; align-items: center; background: var(--panel); border: 1px dashed var(--accent); border-radius: 8px; padding: .5rem .7rem; font-family: ui-monospace, Menlo, monospace; }
.code-item button { background: var(--accent); color: #111; border: 0; border-radius: 6px; padding: .25rem .55rem; font-weight: 700; cursor: pointer; }

.sources { font-size: .85rem; color: var(--muted); }
.sources a { overflow-wrap: anywhere; }
.updated { font-size: .8rem; color: var(--muted); }

/* Home hero */
.home-hero { position: relative; margin: 0 -16px 2.5rem; min-height: 460px; display: flex; align-items: flex-end; padding: 4rem 16px 3rem; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(13,15,16,.97) 0%, rgba(13,15,16,.88) 45%, rgba(13,15,16,.35) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 40%), var(--hero-img, none) right center/cover no-repeat; }
.home-hero .inner { max-width: var(--maxw); margin: 0 auto; width: 100%; }
.home-hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.home-hero h1 span { color: var(--accent); }
.btn { display: inline-block; background: var(--accent); color: #111; font-weight: 800; padding: .7rem 1.2rem; border-radius: 8px; text-transform: uppercase; letter-spacing: .05em; font-size: .88rem; margin: .3rem .4rem .3rem 0; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1.5rem 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.stat b { display: block; font: 600 1.5rem var(--font-head); color: var(--accent-2); }
.stat span { color: var(--muted); font-size: .85rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; place-items: center; z-index: 100; padding: 16px; cursor: zoom-out; }
.lightbox.on { display: grid; }
.lightbox img { max-height: 90vh; max-width: 95vw; border-radius: 8px; }

footer.site-footer { border-top: 1px solid var(--line); padding: 2rem 16px; color: var(--muted); font-size: .85rem; }
footer.site-footer .inner { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 1rem; grid-template-columns: 2fr 1fr 1fr; }
footer.site-footer a { color: var(--muted); display: block; }
@media (max-width: 700px) { footer.site-footer .inner { grid-template-columns: 1fr; } }

.back-top { position: fixed; right: 16px; bottom: 16px; background: var(--accent); color: #111; border: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.back-top.on { opacity: 1; pointer-events: auto; }

/* ---------- Mobile overflow fixes ---------- */
.layout > *, .grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.gallery { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.code-list { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
/* Wrap long unbroken strings (URLs, codes) but never split normal words */
.content { overflow-wrap: break-word; }
.content th, .content td, .content h1, .content h2, .content h3, .content h4, .day-num { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.content a[href^="http"], .sources a, .credit-card .meta a { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .site-header .inner { gap: .5rem; }
  .brand small, .brand > span:last-child { font-size: .95rem; }
  .brand .mark { width: 26px; height: 26px; }
  .search-wrap input { width: 92px; }
  .home-hero, .page-hero { padding-top: 2.5rem; }
  .tier-row { grid-template-columns: 52px 1fr; }
}
@media (max-width: 400px) {
  .brand > span:last-child { display: none; }
  .search-wrap input { width: 130px; }
}

/* ---------- Image credits ---------- */
.page-hero, .home-hero { position: relative; }
.hero-credit { position: absolute; right: 16px; bottom: 8px; font-size: .72rem; color: var(--muted); background: rgba(13,15,16,.7); padding: .15rem .5rem; border-radius: 6px; }
.hero-credit:hover { color: var(--text); }
.credit-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(240px,100%), 1fr)); }
.credit-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .82rem; }
.credit-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #000; }
.credit-card .meta { padding: .6rem .7rem; display: grid; gap: .2rem; }


/* ---------- Mobile: jump-to-section button + sheet ---------- */
.jump-fab { display: none; position: fixed; left: 16px; bottom: 16px; z-index: 45; background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 99px; padding: .6rem 1rem; font: 700 .9rem var(--font-body); box-shadow: var(--shadow); cursor: pointer; min-height: 44px; }
.jump-fab span { color: var(--accent); margin-right: .2rem; }
.jump-sheet { display: none; position: fixed; inset: 0; z-index: 110; }
.jump-sheet.on { display: block; }
.jump-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.jump-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 75vh; overflow-y: auto; background: var(--bg-2); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: .4rem 16px calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.5); }
.jump-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg-2); padding: .7rem 0; border-bottom: 1px solid var(--line); }
.jump-head strong { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; }
.jump-close { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; width: 40px; height: 40px; font-size: 1rem; cursor: pointer; }
.jump-panel nav a { display: block; padding: .8rem .4rem; color: var(--text); border-bottom: 1px solid var(--line); font-size: 1rem; }
.jump-panel nav a.current { color: var(--accent); font-weight: 700; }
body.sheet-open { overflow: hidden; }
@media (max-width: 900px) { .jump-fab { display: inline-flex; align-items: center; } }

/* ---------- Chart tap tooltip ---------- */
.chart-tip { position: absolute; z-index: 70; transform: translate(-50%, -100%); background: #0a0c0d; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: .82rem; max-width: 260px; text-align: center; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: var(--shadow); }
.chart-tip.on { opacity: 1; }
svg.chart .hit { cursor: pointer; outline: none; }
svg.chart .hit.sel .bar, svg.chart .hit.sel .dot, svg.chart .hit:focus-visible .bar, svg.chart .hit:focus-visible .dot { filter: brightness(1.35); stroke: var(--text); stroke-width: 2; }

/* ---------- Wide tables ---------- */
.swipe-hint { display: none; font-size: .8rem; color: var(--accent-2); margin: .8rem 0 -.6rem; transition: opacity .3s; }
.swipe-hint.seen { opacity: .35; }
.table-wrap.scrollable td:first-child, .table-wrap.scrollable th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel-2); box-shadow: 1px 0 0 var(--line); }
.table-wrap.scrollable th:first-child { z-index: 2; }

/* ---------- Phone readability ---------- */
@media (max-width: 600px) {
  .swipe-hint { display: block; }
  svg.chart .tick { font-size: 24px; }
  svg.chart .tick.minor { display: none; }
  .badge { font-size: .8rem; padding: .2rem .5rem; }
  .sources, .chart-note, .figure figcaption, .gallery figcaption, .shot figcaption, .updated { font-size: .85rem; }
  .log .when { font-size: .85rem; }
  .hero-card .meta { gap: .35rem; }
  table { font-size: .9rem; }
  th { font-size: .8rem; letter-spacing: .02em; }
  th, td { padding: .5rem .5rem; }
  .day-num { width: 1.8rem; height: 1.8rem; font-size: .9rem; }
  .back-top { bottom: 16px; }
  .hero-credit { position: static; display: inline-block; margin-top: 1rem; }
  main .shot figcaption, main .chart-note, main .sp-legend span, main .path-pill, main .credit-card { font-size: .85rem; }
}
