:root {
  color-scheme: dark;
  --canvas: #050706;
  --app: #0b0b0b;
  --surface: #111111;
  --raised: #1a1a1a;
  --text: #ffffff;
  --secondary: #d4d4d8;
  --muted: #a1a1aa;
  --green: #4ade80;
  --green-fill: #15803d;
  --green-dark: #0d2e1a;
  --border: #3f3f46;
  --error: #fca5a5;
  --error-bg: #351313;
  --success: #86efac;
  --success-bg: #0d2e1a;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% 22%, rgba(74, 222, 128, 0.13), transparent 32rem),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--canvas);
  background-size: auto, 72px 72px, 72px 72px, auto;
  color: var(--text);
  font-family: "Clash Display", Inter, system-ui, sans-serif;
}

button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(74, 222, 128, .75);
  outline-offset: 3px;
}

.try-page { min-height: 100vh; padding: 24px clamp(18px, 4vw, 56px) 72px; }

.try-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
}

.try-brand img { display: block; height: 38px; width: auto; }

.header-join {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 11px 16px;
}

.try-intro { margin: 54px auto 30px; max-width: 760px; text-align: center; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.try-intro h1, .try-intro h2 { letter-spacing: -.045em; line-height: .98; margin: 0; }
.try-intro h1 { font-size: clamp(38px, 6vw, 66px); }
.try-intro h2 { color: var(--green); font-size: clamp(38px, 6vw, 66px); }
.try-intro > p:last-child { color: var(--secondary); font-size: 16px; line-height: 1.55; margin: 20px auto 0; max-width: 590px; }

.device-stage { display: flex; justify-content: center; }

.phone-shell {
  background: #080a09;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 48px;
  box-shadow: 0 44px 130px rgba(0,0,0,.72), 0 0 60px rgba(74,222,128,.08), inset 0 0 0 7px #171a18;
  max-width: 430px;
  min-height: 760px;
  padding: 14px;
  position: relative;
  width: 100%;
}

.phone-sensor {
  background: #020302;
  border-radius: 0 0 18px 18px;
  height: 25px;
  left: 50%;
  position: absolute;
  top: 11px;
  transform: translateX(-50%);
  width: 116px;
  z-index: 3;
}

.app-window { background: var(--app); border-radius: 35px; min-height: 732px; overflow: hidden; }

.app-status {
  align-items: center;
  color: #71717a;
  display: flex;
  font-size: 8px;
  font-weight: 700;
  gap: 7px;
  justify-content: center;
  letter-spacing: .12em;
  min-height: 44px;
  padding-top: 8px;
}

.status-dot { background: var(--green); border-radius: 50%; height: 4px; width: 4px; }
.demo-screen { min-height: 688px; }
.screen-content { padding: 18px 20px 34px; }

.app-header { align-items: center; display: flex; gap: 12px; margin-bottom: 20px; }
.app-mark { align-items: center; background: var(--green-dark); border-radius: 12px; color: var(--green); display: flex; font-size: 20px; height: 42px; justify-content: center; width: 42px; }
.app-heading { flex: 1; min-width: 0; }
.app-heading h3 { font-size: 16px; line-height: 1.2; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-heading p { color: var(--muted); font-size: 10px; letter-spacing: .08em; margin: 5px 0 0; text-transform: uppercase; }

.screen-title { font-size: 25px; letter-spacing: -.025em; line-height: 1.12; margin: 5px 0 8px; }
.screen-copy { color: var(--secondary); font-size: 13px; line-height: 1.55; margin: 0 0 20px; }

.search-wrap { position: relative; }
.search-wrap::before { color: var(--muted); content: "⌕"; font-size: 22px; left: 14px; position: absolute; top: 11px; }
.search-input {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  min-height: 50px;
  padding: 0 14px 0 43px;
  width: 100%;
}
.section-label { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .13em; margin: 22px 0 10px; text-transform: uppercase; }

.material-list { display: grid; gap: 10px; }
.material-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid #27272a;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 14px;
  text-align: left;
  width: 100%;
}
.material-button:hover { border-color: var(--green-fill); transform: translateY(-1px); }
.material-icon { align-items: center; background: var(--green-dark); border-radius: 11px; color: var(--green); display: flex; flex: 0 0 42px; height: 42px; justify-content: center; }
.material-copy { flex: 1; min-width: 0; }
.material-title { font-size: 14px; font-weight: 650; line-height: 1.25; margin: 0; }
.material-meta { color: var(--muted); font-size: 10px; margin: 5px 0 0; }
.material-arrow { color: var(--green); font-size: 20px; }

.progress-row { align-items: center; display: flex; justify-content: space-between; }
.progress-row span { color: var(--secondary); font-size: 11px; font-weight: 600; }
.progress-track { background: #27272a; border-radius: 999px; height: 5px; margin: 9px 0 18px; overflow: hidden; }
.progress-fill { background: var(--green-fill); border-radius: inherit; height: 100%; transition: width .25s ease; }

.card { background: var(--surface); border: 1px solid #27272a; border-radius: 14px; padding: 16px; }
.question-card { margin-bottom: 13px; }
.badge { background: var(--green-dark); border: 1px solid #166534; border-radius: 6px; color: var(--green); display: inline-block; font-size: 8px; font-weight: 800; letter-spacing: .08em; padding: 5px 7px; text-transform: uppercase; }
.question-text { font-family: Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.5; margin: 13px 0 0; white-space: pre-wrap; }

.options { display: grid; gap: 9px; }
.option {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid #27272a;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  gap: 11px;
  padding: 12px;
  text-align: left;
  width: 100%;
}
.option:hover:not(:disabled) { border-color: #52525b; }
.option.selected { background: var(--green-dark); border-color: var(--green-fill); }
.option.correct { background: var(--success-bg); border-color: #166534; }
.option.incorrect { background: var(--error-bg); border-color: #991b1b; }
.option-letter { align-items: center; background: var(--raised); border: 1px solid var(--border); border-radius: 8px; display: flex; flex: 0 0 30px; font-size: 11px; font-weight: 700; height: 30px; justify-content: center; }
.selected .option-letter, .correct .option-letter { background: var(--green-fill); border-color: var(--green-fill); }
.incorrect .option-letter { background: #991b1b; border-color: #991b1b; }
.option-label { color: var(--secondary); font-family: Inter, system-ui, sans-serif; font-size: 12.5px; line-height: 1.45; padding-top: 5px; white-space: pre-wrap; }

.reasoning-card { margin-top: 13px; }
.reasoning-card h4, .feedback-card h4 { font-size: 15px; margin: 0 0 7px; }
.supporting { color: var(--secondary); font-size: 11.5px; line-height: 1.5; margin: 0 0 12px; }
.reasoning-input { background: var(--raised); border: 1px solid var(--border); border-radius: 10px; color: var(--text); line-height: 1.5; min-height: 105px; padding: 12px; resize: vertical; width: 100%; }
.character-count { color: var(--muted); display: block; font-size: 9px; margin: 5px 0 10px; text-align: right; }

.primary-button, .secondary-button, .text-button {
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  min-height: 46px;
  padding: 0 16px;
  width: 100%;
}
.primary-button { background: var(--green-fill); border: 1px solid var(--green-fill); color: white; }
.primary-button:hover:not(:disabled) { background: #166534; }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }
.secondary-button { background: transparent; border: 1px solid var(--border); color: var(--secondary); }
.text-button { background: transparent; border: 0; color: var(--green); }

.feedback-wrap { display: grid; gap: 12px; margin-top: 14px; }
.verdict { align-items: center; display: flex; gap: 12px; }
.verdict.correct { background: var(--success-bg); border-color: #166534; }
.verdict.incorrect { background: var(--error-bg); border-color: #991b1b; }
.verdict-icon { font-size: 24px; }
.verdict h4 { font-size: 17px; margin: 0; }
.verdict p { color: var(--secondary); font-size: 10.5px; line-height: 1.45; margin: 4px 0 0; }
.correction { background: var(--green-dark); border: 1px solid #166534; border-radius: 10px; color: var(--success); font-size: 13px; font-weight: 700; padding: 12px; text-align: center; }
.feedback-card p, .feedback-card li { color: var(--secondary); font-family: Inter, system-ui, sans-serif; font-size: 11.5px; line-height: 1.55; }
.concept-box { background: var(--green-dark); border-radius: 9px; color: var(--green); font-size: 12px; line-height: 1.45; margin-top: 12px; padding: 11px; }
.concept-box strong { display: block; font-size: 8px; letter-spacing: .1em; margin-bottom: 5px; text-transform: uppercase; }
.feedback-list { margin: 8px 0 0; padding-left: 18px; }
.study-card { background: linear-gradient(145deg, #0d2e1a, #101512); border-color: #166534; }
.study-card .study-title { color: var(--green); font-size: 15px; font-weight: 700; margin: 3px 0 8px; }
.study-eyebrow { color: var(--success); font-size: 8px; font-weight: 800; letter-spacing: .11em; margin: 0; text-transform: uppercase; }
.details { border-top: 1px solid #27272a; margin-top: 12px; padding-top: 10px; }
.details summary { color: var(--secondary); cursor: pointer; font-size: 11px; font-weight: 650; }
.option-explanation { border-top: 1px solid #27272a; margin-top: 9px; padding-top: 9px; }

.branch-card { text-align: center; }
.branch-card h4 { font-size: 16px; margin: 0 0 7px; }
.branch-card p { color: var(--secondary); font-size: 11px; line-height: 1.5; margin: 0 0 13px; }
.button-stack { display: grid; gap: 8px; }

.error-message { background: var(--error-bg); border: 1px solid #991b1b; border-radius: 10px; color: var(--error); font-size: 11px; line-height: 1.45; margin: 12px 0; padding: 11px; }
.empty-state { padding: 42px 10px; text-align: center; }
.empty-icon { color: var(--green); font-size: 34px; }
.empty-state h3 { margin: 12px 0 7px; }
.empty-state p { color: var(--secondary); font-size: 12px; line-height: 1.5; }

.skeleton { animation: shimmer 1.2s infinite linear; background: linear-gradient(90deg, #111 20%, #222 50%, #111 80%); background-size: 200% 100%; border-radius: 12px; height: 74px; margin-bottom: 10px; }
.skeleton.title { height: 28px; margin: 6px 0 20px; width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.conversion { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 630px; padding: 32px 22px; text-align: center; }
.conversion-mark { align-items: center; background: var(--green-dark); border: 1px solid #166534; border-radius: 22px; color: var(--green); display: flex; font-size: 34px; height: 74px; justify-content: center; width: 74px; }
.conversion h3 { font-size: 27px; letter-spacing: -.03em; line-height: 1.12; margin: 22px 0 12px; }
.conversion > p { color: var(--secondary); font-size: 13px; line-height: 1.6; margin: 0 0 24px; }
.conversion .button-stack { width: 100%; }
.conversion-note { color: var(--muted) !important; font-size: 10px !important; margin: 14px 0 0 !important; }

.sr-only { height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 600px) {
  .try-page { padding: max(14px, env(safe-area-inset-top)) 12px 42px; }
  .try-header { padding: 0 4px 12px; }
  .try-brand img { height: 32px; }
  .header-join { font-size: 11px; padding: 9px 12px; }
  .try-intro { margin: 0; padding: 24px 10px 22px; }
  .try-intro .eyebrow { font-size: 9px; }
  .try-intro h1, .try-intro h2 { font-size: 34px; }
  .try-intro > p:last-child { font-size: 13px; margin-top: 14px; }
  .device-stage { padding: 0 2px; }
  .phone-shell {
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 38px;
    box-shadow: 0 24px 70px rgba(0,0,0,.65), 0 0 38px rgba(74,222,128,.07), inset 0 0 0 5px #171a18;
    max-width: 430px;
    min-height: 0;
    padding: 10px;
  }
  .phone-sensor { display: block; height: 21px; top: 8px; width: 96px; }
  .app-status { display: flex; min-height: 38px; padding-top: 7px; }
  .app-window { border-radius: 29px; min-height: 0; }
  .demo-screen { min-height: calc(100vh - 300px); }
  .screen-content { padding: 18px 15px max(36px, env(safe-area-inset-bottom)); }
  .conversion { min-height: calc(100vh - 300px); }
}

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