/* Turing College hackathon – shared styles.
   Matches the live turingcollege.com (Nov 2026), which wins over the older tc-design skill:
   dark #1C1A22, almostwhite #FAF9F5, white card panels, stone #EFECE6, Noi Grotesk with headings at 500.
   Text is always full contrast. The two gradient images are decoration only: never put text on them. */

@font-face { font-family: "Noi Grotesk"; src: url("fonts/NoiGrotesk-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noi Grotesk"; src: url("fonts/NoiGrotesk-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Noi Grotesk"; src: url("fonts/NoiGrotesk-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --tc-dark: #1C1A22; --tc-dark-2: #27232F; --tc-dark-card: #25212C;
  --tc-almostwhite: #FAF9F5; --tc-white: #FFFFFF; --tc-stone: #EFECE6;
  --tc-mint: #DEEDE7; --tc-midnight: #32344B;
  --tc-purple: #673AFF; --tc-purple-hover: #5C33E7; --tc-light-purple: #808CF4; --tc-orange: #E9513C;

  --bg: var(--tc-almostwhite); --ink: var(--tc-dark);
  --panel: var(--tc-white); --soft: var(--tc-stone); --mint: var(--tc-mint);
  --field: var(--tc-white);
  --line: #D2D1D0; --line-strong: #C7C4CB; --line-hover: #8A8691;
  --hover: rgba(28, 26, 34, .06);
  --btn-bg: var(--tc-dark); --btn-ink: var(--tc-almostwhite); --btn-hover: #34303D;
  --action: var(--tc-purple); --action-hover: var(--tc-purple-hover); --action-ink: var(--tc-almostwhite);
  --link: var(--tc-purple);
  --inv-bg: var(--tc-dark); --inv-ink: var(--tc-almostwhite); --inv-line: rgba(250, 249, 245, .18); --inv-panel: var(--tc-dark-2);
  --shadow: 0 2px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.04), 0 16px 40px rgba(28,26,34,.10);
  --focus: var(--tc-purple);
  --radius: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--tc-dark); --ink: var(--tc-almostwhite);
    --panel: var(--tc-dark-2); --soft: var(--tc-dark-card); --mint: #2C3A36; --field: var(--tc-dark);
    --line: rgba(250, 249, 245, .16); --line-strong: #8A8691; --line-hover: #B9B6BF; --hover: rgba(250, 249, 245, .07);
    --btn-bg: var(--tc-almostwhite); --btn-ink: var(--tc-dark); --btn-hover: #E6E4DD;
    --link: var(--tc-light-purple); --focus: var(--tc-light-purple);
    --inv-bg: #141218; --inv-panel: #221F29;
    --shadow: none; --shadow-lg: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--tc-dark); --ink: var(--tc-almostwhite);
  --panel: var(--tc-dark-2); --soft: var(--tc-dark-card); --mint: #2C3A36; --field: var(--tc-dark);
  --line: rgba(250, 249, 245, .16); --line-strong: #8A8691; --line-hover: #B9B6BF; --hover: rgba(250, 249, 245, .07);
  --btn-bg: var(--tc-almostwhite); --btn-ink: var(--tc-dark); --btn-hover: #E6E4DD;
  --link: var(--tc-light-purple); --focus: var(--tc-light-purple);
  --inv-bg: #141218; --inv-panel: #221F29;
  --shadow: none; --shadow-lg: none; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
body {
  margin: 0; background: var(--bg); color: var(--ink); caret-color: var(--tc-purple);
  font-family: "Noi Grotesk", Arial, system-ui, sans-serif; font-size: 16px; line-height: 1.5; font-weight: 400;
  word-spacing: 0.14em; /* Noi Grotesk's space is very narrow: without this, "closed. The" reads as "closed.The" */
}
::selection { background: var(--tc-purple); color: var(--tc-almostwhite); }
h1, h2, h3, .display { font-weight: 500; font-feature-settings: "ss04" 1, "ss09" 1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(48px, 7.4vw, 96px); line-height: 1; letter-spacing: -0.02em; }
h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; letter-spacing: -0.015em; }
h3 { font-size: 22px; line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.small { font-size: 14px; }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.45; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-bg); color: var(--btn-ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* layout */
.container { max-width: 1260px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .container { padding-inline: 32px; } }
@media (min-width: 1100px) { .container { padding-inline: 60px; } }
.narrow { max-width: 820px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.section { padding-block: clamp(72px, 10vw, 140px); }

/* dark section: same tokens, inverted */
.on-dark { background: var(--inv-bg); color: var(--inv-ink); --ink: var(--tc-almostwhite); --line: var(--inv-line); --line-strong: #8A8691; --line-hover: #B9B6BF; --panel: var(--inv-panel); --hover: rgba(250,249,245,.07);
  --btn-bg: var(--tc-almostwhite); --btn-ink: var(--tc-dark); --btn-hover: #E6E4DD; --link: var(--tc-light-purple); --focus: var(--tc-light-purple); --shadow: none; }

/* nav */
.nav { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand svg.logo { height: 30px; width: auto; display: block; }
.brand .sub { font-size: 16px; font-weight: 500; padding-left: 14px; border-left: 1px solid var(--line-strong); line-height: 22px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 16px; }
.nav-links a:not(.btn):hover { background: var(--hover); }
@media (max-width: 860px) { .nav-links .hide-sm { display: none; } }
@media (max-width: 440px) { .brand .sub { display: none; } }

/* buttons */
.btn {
  font: inherit; font-size: 16px; font-weight: 500; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--hover); border-color: var(--line-hover); }
.btn:active { transform: translateY(1px); }
.btn.dark { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn.dark:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.primary { background: var(--action); color: var(--action-ink); border-color: var(--action); }
.btn.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn.lg { min-height: 52px; padding: 14px 22px; font-size: 17px; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.danger { color: var(--ink); border-color: var(--tc-orange); }
.btn:disabled { cursor: not-allowed; border-style: dashed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn.icon-only { width: 44px; padding: 0; }
.btn.sm.icon-only { width: 36px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.textlink { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 18px; text-decoration: underline; text-underline-offset: 5px; }
.textlink svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.textlink:hover svg { transform: translateX(3px); }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 520px) { .actions .btn { width: 100%; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* panels and cards */
.panel { background: var(--panel); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); border: 1px solid transparent; }
:root[data-theme="dark"] .panel { border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .panel { border-color: var(--line); } }
.panel.soft { background: var(--soft); box-shadow: none; border-color: transparent; }
.panel.mint { background: var(--mint); box-shadow: none; border-color: transparent; }
.panel.outline { background: transparent; box-shadow: none; border-color: var(--line); }
.panel.inverse { background: var(--inv-bg); color: var(--inv-ink); box-shadow: none; border-color: transparent;
  --ink: var(--tc-almostwhite); --line: var(--inv-line); --line-strong: #8A8691; --hover: rgba(250,249,245,.08); --link: var(--tc-light-purple); --focus: var(--tc-light-purple); --bg: var(--tc-dark); --field: var(--tc-dark); }
.panel.inverse .btn.primary { background: var(--tc-purple); border-color: var(--tc-purple); color: var(--tc-almostwhite); }

/* Brand gradient = background of a large rounded section with real content on top (as on turingcollege.com).
   Never use a gradient as a standalone picture. Content on it always uses the light tokens below. */
.grad { position: relative; border-radius: 16px; overflow: hidden; background: #E9E4D6 center / cover no-repeat;
  color: var(--tc-dark); --ink: var(--tc-dark); --bg: var(--tc-almostwhite); --panel: var(--tc-white); --field: var(--tc-white);
  --line: rgba(28,26,34,.16); --line-strong: rgba(28,26,34,.28); --line-hover: rgba(28,26,34,.5); --hover: rgba(28,26,34,.06);
  --btn-bg: var(--tc-dark); --btn-ink: var(--tc-almostwhite); --btn-hover: #34303D; --link: var(--tc-dark); --focus: var(--tc-dark);
  --shadow: 0 2px 2px rgba(0,0,0,.04), 0 6px 16px rgba(28,26,34,.08); }
.grad.green { background-image: url("img/gradient-green.webp"); }
.grad.orange { background-image: url("img/gradient-orange.webp"); }
.grad .panel { border-color: transparent; }
.grad > * { position: relative; }

/* chips, tags, status */
.chip, .tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--line-strong); padding: 4px 12px; font-size: 14px; font-weight: 500; }
.tag { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 9px; }
.tag.solid, .chip.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 6px 14px 6px 12px; font-size: 14px; font-weight: 500; border: 1px solid var(--line-strong); background: var(--panel); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-hover); }
.status.live .dot { background: var(--tc-purple); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc-purple) 18%, transparent); }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-weight: 500; font-size: 15px; }
.help { font-size: 14px; }
input[type="text"], input[type="email"], input[type="number"], input[type="datetime-local"], input[type="url"], input[type="password"], input[type="search"], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background-color: var(--field); border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 14px; width: 100%; min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink) 64%, var(--field)); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8691' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--tc-orange); }
.err { font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: flex-start; }
.err::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tc-orange); flex: none; margin-top: 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tc-purple); flex: none; cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 500; font-size: 15px; padding: 0; margin-bottom: 10px; }

/* segmented choice + bubbles */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 10px; padding: 16px; cursor: pointer; background: var(--field); transition: border-color .2s, box-shadow .2s; }
.seg label:hover { border-color: var(--line-hover); }
.seg label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg input { accent-color: var(--tc-purple); margin-top: 3px; width: 18px; height: 18px; }
.seg b { display: block; font-weight: 500; }
@media (max-width: 480px) { .seg { grid-template-columns: 1fr; } }
.bubbles { display: flex; flex-wrap: wrap; gap: 8px; }
.bubble { font: inherit; font-size: 15px; font-weight: 500; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--field); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; transition: background-color .2s, border-color .2s, color .2s; }
.bubble:hover { border-color: var(--line-hover); }
.bubble[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bubble .tick { width: 0; overflow: hidden; display: inline-flex; transition: width .2s var(--ease), margin .2s var(--ease); }
.bubble[aria-pressed="true"] .tick { width: 16px; margin-right: 6px; }
.bubble .tick svg { width: 16px; height: 16px; flex: none; }

/* tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
td.r, th.r, td.num { font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; } th:last-child, td:last-child { padding-right: 0; }
thead th { font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--ink); white-space: nowrap; }
td.r, th.r { text-align: right; }
tr.top td { font-weight: 600; }

/* scale buttons (jury) */
.scale { display: flex; flex-wrap: wrap; gap: 6px; }
.scale button { font: inherit; font-weight: 500; font-variant-numeric: tabular-nums; width: 46px; height: 46px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--field); color: var(--ink); cursor: pointer; transition: background-color .15s, border-color .15s; }
.scale button:hover { border-color: var(--line-hover); }
.scale button[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* misc */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--tc-dark); color: var(--tc-almostwhite); padding: 12px 18px; border-radius: 10px; font-size: 15px; font-weight: 500; max-width: calc(100vw - 32px); z-index: 100; box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.banner { background: var(--mint); color: var(--ink); font-size: 14px; }
.banner .container { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding-block: 8px; }
.banner select, .banner .btn { min-height: 34px; font-size: 14px; width: auto; background-color: var(--tc-almostwhite); color: var(--tc-dark); border-color: var(--tc-dark); }
.banner select { padding: 4px 34px 4px 10px; }
.banner .btn { padding: 4px 10px; }
.loading { padding: 96px 0; text-align: center; }
.empty { padding: 20px; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 15px; }
details > summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: 18px; }
details > summary::after { content: ""; width: 20px; height: 20px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s var(--ease); }
details[open] > summary::after { transform: rotate(45deg); }
details > summary::-webkit-details-marker { display: none; }
.prose p + p { margin-top: 12px; }
.prose { max-width: 68ch; }
ul.clean, ol.clean { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 15px; }
.kv dt { font-weight: 500; } .kv dd { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* footer */
footer.site { padding-block: 72px 40px; font-size: 15px; border-top: 1px solid var(--line); }
footer.site .cols { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 820px) { footer.site .cols { grid-template-columns: 2fr 1fr 1fr; } }
footer.site h3 { margin: 0 0 16px; font-size: 20px; font-weight: 500; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
footer.site a { color: var(--ink); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site svg.logo { height: 40px; width: 163px; color: var(--ink); display: block; }
footer.site .legal { margin-top: 64px; font-size: 12px; text-align: center; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation: none !important; } }
table.people select { min-width: 180px; }

/* placeholders while live data loads (first visit only) */
.skel { display: inline-block; vertical-align: middle; max-width: 100%; border-radius: 6px; background: var(--soft); }
.skel-tile { height: 88px; border-radius: 12px; background: var(--soft); }
@media (prefers-reduced-motion: no-preference) {
  .skel, .skel-tile { animation: skel-pulse 1.4s ease-in-out infinite; }
  @keyframes skel-pulse { 50% { opacity: .55; } }
}
.register-section .skel { background: var(--line-strong); }
