/* szstuff.com — transit-diagram wayfinding for new arrivals in Shenzhen */

:root {
  --paper:    #e6eae4;
  --plate:    #f4f6f2;
  --ink:      #10202e;
  --ink-soft: #4a5a68;
  --rule:     #c3cbc4;

  --l1: #007332;  /* first 72 hours */
  --l2: #c8102e;  /* paperwork      */
  --l3: #0c5fa8;  /* getting around */
  --l4: #8f5a06;  /* money & phone  */
  --l5: #c4267b;  /* health         */
  --l6: #6d3f9e;  /* somewhere to live */
  --l7: #0b6a73;  /* eating & buying   */
  --l8: #2f5d2a;  /* news & people     */

  --gutter: 2.25rem;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #0d1720;
    --plate:    #14212c;
    --ink:      #e4eae6;
    --ink-soft: #94a6b2;
    --rule:     #2a3a47;

    --l1: #37c172;
    --l2: #ff6b78;
    --l3: #5aa6ef;
    --l4: #e0a53c;
    --l5: #f072ad;
    --l6: #ab84e0;
    --l7: #3fb8c2;
    --l8: #74b46a;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-synthesis-weight: none;
}

.zh {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  font-weight: 400;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--c, var(--l3));
  outline-offset: 3px;
}

.wrap {
  max-width: calc(var(--measure) + var(--gutter) + 3rem);
  margin: 0 auto;
  padding: 0 1rem 5rem;
}

/* ── Station nameplate ───────────────────────────────────────── */

.plate {
  background: var(--plate);
  margin: 0 -1rem 4rem;
  padding: 0 1rem 2rem;
}

.livery {
  display: flex;
  height: 9px;
  margin: 0 -1rem 3.25rem;
}
.livery span { flex: 1; }

.nameplate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

h1 {
  margin: 0;
  font-size: clamp(3.1rem, 13vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.85;
}

.nameplate .zh {
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  line-height: 1;
}

.tagline {
  margin: 1.6rem 0 0;
  max-width: 22ch;
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* ── Lines & stations ────────────────────────────────────────── */

.line { margin-bottom: 3.25rem; }

.line-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c);
}

.badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--c);
  color: var(--plate);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

.line-head .zh {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0.08em;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.stations {
  list-style: none;
  margin: 0;
  padding: 0.2rem 0 0.2rem var(--gutter);
  border-left: 4px solid var(--c);
  margin-left: calc(0.95rem - 2px);
}

.station { position: relative; padding-bottom: 1.5rem; }
.station:last-child { padding-bottom: 0; }

.station::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1 - 13px);
  top: 0.42rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--c);
}

.station a {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.station a:hover { color: var(--c); text-decoration-color: var(--c); }

.station .zh {
  margin-left: 0.55rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.station p {
  margin: 0.2rem 0 0;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.station.nolink > span:first-child {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

/* ── Contact ─────────────────────────────────────────────────── */

footer {
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--rule);
  max-width: var(--measure);
}
footer p { margin: 0 0 0.6rem; color: var(--ink-soft); }
footer a.mail {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--l3);
}
footer a.mail:hover { color: var(--l3); }
footer .colophon { margin-top: 1.8rem; font-size: 0.9rem; }

@media (max-width: 420px) {
  :root { --gutter: 1.6rem; }
  .station .zh { display: block; margin-left: 0; white-space: normal; }
}
