/*
  DocOS SMS program pages: shared styles.
  Tokens are copied verbatim from src/styles.css (:root and @theme) so these static
  pages match the main site without depending on the Tailwind build.
*/

:root {
  --radius: 1rem;
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);

  --background: oklch(0.985 0.008 95);
  --foreground: oklch(0.24 0.025 235);
  --card: oklch(0.995 0.005 95);
  --primary: oklch(0.52 0.084 197);
  --primary-foreground: oklch(0.99 0.005 95);
  --muted: oklch(0.955 0.012 200);
  --muted-foreground: oklch(0.52 0.022 232);
  --accent: oklch(0.93 0.03 195);
  --accent-foreground: oklch(0.3 0.04 210);
  --destructive: oklch(0.55 0.19 27);
  --border: oklch(0.9 0.014 210);
  --ring: oklch(0.62 0.075 197);

  --cream: oklch(0.972 0.016 88);
  --slate-deep: oklch(0.27 0.03 235);
  --teal: oklch(0.55 0.09 195);
  --teal-soft: oklch(0.86 0.05 190);
  --glass: oklch(1 0 0 / 0.55);
  --glass-border: oklch(1 0 0 / 0.65);

  /* Tailwind's primary/N opacity modifiers, spelled out */
  --primary-5: oklch(0.52 0.084 197 / 0.05);
  --primary-8: oklch(0.52 0.084 197 / 0.08);
  --primary-10: oklch(0.52 0.084 197 / 0.1);
  --primary-15: oklch(0.52 0.084 197 / 0.15);
  --primary-25: oklch(0.52 0.084 197 / 0.25);
  --muted-60: oklch(0.955 0.012 200 / 0.6);
  --border-70: oklch(0.9 0.014 210 / 0.7);

  --shadow-glass: 0 24px 70px -30px oklch(0.35 0.05 210 / 0.45);
  --shadow-lift: 0 34px 90px -34px oklch(0.35 0.06 210 / 0.55);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 5.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

/* Author display rules (e.g. .enroll-form's grid) would otherwise beat the UA's [hidden]. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.022em;
}

p {
  margin: 0;
}

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

a {
  color: var(--primary);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

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

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: var(--foreground);
  color: var(--background);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.25s var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
  color: var(--background);
}

/* ---------- Ambient light ---------- */

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: docos-float 18s ease-in-out infinite;
}

.orb-a {
  top: -12vmax;
  left: -14vmax;
  width: 46vmax;
  height: 46vmax;
  background: radial-gradient(closest-side, oklch(0.82 0.07 192 / 0.5), transparent);
}

.orb-b {
  top: 8vh;
  right: -12vmax;
  width: 40vmax;
  height: 40vmax;
  background: radial-gradient(closest-side, oklch(0.93 0.05 85 / 0.55), transparent);
  animation-duration: 22s;
  animation-delay: -6s;
}

.orb-c {
  bottom: -24vmax;
  left: 30vw;
  width: 50vmax;
  height: 50vmax;
  background: radial-gradient(closest-side, oklch(0.86 0.05 210 / 0.42), transparent);
  animation-duration: 26s;
  animation-delay: -12s;
}

@keyframes docos-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(3vmax, -2vmax, 0) scale(1.06);
  }
}

.glass-panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow-glass);
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 1.5rem;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.75rem 0.75rem 0;
}

@media (min-width: 640px) {
  .site-header {
    padding: 1.25rem 1.5rem 0;
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 72rem;
  margin-inline: auto;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-2xl);
  transition:
    padding 0.45s var(--ease-out),
    background-color 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out);
}

@media (min-width: 640px) {
  .nav {
    padding: 0.75rem 1.5rem;
  }
}

.site-header.is-condensed .nav {
  padding-block: 0.45rem;
  background: oklch(1 0 0 / 0.78);
  box-shadow: var(--shadow-lift);
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--foreground);
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  object-fit: contain;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--foreground);
}

.nav-links a[aria-current="page"] {
  font-weight: 500;
}

.nav-links .hide-sm,
.nav-cta {
  display: none;
}

/* Keep the bar on one line on narrow phones rather than wrapping mid-word. */
.nav-links a,
.nav-cta {
  white-space: nowrap;
}

@media (max-width: 479px) {
  .nav {
    gap: 0.5rem;
    padding-inline: 0.75rem;
  }

  .nav-right,
  .nav-links {
    gap: 0.875rem;
  }
}

@media (min-width: 400px) {
  .nav-cta {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .nav-right,
  .nav-links {
    gap: 1.75rem;
  }

  .nav-links .hide-sm {
    display: list-item;
  }
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  font: 500 0.875rem/1.2 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background-color 0.2s,
    opacity 0.2s;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  padding: 0.9rem 1.75rem;
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-glass);
}

.btn-primary:hover {
  color: var(--primary-foreground);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
}

.btn-ghost {
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background: var(--muted);
  color: var(--foreground);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.text-link {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}

.text-link:hover {
  color: var(--foreground);
  text-decoration-color: currentColor;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--primary-25);
  border-radius: 999px;
  background: var(--primary-8);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--primary);
  animation: docos-pulse 2.4s var(--ease-out) infinite;
}

@keyframes docos-pulse {
  0% {
    box-shadow: 0 0 0 0 oklch(0.52 0.084 197 / 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 0.55rem oklch(0.52 0.084 197 / 0);
  }
}

.eyebrow {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.hero {
  padding-block: 4rem 2.5rem;
}

@media (min-width: 640px) {
  .hero {
    padding-block: 6rem 3rem;
  }
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: 3.5rem;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.25rem, 1.4rem + 4.2vw, 3.75rem);
  line-height: 1.05;
}

.lede {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  line-height: 1.65;
}

.lede strong {
  color: var(--foreground);
  font-weight: 600;
}

.lede-sub {
  max-width: 36rem;
  margin-top: 1rem;
  color: var(--muted-foreground);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.25rem;
}

.thread {
  display: grid;
  gap: 1rem;
  max-width: 26rem;
  margin-inline: auto;
}

.bubble {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-2xl);
}

.thread .bubble:nth-child(2) {
  margin-left: 1.5rem;
}

.thread .bubble:nth-child(3) {
  margin-right: 1.5rem;
}

.bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.bubble-meta b {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bubble p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.drift {
  animation: docos-drift 11s ease-in-out infinite;
}

.drift-slow {
  animation: docos-drift 15s ease-in-out infinite;
}

@keyframes docos-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -14px, 0);
  }
}

/* ---------- Program terms at a glance ---------- */

.glance {
  padding-block: 1rem 1.5rem;
}

.glance-title {
  margin-bottom: 0.75rem;
  color: var(--muted-foreground);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.glance-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.25rem;
  margin: 0;
  padding: 0.5rem;
  border-radius: var(--radius-3xl);
  list-style: none;
}

.glance-list li {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-xl);
  transition: background-color 0.3s;
}

.glance-list li:hover {
  background: oklch(1 0 0 / 0.6);
}

.glance-k {
  display: block;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.glance-v {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Marquee ---------- */

.marquee-section {
  padding-block: 2.5rem;
}

.marquee-section .eyebrow {
  text-align: center;
}

.marquee {
  position: relative;
  margin-top: 1.25rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-inner {
  display: flex;
  width: max-content;
  animation: docos-marquee 70s linear infinite;
}

.marquee:hover .marquee-inner,
.marquee:focus-within .marquee-inner,
.marquee.is-paused .marquee-inner {
  animation-play-state: paused;
}

.marquee-track {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0.25rem 0.375rem;
  list-style: none;
}

.marquee-track li {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.55);
  box-shadow: 0 10px 30px -20px oklch(0.35 0.05 210 / 0.45);
  color: var(--accent-foreground);
  font-size: 0.875rem;
  white-space: nowrap;
}

.marquee-track li::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: middle;
}

@keyframes docos-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.marquee-toggle {
  display: flex;
  margin: 1rem auto 0;
  font-size: 0.8125rem;
}

/* ---------- Sections and cards ---------- */

.section {
  padding-block: 4.5rem;
  scroll-margin-top: var(--header-h);
}

.section-head {
  max-width: 42rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section h2 {
  margin-top: 0.75rem;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
}

.section-lede {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.75rem;
}

@media (min-width: 768px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  height: 100%;
  padding: 1.75rem;
  border-radius: var(--radius-3xl);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.9rem;
  background: var(--primary-10);
  color: var(--primary);
}

.card-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.card h3 {
  margin-top: 1.1rem;
  font-size: 1.125rem;
}

.card p {
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.muted-panel {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  background: var(--muted-60);
}

.muted-panel h3 {
  font-size: 1.125rem;
}

.muted-panel p {
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.never {
  margin-top: 1.25rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.8125rem;
  text-decoration: line-through;
  text-decoration-color: oklch(0.55 0.19 27 / 0.55);
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-3xl);
}

.stat-num {
  display: block;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat p {
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

/* ---------- Sample messages ---------- */

.samples {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.75rem;
}

@media (min-width: 900px) {
  .samples {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sample {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius-3xl);
}

.sample-label {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sms {
  align-self: flex-start;
  max-width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem 1.25rem 1.25rem 0.35rem;
  background: var(--card);
  box-shadow: 0 12px 30px -22px oklch(0.35 0.05 210 / 0.5);
  font-size: 0.9375rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.sms.from-user {
  align-self: flex-end;
  border-color: transparent;
  border-radius: 1.25rem 1.25rem 0.35rem 1.25rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sample-note {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.replies-title {
  margin-top: 3rem;
  font-size: 1.25rem;
}

.samples.replies {
  margin-top: 1.25rem;
}

@media (min-width: 900px) {
  .samples.replies {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Enrollment ---------- */

.enroll-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .enroll-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
    gap: 3.5rem;
  }
}

.steps {
  display: grid;
  gap: 1.1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  align-items: start;
  gap: 0.9rem;
  color: var(--muted-foreground);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary-10);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
}

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

.help-box {
  margin-top: 2rem;
  padding: 1.25rem;
  font-size: 0.9375rem;
}

.help-box p + p {
  margin-top: 0.5rem;
}

.form-card {
  padding: 1.5rem;
  border-radius: var(--radius-3xl);
}

@media (min-width: 640px) {
  .form-card {
    padding: 2rem;
  }
}

.form-card h3 {
  font-size: 1.5rem;
}

.form-card .form-intro {
  margin-top: 0.4rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.enroll-form {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.form-row {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.field input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: oklch(0.985 0.008 95 / 0.7);
  color: var(--foreground);
  font: inherit;
  outline: none;
  transition:
    border-color 0.25s,
    box-shadow 0.35s var(--ease-out),
    background-color 0.25s;
}

.field input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.8;
}

.field input:hover {
  border-color: oklch(0.8 0.03 205);
}

.field input:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--primary-15);
}

.field input[aria-invalid="true"] {
  border-color: var(--destructive);
  box-shadow: 0 0 0 4px oklch(0.55 0.19 27 / 0.12);
}

.field-hint,
.field-error {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
}

.field-hint {
  color: var(--muted-foreground);
}

.field-error {
  color: var(--destructive);
  font-weight: 500;
}

.phi-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--muted-60);
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.phi-note svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  color: var(--primary);
}

.phi-note strong {
  color: var(--foreground);
}

.consent {
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid oklch(0.52 0.084 197 / 0.28);
  border-radius: var(--radius-xl);
  background: var(--primary-5);
  transition:
    border-color 0.25s,
    box-shadow 0.35s var(--ease-out);
}

.consent:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px oklch(0.52 0.084 197 / 0.12);
}

.consent.is-invalid {
  border-color: var(--destructive);
}

.consent legend {
  padding: 0 0.4rem;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.8rem;
}

.consent input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent label {
  font-size: 0.875rem;
  line-height: 1.6;
  cursor: pointer;
}

.form-foot {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  text-align: center;
}

.form-status {
  padding: 0.75rem 1rem;
  border: 1px solid oklch(0.55 0.19 27 / 0.35);
  border-radius: var(--radius-lg);
  background: oklch(0.55 0.19 27 / 0.06);
  color: var(--destructive);
  font-size: 0.875rem;
}

.noscript-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.enroll-form .btn-primary {
  width: 100%;
  padding-block: 1rem;
}

.success {
  padding: 1.75rem;
  border: 1px solid var(--primary-25);
  border-radius: var(--radius-2xl);
  background: oklch(0.52 0.084 197 / 0.06);
  /* Transform only: the confirmation must be readable even if the animation never runs. */
  animation: docos-rise 0.8s var(--ease-out) both;
}

.success:focus {
  outline: none;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
}

.success-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.success-icon path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: docos-check 0.6s 0.25s var(--ease-out) forwards;
}

.success h3 {
  margin-top: 1rem;
  font-size: 1.375rem;
}

.success p {
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.success .btn {
  margin-top: 1.25rem;
}

@keyframes docos-check {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes docos-rise {
  from {
    transform: translateY(14px) scale(0.985);
  }
  to {
    transform: none;
  }
}

/* ---------- Legal documents ---------- */

.doc-hero {
  max-width: 48rem;
  padding-block: 3.5rem 2rem;
}

.doc-backlinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.doc-backlinks .back-link {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-decoration: none;
}

.back-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.35s var(--ease-out);
}

.back-link:hover svg {
  transform: translateX(-3px);
}

.doc-hero h1 {
  margin-top: 1.25rem;
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.25rem);
  line-height: 1.05;
}

.doc-meta {
  margin-top: 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.doc-grid {
  display: grid;
  align-items: start;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .doc-grid {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 2.5rem;
  }

  .toc {
    position: sticky;
    top: calc(var(--header-h) + 0.5rem);
  }
}

.toc {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-2xl);
  font-size: 0.875rem;
}

.toc summary {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.toc ol {
  display: grid;
  gap: 0.1rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: 0.6rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.toc a:hover,
.toc a.is-active {
  background: var(--muted);
  color: var(--foreground);
}

.prose {
  min-width: 0;
  padding: 1.5rem;
  border-radius: var(--radius-3xl);
}

@media (min-width: 640px) {
  .prose {
    padding: 2.5rem;
  }
}

.prose section {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.prose section + section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.prose h2 {
  font-size: 1.5rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.0625rem;
}

.prose p,
.prose li {
  color: var(--muted-foreground);
  line-height: 1.75;
}

.prose p {
  margin-top: 1rem;
}

.prose strong {
  color: var(--foreground);
  font-weight: 600;
}

.prose ul {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

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

.callout {
  margin-top: 1.25rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid oklch(0.52 0.084 197 / 0.28);
  border-radius: var(--radius-2xl);
  background: oklch(0.52 0.084 197 / 0.07);
}

.prose .callout p {
  margin: 0;
  color: var(--foreground);
  font-weight: 500;
  line-height: 1.65;
}

.prose .callout p + p {
  margin-top: 0.75rem;
}

.data-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.data-list div {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: oklch(1 0 0 / 0.5);
}

.data-list dt {
  font-weight: 600;
}

.data-list dd {
  margin: 0.3rem 0 0;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.kw {
  padding: 0.1rem 0.4rem;
  border-radius: 0.4rem;
  background: var(--muted);
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  font-weight: 600;
}

.contact-block {
  margin-top: 1rem;
  font-style: normal;
  line-height: 1.75;
}

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

.site-footer {
  margin-top: 6rem;
  padding-block: 3rem;
  border-top: 1px solid var(--border-70);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
  }
}

.footer-about {
  max-width: 28rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.footer-about > p {
  margin-top: 0.75rem;
}

.footer-about address {
  margin-top: 0.75rem;
  font-style: normal;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  list-style: none;
}

.footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--foreground);
}

.footer-fine {
  display: grid;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-70);
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

/* ---------- Scroll reveal (app.js only ever hides elements below the fold) ---------- */

.reveal {
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
}

.reveal.is-pending {
  opacity: 0;
  transform: translateY(22px);
}

@media print {
  .reveal.is-pending {
    opacity: 1;
    transform: none;
  }

  .ambient-bg,
  .marquee-section,
  .nav-cta {
    display: none;
  }

  .site-header {
    position: static;
  }
}

@media (forced-colors: active) {
  .field input:focus {
    outline: 2px solid CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .reveal.is-pending {
    opacity: 1;
    transform: none;
  }

  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee-inner {
    width: auto;
    animation: none !important;
  }

  .marquee-track {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
  }

  .marquee-track[aria-hidden="true"],
  .marquee-toggle {
    display: none;
  }
}
