/*
 * DueKnot site styles.
 *
 * Mobile first: base rules are for phones, min-width queries add columns.
 * Dark by default; the light palette applies when the visitor's device asks
 * for it. Colors come from the app (04-designs/design-specs.md). Nothing
 * animates on scroll: every section is visible as soon as the page loads.
 */

/* Inter is the fallback for visitors without Apple's system font (UI-2).
   Served from this site; never from Google. Both files are variable
   (weight 100–900) Latin subsets; unicode-range matches what they contain.
   →, ✓ and ⌘ aren't in them and come from the system font. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Inter";
  src: url("../fonts/inter-latin-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  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;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark light;

  --font: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;

  --accent: #0a84ff;
  --link: #4da3ff;
  --due-soon: #ff9f0a;
  --overdue: #ff453a;
  --paid: #30d158;
  --paid-text: #30d158; /* status color used as text, e.g. the pricing ✓ */

  --bg: #0a0b0e;
  --bg-alt: #0f1014;
  --surface: #15171c;
  --surface-raised: #1b1d23;
  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.14);
  --text: #f4f6f9;
  --text-muted: #a3a9b5;
  --text-faint: #7f8691; /* ≥ 4.8:1 on bg, bg-alt and surface */

  --glow-purple: #2a2456;
  --glow-teal: #0d3b3e;
  --glow-blue: #0b2d57;
  --mark: rgb(10 132 255 / 0.55);
  /* 88% keeps header text ≥ 5:1 even over a white screenshot scrolling beneath. */
  --header-bg: rgb(10 11 14 / 0.88);
  --shadow-phone: drop-shadow(0 30px 50px rgb(0 0 0 / 0.55));

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --gutter: 20px;
  --section-space: 72px;
}

@media (prefers-color-scheme: light) {
  :root {
    --link: #0062cc;
    --due-soon: #d98a10;
    --overdue: #e5484d;
    --paid: #1faa5a;
    --paid-text: #157a41; /* StatusPaid high contrast: 5.4:1 on white, 4.6:1 on the Pro card's tint */

    --bg: #f6f7f9;
    --bg-alt: #eef0f3;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --border: rgb(10 20 40 / 0.08);
    --border-strong: rgb(10 20 40 / 0.14);
    --text: #0b0d12;
    --text-muted: #4f5662;
    --text-faint: #666c77; /* ≥ 4.6:1 on bg, bg-alt and surface */

    --glow-purple: #dfe8ff;
    --glow-teal: #d6f2f4;
    --glow-blue: #d9e9ff;
    --mark: rgb(10 132 255 / 0.32);
    --header-bg: rgb(246 247 249 / 0.88);
    --shadow-phone: drop-shadow(0 26px 40px rgb(20 30 60 / 0.18));
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
    --section-space: 104px;
  }
}

/* ---------- Base ---------- */

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

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

/* On iPhone and iPad, follow the reader's Dynamic Type setting: rem sizes
   scale with Settings → Display & Brightness → Text Size. Touch screens
   only, because on a Mac -apple-system-body is 13px. */
@media (pointer: coarse) {
  @supports (font: -apple-system-body) {
    html {
      font: -apple-system-body;
    }
  }
}

/* Press feedback replaces the gray tap flash on iOS. */
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
}

/* A long address can wrap rather than run off a narrow screen at large text sizes. */
p a {
  overflow-wrap: anywhere;
}

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

ul {
  margin: 0;
  padding: 0;
}

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: calc(760px + 2 * var(--gutter));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* The highlighter underline under key words in headings. */
.mark {
  background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 94% / 100% 0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.text-link {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

@media (hover: hover) {
  .text-link:hover {
    text-decoration: underline;
  }
}

/* ---------- Buttons and badge ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
}

@media (hover: hover) {
  .button:hover {
    opacity: 0.88;
  }
}

/* Respond on press, not on release. */
.button:active,
.app-store-badge:active,
.topic-nav a:active {
  transform: scale(0.97);
}

.button--small {
  position: relative;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
}

/* Invisible padding so the tap target is at least 44px tall. */
.button--small::before {
  content: "";
  position: absolute;
  inset: -5px -4px;
}

/* Until launch (UI-7): a quiet label, not a button, so nothing looks tappable. */
.coming-soon {
  margin: 0;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
}

.app-store-badge {
  display: inline-block;
  border-radius: 10px;
}

.app-store-badge img {
  width: 160px;
  height: auto;
}

/* In dark mode Apple's black badge needs a lighter edge to stand out. */
@media (prefers-color-scheme: dark) {
  .app-store-badge img {
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22);
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.brand__icon {
  border-radius: 23%;
}

.brand__wordmark {
  width: 104px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav__link {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav__link[aria-current="page"] {
  color: var(--text);
}

@media (hover: hover) {
  .site-nav__link:hover {
    color: var(--text);
  }
}

.site-nav__link:active {
  color: var(--text);
}

@media (min-width: 640px) {
  .site-nav__link {
    display: inline-flex;
  }

  .brand__wordmark {
    width: 120px;
  }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: var(--section-space) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.section--alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 680px;
  margin-bottom: 40px;
  color: var(--text-muted);
}

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

.section-title {
  margin-bottom: 20px;
  color: var(--text);
  font-size: clamp(2rem, 1.3rem + 3.2vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.section-head--center .section-title {
  margin-bottom: 0;
}

/* Soft color glows behind phones and cards. */
.glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.glow--hero {
  top: 38%;
  left: 50%;
  width: min(900px, 140vw);
  height: 700px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 35% 50%, var(--glow-purple), transparent),
    radial-gradient(closest-side at 70% 55%, var(--glow-teal), transparent);
}

.glow--teal,
.glow--purple {
  inset: 10% 5%;
}

.glow--teal {
  background: radial-gradient(closest-side, var(--glow-teal), transparent);
}

.glow--purple {
  background: radial-gradient(closest-side, var(--glow-purple), transparent);
}

.glow--cta {
  inset: -20% 10%;
  background:
    radial-gradient(closest-side at 30% 50%, var(--glow-blue), transparent),
    radial-gradient(closest-side at 70% 50%, var(--glow-purple), transparent);
}

/* Phone screenshots already include the device frame. */
.screen {
  width: 100%;
  height: auto;
  filter: var(--shadow-phone);
}

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

.hero {
  position: relative;
  padding-top: clamp(56px, 4vw + 40px, 96px);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
}

.hero__title {
  font-size: clamp(2.75rem, 1.4rem + 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.hero__lede {
  max-width: 600px;
  margin: 24px 0 32px;
  color: var(--text-muted);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.3125rem);
  line-height: 1.5;
}

.hero__note {
  max-width: 340px;
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 0.875rem;
}

/* The hero phone rises from the bottom edge of the section. */
.hero__phone {
  width: min(360px, 82vw);
  height: min(560px, 128vw);
  margin-top: 48px;
  /* Clip only the bottom, so the phone's shadow isn't cut at the sides. */
  clip-path: inset(-80px -80px 0 -80px);
}

/* ---------- Basics: three large tiles (Luna-style) ---------- */

.basics {
  display: grid;
  gap: 48px;
}

.basic {
  color: var(--text-muted);
}

.basic__title {
  margin: 24px 0 10px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tile {
  --tint: var(--accent);
  position: relative;
  display: flex;
  justify-content: center;
  aspect-ratio: 1 / 0.86;
  padding-top: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 70%),
    var(--surface);
  overflow: hidden;
}

.tile--blue { --tint: var(--accent); }
.tile--amber { --tint: var(--due-soon); }
.tile--green { --tint: var(--paid); }

/* --focus moves the screenshot up so the part that matters shows. */
.tile .screen {
  width: 64%;
  align-self: flex-start;
  transform: translateY(calc(var(--focus, 0%) * -1));
}

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

/* ---------- Feature grid (Amy-style) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 16px;
  list-style: none;
}

.feature__title {
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

.tile--zoom {
  --tint: var(--accent);
  aspect-ratio: 1;
  padding-top: 0;
  border-radius: var(--radius-md);
}

.tile--zoom .screen {
  flex: none;
  width: 118%;
}

.feature:nth-child(3n + 2) .tile--zoom { --tint: var(--due-soon); }
.feature:nth-child(3n + 3) .tile--zoom { --tint: var(--paid); }

@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 28px;
  }

  .feature__title {
    margin-top: 18px;
    font-size: 1.0625rem;
  }
}

/* ---------- Split: text beside phones ---------- */

.split__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

.split__text {
  color: var(--text-muted);
}

.split .section-title {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
}

.siri-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  list-style: none;
}

.siri-list li {
  justify-self: start;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 20px 20px 20px 6px;
  background: var(--surface);
  color: var(--text);
  font-style: italic;
}

.phones {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 4%;
  padding: 0 4%;
}

.phones .screen {
  position: relative;
  z-index: 1;
  width: 48%;
  max-width: 300px;
}

.phones .screen:nth-of-type(2) {
  margin-top: 12%;
}

.phones--single .screen {
  width: 64%;
}

@media (min-width: 900px) {
  .split__inner {
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
  }

  .split--reverse .split__media {
    order: -1;
  }
}

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

.cards {
  display: grid;
  gap: 14px;
  list-style: none;
}

.card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card__icon {
  width: 26px;
  height: 26px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__title {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
}

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

@media (min-width: 1000px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Pricing ---------- */

.pricing {
  display: grid;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.plan {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.plan--pro {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--surface-raised);
}

.plan__name {
  font-size: 1.25rem;
  font-weight: 700;
}

.plan__price {
  margin: 6px 0 20px;
  color: var(--text-muted);
}

.plan__list {
  list-style: none;
}

.plan__list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.plan__list li span:last-child {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.plan__list li.is-off span:last-child {
  color: var(--text-faint);
}

.plan__list li span.check {
  color: var(--paid-text);
}

.pricing__note {
  max-width: 560px;
  margin: 28px auto 0;
  color: var(--text-muted);
  text-align: center;
}

@media (min-width: 720px) {
  .pricing {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .plan {
    padding: 32px;
  }
}

/* ---------- Closing call to action ---------- */

.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 56px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.cta > *:not(.glow) {
  position: relative;
  z-index: 1;
}

.cta__icon {
  border-radius: 23%;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.3);
}

.cta__title {
  color: var(--text);
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

@media (min-width: 720px) {
  .cta {
    padding: 88px 40px;
  }
}

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

.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.9375rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 28px;
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__nav a[aria-current="page"],
.site-footer__nav a:active {
  color: var(--text);
}

@media (hover: hover) {
  .site-footer__nav a:hover {
    color: var(--text);
  }
}

.site-footer__copyright {
  margin: 0;
}

/* Links the publisher named in the structured data (SEO-2). Underlined so it
   reads as a link without relying on color; padded to a 44px tap height. */
.site-footer__copyright a {
  display: inline-block;
  padding: 10px 0;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__copyright a:active {
  color: var(--text);
}

@media (hover: hover) {
  .site-footer__copyright a:hover {
    color: var(--text);
  }
}

@media (min-width: 720px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ---------- Legal and text pages ---------- */

.page-hero {
  position: relative;
  padding: 64px 0 40px;
  overflow: hidden;
}

.page-hero .glow {
  top: -260px;
  left: 50%;
  width: min(900px, 140vw);
  height: 520px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 35% 50%, var(--glow-purple), transparent),
    radial-gradient(closest-side at 70% 50%, var(--glow-teal), transparent);
}

.page-hero__inner {
  position: relative;
  z-index: 1;
}

.page-hero__title {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.page-hero__meta {
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

.prose {
  padding-bottom: var(--section-space);
  color: var(--text-muted);
}

.prose h2 {
  margin: 56px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.prose h3 {
  margin: 36px 0 12px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

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

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

.prose a {
  overflow-wrap: anywhere;
}

/* The short version gets a card of its own. */
.prose .summary {
  margin: 8px 0 0;
  padding: 24px 24px 24px 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.prose .summary li:last-child {
  margin-bottom: 0;
}

.prose p.summary {
  padding: 24px;
  color: var(--text);
}

/* ---------- 404 page ---------- */

.not-found {
  padding-bottom: var(--section-space);
}

.not-found .requirements li {
  padding: 0;
}

/* The whole card is the link, at least 44px tall. */
.not-found .requirements a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 16px 20px;
  color: var(--text);
  text-decoration: none;
}

@media (hover: hover) {
  .not-found .requirements a:hover {
    color: var(--link);
  }
}

/* ---------- Support page ---------- */

.page-hero__inner--wide {
  max-width: 1160px;
}

.page-hero__lede {
  max-width: 680px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Topic links wrap into rows of pills; no menu or script needed. */
.topic-nav {
  margin-bottom: 16px;
}

.topic-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.topic-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

@media (hover: hover) {
  .topic-nav a:hover {
    border-color: var(--border-strong);
    color: var(--text);
  }
}

.faq-group {
  display: grid;
  gap: 16px;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.faq-group:last-of-type {
  border-bottom: 0;
}

.faq-group__title {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Questions open in place with <details>, so every answer is in the HTML. */
.faq {
  border-bottom: 1px solid var(--border);
}

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

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 0.35em;
  background:
    linear-gradient(var(--text-muted), var(--text-muted)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--text-muted), var(--text-muted)) center / 1.5px 100% no-repeat;
}

.faq[open] summary::after {
  background: linear-gradient(var(--text-muted), var(--text-muted)) center / 100% 1.5px no-repeat;
}

@media (hover: hover) {
  .faq summary:hover {
    color: var(--link);
  }
}

.faq summary:active {
  color: var(--link);
}

.faq__answer {
  padding: 0 28px 20px 0;
  color: var(--text-muted);
}

.faq__answer ul,
.faq__answer ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

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

.faq__answer li::marker {
  color: var(--accent);
}

.requirements {
  display: grid;
  gap: 10px;
  list-style: none;
}

.requirements li {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}

.cta--support {
  gap: 12px;
  margin: 24px 0 var(--section-space);
  color: var(--text-muted);
  font-size: 1.125rem;
}

@media (min-width: 900px) {
  .faq-group {
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    padding: 64px 0;
  }

  .faq-group__title {
    padding-top: 14px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .site-nav__link,
  .site-footer__nav a,
  .topic-nav a {
    transition: color 0.15s, opacity 0.15s, transform 0.1s ease-out;
  }

  .app-store-badge {
    transition: transform 0.1s ease-out;
  }
}

/* Reduced motion: press feedback dims instead of scaling. */
@media (prefers-reduced-motion: reduce) {
  .button:active,
  .app-store-badge:active,
  .topic-nav a:active {
    transform: none;
    opacity: 0.7;
  }
}

/* Reduce Transparency: the header becomes a solid bar. */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Increase Contrast: stronger edges and text, solid header. */
@media (prefers-contrast: more) {
  :root {
    --border: rgb(255 255 255 / 0.28);
    --border-strong: rgb(255 255 255 / 0.45);
    --text-muted: #d2d6dd;
    --text-faint: #b4bac4;
    --mark: rgb(10 132 255 / 0.85);
  }

  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root {
    --border: rgb(10 20 40 / 0.35);
    --border-strong: rgb(10 20 40 / 0.55);
    --text-muted: #2f343c;
    --text-faint: #464c56;
    --mark: rgb(10 132 255 / 0.6);
  }
}
