/* Click2.surf, Channel 5 of NETWORK XXIII.
   The station frame (tokens, fonts, header, buttons, lamps, footer) is copied from NetWorkXXIII.de's site.css, Raza
   skin, so this page needs nothing from another origin. When the station changes those, copy them again.
   Type follows the station's DESIGN.md: display face for headings, mono for what a machine prints, body face for
   every sentence. Brand red is only the lit lamp (ON AIR). */

@font-face { font-family: "Chakra Petch"; font-weight: 600; font-style: normal; font-display: swap; src: url(/frontend/fonts/chakra-petch-600.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-style: normal; font-display: swap; src: url(/frontend/fonts/chakra-petch-700.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 100 900; font-style: normal; font-display: swap; src: url(/frontend/fonts/outfit-variable.woff2) format("woff2"); }
@font-face { font-family: "Share Tech Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(/frontend/fonts/share-tech-mono.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --brand: #cd2127;
  --live: #ff4a50;
  --display: "Chakra Petch", "Trebuchet MS", Arial, sans-serif;
  --body: "Outfit", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Share Tech Mono", "Consolas", "Courier New", monospace;
  --bg: #09090b;
  --bg2: #0e0e11;
  --panel: #131316;
  --line: #2a2a30;
  --fg: #d4d4d8;
  --muted: #9696a2;
  --accent: #9fb0c4;
  --accent-ink: #0a0d12;
  --warn: #e0b04a;
  --radius: 0px;
  --panel-grad: linear-gradient(180deg, #17171b 0%, #111114 100%);
  --sector: #b07a3c;   /* Brown sector: half-finished, being revived */
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.55; font-weight: 300; background: var(--bg); color: var(--fg); overflow-x: hidden; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.skip-content { position: fixed; top: -100px; left: 16px; z-index: 110; padding: 12px; background: var(--bg2); }
.skip-content:focus { top: 8px; }

/* ---------- station header ---------- */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--bg2) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 48px; width: auto; display: block; }
nav.main { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
nav.main a { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); padding: 6px 10px; border-radius: var(--radius); white-space: nowrap; }
nav.main a:hover { background: var(--panel); text-decoration: none; }
.btn { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg); background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; border-radius: var(--radius); cursor: pointer; display: inline-block; line-height: 1.4; min-height: 44px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:disabled { cursor: progress; opacity: .7; }

/* Lamps: a lit red lamp is ON AIR, as on a studio door. Here it marks a short link that works now. */
.pill { font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: .12em; padding: 1px 7px; border: 1px solid var(--line); border-radius: 2px; text-transform: uppercase; white-space: nowrap; color: var(--muted); }
.pill.on { background: var(--brand); border-color: var(--live); color: #fff; box-shadow: 0 0 12px color-mix(in srgb, var(--live) 50%, transparent); }

/* ---------- page ---------- */
.page-head { padding-block: 40px 8px; display: grid; gap: 10px; }
.page-head p { margin: 0; }
.page-head h1 { font-size: clamp(34px, 6vw, 56px); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.lead { font-size: 19px; max-width: 34em; color: color-mix(in srgb, var(--fg) 82%, var(--muted)); }
.section-title { font-size: 22px; text-transform: uppercase; letter-spacing: .04em; margin: 48px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.notice { margin: 0 0 18px; padding: 10px 14px; border-left: 3px solid var(--warn); background: var(--bg2); }

/* The console: the one control on this channel. The sector stripe on the left, as in the station's programme. */
.console { max-width: 760px; margin-top: 24px; padding: 24px; background: var(--panel-grad); border: 1px solid var(--line); border-left: 3px solid var(--sector); border-radius: var(--radius); }
.field-label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field-row { display: flex; gap: 10px; }
.console input[type="url"], .console input[type="text"] { font: 17px var(--mono); background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; min-height: 48px; width: 100%; min-width: 0; }
.console input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
.console input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field-row .btn { min-height: 48px; padding-inline: 22px; }
.ending { margin-top: 16px; }
.ending summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; }
.ending summary::marker { content: ""; }
.ending summary::after { content: " +"; white-space: pre; }
.ending[open] summary::after { content: " −"; }
.ending-row { display: flex; align-items: center; gap: 8px; max-width: 460px; }
.ending-row label { color: var(--muted); white-space: nowrap; font-size: 15px; }
.ending .small { margin: 8px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pow-status { margin: 16px 0 0; color: var(--muted); }
.pow-status span { color: var(--fg); }
.pow-status.ready span { color: var(--accent); }

/* The result: the new short link on screen, with its lamp. */
.result p { margin: 0; }
.result-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.short { margin-top: 14px !important; font-size: clamp(24px, 4.4vw, 38px); line-height: 1.2; overflow-wrap: anywhere; }
.short a { color: var(--fg); }
.target { margin-top: 8px !important; overflow-wrap: anywhere; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 70ch; }
.rules li { padding-left: 18px; position: relative; }
.rules li::before { content: "▮"; position: absolute; left: 0; font-size: 10px; top: 6px; color: var(--sector); }

/* ---------- footer ---------- */
footer { padding-block: 56px 40px; overflow-wrap: anywhere; }
footer .fine { font-family: var(--mono); font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 620px) {
  .brand img { height: 38px; }
  header.top .wrap { gap: 6px; }
  nav.main a { padding-inline: 6px; font-size: 12px; }
  nav.main a[href="/#rules"] { display: none; }
  .page-head { padding-top: 28px; }
  .console { padding: 18px 16px; }
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
}
@media (max-width: 380px) {
  nav.main { display: none; }
  .programme-link { margin-left: auto; }
}
