/* CrashTech — its own look, never babook's (spec Rule 2.2.1).
 *
 * Dark, technical, English and LTR. It inherits the deep navy ground of
 * the 2026 TechCrash site so a returning participant recognises the thing,
 * with one deliberate change: that site's primary was #0071c5, which is
 * Intel's brand blue, and Intel was a sponsor on it. Tying the product's
 * identity to one sponsor is awkward the year they are not one, and wrong
 * the moment the kit becomes a Raspberry Pi. So the teal that was already
 * the accent is promoted to primary. It is distinctive and belongs to
 * nobody.
 *
 * The type carries the identity more than the colour does. IBM Plex was
 * commissioned for an engineering company and has the right edge to it,
 * and Plex Mono is the part that matters: EVERY NUMBER THAT MEANS
 * SOMETHING IS SET IN MONO. Fmax, logic elements, the countdown, points,
 * a team's label, a search field. At a hardware event the numbers are the
 * content, and treating them as a typographic class is what makes this
 * read as an instrument rather than a landing page.
 */

:root {
  --ct-ground: #0A1020;
  --ct-surface: #141C2E;
  --ct-raised: #1C2740;
  --ct-line: #243247;
  --ct-ink: #E6EDF7;
  --ct-dim: #8FA3BE;

  --ct-primary: #00C7B7;
  --ct-primary-ink: #04211F;
  /* Amber is "waiting, or a human has to look at this". It is why a
     creativity challenge never reads as a failure (Rule 11.8). */
  --ct-amber: #FFB020;
  --ct-red: #FF5C5C;

  --ct-r: 8px;
  --ct-tap: 44px;
  --ct-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ct-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ct-ground);
  color: var(--ct-ink);
  font-family: var(--ct-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

/* ---- layout ---------------------------------------------------------- */

.ct-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.ct-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 18px 48px;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}

/* ---- header ---------------------------------------------------------- */

.ct-head {
  border-bottom: 1px solid var(--ct-line);
  background: var(--ct-surface);
}

.ct-head-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.ct-brand {
  font-family: var(--ct-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ct-ink);
  text-decoration: none;
  white-space: nowrap;
}

.ct-brand span { color: var(--ct-primary); }

.ct-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.ct-nav a {
  color: var(--ct-dim);
  text-decoration: none;
  font-size: 13.5px;
  padding: 4px 0;
}

.ct-nav a:hover,
.ct-nav a.is-on { color: var(--ct-ink); }

.ct-head-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* The current milestone, on screen on every page for every role
   (Rule 11.4). It is the one piece of context that changes what
   everything else means. */
.ct-milestone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ct-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-primary);
  border: 1px solid var(--ct-primary);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

.ct-milestone::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ct-primary);
  flex: 0 0 auto;
}

/* ---- type ------------------------------------------------------------ */

h1, h2, h3 { margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

p { margin: 0 0 12px; }

.ct-lede { color: var(--ct-dim); font-size: 14px; margin-bottom: 22px; }
.ct-fine { color: var(--ct-dim); font-size: 12.5px; }
.ct-mono { font-family: var(--ct-mono); }

.ct-cap {
  font-family: var(--ct-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ct-dim);
  margin: 0 0 10px;
}

a { color: var(--ct-primary); }

/* ---- surfaces -------------------------------------------------------- */

.ct-card {
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-r);
  padding: 18px;
  margin-bottom: 14px;
}

.ct-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  background: var(--ct-raised);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-r);
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}

.ct-row:hover { border-color: var(--ct-primary); }
.ct-row-main { flex: 1; min-width: 0; }
/* Direct children only, both of them. A descendant selector here made
   every nested <b> a block, so emphasis inside a sentence broke the line
   and left the next clause starting with a colon; and it left a second
   explanatory line running on from the first with no break at all. Both
   showed up in one screenshot of the kind picker. */
.ct-row-main > b { display: block; font-weight: 500; font-size: 14.5px; }
.ct-row-main > span { display: block; color: var(--ct-dim); font-size: 12.5px; }

.ct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

/* The museum's headline figures. Its own grid rather than .ct-grid,
   whose 260px minimum collapses to one tile per row on a phone and put
   four full-width cards between the reader and the first word of the
   page. Two across is the right answer at that width. */
.ct-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.ct-numbers .ct-card { margin: 0; padding: 14px; }

/* ---- tags ------------------------------------------------------------ */

.ct-tag {
  font-family: var(--ct-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid var(--ct-line);
  color: var(--ct-dim);
  background: var(--ct-surface);
}

.ct-tag--go { background: rgba(0, 199, 183, 0.14); color: var(--ct-primary); border-color: rgba(0, 199, 183, 0.4); }
.ct-tag--wait { background: rgba(255, 176, 32, 0.12); color: var(--ct-amber); border-color: rgba(255, 176, 32, 0.38); }
.ct-tag--stop { background: rgba(255, 92, 92, 0.12); color: var(--ct-red); border-color: rgba(255, 92, 92, 0.38); }

/* ---- controls -------------------------------------------------------- */

.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ct-tap);
  padding: 11px 18px;
  border-radius: var(--ct-r);
  border: 1px solid var(--ct-line);
  background: var(--ct-surface);
  color: var(--ct-ink);
  font: 500 14px/1 var(--ct-sans);
  text-decoration: none;
  cursor: pointer;
}

.ct-btn:hover { border-color: var(--ct-primary); }

.ct-btn--primary {
  background: var(--ct-primary);
  border-color: var(--ct-primary);
  color: var(--ct-primary-ink);
  font-weight: 600;
}

.ct-btn--wide { width: 100%; }

.ct-btn[disabled],
.ct-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.ct-field { display: block; margin-bottom: 14px; }
.ct-field > span { display: block; font-size: 13px; color: var(--ct-dim); margin-bottom: 5px; }

.ct-input {
  width: 100%;
  min-height: var(--ct-tap);
  padding: 11px 13px;
  border-radius: var(--ct-r);
  border: 1px solid var(--ct-line);
  background: var(--ct-ground);
  color: var(--ct-ink);
  font: 400 15px/1.4 var(--ct-sans);
}

.ct-input:focus-visible,
.ct-btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ct-primary);
  outline-offset: 2px;
}

.ct-error { color: var(--ct-red); font-size: 12.5px; margin: 4px 0 0; }

/* ---- messages -------------------------------------------------------- */

.ct-note {
  border-radius: var(--ct-r);
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid var(--ct-line);
  background: var(--ct-surface);
}

.ct-note--warn {
  background: rgba(255, 176, 32, 0.09);
  border-color: rgba(255, 176, 32, 0.32);
  color: var(--ct-amber);
}

/* ---- empty states ---------------------------------------------------- */

.ct-empty {
  border: 1px dashed var(--ct-line);
  border-radius: var(--ct-r);
  padding: 26px 18px;
  text-align: center;
  color: var(--ct-dim);
  font-size: 13.5px;
}

/* ---- footer ---------------------------------------------------------- */

.ct-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--ct-line);
  padding: 16px 18px;
  text-align: center;
}

.ct-foot span {
  font-family: var(--ct-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ct-dim);
}

/* ---- the event home's band ------------------------------------------ */

/* Where this event is in its life, said once, at the top. During the 24
   hours it is a clock, which the first version had nowhere at all. */
.ct-band {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  margin: 4px 0 18px;
  border-radius: var(--ct-r);
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
}
.ct-band .ct-cap { margin: 0; }
.ct-band-line { font-size: 19px; font-weight: 600; }
.ct-band--live { border-color: var(--ct-amber); background: rgba(255, 176, 32, 0.07); }
.ct-band--live .ct-cap { color: var(--ct-amber); }
.ct-clock {
  font-family: var(--ct-mono);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ct-band--results { border-color: var(--ct-primary); gap: 8px; }
.ct-band--results .ct-btn { margin-top: 8px; align-self: flex-start; }
.ct-podium { display: flex; align-items: baseline; gap: 12px; font-size: 16px; }
.ct-podium-place { color: var(--ct-primary); min-width: 1.4em; }
.ct-podium-name { flex: 1; min-width: 0; }

/* ---- facts, pages, the repository ---------------------------------- */

.ct-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 22px 0 14px;
}
.ct-facts > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 14px;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-r);
}
.ct-facts .ct-cap { margin: 0 0 2px; }
.ct-facts b { font-weight: 500; font-size: 14.5px; }

.ct-repo { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; margin-top: 16px; }
.ct-repo:hover { border-color: var(--ct-primary); }
.ct-repo .ct-cap { margin: 0; }
/* Breaks only where it has to, never mid-word when it fits: break-all
   split "TechCrash2026" into "TechCrash202" and "6". */
.ct-repo b { color: var(--ct-primary); font-size: 13.5px; overflow-wrap: anywhere; }

.ct-page {
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-r);
  background: var(--ct-surface);
  margin-bottom: 8px;
}
.ct-page summary {
  cursor: pointer;
  padding: 14px 16px;
  min-height: var(--ct-tap);
  font-weight: 500;
  list-style-position: inside;
}
.ct-page[open] summary { border-bottom: 1px solid var(--ct-line); }
.ct-prose { padding: 4px 16px 10px; max-width: 68ch; }
.ct-prose p, .ct-prose li { color: var(--ct-ink); }
.ct-prose strong { font-weight: 600; }

.ct-sponsors { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ct-sponsors a, .ct-sponsors span { color: var(--ct-dim); }

/* A row that is not a link must not look like one. Every row used to
   share the hover border, so a timeline entry looked tappable and did
   nothing. */
.ct-row--still:hover { border-color: var(--ct-line); }
.ct-row-go { color: var(--ct-dim); font-size: 16px; }
a.ct-row:hover .ct-row-go { color: var(--ct-primary); }

/* ---- the event home, two columns on a laptop ------------------------ */

.ct-home { display: block; }
@media (min-width: 1000px) {
  .ct-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
  }
  .ct-home-side .ct-repo { margin-top: 0; }
  .ct-home-side .ct-facts { grid-template-columns: 1fr 1fr; margin-top: 14px; }
  .ct-home-side .ct-row { padding: 10px 13px; }
}

/* ---- small buttons --------------------------------------------------- */

/* One class instead of the same inline style pasted into nine templates,
   which is how polish drifts. Still 40px: a thumb, not a cursor. */
.ct-btn--sm { min-height: 40px; padding: 8px 13px; font-size: 13px; }

/* Native controls in the product's colour, not the browser's blue. */
input[type="radio"], input[type="checkbox"] { accent-color: var(--ct-primary); width: 18px; height: 18px; }

/* ---- the phone menu -------------------------------------------------- */

/* Every signed-in role with more than a few links lost most of them on a
   phone: the admin saw five of thirteen, and the rest were scrolled off
   the right edge with nothing to say they existed. Under 900px the links
   fold into a Menu that opens as a full-width list. No script: a checkbox
   and a label, so it works on the worst wifi of the event. */
.ct-menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ct-menu-btn { display: none; }
.ct-menu-items { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.ct-nav a.is-on { color: var(--ct-ink); box-shadow: inset 0 -2px 0 var(--ct-primary); }
.ct-menu-only { display: none; }
.ct-menu-signout {
  background: none; border: 0; padding: 13px 2px; width: 100%; text-align: left;
  font: 500 15px/1.2 var(--ct-sans); color: var(--ct-dim); cursor: pointer;
}

@media (max-width: 900px) {
  .ct-head-in { gap: 10px; }
  .ct-nav, .ct-menu { display: contents; }
  .ct-head-end { order: 2; margin-left: auto; gap: 8px; }
  .ct-menu-btn {
    order: 3;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--ct-line);
    border-radius: var(--ct-r);
    font-size: 13px;
    font-weight: 500;
    color: var(--ct-ink);
    cursor: pointer;
  }
  .ct-menu-toggle:checked + .ct-menu-btn { border-color: var(--ct-primary); }
  .ct-menu-toggle:focus-visible + .ct-menu-btn { outline: 2px solid var(--ct-primary); outline-offset: 2px; }
  .ct-menu-items {
    order: 4;
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 2px 0 -11px;
    border-top: 1px solid var(--ct-line);
  }
  .ct-menu-toggle:checked ~ .ct-menu-items { display: flex; }
  /* A page with a menu moves Sign out into it. A page without one, the
     sign-in screen or an event screen with a single back link, keeps it. */
  .ct-head-in:has(.ct-menu) .ct-signout { display: none; }
  .ct-menu-only { display: block; border-top: 1px solid var(--ct-line); }
  .ct-menu-items a {
    padding: 13px 2px;
    font-size: 15px;
    border-bottom: 1px solid var(--ct-line);
  }
  .ct-menu-items a:last-child { border-bottom: 0; }
  .ct-nav a.is-on { box-shadow: inset 3px 0 0 var(--ct-primary); padding-left: 12px; }
}

/* ---- narrow ---------------------------------------------------------- */

@media (max-width: 560px) {
  h1 { font-size: 23px; }
  .ct-main { padding-top: 18px; }
  .ct-head-in { gap: 12px; }

  /* The sideways-scrolling nav that was here hid most of an admin's links
     off the edge of the screen. The Menu above replaced it. */
  .ct-nav a { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
