/* ============================================================
   TTC portal — black grid, blue signal accent, white "awake" glow
   ============================================================ */

:root {
  --bg:          #04060a;
  --line:        rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  --txt:         #e8eef2;
  --txt-dim:     #9aa7b2;
  --txt-faint:   #5d6a76;

  --accent:        #2b8dff;
  --accent-bright: #85c2ff;
  --accent-glow:   rgba(43, 141, 255, 0.55);

  --amber: #ffb547;
  --lime:  #a3ff3c;
  --red:   #ff0000;

  --folder: #0b0f16;
  --field-bg: rgba(16, 16, 22, 0.88);
  --field-line: rgba(255, 255, 255, 0.08);
  --label: #8a8a96;

  --glow-white: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.3);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --label-font: 'Chakra Petch', var(--sans);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0 0 1em; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- background layers ---------- */
#grid-bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#scanlines {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(43, 141, 255, 0.07), transparent 55%),
    radial-gradient(90% 70% at 50% 120%, rgba(12, 52, 120, 0.12), transparent 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* No z-index and no backdrop-filter on anything wrapping the ENTER buttons:
   either would isolate their mix-blend-mode from the grid canvas behind the page. */
#root { position: relative; min-height: 100%; }

/* ---------- boot ---------- */
.boot { display: grid; place-items: center; min-height: 100vh; }
.boot-mark { display: flex; gap: 6px; }
.boot-mark span {
  width: 8px; height: 22px; background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 16px var(--accent-glow); animation: boot 1s ease-in-out infinite;
}
.boot-mark span:nth-child(2) { animation-delay: 0.12s; }
.boot-mark span:nth-child(3) { animation-delay: 0.24s; }
@keyframes boot { 0%, 100% { opacity: 0.25; transform: scaleY(0.55); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- primitives ---------- */
.eyebrow { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--txt-faint); }

.alert {
  padding: 10px 12px; border-radius: 8px; font-size: 13px;
  border: 1px solid rgba(255, 0, 0, 0.35); background: rgba(255, 0, 0, 0.1); color: #ffe5e5;
}

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: 10px; font-size: 13.5px; max-width: 340px;
  border: 1px solid var(--line-strong); background: rgba(10, 14, 20, 0.96);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  animation: toastin 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.toast.ok { border-color: rgba(255, 255, 255, 0.3); }
.toast.ok::before { content: '▸'; color: #fff; }
.toast.err { border-color: rgba(255, 0, 0, 0.42); }
.toast.err::before { content: '!'; color: var(--red); font-weight: 700; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* dot-matrix readout */
.pixel-logo { display: grid; gap: var(--px-gap, 2px); width: fit-content; }
.pixel-row { display: grid; grid-auto-flow: column; gap: var(--px-gap, 2px); }
.pixel { width: var(--px, 5px); height: var(--px, 5px); border-radius: 50%; background: rgba(255, 255, 255, 0.05); }
.pixel.on { background: #fff; box-shadow: 0 0 5px rgba(255, 255, 255, 0.85), 0 0 12px rgba(43, 141, 255, 0.5); }

/* shared form field look */
.field-input {
  width: 100%;
  background: var(--field-bg); color: #f2f2f5;
  border: 1px solid var(--field-line); border-radius: 8px;
  font-size: 14px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field-input::placeholder { color: #5b5b66; }
.field-input:focus { border-color: rgba(255, 255, 255, 0.4); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); background: rgba(12, 16, 26, 0.92); }

.label-caps { display: block; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--label); }

/* ---------- ENTER button: bracketed box, turns white on hover with the
   lettering knocked out so the grid shows through ---------- */
.btn-enter {
  position: relative; height: 42px; padding: 0 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 2px;
  color: #fff; cursor: pointer;
  font-family: var(--mono); font-size: 16px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase;
  /* screen: white stays white, black becomes see-through to whatever is behind */
  mix-blend-mode: screen;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-enter .corners {
  position: absolute; inset: -1px; pointer-events: none;
  --c: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(var(--c), var(--c)) top left / 7px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 2px 7px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 7px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 2px 7px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 7px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 7px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 7px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 7px no-repeat;
}
.btn-enter:hover:not(:disabled),
.btn-enter:focus-visible { background: #fff; color: #000; border-color: #fff; outline: none; }
.btn-enter:active:not(:disabled) { transform: scale(0.985); }
.btn-enter:disabled { cursor: progress; opacity: 0.7; }
.btn-enter.sm { height: 34px; padding: 0 16px; font-size: 13px; }

/* ============================================================
   sign-in
   ============================================================ */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px 28px; }
.signin-col { width: min(384px, 100%); display: flex; flex-direction: column; align-items: center; }

.holo-stage {
  position: relative; width: 100%; height: 230px; margin: 0 auto 38px;
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer; display: block;
}
.holo-stage:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.3); outline-offset: 6px; border-radius: 12px; }
.holo-stage canvas {
  position: absolute; inset: -20px -40px; width: calc(100% + 80px); height: calc(100% + 40px);
  display: block; opacity: 0; transition: opacity 0.8s ease, filter 0.25s ease;
}
.holo-stage.holo-live canvas { opacity: 1; }
.holo-stage:hover canvas { filter: brightness(1.18); }
.holo-fallback { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 0.5s ease; }
.holo-stage.holo-live .holo-fallback { opacity: 0; pointer-events: none; }

.logo-glow {
  display: block; width: 150px; aspect-ratio: 1410 / 1016;
  background: linear-gradient(180deg, #d6ebff, #5fb0ff 55%, #2b8dff);
  -webkit-mask: url('/img/ttc-logo.png') center / contain no-repeat;
          mask: url('/img/ttc-logo.png') center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(43, 141, 255, 0.75)) drop-shadow(0 0 26px rgba(43, 141, 255, 0.35));
}
.logo-glow.sm { width: 54px; filter: drop-shadow(0 0 6px rgba(43, 141, 255, 0.8)); }

.auth-body { width: min(290px, 100%); display: flex; flex-direction: column; }
.signin-title { text-align: center; font-size: 20px; letter-spacing: -0.5px; }
.sf-alert { margin-top: 16px; }

.signin-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.signin-form .btn-enter { margin-top: 6px; width: 100%; }
.sf-field { display: block; }
.sf-label { display: block; margin-bottom: 8px; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--label); }
.sf-input { position: relative; display: block; }
.sf-input svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #6c6c78; pointer-events: none; transition: color 0.15s ease;
}
.sf-input input {
  width: 100%; height: 38px; padding: 8px 12px 8px 36px;
  background: var(--field-bg); color: #f2f2f5;
  border: 1px solid var(--field-line); border-radius: 8px;
  font-size: 14px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.sf-input input::placeholder { color: #5b5b66; }
.sf-input input:focus { border-color: rgba(43, 141, 255, 0.55); box-shadow: 0 0 0 3px rgba(43, 141, 255, 0.12); background: rgba(12, 16, 26, 0.92); }
.sf-input:focus-within svg { color: var(--accent-bright); }

.sf-discord-step { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.sf-discord-step p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #9aa6b1; }
.sf-step { font-family: var(--label-font); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #6f7b88; }
.sf-discord-btn { width: 100%; gap: 10px; text-decoration: none; white-space: nowrap; font-size: 14px; letter-spacing: 0.06em; padding: 0 14px; }
.sf-discord-btn svg { width: 18px; height: 18px; }
.sf-verified {
  display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(88, 101, 242, 0.35); background: rgba(88, 101, 242, 0.08);
}
.sf-verified img, .sf-verified > svg { width: 30px; height: 30px; border-radius: 50%; flex: none; color: #aab4ff; }
.sf-verified > span:nth-child(2) { display: flex; flex-direction: column; font-size: 12px; color: #9aa6b1; min-width: 0; }
.sf-verified b { font-size: 13.5px; color: #fff; }
.sf-verified .sf-step { margin-left: auto; }
.sf-optin, .set-optin { position: relative; display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 12.5px; color: #9aa6b1; }
.sf-optin input { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: 0; opacity: 0; }
.sf-optin .tick {
  flex: none; width: 18px; height: 18px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 4px; color: transparent;
}
.sf-optin .tick svg { width: 12px; height: 12px; stroke-width: 2.6; }
.sf-optin input:checked + .tick { background: #fff; color: #000; }
.sf-optin input:focus-visible + .tick { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.sf-switch { margin: 20px 0 0; font-size: 12px; color: var(--label); text-align: center; }
.sf-switch button { background: none; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer; }
.sf-switch button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   surfaces — layered glass without backdrop-filter (keeps the ENTER
   knockout working), hairline top highlight, deep soft shadow
   ============================================================ */
.surface {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 26, 36, 0.82) 0%, rgba(9, 12, 18, 0.86) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(0, 0, 0, 0.6),
    0 40px 90px -50px rgba(0, 0, 0, 0.95);
}
.surface::before {
  content: ''; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

/* ============================================================
   student journey
   ============================================================ */
.journey, .console { max-width: 1100px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 44px) 96px; }
.journey { position: relative; }

/* profile → rail trace (sits under the avatar and progress bar, over everything else) */
.trace { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
.trace-line { fill: none; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 3px rgba(255,255,255,0.9)) drop-shadow(0 0 9px rgba(255,255,255,0.35)); }

/* profile card */
.profile-card {
  overflow: hidden; padding: 28px 30px 26px;
  background: linear-gradient(180deg, #06080c 0%, #010203 100%);
  border-color: rgba(255, 255, 255, 0.08);
}
.pixel-field {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.7) 38%, rgba(0,0,0,0.12) 78%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.7) 38%, rgba(0,0,0,0.12) 78%, transparent 100%);
  opacity: 0.9;
}
.profile-card::after {
  /* keeps the name legible over the pixels */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 90% at 12% 30%, rgba(1, 2, 3, 0.85), transparent 70%);
}
.j-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.j-profile { display: flex; align-items: center; gap: 20px; min-width: 0; }

.av {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  border-radius: 50%; background: linear-gradient(160deg, #111925, #070b11);
  border: 1px solid rgba(255, 255, 255, 0.12); color: #5f6b78;
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av svg { width: 56%; height: 56%; }
.av.xl { width: 84px; height: 84px; }
.av.lg { width: 64px; height: 64px; }
.av.md { width: 46px; height: 46px; }
.av.sm { width: 34px; height: 34px; }

.j-avatar {
  position: relative; display: grid; cursor: pointer; border-radius: 50%; padding: 3px; line-height: 0;   /* grid: no text-line gap under the photo, so the ring is even all round */
  /* ring is solid white at the bottom, where the line leaves the photo */
  background: conic-gradient(from 180deg, #fff 0deg, rgba(43,141,255,0.75) 80deg, rgba(255,255,255,0.1) 180deg, rgba(43,141,255,0.75) 280deg, #fff 360deg);
  box-shadow: 0 0 30px -10px rgba(43, 141, 255, 0.6);
}
.j-avatar .av { border-color: transparent; }
.j-avatar-edit {
  position: absolute; inset: 3px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, 0.62); color: #fff; opacity: 0; transition: opacity 0.15s ease;
}
.j-avatar-edit svg { width: 22px; height: 22px; }
.j-avatar:hover .j-avatar-edit, .j-avatar:focus-within .j-avatar-edit { opacity: 1; }

.j-id { min-width: 0; }
.j-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.j-name b { min-width: 0; }          /* long names truncate instead of pushing the icons off the card */
.j-name #sign-out { margin-left: -7px; }   /* sits right next to the gear */
.j-name b { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j-settings {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  color: var(--txt-faint); border: 1px solid transparent; background: none; padding: 0; cursor: pointer; font: inherit; transition: all 0.15s ease;
}
.j-settings svg { width: 16px; height: 16px; }
.j-settings:hover, .j-settings.on { color: #fff; border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.05); }
.j-settings.on { box-shadow: 0 0 14px -2px rgba(255, 255, 255, 0.4); }
.j-settings.on svg { transform: rotate(60deg); }
.j-settings svg { transition: transform 0.3s ease; }

/* settings open as a panel under the profile */
.settings-panel {
  margin-top: 14px; padding: 18px 28px 22px;
  background: linear-gradient(180deg, #06080c 0%, #010203 100%);
  border-color: rgba(255, 255, 255, 0.08);
  animation: panel-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.settings-head h2 { font-family: var(--label-font); font-size: 14px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #cfd6dd; }
.settings-close { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: #6f7b88; background: none; border: 0; padding: 0; cursor: pointer; }
.settings-close svg { width: 16px; height: 16px; }
.settings-close:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
@keyframes panel-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.j-tag { display: block; margin-top: 2px; font-size: 14px; color: var(--accent-bright); }
.j-joined { display: block; margin-top: 2px; font-size: 12.5px; color: #6f7b88; }

/* candles */
.candles { display: flex; align-items: flex-end; gap: 11px; height: 50px; padding: 0 4px 0; margin-bottom: 20px; }
.candle { display: flex; flex-direction: column; align-items: center; }
.candle .wick { width: 2px; height: 7px; background: currentColor; }
.candle .body { width: 10px; height: var(--h); }
.candle.lit { color: #fff; }
.candle.lit .body { background: repeating-linear-gradient(180deg, #fff 0 3px, #d9e7ff 3px 4px); }
.candle.off { color: rgba(255, 255, 255, 0.14); }
.candle.off .body { border: 1px solid currentColor; }
.candle.next {
  width: 22px; height: 22px; margin-bottom: 8px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.32);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-weight: 500; line-height: 1;
}
.candle.next i { font-style: normal; }

/* progress: solid blue, no motion */
/* the bar lines up with the name column, clear of the line coming out of the photo */
.j-progress { position: relative; z-index: 2; display: flex; align-items: center; gap: 20px; margin-top: -14px; margin-left: calc(84px + 6px + 20px); }
.juice {
  position: relative; flex: 1; height: 12px; border-radius: 999px;
  background: #0b0e13;   /* solid, so the pixels behind never show through */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.09);
}
.juice-fill {
  height: 100%; min-width: 6px; border-radius: 999px;
  background: linear-gradient(180deg, #c8ff8a 0%, #a3ff3c 50%, #76d61e 100%);
  box-shadow: 0 0 10px rgba(163, 255, 60, 0.7), 0 0 24px rgba(163, 255, 60, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* the pixel percentage sits in its own little LED tab, off the busy background */
.j-pct {
  flex: none; padding: 7px 10px;
  background: linear-gradient(180deg, #0a0d12, #040508);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* homework due: the same little screen tab as the status labels */
.due-tile {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 4px 10px 4px 5px;
  font-family: var(--label-font); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; line-height: 18px;
  color: #6f7b88; text-decoration: none;
  background: linear-gradient(180deg, #0a0d12, #040508);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 5px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-shadow: 0 0 8px currentColor;
}
.due-tile::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px);
}
.due-ico { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 3px; color: currentColor; border: 1px solid rgba(255, 255, 255, 0.1); }
.due-ico svg { width: 12px; height: 12px; }
.due-num { font-size: 14px; color: #cfd6dd; }
.due-sub { color: #5f6b78; }
.due-tile.hot { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.due-tile.hot .due-ico { color: #000; background: #fff; border-color: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.55); }
.due-tile.hot .due-num { color: #fff; }
.due-tile.hot .due-sub { color: #9aa6b1; }
.due-tile.hot:hover { border-color: rgba(255, 255, 255, 0.6); }

/* folder tabs */
.ftabs { display: flex; align-items: flex-end; margin-top: 30px; padding-left: 10px; }
.ftab {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 20px; margin-right: 6px;
  font-family: var(--label-font); font-size: 13px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: #6f7b88; text-decoration: none;
  background: linear-gradient(180deg, rgba(16, 20, 28, 0.92), rgba(10, 13, 19, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.06); border-bottom: 0; border-radius: 10px 10px 0 0;
}
.ftab > * { position: relative; z-index: 1; }
.ftab a { color: inherit; text-decoration: none; }
.ftab.on { color: #fff; background: var(--folder); border-color: rgba(255, 255, 255, 0.12); margin-bottom: -1px; height: 41px; z-index: 2; }
.ftab.on::before {
  content: ''; position: absolute; left: 10px; right: 10px; top: -1px; height: 1px; z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
}
.ftab:not(.on):hover { color: #c9d1d9; }
.ftab-x {
  width: 20px; height: 20px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 4px; background: none; color: inherit; opacity: 0.6;
}
.ftab-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); color: #fff; }
.ftab-x svg { width: 11px; height: 11px; }

.ftabs-right { margin-left: auto; display: flex; align-items: center; gap: 18px; padding: 0 4px 12px; }
.ftabs-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 0;
  background: none; border: 0; color: #6f7b88; font-size: 12.5px; cursor: pointer; text-decoration: none;
}
.ftabs-link svg { width: 15px; height: 15px; }
.c-head .ftabs-link { white-space: nowrap; flex: none; }
.ftabs-link:hover { color: #fff; }

.fbody {
  position: relative; padding: 38px 36px 48px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0 18px 18px 18px;
  background: linear-gradient(180deg, var(--folder) 0, rgba(8, 11, 16, 0.86) 480px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 40px 90px -50px rgba(0, 0, 0, 0.95);
}

/* checkpoint rail */
.rail { display: flex; flex-direction: column; }
.cpx { --rail-w: 56px; --node-top: 60px; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.cpx-rail { position: relative; }
.cpx-rail::before, .cpx-rail::after {
  content: ''; position: absolute; left: 50%; width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, 0.07);
}
.cpx-rail::before { top: 0; height: calc(var(--node-top) + 13px); }
.cpx-rail::after { top: calc(var(--node-top) + 13px); bottom: 0; }
.cpx.lit .cpx-rail::before,
.cpx.next-lit .cpx-rail::after { background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.7); }
.cpx.last .cpx-rail::after { background: linear-gradient(180deg, rgba(255,255,255,0.07), transparent); box-shadow: none; }

.cpx-node {
  position: absolute; top: var(--node-top); left: 50%; margin-left: -13px; z-index: 1;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.13); background: var(--folder);
  font-size: 11px; font-weight: 700; color: #5f6b78;
}
.cpx-node svg { width: 13px; height: 13px; stroke-width: 2.6; }
.cpx-node::after {
  content: ''; position: absolute; top: 50%; left: 100%; height: 2px; margin-top: -1px;
  width: calc(var(--rail-w) / 2 - 11px); background: rgba(255, 255, 255, 0.07);
}
.cpx.lit .cpx-node { border-color: #fff; color: #fff; box-shadow: var(--glow-white); }
.cpx.lit .cpx-node::after { background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.7); }
.cpx.s-done .cpx-node { background: #fff; color: #05070b; }
.cpx.current .cpx-node { animation: node-pulse 2.6s ease-in-out infinite; }
@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,255,255,0.05), 0 0 16px rgba(255,255,255,0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(255,255,255,0.08), 0 0 30px rgba(255,255,255,0.7); }
}

.cpx-main { padding-bottom: 52px; min-width: 0; }
.cpx.last .cpx-main { padding-bottom: 4px; }
.cpx-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-height: 28px; margin-bottom: 16px; }
.cpx-label b { font-family: var(--label-font); font-size: 13px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #5f6b78; white-space: nowrap; }
.cpx.lit .cpx-label b { color: #fff; }
.cpx-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.cpx-label .hidden-title {
  display: inline-block; width: 140px; height: 10px; overflow: hidden; color: transparent;
  border-radius: 2px; background: rgba(255, 255, 255, 0.07);
}

/* status labels: a small screen tab, text typed out with a block cursor */
.chip {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 2px 6px 2px 7px;
  font-family: var(--label-font); font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; line-height: 16px;
  color: #6f7b88; white-space: nowrap;
  background: linear-gradient(180deg, #0a0d12, #040508);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-shadow: 0 0 8px currentColor;
}
.chip::after {
  /* faint scanlines over the little screen */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px);
}
.chip-text { position: relative; display: inline-block; }
.chip-ghost { visibility: hidden; }
.chip-typed { position: absolute; left: 0; top: 0; }
.chip:not(.typing):not(.typed) .chip-typed { visibility: hidden; }   /* blank until it scrolls into view and types out */
.chip-cursor { width: 5px; height: 5px; background: currentColor; box-shadow: 0 0 6px currentColor; opacity: 0; }
.chip.typing .chip-cursor { opacity: 1; animation: cursor-blink 0.45s steps(1) infinite; }
.chip.typed .chip-cursor { opacity: 1; }
.chip.due.typed .chip-cursor { animation: cursor-blink 1s steps(1) 1; }   /* one blink, then it stays lit */
.chip.locked .chip-cursor { box-shadow: none; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.chip.due { color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.chip.review { color: var(--amber); border-color: rgba(255, 181, 71, 0.22); }
.chip.revise { color: var(--red); border-color: rgba(255, 0, 0, 0.3); }
.chip.done { color: var(--accent-bright); border-color: rgba(43, 141, 255, 0.25); }
.chip.locked { color: #4d5763; text-shadow: none; }

.cpx-row { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 34px; align-items: start; }

.vid {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); background: #05070b;
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9);
}
.vid iframe, .vid video { width: 100%; height: 100%; border: 0; display: block; }
.cpx.lit .vid { border-color: rgba(255, 255, 255, 0.22); }
.cpx.current .vid { border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 0 50px -16px rgba(255, 255, 255, 0.55); }
.vid-fs {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; cursor: pointer;
  font-family: var(--label-font); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: #fff; background: rgba(4, 6, 10, 0.72); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 6px;
  opacity: 0.85; transition: opacity 0.15s ease, background 0.15s ease;
}
.vid-fs svg { width: 14px; height: 14px; }
.vid-fs:hover, .vid-fs:focus-visible { opacity: 1; background: #fff; color: #000; outline: none; }
/* separate rules: a browser that doesn't know one of these selectors would drop a combined rule */
.vid:fullscreen { border: 0; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; background: #000; }
.vid:-webkit-full-screen { border: 0; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; background: #000; }
.vid:fullscreen .vid-fs { display: none; }
.vid:-webkit-full-screen .vid-fs { display: none; }
.vid-placeholder {
  display: grid; place-items: center; align-content: center; gap: 14px; color: #8d98a3; font-size: 13px;
  background:
    radial-gradient(60% 80% at 50% 50%, rgba(43, 141, 255, 0.12), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 4px),
    #05070b;
}
.vid-play {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55); color: #fff; background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 28px -4px rgba(255, 255, 255, 0.5);
}
.vid-play svg { width: 24px; height: 24px; margin-left: 3px; }
.vid-locked {
  display: grid; place-items: center; align-content: center; gap: 12px; padding: 20px; text-align: center;
  color: #56616d; font-size: 12.5px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.045) 1px, transparent 1.6px) 0 0 / 7px 7px, #05070b;
}
.vid-lock { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.1); }
.vid-lock svg { width: 20px; height: 20px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 6px 0 0; display: flex; flex-direction: column; gap: 24px; }
.step { position: relative; display: flex; align-items: center; gap: 13px; font-size: 13.5px; line-height: 1.35; color: #5f6b78; }
.step + .step::before {
  content: ''; position: absolute; left: 18px; top: -24px; height: 24px; width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, 0.07);
}
.step.done + .step::before { background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 6px rgba(255, 255, 255, 0.5); }
.step-ico {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.step-ico svg { width: 18px; height: 18px; }
.step.off { opacity: 0.55; }
.step.done { color: #9aa6b1; }
.step.done .step-ico { color: #fff; border-color: rgba(255, 255, 255, 0.32); }
.step.active { color: #fff; }
.step.active .step-ico { color: #fff; border-color: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, 0.55), inset 0 0 10px rgba(255, 255, 255, 0.12); }
.step.spin .step-ico svg { animation: spin 2.4s linear infinite; }
.step.complete { color: var(--lime); }
.step.complete .step-ico { color: var(--lime); border-color: var(--lime); box-shadow: 0 0 14px rgba(163, 255, 60, 0.45), inset 0 0 10px rgba(163, 255, 60, 0.12); }
.step.complete .step-ico svg { stroke-width: 2; }
.step.warn { color: #ff0000; }
.step.warn .step-ico { color: var(--red); border-color: rgba(255, 0, 0, 0.6); }
@keyframes spin { to { transform: rotate(360deg); } }

.step-btn {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 0;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.step-btn span:last-child { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 4px; }
.step-btn:hover .step-ico, .step-btn:focus-visible .step-ico { background: #fff; color: #000; }
.step-btn:hover span:last-child { text-decoration-color: #fff; }
.step-btn:focus-visible { outline: none; }

.cpx-note {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px; white-space: pre-wrap;
  border: 1px solid rgba(255, 0, 0, 0.3); background: rgba(255, 0, 0, 0.06);
  font-size: 13.5px; color: #ffe5e5;
}
.cpx-note span { display: block; margin-bottom: 4px; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }

/* homework folder */
.hw { max-width: 580px; }
.hw-top h2 { font-size: 24px; letter-spacing: -0.03em; margin: 10px 0 14px; }
.hw-brief { margin: 0; padding-left: 14px; border-left: 2px solid rgba(255, 255, 255, 0.5); color: #9aa6b1; font-size: 14px; line-height: 1.65; }
.hw-form { margin-top: 28px; display: flex; flex-direction: column; gap: 22px; }
.hw-field .label-caps, .set-field .label-caps { margin-bottom: 8px; }
textarea.field-input { display: block; resize: vertical; padding: 11px 13px; line-height: 1.55; }
input.field-input { height: 40px; padding: 0 13px; }
.field-input[readonly] { color: #8d98a3; background: rgba(12, 14, 19, 0.7); cursor: default; }
.field-input[readonly]:focus { border-color: var(--field-line); box-shadow: none; }
.hw-hint, .set-hint { display: block; margin-top: 7px; font-size: 12px; color: #5f6b78; }
.hw-attest { position: relative; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 13px; line-height: 1.5; color: #9aa6b1; }
.hw-attest input { position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin: 0; opacity: 0; }
.hw-attest .tick {
  flex: none; width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 4px; color: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.hw-attest .tick svg { width: 14px; height: 14px; stroke-width: 2.6; }
.hw-attest input:checked + .tick { background: #fff; color: #000; box-shadow: 0 0 12px rgba(255, 255, 255, 0.5); }
.hw-attest input:focus-visible + .tick { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.hw-form .btn-enter { align-self: flex-start; margin-top: 4px; }
.hw-status { margin-top: 20px; color: #9aa6b1; }

/* settings (compact, scrolls inside the panel so HOME stays in view underneath) */
.settings {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px 32px; align-items: start;
  max-height: min(420px, 40vh); overflow-y: auto; padding-right: 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.settings::-webkit-scrollbar { width: 6px; }
.settings::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 6px; }
.set-side { display: flex; flex-direction: column; gap: 22px; }
.set-card h3 { margin-bottom: 14px; font-size: 14px; letter-spacing: -0.01em; }
.set-side .set-card + .set-card { padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.set-photo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.set-form { display: flex; flex-direction: column; gap: 14px; }
.set-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.set-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; background: rgba(255, 255, 255, 0.02);
}
.set-discord { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; color: #aab4ff; background: rgba(88, 101, 242, 0.14); border: 1px solid rgba(88, 101, 242, 0.35); }
.set-discord svg { width: 18px; height: 18px; }
.set-row-text { flex: 1; min-width: 0; }
.set-row-text b { display: block; font-size: 14px; }
.set-row-text span { display: block; font-size: 12px; color: #6f7b88; }
.btn-quiet {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; background: rgba(255, 255, 255, 0.03);
  color: #dfe5eb; font-size: 12.5px; font-weight: 500; transition: all 0.15s ease;
}
.btn-quiet:hover { background: #fff; color: #000; border-color: #fff; }
.btn-quiet svg { width: 15px; height: 15px; margin-right: 8px; }
.btn-quiet.danger { color: #ff0000; border-color: rgba(255, 0, 0, 0.3); }
.btn-quiet.danger:hover { background: rgba(255, 0, 0, 0.14); color: #ffe5e5; border-color: rgba(255, 0, 0, 0.5); }
a.btn-enter { text-decoration: none; }

/* ============================================================
   teacher console
   ============================================================ */
.c-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; padding: 20px 24px;
  background: linear-gradient(180deg, #06080c 0%, #010203 100%);
}
.c-brand { display: flex; align-items: center; gap: 16px; }
.c-brand b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.c-brand span { font-size: 12.5px; color: #6f7b88; }
.c-warn { color: var(--amber); }

.c-sec { margin-bottom: 44px; }
.c-sec h2 { display: flex; align-items: center; gap: 10px; margin: 0 2px 14px; font-family: var(--label-font); font-size: 14px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #cfd6dd; }
.c-sec h2 span { padding: 1px 8px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; font-size: 11px; letter-spacing: 0; color: #e8eef2; }

.c-list { overflow: hidden; border-radius: 16px; background: linear-gradient(180deg, #06080c 0%, #010203 100%); }
.c-row {
  display: grid; grid-template-columns: 34px minmax(130px, 1.1fr) minmax(170px, 1.3fr) minmax(220px, 1.4fr) 92px;
  gap: 16px; align-items: center; padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}
.c-row:last-child { border-bottom: 0; }
.c-row:hover { background: rgba(255, 255, 255, 0.02); }
.c-who { min-width: 0; }
.c-who b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-who span { display: block; font-size: 12px; color: var(--accent-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-contact { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #8d98a3; }
.c-contact > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-phones { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.c-phones a { display: inline-flex; align-items: center; gap: 5px; color: #9aa6b1; text-decoration: none; white-space: nowrap; }
.c-phones a:hover { color: #fff; }
.c-phones svg { width: 13px; height: 13px; flex: none; }
.c-phones a[href^="https://wa.me"] { color: #5fdc7f; }
.c-muted { font-size: 12px; color: #4d5763; }
.c-who .c-phones { margin-top: 3px; }
.c-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.c-view {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 6px; text-decoration: none;
  font-family: var(--label-font); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: #cfd6dd; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.c-view svg { width: 14px; height: 14px; }
.c-view:hover { color: #000; background: #fff; border-color: #fff; }
.c-card-meta .c-view { margin-top: 8px; }

/* history */
.c-history { display: flex; flex-direction: column; gap: 8px; }
.c-hrow { border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; background: rgba(255, 255, 255, 0.015); }
.c-hrow[open] { border-color: rgba(255, 255, 255, 0.14); }
.c-hrow summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 70px; gap: 14px; align-items: center; padding: 11px 16px;
}
.c-hrow summary::-webkit-details-marker { display: none; }
.c-hrow .chip { margin-left: 0; }
.c-hbody { padding: 4px 16px 16px 64px; }
.c-hmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #6f7b88; }

.c-actions-row { display: inline-flex; gap: 6px; }
.c-icon { padding: 0; width: 26px; justify-content: center; }

/* one-time password dialog */
.dialog-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(1, 2, 4, 0.9); }
.dialog { width: min(420px, 100%); padding: 20px 22px 22px; background: linear-gradient(180deg, #06080c, #010203); animation: panel-in 0.2s ease; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dialog-head h2 { font-family: var(--label-font); font-size: 15px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.dialog-sub { margin: 0 0 14px; font-size: 13.5px; color: #9aa6b1; }
.dialog-sub b { color: #fff; }
.dialog-pass {
  padding: 14px; text-align: center; border-radius: 10px; user-select: all;
  font-family: var(--mono); font-size: clamp(15px, 5.2vw, 22px); letter-spacing: 0.06em; white-space: nowrap; color: #fff;
  background: #000; border: 1px solid rgba(255, 255, 255, 0.16);
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dialog-actions .btn-quiet { gap: 7px; text-decoration: none; }
.dialog-actions svg { width: 15px; height: 15px; margin: 0; }
.dialog-actions .wa { color: #5fdc7f; border-color: rgba(95, 220, 127, 0.35); }
.dialog-note { margin: 14px 0 0; font-size: 12px; color: #6f7b88; }

.notice-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 11px 16px; text-decoration: none;
  font-size: 13.5px; color: #cfd6dd; background: linear-gradient(180deg, #06080c, #010203); border-color: rgba(255, 181, 71, 0.4);
}
.notice-bar svg { width: 16px; height: 16px; color: var(--amber); flex: none; }
.notice-bar b { color: #fff; }
.mirror-reset { gap: 7px; }
.mirror-reset svg { width: 14px; height: 14px; margin: 0; }
.sf-hint { margin: 14px 0 0; text-align: center; font-size: 12px; color: #6f7b88; }
.sf-link { background: none; border: 0; padding: 0; color: #9aa6b1; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.sf-link:hover { color: #fff; }
.sf-hint a { color: #9aa6b1; text-decoration: underline; text-underline-offset: 2px; }
.sf-hint a:hover { color: #fff; }

/* mirror: teacher viewing a student's dashboard */
.mirror-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; padding: 12px 16px;
  background: linear-gradient(180deg, #06080c, #010203); border-color: rgba(255, 181, 71, 0.35);
}
.mirror-eye { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--amber); border: 1px solid rgba(255, 181, 71, 0.4); }
.mirror-eye svg { width: 16px; height: 16px; }
.mirror-text { font-size: 13.5px; color: #cfd6dd; }
.mirror-text b { color: #fff; }
.mirror-contact { display: flex; gap: 14px; font-size: 12.5px; }
.mirror-contact a { display: inline-flex; align-items: center; gap: 6px; color: #9aa6b1; text-decoration: none; }
.mirror-contact a:hover { color: #fff; }
.mirror-contact a[href^="https://wa.me"] { color: #5fdc7f; }
.mirror-contact svg { width: 14px; height: 14px; }
.mirror-bar .btn-quiet { margin-left: auto; text-decoration: none; }
.c-stage { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #cfd6dd; }
.pips { display: flex; gap: 4px; }
.pips i { width: 9px; height: 9px; border: 1px solid rgba(255, 255, 255, 0.16); }
.pips i.on { background: #fff; border-color: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.7); }
.pips i.now { border-color: #fff; }
.pips i.now.review { background: var(--amber); border-color: var(--amber); }
.pips i.now.revise { background: var(--red); border-color: var(--red); }
.c-stage.t-review span:last-child { color: var(--amber); }
.c-stage.t-revise span:last-child { color: #ff0000; }
.c-stage.t-done span:last-child { color: #fff; }
.c-joined { font-size: 12px; color: #5f6b78; text-align: right; }

.c-card { margin-bottom: 14px; padding: 20px 22px; border-radius: 16px; background: linear-gradient(180deg, #06080c 0%, #010203 100%); }
.c-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.c-card-meta { margin-left: auto; text-align: right; }
.c-card-meta b { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.c-card-meta span { font-size: 12px; color: #6f7b88; }
.c-field { margin-bottom: 14px; }
.c-label { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--label); }
.c-link { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; color: var(--accent-bright); text-decoration: none; word-break: break-all; }
.c-link svg { flex: none; width: 14px; height: 14px; }
a.c-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.c-notes { margin: 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: #9aa6b1; }
.c-attest { display: flex; align-items: center; gap: 7px; margin: 2px 0 18px; font-size: 12px; color: #6f7b88; }
.c-attest svg { width: 14px; height: 14px; color: #fff; stroke-width: 2.4; }
.c-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.c-input {
  flex: 1; min-width: 220px; height: 34px; padding: 0 12px;
  background: var(--field-bg); color: #f2f2f5; border: 1px solid var(--field-line); border-radius: 8px;
  font-size: 13px; outline: none;
}
.c-input:focus { border-color: rgba(255, 255, 255, 0.4); }
.c-back {
  height: 34px; padding: 0 14px; border-radius: 2px; cursor: pointer;
  background: none; border: 1px solid rgba(255, 0, 0, 0.45); color: #ff0000;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.c-back:hover:not(:disabled) { background: rgba(255, 0, 0, 0.12); }
/* console: folder body, filters, discord list */
.c-head + .ftabs { margin-top: 0; }
.c-body { padding: 26px 26px 30px; }
.c-body .c-list, .c-body .c-card, .c-body .c-empty { background: rgba(255, 255, 255, 0.015); border: 1px solid rgba(255, 255, 255, 0.07); box-shadow: none; }
.ftab-count {
  min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 4px;
  font-size: 11px; letter-spacing: 0; color: #9aa6b1; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
}
.ftab-count.hot { color: #000; background: #fff; border-color: #fff; }

.c-filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.c-filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.c-filter {
  position: relative; overflow: hidden; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px;
  font-family: var(--label-font); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: #7d8894; background: linear-gradient(180deg, #0a0d12, #040508);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 5px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.c-filter span { font-size: 11px; color: #4d5763; }
.c-filter:hover { color: #cfd6dd; border-color: rgba(255, 255, 255, 0.22); }
.c-filter.on { color: #fff; border-color: rgba(255, 255, 255, 0.55); text-shadow: 0 0 8px rgba(255, 255, 255, 0.5); }
.c-filter.on span { color: #9aa6b1; }
.c-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.c-select { display: inline-flex; align-items: center; gap: 10px; }
.c-select .label-caps { margin: 0; }
.c-select select {
  height: 30px; padding: 0 30px 0 10px; appearance: none; cursor: pointer;
  background: var(--field-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%239aa6b1' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #e8eef2; border: 1px solid var(--field-line); border-radius: 6px; font-size: 13px; outline: none;
}
.c-select select:focus { border-color: rgba(255, 255, 255, 0.4); }
.c-showing { font-size: 12px; color: #6f7b88; }
.c-clear { background: none; border: 0; padding: 0; color: #9aa6b1; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.c-clear:hover { color: #fff; }

.c-discord-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 12.5px; color: #9aa6b1; }
.c-drow {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.c-drow:last-child { border-bottom: 0; }
.c-dname { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-tag {
  cursor: copy; padding: 3px 8px; border-radius: 5px;
  font-family: var(--mono); font-size: 13px; color: #aab4ff;
  background: rgba(88, 101, 242, 0.1); border: 1px solid rgba(88, 101, 242, 0.3);
}
.c-tag:hover { color: #fff; border-color: rgba(88, 101, 242, 0.7); }
.c-linked { font-family: var(--label-font); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #4d5763; }
.c-linked.on { color: var(--lime); }

.c-empty { padding: 28px; border-radius: 16px; text-align: center; font-size: 13.5px; color: #6f7b88; background: linear-gradient(180deg, #06080c 0%, #010203 100%); }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 900px) {
  .cpx-row { grid-template-columns: 1fr; gap: 22px; }
  .settings { grid-template-columns: 1fr; }
  .c-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .c-contact { grid-column: 2 / -1; grid-row: 2; }
  .c-stage { grid-column: 2 / -1; grid-row: 3; }
  .c-end { grid-column: 3; grid-row: 1; }
  .c-hrow summary { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .c-hrow summary .c-joined { display: none; }
  .c-hbody { padding-left: 16px; }
}
@media (max-width: 640px) {
  .j-top { flex-direction: column; align-items: flex-start; }
  .j-profile { gap: 14px; max-width: 100%; }
  .j-name b { font-size: 20px; }
  .j-settings { width: 26px; height: 26px; }
  .set-two { grid-template-columns: 1fr; }
  .j-progress { gap: 12px; margin-top: 4px; }
  .j-pct .pixel-logo { --px: 2.5px !important; --px-gap: 1px !important; }
  .candles { align-self: flex-end; margin-top: -40px; }
  .profile-card { padding: 20px; }
  .chip { margin-left: 0; }
  .fbody { padding: 24px 14px 30px; }
  .cpx { --rail-w: 38px; }
  .ftab { padding: 0 12px; margin-right: 4px; font-size: 11px; letter-spacing: 0.1em; }
  .ftabs-right { gap: 12px; }
  .ftabs-link span { display: none; }
  .ftabs-link svg { width: 18px; height: 18px; }
  .c-card-head { flex-wrap: wrap; }
  .c-card-meta { margin-left: 46px; text-align: left; }
  .c-body { padding: 18px 12px 22px; }
  .c-drow { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .c-linked { grid-column: 2 / -1; }
  .ftab-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cpx.current .cpx-node, .settings-panel, .toast { animation: none; }
}

/* ---- first step: join the Discord before Checkpoint 1 ---- */
.cpx.s-gate .cpx-node { color: #cfe4ff; }
.cpx.s-gate .cpx-node svg { width: 17px; height: 17px; }
.gate-text { margin: 2px 0 0; max-width: 62ch; color: #9aa6b1; font-size: 14px; line-height: 1.6; }
.gate-muted { color: #6f7b88; font-style: normal; }
.gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
