/* Wellspeech: an editorial, stationery-like system.
   Fonts are self-hosted (public/fonts, SIL OFL): no third-party font requests (GDPR).
   Display: Cormorant Garamond. Speech text: EB Garamond. Interface: Hanken Grotesk.
   The family names are private to this stylesheet; the files are shared with
   fonts.css (keepsakes), so the browser downloads each one only once. */

@font-face {
  font-family: 'WS Display';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'WS Display';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'WS Display';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'WS Display';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-ext-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'WS Serif';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'WS Serif';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'WS Serif';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'WS Serif';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-ext-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'WS Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/hanken-grotesk.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'WS Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/hanken-grotesk-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Design tokens */
:root {
  /* Paper and ink */
  --paper: #f7f4ee;
  --paper-2: #efeae1;
  --card: #fffdf9;
  --ink: #1c1a17;
  --ink-2: #4d4740;
  --ink-3: #6b645b;
  --line: #e2dbcf;
  --line-strong: #cbc1b1;
  /* Accent: oxblood, the colour of letterpress red */
  --accent: #7b2c35;
  --accent-hover: #63222a;
  --accent-ink: #fbf8f2;
  --accent-soft: #f3e6e4;
  --gold: #866427;
  --ok: #2f6b3a;
  --warn: #8a5a00;
  --error: #a3261b;
  --focus: #7b2c35;
  /* Filled buttons */
  --btn: #7b2c35;
  --btn-hover: #63222a;
  --btn-ink: #fbf8f2;

  --display: 'WS Display', 'Cormorant Garamond', 'Iowan Old Style', Palatino, Georgia, serif;
  --serif: 'WS Serif', 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'WS Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Spacing scale (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --max: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 180ms;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13110f;
    --paper-2: #1a1714;
    --card: #1c1916;
    --ink: #ece6dc;
    --ink-2: #c2b9ac;
    --ink-3: #9b9285;
    --line: #2d2924;
    --line-strong: #463f37;
    --accent: #e0979c;
    --accent-hover: #ebb0b4;
    --accent-ink: #1a0f10;
    --accent-soft: #33201f;
    --gold: #d4b06a;
    --ok: #86c592;
    --warn: #e0b04f;
    --error: #f08a7e;
    --focus: #e0979c;
    --btn: #943a44;
    --btn-hover: #a8464f;
    --btn-ink: #fbf2ee;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keep anchors and scrolled-to sections clear of the sticky header. */
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern', 'liga';
  overflow-x: hidden;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--t) var(--ease), text-decoration-color var(--t) var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.45em;
  text-wrap: balance;
  font-feature-settings: 'kern', 'liga', 'onum';
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
}

h2 {
  font-size: clamp(1.95rem, 3.4vw, 2.7rem);
  margin-top: 1.4em;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 1.3em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.narrow {
  max-width: 760px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  z-index: 50;
}

/* Brand mark (src/brand.mjs) */
.mark-accent {
  fill: var(--accent);
}

/* Header and footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  flex: none;
}

.logo:hover {
  color: var(--ink);
}

.logo .wordmark {
  display: block;
  height: 30px;
  width: 132px;
  /* Optical alignment: the descender sits below the nav baseline. */
  margin-top: 5px;
}

.logo .monogram {
  width: 28px;
  height: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  font-size: 0.94rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
}

.nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}

.nav a:not(.btn):hover {
  color: var(--ink);
}

.nav a:not(.btn):hover::after {
  transform: scaleX(1);
}

.nav .btn {
  color: var(--btn-ink);
}

@media (max-width: 560px) {
  .nav .hide-sm {
    display: none;
  }

  .site-header .wrap {
    min-height: 60px;
  }

  .logo .wordmark {
    height: 26px;
    width: 114px;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--s-9);
  padding: var(--s-7) 0 var(--s-7);
  color: var(--ink-3);
  font-size: 0.9rem;
  background: var(--paper-2);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--s-5) var(--s-7);
  align-items: start;
}

.footer-brand .footer-logo .wordmark {
  height: 34px;
  width: 150px;
  margin-top: 0;
}

.footer-line {
  margin: var(--s-3) 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-2);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  justify-content: flex-end;
  padding-top: var(--s-2);
}

.site-footer nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
}

.site-footer a {
  color: var(--ink-2);
}

@media (max-width: 720px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .footer-meta {
    grid-row: auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--btn);
  background: var(--btn);
  color: var(--btn-ink);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font: 600 0.98rem/1.2 var(--sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}

.btn:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: var(--btn-ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-lg {
  min-height: 54px;
  padding: 15px 30px;
  font-size: 1.04rem;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--card);
  color: var(--ink);
  border-color: var(--ink-2);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Eyebrows and small labels */
.eyebrow,
.sample .meta,
.hero-page .meta,
.chips-label,
.price-card > div:first-child {
  font: 600 0.74rem/1.5 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Landing */
.hero {
  padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 88px);
}

.hero .eyebrow {
  color: var(--gold);
  margin-bottom: var(--s-5);
  max-width: 62ch;
}

.hero h1 {
  max-width: 17ch;
}

.hero-home h1 {
  max-width: 15ch;
}

.hero .lede {
  font-size: clamp(1.1rem, 1.6vw, 1.24rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 54ch;
  margin-top: var(--s-5);
}

.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-5);
  margin-top: var(--s-6);
}

.hero .fine {
  color: var(--ink-3);
  font-size: 0.92rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-page {
  margin: 0;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(28px, 3.4vw, 44px) clamp(24px, 3vw, 40px) clamp(24px, 3vw, 32px);
}

/* A second sheet beneath, offset: a speech printed on paper. */
.hero-page::before {
  content: '';
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  z-index: -1;
}

.hero-page .meta {
  color: var(--ink-3);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-5);
}

.hero-page blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.18rem, 1.7vw, 1.36rem);
  line-height: 1.6;
  color: var(--ink);
}

/* Pause marks: the brand's motif, as a speechwriter would pencil them in. */
.hero-page blockquote p::before {
  content: '//';
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

.hero-page-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  margin: var(--s-5) 0 0;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.hero-page-foot .fine {
  font-size: 0.82rem;
}

.hero-home {
  isolation: isolate;
}

.hero-occasions {
  margin-top: clamp(40px, 6vw, 72px);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-page {
    margin-right: 10px;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--s-6);
}

.hero-occasions .chips {
  margin-top: 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease), background-color var(--t) var(--ease);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--card);
}

.section {
  padding: clamp(56px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.section > .wrap > h2:first-child,
.section > .wrap > div > h2:first-child {
  margin-top: 0;
}

.section-intro {
  color: var(--ink-2);
  max-width: 60ch;
  font-size: 1.06rem;
}

/* How it works: numbered columns on hairlines */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-6) clamp(24px, 4vw, 56px);
  margin-top: var(--s-6);
  counter-reset: step;
}

.step {
  counter-increment: step;
  border-top: 1px solid var(--ink);
  padding-top: var(--s-4);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font: italic 500 2.6rem/1 var(--display);
  color: var(--accent);
  margin-bottom: var(--s-4);
  font-feature-settings: 'lnum';
}

.step h3 {
  margin-top: 0;
}

.step p {
  color: var(--ink-2);
  margin-bottom: 0;
}

.sample {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(24px, 4vw, 44px);
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.7;
  margin-top: var(--s-5);
}

/* Several short samples stacked (the landing page shows one per occasion). */
.samples .sample {
  margin-top: 0;
  margin-bottom: var(--s-4);
  padding: var(--s-5) clamp(20px, 3vw, 32px);
  font-size: 1.12rem;
}

.samples .sample p:last-child {
  margin-bottom: 0;
}

.sample .meta {
  color: var(--ink-3);
  margin-bottom: var(--s-3);
}

.sample a,
.hero-page a {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--s-6) clamp(32px, 6vw, 80px);
  align-items: start;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checks li {
  padding: 0 0 0 30px;
  position: relative;
  margin-bottom: 12px;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.55em;
  width: 11px;
  height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* Pricing: a card set like a printed price list */
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(24px, 4vw, 40px);
}

.price-card > div:first-child {
  color: var(--ink-3);
}

.price-card .price {
  font: 500 clamp(3.4rem, 6vw, 4.4rem)/1 var(--display);
  letter-spacing: -0.02em;
  margin: var(--s-4) 0 var(--s-2);
  font-feature-settings: 'lnum';
}

.price-card .per {
  color: var(--ink-3);
  font-size: 0.94rem;
  padding-bottom: var(--s-5);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}

.price-card .checks {
  margin-bottom: var(--s-5);
}

.price-card > .btn {
  width: 100%;
}

.pricing .section-intro {
  font-size: 1.1rem;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:first-child {
  border-top: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  transition: color var(--t) var(--ease);
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  color: var(--ink-3);
  transition: transform var(--t) var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  color: var(--ink-2);
  margin: 0;
  padding: 0 0 var(--s-5);
  max-width: 64ch;
}

/* Forms */
.form-page {
  padding: clamp(40px, 7vw, 80px) 0;
}

.form-page h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
}

#brief {
  counter-reset: part;
  margin-top: var(--s-6);
}

fieldset {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px) clamp(18px, 4vw, 36px) var(--s-3);
  margin: 0 0 var(--s-5);
  min-width: 0;
}

/* The legend sits inside the card as its heading. */
legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 var(--s-5);
  font: 600 1.6rem/1.2 var(--display);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

legend + * {
  clear: both;
}

#brief > fieldset {
  counter-increment: part;
}

#brief > fieldset > legend::before {
  content: counter(part, decimal-leading-zero);
  font: italic 600 1.3rem/1 var(--display);
  color: var(--accent);
  min-width: 1.5em;
}

legend .hint {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field {
  margin-bottom: var(--s-5);
}

.field label,
.field .label {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.field .hint {
  display: block;
  color: var(--ink-3);
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.5;
}

.field label .hint:empty {
  display: none;
}

input[type='text'],
input[type='email'],
input[type='date'],
select,
textarea {
  width: 100%;
  min-height: 48px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-3);
  opacity: 0.8;
}

select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236b645b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239b9285' stroke-width='1.5'/%3E%3C/svg%3E");
  }
}

textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.6;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-3);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

.row-2 .field {
  display: flex;
  flex-direction: column;
}

.row-2 .field > :last-child {
  margin-top: auto;
}

.row-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0 var(--s-5);
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.options label {
  font-weight: 400;
  margin: 0;
  position: relative;
}

.options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.options span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  background: var(--paper);
  font-size: 0.95rem;
  line-height: 1.35;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease);
}

.options span:hover {
  border-color: var(--ink-3);
}

.options input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.options input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.counter {
  float: right;
  color: var(--ink-3);
  font-size: 0.8rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--ink-2);
  margin: 8px 0 18px;
  cursor: pointer;
}

.consent input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}

.order-box {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px);
}

.order-box h2 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
}

.order-box .total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  font-weight: 600;
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.order-box .total strong {
  font: 500 2.4rem/1 var(--display);
  font-feature-settings: 'lnum';
}

/* The free preview call to action: the calm, obvious next step. */
#preview-actions {
  margin: var(--s-6) 0 var(--s-4);
  padding: clamp(20px, 4vw, 28px) clamp(18px, 4vw, 36px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
  gap: var(--s-3) var(--s-5);
}

#preview-actions + .fine,
#preview-actions + .fine + .fine {
  font-size: 0.86rem;
  max-width: 68ch;
}

#preview,
.price-card,
.cta-band {
  position: relative;
}

/* A short accent rule on the top edge: the stationery letterhead. */
.price-card::before,
.cta-band::before,
#preview::before {
  content: '';
  position: absolute;
  top: -1px;
  left: clamp(22px, 4vw, 40px);
  width: 48px;
  height: 3px;
  background: var(--accent);
}

#preview ol {
  padding-left: 1.4em;
  margin: 0 0 var(--s-5);
}

#preview ol li {
  margin-bottom: 6px;
  padding-left: 4px;
}

#preview ol li::marker {
  font-weight: 600;
  color: var(--accent);
}

#order .actions .btn-lg {
  min-width: 240px;
}

@media (max-width: 560px) {
  #preview-actions .btn,
  #order .actions .btn-lg {
    width: 100%;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin: 14px 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
}

.notice.error {
  color: var(--error);
  border-color: currentColor;
  background: transparent;
}

.notice.ok {
  color: var(--ok);
  border-color: currentColor;
  background: transparent;
}

.preview-box {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.7;
  background: var(--paper);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 14px 0 var(--s-5);
  white-space: pre-wrap;
}

[hidden] {
  display: none !important;
}

/* Speech delivery */
.speech-page {
  padding: clamp(36px, 6vw, 64px) 0;
}

.speech-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}

.speech-head h1 {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  margin: 0;
}

.speech-head .actions {
  gap: 8px;
}

.speech-sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(28px, 6vw, 72px) clamp(22px, 7vw, 80px);
  font-family: var(--serif);
  font-size: 1.26rem;
  line-height: 1.75;
  min-height: 240px;
  hanging-punctuation: first;
}

.speech-sheet p {
  margin: 0 0 1.1em;
}

.speech-sheet .cursor {
  display: inline-block;
  width: 0.08em;
  min-width: 2px;
  height: 1.1em;
  vertical-align: -0.18em;
  margin-left: 2px;
  background: var(--accent);
  animation: blink 1.1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.status-line {
  color: var(--ink-3);
  font-size: 0.92rem;
  margin: 12px 0 0;
}

.notes {
  margin-top: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-5) clamp(20px, 4vw, 32px);
  background: var(--paper-2);
}

.notes h2 {
  font-size: 1.5rem;
  margin: 0 0 var(--s-3);
}

.notes ul {
  margin: 0;
  padding-left: 20px;
}

.notes li {
  margin-bottom: 6px;
}

.versions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.versions button {
  font: inherit;
  font-size: 0.86rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 4px 13px;
  cursor: pointer;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.versions button:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.versions button[aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-soft);
}

/* Guides */
.article {
  padding: clamp(40px, 6vw, 72px) 0;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

.breadcrumbs {
  font-size: 0.86rem;
  color: var(--ink-3);
  margin-bottom: var(--s-5);
}

.breadcrumbs a {
  color: var(--ink-3);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.article h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
}

.article .meta {
  color: var(--ink-3);
  font-size: 0.9rem;
  margin-bottom: var(--s-6);
}

.prose {
  font-size: 1.08rem;
  line-height: 1.75;
  max-width: 68ch;
}

.prose h2 {
  font-size: clamp(1.8rem, 3vw, 2.25rem);
}

.prose h3 {
  font-size: 1.4rem;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: var(--s-5) clamp(20px, 3vw, 32px);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.7;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--ink-3);
}

.side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: var(--s-4);
}

.side-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--s-5);
}

.side-card h2 {
  font-size: 1.4rem;
  margin: 0 0 8px;
}

.side-card p {
  color: var(--ink-2);
  font-size: 0.94rem;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.toc li {
  margin-bottom: 6px;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
}

.cta-band {
  margin: var(--s-7) 0 0;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.cta-band h2 {
  margin-top: 0;
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--s-4);
  margin-top: var(--s-5);
}

.guide-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--s-5);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.guide-card::after {
  content: 'Read \2192';
  margin-top: auto;
  padding-top: var(--s-4);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}

.guide-card:hover {
  border-color: var(--ink-3);
  color: var(--ink);
  transform: translateY(-2px);
}

.guide-card:hover::after {
  opacity: 1;
  transform: none;
}

.guide-card h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.guide-card p {
  color: var(--ink-2);
  font-size: 0.94rem;
  margin: 0;
}

@media (hover: none) {
  .guide-card::after {
    opacity: 1;
    transform: none;
  }
}

.legal {
  padding: clamp(40px, 6vw, 72px) 0;
}

.legal h1 {
  font-size: clamp(2.2rem, 4vw, 2.8rem);
}

.legal h2 {
  font-size: 1.6rem;
}

.placeholder {
  background: var(--accent-soft);
  padding: 0 4px;
  border-radius: 3px;
}

/* Keepsake teaser (keepsake.css styles the inside) */
.ks-teaser {
  border-top: 1px solid var(--line);
}

@media print {
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .speech-sheet {
    border: 0;
    padding: 0;
    font-size: 14pt;
  }
}

/* Utilities (inline style attributes are blocked by the CSP) */
.fine {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.hint {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.small {
  font-size: 0.95rem;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 12px;
}

.mt-2 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 48px;
}

.mb-1 {
  margin-bottom: 12px;
}

button.chip {
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

button.chip[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.followup {
  margin-bottom: 14px;
}

.followup label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

/* Cue cards: printed four to a page */
.cards-view .speech-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  background: transparent;
  border: 0;
  padding: 0;
}

.cue-card {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 20px 22px 30px;
  background: var(--card);
  font-size: 1.15rem;
  line-height: 1.55;
  position: relative;
  min-height: 180px;
}

.cue-card .num {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font: 600 0.78rem var(--sans);
  color: var(--ink-3);
}

.large-print .speech-sheet {
  font-size: 1.6rem;
  line-height: 1.8;
}

@media print {
  .cards-view .speech-sheet {
    grid-template-columns: 1fr 1fr;
  }

  .cue-card {
    break-inside: avoid;
    border: 1px dashed #777;
    font-size: 15pt;
    min-height: 12cm;
  }

  .large-print .speech-sheet {
    font-size: 20pt;
  }
}

/* Help desk: FAQ plus the AI support assistant (public/help.js). */
.help-page .chat {
  margin-top: 12px;
}

.chat-label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.chat-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  max-height: 460px;
  overflow-y: auto;
}

.chat-log:empty {
  display: none;
}

.chat-msg {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
}

.chat-user {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: transparent;
}

.chat-assistant {
  align-self: flex-start;
}

.chat-who {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.chat-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-pending .chat-text {
  color: var(--ink-3);
  font-style: italic;
}

.chat-action {
  margin-top: 8px;
}

.chat-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

@media (max-width: 640px) {
  .chat-fields {
    grid-template-columns: 1fr;
  }
  .chat-msg {
    max-width: 100%;
  }
}

/* Work and business */
.chips-work {
  margin-top: 12px;
  align-items: center;
}

.hero-occasions .chips-work {
  border-top: 0;
  padding-top: 0;
  margin-top: 12px;
}

.chips-label {
  color: var(--ink-3);
  margin-right: 6px;
}

.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--s-4);
}

@media (min-width: 900px) {
  .grid-2:has(> .price-cards) {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  }
}

.price-cards .price-card {
  padding: clamp(22px, 3vw, 32px);
}

.price-cards .price-card .btn {
  margin-top: 8px;
  width: 100%;
}

.slides-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.slides-head h2 {
  margin: 0;
}

.slides ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

.slides ol > li {
  margin-bottom: 10px;
}

.slides ol ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--ink-2);
}

.tier-options span {
  border-radius: var(--radius-sm);
}

/* Friends' memories: the share panel on the order form and the friend page. */
.share-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.share-row input {
  flex: 1;
  min-width: 0;
}

.share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 4px 0 8px;
}

.memory-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.memory {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.memory-who {
  margin: 0 0 4px;
}

.memory-text {
  margin: 0 0 10px;
  white-space: pre-wrap;
  color: var(--ink-2);
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.memory-use {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}

.memory-use input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Natural-voice audio on the speech page */
.voice-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.voice-controls select {
  width: auto;
  min-width: 9rem;
}

.voice-player {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.voice-player audio {
  width: 100%;
}

.voice-player .btn {
  justify-self: start;
}

.voice-label {
  margin: 0;
}

/* Group packs: one tab per speech on the speech page. */
.pack-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 var(--s-5);
}

.pack-tab {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.pack-tab:hover {
  color: var(--ink);
}

.pack-tab[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Customer retention: reminder boxes, referral panel, pages from emails */
fieldset.optin {
  border: 0;
  padding: 0;
  margin: 0.75rem 0 0;
  min-width: 0;
  background: transparent;
}
fieldset.optin[hidden] {
  display: none;
}
.chip.chip-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent) inset;
}
.retention-page .options {
  margin: 1rem 0;
}
#ref-rewards-list {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Motion: everything above is decoration; switch it off on request. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .guide-card:hover {
    transform: none;
  }
}
