/* war.hk public pages (/guide, /ai, /about) — same visual language as the war room. */
:root {
  --bg: #0b0a08; --bg-2: #12110d; --card: rgba(22, 20, 15, .86); --ink: #ece4cf; --dim: #a39a82; --line: rgba(236, 228, 207, .13);
  --gold: #d6a63a; --red: #d0513e; --jade: #4fb07f; --cinnabar: #d0513e; --paper: #16140f; --ink-3: #a39a82;
  --serif: "Noto Serif TC", "Songti TC", serif; --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --w: 1180px;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f3ecdc; --bg-2: #ebe2cc; --card: rgba(255, 251, 242, .9); --ink: #1d1a14; --dim: #6b6252; --line: rgba(29, 26, 20, .14);
    --gold: #9a6f12; --red: #b23a29; --jade: #2f7d56; --cinnabar: #b23a29; --paper: #fbf6ea; --ink-3: #6b6252; }
  .brand img { filter: none !important; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 6px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 12px; }

/* top menu */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 12px max(16px, calc((100vw - var(--w)) / 2));
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 56px; height: auto; filter: invert(1) hue-rotate(180deg); }
.brand span { display: grid; line-height: 1.15; font: 700 12.5px ui-monospace, Menlo, monospace; letter-spacing: .26em; }
.brand small { color: var(--dim); letter-spacing: .16em; font-size: 10.5px; }
.links { display: flex; gap: 22px; margin-left: 8px; }
.links a, .burger nav a { text-decoration: none; color: var(--dim); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.links a:hover, .links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { text-decoration: none; font: 700 12px ui-monospace, Menlo, monospace; color: var(--dim); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; font-weight: 700; border-radius: 10px;
  padding: 9px 16px; border: 1px solid var(--line); white-space: nowrap; transition: transform .15s, box-shadow .15s, border-color .15s; }
.btn.primary { background: linear-gradient(180deg, #e0654f, #b8322a); border-color: #b8322a; color: #fff; box-shadow: 0 8px 24px rgba(184, 50, 42, .28); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(184, 50, 42, .4); }
.btn.ghost:hover { border-color: var(--gold); }
.btn.big { padding: 13px 22px; font-size: 16.5px; }
.burger { display: none; margin-left: auto; }
.burger summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 10px; }
.burger summary::-webkit-details-marker { display: none; }
.burger summary span { width: 20px; height: 2px; background: var(--ink); display: block; }
.burger nav { position: absolute; right: 16px; left: 16px; top: 68px; display: grid; gap: 4px; padding: 14px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.burger nav a { padding: 10px 6px; border-bottom: 1px solid var(--line); }
.burger nav .btn { margin-top: 8px; color: #fff; border-bottom: 0; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 90% at 85% 10%, rgba(208, 81, 62, .16), transparent 55%), radial-gradient(80% 70% at 10% 90%, rgba(214, 166, 58, .10), transparent 60%); }
.hero-grid { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64l28 16v32M0 80l28-16' fill='none' stroke='%23d6a63a' stroke-opacity='.13'/%3E%3C/svg%3E");
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent); }
.hero-in { position: relative; max-width: var(--w); margin: 0 auto; padding: 72px 16px 64px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 12.5px ui-monospace, Menlo, monospace; letter-spacing: .28em; color: var(--gold); text-transform: uppercase; }
.eyebrow span { border: 1px solid var(--red); color: var(--red); padding: 2px 8px; letter-spacing: .1em; }
h1 { margin: 0; font: 900 clamp(34px, 5.4vw, 60px)/1.12 var(--serif); letter-spacing: .01em; }
.lead { margin: 18px 0 0; font-size: 18px; color: var(--dim); max-width: 44em; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0 0; }
.facts li { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; background: var(--card); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { display: grid; place-items: center; }
.jev-figure { width: min(360px, 100%); color: var(--ink); }
.jev-loop { width: 100%; height: auto; }
.jev-spin { transform-origin: 130px 118px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .jev-spin { animation: none; } html { scroll-behavior: auto; } }

/* content */
main { max-width: var(--w); margin: 0 auto; padding: 48px 16px 24px; }
.with-toc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
.toc { position: sticky; top: 88px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.toc p { margin: 0 0 8px; font: 700 12px ui-monospace, Menlo, monospace; letter-spacing: .2em; color: var(--gold); }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; }
.toc a { text-decoration: none; color: var(--dim); } .toc a:hover { color: var(--ink); }
.flow { display: grid; gap: 20px; min-width: 0; }
.flow.narrow { max-width: 900px; margin: 0 auto; }
.card { padding: 26px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.card h2 { margin: 0 0 12px; font: 800 26px/1.3 var(--serif); display: flex; align-items: center; gap: 12px; }
.card h2::before { content: ""; width: 6px; height: 22px; background: var(--red); border-radius: 2px; }
.card h3 { font: 700 18px var(--serif); margin: 22px 0 10px; }
.card p { margin: 10px 0; }
.card p.big { font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; transform: rotate(45deg); border: 2px solid var(--gold); }
b { color: var(--ink); }
.more a { color: var(--gold); font-weight: 700; text-decoration: none; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.skills div { display: grid; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.skills small { color: var(--dim); font-size: 13.5px; }
.keys { width: 100%; border-collapse: collapse; }
.keys th, .keys td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.keys th { width: 38%; font-weight: 500; }
kbd { font: 600 13px ui-monospace, Menlo, monospace; padding: 3px 8px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; background: var(--bg-2); }
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; background: var(--bg-2); }
.faq summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.faq p { color: var(--dim); margin: 0 0 12px; }
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.pipeline li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.pipeline span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; }
.pipeline p { margin: 4px 0 0; color: var(--dim); }
.person { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.person h2 { margin: 0; font: 800 28px var(--serif); }
.person h2::before { display: none; }
.mark { flex: none; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 14px; background: var(--red); color: #fff4e0;
  font: 900 46px var(--serif); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .22), inset 0 0 0 8px rgba(0, 0, 0, .12); }
.role { color: var(--dim); margin: 4px 0 !important; }
.motto { color: var(--gold); font: 700 18px var(--serif); margin: 4px 0 0 !important; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.principles div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); display: grid; gap: 4px; align-content: start; }
.principles span { font: 700 12px ui-monospace, Menlo, monospace; color: var(--red); letter-spacing: .1em; }
.principles p { margin: 0; color: var(--dim); font-size: 14.5px; }
.works { list-style: none; margin: 12px 0 0; padding: 0; border-left: 2px solid var(--line); display: grid; }
.works li { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px 0 12px 18px; }
.works li::before { content: ""; position: absolute; left: -7px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--red); }
.works li:first-child::before { background: var(--red); }
.works li > span { font: 700 12.5px ui-monospace, Menlo, monospace; color: var(--dim); padding-top: 3px; }
.works a { font: 700 17px var(--serif); text-decoration: none; }
.works a:hover { color: var(--gold); }
.works small { display: block; color: var(--dim); font: 12px ui-monospace, Menlo, monospace; }
.works p { margin: 4px 0 0; color: var(--dim); }

/* call to battle + next reads */
.cta-band { max-width: var(--w); margin: 28px auto 0; padding: 36px clamp(20px, 4vw, 48px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  border-radius: 20px; border: 1px solid rgba(208, 81, 62, .4); background: linear-gradient(120deg, rgba(160, 39, 30, .35), var(--card) 65%); }
.cta-band h2 { margin: 0; font: 900 clamp(24px, 3vw, 34px) var(--serif); }
.cta-band p { margin: 6px 0 0; color: var(--dim); max-width: 40em; }
.cta-band .ctas { margin: 0; }
.next { max-width: var(--w); margin: 20px auto 0; padding: 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.next a { display: grid; gap: 2px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; }
.next a:hover { border-color: var(--gold); }
.next small { color: var(--gold); font: 700 11.5px ui-monospace, Menlo, monospace; letter-spacing: .2em; text-transform: uppercase; }
.next b { font: 800 19px var(--serif); } .next span { color: var(--dim); font-size: 14.5px; }

/* footer */
.foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 40px 16px; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-brand p { color: var(--dim); font-size: 14.5px; max-width: 30em; }
.foot h3 { margin: 4px 0 10px; font: 700 12.5px ui-monospace, Menlo, monospace; letter-spacing: .22em; color: var(--gold); text-transform: uppercase; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a { text-decoration: none; color: var(--dim); } .foot ul a:hover { color: var(--ink); }
.foot-bar { max-width: var(--w); margin: 0 auto; padding: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--dim); font-size: 13.5px; }
.foot-bar a { color: var(--ink); text-decoration: none; }
.foot-bar .langs { margin-left: auto; }

/* phones & tablets */
@media (max-width: 980px) {
  .links, .actions { display: none; }
  .burger { display: block; }
  .hero-in { grid-template-columns: minmax(0, 1fr); padding: 48px 16px 44px; gap: 28px; }
  .hero-art { order: -1; } .jev-figure { width: min(240px, 70vw); }
  .with-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  body { font-size: 15.5px; }
  .card { padding: 20px 18px; border-radius: 14px; }
  .card h2 { font-size: 22px; }
  .lead { font-size: 16.5px; }
  .btn.big { flex: 1 1 100%; }
  .principles, .next { grid-template-columns: minmax(0, 1fr); }
  .works li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .keys th { width: 44%; }
  .cta-band { margin: 24px 16px 0; }
  .foot-bar .langs { margin-left: 0; }
}

/* hero art */
.seals { display: flex; gap: 14px; align-items: flex-end; }
.seal { width: 118px; aspect-ratio: 104 / 120; display: grid; place-content: center; justify-items: center; gap: 2px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 80%, #fff 8%), color-mix(in srgb, var(--c) 55%, #000)); }
.seal:nth-child(2) { width: 140px; transform: translateY(-18px); }
.seal b { font: 900 46px var(--serif); line-height: 1; }
.seal small { font-size: 12.5px; opacity: .85; }
.seal-big { width: 220px; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 6px; border-radius: 28px;
  background: var(--red); color: #fff4e0; box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .22), inset 0 0 0 14px rgba(0, 0, 0, .12), 0 24px 60px rgba(160, 39, 30, .35); transform: rotate(-4deg); }
.seal-big b { font: 900 120px/1 var(--serif); }
.seal-big span { font: 700 13px ui-monospace, Menlo, monospace; letter-spacing: .3em; }
@media (max-width: 980px) { .seal { width: 84px; } .seal:nth-child(2) { width: 100px; } .seal b { font-size: 34px; } .seal-big { width: 150px; } .seal-big b { font-size: 80px; } }
