/* ── Commit Mono (self-hosted, MIT) ─────────────────────
   Variable font: weight axis covers 100–900 in one file. */
@font-face {
  font-family: 'Commit Mono';
  src: url('/fonts/CommitMono-VF.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════════════════════════
   SKILL ISSUE — wine/cream IDE theme
   ═══════════════════════════════════════════════════════ */

/* ── Design tokens ───────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:        #2b1820;
  --bg-2:      #361d27;
  --bg-3:      #421e2e;
  --bg-4:      #4e2235;
  --bg-5:      #5a2a3e;
  --bg-bar:    #1f1018;
  --bg-status: #16090e;

  /* Borders */
  --line:     #5a2840;
  --line-sub: #3e1c2c;

  /* Text */
  --t1: #f4e9dd;
  --t2: #c4a090;
  --t3: #bc9484;   /* a11y: bumped from #8a6558 — 5.4:1 on --bg, 5.0:1 on --bg-2 */
  --t4: #5a3c38;   /* decorative only — always paired with aria-hidden */

  /* Gold accent */
  --gold:    #d4a056;
  --gold-hi: #e4b870;
  --gold-lo: #7a5c28;

  /* Status — a11y: brightened to meet 4.5:1 on their respective dark backgrounds */
  --green:    #68bb66;   /* was #5daa5a — 4.7:1 on --green-bg */
  --green-bg: #1c381c;
  --red:      #f07878;   /* was #e05555 — 4.7:1 on --red-bg */
  --red-bg:   #5a1818;

  /* Typography */
  --mono: 'Commit Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  --ui:   system-ui, -apple-system, sans-serif;

  /* IDE chrome sizes */
  --sidebar-w:   230px;
  --tabbar-h:    35px;
  --statusbar-h: 22px;

  /* Legacy aliases */
  --text-1: var(--t1);
  --text-2: var(--t2);
  --text-3: var(--t3);
  --accent:  var(--gold);

  /* ── Override Bootstrap to prevent white leaking through ── */
  --bs-body-bg:               #2b1820;
  --bs-body-color:            #f4e9dd;
  --bs-body-bg-rgb:           43,24,32;
  --bs-body-color-rgb:        244,233,221;
  --bs-secondary-bg:          #361d27;
  --bs-secondary-color:       #c4a090;
  --bs-tertiary-bg:           #421e2e;
  --bs-emphasis-color:        #f4e9dd;
  --bs-border-color:          #5a2840;
  --bs-border-color-translucent: rgba(90,40,64,.5);
  --bs-link-color:            #d4a056;
  --bs-link-hover-color:      #e4b870;
  --bs-link-color-rgb:        212,160,86;
  --bs-link-hover-color-rgb:  228,184,112;
  --bs-card-bg:               #421e2e;
  --bs-card-border-color:     #5a2840;
  --bs-card-color:            #f4e9dd;
  --bs-card-cap-bg:           rgba(94,40,64,.12);
  --bs-list-group-bg:         #421e2e;
  --bs-list-group-color:      #f4e9dd;
  --bs-list-group-border-color: #5a2840;
  --bs-list-group-action-hover-bg: #4e2235;
  --bs-list-group-active-bg:  #d4a056;
  --bs-input-bg:              #421e2e;
  --bs-input-color:           #f4e9dd;
  --bs-input-border-color:    #5a2840;
  --bs-form-control-bg:       #421e2e;
  --bs-form-control-color:    #f4e9dd;
  --bs-badge-color:           #f4e9dd;
  --bs-code-color:            #d4a056;
  --bs-pre-color:             #c4a090;
  --bs-nav-link-color:        #c4a090;
  --bs-nav-link-hover-color:  #d4a056;
  --bs-navbar-bg:             #1f1018;
  --bs-progress-bg:           #421e2e;
  --bs-alert-bg:              transparent;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%; width: 100%;
  background: var(--bg) !important;
  color: var(--t1) !important;
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

a         { color: var(--gold); text-decoration: none; }
a:hover   { color: var(--gold-hi); }
code, pre { font-family: var(--mono); }
h1,h2,h3,h4,h5,h6 { color: var(--t1); font-weight: 600; margin-top: 0; }

/* ═══════════════════════════════════════════════════════
   IDE CHROME — fixed positioning so it always renders
   regardless of Blazor's SSR component wrappers
   ═══════════════════════════════════════════════════════ */

/* ── Sidebar ─────────────────────────────────────────── */
.ide-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  bottom: var(--statusbar-h);
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.sidebar-logo {
  padding: 14px 16px 11px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.logo-name {
  display: block;
  font-family: var(--mono);
  font-size: 15px; font-weight: 700;
  color: var(--gold); letter-spacing: -.3px;
}

.logo-ver {
  display: block;
  font-family: var(--mono);
  font-size: 10px; color: var(--t4); margin-top: 2px;
}

.sidebar-section {
  padding: 9px 14px 3px;
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--t3); flex-shrink: 0;
}

/* File tree */
.sidebar-tree {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 4px 0 8px;
}

.sidebar-folder-btn {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 5px 10px;
  background: none; border: none;
  color: var(--t2); font-size: 12px; font-family: var(--mono);
  cursor: pointer; text-align: left;
  transition: background .1s, color .1s; line-height: 1.3;
}

.sidebar-folder-btn:hover { background: var(--bg-4); color: var(--t1); }

.folder-arrow {
  font-size: 12px; color: var(--t4); width: 12px; flex-shrink: 0;
  transition: transform .15s; display: inline-block;
}

.folder-arrow.open { transform: rotate(90deg); color: var(--t3); }

.folder-repo-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 700; font-size: 11px; color: var(--gold);
}

.sidebar-folder-btn:hover .folder-repo-name { color: var(--gold-hi); }

.sidebar-files { }

.sidebar-file {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 22px;
  font-family: var(--mono); font-size: 11px; color: var(--t2);
  text-decoration: none; cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .1s, color .1s; line-height: 1.35;
}

.sidebar-file:hover { background: var(--bg-4); color: var(--t1); }

.sidebar-file.active {
  background: var(--bg-5); color: var(--t1); border-left-color: var(--gold);
}

/* Sidebar uses DifficultyDots component — dots render inline */

.file-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sidebar nav links + footer */
.sidebar-bottom {
  border-top: 1px solid var(--line);
  padding: 4px 0; flex-shrink: 0;
}

.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 14px; font-size: 12px; color: var(--t2);
  text-decoration: none; border-left: 2px solid transparent;
  transition: background .1s, color .1s;
  background: none; border-top: none; border-right: none; border-bottom: none;
  width: 100%; text-align: left; cursor: pointer;
}

.sidebar-link:hover { background: var(--bg-4); color: var(--t1); }
.sidebar-link.active { background: var(--bg-5); color: var(--t1); border-left-color: var(--gold); }

.sidebar-icon { font-style: normal; width: 14px; text-align: center; flex-shrink: 0; color: var(--t4); }
.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon { color: var(--gold); }

.sidebar-user {
  display: flex; align-items: center; gap: 8px; padding: 5px 14px 2px;
}

.sidebar-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line); flex-shrink: 0;
}

.sidebar-username { font-size: 11px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Tab bar ─────────────────────────────────────────── */
.ide-tabbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--tabbar-h);
  background: var(--bg-bar);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  z-index: 10;
}

.ide-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 0 16px;
  font-family: var(--mono); font-size: 12px; color: var(--t3);
  border-right: 1px solid var(--line);
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  text-decoration: none; white-space: nowrap;
  transition: background .1s, color .1s;
  cursor: pointer; background: none; flex-shrink: 0;
}

.ide-tab:hover  { background: var(--bg-2); color: var(--t2); }
.ide-tab.active { background: var(--bg); color: var(--t1); border-top-color: var(--gold); }

span.ide-tab { opacity: 0.45; cursor: default; pointer-events: none; }

.tab-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-lo); flex-shrink: 0;
}

.ide-tab.active .tab-dot { background: var(--gold); }

/* ── Editor (main scrollable content) ───────────────── */
.ide-editor {
  position: fixed;
  top: var(--tabbar-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: var(--statusbar-h);
  overflow-y: auto; overflow-x: hidden;
  background: var(--bg);
  padding: 28px 36px 48px;
}

/* ── Status bar ──────────────────────────────────────── */
.ide-statusbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--statusbar-h);
  background: var(--bg-status);
  border-top: 1px solid var(--line);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: var(--mono); font-size: 11px; color: var(--t3);
  z-index: 20; user-select: none;
}

.sb-side { display: flex; align-items: center; gap: 14px; }
.sb-item { display: flex; align-items: center; gap: 4px; }
.sb-item.branch { color: var(--gold); }
.sb-item a { color: var(--t3); text-decoration: none; }
.sb-item a:hover { color: var(--t2); }

/* ── Welcome screen ──────────────────────────────────── */
.welcome-pane {
  display: flex; align-items: center;
  justify-content: center; min-height: 60vh; text-align: center;
}

.welcome-inner { max-width: 440px; }

.welcome-title {
  font-family: var(--mono); font-size: 28px; font-weight: 700;
  color: var(--gold); margin-bottom: 12px;
}

.welcome-sub { font-size: 14px; color: var(--t2); margin-bottom: 20px; line-height: 1.6; }
.welcome-hint { font-family: var(--mono); font-size: 12px; color: var(--t3); margin: 0; }

/* ── Pane title ──────────────────────────────────────── */
.pane-title {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--t3); margin-bottom: 18px;
}

/* ── Difficulty dots (DifficultyDots component) ──────── */

.diff-dots {
  display: inline-flex; align-items: center; gap: 3px;
}

.dd-dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}

/* ── Badge dot colors — explicit per difficulty, no currentColor conflict ── */
/* Filled dots */
.diff-badge-easy   .dd-on { background: #8aaa7a; }
.diff-badge-medium .dd-on { background: #d4956a; }
.diff-badge-hard   .dd-on { background: #c46070; }

/* Empty/dim dots: same hue at low opacity */
.diff-badge-easy   .dd-off { background: #8aaa7a; opacity: .22; }
.diff-badge-medium .dd-off { background: #d4956a; opacity: .22; }
.diff-badge-hard   .dd-off { background: #c46070; opacity: .22; }

/* ── Sidebar dot colors — follow the link's own state ── */
.sidebar-file          .dd-on  { background: var(--t3); }
.sidebar-file:hover    .dd-on  { background: var(--t2); }
.sidebar-file.active   .dd-on  { background: var(--gold); }
.sidebar-file          .dd-off { background: var(--t3); opacity: .25; }
.sidebar-file:hover    .dd-off { background: var(--t2); opacity: .22; }
.sidebar-file.active   .dd-off { background: var(--gold); opacity: .22; }

/* Badge pill */
.diff-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 3px; flex-shrink: 0;
}

.diff-badge-easy   { background: var(--bg-2); border: 1px solid #4a6038; }
.diff-badge-medium { background: var(--bg-2); border: 1px solid #6a4028; }
.diff-badge-hard   { background: var(--bg-2); border: 1px solid #6a2040; }

/* Text label inside badge */
.diff-badge-lbl {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .3px; text-transform: capitalize;
}
.diff-badge-easy   .diff-badge-lbl { color: #8aaa7a; }
.diff-badge-medium .diff-badge-lbl { color: #d4956a; }
.diff-badge-hard   .diff-badge-lbl { color: #d07888; }  /* a11y: 4.5:1 on hard-bg */

/* Inline label (non-badge contexts) */
.diff-inline-lbl {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .3px; text-transform: capitalize; margin-left: 3px;
}

/* ── Challenge page ──────────────────────────────────── */
.crumb { font-family: var(--mono); font-size: 11px; color: var(--t3); margin-bottom: 8px; }
.crumb a { color: var(--gold); }         /* a11y: --gold-lo was 2.7:1, --gold is 6.5:1 */
.crumb a:hover { color: var(--gold-hi); }

.repo-byline { font-size: 12px; color: var(--t3); margin: 0 0 16px; line-height: 1.5; }
.repo-lang { font-size: 11px; background: var(--bg-2); color: var(--t2); padding: 1px 6px; border-radius: 3px; margin-right: 8px; }

.challenge-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.challenge-h1 {
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  color: var(--t1); margin: 0 0 8px; line-height: 1.4;
}

.challenge-badges { display: flex; align-items: center; gap: 10px; }

.sec-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--t3); margin-bottom: 8px; display: block;
}

.brief-text {
  font-size: 13px; line-height: 1.65; color: var(--t2);
  white-space: pre-wrap; word-break: break-word; margin: 0;
}

.challenge-section { margin-bottom: 20px; }

/* Code panels */
.code-panel {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden; margin-bottom: 16px;
}

.code-panel-head {
  display: flex; align-items: center; gap: 10px; padding: 5px 12px;
  background: var(--bg-4); border-bottom: 1px solid var(--line);
}

.code-panel-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--t2); /* a11y: --t3 fails on bg-4 */
}

.code-panel-tag.err { color: #f07878; }

.code-panel-body { padding: 12px 16px; overflow-x: auto; }

.code-panel-body pre {
  margin: 0; font-family: var(--mono); font-size: 12px;
  color: var(--t2); white-space: pre-wrap; word-break: break-word; line-height: 1.6;
}

.code-panel-body code {
  display: block; font-family: var(--mono); font-size: 12px;
  color: var(--t2); margin-bottom: 3px; word-break: break-all;
}

/* Hints */
.hint-tally { font-family: var(--mono); font-size: 11px; color: var(--t3); margin-bottom: 10px; }

.hint-card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-left: 3px solid var(--gold-lo);
  border-radius: 0 4px 4px 0; padding: 10px 14px; margin-bottom: 8px;
}

.hint-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: var(--gold); margin-bottom: 4px;
}

.hint-body { font-size: 13px; color: var(--t2); line-height: 1.55; }

/* Terminal / submit */
.terminal-panel {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}

.terminal-tabs {
  display: flex; align-items: stretch; border-bottom: 1px solid var(--line);
  padding: 0 8px; height: 30px; background: var(--bg-4);
}

.terminal-tab-btn {
  display: flex; align-items: center; padding: 0 10px; height: 100%;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--t2); cursor: pointer;
  background: none; border: none; border-bottom: 2px solid transparent;
}
.terminal-tab-btn:hover { color: var(--t1); }
.terminal-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.terminal-body { padding: 14px 18px 18px; }

.problem-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--mono); font-size: 12px; }
.output-pre { font-family: var(--mono); font-size: 12px; color: var(--t2); white-space: pre-wrap; word-break: break-all; margin: 0; }

.terminal-prompt { font-family: var(--mono); font-size: 12px; color: var(--t3); margin-bottom: 14px; }
.prompt-path { color: #8aaa7a; }
.prompt-cmd  { color: var(--t2); }

.step-list { list-style: none; padding: 0; margin: 0 0 16px; }

.step-list li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 0; font-size: 12px; color: var(--t2);
  border-bottom: 1px dashed var(--line-sub);
}

.step-list li:last-child { border-bottom: none; }
.step-n { font-family: var(--mono); font-size: 10px; color: var(--gold); min-width: 14px; flex-shrink: 0; } /* a11y */

/* Result strips */
.result-strip {
  border-radius: 3px; padding: 9px 14px; font-family: var(--mono); font-size: 12px;
  border-left: 3px solid; margin-top: 12px;
}

.result-pass { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.result-warn { background: #2c1a0e; border-color: var(--gold); color: var(--gold); }
.result-err  { background: var(--red-bg); border-color: var(--red); color: var(--red); }

/* ── Form elements ───────────────────────────────────── */
.form-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--t3); margin-bottom: 6px; display: block;
}

.form-control {
  background: var(--bg-4) !important; border: 1px solid var(--line) !important;
  color: var(--t1) !important; font-family: var(--mono) !important;
  font-size: 12px !important; border-radius: 3px !important;
}

.form-control:focus {
  border-color: var(--gold-lo) !important;
  box-shadow: 0 0 0 2px rgba(212,160,86,.15) !important;
  background: var(--bg-5) !important; outline: none;
}

.form-control::placeholder { color: var(--t4) !important; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .3px; border-radius: 3px; padding: 6px 16px;
  transition: all .1s; cursor: pointer;
}

.btn-primary { background: var(--gold) !important; border-color: var(--gold) !important; color: #160a04 !important; }
.btn-primary:hover:not(:disabled) { background: var(--gold-hi) !important; border-color: var(--gold-hi) !important; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-outline-secondary {
  background: transparent !important; border-color: var(--line) !important; color: var(--t3) !important;
}
.btn-outline-secondary:hover { background: var(--bg-4) !important; color: var(--t2) !important; border-color: var(--line) !important; }

.btn-success { background: var(--green-bg) !important; border-color: var(--green) !important; color: var(--green) !important; }
.btn-success:hover { background: #254520 !important; color: var(--green) !important; }

.btn-sm { padding: 4px 10px !important; font-size: 11px !important; }

/* Bootstrap alert overrides */
.alert { border-radius: 3px !important; font-size: 13px !important; }
.alert-danger    { background: var(--red-bg)    !important; border-color: var(--red)     !important; color: var(--red)    !important; }
.alert-success   { background: var(--green-bg)  !important; border-color: var(--green)   !important; color: var(--green)  !important; }
.alert-warning   { background: #2c1a0e          !important; border-color: var(--gold)    !important; color: var(--gold)   !important; }
.alert-info      { background: var(--bg-3)      !important; border-color: var(--gold-lo) !important; color: var(--t2)     !important; }
.alert-secondary { background: var(--bg-3)      !important; border-color: var(--line)    !important; color: var(--t2)     !important; }

/* Bootstrap text utilities */
.text-muted   { color: var(--t3) !important; }
.text-danger  { color: var(--red) !important; }
.text-success { color: var(--green) !important; }
.text-warning { color: var(--gold) !important; }
.text-light   { color: var(--t2) !important; }
.bg-light, .bg-secondary { background-color: var(--bg-3) !important; color: var(--t2) !important; }

/* Bootstrap badge overrides */
.badge.bg-success   { background: var(--bg-2) !important; color: #8aaa7a !important; border: 1px solid #4a6038; }
.badge.bg-warning   { background: var(--bg-2) !important; color: var(--gold) !important; border: 1px solid var(--gold-lo); }
.badge.bg-danger    { background: var(--bg-2) !important; color: #c46070 !important; border: 1px solid #6a2040; }
.badge.bg-secondary { background: var(--bg-4) !important; color: var(--t2) !important; border: 1px solid var(--line); }

/* Spinner */
.spinner-border { border-color: var(--gold) !important; border-right-color: transparent !important; width: 14px; height: 14px; border-width: 2px; }

/* ── Progress page ───────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 28px; }

.stat-card { background: var(--bg-3); border: 1px solid var(--line); border-radius: 4px; padding: 20px 16px; text-align: center; }

.stat-num { font-family: var(--mono); font-size: 44px; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.stat-lbl { font-size: 10px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--t3); }

.progress-repo { background: var(--bg-3); border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; margin-bottom: 10px; }
.progress-repo-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.progress-repo-name { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--t1); margin: 0; }
.progress-repo-score { font-family: var(--mono); font-size: 11px; color: var(--t3); }

.progress-track { height: 4px; background: var(--bg-4); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.progress-fill  { height: 100%; background: var(--green); border-radius: 2px; transition: width .4s ease; }
.progress-hints { font-family: var(--mono); font-size: 11px; color: var(--t3); }

/* ── Accessibility utilities ─────────────────────────── */

/* Screen-reader only — visually hidden but accessible */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Skip-to-main link — visible on keyboard focus only */
.skip-link {
  position: fixed; top: -100%; left: 12px; z-index: 9999;
  background: var(--gold); color: #160a04;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 0 0 4px 4px;
  text-decoration: none; transition: top .1s;
}
.skip-link:focus { top: 0; }

/* Global focus-visible ring — keyboard navigation indicator */
:focus-visible {
  outline: 2px solid var(--gold) !important;
  outline-offset: 2px !important;
}

/* Tighter ring for small inline elements */
.sidebar-file:focus-visible,
.sidebar-folder-btn:focus-visible,
.sidebar-link:focus-visible,
.ide-tab:focus-visible {
  outline-offset: -2px !important;
}

/* Override the outline:none that Bootstrap/our CSS adds */
.form-control:focus {
  outline: 2px solid var(--gold-lo) !important;
  outline-offset: 0 !important;
}

/* ── Scrollbars ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-5); }

/* ── Blazor error UI ─────────────────────────────────── */
#blazor-error-ui {
  background: var(--red-bg); border-top: 1px solid var(--red);
  color: var(--red); bottom: var(--statusbar-h); box-sizing: border-box;
  display: none; left: 0; padding: 7px 16px;
  position: fixed; width: 100%; z-index: 1000;
  font-size: 12px; font-family: var(--mono);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 7px; }

/* ── Mobile (sidebar slides off) ────────────────────── */
@media (max-width: 820px) {
  .ide-sidebar { display: none; }
  .ide-tabbar  { left: 0; }
  .ide-editor  { left: 0; padding: 16px 16px 40px; }
}

/* ── Landing page (logged-out, full-width, no sidebar) */

/* Reset editor area to full viewport when sidebar/tabbar are hidden */
.ide-editor--landing {
  left: 0 !important;
  top: 0 !important;
  padding: 0 !important;
}

/* Landing fills the full editor area as a normal flow element */
.land-fullpage {
  min-height: calc(100vh - var(--statusbar-h));
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Tab bar — same look as .ide-tabbar but full-width and a flex child */
.land-tabbar {
  height: var(--tabbar-h);
  background: var(--bg-bar);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}

/* Centered content area */
.land-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px 36px;
}

.land-inner {
  max-width: 680px;
  width: 100%;
  text-align: center;
}

/* Big two-line headline */
.land-headline {
  font-family: var(--mono);
  font-size: clamp(26px, 3.8vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.land-hl-1 { color: var(--t1); }
.land-hl-2 { color: var(--gold); }

.land-sub {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--t2);
  margin: 0 0 28px;
  line-height: 1.5;
}

/* Outlined terminal-style CTA button */
.land-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 9px 22px;
  border-radius: 3px;
  text-decoration: none;
  transition: background .12s, color .12s;
  margin-bottom: 32px;
}

.land-btn:hover { background: var(--gold); color: #160a04; }
.land-btn:focus-visible { outline: 2px solid var(--gold) !important; outline-offset: 2px !important; }

/* Terminal preview panel */
.land-preview {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}

.land-pbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-4);
  border-bottom: 1px solid var(--line);
}

.land-pdot {
  width: 9px; height: 9px;
  border-radius: 50%; flex-shrink: 0;
}

.land-pdot-r { background: #c0392b; }
.land-pdot-y { background: #c09a2b; }
.land-pdot-g { background: #27ae60; }

.land-ptitle {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--t3);
  margin-left: 8px;
}

.land-pfile {
  font-family: var(--mono); font-size: 10px; color: var(--t4);
  margin-left: auto;
}

.land-pbody {
  padding: 14px 18px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
}

.land-pline   { margin: 0; }
.land-pindent { padding-left: 18px; }
.land-pgap    { height: 6px; }

.land-pblock {
  margin: 4px 0 10px;
  border-left: 2px solid var(--line-sub);
  padding-left: 12px;
}

.land-t3    { color: var(--t3); }
.land-pfail { color: var(--red); font-weight: 700; }
.land-pok   { color: var(--green); }
.land-pcmd  { color: var(--green); }

/* Mobile */
@media (max-width: 680px) {
  .land-headline { font-size: clamp(22px, 6vw, 36px); }
  .land-center   { padding: 20px 16px 28px; align-items: flex-start; }
  .land-preview  { max-width: 100%; }
}
