/* SpecForge Arena: light contest theme modelled on the HackerRank Orchestrate leaderboard.
   Pale backdrop, frosted white cards, one quiet table, serif title, Satoshi text. */
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Open+Sans:wght@400;500;600;700&display=swap");

:root {
  --ink: #121418;        /* main text */
  --ink-2: #35363f;      /* secondary text */
  --muted: #63646f;      /* labels, handles, section numbers */
  --faint: #9a9ba6;
  --line: #e3e4ec;       /* hairlines */
  --head: #ebebf3;       /* table header row */
  --glass: rgba(255, 255, 255, 0.74);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --solid: #ffffff;
  --live: #22c55e;       /* live dot */
  --go: #1ba94c;         /* primary buttons */
  --go-dark: #148f3e;
  --tick: #f07a2f;       /* countdown colons */
  --bad: #d0312d;
  --good: #148f3e;
  --s-matrix: #3b6fd4;
  --s-defects: #8b5cd6;
  --s-course: #1ba94c;
  --s-cos: #d99a00;
  --s-hours_assessment: #e5603b;
  --s-template: #5f87b0;
  --s-units: #7fae2e;
  --s-summary: #a39a86;
  --text: "Satoshi", "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background-color: #dfe3f3;
}
/* the painted campus backdrop sits in a fixed layer behind everything (works on phones too) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(180deg, rgba(246, 247, 252, 0.10) 0%, rgba(246, 247, 252, 0.18) 55%, rgba(246, 247, 252, 0.45) 100%), url("/assets/backdrop.webp");
  background-size: cover; background-position: center 70%;
}
@media (max-width: 760px) {
  body::before { background-image: linear-gradient(180deg, rgba(246, 247, 252, 0.15), rgba(246, 247, 252, 0.40)), url("/assets/backdrop-sm.webp"); background-position: 62% center; }
}
:focus-visible { outline: 3px solid rgba(59, 111, 212, 0.45); outline-offset: 2px; border-radius: 6px; }
a { color: #2f5fc4; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* page frame shared by every page */
.topline { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 22px 16px 0; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.topline .mark { width: 9px; height: 15px; background: var(--go); display: inline-block; margin-left: 2px; }
.topline .sep { width: 1px; height: 20px; background: rgba(18, 20, 24, 0.25); }
.topline em { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: 0; }
.topline .links { position: absolute; right: 22px; display: flex; gap: 18px; font-weight: 500; font-size: 14px; }
.topline .links a { color: var(--ink-2); text-decoration: none; }
.topline .links a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) { .topline .links { position: static; } .topline { flex-wrap: wrap; } }
.title { text-align: center; margin: 10px 0 8px; font: 400 clamp(44px, 7vw, 72px)/1.05 var(--serif); letter-spacing: -0.01em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 99px; background: #15171c; color: #8ff0b0; font-size: 13px; font-weight: 600; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2.2s infinite; }
.pill.final { color: #ffd59e; } .pill.final i { background: var(--tick); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.center { text-align: center; }

.glass { background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(1.2); backdrop-filter: blur(28px) saturate(1.2); border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 1px 2px rgba(18, 20, 24, .04), 0 12px 40px rgba(40, 50, 90, .08); }

/* stacked score bar (used on the submit page result) */
.dim { position: relative; height: 10px; background: var(--head); border-radius: 99px; overflow: hidden; display: flex; }
.dim i { display: block; height: 100%; min-width: 0; transition: width 0.7s cubic-bezier(.2,.8,.2,1); }
.dim i[data-s="matrix"] { background: var(--s-matrix); }
.dim i[data-s="defects"] { background: var(--s-defects); }
.dim i[data-s="course"] { background: var(--s-course); }
.dim i[data-s="cos"] { background: var(--s-cos); }
.dim i[data-s="hours_assessment"] { background: var(--s-hours_assessment); }
.dim i[data-s="template"] { background: var(--s-template); }
.dim i[data-s="units"] { background: var(--s-units); }
.dim i[data-s="summary"] { background: var(--s-summary); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }

/* initials avatar */
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
