/* CUW AI & Quantum Innovation Lab portal (https://cuwcs.com/).
   Colors are CUW's Wisconsin palette (2023 CUW Style Guide p.12, matching cuw.edu's CSS).
   Headings: Montserrat as an open stand-in for CUW's Gotham. Body: Roboto, as on cuw.edu.
   Fonts are self-hosted; the page loads nothing from other origins. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("/assets/fonts/montserrat-normal-500-800-latin.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/roboto-normal-400-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/roboto-italic-400-latin.woff2") format("woff2"); }

:root {
  --midnight: #002641;   /* Midnight Blue, PMS 2965 C */
  --lake: #005596;       /* Lake Blue, PMS 7691 C */
  --sky: #90b9e2;        /* Sky Blue */
  --gold: #faa634;       /* Sunrise Gold, PMS 1375 C */
  --sunset: #e89a30;     /* Sunset Gold */
  --downy: #ededed;      /* Downy Grey */
  --fog: #cccccc;        /* London Fog */
  --ash: #545454;        /* Ash */
  --charcoal: #2d2d2d;   /* Charcoal */
  --white: #ffffff;
  --sky-tint: #eef4fb;   /* Sky Blue at ~15% on white, for live panels */
  --down: #c2452d;       /* status only: a service that should be running is not */
  --down-on-dark: #f0866b;

  --display: "Montserrat", "Gotham", "Helvetica Neue", Arial, sans-serif;
  --body: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--white); color: var(--midnight); font-family: var(--body);
  font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--lake); text-underline-offset: 3px; }
a:hover { color: var(--midnight); }
code { font-family: var(--mono); font-size: .92em; }
::selection { background: var(--sky); color: var(--midnight); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(var(--wrap), calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--gold); color: var(--midnight);
  padding: 10px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
  border-radius: 6px; border: 2px solid transparent; font: 700 1rem/1.2 var(--body); text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s; }
.btn-gold { background: var(--gold); color: var(--midnight); }
.btn-gold:hover { background: var(--sunset); color: var(--midnight); }
.btn-ghost { border-color: rgba(144, 185, 226, .6); color: var(--white); }
.btn-ghost:hover { border-color: var(--sky); background: rgba(144, 185, 226, .1); color: var(--white); }
.btn-light { background: var(--white); color: var(--midnight); }
.btn-light:hover { background: var(--gold); color: var(--midnight); }
.btn-blue { background: var(--lake); color: var(--white); }
.btn-blue:hover { background: var(--midnight); color: var(--white); }

/* ---------- masthead ---------- */
.masthead { background: var(--midnight); color: var(--white); border-bottom: 1px solid rgba(144, 185, 226, .2); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; padding-block: 12px; }
.lockup { display: grid; gap: 2px; text-decoration: none; color: var(--white); }
.lockup:hover { color: var(--white); }
.lockup-school { font: 500 .82rem/1.2 var(--body); color: var(--sky); letter-spacing: .01em; }
.lockup-lab { font: 700 1.12rem/1.2 var(--display); letter-spacing: -.01em; }
.topnav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.topnav a { color: var(--white); text-decoration: none; font-weight: 500; font-size: .97rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--white); border-bottom-color: var(--gold); }

/* ---------- hero ---------- */
.hero { position: relative; background-color: var(--midnight); color: var(--white); overflow: hidden;
  background-image:
    radial-gradient(900px 520px at 88% -8%, rgba(0, 85, 150, .62), transparent 62%),
    radial-gradient(rgba(144, 185, 226, .11) 1px, transparent 1.2px);
  background-size: auto, 26px 26px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; padding: 76px 0 84px; }
.hero-kicker { color: var(--sky); font-weight: 500; font-size: 1.02rem; margin-bottom: 18px; }
.hero h1 { font: 800 clamp(2.4rem, 4.9vw, 4.1rem)/1.05 var(--display); letter-spacing: -.028em; max-width: 16ch; text-wrap: balance; }
.hero-lede { margin-top: 24px; font-size: 1.16rem; line-height: 1.65; color: rgba(255, 255, 255, .84); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- live board (the hero's one bold element) ---------- */
.board { background: rgba(255, 255, 255, .04); border: 1px solid rgba(144, 185, 226, .24); border-radius: 16px; padding: 24px 28px 10px; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid rgba(144, 185, 226, .2); }
.board-head h2 { font: 700 1.05rem/1.2 var(--display); }
.board-updated { font-size: .86rem; color: var(--sky); font-variant-numeric: tabular-nums; }
.board-list { list-style: none; }
.board-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 18px 0 16px;
  border-bottom: 1px solid rgba(144, 185, 226, .16); transition: opacity .5s; }
.board-row:last-child { border-bottom: 0; }
.board-row[data-state="loading"] { opacity: .45; }
.board-name { font: 800 clamp(1.9rem, 3.1vw, 2.55rem)/1 var(--display); letter-spacing: -.025em; color: var(--white); text-decoration: none; justify-self: start; }
.board-name:hover { color: var(--gold); }
.board-state { grid-column: 2; grid-row: 1; align-self: center; display: inline-flex; align-items: center; gap: 9px;
  font-size: .9rem; font-weight: 500; color: var(--white); text-align: right; }
.board-role { grid-column: 1 / -1; margin-top: 6px; font-size: .93rem; color: rgba(255, 255, 255, .72); }
.board-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.board-stats dt { font-size: .76rem; color: rgba(255, 255, 255, .62); }
.board-stats dd { font-size: 1.18rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; height: 6px; margin-top: 14px; border-radius: 3px; background: rgba(144, 185, 226, .2); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 3px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.meter-label { grid-column: 1 / -1; margin-top: 7px; font-size: .78rem; color: rgba(255, 255, 255, .62); font-variant-numeric: tabular-nums; }

.dot { position: relative; display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: transparent; border: 2px solid var(--sky); }
[data-state="online"] .board-state .dot { background: var(--gold); border-color: var(--gold); }
[data-state="online"] .board-state .dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--gold); animation: pulse 2.4s ease-out infinite; }
[data-state="degraded"] .board-state .dot { background: var(--down-on-dark); border-color: var(--down-on-dark); }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2.6); opacity: 0; } }

/* ---------- section scaffolding ---------- */
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2, .lab h2, .contact h2 { font: 800 clamp(2rem, 3.4vw, 2.85rem)/1.1 var(--display); letter-spacing: -.022em; text-wrap: balance; }
.section-head p { margin-top: 14px; font-size: 1.1rem; color: var(--ash); max-width: 62ch; }

/* ---------- servers ---------- */
.servers { padding: 96px 0 72px; }
.server { display: grid; grid-template-columns: minmax(0, 3.6fr) minmax(0, 5fr) minmax(0, 3.4fr); gap: 44px;
  padding: 52px 0; border-top: 1px solid var(--fog); scroll-margin-top: 16px; }
.server-id h3 { font: 800 clamp(2.4rem, 4vw, 3.3rem)/1 var(--display); letter-spacing: -.03em; color: var(--lake); }
.server-role { margin-top: 12px; font-weight: 500; font-size: 1.08rem; line-height: 1.45; }
.specs { list-style: none; margin-top: 22px; border-top: 1px solid var(--downy); }
.specs li { padding: 9px 0; border-bottom: 1px solid var(--downy); font-size: .95rem; color: var(--ash); }
.server-body h4, .server-live h4 { font: 700 .98rem/1.3 var(--display); margin: 26px 0 8px; }
.server-body h4:first-child, .server-live h4:first-child { margin-top: 0; }
.server-body p { color: var(--charcoal); max-width: 60ch; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--lake); color: var(--white); font: 700 .82rem/26px var(--body); text-align: center; }
.server-live { align-self: start; background: var(--sky-tint); border-radius: 12px; padding: 22px 22px 24px; }
.live-list { list-style: none; display: grid; gap: 12px; }
.live-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.live-list .dot { margin-top: 7px; border-color: var(--lake); }
.live-list li[data-state="running"] .dot { background: var(--lake); }
.live-list li[data-state="down"] .dot { background: var(--down); border-color: var(--down); }
.live-list strong { display: block; font-weight: 700; font-size: .95rem; line-height: 1.35; }
.live-list span.does { display: block; font-size: .86rem; color: var(--ash); line-height: 1.4; }
.live-list li[data-state="down"] strong { color: var(--down); }
.live-list .live-empty, .chips .live-empty { display: block; font-size: .9rem; color: var(--ash); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: .84rem/1.3 var(--mono); background: var(--white); border: 1px solid var(--fog); border-radius: 999px; padding: 5px 11px; overflow-wrap: anywhere; }
.chips li small { font-family: var(--body); color: var(--ash); }

/* ---------- docs ---------- */
.docs { background: var(--downy); padding: 92px 0; }
.docs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; }
.docs-grid .section-head { grid-column: 1 / -1; }
.endpoints h3, .doc-links h3 { font: 700 1.2rem/1.3 var(--display); margin-bottom: 18px; }
.endpoint-list { display: grid; gap: 16px; }
.endpoint-list dt { font-size: .9rem; font-weight: 700; color: var(--ash); margin-bottom: 6px; }
.endpoint-list dd code { display: block; background: var(--white); border: 1px solid var(--fog); border-radius: 6px; padding: 10px 12px;
  font-size: .95rem; color: var(--midnight); overflow-wrap: anywhere; }
.code-label { margin-top: 26px; margin-bottom: 8px; font-size: .9rem; font-weight: 700; color: var(--ash); }
.code { margin: 0; background: var(--midnight); color: #dce9f6; border-radius: 10px; padding: 18px 20px; overflow-x: auto;
  font: .84rem/1.65 var(--mono); }
.code code { font-size: inherit; }
.link-table { list-style: none; border-top: 1px solid var(--fog); }
.link-table li { padding: 15px 0; border-bottom: 1px solid var(--fog); }
.link-table a { font: 700 1.05rem/1.3 var(--display); }
.link-table span { display: block; margin-top: 3px; font-size: .95rem; color: var(--ash); }

/* ---------- programs ---------- */
.programs { padding: 96px 0; }
.program-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.program { border-radius: 16px; padding: 40px 40px 42px; color: var(--white); display: flex; flex-direction: column; gap: 18px; }
.program-ba { background: var(--lake); }
.program-ms { background: var(--midnight); }
.program-level { font-weight: 500; color: var(--sky); }
.program-ba .program-level { color: #cfe2f5; }
.program h3 { font: 800 clamp(1.45rem, 2.2vw, 1.85rem)/1.15 var(--display); letter-spacing: -.015em; margin-top: -10px; }
.program-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px 0; border-block: 1px solid rgba(255, 255, 255, .22); }
.program-facts dt { font-size: .78rem; color: rgba(255, 255, 255, .7); }
.program-facts dd { font-size: .98rem; font-weight: 700; line-height: 1.35; margin-top: 2px; }
.program p:not(.program-level) { color: rgba(255, 255, 255, .88); }
.program .btn { align-self: flex-start; margin-top: auto; }

/* ---------- lab ---------- */
.lab { background: var(--downy); padding: 92px 0; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.lab-grid > div:first-child p { margin: 16px 0 26px; font-size: 1.1rem; color: var(--ash); max-width: 52ch; }
.lab h3 { font: 700 1.1rem/1.3 var(--display); margin-bottom: 10px; }
.plain { list-style: none; border-top: 1px solid var(--fog); }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--fog); }

/* ---------- contact ---------- */
.contact { padding: 92px 0 100px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; margin-top: 36px; }
.contact-group h3 { font: 700 1.15rem/1.3 var(--display); color: var(--lake); }
.contact-note { margin-top: 4px; color: var(--ash); font-size: .97rem; }
.contact-group:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; align-content: start; }
.contact-group:last-child h3, .contact-group:last-child .contact-note { grid-column: 1 / -1; }
.person { display: grid; gap: 2px; margin-top: 20px; padding-top: 16px; border-top: 3px solid var(--gold); }
.person-name { font: 700 1.2rem/1.3 var(--display); }
.person-title { font-size: .95rem; color: var(--ash); }
.person a { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.footer { background: var(--midnight); color: rgba(255, 255, 255, .82); padding: 40px 0; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.footer strong { color: var(--white); }
.footer a { color: var(--sky); }
.footer a:hover { color: var(--white); }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .server { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .server-live { grid-column: 1 / -1; }
  .lab-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lab-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; padding: 56px 0 64px; }
  .docs-grid, .program-pair, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-links { margin-top: 44px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  body { font-size: 1rem; }
  .masthead-inner { min-height: 0; }
  .topnav { gap: 4px 16px; }
  .board { padding: 18px 16px 4px; }
  .board-stats dd { font-size: 1.05rem; }
  .server { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 40px 0; }
  .program { padding: 28px 22px 30px; }
  .program-facts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lab-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .contact-group:last-child { grid-template-columns: minmax(0, 1fr); }
  .servers, .docs, .programs, .lab, .contact { padding-block: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
