/* =====================================================================
   Knotwing marketing site 鈥?shared stylesheet
   Plain CSS, no frameworks, no build step, no third-party fonts.

   Design tokens come from the owner-approved Figma prototype direction:
   page background #F5F7FC, white content surfaces, 18px cards,
   dark-ink primary buttons, one accent blue, system font stack only.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------- */
:root {
  /* palette — sampled from the Figma home and product pages, not chosen by eye.
     Home: #FFFFFF surface, #E2E8F0 hairlines, #111318 ink, #64748B muted.
     Product: #111318 ink, #586174 lede. Accent is purple (#5427E6) from the Logo section.
     Chinese note: colours are measured from the Figma pages, not approximated. */
  --bg: #FFFFFF;
  --paper: #F7F6F2;
  --surface: #FFFFFF;
  --ink: #111318;
  --ink-soft: #3F4753;
  --muted: #64748B;
  --lede: #586174;
  --nav: #626773;
  --hairline: #E2E8F0;
  /* The special colour is purple, not blue: sampled from color-1..color-5 in the Figma Logo
     section - #111318 ink, #FFFFFF, #5427E6, #6D4AFF, #ECEAFF, on a #F7F6F2 sheet. */
  --accent: #5427E6;
  --accent-bright: #6D4AFF;
  --accent-wash: #ECEAFF;
  --purple: #6D4AFF;
  --purple-wash: #ECEAFF;
  --success: #059669;
  --success-wash: #ECFDF5;
  /* The success fill is a light wash, so text on it takes the darker green the status pills already
     use: --success on --success-wash measures ~3.4:1, below AA for 14px text. */
  --success-ink: #065F46;
  --error: #B42318;
  --error-wash: #FEF3F2;

  /* tints derived from the tokens above (borders, hovers, washes) */
  --hairline-strong: #CBD5E1;
  --accent-border: #C9BDFF;
  --accent-soft: #ECEAFF;
  --accent-hover: #4320C4;

  /* shape */
  --radius-card: 18px;
  --radius-control: 10px;
  --radius-inner: 14px;
  --radius-pill: 20px;
  --radius-btn-pill: 12px;

  /* type: system stack only - PRD section 8 forbids third-party font requests */
  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* layout */
  --wrap-max: 1120px;
  --gutter: 24px;
  --space-section: 56px;

  /* effects */
  --shadow-card: 0 1px 2px rgba(17, 19, 24, 0.04),
    0 22px 48px -38px rgba(17, 19, 24, 0.55);
}

/* ---------------------------------------------------------------------
   2. Base
   --------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The header floats over the page, so an in-page jump must land below it rather than under it. */
html {
  scroll-padding-top: 100px;
}

@media (max-width: 639px) {
  html {
    scroll-padding-top: 84px;
  }
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(26px, 3.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

svg,
img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------
   3. Accessibility helpers
   --------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--radius-control);
  background-color: var(--ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:hover {
  color: #ffffff;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  color: #ffffff;
}

:where(a, button, [tabindex], summary, input):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

main:focus {
  outline: none;
}

/* ---------------------------------------------------------------------
   4. Layout primitives
   --------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: calc(var(--space-section) / 2);
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-head h2 {
  margin-bottom: 12px;
}

.section-head p {
  margin: 0;
  font-size: 17px;
}

.page-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.page-head h1 {
  margin-bottom: 16px;
}

.page-head .lede {
  margin: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.lede {
  font-size: 17px;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 20px;
}

ul.grid,
ul.step-list,
ul.capability-index,
ul.contact-list,
ul.mini-list {
  padding-left: 0;
  list-style: none;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------------------------------------------------------------------
   5. Header / navigation
   --------------------------------------------------------------------- */
/* Header, per the Figma home page: a floating pill that the page scrolls behind. Measured values:
   80% white fill, #E2E8F0 hairline, 20px radius, 0 1px 2px rgba(0,0,0,.05), 24px backdrop blur,
   62px tall with 12/20 padding, nav at 14px/600 #626773, action pill #111318 at 12px radius, 36 tall. */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 30;
  padding-inline: 32px;
}

.header-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
  max-width: 1216px;
  margin: 0 auto;
  padding: 12px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

/* Without backdrop blur the 80% fill lets text collide with content behind it; go opaque. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header-pill {
    background-color: var(--surface);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

/* Products menu. Hover opens it on a pointer device, and the button also toggles it so a keyboard or
   touch visitor can reach the same list; the 6px gap is padded so moving the pointer from the trigger
   into the panel does not close it. */
.nav-menu {
  position: relative;
}

.nav-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--nav);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.nav-menu-trigger:hover,
.nav-menu-trigger[aria-expanded="true"] {
  color: var(--ink);
}

.nav-menu-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentcolor;
  border-bottom: 1.5px solid currentcolor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 140ms ease;
}

.nav-menu-trigger[aria-expanded="true"] .nav-menu-chevron {
  transform: translateY(1px) rotate(225deg);
}

.nav-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  z-index: 40;
  min-width: 340px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background-color: var(--surface);
  box-shadow: 0 16px 40px -12px rgba(17, 19, 24, 0.18);
  /* Invisible gap-bridge so the pointer can travel from the trigger into the panel. */
  padding-top: 8px;
}

.nav-menu-list::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-menu-list[hidden] {
  display: none;
}

.menu-item a,
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}

/* A hairline between rows: without it three stacked rows read as one block of text. */
.menu-item + .menu-item {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  border-radius: 0 0 10px 10px;
}

.menu-item a:hover {
  background-color: var(--accent-wash);
}

.menu-item.is-planned {
  cursor: default;
}

/* min-width:0 lets the name wrap inside the row instead of pushing the status pill off the edge. */
.menu-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.menu-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.menu-category {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}

/* Status as a pill, so it reads as a state rather than as a third line of the name. */
.menu-status {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background-color: var(--success-wash);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.menu-status-planned {
  background-color: var(--accent-wash);
  color: #6B21A8;
}

.menu-item.is-planned .menu-name {
  color: var(--ink-soft);
}

@media (hover: hover) and (pointer: fine) {
  .nav-menu:hover .nav-menu-list,
  .nav-menu:focus-within .nav-menu-list {
    display: block;
  }
}
/* The lockup is the SVG exported from the Figma layer "Link - Brand Lockup", not a redrawing:
   icon square plus wordmark as one drawing, so the mark cannot drift from the design. */
.brand-lockup {
  display: block;
  width: auto;
  height: 36px;
}

/* The app icon on its own, used where only the mark fits. */
.brand-icon {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover .brand-name {
  color: var(--accent-hover);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-block: 4px;
  color: var(--nav);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.header-login {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-block: 4px;
  color: var(--nav);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-login:hover {
  color: var(--ink);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 20px;
  border-radius: var(--radius-btn-pill);
  background-color: var(--ink);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.btn-pill:hover {
  background-color: #000000;
  color: #FFFFFF;
}

.header-cta {
  flex: none;
}

/* ---------------------------------------------------------------------
   6. Buttons, badges, notices
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background-color: var(--ink);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #000000;
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--surface);
  border-color: var(--hairline);
  color: var(--accent);
}

.btn-secondary:hover {
  background-color: #F8FAFF;
  border-color: var(--hairline-strong);
  color: var(--accent-hover);
}

.btn:disabled,
.btn[disabled] {
  background-color: #EDF0F6;
  border-color: var(--hairline);
  color: #5A6678;
  cursor: not-allowed;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  background-color: #EDF0F6;
  border-color: var(--hairline);
  color: #5A6678;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: var(--accent-soft);
  /* #5427E6 on #ECEAFF clears AA for 12px bold text. */
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-success {
  background-color: var(--success-wash);
  color: var(--success);
}

.notice {
  margin: 0 0 28px;
  padding: 16px 20px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-inner);
  background-color: var(--accent-wash);
  color: #1C3F86;
  font-size: 16px;
}

.notice strong {
  color: #142F66;
}

.notice p {
  margin: 0;
}

.callout {
  padding: 18px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-inner);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.control-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

/* Renewal, cancellation and tax sit beside the price, not only in the terms (risk register L-25).
   Deliberately quieter than the price but above the fold of the plan cards: readable, not a footnote
   in a colour that fails contrast. */
.billing-note {
  margin: 24px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-inner);
  background-color: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  /* Matches the refund note's measure so a billing paragraph does not run the full width of the
     plan grid: an unattractive 140-character line is also a hard-to-read one. */
  max-width: 72ch;
}

.billing-note strong {
  color: var(--ink);
}

.muted {
  color: var(--muted);
}

/* ---------------------------------------------------------------------
   6b. Family home: product rows
   Measured from the Figma board "Home-0.2": every product is a full-width card
   on #F8FAFC with a 28px radius and a hairline border, copy on the left, the
   product's own artwork on the right.
   --------------------------------------------------------------------- */
.product-stack {
  display: grid;
  gap: 24px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 420fr) minmax(0, 642fr);
  gap: 40px;
  align-items: center;
  padding: 33px;
  border: 1px solid var(--hairline);
  border-radius: 28px;
  background-color: #F8FAFC;
}

.product-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-eyebrow {
  margin: 0 0 10px;
  color: #525E70;
  /* 12px floor: an 11px all-caps label is below the readable minimum the checker enforces. */
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-name {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.status-pill {
  margin: 0 0 16px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill-active {
  background-color: #ECFDF5;
  color: #065F46;
}

.status-pill-planned {
  background-color: var(--accent-wash);
  color: #6B21A8;
}

.product-category {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-desc {
  margin: 0 0 18px;
  color: #424D5C;
  font-size: 16px;
  line-height: 1.55;
}

.product-copy .chip-list {
  margin: 0 0 24px;
}

.product-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background-color: var(--surface);
}

@media (max-width: 1023px) {
  .product-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
  }
}

@media (max-width: 639px) {
  .product-row {
    padding: 20px;
    border-radius: 20px;
  }

  .product-name {
    font-size: 26px;
  }
}


/* ---------------------------------------------------------------------
   7. Hero (home)
   --------------------------------------------------------------------- */
.hero {
  padding-block: 44px 0;
}

.hero-card h1 {
  max-width: 20ch;
  margin-bottom: 24px;
}

.hero-card .lede {
  max-width: 66ch;
  margin-bottom: 32px;
}

/* Hero: compact copy, then one large screenshot at full content width. The image is the argument, so
   it gets the width; a small thumbnail beside the text would make a real plugin look like a sketch. */
.hero-intro {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
}

.hero-intro h1 {
  margin-bottom: 20px;
}

.hero-intro .lede {
  margin-inline: auto;
  margin-bottom: 30px;
}

.hero-intro .actions {
  justify-content: center;
}

.status-chip {
  display: inline-block;
  margin: 0 0 22px;
  padding: 7px 14px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background-color: var(--accent-wash);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  box-shadow: 0 24px 60px rgba(17, 19, 24, 0.1);
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Screenshot rows: one per line at full width, because these are dense UI captures and shrinking
   them to a third of the page hides the thing they are meant to prove. */
.shot-stack {
  display: grid;
  gap: 28px;
}

.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
}

.shot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.shot figcaption {
  display: grid;
  gap: 8px;
  padding: 26px 30px 22px;
}

.shot figcaption h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.shot figcaption p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--hairline);
}

@media (max-width: 860px) {
  .shot-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.step-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background-color: var(--paper);
  /* #64748B on the paper tint measures 4.44:1 - just under AA, so the small label takes darker ink. */
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------------
   8. Cards
   --------------------------------------------------------------------- */
.card {
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* three problem / solution columns */
.problem-card {
  position: relative;
  padding-top: 46px;
}

.problem-card::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 28px;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background-color: var(--accent);
}

/* capability cards */
.capability-card {
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.capability-card h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.capability-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------------
   9. Trial module (the product page links to it; the module lives on
      the pricing page, inside the SVO panel)
   --------------------------------------------------------------------- */
/* The module sits inside a tab panel that already has its own spacing, so it must not inherit the
   page-level .section padding: that would double the gap and push the explanations offline. */
.trial-section {
  margin-top: 32px;
}

.trial-panel {
  padding: 48px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-card);
  background-color: var(--accent-wash);
}

.trial-panel .eyebrow {
  margin-bottom: 12px;
}

.trial-heading {
  margin-bottom: 14px;
  font-size: clamp(26px, 2.8vw, 30px);
}

.trial-lede {
  max-width: 62ch;
  margin: 0 0 24px;
  color: #1C3F86;
  font-size: 17px;
}

.trial-actions {
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.trial-actions-note {
  color: #1C3F86;
  font-size: 14px;
}

.trial-toolbar {
  margin-bottom: 8px;
}

.trial-steps {
  margin-top: 14px;
}

.trial-steps[hidden] {
  margin-top: 0;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  counter-reset: step;
}

.step {
  padding: 22px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-inner);
  background-color: var(--surface);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 50%;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.step h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.step p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.55;
}

.step p:last-child {
  margin-bottom: 0;
}

.step .link {
  font-size: 16px;
}

.signin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--accent-border);
}

.signin .control-note {
  flex-basis: 100%;
  text-align: left;
  font-size: 14px;
}

.trial-note {
  max-width: 68ch;
  margin: 20px 0 0;
  color: #1C3F86;
  font-size: 16px;
}

.trial-note strong {
  color: #142F66;
}

/* ---------------------------------------------------------------------
   10. Pricing (home teasers + pricing page)
   --------------------------------------------------------------------- */
.plan-teaser {
  display: block;
  padding: 30px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plan-teaser:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-card);
  color: var(--muted);
}

.plan-teaser .label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.plan-teaser .price {
  margin-bottom: 8px;
}

.plan-teaser .plan-note {
  margin-bottom: 18px;
}

.plan-teaser .link {
  color: var(--accent);
  font-weight: 700;
}

.plan-teaser:hover .link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
}

.price-amount {
  color: var(--ink);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price-period {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.plan-note {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}



.plan-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.plan-card-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.plan-card .price {
  margin-bottom: 10px;
}

.plan-card .plan-note {
  margin-bottom: 24px;
}

.plan-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.compare-card h3 {
  margin-bottom: 14px;
}

.compare-card .badge {
  margin-left: 8px;
  vertical-align: middle;
}

.compare-copy {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.compare-copy strong {
  color: var(--ink);
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  list-style: none;
  font-size: 16px;
  line-height: 1.55;
}

.mini-list li {
  position: relative;
  padding-left: 26px;
}

.mini-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--accent);
}

.capability-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.capability-index a {
  display: inline-block;
  padding-block: 4px;
  font-weight: 600;
}

.trial-callout {
  margin: 32px 0 10px;
}

/* The inline link inside the callout is a real destination, so it needs a real hit area: the
   measured height of a bare inline link here was 21px, below the 24px minimum. Padding rather than
   a taller line box, so the surrounding sentence keeps its rhythm. */
.trial-callout a {
  display: inline-block;
  padding: 4px 2px;
  margin: -4px -2px;
}

.trial-callout + .control-note {
  text-align: left;
}

.refund-note {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* ---------------------------------------------------------------------
   11. Features page
   --------------------------------------------------------------------- */
.feature-card {
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.feature-card h2 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 40px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-card);
  background-color: var(--accent-wash);
}

.cta-band h2 {
  margin-bottom: 6px;
  font-size: 26px;
}

.cta-band p {
  margin: 0;
  color: #1C3F86;
  font-size: 16px;
}

.cta-band .actions {
  flex-wrap: nowrap;
}

.band-note {
  margin: 10px 0 0;
  color: #1C3F86;
  font-size: 14px;
}

/* ---------------------------------------------------------------------
   12. FAQ page
   --------------------------------------------------------------------- */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 358fr) minmax(0, 754fr);
  gap: 40px;
  align-items: start;
}

.faq-head {
  position: sticky;
  top: 24px;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}

.faq-item h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.64;
}

.faq-item p + p {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .faq-head {
    position: static;
  }
}

.faq-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.faq-foot {
  max-width: 860px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 16px;
}

/* ---------------------------------------------------------------------
   13. Legal / long-form prose
   --------------------------------------------------------------------- */
.legal-card {
  max-width: 1024px;
  margin-inline: auto;
  padding: 56px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.draft-banner {
  display: inline-block;
  margin: 0 0 26px;
  padding: 8px 14px;
  border: 1px solid #F5CFC9;
  border-radius: var(--radius-control);
  background-color: var(--error-wash);
  color: var(--error);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.prose {
  /* The board leaves 912px for text and the lines run that width; a 65ch cap would re-narrow the card. */
  max-width: none;
}

.prose > :first-child {
  margin-top: 0;
}

.legal-card h1 {
  margin-bottom: 8px;
}

.legal-meta {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 16px;
}

.prose h2 {
  margin: 40px 0 12px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.prose p {
  margin: 0 0 1em;
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--accent);
}

.prose strong {
  color: var(--ink);
}

.prose a {
  overflow-wrap: anywhere;
}

.placeholder {
  padding: 1px 5px;
  border: 1px dashed var(--hairline-strong);
  border-radius: 5px;
  background-color: var(--bg);
  color: var(--ink);
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   14. Contact / 404
   --------------------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 408fr) minmax(0, 576fr);
  gap: 40px;
  align-items: start;
  max-width: 1024px;
  margin-inline: auto;
}

.contact-card {
  padding: 40px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.contact-email {
  display: inline-block;
  color: var(--accent);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.contact-topics {
  display: grid;
  gap: 18px;
  align-content: start;
}

.contact-topic {
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-inner);
  background-color: var(--surface);
}

.contact-topic h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.contact-topic p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
.contact-list {
  display: grid;
  gap: 12px;
  max-width: 62ch;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
}

.contact-list li {
  position: relative;
  padding-left: 26px;
}

.contact-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--accent);
}

.notfound-card {
  max-width: 720px;
  margin-inline: auto;
  padding: 72px 56px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.notfound-card h1 {
  margin-bottom: 16px;
}

.notfound-card p {
  max-width: 52ch;
  margin: 0 auto 28px;
  font-size: 17px;
}

.notfound-card .actions {
  justify-content: center;
}

.notfound-card p.notfound-foot {
  max-width: none;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
}

/* ---------------------------------------------------------------------
   15. Footer
   --------------------------------------------------------------------- */
/* Footer, per the Figma home page: a link directory on white with a brand bar underneath.
   Measured: #FFFFFF surface, #E2E8F0 hairline, 48px padding, 12px #3F4753 links,
   12px titles above each column. */
.site-footer {
  margin-top: calc(var(--space-section) / 2);
  background-color: var(--surface);
  border-top: 1px solid var(--hairline);
}

.footer-inner {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 48px var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  min-width: 24px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  width: fit-content;
  /* A 12px link is a 19px tall target. Padding brings it past the 24px minimum without changing how
     the row looks, since the column already spaces its children. */
  padding-block: 4px;
}

.footer-col a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}



.footer-brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.footer-tagline {
  color: var(--ink-soft);
  font-size: 12px;
}

.footer-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

.footer-legal {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------------
   16. Motion preferences
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------
   17. Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    padding: 64px 48px;
  }
}

@media (max-width: 767px) {
  .section-head {
    margin-bottom: 28px;
  }

  .trial-panel {
    padding: 32px 24px;
  }

  .legal-card {
    padding: 36px 24px;
  }

  .contact-card {
    padding: 32px 24px;
  }

  .notfound-card {
    padding: 48px 24px;
  }

  .cta-band {
    padding: 28px 24px;
  }

  .cta-band .actions {
    flex-wrap: wrap;
  }

  .faq-item {
    padding: 22px;
  }
}

@media (max-width: 639px) {
  :root {
    --space-section: 56px;
    --gutter: 20px;
  }

  body {
    font-size: 16px;
  }

  /* The pill wraps into two rows: brand and actions on top, nav beneath. Everything stays visible
     and tappable instead of scrolling off the edge. */
  .header-pill {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 14px;
    padding: 10px 16px;
    min-height: 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    gap: 20px;
    padding-top: 4px;
  }

  .site-nav a {
    font-size: 14px;
    padding-block: 6px;
  }

  .header-actions {
    margin-left: auto;
    gap: 12px;
  }

  .header-login {
    padding: 8px 2px;
  }

  .site-header {
    top: 8px;
    padding-inline: 12px;
  }

  .hero {
    padding-block: 22px 0;
  }

  .hero-intro {
    margin-bottom: 30px;
    text-align: left;
  }

  .hero-intro .actions {
    justify-content: flex-start;
  }

  .hero-card h1 {
    max-width: none;
    margin-bottom: 18px;
  }

  .hero-card .lede {
    font-size: 17px;
    margin-bottom: 26px;
  }

  .shot-row figcaption {
    padding: 20px 22px 24px;
  }

  .shot-row figcaption strong {
    font-size: 19px;
  }

  .header-inner {
    gap: 14px;
    padding-inline: 16px;
    border-radius: 20px;
  }

  .site-header {
    top: 8px;
    padding-inline: 10px;
  }

  .header-actions {
    gap: 12px;
  }

  .header-login {
    font-size: 15px;
  }

  .actions .btn {
    width: 100%;
  }

  .cta-band .actions .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .step-list,
  .compare-grid,
  .capability-index {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-teaser,
  .plan-card,
  .card,
  .feature-card,
  .capability-card {
    padding: 22px;
  }

  .problem-card {
    padding-top: 42px;
  }

  .problem-card::before {
    top: 22px;
    left: 22px;
  }

  .price-amount {
    font-size: 34px;
  }

  .footer-inner {
    gap: 14px 20px;
  }

  .footer-brand {
    margin-right: 0;
    flex-basis: 100%;
  }
}

/* ---------------------------------------------------------------------
   Responsive overrides that must win over the base rules above
   --------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  /* Four link columns do not fit a phone; two rows of two keep the labels from colliding. */
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
  }

  .footer-inner {
    padding: 36px var(--gutter);
  }

  .footer-bottom {
    margin-top: 26px;
  }

  .footer-tagline {
    display: none;
  }

  /* 12px labels are short targets; padding lifts every one past the 24px minimum. */
  .site-nav a {
    padding-block: 6px;
  }

  .header-login {
    padding-block: 6px;
  }
}

@media (max-width: 639px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  /* A full-width link row is easier to hit and cannot overlap its neighbour. */
  .footer-col a {
    padding-block: 6px;
  }

  .footer-brand {
    flex-wrap: wrap;
  }
}
/* On a phone the menu cannot hang off a trigger near the right edge without leaving the screen, so it
   is pinned to the viewport instead of to the trigger. */
@media (max-width: 767px) {
  .nav-menu {
    position: static;
  }

  .nav-menu-list {
    left: 0;
    right: 0;
    width: auto;
    min-width: 0;
  }
}
/* ---------------------------------------------------------------------
   Product switcher (pricing page)
   Sliding-indicator tabs: a capsule slides to the active tab over 300ms and
   the panel fades up 6px. Inactive panels are `hidden` rather than transparent
   because they differ in height by hundreds of pixels.
   --------------------------------------------------------------------- */
.product-switch {
  margin-bottom: 8px;
}

.switch-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 6px;
  margin-bottom: 32px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background-color: var(--surface);
}

/* Wide product names overflow a phone; the strip scrolls instead of shrinking the labels. */
@media (max-width: 767px) {
  .switch-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .switch-tabs::-webkit-scrollbar {
    display: none;
  }
}

.switch-ink {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 0;
  border-radius: 10px;
  background-color: var(--accent-wash);
  box-shadow: inset 0 0 0 1px var(--accent-border);
  transition:
    left 0.3s cubic-bezier(0.2, 0.8, 0.25, 1),
    width 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.switch-tab {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.22s;
}

.switch-tab:hover {
  color: var(--ink);
}

.switch-tab.is-active {
  color: var(--ink);
}

.switch-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.switch-panel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .switch-ink {
    transition: none;
  }
}

/* A product that cannot be bought yet. It says so, and offers no price rather than a placeholder. */
.planned-panel {
  padding: 40px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--paper);
}

/* The status pill is a flex item inside a block panel; without this it stretches to the full width. */
.planned-panel .status-pill {
  align-self: flex-start;
  width: fit-content;
}

.planned-panel h2 {
  margin: 16px 0 12px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.planned-copy {
  max-width: 60ch;
  margin: 0 0 16px;
  color: var(--lede);
  font-size: 17px;
  line-height: 1.6;
}

.planned-note {
  max-width: 60ch;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-control);
  background-color: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 639px) {
  .planned-panel {
    padding: 24px;
  }

  /* The status pill is a flex item inside a block panel; without this it stretches to the full width. */
.planned-panel .status-pill {
  align-self: flex-start;
  width: fit-content;
}

.planned-panel h2 {
    font-size: 22px;
  }

  .planned-copy {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------------
   18. Account and sign-in
   The Figma flow screens (section "SVO · Sign-in, trial and subscription")
   are one narrow card: eyebrow, heading, form, full-width primary button,
   secondary actions underneath. That shape is kept here; the prototype's
   tinted page background is not, because this site's pages are white and
   its own cards carry the hairline + shadow instead. Every colour is a
   token from section 1 - no second palette.
   --------------------------------------------------------------------- */
.auth-section {
  padding-block: 40px calc(var(--space-section) / 2);
}

.auth-card {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding: 40px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
}

.auth-card .eyebrow {
  margin-bottom: 14px;
}

.auth-card h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 3.6vw, 38px);
}

.auth-card .lede {
  margin: 0 0 24px;
  color: var(--lede);
}

.auth-subtitle {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.auth-copy {
  margin: 0 0 20px;
  color: var(--lede);
  font-size: 16px;
  line-height: 1.6;
}

.auth-copy strong {
  color: var(--ink);
}

.auth-links {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 600;
}

/* Async feedback. role="status"/aria-live is on the element; these three classes are the only
   treatments, so a server message and a local confirmation cannot drift apart visually. */
.auth-status {
  margin: 0 0 20px;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.auth-status:empty {
  display: none;
}

.auth-status-ok {
  padding: 12px 16px;
  background-color: var(--success-wash);
  color: var(--success-ink);
}

.auth-status-error {
  padding: 12px 16px;
  background-color: var(--error-wash);
  color: var(--error);
}

.auth-status-info {
  padding: 12px 16px;
  background-color: var(--accent-wash);
  color: var(--accent);
}

.auth-form {
  margin: 0;
}

.auth-form .btn-block {
  margin-top: 4px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.auth-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-note-plain {
  margin: 14px 0 0;
  padding-top: 0;
  border-top: 0;
}

/* A lone link inside a 14px note is a 22px target; padding lifts it past 24px without making the
   sentence look like a button. */
.auth-note a {
  display: inline-block;
  padding-block: 3px;
}

/* The two exits from the auth card, on one line when there is room. Inside a 560px card the pair fits
   with room to spare, and it wraps rather than shrinking below a comfortable target on a narrow screen. */
.auth-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 600;
}

/* A bare inline link is a 22px target. Padding lifts each one past the 24px floor without turning the
   row into buttons. */
.auth-footer a {
  display: inline-block;
  padding-block: 3px;
}

/* ---------------------------------------------------------------------
   Sign-in dialog
   ---------------------------------------------------------------------
   A native <dialog>, so focus trapping, Escape to close and the backdrop come from the platform rather
   than from a hand-rolled focus loop. It carries only three states (email, code, recovery); anything
   with legal copy around it stays on signin.html.
   --------------------------------------------------------------------- */
.auth-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.auth-dialog::backdrop {
  background-color: rgba(17, 19, 24, 0.42);
}

.auth-dialog-inner {
  position: relative;
  padding: 40px;
  overflow-y: auto;
  max-height: inherit;
}

.auth-dialog-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.auth-dialog-lede {
  margin: 0 0 22px;
  color: var(--lede);
  font-size: 16px;
  line-height: 1.6;
}

.auth-dialog-body .auth-note {
  margin-top: 24px;
}

/* A 44px close target in the corner, drawn with two borders so no icon font or extra request is needed. */
.auth-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-dialog-close::before,
.auth-dialog-close::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 1.5px;
  background-color: currentcolor;
}

.auth-dialog-close::before {
  transform: rotate(45deg);
}

.auth-dialog-close::after {
  transform: rotate(-45deg);
}

.auth-dialog-close:hover {
  border-color: var(--hairline);
  color: var(--ink);
}

.auth-dialog-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* The dialog replaces the page scroll: with it open the page behind must not scroll, or a trackpad flick
   moves the content under the modal and the close button appears to drift. */
.auth-dialog[open] ~ *,
.auth-dialog[open] {
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: no-preference) {
  .auth-dialog[open] {
    animation: auth-dialog-in 160ms ease-out;
  }

  .auth-dialog[open]::backdrop {
    animation: auth-backdrop-in 160ms ease-out;
  }
}

@keyframes auth-dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
}

@keyframes auth-backdrop-in {
  from {
    opacity: 0;
  }
}

/* Form fields. 48px tall so the input is comfortably above the 24px target floor, and the label is
   a real <label> tied to the input rather than placeholder-only. */
.field {
  display: block;
  margin: 0 0 18px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-control);
  background-color: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.field input:hover {
  border-color: var(--muted);
}

.field input:focus-visible {
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.field-code input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  /* 18px box + 21px text line is under the 24px target floor; the row itself carries the target and
     the whole label is clickable, so the minimum lives here rather than on the box. */
  min-height: 24px;
  margin: 0 0 20px;
  color: var(--lede);
  font-size: 14px;
  line-height: 1.5;
}

.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

/* Account page blocks: plan band, then devices. The band is the one full-width state readout, the
   way the Figma screens show "Style & Variables Optimizer · Free" / "Pro Monthly is active". */
.account-block {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.account-block-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.plan-band {
  display: block;
  margin: 0 0 12px;
  padding: 13px 16px;
  border-radius: var(--radius-control);
  background-color: var(--accent-wash);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.plan-band.is-active {
  background-color: var(--success-wash);
  color: var(--success-ink);
}

.plan-band.is-ended {
  background-color: var(--error-wash);
  color: var(--error);
}

.plan-band.is-pending {
  background-color: var(--accent-wash);
  color: #6B21A8;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* A state notice inside a card block: the shared .notice carries a 28px bottom margin that would
   separate it from the device list it explains. */
.account-plan-notice {
  margin: 12px 0 0;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.55;
}

.account-honesty {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

.devices-summary {
  margin: 0 0 6px;
  color: var(--lede);
  font-size: 14px;
  font-weight: 600;
}

.device-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}

.device-list .device-row:first-child {
  border-top: 0;
}

.device-text {
  min-width: 0;
}

.device-name {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.device-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.device-deactivate {
  flex: none;
  color: var(--error);
}

.device-deactivate:hover {
  border-color: var(--hairline-strong);
  color: var(--error);
}

/* ---------------------------------------------------------------------
   19. Signed-in header control
   The static markup is the Log in link. Once the first-party script learns
   the visitor is signed in it swaps in the initial + menu; the slot is sized
   for both states so the swap cannot move the nav.
   --------------------------------------------------------------------- */
.header-account {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 60px;
  min-height: 36px;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 2px 4px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--nav);
  font-family: inherit;
  cursor: pointer;
}

.account-trigger:hover,
.account-trigger[aria-expanded="true"] {
  color: var(--ink);
}

.account-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--accent-wash);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.account-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentcolor;
  border-bottom: 1.5px solid currentcolor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 140ms ease;
}

.account-trigger[aria-expanded="true"] .account-chevron {
  transform: translateY(1px) rotate(225deg);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 232px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background-color: var(--surface);
  box-shadow: 0 16px 40px -12px rgba(17, 19, 24, 0.18);
}

.account-menu[hidden] {
  display: none;
}

.account-menu-email {
  margin: 0;
  padding: 8px 12px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.account-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background-color: var(--accent-wash);
  color: var(--accent);
}

.account-menu-status {
  margin: 6px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: var(--error-wash);
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.account-menu-status:empty {
  display: none;
}

@media (max-width: 639px) {
  .auth-card {
    padding: 26px 20px;
  }

  .auth-section {
    padding-block: 26px calc(var(--space-section) / 2);
  }

  .auth-actions {
    flex-direction: column;
  }

  .auth-actions .btn {
    width: 100%;
  }

  .account-actions {
    flex-direction: column;
  }

  .account-actions .btn {
    width: 100%;
  }

  .device-row {
    flex-wrap: wrap;
  }

  .device-deactivate {
    width: 100%;
  }

  .header-account {
    min-width: 52px;
  }

  .account-menu {
    min-width: 210px;
  }
}
