/* Landing page */
.hub-word { margin: 0; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; }
.hub-count { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 28px; align-items: center; padding-block: 28px 18px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-map { max-height: 260px; } }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1; margin: 0 0 12px; letter-spacing: -.005em; }
.hero p { margin: 0 0 18px; color: var(--muted); font-size: 16px; max-width: 56ch; }
.search input { width: min(100%, 460px); font: inherit; font-size: 15px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); color: var(--ink); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hero-map { width: 100%; height: auto; max-height: 360px; justify-self: end; border-radius: 6px; border: 1px solid var(--rule); display: block; }
.hero-ring { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .7; vector-effect: non-scaling-stroke; animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .25; } }
.hero-tw { fill: var(--brand-ink); stroke: var(--panel); stroke-width: 2; }
.hero-lbl { font: 600 13px var(--display); fill: var(--brand-ink); paint-order: stroke; stroke: var(--sea); stroke-width: 3px; }

.cats { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 8px 4px; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 3; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.cats button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); cursor: pointer; }
.cats button b { font-family: var(--display); font-size: 15px; font-weight: 600; }
.cats button span { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--chip); border-radius: 9px; padding: 0 6px; }
.cats button:hover { border-color: var(--muted); }
.cats button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #f2f2ee; }
.cats button[aria-pressed="true"] span { background: rgba(255, 255, 255, .18); color: #f2f2ee; }

.cat-sec { padding-block: 26px 6px; }
.cat-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 12px; }
.cat-h h2 { margin: 0; font-size: 26px; }
.cat-h p { margin: 0; color: var(--muted); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s, box-shadow .15s; }
a.tool:hover { transform: translateY(-2px); border-color: var(--brand-ink); box-shadow: 0 8px 22px rgba(3, 51, 3, .12); }
.tool .thumb { aspect-ratio: 16 / 10; background: repeating-linear-gradient(135deg, var(--sea), var(--sea) 10px, var(--chip) 10px, var(--chip) 20px); border-bottom: 1px solid var(--rule); }
.tool .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 19px; line-height: 1.15; }
.card-body p { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.go { font-family: var(--mono); font-size: 11.5px; color: var(--brand-ink); font-weight: 500; }
.tool.soon { opacity: .6; }
.tool.soon .go { color: var(--faint); }
.empty { color: var(--muted); padding-block: 30px; }

.live-now { padding-top: 22px; }
.tools.featured { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.tools.featured .tool { border-color: var(--brand-ink); border-width: 1.5px; }
.tools.featured .card-body h3 { font-size: 23px; }
.tool.soon .thumb img { filter: grayscale(.6); }

/* Header help */
.hub-meta { display: flex; align-items: center; gap: 14px; }
.help-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 5px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); cursor: pointer; font-size: 13px; font-weight: 600; }
.help-btn span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #f2f2ee; font-family: var(--display); font-size: 13px; }
.help-btn:hover { border-color: var(--muted); }
.q-hint { margin: 8px 0 0 !important; font-size: 12px !important; color: var(--faint) !important; }
.q-hint #q-status { color: var(--brand-ink); font-weight: 600; margin-left: 6px; }
kbd { font-family: var(--mono); font-size: 11px; padding: 0 5px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px; background: var(--panel); color: var(--ink); }
.help { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--rule); border-top: 4px solid var(--accent); border-radius: 6px; background: var(--panel); color: var(--ink); }
.help::backdrop { background: rgba(10, 18, 14, .45); }
.help-in { padding: 20px 22px 16px; }
.help h2 { margin: 0 0 6px; font-size: 24px; }
.help h3 { margin: 14px 0 4px; font-size: 16px; }
.help p, .help li { margin: 0; color: var(--ink); font-size: 14px; }
.help ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.help p:last-child { margin-top: 16px; text-align: right; }

/* This week in the Strait */
.week { margin-block: 4px 18px; padding: 16px 18px 12px; background: var(--panel); border: 1px solid var(--rule); border-left: 4px solid var(--brand); border-radius: 6px; }
.wk-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin-bottom: 12px; }
.wk-h h2 { margin: 0; font-size: 24px; }
.wk-when { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.wk-when b { color: var(--ink); font-weight: 500; }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wk-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 5px; background: var(--bg); }
.wk-tile p { margin: 0; }
.wk-k { font-family: var(--display); font-weight: 600; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wk-k a { color: inherit; text-decoration: none; }
.wk-k a:hover { color: var(--brand-ink); text-decoration: underline; }
.wk-v { font-family: var(--mono); font-size: 28px; font-weight: 500; line-height: 1.05; color: var(--ink); }
.wk-v small { font-family: var(--body); font-size: 12px; font-weight: 400; color: var(--muted); margin: 0 8px 0 5px; }
.wk-s { font-size: 12px; color: var(--muted); line-height: 1.4; }
.wk-d { font-weight: 600; white-space: nowrap; }
.wk-d[data-dir="up"] { color: var(--bad); }
.wk-d[data-dir="down"] { color: var(--good); }
.wk-cov { display: block; color: var(--warn); }
.wk-go { margin-top: auto; padding-top: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--brand-ink); text-decoration: none; }
.wk-go:hover { text-decoration: underline; }
.spark { width: 100%; height: 36px; display: block; margin: 2px 0; }
.sp-b { fill: var(--rule); }
.sp-wk { fill: var(--accent); }
.sp-na { fill: var(--faint); opacity: .5; }
.sp-mean { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; opacity: .6; }
.wk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 4px 0; }
.wk-day { display: flex; flex-direction: column; align-items: center; padding: 3px 0; border-radius: 3px; background: var(--chip); color: var(--muted); text-decoration: none; font-size: 10.5px; line-height: 1.2; }
.wk-day b { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.wk-day[data-j="true"], .wk-day[data-l="true"] { background: var(--red-soft); color: var(--ink); }
.wk-day[data-j="true"] b, .wk-day[data-l="true"] b { color: var(--prc); }
.wk-day:hover { outline: 1px solid var(--muted); }
.wk-quote { grid-column: 1 / -1; }
.wk-who { font-size: 12.5px; color: var(--muted); }
.wk-who b { color: var(--ink); }
.wk-quote blockquote { margin: 2px 0 4px; padding-left: 10px; border-left: 3px solid var(--prc); font-family: var(--display); font-size: 16px; line-height: 1.35; color: var(--ink); }
.wk-quote blockquote[lang="zh"] { font-family: "PingFang TC", "Noto Serif TC", "Songti TC", var(--body); font-size: 15px; }
.wk-links { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 12.5px; }
.wk-links .wk-go { margin: 0; padding: 0; }
.wk-wait { justify-content: center; min-height: 90px; }
.wk-wait .wk-s::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); animation: breathe 1.2s ease-in-out infinite; }
.wk-src { margin-top: 10px; line-height: 1.45; }
@media (min-width: 1100px) { .wk-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .wk-quote { grid-column: span 4; } }
@media (max-width: 520px) {
  .week { padding: 12px 12px 10px; }
  .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wk-v { font-size: 23px; }
  .wk-tile { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) { .wk-wait .wk-s::before, .hero-ring { animation: none; } a.tool { transition: none; } }

/* Cards: area label and last update */
.card-cat { font-family: var(--display); font-size: 11.5px !important; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint) !important; flex: 0 !important; }
.upd { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
a.tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; transform: translateY(-2px); }
@media (max-width: 520px) { .hero { padding-block: 18px 12px; gap: 16px; } .hero-map { max-height: 190px; } }

/* Tools behind a second password (locked categories) */
.lock-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 3px; background: var(--accent); color: #fff; font-size: 10.5px; letter-spacing: .04em; text-transform: none; vertical-align: 1px; }

/* Section overview tiles (Interactive Deterrence landing page) */
.sec-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.sec-tile { display: flex; flex-direction: column; gap: 8px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--panel); border: 1px solid var(--rule); border-top: 4px solid var(--brand); border-radius: 6px; padding: 16px 18px; min-height: 44px; }
.sec-tile:hover, .sec-tile:focus-visible { border-color: var(--brand); box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.sec-tile.locked { border-top-color: var(--accent); }
.sec-tile b { font: 700 21px/1.15 var(--display); }
.sec-tile-n { font: 600 11.5px var(--mono); color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.sec-tile-b { color: var(--muted); font-size: 14px; line-height: 1.45; }
.sec-tile-l { color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.sec-tile .go { margin-top: auto; font-weight: 600; color: var(--brand-ink); }
.sec-back { margin-bottom: 10px; }

/* Interactive Deterrence: no Taiwan hero map; the text spans the hero */
.site-deterrence .hero-map { display: none; }
.site-deterrence .hero { grid-template-columns: minmax(0, 1fr); }

/* Interactive Deterrence: a compact landing page that fits one laptop screen without scrolling. */
.site-deterrence .hero { padding-block: 16px 4px; }
.site-deterrence .hero h1 { font-size: clamp(28px, 3.2vw, 38px); margin-bottom: 6px; }
.site-deterrence .hero p { font-size: 15px; margin-bottom: 12px; max-width: 80ch; }
.site-deterrence .q-hint { display: none; }
.site-deterrence .cats { display: none; }
.site-deterrence .cat-sec { padding-block: 14px 4px; }
.site-deterrence .cat-sec.overview > .cat-h { display: none; }
.site-deterrence .sec-tiles { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
@media (min-width: 900px) { .site-deterrence .cat-sec.overview .sec-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.site-deterrence .sec-tile { gap: 6px; padding: 14px 16px 16px; }
.site-deterrence .sec-tile b { font-size: 19px; }
.site-deterrence .sec-tile-b { font-size: 14px; }
.site-deterrence .sec-tile-l, .site-deterrence .sec-tile .go { display: none; }
.site-deterrence .tsm-foot { margin-top: 14px; padding-block: 10px 16px; }

/* Landing: headline + Game Theory Gallery card on one row; section tiles (2/3) beside a rotating spotlight (1/3). */
.site-deterrence .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.promo { display: flex; gap: 18px; align-items: center; padding: 14px 18px; border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 4px; background: var(--panel); color: var(--ink); text-decoration: none; align-self: end; }
.promo:hover, .promo:focus-visible { border-color: var(--brand); box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.promo-sketch { flex: 0 0 160px; height: 94px; fill: none; stroke: var(--brand-ink); stroke-width: 1.6; }
.promo-sketch circle { fill: var(--panel); } .promo-sketch .term { fill: var(--brand-ink); }
.promo-sketch text { fill: var(--muted); stroke: none; font: 500 10.5px var(--mono); } .promo-sketch .lbl { fill: var(--accent); font-size: 9.5px; }
.promo-t { display: flex; flex-direction: column; gap: 4px; }
.promo-t b { font: 700 19px/1.15 var(--display); }
.promo-t span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.promo-t .go { color: var(--brand-ink); font-weight: 600; font-size: 13.5px; }
.home-grid { display: block; }
.site-deterrence.home-overview .home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; padding-top: 12px; }
.site-deterrence.home-overview .cat-sec.overview { padding-top: 0; }
.site-deterrence.home-overview .cat-sec.overview .sec-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spot { display: none; }
.site-deterrence.home-overview .spot { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--rule); border-top: 3px solid var(--brand); border-radius: 4px; background: var(--panel); padding: 10px 16px 14px; }
.spot-h { display: flex; justify-content: space-between; align-items: center; }
.spot-k { margin: 0; font: 600 11.5px var(--mono); color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.spot-nav { display: flex; align-items: center; gap: 6px; font: 500 12px var(--mono); color: var(--muted); }
.spot-b { width: 28px; height: 28px; border: 1px solid var(--rule); border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer; }
.spot-b:hover, .spot-b:focus-visible { border-color: var(--brand); }
.spot-link { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; }
.spot-link h3 { margin: 0; font-size: 20px; line-height: 1.15; }
.spot-img { aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--rule); border-radius: 3px; background: var(--bg); }
.spot-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.spot-img { background: #0b1712; }
.spot-img iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.spot-link p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.spot-link .go { font-weight: 600; color: var(--brand-ink); font-size: 13.5px; }
.spot-link:hover h3, .spot-link:focus-visible h3 { color: var(--brand-ink); text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) { .spot-card { animation: spotIn .35s ease; } }
@keyframes spotIn { from { opacity: .3; } to { opacity: 1; } }
@media (max-width: 899px) {
  .site-deterrence .hero { grid-template-columns: minmax(0, 1fr); }
  .site-deterrence.home-overview .home-grid { grid-template-columns: minmax(0, 1fr); }
  .site-deterrence.home-overview .cat-sec.overview .sec-tiles { grid-template-columns: minmax(0, 1fr); }
  .promo-sketch { flex-basis: 110px; height: 72px; }
}

/* Section and subsection views: no landing headline, search or gallery card. */
.site-deterrence.in-section .hero { display: none; }
.site-deterrence.in-section #sections { padding-top: 8px; }
/* Password form for a sealed section (Coming Soon). */
.sealed-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; max-width: 520px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); }
.sealed-form label { font-weight: 600; }
.sealed-form input { flex: 1 1 180px; font: inherit; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 3px; background: var(--bg); color: var(--ink); }
.sealed-msg { flex-basis: 100%; font-size: 13px; color: var(--muted); }
