:root {
  --bg: #050505;
  --card: #17100a;
  --text: #f7f1e6;
  --muted: #d5b792;
  --accent: #ff7a00;
  --accent-deep: #b34700;
  --accent-soft: rgba(255,122,0,0.16);
  --good: #ffbd4a;
  --bad: #ff6c3c;
  --line: rgba(255,122,0,0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1000px 560px at 12% 0%, rgba(255,122,0,0.34), transparent 55%),
    radial-gradient(760px 420px at 100% 8%, rgba(179,71,0,0.22), transparent 58%),
    linear-gradient(180deg, #050505, #0b0704 45%, #130902);
  color: var(--text);
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 18px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff4e5;
  text-shadow: 0 0 24px rgba(255,122,0,0.18);
}

.sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.heroBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244,124,32,0.28);
  background: rgba(244,124,32,0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grid {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

body.session-active .grid {
  max-width: 760px;
}

.gateCard {
  max-width: 560px;
  margin: 0 auto;
}

.card {
  background:
    linear-gradient(180deg, rgba(255,122,0,0.06), rgba(255,122,0,0.02) 18%, rgba(14,9,5,0.96) 18%),
    rgba(14,9,5,0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.44);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 75%);
  pointer-events: none;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 6px;
}

.label-inline {
  color: var(--muted);
  font-size: 12px;
  width: 48px;
  min-width: 48px;
}

.field {
  flex: 1;
}

textarea,
select,
input[type="range"],
input[type="number"],
input[type="text"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,122,0,0.04);
  color: var(--text);
  padding: 10px;
  outline: none;
}

textarea:focus,
select:focus,
input[type="range"]:focus,
input[type="number"]:focus,
input[type="text"]:focus {
  border-color: rgba(244,124,32,0.65);
  box-shadow: 0 0 0 3px rgba(244,124,32,0.14);
}

textarea:disabled,
input:disabled,
select:disabled {
  opacity: 0.6;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

button {
  border: 1px solid var(--line);
  background: var(--accent);
  color: #170b03;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  flex: 1;
}

button.secondary {
  background: rgba(255,122,0,0.14);
  color: var(--text);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.checkbox {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,122,0,0.14), rgba(255,122,0,0.03));
  margin-bottom: 12px;
}

.promptBox {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,122,0,0.11), rgba(255,122,0,0.02));
}

.workflowBox {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,122,0,0.45);
  background: linear-gradient(135deg, rgba(255,122,0,0.2), rgba(179,71,0,0.18));
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.studentControls {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,122,0,0.08);
}

.details-compact {
  margin-top: 10px;
}

.maskedHint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  min-height: 18px;
}

.feedback {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,122,0,0.07);
  min-height: 52px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.correctSentence {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,122,0,0.06);
  white-space: pre-wrap;
}

.details {
  margin-top: 12px;
}

details summary {
  cursor: pointer;
  color: var(--muted);
}

input[type="range"] {
  accent-color: var(--accent);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.good {
  color: var(--good);
  font-weight: 700;
}

.bad {
  color: var(--bad);
  font-weight: 700;
}

.diff {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #ffd2b1;
}

#reportOutput {
  margin-top: 10px;
  white-space: pre-wrap;
}

.hiddenSection {
  display: none;
}

#reportSection h2,
.label,
.label-inline {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
