/* ChuoLink's website: CEMS's tokens and typeface (WEB-2). Two colours carry it, the ground and the
   ink; the brand yellow marks the one action that matters. Flat, words only. */

@font-face {
  font-family: 'Google Sans Flex';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/google-sans-flex-latin.c28f7eaefb89.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Google Sans Flex';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/google-sans-flex-latin-ext.bf8dcbb5c65e.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: 255 255 255;
  --ink: 13 13 13;
  --brand: 255 198 0;
  --on-brand: 13 13 13;
  --alert-ink: 179 38 30;
  --ok: 23 105 60;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: 13 13 13;
    --ink: 249 246 224;
    --alert-ink: 240 113 104;
    --ok: 120 200 150;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: rgb(var(--ground));
  color: rgb(var(--ink));
  font: 400 17px/1.6 'Google Sans Flex', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
  text-decoration-color: rgb(var(--ink) / 0.3);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: rgb(var(--ink));
}

:focus-visible {
  outline: 2px solid rgb(var(--brand));
  outline-offset: 2px;
}

/* ── head and foot ── */

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border-bottom: 1px solid rgb(var(--ink) / 0.1);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.logo {
  display: block;
  width: 32px;
  height: 32px;
}

.head nav a {
  margin-left: 20px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: rgb(var(--ink) / 0.7);
}

.head nav a:hover,
.head nav a[aria-current='page'] {
  color: rgb(var(--ink));
}

.foot {
  margin-top: 72px;
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid rgb(var(--ink) / 0.1);
  font-size: 14px;
  color: rgb(var(--ink) / 0.6);
}

.foot div + div {
  margin-top: 4px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: rgb(var(--ink));
}

/* ── words ── */

main.wrap {
  padding-top: 56px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  margin: 20px 0 0;
  font-size: 20px;
  line-height: 1.5;
  color: rgb(var(--ink) / 0.7);
}

.context {
  margin: 10px 0 0;
  font-size: 15px;
  color: rgb(var(--ink) / 0.6);
}

h2 {
  margin: 56px 0 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgb(var(--ink) / 0.6);
}

h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rows li {
  padding: 18px 0;
  border-bottom: 1px solid rgb(var(--ink) / 0.1);
}

.rows p {
  margin: 4px 0 0;
  color: rgb(var(--ink) / 0.7);
}

.action {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 32px;
  padding: 0 22px;
  border-radius: 8px;
  background: rgb(var(--brand));
  color: rgb(var(--on-brand));
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.action:hover {
  background: rgb(var(--brand) / 0.85);
}

/* ── the home page: one brand-yellow band, then sections (WEB-8) ── */

.hero {
  background: rgb(var(--brand));
  color: rgb(13 13 13);
}

.hero .wrap {
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero + main {
  padding-top: 0;
}

.kicker {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero .lead {
  color: rgb(13 13 13 / 0.8);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.actions .action {
  margin-top: 0;
}

.action.dark {
  background: rgb(13 13 13);
  color: rgb(255 198 0);
}

.action.dark:hover {
  background: rgb(13 13 13 / 0.85);
}

.action.line {
  background: transparent;
  color: rgb(13 13 13);
  box-shadow: inset 0 0 0 2px rgb(13 13 13);
}

.action.line:hover {
  background: rgb(13 13 13 / 0.08);
}

.steps {
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 48px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgb(var(--brand));
  color: rgb(var(--on-brand));
  font-size: 15px;
  font-weight: 700;
}

.panel {
  margin-top: 14px;
  padding: 22px 22px 24px;
  border-radius: 12px;
  border: 1px solid rgb(var(--ink) / 0.12);
  border-left: 6px solid rgb(var(--brand));
}

.panel p {
  margin: 6px 0 0;
  color: rgb(var(--ink) / 0.7);
}

.find {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.find select {
  flex: 1 1 130px;
  width: auto;
}

.find input {
  flex: 3 1 200px;
  width: auto;
}

.find .action {
  margin-top: 0;
}

.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 160px;
  min-height: 56px;
  padding: 6px 20px;
  border-radius: 10px;
  background: rgb(var(--ink));
  color: rgb(var(--ground));
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.store span {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}

.store:hover {
  background: rgb(var(--ink) / 0.85);
}

/* ── the legal texts ── */

.document h3 {
  margin-top: 36px;
}

.document p {
  margin: 10px 0 0;
  color: rgb(var(--ink) / 0.8);
}

/* ── the form: one field per row, top-down (CEMS UI-27) ── */

form {
  margin-top: 8px;
}

.field {
  margin-top: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--ink) / 0.6);
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgb(var(--ink) / 0.15);
  border-radius: 8px;
  background: rgb(var(--ground));
  color: rgb(var(--ink));
  font: inherit;
  font-size: 16px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgb(var(--brand));
  outline: none;
}

.error {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgb(var(--alert-ink));
}

.sent {
  margin: 24px 0 0;
  font-weight: 600;
  color: rgb(var(--ok));
}

/* ── NECTA results (WEB-7): find a school, read its candidates ── */

.crumbs {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgb(var(--ink) / 0.6);
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  color: rgb(var(--ink));
}

.search {
  display: flex;
  gap: 8px;
}

.search input {
  flex: 1;
  min-width: 0;
}

.search .action {
  flex: none;
  margin-top: 0;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 20px;
}

.letters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: rgb(var(--ink) / 0.6);
}

.letters a:hover,
.letters a[aria-current='page'] {
  background: rgb(var(--ink) / 0.08);
  color: rgb(var(--ink));
}

.scroll {
  overflow-x: auto;
}

.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.grid th,
.grid td {
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid rgb(var(--ink) / 0.1);
  text-align: left;
  vertical-align: top;
}

.grid thead th {
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--ink) / 0.6);
}

.grid tbody th {
  font-weight: 600;
}

.candidates td:first-child {
  white-space: nowrap;
}

.candidates td:last-child {
  color: rgb(var(--ink) / 0.7);
}

.candidates tr:target {
  background: rgb(var(--brand) / 0.2);
}

.pairs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* Never seen by people; a robot that fills it is thanked and ignored. */
.hold {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
