/* ─────────────────────────────────────────────────────────────
   Langify Guided Help — styles
   Clean & minimal · indigo #3a20cd → magenta #9f2ccc accents
   ───────────────────────────────────────────────────────────── */

:root {
  /* brand (overridable by Tweaks) */
  --brand-1: #3a20cd;
  --brand-2: #9f2ccc;
  --grad: linear-gradient(120deg, var(--brand-1), var(--brand-2));

  /* neutrals — cool, very low chroma */
  --ink:        #16141c;
  --ink-soft:   #4a4754;
  --ink-faint:  #8b8896;
  --line:       #e9e7f0;
  --line-soft:  #f1eff6;
  --surface:    #ffffff;
  --bg:         #ffffff;
  --bg-tint:    #f4f2fc;

  --radius:     6px;
  --radius-sm:  6px;
  --shadow-sm:  0 1px 2px rgba(22,20,28,.04), 0 2px 8px rgba(22,20,28,.04);
  --shadow-md:  0 10px 30px -12px rgba(58,32,205,.20), 0 4px 12px -6px rgba(22,20,28,.08);
  --shadow-lg:  0 24px 60px -20px rgba(58,32,205,.28);

  --maxw: 760px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ─────────────────────────────────────────────────────────────
   Dark mode — mirrors the langify help center color scheme
   ───────────────────────────────────────────────────────────── */
html[data-color-scheme="dark"] {
  --brand-1: #7c6ef5;
  --brand-2: #c36de8;
  --grad: linear-gradient(120deg, #4d35d4, #a840d4);

  --ink:        #e8eaed;
  --ink-soft:   #9aa0a6;
  --ink-faint:  #6f747c;
  --line:       #35354a;
  --line-soft:  #26263a;
  --surface:    #1f1f2e;
  --bg:         #16161e;
  --bg-tint:    #2a2545;

  --shadow-sm:  0px 2px 1px -1px rgba(0,0,0,.40), 0px 1px 3px 0px rgba(0,0,0,.30);
  --shadow-md:  0 10px 30px -12px rgba(0,0,0,.55), 0 4px 12px -6px rgba(0,0,0,.45);
  --shadow-lg:  0 24px 60px -20px rgba(0,0,0,.65);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  transition: background-color .25s var(--ease), color .25s var(--ease);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ───────────────── site header (matches help center) ───────────────── */
.site-header { width: 100%; }
.site-header-bar {
  height: 80px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 48px);
}
.hc-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.hc-mark {
  width: 30px; height: 30px;
  object-fit: contain;
  display: block;
}
.hc-logo-img {
  height: 40px;
  width: auto;
  display: block;
}
/* show the right logo per color scheme */
.hc-logo-dark { display: none; }
html[data-color-scheme="dark"] .hc-logo-light { display: none; }
html[data-color-scheme="dark"] .hc-logo-dark { display: block; }

/* theme toggle (moon / sun) — matches help center control */
.hc-theme {
  flex: none;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.hc-theme:hover { color: var(--brand-1); border-color: color-mix(in srgb, var(--brand-1) 40%, var(--line)); transform: translateY(-1px); }
.hc-theme:focus-visible { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 22%, transparent); }
.hc-theme .icon-sun { display: none; }
html[data-color-scheme="dark"] .hc-theme .icon-moon { display: none; }
html[data-color-scheme="dark"] .hc-theme .icon-sun { display: block; }
.hc-name {
  font-size: 25px;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}
.hc-name strong { font-weight: 800; }
.hc-name em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: 3px;
}
.site-header-rule {
  height: 6px;
  background-image: var(--gradient-primary, linear-gradient(135deg, #3a20cd, #9f2ccc));
}
html[data-color-scheme="dark"] .site-header-rule {
  background-image: linear-gradient(135deg, #4d35d4, #a840d4);
}

/* ───────────────── stage ───────────────── */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(8px, 3vw, 28px) clamp(18px, 5vw, 48px) 64px;
  width: 100%;
}
#screen { width: 100%; max-width: var(--maxw); }

/* enter animation */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .anim { animation: fadeUp .42s var(--ease) both; }
  .anim-stagger > * { animation: fadeUp .5s var(--ease) both; }
}

/* ───────────────── trail ───────────────── */
.trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  font-size: 13.5px;
}
.trail .crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
  font-family: inherit;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trail .crumb:hover { color: var(--brand-1); border-color: color-mix(in srgb, var(--brand-1) 40%, var(--line)); }
.trail .crumb.home {
  padding: 5px 12px;
  color: var(--brand-1);
  font-weight: 700;
  background: color-mix(in srgb, var(--brand-1) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-1) 28%, var(--line));
}
.trail .crumb.home:hover {
  background: color-mix(in srgb, var(--brand-1) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-1) 50%, var(--line));
}
.trail .sep { color: var(--ink-faint); font-size: 12px; }
.trail .now {
  color: var(--ink-faint);
  font-weight: 600;
  padding: 5px 4px;
}

/* ───────────────── question ───────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-1);
  margin: 0 0 14px;
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad);
}
.q-title {
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -.025em;
  font-weight: 800;
  margin: 0 0 12px;
  text-wrap: balance;
}
.q-sub {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 30px;
  max-width: 54ch;
  text-wrap: pretty;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.options.single { grid-template-columns: 1fr; }

.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s;
}
.option:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-1) 45%, var(--line));
  box-shadow: var(--shadow-md);
}
.option:focus-visible {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 22%, transparent);
}
.option .num {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-2);
  background: color-mix(in srgb, var(--brand-2) 9%, var(--surface));
  border-radius: 7px;
  padding: 3px 7px;
  margin-top: 2px;
  flex: none;
}
.option .opt-icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 19px;
  color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-1) 14%, var(--line));
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.option .opt-icon .fa { line-height: 1; }
.option:hover .opt-icon {
  background: color-mix(in srgb, var(--brand-1) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-1) 30%, var(--line));
  transform: scale(1.04);
}
.option .body { flex: 1; min-width: 0; }
.option .lbl { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.option .desc { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 3px; }
.option .arrow {
  flex: none;
  align-self: center;
  color: var(--ink-faint);
  transition: transform .2s var(--ease), color .2s;
}
.option:hover .arrow { transform: translateX(3px); color: var(--brand-1); }

/* ───────────────── result ───────────────── */
.result-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad);
  padding: 6px 13px;
  border-radius: 999px;
}
.r-title {
  font-size: clamp(27px, 4.4vw, 38px);
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 800;
  margin: 0 0 10px;
  text-wrap: balance;
}
.r-intro {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 26px;
  text-wrap: pretty;
}
.articles { display: flex; flex-direction: column; gap: 12px; }
.article {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.article:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-1) 45%, var(--line));
  box-shadow: var(--shadow-md);
}
.article .doc {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--brand-1) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand-1) 14%, var(--line));
  display: grid; place-items: center;
  color: var(--brand-1);
}
.article .doc-body { flex: 1; min-width: 0; }
.article .a-title {
  display: flex;
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  align-items: center; gap: 7px;
}
.article .a-title .ext { color: var(--ink-faint); transition: transform .2s, color .2s; }
.article:hover .a-title .ext { color: var(--brand-1); transform: translate(2px,-2px); }
.article .a-why { display: block; font-size: 14.5px; color: var(--ink-soft); margin-top: 4px; text-wrap: pretty; }

/* result footer */
.r-foot {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.r-foot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.r-foot .q { font-size: 15px; color: var(--ink-soft); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s var(--ease), border-color .2s, box-shadow .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand-1) 40%, var(--line)); }
.btn.primary {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
.btn.primary:hover { box-shadow: var(--shadow-lg); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-soft); padding-left: 8px; padding-right: 8px; }
.btn.ghost:hover { color: var(--brand-1); }

/* ───────────────── landing ───────────────── */
.hero {
  text-align: center;
  padding-top: clamp(20px, 7vh, 70px);
}
.hero h1 {
  font-size: clamp(38px, 7vw, 66px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 800;
  margin: 0 auto 18px;
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p.lead {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 auto 34px;
  text-wrap: pretty;
}
.hero .cta-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero .cta-row .btn { font-size: 16.5px; padding: 15px 28px; }

.quick {
  margin-top: clamp(40px, 7vh, 72px);
  text-align: center;
}
.quick .quick-label {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.quick .chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  max-width: 660px; margin: 0 auto;
}
.chip {
  font-family: inherit;
  font-size: 14.5px; font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), border-color .2s, color .2s, box-shadow .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.chip::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad); opacity: .55; transition: opacity .2s;
}
.chip:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-1) 40%, var(--line)); color: var(--brand-1); box-shadow: var(--shadow-md); }
.chip:hover::before { opacity: 1; }

/* landing escape hatches */
.escape {
  margin-top: clamp(32px, 6vh, 56px);
  padding-top: clamp(32px, 6vh, 56px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 660px;
  margin-left: auto; margin-right: auto;
}
.escape a {
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 3px;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.escape a:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-1) 40%, var(--line)); box-shadow: var(--shadow-md); }
.escape a .t { font-weight: 700; font-size: 15.5px; display:inline-flex; align-items:center; gap:7px; }
.escape a .d { font-size: 13.5px; color: var(--ink-soft); }
.escape a .t .ext { color: var(--ink-faint); }

/* ───────────────── footer ───────────────── */
.foot {
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
  padding: 8px 24px 30px;
}
.foot a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--brand-1); }

/* ───────────────── responsive ───────────────── */
@media (max-width: 600px) {
  .options { grid-template-columns: 1fr; }
  .escape { grid-template-columns: 1fr; }
}
