:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #1a1a1a;
  --panel-2: #232323;
  --panel-3: #2c2c2c;
  --line: #333333;
  --line-strong: #4a4a4a;
  --text: #f0f0f0;
  --muted: #888888;
  --cyan: #3b82f6;
  --cyan-soft: rgba(59, 130, 246, .14);
  --green: #22c55e;
  --amber: #fbbf24;
  --red: #ef4444;
  --shadow: 0 22px 65px rgba(0, 0, 0, .34);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 25% -10%, rgba(59, 130, 246, .10), transparent 33rem),
    var(--bg);
  color: var(--text);
}

button, input, select { font: inherit; }
button, select, label { -webkit-tap-highlight-color: transparent; }

.topbar {
  position: relative;
  z-index: 10;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid #000;
  background: rgba(10, 10, 10, .94);
  backdrop-filter: blur(14px);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, #f7941e, #ef4444, #ec008c, #92278f, #2e3192, #3b82f6);
}

.back-link {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-decoration: none;
}

.back-link:hover, .back-link:focus-visible { border-color: var(--cyan); color: var(--text); }

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  margin-right: 8px;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

.brand-mark { display: block; height: 22px; width: auto; }

.brand-tag {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 999px;
  background: rgba(34, 197, 94, .07);
  color: #c9efaf;
  font-size: 11px;
  font-weight: 750;
}

.local-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}

.helper-preview-key { position: absolute; z-index: 3; bottom: 72px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 28px); pointer-events: none; }
.helper-preview-key span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 10, 10, .88); color: var(--muted); font-size: 9px; font-weight: 800; backdrop-filter: blur(8px); }
.helper-preview-key span::before { width: 7px; height: 7px; border-radius: 50%; content: ""; }
.support-preview-key::before { background: #22c55e; }
.adhesion-preview-key::before { background: #fbbf24; }
.mouse-ear-preview-key::before { background: #ff8f3d; }

.app-shell {
  min-height: calc(100vh - 59px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
}

.workspace {
  min-width: 0;
  padding: clamp(22px, 4vw, 48px);
}

.workspace-head {
  max-width: 1040px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .17em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: clamp(25px, 3vw, 39px); line-height: 1.05; letter-spacing: -.035em; }
.subtitle { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.engine-note {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(26, 26, 26, .65);
  text-align: right;
}

.engine-note span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.engine-note strong { font-size: 11px; }

.viewer-card {
  position: relative;
  max-width: 1040px;
  height: clamp(430px, 61vh, 680px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(34, 34, 34, .7), rgba(12, 12, 12, .92)),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(255, 255, 255, .08) 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, .08) 35px);
  box-shadow: var(--shadow);
}

.viewer-card.dragging { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(59, 130, 246, .13), var(--shadow); }

#modelCanvas { width: 100%; height: 100%; display: block; }

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  text-align: center;
}

.empty-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(59, 130, 246, .16), rgba(46, 49, 146, .11));
}

.empty-icon svg { width: 48px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h2 { margin-bottom: 6px; font-size: 20px; }
.empty-state p { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.empty-state small { margin-top: 10px; color: #888888; font-size: 10px; }
#modelFile { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 10px 15px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.button:hover:not(:disabled) { filter: brightness(1.1); }
.button:focus-visible, select:focus-visible, input:focus-visible, .tool-button:focus-visible { outline: 3px solid rgba(59, 130, 246, .3); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .43; }
.button.primary { border-color: var(--cyan); background: var(--cyan); color: #ffffff; }
.button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bed-label {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 9px;
  border: 1px solid rgba(74, 74, 74, .75);
  border-radius: 7px;
  background: rgba(10, 10, 10, .75);
  color: var(--muted);
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  backdrop-filter: blur(8px);
}

.viewer-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
}

.tool-button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 6px 9px;
  background: rgba(26, 26, 26, .88);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.tool-button span { color: var(--muted); font-weight: 600; }
.clear-model-button { border-color: rgba(255, 107, 107, .45); color: #ffb0b0; }

.model-stats {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

.model-stats div { min-width: 0; display: grid; gap: 3px; padding: 9px 11px; background: rgba(20, 20, 20, .9); }
.model-stats span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.model-stats strong { overflow: hidden; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }

.status-panel {
  max-width: 1040px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 15px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, .25);
  border-radius: 11px;
  background: rgba(251, 191, 36, .06);
}

.status-panel.success { border-color: rgba(34, 197, 94, .3); background: rgba(34, 197, 94, .07); }
.status-panel.error { border-color: rgba(239, 68, 68, .32); background: rgba(239, 68, 68, .07); }
.status-panel.working { border-color: rgba(59, 130, 246, .32); background: var(--cyan-soft); }

.status-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--amber);
  color: #1b1302;
  font-size: 12px;
  font-weight: 900;
}

.success .status-icon { background: var(--green); color: #071303; }
.error .status-icon { background: var(--red); color: white; }
.working .status-icon { background: var(--cyan); color: #ffffff; }
.status-copy { min-width: 0; display: grid; gap: 2px; }
.status-copy strong { font-size: 12px; }
.status-copy span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.progress-track { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.progress-track div { width: 0; height: 100%; border-radius: inherit; background: var(--cyan); transition: width .18s ease; }

.settings-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #000;
  background: var(--panel);
  box-shadow: -18px 0 50px rgba(0, 0, 0, .16);
}

.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 23px 22px 19px; border-bottom: 1px solid var(--line); }
.settings-head h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.step-pill { padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }

form { display: contents; }
fieldset { min-width: 0; margin: 0; padding: 18px 22px 20px; border: 0; border-bottom: 1px solid var(--line); }
legend { width: 100%; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding: 0; color: #f0f0f0; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
legend span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; background: var(--cyan-soft); color: var(--cyan); font-size: 10px; }

.field-label { display: block; margin-bottom: 7px; color: #f0f0f0; font-size: 11px; font-weight: 730; }
select { width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 34px 8px 10px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; gap: 2px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.segmented b { font-size: 12px; }
.segmented small { color: var(--muted); font-size: 9px; }
.segmented input:checked + span { border-color: var(--cyan); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px var(--cyan); }
.segmented input:focus-visible + span { outline: 3px solid rgba(59, 130, 246, .3); outline-offset: 2px; }

.range-head { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; }
.percent-field { display: flex; align-items: center; min-height: 30px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel-2); color: var(--cyan); }
.percent-field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(59, 130, 246, .16); }
.percent-field input { width: 53px; border: 0; padding: 5px 2px 5px 7px; outline: 0; background: transparent; color: inherit; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 850; text-align: right; }
.percent-field span { padding-right: 7px; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 850; }
.percent-field input:disabled { cursor: not-allowed; opacity: .45; }
.percent-field:has(input:invalid) { border-color: var(--red); }
input[type="range"] { width: 100%; accent-color: var(--cyan); }
input[type="range"]:disabled { cursor: not-allowed; opacity: .45; }
.range-scale { display: flex; justify-content: space-between; margin-top: 2px; color: #708097; font-size: 9px; }
.scale-control { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.scale-control .range-head { margin-top: 0; }
.scale-control .field-label { margin-bottom: 0; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.switch-row + .switch-row { margin-top: 15px; }
.switch-row span { display: grid; gap: 2px; }
.switch-row b { font-size: 11px; }
.switch-row small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.switch-row .helper-recommendation { color: var(--amber); font-weight: 750; }
.switch-row .helper-recommendation[hidden] { display: none; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; flex: 0 0 38px; width: 38px; height: 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: #0c111a; transition: .15s ease; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #8794a7; transition: .15s ease; }
.switch-row input:checked + i { border-color: var(--cyan); background: rgba(59, 130, 246, .24); }
.switch-row input:checked + i::after { transform: translateX(16px); background: var(--cyan); }
.switch-row input:focus-visible + i { outline: 3px solid rgba(59, 130, 246, .3); outline-offset: 2px; }
.mouse-ears-prompt { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 16px; padding: 10px; border: 1px solid rgba(251, 191, 36, .3); border-radius: 8px; background: rgba(251, 191, 36, .07); }
.mouse-ears-prompt[hidden] { display: none; }
.mouse-ears-prompt span { display: grid; gap: 3px; }
.mouse-ears-prompt b { color: var(--amber); font-size: 10px; }
.mouse-ears-prompt small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.mouse-ears-button { min-height: 30px; border: 1px solid var(--amber); border-radius: 7px; padding: 6px 9px; background: transparent; color: var(--amber); font-size: 9px; font-weight: 800; cursor: pointer; }
.mouse-ears-button:hover { background: rgba(251, 191, 36, .12); }
.mouse-ears-button:focus-visible { outline: 3px solid rgba(251, 191, 36, .25); outline-offset: 2px; }

.action-area { display: grid; gap: 9px; padding: 19px 22px; }
.slice-button { width: 100%; border-color: var(--cyan); background: var(--cyan); color: #ffffff; }
.export-button { width: 100%; border-color: var(--green); background: var(--green); color: #071303; }
.result-card { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 22px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.result-card div { min-width: 0; display: grid; gap: 3px; padding: 9px; background: var(--panel-2); text-align: center; }
.result-card span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.result-card strong { overflow: hidden; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.result-card div:nth-child(odd):last-child { grid-column: 1 / -1; }

/* Filament, against the amount a student may print without asking. The mark
   is the limit; the bar runs half again past it so an over-limit print reads
   as over rather than as full. */
.filament-meter { display: grid; gap: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); --meter-color: var(--green); }
.filament-meter.near { --meter-color: var(--amber); border-color: rgba(251, 191, 36, .35); }
.filament-meter.over { --meter-color: var(--red); border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .07); }
.filament-meter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filament-meter-head span { display: grid; gap: 2px; }
.filament-meter-head b { font-size: 11px; }
.filament-meter-head small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.filament-meter-head strong { color: var(--meter-color); font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 850; white-space: nowrap; }
.filament-track { position: relative; height: 8px; margin: 12px 0 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.filament-track div { width: 0; height: 100%; border-radius: inherit; background: var(--meter-color); transition: width .18s ease, background-color .18s ease; }
.filament-limit-mark { position: absolute; top: -4px; bottom: -4px; left: var(--limit-position, 66.667%); width: 2px; background: var(--text); opacity: .75; }
.filament-limit-mark span { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); color: var(--muted); font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; white-space: nowrap; }
.filament-note { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
.filament-meter.over .filament-note { color: #ffb0b0; font-weight: 750; }

.settings-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: auto; padding: 15px 20px; border-top: 1px solid var(--line); color: #888888; font-size: 9px; }
.settings-footer a { color: #90a7c4; }

.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; max-width: min(430px, calc(100vw - 40px)); padding: 11px 13px; border: 1px solid var(--red); border-radius: 9px; background: rgba(35, 13, 20, .97); color: #ffd9e1; box-shadow: var(--shadow); font-size: 12px; line-height: 1.45; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .settings-panel { border-top: 1px solid #000; border-left: 0; }
  .viewer-card { height: min(65vh, 600px); }
}

@media (max-width: 620px) {
  .topbar { padding-inline: 10px; }
  .brand-tag { display: none; }
  .local-badge { padding: 7px; }
  #localBadgeText { display: none; }
  .workspace { padding: 21px 12px; }
  .workspace-head { align-items: flex-start; flex-direction: column; gap: 13px; }
  .engine-note { text-align: left; }
  .viewer-card { height: 460px; }
  .viewer-toolbar { top: auto; right: 10px; bottom: 78px; left: 10px; justify-content: flex-end; }
  .model-stats { right: 10px; bottom: 10px; left: 10px; grid-template-columns: 1fr 1fr; }
  .model-stats div:first-child { grid-column: 1 / -1; }
  .bed-label { top: 10px; left: 10px; }
  .helper-preview-key { top: 52px; bottom: auto; left: 10px; }
  .status-panel { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* The print-queue offer after a slice. Sits over the page rather than in the
   sidebar: it is a question with two answers and it should be answered before
   the student walks off with their file. */
.queue-ask { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(0, 0, 0, .74); }
.queue-ask[hidden] { display: none; }
.queue-ask-card { width: min(420px, 100%); padding: 20px 22px; border: 1px solid var(--line); border-radius:14px; background: var(--panel); box-shadow: var(--shadow); }
.queue-ask-card h2 { margin: 0 0 8px; font-size: 15px; }
.queue-ask-card p { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.queue-ask-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.queue-ask-note { margin: 14px 0 0 !important; font-size: 10.5px !important; line-height: 1.45 !important; opacity: .85; }

/* Classroom guide: the goal under the title, Words beside the ? in the bar. */
.goal-slot { margin-top: 12px; }
.goal-slot:empty { display: none; }
.words-button { min-height: 32px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel-2); color: var(--text); font-size: 11px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.words-button:hover, .words-button:focus-visible { border-color: var(--cyan); outline: none; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* The Guided Project. It sits under the preview so the list and the model are
   in view together; Free use folds it down to one line. */
.project-panel { max-width: 1040px; margin: 15px auto 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.project-head h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.project-head .eyebrow { margin-bottom: 4px; }
.project-mode { flex: 1 1 auto; }
.mode-switch { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 9px; }
.mode-button { min-height: 36px; padding: 7px 12px; border: 0; background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.mode-button + .mode-button { border-left: 1px solid var(--line-strong); }
.mode-button[aria-pressed="true"] { background: var(--cyan); color: #ffffff; }
.mode-button:focus-visible { outline: 3px solid rgba(59, 130, 246, .3); outline-offset: -3px; }
.project-intro { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.project-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.project-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.project-steps li.done { border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .07); }
.project-mark { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--panel-3); color: var(--muted); font-size: 11px; font-weight: 900; }
.project-steps li.done .project-mark { background: var(--green); color: #071303; }
.project-copy { min-width: 0; display: grid; gap: 2px; }
.project-copy b { font-size: 12px; }
.project-copy small { color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.project-done { margin: 12px 0 0; padding: 9px 11px; border: 1px solid rgba(34, 197, 94, .35); border-radius: 9px; background: rgba(34, 197, 94, .07); color: #c9efaf; font-size: 12px; font-weight: 700; }
.project-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.project-rule { margin: 10px 0 0; color: var(--muted); font-size: 11px; }

/* The skills check dialog. */
.check-dialog { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .78); }
.check-dialog[hidden] { display: none; }
.check-card { width: min(680px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.check-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.check-head h2 { margin: 0; font-size: 18px; }
.check-intro { margin: 8px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.check-question { margin: 12px 0 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.check-question legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; color: var(--text); font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.check-question.right { border-color: rgba(34, 197, 94, .45); }
.check-question.wrong { border-color: rgba(239, 68, 68, .5); }
.check-option { clear: both; display: flex; align-items: flex-start; gap: 9px; padding: 7px 4px; border-radius: 7px; font-size: 12.5px; line-height: 1.45; cursor: pointer; }
.check-option:hover { background: rgba(255, 255, 255, .04); }
.check-option input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--cyan); }
.check-feedback { clear: both; margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.check-question.right .check-feedback { color: #86efac; }
.check-question.wrong .check-feedback { color: #fca5a5; }
.check-result { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; font-size: 13px; font-weight: 750; line-height: 1.45; }
.check-result.pass { border: 1px solid rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .09); color: #c9efaf; }
.check-result.warn { border: 1px solid rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); color: #fde68a; }
.check-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 14px; }

@media (max-width: 620px) {
  .project-panel { padding: 14px 12px; }
  .project-steps { grid-template-columns: 1fr; }
  .check-card { padding: 16px 14px; }
  .words-button { padding: 6px 8px; }
}
