/* LINGO — the landing page (views/landing.js), rebuilt 30.10.2026.

   Look: a quiet dark studio with one light on. Space instead of boxes,
   one accent, and the voice line (tokens.css, --voice-*) as the only
   ornament — it always means a voice and how close yours is. Sections are
   separated by air, not borders; cards are kept for things you can touch
   (the live Melody, the plans, the tiles). The phone layout is its own:
   one column, the live voice card right under the headline, tiles in two
   columns, plans stacked with the free one first. */

.lx { --lx-gap: clamp(72px, 9vw, 136px); }
.lx .shell-wide { max-width: 1280px; }

/* ---------------------------------------------------------------- hero */

.lx-hero {
  position: relative;
  padding: clamp(36px, 6vw, 88px) 0 clamp(48px, 7vw, 104px);
  overflow: hidden;
}
/* One soft light behind the voice card, nothing else. */
.lx-hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(900px, 90vw);
  height: 760px;
  background: radial-gradient(closest-side, rgba(200, 255, 77, 0.10), transparent 70%),
              radial-gradient(closest-side at 70% 60%, rgba(91, 60, 240, 0.16), transparent 75%);
  pointer-events: none;
}
.lx-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 80px);
  /* Top, not centre: the card grows when a score appears, and centring
     made the headline jump down the page as it did. */
  align-items: start;
}
.lx-hero-copy { min-width: 0; padding-top: clamp(0px, 2vw, 28px); }
.lx-hero-copy .badge-eyebrow { align-self: flex-start; }

.lx-h1 {
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: var(--step-6);
  line-height: 0.98;
  letter-spacing: -0.048em;
  margin: 0;
  text-wrap: balance;
}
.lx-h1-line { display: block; }
.lx-h1-line.is-accent { color: var(--accent); }

.lx-sub {
  margin: 0;
  max-width: 36em;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
  line-height: 1.6;
  color: var(--text-2);
}

.lx-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: var(--step--1);
}
.lx-trust li { display: inline-flex; align-items: center; gap: 7px; }
.lx-trust .icon { color: var(--accent); width: 15px; height: 15px; }
.lx-promo { align-self: flex-start; }

/* The live Melody card. */
.lx-stage { position: relative; min-width: 0; padding-bottom: 104px; }
.lx-voice {
  position: relative;
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 40%),
    var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 0 var(--line-lit) inset, 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(200, 255, 77, 0.04);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.lx-voice-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.lx-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--step--2); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}
.lx-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: lx-pulse 2s var(--ease) infinite; }
@keyframes lx-pulse { 50% { box-shadow: 0 0 0 7px rgba(200, 255, 77, 0.06); } }
.lx-voice-private { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--2); color: var(--text-3); }
.lx-voice-ask { margin: 2px 0 0; font-weight: 700; color: var(--text-2); font-size: var(--step--1); }
.lx-voice .melody { gap: var(--sp-3); }
.lx-voice .melody-canvas { height: 190px; }
.lx-voice .melody-line { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; }
.lx-voice-next { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-2); }
.lx-voice-next p { margin: 0; color: var(--text-2); }

/* The AI coach's note, tucked under the card's corner. */
.lx-coach {
  position: absolute;
  left: clamp(-36px, -2.4vw, -12px);
  bottom: 0;
  width: min(320px, 82%);
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(22, 26, 34, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.85);
  display: grid;
  gap: 6px;
}
.lx-coach-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--2); font-weight: 700; color: var(--text-3); }
.lx-coach-label .icon { color: var(--accent); }
.lx-coach-fix { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.lx-coach-fix s { color: #ff8f88; text-decoration-thickness: 2px; }
.lx-coach-fix b { color: var(--accent); }
.lx-coach-fix .icon { color: var(--text-3); }
.lx-coach-why { margin: 0; font-size: var(--step--1); color: var(--text-2); }

/* ------------------------------------------------------------- sections */

.lx-section { padding-block: var(--lx-gap); position: relative; }
.lx-section + .lx-section { padding-top: 0; }
.lx-head { max-width: 760px; display: flex; flex-direction: column; gap: var(--sp-3); }
.lx-head h2 { font-size: var(--step-5); letter-spacing: -0.038em; font-weight: 800; }
.lx-body { margin: 0; color: var(--text-2); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem); line-height: 1.62; max-width: 40em; }
.lx-note { font-size: var(--step--2); margin: 0; }
.stack.g8 { gap: clamp(48px, 6vw, 88px); }

/* Pillars: copy and a still, alternating sides. */
.lx-pillar {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: center;
}
.lx-pillar.is-flip .lx-pillar-copy { order: 2; }
.lx-pillar-copy h3 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; }
.lx-pillar-num { color: var(--accent); font-size: var(--step--1); letter-spacing: 0.08em; }

.lx-visual {
  position: relative;
  min-height: 300px;
  padding: clamp(20px, 3vw, 34px);
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 70% at 50% 110%, rgba(200, 255, 77, 0.07), transparent 65%),
    linear-gradient(180deg, var(--surface), var(--ground-2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-4);
  overflow: hidden;
}
.lx-visual-top { display: flex; align-items: center; gap: 6px; font-size: var(--step--2); color: var(--text-3); }
.lx-key { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-left: 8px; }
.lx-key:first-child { margin-left: 0; }
.lx-key.is-native { background: var(--voice-native); box-shadow: 0 0 8px rgba(200, 255, 77, 0.8); }
.lx-key.is-you { background: var(--voice-you); }
.lx-visual-line { margin: 0; font-size: var(--step-3); font-weight: 800; letter-spacing: -0.025em; }
.lx-visual-line b { color: var(--accent); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.lx-visual-line span { color: var(--text); }
.lx-visual-life { align-items: center; }

/* The voice lines: the native one glows and draws itself, yours follows. */
.voice-lines { width: 100%; height: 150px; overflow: visible; }
.voice-lines path { fill: none; stroke-linecap: round; }
.vl-native { stroke: var(--voice-native); stroke-width: 4; filter: var(--voice-glow); }
.vl-you { stroke: var(--voice-you); stroke-width: 2.5; opacity: 0.85; }
.js .voice-lines path { stroke-dasharray: 700; stroke-dashoffset: 700; }
.js .reveal.in .voice-lines .vl-native, .js .lx-final.in .vl-native { animation: vl-draw 1.4s var(--ease-out) forwards; }
.js .reveal.in .voice-lines .vl-you, .js .lx-final.in .vl-you { animation: vl-draw 1.6s var(--ease-out) 0.5s forwards; }
@keyframes vl-draw { to { stroke-dashoffset: 0; } }

/* A sample debrief. */
.lx-visual-coach { gap: var(--sp-3); justify-content: flex-start; }
.lx-debrief-head { display: flex; align-items: center; gap: var(--sp-4); padding-bottom: var(--sp-2); }
.lx-debrief-score { font-weight: 800; font-size: var(--step-0); }
.lx-debrief-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: var(--step--1);
}
.lx-debrief-row > .icon { flex: none; margin-top: 3px; }
.lx-debrief-row.is-good > .icon { color: var(--ok); }
.lx-debrief-row.is-fix > .icon { color: var(--warn); }
.lx-debrief-row.is-fix s { color: #ff8f88; }
.lx-debrief-row.is-fix b { color: var(--accent); }
.lx-debrief-row.is-next { border-color: var(--accent-line); background: var(--accent-soft); }
.lx-debrief-row.is-next > .icon { color: var(--accent); }

/* How it works: three steps on one line, joined by a hairline. */
.lx-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.lx-step { position: relative; display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-5); border-top: 1px solid var(--line-2); }
.lx-step::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 56px; height: 2px; background: var(--accent);
}
.lx-step-num { font-size: var(--step--1); color: var(--accent); }
.lx-step h3 { font-size: var(--step-2); font-weight: 800; }

/* Everything inside: compact tiles. */
.lx-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
}
.lx-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.lx-tile:hover { transform: translateY(-3px); border-color: var(--accent-line); background: var(--surface-2); }
.lx-tile:focus-visible { outline-offset: 2px; border-radius: 22px; }
.lx-tile-icon { margin-bottom: 6px; }
.lx-tile strong { font-size: var(--step-1); letter-spacing: -0.015em; }
.lx-tile-tag { color: var(--text-2); font-size: var(--step--1); line-height: 1.45; }
.lx-tile-free { align-self: flex-start; margin-top: auto; padding-top: 6px; font-size: var(--step--2); font-weight: 700; color: var(--accent); }

.lx-levels .level-card { cursor: default; }
.lx-levels .level-card:hover { transform: none; }

/* Plans. */
.lx-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); align-items: stretch; }
.lx-plan {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.lx-plan.is-featured {
  border-color: var(--accent-line);
  background: radial-gradient(120% 60% at 50% 0%, rgba(200, 255, 77, 0.08), transparent 70%), var(--surface);
}
.lx-plan-name { font-size: var(--step-2); font-weight: 800; }
.lx-plan-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.lx-plan-price .nums { font-size: var(--step-5); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.lx-plan-tag { margin: 0; font-size: var(--step--1); min-height: 2.8em; }
.lx-plan-list { display: grid; gap: 10px; margin: 0 0 auto; padding: 0; list-style: none; font-size: var(--step--1); color: var(--text-2); }
.lx-plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.lx-plan-list .icon { flex: none; color: var(--accent); margin-top: 2px; }

/* Questions. */
.lx-faq-shell { max-width: 860px; }
.lx-faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.lx-qa { border-bottom: 1px solid var(--line); }
.lx-qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 22px 4px; cursor: pointer; list-style: none;
  font-size: var(--step-1); font-weight: 700; letter-spacing: -0.012em;
}
.lx-qa summary::-webkit-details-marker { display: none; }
.lx-qa summary .icon { flex: none; color: var(--text-3); transition: transform var(--t) var(--ease); }
.lx-qa[open] summary .icon { transform: rotate(45deg); color: var(--accent); }
.lx-qa summary:hover { color: var(--accent-hot); }
.lx-qa p { margin: 0; padding: 0 4px 24px; color: var(--text-2); line-height: 1.65; max-width: 62ch; }

/* The last word. */
.lx-final {
  position: relative;
  overflow: hidden;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-5);
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px);
  border-radius: 36px;
  border: 1px solid var(--line-2);
  background: radial-gradient(100% 80% at 50% 120%, rgba(200, 255, 77, 0.12), transparent 60%), var(--surface);
}
.lx-final h2 { font-size: var(--step-5); max-width: 16em; }
.lx-final .lx-body { margin-inline: auto; }
.lx-final-lines { position: absolute; left: -2%; right: -2%; bottom: -46px; width: 104%; height: 150px; opacity: 0.3; pointer-events: none; }
.lx-final > :not(.lx-final-lines) { position: relative; }

/* ------------------------------------------------------------- tablets */

@media (max-width: 1100px) {
  .lx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .lx-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .lx-stage { max-width: 640px; }
  .lx-pillar, .lx-pillar.is-flip { grid-template-columns: minmax(0, 1fr); }
  .lx-pillar.is-flip .lx-pillar-copy { order: 0; }
  .lx-plans { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}

/* -------------------------------------------------------------- phones */

@media (max-width: 640px) {
  .lx-hero { padding-top: 20px; }
  .lx-h1 { letter-spacing: -0.042em; }
  .lx-hero-copy .btn-lg { flex: 1 1 100%; }
  .lx-trust { gap: 8px 16px; }
  .lx-stage { padding-bottom: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
  .lx-voice { border-radius: 24px; }
  .lx-voice .melody-canvas { height: 150px; }
  .lx-coach { position: static; width: auto; }
  .lx-steps { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .lx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lx-tile { padding: 16px 14px; border-radius: 18px; }
  .lx-tile strong { font-size: var(--step-0); }
  .lx-tile-tag { font-size: var(--step--2); }
  .lx-visual { min-height: 0; border-radius: 24px; }
  .lx-visual-line { font-size: var(--step-2); }
  .voice-lines { height: 110px; }
  .lx-final { border-radius: 26px; }
  .lx-qa summary { padding: 18px 2px; font-size: var(--step-0); }
  .lx-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lx-levels .level-card { padding: 16px 14px; border-radius: 18px; }
  .lx-levels .level-card p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-live i { animation: none; }
  .js .voice-lines path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; }
  .lx-tile, .lx-qa summary .icon { transition: none; }
}

/* ---------------------------------------------------- app sidebar groups
   (components/chrome.js, APP_GROUPS). Lives here with the rest of the
   30.10.2026 redesign; the sidebar's own rules are in views.css. */
.sidebar-nav { gap: var(--sp-4); }
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.sidebar-group-label {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 12px 6px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
}
.sidebar-fold > summary { cursor: pointer; list-style: none; border-radius: var(--r-sm); padding-top: 6px; }
.sidebar-fold > summary::-webkit-details-marker { display: none; }
.sidebar-fold > summary:hover { color: var(--text); }
.sidebar-fold > summary .icon { margin-left: auto; transition: transform var(--t) var(--ease); }
.sidebar-fold[open] > summary .icon { transform: rotate(180deg); }
.sidebar-fold-count {
  padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-2);
  font-size: 0.66rem; letter-spacing: 0; text-transform: none;
}

/* ------------------------------------------------------------- the coach
   (components/cards.js C.coachCard, data/coach.js): one thing to do today,
   and the five measures it came from. */
.coach-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--sp-5) var(--sp-6);
  align-items: center;
}
.coach-main { display: flex; flex-direction: column; gap: var(--sp-3); }
.coach-pick {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 16px; border-radius: 20px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--text);
  transition: transform var(--t) var(--ease), background var(--t) var(--ease);
}
.coach-pick:hover { transform: translateY(-2px); background: rgba(200, 255, 77, 0.16); }
.coach-pick strong { font-size: var(--step-1); letter-spacing: -0.015em; }
.coach-why { color: var(--text-2); font-size: var(--step--1); line-height: 1.45; }
.coach-pick-icon {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent); color: var(--text-on-accent);
}
.coach-go { flex: none; pointer-events: none; }
.coach-skills { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.coach-skill { display: grid; grid-template-columns: minmax(96px, 9.5em) minmax(0, 1fr) 5.2em; align-items: center; gap: var(--sp-3); font-size: var(--step--1); }
.coach-skill-name { color: var(--text-2); font-weight: 600; }
.coach-skill-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.coach-skill-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.coach-skill.is-weak .coach-skill-bar i { background: var(--warn); }
.coach-skill.is-picked .coach-skill-name { color: var(--accent); }
.coach-skill-value { text-align: right; font-weight: 700; }
.coach-skill.is-empty .coach-skill-value { color: var(--text-3); font-weight: 500; font-size: var(--step--2); }
.coach-note { grid-column: 1 / -1; margin: 0; font-size: var(--step--2); color: var(--text-3); }

/* After a conversation: the steps a coach would name. */
.coach-next .coach-step {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: 14px 16px; border-radius: 16px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.coach-next .coach-step:hover { border-color: var(--accent-line); background: var(--surface-3); }
.coach-next .coach-step .dim { font-size: var(--step--1); }
.coach-next .coach-step > .icon:last-child { color: var(--text-3); flex: none; }
.coach-next .coach-step.is-done { border-color: rgba(62, 224, 160, 0.35); }
.coach-next .coach-step.is-done strong { color: var(--ok); }
.coach-step-icon {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line);
}

/* The trainers on the dashboard: compact tiles, more to a row — the coach
   above already says which one to open. */
.dashboard-view .trainers-card .trainers-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.dashboard-view .trainers-card .trainer-tile { padding: 12px 14px; border-radius: 16px; }
.dashboard-view .trainers-card .trainer-icon { width: 36px; height: 36px; border-radius: 10px; }

@media (max-width: 860px) {
  .coach-card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .coach-skill { grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) 4.6em; gap: 10px; }
  .coach-pick { flex-wrap: wrap; }
  .coach-go { width: 100%; justify-content: center; }
  .dashboard-view .trainers-card .trainers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-view .trainers-card .trainer-tile { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dashboard-view .trainers-card .trainer-tile > svg:last-child { display: none; }
  .dashboard-view .trainers-card .trainer-tag { display: none; }
}
