/* itikia.co.ke — dark console identity, 320px first.
   Tokens are the approved Itikia LOOK-KIT values. No fonts, images or scripts are loaded:
   R1 ships type, colour and real markup only, so there is nothing to fail to load. */

:root {
  --canvas: #080b0f;
  --surface: #10151b;
  --surface-2: #151c23;
  --surface-3: #1a222b;
  --ink: #e6edf3;
  --ink-soft: #a8b4be;
  --ink-faint: #8795a1;
  --line: #26303a;
  --line-strong: #3a4750;
  --accent: #2e9bd6;
  --accent-strong: #62c5f3;
  --warn: #e2b03a;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gap: 12px;
  --pad: 16px;
  --radius: 10px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }

/* Nothing may exceed the viewport. The first render measured the page at 363px on a 320px viewport:
   a 40-character commit hash inside a table cell, and the wordmark's letter-spacing, were both wider
   than the card. Measured from the capture, not guessed. */
img, svg, video, table, pre, blockquote { max-width: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

/* 320px first: one column, generous touch targets, nothing below 16px for body copy. */
main, header.masthead, footer {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #05121a;
  padding: 10px 14px;
  z-index: 10;
  font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; }

a { color: var(--accent-strong); text-underline-offset: 2px; }
a:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── masthead ─────────────────────────────────────────────────────────────── */

.masthead {
  padding-top: 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.wordmark {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.line {
  margin: 6px 0 20px;
  font-size: clamp(28px, 8vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 18ch;
  text-wrap: balance;
}

.index { margin: 0 0 20px; }
.index-h {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}
.index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.index a {
  display: inline-block;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  background: var(--surface);
}
.index a:hover { border-color: var(--accent); }
.index a[data-status="in-development"] { color: var(--ink-soft); border-style: dashed; }

/* ── calls to action ──────────────────────────────────────────────────────── */

.ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 24px;
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #04121a;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--accent);
}
.cta:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.cta.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.cta.secondary:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ── sections ─────────────────────────────────────────────────────────────── */

section { margin: 0 0 44px; }

h2 {
  font-size: clamp(20px, 5vw, 26px);
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.measured {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 20px;
  font-size: 15px;
}

/* ── objects ──────────────────────────────────────────────────────────────── */

.shelf {
  display: grid;
  /* minmax(0, 1fr), not 1fr: a bare fr track keeps an automatic minimum of the item's min-content, which
     measured 347px inside a 320px viewport. This is the canonical grid-overflow fix. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
}

.object {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.object[data-status="in-development"] {
  background: var(--surface-2);
  border-style: dashed;
}

.object h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.badge {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge.live { color: var(--accent-strong); border-color: var(--accent); }
.badge.dev { color: var(--warn); border-color: var(--warn); }

.what {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: var(--measure);
}

.facts {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  font-family: var(--mono);
  font-size: 13px;
}
.facts > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--surface-3);
}
.facts dt { color: var(--ink-faint); margin: 0; }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.links a {
  display: inline-block;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.links a:hover { border-color: var(--accent); color: var(--accent-strong); }

.nolinks {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-faint);
}

/* the evidence drawer: a <details>, so it works with JavaScript disabled */

.receipt {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.receipt > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
}
.receipt > summary:hover { text-decoration: underline; }
.receipt > summary::marker { color: var(--ink-faint); }

.receipt-body {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.receipt-body h4 {
  margin: 12px 0 4px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.receipt-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.receipt-body th, .receipt-body td {
  text-align: left;
  vertical-align: top;
  padding: 4px 6px 4px 0;
  border-bottom: 1px solid var(--surface-3);
  font-weight: 400;
}
.receipt-body th { color: var(--ink-faint); overflow-wrap: anywhere; }
.receipt-body code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); word-break: break-all; }

/* ── limits + start ───────────────────────────────────────────────────────── */

.limits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: var(--measure);
}
.limits li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
}

.plate {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  max-width: var(--measure);
}
.plate p { margin: 0 0 12px; }
.plate .actions { display: flex; flex-direction: column; gap: 10px; }
.link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.small { font-size: 13.5px; color: var(--ink-faint); }

footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 18px;
  padding-bottom: 40px;
}
footer p { margin: 0 0 8px; }

/* ── wider viewports ──────────────────────────────────────────────────────── */

@media (min-width: 561px) {
  :root { --gap: 16px; --pad: 24px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctas { flex-direction: row; }
  .plate .actions { flex-direction: row; align-items: center; }
}

@media (min-width: 901px) {
  :root { --pad: 40px; }
  .line { font-size: clamp(40px, 5vw, 60px); max-width: 22ch; }
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1121px) {
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── reduced motion: there is no animation to remove, and that is the point ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
