/* Zerowake GATES community site (site.rs). Dark by default, light when the system asks for it or the visitor
   picks it (html[data-theme]). Phone first; the layout widens from 760 px.
   Fonts (Latin subsets, SIL Open Font License 1.1) are served from here, so no visitor details go elsewhere:
   Chakra Petch (Cadson Demak) and Noto Sans (Google). */
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url(/site/chakra-600.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url(/site/chakra-700.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-style: italic; font-display: swap; src: url(/site/chakra-700i.woff2) format("woff2"); }
@font-face { font-family: "Noto Sans"; font-weight: 100 900; font-display: swap; src: url(/site/noto-sans.woff2) format("woff2"); }
:root {
  --bg: #07090e; --surface: #0e131b; --surface2: #151c27; --line: rgba(159, 179, 200, .18);
  --text: #eef2f6; --muted: #a3b4c6; --dim: #8193a6;
  --red: #d7263d; --red-text: #ff6577; --ok: #38d996; --warn: #ffb547; --focus: #7cc4ff;
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "Noto Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f4f7; --surface: #ffffff; --surface2: #e8ecf1; --line: rgba(16, 21, 28, .14);
    --text: #10151c; --muted: #465566; --dim: #56657a; --red: #c81f35; --red-text: #b0182c;
    --ok: #0f8a57; --warn: #8f5400; --focus: #0b5cad; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f4f7; --surface: #ffffff; --surface2: #e8ecf1; --line: rgba(16, 21, 28, .14);
  --text: #10151c; --muted: #465566; --dim: #56657a; --red: #c81f35; --red-text: #b0182c;
  --ok: #0f8a57; --warn: #8f5400; --focus: #0b5cad; color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--text); }
a:hover { color: var(--red-text); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--red); color: #fff; font-weight: 700; }
.skip:focus { top: 12px; color: #fff; }
.cut { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); }
.cut-sm { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.hatch { position: absolute; top: 0; right: 0; width: 140px; height: 10px; color: var(--red); opacity: .7;
  background: repeating-linear-gradient(-55deg, currentColor 0 2px, transparent 2px 9px); }
.eyebrow { margin: 0 0 4px; font: 600 14px/1.3 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--red-text); }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 14px; }
.city { background: #05070c url(/site/city.webp) center / cover no-repeat; color: #eef2f6; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top.over { position: absolute; left: 0; right: 0; z-index: 3; border: 0; background: transparent; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { display: block; width: 96px; height: auto; }
.links { display: flex; flex-wrap: wrap; gap: 2px; order: 3; width: 100%; margin: 0 -10px; font: 600 15px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.links a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; }
.links a[aria-current="page"] { color: var(--red-text); }
.top.over .links a, .top.over .pill { color: #eef2f6; }
.right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; text-decoration: none; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.warn { background: var(--warn); }
.btn-light { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; background: #eef2f6; color: #07090e; text-decoration: none; font: 700 15px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.btn-light:hover { color: #07090e; background: #fff; }
@media (min-width: 760px) {
  .links { order: 0; width: auto; margin: 0; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 26px; border: 0; background: var(--red); color: #fff; text-decoration: none; font: 700 18px/1.2 var(--display); letter-spacing: .03em; text-transform: uppercase; cursor: pointer; }
.btn:hover { color: #fff; filter: brightness(1.1); }
.btn small { display: block; font: 400 13px/1.3 var(--body); letter-spacing: 0; text-transform: none; color: #ffe3e7; }
.btn-ghost { display: inline-flex; align-items: center; min-height: 56px; padding: 0 24px; background: rgba(238, 242, 246, .12); color: #eef2f6; text-decoration: none; font: 600 17px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.btn-ghost:hover { color: #fff; background: rgba(238, 242, 246, .2); }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: 640px; }
.hero .art { position: absolute; right: -180px; bottom: -40px; height: 640px; width: auto; max-width: none; opacity: .3; pointer-events: none; }
.hero .scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 7, 12, .96) 0%, rgba(5, 7, 12, .86) 45%, rgba(5, 7, 12, .3) 80%); }
.hero .fade { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(0deg, var(--bg), transparent); }
.hero .inner { position: relative; padding-top: 170px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { margin: 0; max-width: 760px; font: italic 700 clamp(40px, 7vw, 88px)/1 var(--display); letter-spacing: -.01em; }
.hero p.lead { margin: 0; max-width: 580px; font-size: 18px; color: #c5d2df; }
.tags { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font: 600 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.tags span { padding: 7px 12px; background: rgba(238, 242, 246, .12); }
.tags span:first-child { background: var(--red); color: #fff; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.others { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; color: #a3b4c6; }
.others a { color: #eef2f6; }
@media (min-width: 900px) {
  .hero { min-height: 760px; }
  .hero .art { right: -40px; height: 820px; opacity: 1; }
  .hero .inner { padding-top: 190px; padding-bottom: 120px; }
}

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--surface); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 22px; }
.head h2, h1.page { margin: 0; font: 700 clamp(30px, 4.5vw, 40px)/1.1 var(--display); }
h1.page { font-style: italic; font-size: clamp(36px, 6vw, 60px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--surface); }
.section.alt .card { background: var(--surface2); }
.card h3 { margin: 0; font: 700 22px/1.2 var(--display); }
.card .kind { margin: 0; font: 600 13px/1.3 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card .foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.card .left { font: 700 18px/1 var(--display); color: var(--red-text); }
a.card { text-decoration: none; color: var(--text); }
a.card:hover h3 { color: var(--red-text); }
.badge { padding: 2px 10px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.steps3 { margin: 0 0 28px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.steps3 li { display: flex; gap: 16px; }
.num { font: italic 700 52px/.9 var(--display); color: var(--red); }
.steps3 h3 { margin: 0 0 4px; font-size: 19px; }
.steps3 p { margin: 0; color: var(--muted); }

/* News */
.news { display: flex; flex-wrap: wrap; background: var(--surface); overflow: hidden; }
.news .pic { flex: 1 1 320px; min-height: 280px; position: relative; overflow: hidden; }
.news .pic img { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); height: 360px; width: auto; max-width: none; }
.news .body { flex: 999 1 380px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.news h3 { margin: 0; font: 700 28px/1.15 var(--display); }
.news p { margin: 0; color: var(--muted); max-width: 640px; }

/* Questions */
.split { display: flex; flex-wrap: wrap; gap: 28px; }
.split > .side { flex: 1 1 260px; }
.split > .main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
details.q { background: var(--surface); border-radius: 4px; }
details.q summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 20px; font-weight: 700; font-size: 17px; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: ""; width: 10px; height: 10px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-top: -4px; flex: none; }
details.q[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.q > div { padding: 0 20px 18px; color: var(--muted); }
details.q > div p { margin: 0 0 8px; }

/* Play */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.tabs a { display: flex; align-items: center; min-height: 48px; padding: 0 18px; background: var(--surface2); text-decoration: none; font: 600 15px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.tabs a[aria-current="page"] { background: var(--text); color: var(--bg); font-weight: 700; }
.download { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 24px; background: var(--surface); margin-bottom: 20px; }
.download .info { flex: 1 1 300px; min-width: 0; }
.download .file { margin: 0; font: 700 22px/1.2 var(--display); overflow-wrap: anywhere; }
.download p { margin: 2px 0 0; }
.mono { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.note { flex: 1 1 100%; margin: 0; padding: 12px 16px; border-radius: 4px; background: rgba(255, 181, 71, .12); }
.note strong { color: var(--warn); }
ol.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: s; }
ol.steps > li { counter-increment: s; display: flex; gap: 18px; padding: 20px 22px; background: var(--surface); border-radius: 4px; scroll-margin-top: 16px; }
ol.steps > li::before { content: counter(s); flex: none; width: 36px; font: italic 700 38px/1 var(--display); color: var(--red); }
ol.steps .s { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
ol.steps h2 { margin: 0; font-size: 19px; line-height: 1.3; }
ol.steps p { margin: 0; }
ol.steps p.see { font-size: 15px; padding-left: 14px; border-left: 3px solid var(--ok); }
ol.steps details { border-top: 1px solid var(--line); }
ol.steps summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--warn); }
ol.steps details p { margin: 0 0 6px; color: var(--muted); }
aside.side { display: flex; flex-direction: column; gap: 14px; }
.box { padding: 22px; border: 1px solid var(--line); border-radius: 4px; display: flex; flex-direction: column; gap: 8px; }
.box h2 { margin: 0; font: 700 19px/1.2 var(--display); }
.box p { margin: 0; color: var(--muted); font-size: 15px; }
.sticky-dl { display: none; }
@media (max-width: 759px) {
  .sticky-dl { display: flex; position: sticky; bottom: 0; z-index: 5; padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--line); }
  .sticky-dl .btn { width: 100%; justify-content: center; min-height: 52px; }
}

/* Text pages */
.prose { max-width: 760px; }
.prose h2 { margin: 32px 0 8px; font: 700 24px/1.2 var(--display); }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }

/* Footer */
footer.foot { border-top: 1px solid var(--line); margin-top: 24px; }
footer.foot .wrap { padding-top: 40px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 28px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 22px; }
.cols div { display: flex; flex-direction: column; gap: 2px; }
.cols p { margin: 0 0 4px; font: 700 13px/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cols a { display: inline-flex; align-items: center; min-height: 32px; }
.legal { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); max-width: 900px; }
.theme { align-self: flex-start; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
