/* runkiri.cloud. No build step. Colours and type follow runkiri.com
   (kiri repo, site/styles.css). */

:root {
  color-scheme: light;
  --bg: #F6F2EA;
  --surface: #FFFDF8;
  --surface-2: #F3EEE4;
  --ink: #0F1419;
  --text-2: #3A424C;
  --muted: #5E6773;
  --line: #E1D9CA;
  --ember: #8A6A00;
  --ember-lid: #A88300;
  --ember-text: #6E5400;
  --on-ember: #FFFFFF;
  --ember-soft: color-mix(in srgb, var(--ember) 12%, transparent);
  --warn-line: #C9A227;
  --term-bg: #0F1419;
  --term-fg: #E7E3DA;
  --red: #C0392B;
  --on-red: #FFFFFF;
  --green: #1E8E4E;
  --on-green: #FFFFFF;
  --red-link: #B3261E;

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-text: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1419;
    --surface: #171E26;
    --surface-2: #1D252E;
    --ink: #F6F2EA;
    --text-2: #C9CDD2;
    --muted: #9AA3AE;
    --line: #26303A;
    --ember: #E0B420;
    --ember-lid: #F2CF5B;
    --ember-text: #E8C04A;
    --on-ember: #1A1400;
    --ember-soft: color-mix(in srgb, var(--ember) 16%, transparent);
    --warn-line: #E0B420;
    --term-bg: #0A0E12;
    --red: #E5484D;
    --on-red: #FFFFFF;
    --green: #2FB465;
    --on-green: #06210F;
    --red-link: #FF7A70;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1419;
  --surface: #171E26;
  --surface-2: #1D252E;
  --ink: #F6F2EA;
  --text-2: #C9CDD2;
  --muted: #9AA3AE;
  --line: #26303A;
  --ember: #E0B420;
  --ember-lid: #F2CF5B;
  --ember-text: #E8C04A;
  --on-ember: #1A1400;
  --ember-soft: color-mix(in srgb, var(--ember) 16%, transparent);
  --warn-line: #E0B420;
  --term-bg: #0A0E12;
  --red: #E5484D;
  --on-red: #FFFFFF;
  --green: #2FB465;
  --on-green: #06210F;
  --red-link: #FF7A70;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ember-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
code { font-family: var(--f-mono); font-size: 0.86em; background: var(--surface-2); padding: 0.1em 0.38em; border-radius: 6px; border: 1px solid var(--line); overflow-wrap: anywhere; }
h1, h2 { font-family: var(--f-display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(34px, 6.4vw, 60px); font-weight: 800; max-width: 16ch; }
h2 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 700; margin-bottom: 12px; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

.nav { border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; }
.brand-word { width: 46px; height: 30px; margin-top: 2px; }
.brand-sub { font-family: var(--f-display); font-weight: 700; font-size: 19px; color: var(--muted); margin-left: 2px; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-link { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 10px; border-radius: 9px; }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.theme-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn[hidden] { display: none; }

.hero { padding: clamp(40px, 8vw, 80px) 0 28px; }
.kicker { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ember-text); margin-bottom: 14px; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-2); margin-top: 20px; max-width: 60ch; }

.notice {
  background: var(--ember-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn-line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 28px);
  margin: 8px 0 12px;
}
.notice p { color: var(--text-2); }
.notice strong { color: var(--ink); }

.block { padding: clamp(28px, 5vw, 44px) 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block > p { color: var(--text-2); max-width: 64ch; }
.list { margin: 0 0 16px; padding-left: 1.2em; color: var(--text-2); }
.list li { margin: 6px 0; }
.list strong { color: var(--ink); }

.term {
  background: var(--term-bg);
  color: var(--term-fg);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 4px 0 16px;
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.7;
}
.term code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.term .prompt { color: #9AA3AE; user-select: none; }
.term .out { color: #F2CF5B; }

.btn {
  display: inline-block;
  background: var(--ember);
  color: var(--on-ember);
  font-weight: 600;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 12px;
}
.btn:hover { filter: brightness(1.06); }

/* Reserve your name. */
.reserve {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 32px);
  margin: 8px 0 12px;
}
.hero-tight { padding-bottom: 20px; }
.reserve-form { margin: 0 0 20px; }
.addr {
  display: flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: clamp(14px, 2.4vw, 17px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  cursor: text;
}
.addr:focus-within { border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.addr-dim { color: var(--muted); flex: none; }
.addr-input {
  flex: 1; min-width: 0; width: 100%;
  font: inherit; font-weight: 600;
  color: var(--ember-text);
  background: none; border: 0; outline: none;
  padding: 13px 4px;
}
.addr-input::placeholder { color: var(--muted); font-weight: 400; opacity: 0.75; }
.reserve-at { color: var(--text-2); font-size: 15.5px; margin: 12px 0 0; }
.reserve-at[hidden] { display: none; }
.reserve-at-url { font-family: var(--f-mono); font-size: 0.94em; font-weight: 600; color: var(--ember-text); background: var(--ember-soft); border-radius: 6px; padding: 2px 7px; overflow-wrap: anywhere; }
.danger-link { color: var(--red-link); font-weight: 600; }
.reserve-rule { color: var(--muted); font-size: 14px; margin: 8px 0 16px; }
.reserve-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.btn-gh { display: inline-flex; align-items: center; gap: 9px; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn-gh svg { width: 18px; height: 18px; flex: none; }
.reserve-free { color: var(--muted); font-size: 15px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; color: var(--text-2); font-size: 15.5px; }
.steps li { counter-increment: step; position: relative; padding-left: 36px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 13px; font-weight: 600;
  color: var(--ember-text); background: var(--ember-soft);
}
.steps strong { color: var(--ink); }

/* Names we don't approve: a red wash, strongest at the top left. */
.refuse {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--red) 46%, var(--surface)) 0%,
    color-mix(in srgb, var(--red) 24%, var(--surface)) 50%,
    color-mix(in srgb, var(--red) 9%, var(--surface)) 100%);
  border: 1px solid color-mix(in srgb, var(--red) 50%, var(--line));
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 32px);
  margin: 28px 0 8px;
  scroll-margin-top: 20px;
}
.refuse::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--red) 15%, transparent));
}
.refuse h2 { color: var(--ink); }
.refuse > p, .refuse .list { color: var(--ink); max-width: 64ch; }
.refuse code { background: color-mix(in srgb, var(--bg) 55%, transparent); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.refuse-list { list-style: none; padding-left: 0; }
.refuse-list li { position: relative; padding-left: 28px; margin: 9px 0; }
.refuse-list li::before {
  content: "\00D7";
  position: absolute; left: 0; top: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; line-height: 1;
  color: var(--on-red); background: var(--red);
}

/* After reserving: /reserve/done/. */
.done { padding: clamp(36px, 7vw, 72px) 0 clamp(28px, 5vw, 48px); }
.result[hidden] { display: none; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
.result > * { grid-column: 1 / -1; }
.result > .result-mark { grid-column: 1; }
.result > h1 { grid-column: 2; font-size: clamp(24px, 3.6vw, 34px); max-width: none; overflow-wrap: anywhere; }
.result .lede { margin-top: 14px; }
.result .lede strong { color: var(--ink); }
.result-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 19px; font-weight: 700; line-height: 1;
}
.result-ok .result-mark { color: var(--on-green); background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 20%, transparent); }
.result-no .result-mark { color: var(--on-red); background: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 18%, transparent); }
.addr-done { margin: 26px 0 0; padding: 14px 16px; flex-wrap: wrap; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); cursor: default; }
.addr-name { color: var(--ember-text); font-weight: 600; margin: 0 2px; overflow-wrap: anywhere; }
.result .steps { margin-top: 26px; }
.result-go { margin-top: 24px; }

/* The landing page's link to /reserve/. */
.teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px clamp(18px, 4vw, 24px); margin: 12px 0 8px;
  color: var(--ink); text-decoration: none;
}
.teaser:hover { border-color: var(--ember); }
.teaser-text { display: grid; gap: 2px; }
.teaser-text strong { font-family: var(--f-display); font-size: 20px; letter-spacing: -0.01em; }
.teaser-text > span { color: var(--text-2); font-size: 15.5px; }
.teaser-addr { font-family: var(--f-mono); font-size: 0.9em; color: var(--ember-text); overflow-wrap: anywhere; }
.teaser-go { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ember); color: var(--on-ember); font-size: 18px; font-weight: 600; }
.nav-link[aria-current="page"] { color: var(--ink); }

.footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer a { color: var(--text-2); }
.footer p { margin: 0; }

@media (max-width: 640px) {
  /* The link gets its own line instead of breaking in the middle. */
  .danger-link { display: block; width: fit-content; margin-top: 4px; }
}
@media (max-width: 480px) {
  .nav-link { padding: 8px 6px; font-size: 14px; }
  .brand-sub { display: none; }
  .brand-word { display: none; }
}

/* Logo colours (classes, not style attributes: the CSP has no 'unsafe-inline'). */
.sprite { position: absolute; }
.m-body { fill: var(--ember); }
.m-lid { fill: var(--ember-lid); }
