/*
  Coparency marketing site.
  Tokens mirror Sources/CoparentingOnboarding/DesignSystem/AppTheme.swift (AppColor, AppRadius, AppSpacing)
  so the site reads as the same product: warm paper canvas, white surfaces with a soft gold outline,
  deep stability green for actions and headings, Instrument Serif for display, Inter for everything else.
*/

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Display";
  src: url("fonts/InterDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Display";
  src: url("fonts/InterDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Display";
  src: url("fonts/InterDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* AppColor */
  --canvas: #f8f7f2;
  --surface: #ffffff;
  --sheet: #fcfbf7;
  --sunken: #f3f1e9;
  --selected: #e8efea;
  --border: #e4ddc5;
  --border-strong: #d6ccaa;
  --separator: #ece8d8;
  --accent: #173e3a;
  --accent-pressed: #102e2b;
  --accent-soft: rgba(23, 62, 58, 0.08);
  --text: #1e2220;
  --text-secondary: #636865;
  --text-tertiary: #8b8f8c;
  --success: #2e7a65;
  --danger: #b23c38;
  --tint-schedule: #3770ad;
  --tint-expenses: #a2642f;
  --tint-records: #2e7a65;

  /* Parent identity */
  --parent-you: var(--accent);
  --parent-other: var(--border-strong);

  /* AppRadius */
  --radius-small: 8px;
  --radius-control: 12px;
  --radius-card: 16px;
  --radius-sheet: 28px;

  --shadow-card: 0 4px 20px rgba(31, 36, 26, 0.06);
  --shadow-float: 0 1px 2px rgba(31, 36, 26, 0.04), 0 24px 60px -12px rgba(31, 36, 26, 0.16);

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-text: "Inter Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-height: 68px;

  /* AppMotion.dataEntrance / press */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--selected);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

.container,
.section-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ Type */

.display,
.title,
.page-title,
.feature-title,
.share-title,
.legal-card h2,
.split h2,
.closing h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.display {
  font-size: clamp(3.25rem, 8.4vw, 6.25rem);
  line-height: 0.98;
}

.title {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.04;
}

.page-title {
  font-size: clamp(2.75rem, 6.4vw, 4.5rem);
  line-height: 1;
}

.feature-title {
  font-size: clamp(1.875rem, 3.2vw, 2.5rem);
  line-height: 1.06;
}

.eyebrow,
.summary-label {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead,
.page-lead {
  max-width: 34em;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.body-large,
.section-copy {
  max-width: 34em;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* ---------------------------------------------------------------- Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 247, 242, 0.86);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 1px 0 rgba(228, 221, 197, 0.7);
}

.nav {
  max-width: var(--max);
  min-height: var(--header-height);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  outline: 1px solid rgba(23, 62, 58, 0.08);
  outline-offset: -1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

.nav-links a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

@media (hover: hover) {
  .nav-links a:hover {
    color: var(--accent);
    background: var(--accent-soft);
  }
}

/* --------------------------------------------------------------- Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.actions-center {
  justify-content: center;
}

.button {
  min-height: 52px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.button:active {
  transform: scale(0.97);
  background: var(--accent-pressed);
}

@media (hover: hover) {
  .button:hover {
    background: var(--accent-pressed);
  }
}

.button-secondary {
  color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.button-secondary:active {
  background: var(--sunken);
}

@media (hover: hover) {
  .button-secondary:hover {
    background: var(--sheet);
    box-shadow: inset 0 0 0 1px var(--border-strong);
  }
}

.text-link,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.text-link::after,
.text-button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms var(--ease-out);
}

@media (hover: hover) {
  .text-link:hover::after,
  .text-button:hover::after {
    transform: translateX(2px) rotate(45deg);
  }
}

/* ------------------------------------------------------------------ Hero */

.hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 112px);
}

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

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Device frame: a light bezel on paper, like the App Store art. */
.device {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 9px;
  border-radius: 52px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-float);
}

.device img {
  width: 100%;
  height: auto;
  border-radius: 43px;
  background: var(--canvas);
}

.device-hero {
  max-width: 360px;
}

/* ---------------------------------------------------------------- Section */

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-tinted {
  background: var(--sheet);
  border-block: 1px solid var(--separator);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(48px, 6vw, 72px);
}

/* ---------------------------------------------------------------- Rhythm */

.section-rhythm {
  background: var(--surface);
  border-block: 1px solid var(--separator);
}

.rhythm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.rhythm-figure {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.rhythm {
  width: 100%;
  height: auto;
  overflow: visible;
}

.rhythm-guide {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 1 7;
  stroke-linecap: round;
}

.arc {
  fill: none;
  stroke-width: 26;
  stroke-linecap: round;
}

.arc-you {
  stroke: var(--parent-you);
}

.arc-other {
  stroke: var(--parent-other);
}

.arc-proposed {
  stroke: var(--border);
}

.arc-dash {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  opacity: 0.7;
}

.handover {
  fill: var(--accent);
}

.handover-proposed {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 1.75;
}

.marker-halo {
  fill: rgba(31, 36, 26, 0.08);
}

.marker-bead {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 3;
}

.rhythm-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}

.rhythm-sentence {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.125rem);
  line-height: 1.08;
}

.rhythm-detail {
  color: var(--text-secondary);
  font-size: clamp(0.8125rem, 1.4vw, 0.9375rem);
}

/* Entrance: arcs draw on clockwise, then the sentence and marker settle (AppMotion.ringDraw). */
@media (prefers-reduced-motion: no-preference) {
  .arc {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: ring-draw 520ms var(--ease-out) forwards;
  }

  .arc:nth-of-type(1) { animation-delay: 80ms; }
  .arc:nth-of-type(2) { animation-delay: 220ms; }
  .arc:nth-of-type(3) { animation-delay: 360ms; }
  .arc:nth-of-type(4) { animation-delay: 500ms; }
  .arc:nth-of-type(6) { animation-delay: 640ms; }
  .arc:nth-of-type(7) { animation-delay: 780ms; }

  .arc-dash,
  .handover,
  .rhythm-centre {
    opacity: 0;
    animation: fade-in 400ms var(--ease-out) 900ms forwards;
  }

  .marker {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: marker-settle 520ms cubic-bezier(0.34, 1.4, 0.64, 1) 1100ms forwards;
  }
}

@keyframes ring-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes marker-settle {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.key {
  display: grid;
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--separator);
}

.key li {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  border-bottom: 1px solid var(--separator);
  color: var(--text-secondary);
}

.key strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.key-mark {
  position: relative;
  flex: none;
  width: 44px;
  height: 14px;
  border-radius: 999px;
}

.key-you {
  background: var(--parent-you);
}

.key-other {
  background: var(--parent-other);
}

.key-handover {
  background: linear-gradient(to right, var(--parent-other) 0 15px, transparent 15px 29px, var(--parent-you) 29px);
}

.key-handover i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.key-proposed {
  background: var(--border);
}

.key-proposed::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  right: 7px;
  border-top: 1.5px dashed var(--accent);
  opacity: 0.7;
  transform: translateY(-50%);
}

/* -------------------------------------------------------------- Features */

.features {
  display: grid;
  gap: clamp(72px, 10vw, 128px);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.feature:nth-child(even) .device {
  order: 2;
}

.feature .device {
  max-width: 320px;
}

.feature-copy {
  max-width: 30rem;
}

.feature-copy p:not(.eyebrow) {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* ----------------------------------------------------------------- Cards */

.cards,
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card,
.legal-card {
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-card);
}

.card {
  padding: 24px;
}

.card h3 {
  margin-top: 20px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

.card p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.card .text-button {
  margin-top: 8px;
}

.icon-chip {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sunken);
}

.icon-chip svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.card-marker + h3 {
  margin-top: 16px;
}

.card-marker.money {
  background: var(--tint-expenses);
}

.card-marker.records {
  background: var(--tint-records);
}

.card-marker.schedule {
  background: var(--tint-schedule);
}

/* --------------------------------------------------------------- Privacy */

.privacy-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 7vw, 96px);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-card);
}

.list li {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
}

.list li + li {
  border-top: 1px solid var(--separator);
  margin-inline: 20px;
  padding-inline: 0;
}

.list strong {
  font-weight: 600;
}

.list span {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------- Closing */

.section-closing {
  background: var(--sheet);
  border-top: 1px solid var(--separator);
}

.closing {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.closing-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 28px;
  border-radius: 17px;
  box-shadow: 0 0 0 1px rgba(23, 62, 58, 0.08), var(--shadow-card);
}

.closing .body-large {
  margin-inline: auto;
}

/* ---------------------------------------------------------------- Footer */

.site-footer {
  border-top: 1px solid var(--separator);
  background: var(--canvas);
}

.footer-inner,
.footer-base {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-block: 40px 28px;
}

.footer-brand p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

@media (hover: hover) {
  .footer-links a:hover {
    color: var(--accent);
  }
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 40px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.footer-base::before {
  content: "";
  flex-basis: 100%;
  height: 1px;
  margin-bottom: 12px;
  background: var(--separator);
}

/* ---------------------------------------------------- Support and legal */

.page-hero {
  border-bottom: 1px solid var(--separator);
}

.page-hero .section-inner {
  padding-block: clamp(56px, 9vw, 104px) clamp(40px, 6vw, 64px);
}

.page-hero + section .section-inner,
.band .section-inner {
  padding-block: clamp(48px, 7vw, 88px);
}

.band {
  background: var(--sheet);
  border-top: 1px solid var(--separator);
}

.split h2 {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.06;
}

.two-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 5vw, 64px);
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--separator);
}

.toc a {
  min-height: 36px;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

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

.legal-stack {
  display: grid;
  gap: 16px;
}

.legal-card {
  padding: clamp(24px, 4vw, 36px);
}

.legal-card h2 {
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.08;
}

.legal-card h3 {
  margin: 24px 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.legal-card p,
.legal-card li {
  color: var(--text-secondary);
}

.legal-card p + p,
.legal-card ul + p,
.legal-card ol + p {
  margin-top: 12px;
}

.legal-card strong {
  color: var(--text);
  font-weight: 600;
}

.plain-list {
  margin: 12px 0 0;
  padding-left: 1.2rem;
}

.plain-list li + li {
  margin-top: 8px;
}

.plain-list li::marker {
  color: var(--text-tertiary);
}

.contact-block {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.contact-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  color: var(--text-secondary);
}

.contact-line strong {
  color: var(--text);
  font-weight: 600;
}

.note {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--selected);
}

/* ---------------------------------------------------------- Record share */

.share-page {
  min-height: 100svh;
}

.share-header {
  min-height: var(--header-height);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--separator);
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.secure-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.share-main {
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding-block: clamp(40px, 8vw, 88px);
}

.share-card {
  padding: clamp(28px, 6vw, 44px);
  border-radius: var(--radius-sheet);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-float);
}

.share-lock {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sunken);
}

.share-lock svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-title {
  font-size: clamp(2.25rem, 7vw, 3rem);
  line-height: 1.04;
}

.share-intro {
  margin: 16px 0 28px;
  color: var(--text-secondary);
}

.share-form {
  display: grid;
  gap: 10px;
}

.share-form label {
  font-weight: 600;
}

.share-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}

.share-form input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.code-input {
  letter-spacing: 0.4em;
  font-size: 1.25rem !important;
  font-variant-numeric: tabular-nums;
}

.field-help,
.share-privacy {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.share-button {
  width: 100%;
  margin-top: 8px;
}

.share-button:disabled {
  cursor: progress;
  opacity: 0.55;
  transform: none;
}

.share-status {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--selected);
}

.share-status[data-kind="error"] {
  color: var(--danger);
  background: #f8e9e7;
}

.share-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: var(--sunken);
}

.share-summary span:not(.summary-label) {
  color: var(--text-secondary);
}

.summary-label {
  margin-bottom: 4px;
}

.integrity {
  margin-top: 12px;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
}

.share-unavailable h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 600;
}

.share-unavailable p {
  color: var(--text-secondary);
}

.share-privacy {
  max-width: 460px;
  margin: 20px auto 0;
  text-align: center;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 920px) {
  .hero-grid,
  .rhythm-grid,
  .feature,
  .privacy-grid,
  .split,
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy .lead {
    margin-inline: auto;
  }

  .hero .actions,
  .facts {
    justify-content: center;
  }

  .rhythm-figure {
    order: 2;
    max-width: 380px;
  }

  .feature .device,
  .feature:nth-child(even) .device {
    order: 2;
    max-width: 300px;
  }

  .feature-copy {
    max-width: 36rem;
  }

  .cards,
  .grid,
  .two-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-block: 8px;
  }

  .nav-links {
    width: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: calc(var(--gutter) - 12px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: none;
  }

  .site-header {
    position: static;
  }

  html {
    scroll-padding-top: 16px;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .device {
    max-width: 290px;
    border-radius: 46px;
    padding: 8px;
  }

  .device img {
    border-radius: 38px;
  }

  .toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    gap: 6px 16px;
    font-size: 0.875rem;
  }

  .contact-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .footer-inner {
    flex-direction: column;
  }
}
