/* PKU Commons — shared site styles
   Dependency-free. Served as-is by GitHub Pages from /docs.
   Modern developer-site look: one core blue, near-black ink, warm off-white,
   Space Grotesk display + Hanken Grotesk body + IBM Plex Mono for data. */

:root {
  --ink:        #101010;
  --ink-soft:   #5c5c5c;
  --ink-faint:  #8f8f8f;
  --paper:      #ffffff;
  --wash:       #faf9f5;
  --wash-2:     #f0f0ec;
  --line:       #e7e7e3;
  --line-2:     #edede9;

  /* one core color (logo blue) + tints */
  --blue:       #1e3fd6;
  --blue-dk:    #1833ad;
  --blue-mid:   #2a4ff0;
  --blue-wash:  #ecefff;
  --blue-line:  #c3ccff;

  /* legacy accent names remapped onto the single blue so existing
     class hooks (teal / violet / amber) all resolve to the core color */
  --teal:       var(--blue);
  --teal-dk:    var(--blue-dk);
  --teal-wash:  var(--blue-wash);
  --amber:      var(--blue);
  --amber-wash: var(--blue-wash);
  --violet:     var(--blue);
  --violet-wash:var(--blue-wash);

  --radius:     14px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(16,16,16,.04), 0 8px 30px rgba(16,16,16,.06);
  --shadow-sm:  0 1px 2px rgba(16,16,16,.05);
  --maxw:       1120px;

  --font:      "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-disp: "Space Grotesk", var(--font);
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dk); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-disp); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6vw, 4rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-top: 0; }
h3 { font-size: 1.2rem; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
::selection { background: var(--blue-wash); }

/* ---- top nav ---- */
/* Site-wide hackathon announcement banner */
.atlas-banner,
.hackathon-banner {
  display: block;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 500;
  padding: 10px 18px;
  letter-spacing: .01em;
}
.atlas-banner:hover,
.hackathon-banner:hover { background: var(--blue-dk); color: #fff; text-decoration: none; }
.atlas-banner, .atlas-banner:link, .atlas-banner:visited,
.hackathon-banner, .hackathon-banner:link, .hackathon-banner:visited { color: #fff; }
.atlas-banner b, .atlas-banner span,
.hackathon-banner b, .hackathon-banner span { color: #fff; }
.hackathon-banner b { font-weight: 700; }
.atlas-banner b { font-weight: 700; }
.atlas-banner .hb-cta,
.hackathon-banner .hb-cta { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.atlas-banner .hb-arrow,
.hackathon-banner .hb-arrow { font-family: var(--font-mono); }
@media (max-width: 560px){ .atlas-banner,
.hackathon-banner { font-size: .85rem; padding: 9px 12px; } }

.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-disp); font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--blue); }
.brand-logo { width: 28px; height: 28px; border-radius: 6px; display: block; }
footer .brand-logo { border-radius: 6px; }
.nav .spacer { flex: 1; }
.nav a.link { text-decoration: none; color: var(--ink-soft); font-size: .95rem; font-weight: 500; }
.nav a.link:hover { color: var(--teal-dk); }
@media (max-width: 640px){ .nav a.link { display:none; } }

/* ---- hero ---- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% -8%, var(--blue-wash) 0%, rgba(236,239,255,0) 60%),
    linear-gradient(180deg, #fbfcff 0%, var(--paper) 62%);
  border-bottom: 1px solid var(--line);
  padding: 76px 0 64px;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 3.8rem);
  margin: 0 0 22px;
  max-width: 20ch;
}
.hero p.lede { font-size: 1.22rem; line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.kicker {
  display:inline-block; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
  font-size: .78rem; font-weight: 600; color: var(--blue);
  background: none; padding: 0; margin-bottom: 18px;
}
.kicker-live {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-wash); border: 1px solid var(--blue-line);
  border-radius: 999px; padding: 6px 14px 6px 12px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 0 rgba(30,63,214,.45);
  animation: livePulse 2.2s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(30,63,214,.40); }
  70%  { box-shadow: 0 0 0 7px rgba(30,63,214,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,63,214,0); }
}

/* ---- hero status strip ---- */
.hero-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 40px 0 6px;
}
.hs-item {
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 20px 20px 22px;
  box-shadow: var(--shadow-sm);
}
.hs-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-soft); margin-bottom: 12px;
}
.hs-tag::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); flex: none;
}
.hs-done .hs-tag { color: #1a7f52; }
.hs-done .hs-tag::before { background: #1fae6f; }
.hs-open .hs-tag { color: #a8620a; }
.hs-open .hs-tag::before { background: #e08b1e; }
.hs-ask .hs-tag { color: var(--blue-dk); }
.hs-ask .hs-tag::before { background: var(--blue); }
.hs-done { border-top-color: #1fae6f; }
.hs-open { border-top-color: #e08b1e; }
.hs-ask { border-top-color: var(--blue); }
.hs-item h3 { font-size: 1.08rem; line-height: 1.18; margin: 0 0 9px; }
.hs-item p { margin: 0; font-size: .96rem; line-height: 1.5; color: var(--ink-soft); }
.hero-foot {
  margin: 20px 0 0; font-size: .95rem; color: var(--ink-faint);
  font-family: var(--font-mono); letter-spacing: .01em;
}
@media (max-width: 820px) {
  .hero-status { grid-template-columns: 1fr; gap: 12px; }
  .hero h1 { max-width: none; }
}

/* ---- run a test CTA band ---- */
.runtest {
  background:
    radial-gradient(900px 420px at 85% -20%, rgba(190,255,120,.28) 0%, rgba(190,255,120,0) 58%),
    linear-gradient(160deg, #0c8055 0%, #0a704b 100%);
  color: #f2fff8;
  border-top: 1px solid #0a6e4c;
  border-bottom: 1px solid #0a6e4c;
  padding: 44px 0;
}
.rt-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 28px;
}
.rt-copy { flex: 1 1 520px; }
.rt-kicker {
  display: inline-block; font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: #eafff0; margin-bottom: 10px;
}
.runtest h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 12px; }
.runtest p { color: #ecfff5; font-size: 1.05rem; line-height: 1.55; margin: 0 0 18px; max-width: 62ch; }
.runtest code {
  font-family: var(--font-mono); font-size: .92em; background: rgba(6,32,21,.32);
  color: #eaffbf; padding: 1px 7px; border-radius: 6px;
}
.rt-cmd {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(6,32,21,.34); border: 1px solid rgba(234,255,191,.35);
  border-radius: var(--radius-sm); padding: 11px 15px;
  font-family: var(--font-mono); font-size: .92rem;
}
.rt-prompt { color: #d6ff7a; font-weight: 700; }
.rt-cmd-text { color: #f2fff8; }
.rt-actions { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.btn-run {
  background: #ffffff; color: #0a6e48; font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 8px 24px rgba(6,32,21,.22);
}
.btn-run:hover { background: #f0fff7; color: #0a6e48; }
.rt-link { color: #eafff0; font-family: var(--font-mono); font-size: .88rem; text-decoration: underline; text-underline-offset: 2px; }
.rt-link:hover { color: #fff; }
@media (max-width: 720px) {
  .rt-actions { flex-basis: 100%; }
  .btn-run { width: 100%; text-align: center; }
}

/* ---- the problem with food labels ---- */
.lead-blue { color: var(--blue); font-weight: 500; }
.labels-grid { align-items: start; }
.label-demo { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.ld-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "food src" "val src";
  align-items: center; column-gap: 14px; row-gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px; box-shadow: var(--shadow-sm);
}
.ld-good { border-left: 3px solid #1fae6f; }
.ld-bad  { border-left: 3px solid #d64545; }
.ld-food { grid-area: food; font-weight: 600; font-size: .98rem; }
.ld-val  { grid-area: val; font-family: var(--font-mono); font-size: .92rem; color: var(--ink-soft); }
.ld-val em { font-style: normal; color: var(--ink-faint); }
.ld-src {
  grid-area: src; justify-self: end; align-self: center;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.src-measured { background: #e6f6ee; color: #1a7f52; }
.src-missing  { background: #fbe8e8; color: #b32d2d; }

.prov-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; border: 1px solid transparent;
}
.chip-measured { background: #e6f6ee; color: #1a7f52; border-color: #bfe6cf; }
.chip-calc     { background: var(--blue-wash); color: var(--blue-dk); border-color: var(--blue-line); }
.chip-est      { background: var(--wash-2); color: var(--ink-soft); border-color: var(--line); }

/* ---- buttons ---- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .08s ease, box-shadow .12s ease; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-dk); color:#fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background:#fff; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dk); }
.btn-row { display:flex; gap:12px; flex-wrap: wrap; margin-top: 22px; }

/* ---- sections ---- */
section { padding: 52px 0; }
section.alt { background: var(--wash); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 28px; }

/* ---- audience router cards ---- */
.routes { display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px){ .routes { grid-template-columns: 1fr; } }
.route {
  display:block; text-decoration:none; color:inherit;
  background:#fff; border:1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .1s ease, border-color .1s ease;
}
.route:hover { transform: translateY(-3px); border-color: var(--teal); }
.route .tag { font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.route h3 { margin: 10px 0 8px; font-size: 1.25rem; }
.route p { margin: 0; color: var(--ink-soft); font-size:.96rem; }
.route .go { margin-top:14px; font-weight:600; color: var(--teal-dk); }
.route.devs .tag { color: var(--teal-dk); }
.route.clin .tag { color: var(--violet); }
.route.fam  .tag { color: var(--amber); }

/* ---- generic cards / grid ---- */
.grid2 { display:grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
@media (max-width: 820px){ .grid2, .grid3 { grid-template-columns: 1fr; } }
.card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }

/* ---- pain-points / suggested hacks ---- */
.hack {
  background:#fff; border:1px solid var(--line); border-left: 5px solid var(--amber);
  border-radius: 10px; padding: 18px 20px; margin-bottom: 14px;
}
.hack h4 { margin: 0 0 6px; font-size: 1.05rem; }
.hack .pain { color: var(--ink-soft); font-size: .93rem; margin: 0 0 8px; }
.hack .fix { font-size: .95rem; }
.hack .fix b { color: var(--amber); }

/* ---- callout ---- */
.callout {
  background: var(--amber-wash); border:1px solid #f0d9b8; border-radius: var(--radius);
  padding: 22px 24px; margin: 24px 0;
}
.callout.teal { background: var(--teal-wash); border-color:#bfe0e0; }
.callout.violet { background: var(--violet-wash); border-color:#dccff0; }

/* ---- form ---- */
.form-embed { background:#fff; border:1px dashed var(--line); border-radius: var(--radius); padding: 20px; }
label { display:block; font-weight:600; margin: 12px 0 4px; font-size:.92rem; }
input[type=text], input[type=email], textarea, select {
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px; font: inherit; background:#fff;
}
textarea { min-height: 110px; resize: vertical; }

/* ---- step list ---- */
ol.steps { counter-reset: s; list-style:none; padding-left:0; }
ol.steps li { position:relative; padding: 0 0 14px 44px; }
ol.steps li::before {
  counter-increment: s; content: counter(s);
  position:absolute; left:0; top:0; width:30px; height:30px; border-radius:50%;
  background:var(--teal); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; font-size:.9rem;
}

/* ---- tables ---- */
table.lb { width:100%; border-collapse: collapse; font-size:.94rem; }
table.lb th, table.lb td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); }
table.lb th { color: var(--ink-soft); font-size:.8rem; text-transform:uppercase; letter-spacing:.05em; }

/* ---- footer ---- */
footer { background: var(--ink); color: #cfd3e6; padding: 40px 0; font-size:.92rem; }
footer a { color:#aeb9ff; }
footer a:hover { color:#cdd4ff; }
footer .wrap { display:flex; flex-wrap:wrap; gap: 24px; justify-content: space-between; }

/* ---- misc ---- */
.pill { display:inline-block; background:var(--teal-wash); color:var(--teal-dk); font-size:.78rem; font-weight:600; padding:3px 10px; border-radius:999px; margin:2px 4px 2px 0; }
.note { font-size:.86rem; color:var(--ink-soft); font-style: italic; }
hr.soft { border:none; border-top:1px solid var(--line); margin: 32px 0; }
