/* DietiDesk website — shared styles
   Brand: DietiDesk Visual Identity v1.0
   No external resources: fonts are self-hosted in /assets/fonts (SIL OFL 1.1). */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("/assets/fonts/tajawal-arabic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: "Tajawal";
  src: url("/assets/fonts/tajawal-arabic-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: "Tajawal";
  src: url("/assets/fonts/tajawal-arabic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand colours */
  --teal: #0E5A4C;        /* Deep Teal: primary, text */
  --leaf: #3FAE6A;        /* Leaf Green: icons, success (never small text on light) */
  --mint: #7BD389;        /* Fresh Mint: accents on dark only */
  --mint-text: #9BE0A5;   /* Fresh Mint, lightened for small text on Deep Teal (5.3:1) */
  --clinic: #F3F7F4;      /* Clinic White: page background */

  /* Derived neutrals (all checked for WCAG AA on --clinic) */
  --ink: #0B3F36;         /* body text, 10.9:1 */
  --ink-soft: #3E5E57;    /* secondary text, 6.6:1 */
  --line: #C9D8D2;        /* hairlines (decorative) */
  --field-line: #6A8780;  /* form field borders, 3.6:1 */
  --paper: #FFFFFF;
  --teal-deep: #0A463B;   /* button hover */
  --mint-pale: #E4F3E8;
  --error: #A3261C;       /* 6.6:1 */
  --success: #1E6B41;     /* 6.0:1 */

  --font-en: "Outfit", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-ar: "Tajawal", "Outfit", "Segoe UI", Tahoma, Arial, sans-serif;

  --radius: 10px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 8vw, 104px);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--clinic);
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="ar"] body {
  font-family: var(--font-ar);
  font-size: 1.125rem;
  line-height: 1.8;
}

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

a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { color: var(--teal); margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { font-weight: 700; letter-spacing: 0; line-height: 1.35; }

p { margin: 0 0 1em; }

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

.visually-hidden {
  position: absolute !important;
  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;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 247, 244, 0.92);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { backdrop-filter: blur(8px); }
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--teal);
  min-height: 44px;
}
.brand img { width: 36px; height: 36px; }
.wordmark {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1;
  direction: ltr;
}
.wordmark .desk { color: var(--leaf); }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark .desk { color: var(--mint); }

.main-nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius);
}
.main-nav a:hover { color: var(--teal); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 14px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}
.lang-switch:hover { background: var(--paper); }
.lang-switch[lang="ar"] { font-family: var(--font-ar); }
.lang-switch[lang="en"] { font-family: var(--font-en); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1.5px solid var(--teal);
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-quiet {
  background: transparent;
  color: var(--teal);
}
.btn-quiet:hover { background: var(--paper); }
.btn-small { min-height: 44px; padding: 8px 18px; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 112px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 1rem; }
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--leaf);
}
.hero h1 {
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
html[lang="ar"] .hero h1 { max-width: 16ch; letter-spacing: 0; }
.hero .lead {
  margin: 24px 0 36px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 54ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note {
  margin: 20px 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Signature: the portion plate + calculation slip */
.plate-figure {
  margin: 0;
  position: relative;
  display: grid;
  justify-items: center;
}
.plate {
  width: min(100%, 420px);
  height: auto;
}
.plate .seg {
  fill: none;
  stroke-width: 34;
  stroke-dasharray: 0 100;
  animation: seg-draw 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.plate .seg-veg { stroke: var(--leaf); stroke-dasharray: 0 100; animation-delay: 0.2s; --len: 48.5; }
.plate .seg-protein { stroke: var(--teal); animation-delay: 0.55s; --len: 23.5; }
.plate .seg-grain { stroke: var(--clinic); animation-delay: 0.85s; --len: 23.5; }
@keyframes seg-draw {
  to { stroke-dasharray: var(--len) 100; }
}

.slip {
  width: min(100%, 300px);
  margin-top: -36px;
  margin-inline-start: auto;
  margin-inline-end: 4%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  font-size: 0.9375rem;
  box-shadow: 0 1px 0 rgba(14, 90, 76, 0.04), 0 12px 32px -18px rgba(14, 90, 76, 0.35);
  opacity: 0;
  transform: translateY(8px);
  animation: slip-in 0.6s ease forwards 1.3s;
}
@keyframes slip-in { to { opacity: 1; transform: none; } }
.slip-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[lang="ar"] .slip-title { letter-spacing: 0; font-size: 0.9375rem; }
.slip dl { margin: 0; }
.slip .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 5px;
  border-top: 1px dashed var(--line);
}
.slip dt { color: var(--ink-soft); }
.slip dd { margin: 0; font-weight: 600; color: var(--teal); direction: ltr; }
.slip .row-total { border-top: 1px solid var(--teal); margin-top: 4px; padding-top: 8px; }
.slip .row-total dt,
.slip .row-total dd { color: var(--teal); font-weight: 700; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
html[lang="ar"] .legend { font-size: 0.9375rem; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block;
}
.legend .k-veg { background: var(--leaf); }
.legend .k-protein { background: var(--teal); }
.legend .k-grain { background: var(--clinic); border: 1px solid var(--field-line); }

/* ---------- Numbered sections ---------- */
.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-num {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding-top: 0.6em;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[lang="ar"] .section-num { letter-spacing: 0; font-size: 1rem; }
.section-num span:first-child { color: var(--teal); font-family: var(--font-en); }
.section h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  max-width: 22ch;
}
.section-intro {
  margin: 18px 0 0;
  color: var(--ink-soft);
  max-width: 60ch;
  font-size: 1.125rem;
}

/* Open-text list grids, separated by hairlines (no cards) */
.ruled {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.ruled > li {
  padding-block: 28px 32px;
  padding-inline: 0 28px;
  border-bottom: 1px solid var(--line);
}
.ruled > li + li { border-inline-start: 1px solid var(--line); padding-inline-start: 28px; }
.ruled > li:nth-child(3n + 1) { border-inline-start: 0; padding-inline-start: 0; }
.ruled h3 {
  font-size: 1.25rem;
  margin: 16px 0 10px;
}
.ruled p { color: var(--ink-soft); margin: 0; }
.ruled .icon {
  width: 32px; height: 32px;
  color: var(--leaf);
}
.ruled .tag {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mint-pale);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
html[lang="ar"] .ruled .tag { font-size: 0.875rem; letter-spacing: 0; }

.problem-index {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--success);
}

/* Screenshots */
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.shot { margin: 0; }
.shot-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--teal), var(--teal)) top / 100% 28px no-repeat,
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(14, 90, 76, 0.06) 23px 24px),
    var(--paper);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.shot-frame span {
  margin-top: 28px;
  padding: 8px 14px;
  border: 1px dashed var(--field-line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  background: var(--paper);
}
.shot figcaption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.shots-note { margin: 24px 0 0; font-size: 0.9375rem; color: var(--ink-soft); }

/* Privacy statement */
.privacy-band {
  background: var(--teal);
  color: #E8F2EE;
  border-top: 0;
}
.privacy-band .section-num,
.privacy-band .section-num span:first-child { color: var(--mint-text); }
.privacy-band h2 { color: #fff; max-width: 18ch; font-size: clamp(2rem, 4.4vw, 3.5rem); }
.privacy-band .section-head { margin-bottom: 40px; }
.privacy-cols {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
}
.privacy-cols .pc {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 48px;
}
.privacy-cols p { color: #E8F2EE; max-width: 52ch; }
.privacy-band a { color: #fff; }
.privacy-band :focus-visible { outline-color: var(--mint); }
.privacy-mark {
  width: 56px; height: 56px; margin-bottom: 20px;
}

/* Audience */
.audience .ruled h3 { margin-top: 0; }

/* ---------- Waitlist form ---------- */
.form-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
}
.waitlist-form { grid-column: 2; max-width: 760px; }
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
}
.field { display: grid; gap: 6px; align-content: start; }
.field-full { grid-column: 1 / -1; }
.field > label,
.field > legend {
  font-weight: 600;
  color: var(--teal);
  padding: 0;
}
.field .opt { font-weight: 400; color: var(--ink-soft); }
.req { color: var(--error); font-weight: 600; }
.hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
html[lang="ar"] .hint { font-size: 0.9375rem; }
input[type="text"],
input[type="email"],
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
html[lang="ar"] input,
html[lang="ar"] select { font-size: 1.0625rem; }
select {
  appearance: none;
  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.5l5-5' fill='none' stroke='%230E5A4C' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-inline-end: 40px;
}
html[dir="rtl"] select { background-position: left 14px center; }
input:focus-visible,
select:focus-visible { outline-offset: 1px; border-color: var(--teal); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-error {
  margin: 0;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;
}
.field-error:empty { display: none; }

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 18px 8px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
}
html[dir="rtl"] .choice { padding: 8px 14px 8px 18px; }
.choice:has(input:checked) { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.choice:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }

input[type="radio"],
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal);
  flex: none;
}

.consents {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.check input { margin-top: 4px; }
html[lang="ar"] .check input { margin-top: 6px; }
.check label { cursor: pointer; }
.check .hint, .check .field-error { grid-column: 2; }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-top: 32px;
}
.processing-note {
  margin: 20px 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 64ch;
}
.form-status {
  margin: 24px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  border-inline-start: 4px solid currentColor;
  background: var(--paper);
  font-weight: 600;
}
.form-status:empty { display: none; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }

/* Honeypot: hidden from people, visible to naive bots */
.hp {
  position: absolute !important;
  inset-inline-start: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal);
  color: #D9E9E3;
  padding-block: 64px 32px;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.site-footer .brand { color: #fff; }
.site-footer h2 {
  color: var(--mint-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
html[lang="ar"] .site-footer h2 { letter-spacing: 0; font-size: 0.9375rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a {
  color: #fff;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.site-footer :focus-visible { outline-color: var(--mint); }
.footer-tagline { margin: 16px 0 0; max-width: 34ch; }
.footer-legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.875rem;
  color: #C5DDD5;
}
.footer-legal p { margin: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Legal pages ---------- */
.legal {
  padding-block: clamp(40px, 6vw, 80px) var(--section-y);
}
.legal-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.legal-head { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.legal-head h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); }
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.legal-summary {
  margin: 24px 0 0;
  max-width: 66ch;
  font-size: 1.125rem;
  color: var(--ink);
}
.toc {
  position: sticky;
  top: 96px;
  font-size: 0.9375rem;
}
.toc h2 {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
html[lang="ar"] .toc h2 { letter-spacing: 0; font-size: 0.9375rem; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: 10px;
  min-height: 36px;
  align-items: center;
  color: var(--ink-soft);
  text-decoration: none;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 600;
}
.toc a:hover { color: var(--teal); text-decoration: underline; }
.prose { max-width: 70ch; }
.prose section { padding-block: 8px 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-size: 1.5rem; margin: 0 0 16px; }
.prose h3 { font-size: 1.125rem; margin: 24px 0 8px; }
.prose ul { padding-inline-start: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 0.9375rem;
}
.prose th, .prose td {
  text-align: start;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}
html[dir="rtl"] .prose th, html[dir="rtl"] .prose td { padding: 10px 0 10px 12px; }
.prose th { color: var(--teal); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.callout {
  margin: 0 0 1em;
  padding: 16px 20px;
  border-inline-start: 4px solid var(--leaf);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
}
html[dir="rtl"] .callout { border-radius: var(--radius) 0 0 var(--radius); }
mark.todo {
  background: #FFF1C2;
  color: #5A4200;
  padding: 0 4px;
  border-radius: 4px;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - 72px);
  display: grid;
  align-content: center;
  padding-block: 64px;
}
.notfound-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.notfound .code {
  font-family: var(--font-en);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
  margin: 0 0 24px;
}
.notfound h1,
.notfound h2 { font-size: 1.75rem; margin-bottom: 12px; }
.notfound [lang="en"] { font-family: var(--font-en); }
.notfound p { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .plate-figure { max-width: 460px; margin-inline: auto; width: 100%; }
  .section-head,
  .form-layout { grid-template-columns: 1fr; gap: 12px; }
  .waitlist-form { grid-column: 1; }
  .privacy-cols { grid-template-columns: 1fr; }
  .privacy-cols .pc { grid-column: 1; }
  .ruled { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ruled > li:nth-child(3n + 1) { border-inline-start: 1px solid var(--line); padding-inline-start: 28px; }
  .ruled > li:nth-child(2n + 1) { border-inline-start: 0; padding-inline-start: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
}

@media (max-width: 720px) {
  .main-nav .nav-link { display: none; }
  .header-row { gap: 12px; }
  .wordmark { font-size: 1.25rem; }
  .ruled { grid-template-columns: 1fr; }
  .ruled > li,
  .ruled > li + li,
  .ruled > li:nth-child(3n + 1) {
    border-inline-start: 0;
    padding-block: 24px;
    padding-inline: 0;
  }
  .shots { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .privacy-cols .pc { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .notfound-grid { grid-template-columns: 1fr; }
  .slip { margin-inline: auto; margin-top: -24px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 380px) {
  .brand .wordmark { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .toc, .skip-link { display: none; }
  body { background: #fff; }
}

@media (max-width: 720px) {
  .plate { width: min(100%, 320px); }
}
