/* ============================================================
   Windlume v2 — landing page  ·  direction "Modern Editorial"
   ------------------------------------------------------------
   Layout glue for index-v2.html. Consumes only tokens from
   lib/v2-theme.css (no literal colours below), so the palette
   stays in one place and both themes follow automatically.

   Structure follows design/qwen-index.md (qwen-max): hero with the
   three tests as the primary action, one secondary grid of five
   drills, utility links in the footer. The editorial shell — 12-col
   split, section tabs, hairline rules, numbered test tiles — is the
   curation layer described in design/CURATION.md.
   ============================================================ */

.v2-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- top bar ---------- */
.v2-top {
  border-bottom: 1px solid var(--v2-rule);
  background: var(--v2-bg);
}
.v2-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-sp-4);
  padding-top: var(--v2-sp-4);
  padding-bottom: var(--v2-sp-4);
  flex-wrap: wrap;
}
.v2-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-sp-2);
  text-decoration: none;
  color: var(--v2-text);
  min-width: 0;
}
.v2-brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  background: var(--v2-accent);
  color: var(--v2-accent-ink);
  border-radius: var(--v2-radius-sm);
  font-family: var(--v2-font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.v2-brand__name {
  font-family: var(--v2-font-display);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.v2-brand__sub {
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  text-transform: uppercase;
  color: var(--v2-text-subtle);
  padding-left: var(--v2-sp-2);
  border-left: 1px solid var(--v2-border);
  line-height: 1.6;
}
.v2-top__nav {
  display: flex;
  align-items: center;
  gap: var(--v2-sp-4);
  flex-wrap: wrap;
}
.v2-top__nav a {
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--v2-text-muted);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--v2-dur-fast) var(--v2-ease), border-color var(--v2-dur-fast) var(--v2-ease);
}
.v2-top__nav a:hover { color: var(--v2-text); border-bottom-color: var(--v2-accent); }
@media (max-width: 719px) {
  .v2-top__nav a:not(.v2-top__nav--keep) { display: none; }
  .v2-brand__sub { display: none; }
}

/* ---------- hero ---------- */
.v2-hero {
  padding-top: var(--v2-sp-9);
  padding-bottom: var(--v2-sp-7);
  border-bottom: 1px solid var(--v2-rule);
}
.v2-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--v2-sp-7);
  align-items: start;
}
@media (min-width: 960px) {
  .v2-hero__inner { grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr); gap: var(--v2-sp-9); }
}
.v2-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--v2-sp-3);
  margin: 0 0 var(--v2-sp-4);
  flex-wrap: wrap;
}
.v2-hero__title {
  font-family: var(--v2-font-display);
  font-size: var(--v2-fs-display);
  line-height: var(--v2-lh-display);
  letter-spacing: var(--v2-ls-display);
  font-weight: 650;
  margin: 0 0 var(--v2-sp-4);
  max-width: 20ch;
  text-wrap: balance;
  color: var(--v2-text);
}
.v2-hero__title em {
  font-style: normal;
  box-shadow: inset 0 -0.34em 0 var(--v2-accent-soft);
}
.v2-hero__lede {
  font-family: var(--v2-font-body);
  font-size: var(--v2-fs-body-lg);
  line-height: var(--v2-lh-body);
  color: var(--v2-text-muted);
  max-width: 46ch;
  margin: 0 0 var(--v2-sp-5);
}
.v2-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-sp-3);
  align-items: center;
}
.v2-hero__aside {
  border-left: 1px solid var(--v2-rule);
  padding-left: var(--v2-sp-5);
}
@media (max-width: 959px) {
  .v2-hero__aside {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--v2-rule);
    padding-top: var(--v2-sp-5);
  }
}
.v2-hero__aside-title {
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  text-transform: uppercase;
  color: var(--v2-text-subtle);
  margin: 0 0 var(--v2-sp-2);
  font-weight: 600;
}
.v2-hero__note {
  font-size: var(--v2-fs-body-sm);
  color: var(--v2-text-muted);
  line-height: 1.55;
  margin: var(--v2-sp-3) 0 0;
}

/* ---------- the three tests: primary action, editorial tiles ---------- */
.v2-tests {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--v2-border-strong);
  margin-top: var(--v2-sp-5);
}
@media (min-width: 768px) {
  .v2-tests { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.v2-test {
  display: flex;
  flex-direction: column;
  gap: var(--v2-sp-1);
  padding: var(--v2-sp-4) var(--v2-sp-4) var(--v2-sp-4) 0;
  border-bottom: 1px solid var(--v2-rule);
  text-decoration: none;
  color: var(--v2-text);
  min-width: 0;
  transition: background-color var(--v2-dur-fast) var(--v2-ease);
}
@media (min-width: 768px) {
  .v2-test {
    border-bottom: 0;
    border-right: 1px solid var(--v2-rule);
    padding: var(--v2-sp-4);
  }
  .v2-test:first-child { padding-left: 0; }
  .v2-test:last-child { border-right: 0; padding-right: 0; }
}
.v2-test:hover { background: var(--v2-accent-soft); color: var(--v2-text); }
.v2-test__num {
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  color: var(--v2-text-subtle);
  font-variant-numeric: tabular-nums;
}
.v2-test__name {
  font-family: var(--v2-font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: var(--v2-ls-heading);
  font-weight: 650;
  margin: 0;
  color: var(--v2-text);
}
.v2-test:hover .v2-test__name { color: var(--v2-accent); }
.v2-test__desc {
  font-family: var(--v2-font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--v2-text-muted);
  margin: 0;
}
.v2-test__meta {
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  text-transform: uppercase;
  color: var(--v2-text-subtle);
  margin-top: var(--v2-sp-2);
  padding-top: var(--v2-sp-2);
  border-top: 1px solid var(--v2-border);
}

/* ---------- sections ---------- */
.v2-section {
  padding-top: var(--v2-sp-8);
  padding-bottom: var(--v2-sp-7);
}
.v2-section + .v2-section { border-top: 1px solid var(--v2-rule); }
.v2-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--v2-sp-4);
  margin-bottom: var(--v2-sp-5);
  flex-wrap: wrap;
}
.v2-section__head .v2-tab { margin-bottom: var(--v2-sp-3); }
.v2-section__title {
  font-family: var(--v2-font-display);
  font-size: var(--v2-fs-h2);
  line-height: var(--v2-lh-heading);
  letter-spacing: var(--v2-ls-heading);
  font-weight: 650;
  margin: 0;
  color: var(--v2-text);
}
.v2-section__note {
  font-size: var(--v2-fs-body-sm);
  color: var(--v2-text-muted);
  max-width: 34ch;
  margin: 0;
  line-height: 1.55;
}

/* ---------- drill cards ---------- */
.v2-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--v2-sp-3);
}
@media (min-width: 720px) {
  .v2-cards--skill { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .v2-cards--skill { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.v2-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--v2-sp-2);
  padding: var(--v2-sp-4);
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  text-decoration: none;
  color: var(--v2-text);
  min-width: 0;
  transition: border-color var(--v2-dur-base) var(--v2-ease);
}
.v2-card:hover { border-color: var(--v2-accent); color: var(--v2-text); }
.v2-card:focus-visible { border-color: var(--v2-accent); }
.v2-card__num {
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  color: var(--v2-text-subtle);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.v2-card:hover .v2-card__num { color: var(--v2-accent); }
.v2-card__title {
  font-family: var(--v2-font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: var(--v2-ls-heading);
  font-weight: 650;
  margin: 0;
  color: var(--v2-text);
}
.v2-card__desc {
  font-family: var(--v2-font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--v2-text-muted);
  margin: 0;
  flex: 1 1 auto;
}
.v2-card__meta {
  margin: var(--v2-sp-2) 0 0;
  padding-top: var(--v2-sp-2);
  border-top: 1px solid var(--v2-border);
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  text-transform: uppercase;
  color: var(--v2-text-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-sp-2);
  line-height: 1.5;
}
.v2-card__go {
  margin-top: var(--v2-sp-2);
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  text-transform: uppercase;
  color: var(--v2-accent);
  font-weight: 600;
}

/* the numbered "start here" list in the hero rail */
.v2-index { border-top: 0; }
.v2-index > li:first-child { border-top: 0; }
.v2-index .v2-rows { border-top: 0; }

/* ---------- footer ---------- */
.v2-foot {
  margin-top: auto;
  border-top: 1px solid var(--v2-rule);
  padding-top: var(--v2-sp-5);
  padding-bottom: var(--v2-sp-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-sp-4);
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--v2-fs-body-sm);
  color: var(--v2-text-muted);
}
.v2-foot p { margin: 0; max-width: 52ch; line-height: 1.55; }
.v2-foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-sp-2) var(--v2-sp-4);
}
.v2-foot__nav a {
  font-family: var(--v2-font-mono);
  font-size: var(--v2-fs-label);
  letter-spacing: var(--v2-ls-label);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--v2-text-muted);
  border-bottom: 1px solid transparent;
  padding: 3px 0;
}
.v2-foot__nav a:hover { color: var(--v2-text); border-bottom-color: var(--v2-accent); }

/* room for the fixed theme button */
.v2-page { padding-bottom: var(--v2-sp-8); }
