:root {
  --accent: #e6005c;
  --bg: #fdfbfc;
  --surface: #ffffff;
  --surface-alt: #f7f3f5;
  --text: #1b1418;
  --text-dim: #625761;
  --border: #e8dfe4;
  --shadow: 0 1px 2px rgba(27, 20, 24, .04), 0 8px 24px -12px rgba(27, 20, 24, .12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ff3d84;
    --bg: #121013;
    --surface: #1b181c;
    --surface-alt: #211d23;
    --text: #f2eef1;
    --text-dim: #a49aa2;
    --border: #2e2932;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 44rem; margin: 0 auto; }

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

header {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 2rem;
}

/* The Worth It app icon, exactly as it appears on the Home Screen:
   the gradient mark from AppIcon.icon on Icon Composer's dark fill. */
.appicon {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(27, 20, 24, .28));
}

h1 {
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .75rem;
  font-weight: 700;
}

.dates {
  color: var(--text-dim);
  font-size: .9rem;
  margin: 0;
}

/* ---------- Summary ---------- */

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem 1.6rem;
  margin: 0 0 3rem;
  box-shadow: var(--shadow);
}

.summary h2 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--accent);
  margin: 0 0 .9rem;
  border: 0;
  padding: 0;
}

.summary ul { margin: 0; padding-left: 1.15rem; }
.summary li { margin-bottom: .5rem; }
.summary li:last-child { margin-bottom: 0; }

/* ---------- Body ---------- */

h2 {
  font-size: 1.25rem;
  letter-spacing: -.01em;
  margin: 3rem 0 .9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  font-weight: 650;
}

h3 {
  font-size: 1rem;
  margin: 1.8rem 0 .5rem;
  font-weight: 650;
}

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: .45rem; }

strong { font-weight: 650; }

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

a:hover { text-decoration-thickness: 2px; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .87em;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: .3rem;
  padding: .08em .35em;
}

.note {
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: .5rem;
  padding: .9rem 1.1rem;
  margin: 0 0 1rem;
  font-size: .94rem;
}

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

/* ---------- Table ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1rem;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: .92rem;
}

th, td {
  text-align: left;
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 650;
  background: var(--surface-alt);
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }

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

footer {
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .88rem;
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; padding: 0; }
  .summary, .note { border: 1px solid #ccc; background: #fff; }
  h2 { page-break-after: avoid; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; }
}

/* ---------- Cross-page nav ---------- */

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: .9rem;
}

.nav a { color: var(--text-dim); }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- Support FAQ ---------- */

details.faq {
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--surface);
  padding: 0 1.1rem;
  margin-bottom: .7rem;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: .95rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

details.faq summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
  flex: none;
}

details.faq[open] summary::after { content: "\2013"; }
details.faq[open] summary { border-bottom: 1px solid var(--border); }
details.faq .answer { padding: .9rem 0 .2rem; }
details.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */

.contact {
  background: var(--surface-alt);
  border-radius: 1rem;
  padding: 1.4rem 1.5rem;
  margin: 0 0 1rem;
}

.contact p:last-child { margin-bottom: 0; }
.contact .email { font-size: 1.05rem; font-weight: 600; }
