/*
 * Whimbrel on Material 3 (https://m3.material.io): components and layout.
 * Tokens (color roles from the logo, type, shape, elevation) are in
 * m3-tokens.css, generated by tools/colors.mjs. No framework.
 */

:root {
  --page-max: 1120px;
  --gutter: 24px;
}
/* Color, type, shape and elevation tokens live in m3-tokens.css. */

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: 400 1rem/1.5rem var(--md-ref-typeface-plain);
  letter-spacing: 0.031rem;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--md-sys-color-primary); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; border-radius: 4px; }
code, pre { font-family: var(--md-ref-typeface-mono); font-size: 0.875rem; }
code {
  background: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-extra-small);
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}
pre {
  margin: 0 0 1rem;
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 16px;
  overflow-x: auto;
  line-height: 1.45;
}
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--md-sys-color-outline-variant); margin: 32px 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--md-sys-color-surface); padding: 8px 12px; }

/* ---- M3 type scale ---- */
.display-large { font: 400 3.5625rem/4rem var(--md-ref-typeface-brand); letter-spacing: -0.016rem; }
.display-medium { font: 400 2.8125rem/3.25rem var(--md-ref-typeface-brand); letter-spacing: 0; }
.display-small { font: 400 2.25rem/2.75rem var(--md-ref-typeface-brand); letter-spacing: 0; }
.headline-large { font: 400 2rem/2.5rem var(--md-ref-typeface-brand); letter-spacing: 0; }
.headline-medium { font: 400 1.75rem/2.25rem var(--md-ref-typeface-brand); letter-spacing: 0; }
.headline-small { font: 400 1.5rem/2rem var(--md-ref-typeface-brand); letter-spacing: 0; }
.title-large { font: 400 1.375rem/1.75rem var(--md-ref-typeface-brand); letter-spacing: 0; }
.title-medium { font: 500 1rem/1.5rem var(--md-ref-typeface-plain); letter-spacing: 0.009rem; }
.title-small { font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain); letter-spacing: 0.006rem; }
.body-large { font: 400 1rem/1.5rem var(--md-ref-typeface-plain); letter-spacing: 0.031rem; }
.body-medium { font: 400 0.875rem/1.25rem var(--md-ref-typeface-plain); letter-spacing: 0.016rem; }
.body-small { font: 400 0.75rem/1rem var(--md-ref-typeface-plain); letter-spacing: 0.025rem; }
.label-large { font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain); letter-spacing: 0.006rem; }
.label-medium { font: 500 0.75rem/1rem var(--md-ref-typeface-plain); letter-spacing: 0.031rem; }

h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 400; color: var(--md-sys-color-on-surface); text-wrap: balance; }
h1 { font: 400 2.8125rem/3.25rem var(--md-ref-typeface-brand); }
h2 { font: 400 2rem/2.5rem var(--md-ref-typeface-brand); }
h3 { font: 400 1.375rem/1.75rem var(--md-ref-typeface-brand); }
h4 { font: 500 1rem/1.5rem var(--md-ref-typeface-plain); letter-spacing: 0.009rem; }
p { margin: 0 0 16px; text-wrap: pretty; }
ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li { margin: 4px 0; }
.muted { color: var(--md-sys-color-on-surface-variant); }
.lede { font: 400 1.375rem/1.875rem var(--md-ref-typeface-brand); color: var(--md-sys-color-on-surface-variant); max-width: 44ch; }
.eyebrow { font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain); letter-spacing: 0.06rem;
  text-transform: uppercase; color: var(--md-sys-color-primary); margin: 0 0 12px; }

@media (max-width: 720px) {
  h1, .display-medium { font-size: 2.25rem; line-height: 2.75rem; }
  h2 { font-size: 1.75rem; line-height: 2.25rem; }
  .lede { font-size: 1.125rem; line-height: 1.625rem; }
  :root { --gutter: 16px; }
}

/* ---- Material Symbols ---- */
.icon {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr;
  display: inline-block; vertical-align: middle;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  user-select: none;
}

/* ---- layout ---- */
.wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.band { background: var(--md-sys-color-surface-container-low); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 720px) { section { padding: 44px 0; } }

/* ---- top app bar ---- */
.top-app-bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--md-sys-color-surface);
  transition: background 200ms var(--md-sys-motion-easing-standard), box-shadow 200ms;
}
.top-app-bar.scrolled { background: var(--md-sys-color-surface-container); }
.top-app-bar .wrap { display: flex; align-items: center; gap: 8px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--md-sys-color-on-surface); font: 500 1.125rem/1.5rem var(--md-ref-typeface-brand);
  white-space: nowrap; margin-right: auto; min-width: 0;
}
.brand .mark { width: 36px; height: 36px; flex: none; display: block; }
.brand small { color: var(--md-sys-color-on-surface-variant); font: 500 0.75rem/1rem var(--md-ref-typeface-plain);
  letter-spacing: 0.03rem; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a.text-button { color: var(--md-sys-color-on-surface-variant); }
.nav a.text-button[aria-current="page"] { color: var(--md-sys-color-primary); }
.nav .menu-button { display: none; }
@media (max-width: 860px) {
  .nav .text-button, .nav .filled-button { display: none; }
  .nav .menu-button { display: inline-flex; }
}

/* navigation drawer (modal, mobile) */
.drawer { border: 0; padding: 0; margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(320px, 86vw);
  background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface);
  border-radius: var(--md-sys-shape-corner-large) 0 0 var(--md-sys-shape-corner-large); }
.drawer::backdrop { background: rgb(0 0 0 / 0.32); }
.drawer nav { display: grid; gap: 4px; padding: 12px; }
.drawer .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px 28px; }
.drawer a.item {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px 0 16px;
  border-radius: var(--md-sys-shape-corner-full); text-decoration: none;
  color: var(--md-sys-color-on-surface-variant); font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain);
}
.drawer a.item[aria-current="page"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.drawer a.item:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }

/* ---- buttons ---- */
.filled-button, .tonal-button, .outlined-button, .text-button, .icon-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 24px; border-radius: var(--md-sys-shape-corner-full);
  font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain); letter-spacing: 0.006rem;
  text-decoration: none; cursor: pointer; border: 0; background: none; white-space: nowrap;
  transition: box-shadow 150ms, background 150ms;
}
.filled-button .icon, .tonal-button .icon, .outlined-button .icon, .text-button .icon { font-size: 18px; margin-left: -8px; }
.filled-button { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.filled-button:hover { box-shadow: var(--md-sys-elevation-1); background: color-mix(in srgb, var(--md-sys-color-on-primary) 8%, var(--md-sys-color-primary)); }
.tonal-button { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.tonal-button:hover { box-shadow: var(--md-sys-elevation-1); background: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 8%, var(--md-sys-color-secondary-container)); }
.outlined-button { border: 1px solid var(--md-sys-color-outline); color: var(--md-sys-color-primary); }
.outlined-button:hover, .text-button:hover { background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); }
.text-button { padding: 0 12px; color: var(--md-sys-color-primary); }
.icon-button { width: 48px; height: 48px; padding: 0; color: var(--md-sys-color-on-surface-variant); }
.icon-button:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 8%, transparent); }
.large-button { height: 56px; padding: 0 28px; font-size: 1rem; }

/* ---- cards ---- */
.card {
  border-radius: var(--md-sys-shape-corner-medium); padding: 24px;
  background: var(--md-sys-color-surface-container-low); box-shadow: var(--md-sys-elevation-1);
}
.card.filled { background: var(--md-sys-color-surface-container-highest); box-shadow: none; }
.card.outlined { background: var(--md-sys-color-surface); border: 1px solid var(--md-sys-color-outline-variant); box-shadow: none; }
.card.primary { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); box-shadow: none; }
.card.primary h2, .card.primary h3, .card.primary a:not([class]) { color: inherit; }
.card.primary .check-list li::before { color: inherit; }
.card.primary .step-num { background: var(--md-sys-color-on-primary-container); color: var(--md-sys-color-primary-container); }
.card.primary .muted, .card.primary small { color: inherit !important; opacity: 0.85; }
.card > :last-child { margin-bottom: 0; }
.card .icon.lead {
  width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container);
}
.card h3 { margin-bottom: 8px; }
.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
  font: 500 0.875rem/1 var(--md-ref-typeface-plain);
}

/* ---- chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-small); border: 1px solid var(--md-sys-color-outline-variant);
  font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain); color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}
.chip .icon { font-size: 18px; margin-left: -6px; color: var(--md-sys-color-primary); }

/* ---- lists ---- */
.list { list-style: none; padding: 0; margin: 0 0 16px; }
.list li { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; margin: 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.list li:last-child { border-bottom: 0; }
.list .icon { color: var(--md-sys-color-on-surface-variant); flex: none; margin-top: 0; }
.list .supporting { display: block; color: var(--md-sys-color-on-surface-variant); font: 400 0.875rem/1.25rem var(--md-ref-typeface-plain); }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 32px; }
.check-list li::before {
  content: "check_circle"; position: absolute; left: 0; top: 0;
  font-family: "Material Symbols Rounded"; font-size: 20px; line-height: 1.5rem;
  color: var(--md-sys-color-primary); font-feature-settings: "liga";
}

/* ---- tables (plans) ---- */
.table-wrap { overflow-x: auto; border-radius: var(--md-sys-shape-corner-medium);
  border: 1px solid var(--md-sys-color-outline-variant); margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; font: 400 0.875rem/1.25rem var(--md-ref-typeface-plain); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--md-sys-color-outline-variant); vertical-align: top; }
th { font-weight: 500; color: var(--md-sys-color-on-surface-variant); background: var(--md-sys-color-surface-container); }
tr:last-child td { border-bottom: 0; }

/* ---- plan cards ---- */
.plan { display: flex; flex-direction: column; gap: 4px; }
.plan .price { font: 400 2.25rem/2.75rem var(--md-ref-typeface-brand); margin: 8px 0 0; }
.plan .price small { font: 400 1rem/1.5rem var(--md-ref-typeface-plain); color: var(--md-sys-color-on-surface-variant); }
.plan .check-list { margin: 12px 0 20px; flex: 1; }

/* ---- tabs (client setup) ---- */
.tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--md-sys-color-surface-variant); margin: 0 0 20px; scrollbar-width: none; }
.tabs button {
  position: relative; flex: none; height: 48px; padding: 0 16px; border: 0; background: none; cursor: pointer;
  font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain); color: var(--md-sys-color-on-surface-variant);
}
.tabs button:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.tabs button[aria-selected="true"] { color: var(--md-sys-color-primary); }
.tabs button[aria-selected="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--md-sys-color-primary);
}
[role="tabpanel"][hidden] { display: none; }

/* ---- expansion (FAQ / help) ---- */
details.expand { border-bottom: 1px solid var(--md-sys-color-outline-variant); }
details.expand summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; font: 500 1rem/1.5rem var(--md-ref-typeface-plain);
}
details.expand summary::-webkit-details-marker { display: none; }
details.expand summary::after { content: "expand_more"; font-family: "Material Symbols Rounded"; font-size: 24px;
  font-feature-settings: "liga"; color: var(--md-sys-color-on-surface-variant); transition: transform 200ms; }
details.expand[open] summary::after { transform: rotate(180deg); }
details.expand > div { padding: 0 0 16px; color: var(--md-sys-color-on-surface-variant); }

/* ---- hero ---- */
.hero { padding: 72px 0 56px; }
.hero h1 { font: 400 3.5625rem/4rem var(--md-ref-typeface-brand); letter-spacing: -0.016rem; max-width: 16ch; }
.hero .lede { margin-bottom: 28px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 2.5rem; line-height: 3rem; } }
.chat {
  border-radius: var(--md-sys-shape-corner-extra-large); padding: 20px;
  background: var(--md-sys-color-surface-container); display: grid; gap: 12px;
}
.chat .bubble { border-radius: 20px; padding: 12px 16px; font: 400 0.9375rem/1.375rem var(--md-ref-typeface-plain); max-width: 92%; }
.chat .ask { justify-self: end; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-bottom-right-radius: 6px; }
.chat .answer { background: var(--md-sys-color-surface-container-lowest); border-bottom-left-radius: 6px; }
.chat .answer ol { margin: 6px 0 0; padding-left: 1.2em; }
.chat .answer .src { color: var(--md-sys-color-on-surface-variant); font-size: 0.75rem; }

/* ---- prose pages (terms, privacy) ---- */
.prose { max-width: 760px; }
.prose h2 { font: 400 1.5rem/2rem var(--md-ref-typeface-brand); margin-top: 40px; }
.prose h3 { font: 500 1rem/1.5rem var(--md-ref-typeface-plain); margin-top: 24px; }

/* ---- footer ---- */
.footer { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface-variant); padding: 48px 0 32px; margin-top: 0; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { color: var(--md-sys-color-on-surface); font: 500 0.875rem/1.25rem var(--md-ref-typeface-plain); margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 0 0 8px; }
.footer a { color: var(--md-sys-color-on-surface-variant); text-decoration: none; font: 400 0.875rem/1.25rem var(--md-ref-typeface-plain); }
.footer a:hover { color: var(--md-sys-color-primary); text-decoration: underline; }
.footer .legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--md-sys-color-outline-variant);
  font: 400 0.75rem/1rem var(--md-ref-typeface-plain); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } .footer .cols > :first-child { grid-column: 1 / -1; } }

/* ---- callout ---- */
.callout { display: flex; gap: 16px; align-items: flex-start; border-radius: var(--md-sys-shape-corner-large);
  padding: 20px 24px; background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.callout .icon { flex: none; }
.callout p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* three across at any width above phone, so three steps never wrap 2 + 1 */
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid.cols-3 { grid-template-columns: 1fr; } }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid.cols-2 { grid-template-columns: 1fr; } }
