/* phewly.app: one shared stylesheet for every page (home, support, privacy).
   Self-hosted only: system rounded fonts, no web fonts, no external files.
   Colours: terracotta #C4532C, dusk teal #2F6168, cream #FFF4E2, sky #94D2EC, peach #FFC4A0.
   Text colours are chosen for WCAG AA (4.5:1 or more) on their backgrounds. */

:root {
  color-scheme: light dark;
  --bg: #FFF4E2;            /* cream */
  --bg-alt: #FDEBD3;        /* warmer cream band */
  --bg-sky: #E4F3FA;        /* pale sky band */
  --card: #FFFCF6;
  --ink: #1F3F44;           /* headings and strong text (11:1 on cream) */
  --ink2: #3F5A5F;          /* body text (7:1 on cream) */
  --teal: #2F6168;          /* dusk teal (6.3:1 on cream) */
  --terra: #C4532C;         /* terracotta, for fills with white text (4.5:1) */
  --terra-text: #A6411D;    /* terracotta for text and links (5.6:1 on cream) */
  --peach: #FFC4A0;
  --sky: #94D2EC;
  --line: #EAD9BF;
  --focus: #2F6168;
  --on-terra: #FFFFFF;
  --badge-bg: #FBE1CF;
  --badge-ink: #8A3517;
  --shadow: 0 1px 2px rgba(47, 97, 104, .06), 0 8px 28px rgba(47, 97, 104, .08);
  --hero-sky: linear-gradient(180deg, #A9DBF0 0%, #D9EEF4 30%, #FFF4E2 62%, #FFE2CC 100%);
  --hero-top: #A9DBF0;
  --radius: 22px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F2233;
    --bg-alt: #132A3D;
    --bg-sky: #12293B;
    --card: #183248;
    --ink: #FFF4E2;
    --ink2: #D3DDE0;
    --teal: #9FD6DD;
    --terra: #C4532C;
    --terra-text: #FFC4A0;
    --line: #2A4760;
    --focus: #FFC4A0;
    --badge-bg: #4A2A20;
    --badge-ink: #FFD7BD;
    --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 28px rgba(0, 0, 0, .25);
    --hero-top: #0E2236;
    --hero-sky: linear-gradient(180deg, #0E2236 0%, #1B3A55 45%, #2C3F5C 75%, #3E3550 100%);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink2);
  font-family: var(--font);
  font-size: 1.125rem;      /* 18px */
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { color: var(--ink); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.3rem; font-weight: 750; }
p { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 700; }

a { color: var(--terra-text); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  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 {
  position: absolute; left: 12px; top: -100px; z-index: 10;
  background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

/* ---------- Header ---------- */
.site-header { padding: 14px 0; }
.site-header.on-sky, .doc-page .site-header { background: var(--hero-top); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.4rem; }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 8px 12px; border-radius: 999px; color: var(--ink);
  text-decoration: none; font-weight: 650; font-size: 1rem;
}
.site-nav a:hover { background: color-mix(in srgb, var(--card) 70%, transparent); text-decoration: underline; }
.site-nav a[aria-current="page"] { background: var(--card); box-shadow: var(--shadow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 10px 26px; border-radius: 999px;
  font: inherit; font-weight: 750; font-size: 1.1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--terra); color: var(--on-terra); box-shadow: 0 6px 18px rgba(196, 83, 44, .28); }
.btn-primary:hover { background: #B04824; text-decoration: none; }
.btn-store { background: #10232B; color: #FFFFFF; }
.btn-store:hover { background: #000000; }
.btn-store small { display: block; font-size: .75rem; font-weight: 600; opacity: .9; }
.btn-store span { text-align: left; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
@media (prefers-color-scheme: dark) {
  .btn-store { background: #FFF4E2; color: #10232B; }
  .btn-store:hover { background: #FFFFFF; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .15s ease, background-color .15s ease; }
  .btn:hover { transform: translateY(-1px); }
}

/* ---------- Home: hero ---------- */
.hero { background: var(--hero-sky); padding: 8px 0 72px; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero::before { width: 340px; height: 340px; right: -80px; top: 120px; background: #FFD27A; opacity: .35; }
.hero::after { width: 380px; height: 380px; left: -120px; bottom: -120px; background: #FFC4A0; opacity: .45; }
@media (prefers-color-scheme: dark) {
  .hero::before { background: #F2C46B; opacity: .14; }
  .hero::after { background: #C77A8C; opacity: .18; }
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 28px; align-items: center; text-align: center; padding-top: 28px; }
.hero-logo img { width: min(260px, 64vw); border-radius: 22%; box-shadow: 0 18px 50px rgba(15, 34, 51, .25); }
.hero h1 { color: var(--terra-text); font-weight: 900; font-size: clamp(3rem, 2rem + 5vw, 5rem); margin-bottom: .1em; letter-spacing: -0.02em; }
.definition { color: var(--ink2); font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem); line-height: 1.45; margin: 0 auto .7em; max-width: 34em; }
.definition dfn { font-style: normal; font-weight: 800; color: var(--terra-text); }
.definition .pron { opacity: .8; }
.definition em { font-style: italic; opacity: .85; }
.definition .when { display: block; }
.tagline { color: var(--ink); font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 800; line-height: 1.25; margin-bottom: .6em; }
.lede { font-size: 1.2rem; max-width: 36rem; margin-left: auto; margin-right: auto; color: var(--ink2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: center; align-items: center; margin-top: 24px; }
.cta-note { font-size: 1rem; margin: 14px 0 0; }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; text-align: left; padding-top: 48px; }
  .hero-logo { order: 2; justify-self: center; }
  .hero-logo img { width: 340px; }
  .lede { margin-left: 0; }
  .cta { justify-content: flex-start; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section.sky { background: var(--bg-sky); }
.section-head { max-width: 44rem; margin-bottom: 36px; }
.section-head p { font-size: 1.2rem; }
.eyebrow { display: inline-block; font-size: .95rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--terra-text); margin-bottom: 8px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 4px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.2em; margin: 0 0 1em; }
.card li { margin: 4px 0; }
.icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 12px;
  background: var(--badge-bg); color: var(--terra-text);
}
.icon svg { width: 28px; height: 28px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 64px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 22px; left: 22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--terra); color: var(--on-terra); font-weight: 900; font-size: 1.3rem;
}
.steps li > * { margin-top: 0; }
.steps li { padding: 80px 22px 24px; }

.note {
  border-left: 6px solid var(--teal); background: var(--card); border-radius: 14px;
  padding: 16px 18px; margin: 28px 0 0; max-width: 46rem;
}
.note p { margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.checklist li {
  display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
}
.checklist svg { width: 28px; height: 28px; color: var(--teal); margin-top: 2px; }
.checklist strong { display: block; }

/* ---------- Free vs Plus table ---------- */
.plans { margin-bottom: 28px; }
.compare {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  font-size: 1.05rem;
}
.compare caption { text-align: left; font-weight: 800; color: var(--ink); font-size: 1.3rem; padding: 0 0 12px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--bg-sky); color: var(--ink); font-size: 1.1rem; font-weight: 800; }
.compare thead th:last-child { background: var(--badge-bg); color: var(--badge-ink); }
.compare tbody th { color: var(--ink); font-weight: 700; width: 42%; }
.compare td { color: var(--ink2); }
.yes { display: inline-flex; gap: 6px; align-items: flex-start; }
.yes svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--teal); }
.no { color: var(--ink2); }
.tag {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px;
  background: var(--badge-bg); color: var(--badge-ink); margin-left: 6px; vertical-align: 2px; white-space: nowrap;
}
.tag.soon { background: var(--bg-sky); color: var(--ink); border: 1px solid var(--line); }

/* Narrow screens (and large zoom): each row becomes a small card. */
@media (max-width: 600px) {
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
  .compare caption { display: block; width: 100%; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tbody tr {
    background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; padding: 6px 0;
    box-shadow: var(--shadow);
  }
  .compare tbody th { width: 100%; border-bottom: 1px solid var(--line); }
  .compare td { border-bottom: 0; padding: 8px 16px; display: grid; grid-template-columns: 4.5rem 1fr; gap: 10px; }
  .compare td::before { content: attr(data-label); font-weight: 800; color: var(--ink); }
  .compare tbody tr:last-child td { border-bottom: 0; }
}

.price-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 32px; }
.price-cards .card h3 { font-size: 1.5rem; margin-bottom: .2em; }
.price { font-size: 1.15rem; color: var(--ink); font-weight: 700; margin-bottom: .6em; }
.plus-card { border: 2px solid var(--terra); }
.fine { font-size: 1rem; }

/* ---------- FAQ and long-form ---------- */
details {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 0; margin: 12px 0;
}
summary {
  cursor: pointer; font-weight: 750; color: var(--ink); padding: 16px 20px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; font-size: 1.6rem; line-height: 1; color: var(--terra-text); font-weight: 800; flex: none;
}
details[open] summary::after { content: "\2212"; }
details > *:not(summary) { margin-left: 20px; margin-right: 20px; }
details > *:last-child { margin-bottom: 18px; }
details ul { padding-left: 1.2em; }

.doc { padding: 24px 0 64px; background: linear-gradient(180deg, var(--hero-top) 0, var(--bg) 320px) no-repeat; }
.doc h1 { margin-top: 12px; }
.doc h2 { font-size: 1.6rem; margin-top: 2em; }
.doc li { margin: 6px 0; }
.lead { font-size: 1.25rem; }
.doc .card { margin: 20px 0; box-shadow: none; }
.doc-hero { background: var(--hero-sky); padding-bottom: 8px; }
.doc-hero .wrap { padding-top: 8px; padding-bottom: 16px; }
.meta { color: var(--ink2); font-size: 1rem; }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 1rem; min-width: 0; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { color: var(--ink); background: var(--bg-sky); }
@media (max-width: 560px) {
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { border-bottom: 0; padding: 6px 14px; }
  .table-wrap td:first-child { color: var(--ink); font-weight: 700; }
}

.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.toc a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1rem; }
.toc a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #1F3F44; color: #F3EBDD; padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 1rem; }
.site-footer a { color: #FFD9C2; }
.site-footer .wrap { display: grid; gap: 24px; }
.site-footer .brand { color: #FFF4E2; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer p { margin: 0; color: #E4DACB; }
@media (prefers-color-scheme: dark) { .site-footer { background: #0A1825; } }
@media (min-width: 800px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }

/* Print: plain and readable. */
@media print {
  .site-header nav, .cta, .skip, .hero::before, .hero::after { display: none !important; }
  body { background: #fff; color: #000; }
  details { border: 0; } details > * { display: block; }
}

/* Spacing helpers */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
