/* Small Print website - shared styles.
   Tokens mirror the app (res/values colors.xml): brand blue, warning red, calm neutrals. */

:root {
  color-scheme: light;
  --bg: #F4F6FA; --surface: #FFFFFF; --surface-alt: #EEF1F6; --line: #DDE3EC;
  --ink: #0F141B; --muted: #566072; --fine: #9AA3B1;
  --brand: #1D4ED8; --brand-ink: #FFFFFF; --brand-soft: #E7EEFF;
  --red: #B42318; --red-soft: #FDECEA; --amber: #B54708; --amber-soft: #FFF3E0;
  --green: #067647; --green-soft: #E8F7EF;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0D1016; --surface: #171B23; --surface-alt: #1F242E; --line: #2A303B;
    --ink: #EFF2F6; --muted: #A3ACBA; --fine: #6D7686;
    --brand: #7C9CFF; --brand-ink: #0D1016; --brand-soft: #1B2442;
    --red: #FF7A6E; --red-soft: #3A1714; --amber: #FDB64C; --amber-soft: #35260D;
    --green: #4ED492; --green-soft: #10291D;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1016; --surface: #171B23; --surface-alt: #1F242E; --line: #2A303B;
  --ink: #EFF2F6; --muted: #A3ACBA; --fine: #6D7686;
  --brand: #7C9CFF; --brand-ink: #0D1016; --brand-soft: #1B2442;
  --red: #FF7A6E; --red-soft: #3A1714; --amber: #FDB64C; --amber-soft: #35260D;
  --green: #4ED492; --green-soft: #10291D;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--body); padding: 0 20px; padding-block: env(safe-area-inset-top, 0px) 0; }
.wrap { max-width: 1080px; margin: 0 auto; }
.narrow { max-width: 760px; }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.015em; text-wrap: balance; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(2.2rem, 5.6vw, 3.9rem); font-weight: 800; line-height: 1.03; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.eyebrow { font: 700 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 12px; }

/* --- Header / nav --- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--display); color: var(--ink); text-decoration: none; }
.logo svg { width: 34px; height: 34px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--brand); }
.site-nav a.nav-dl { background: var(--brand); color: var(--brand-ink); padding: 9px 16px; border-radius: 12px; border: 0; }
@media (max-width: 640px) { .site-nav { gap: 2px 14px; } .site-nav a { font-size: .95rem; } }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--brand); color: var(--brand-ink); text-decoration: none; font: 700 1.1rem/1 var(--body); padding: 18px 24px; border-radius: 14px; border: 0; cursor: pointer; }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 30px; }
.meta { color: var(--muted); font-size: .95rem; }

/* --- Sections --- */
section { padding-block: 72px; border-top: 1px solid var(--line); }
.page-head { padding-block: 40px 48px; }
.page-head .lede { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stack > * + * { margin-top: 14px; }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 36px; }
  section { padding-block: 56px; }
}

/* --- Callouts --- */
.callout { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 1rem; }
.callout svg { width: 24px; height: 24px; fill: var(--brand); margin-top: 2px; }
.callout.warn { background: var(--amber-soft); border-color: transparent; } .callout.warn svg { fill: var(--amber); }
.callout.good { background: var(--green-soft); border-color: transparent; } .callout.good svg { fill: var(--green); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px 52px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; color: var(--muted); font-size: .95rem; }
.site-footer h4 { font: 700 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); }
@media (max-width: 700px) { .site-footer { grid-template-columns: 1fr; } }

/* =========================================================================
   Phone illustrations - drawn in HTML/CSS so they stay sharp, match the app,
   and read in dark mode. Every .phone has role="img" + an aria-label.
   ========================================================================= */
.phone { width: min(300px, 100%); border-radius: 36px; padding: 11px; background: #0B0E13; box-shadow: 0 26px 50px -22px rgba(15,20,27,.45); margin-inline: auto; }
.phone.sm { width: min(250px, 100%); border-radius: 30px; padding: 9px; }
.scr { border-radius: 26px; overflow: hidden; background: #FFFFFF; color: #0F141B; font: 15px/1.45 var(--body); min-height: 420px; display: flex; flex-direction: column; }
.phone.sm .scr { border-radius: 22px; min-height: 380px; font-size: 13.5px; }
.scr.dark { background: #0E1014; color: #F2F4F7; }
.scr.red { background: #B42318; color: #fff; }
.sb { display: flex; justify-content: space-between; font-size: .72em; padding: 10px 18px 4px; opacity: .75; }
.sb::after { content: "\25CF\25CF\25CF"; letter-spacing: 2px; font-size: .7em; }
.scr .body { padding: 10px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.scr .title { font: 700 1.25em/1.2 var(--display); }
.scr .sub { font-size: .82em; color: #566072; }
.scr.dark .sub { color: #A2AAB7; }
.scr .row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #F0F2F5; }
.scr.dark .row { background: #1F232B; }
.scr .row .grow { flex: 1; }
.scr .row small { display: block; color: #6B7482; font-size: .78em; }
.scr .hl { outline: 3px solid #1D4ED8; outline-offset: 2px; position: relative; }
.scr .tap { position: relative; }
.scr .tap::after { content: ""; position: absolute; right: 10px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: rgba(29,78,216,.28); box-shadow: 0 0 0 6px rgba(29,78,216,.14); }
.toggle { width: 38px; height: 22px; border-radius: 999px; background: #C3C9D3; position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.toggle.on { background: #1D4ED8; } .toggle.on::after { left: 19px; }
.pill { display: inline-block; font: 700 .68em/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; }
.pill.on { background: #E8F7EF; color: #067647; } .pill.off { background: #EEF1F6; color: #566072; }
.sheet { margin-top: auto; background: #fff; color: #0F141B; border-radius: 22px 22px 0 0; padding: 18px 16px 16px; box-shadow: 0 -10px 30px rgba(0,0,0,.18); display: grid; gap: 10px; }
.dim { background: linear-gradient(#0000, #0000), repeating-linear-gradient(0deg, #E9ECF1 0 14px, #F4F6F9 14px 28px); position: relative; }
.dim::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.dim > * { position: relative; }
.dialog { margin: auto 12px; background: #fff; color: #0F141B; border-radius: 22px; padding: 18px; display: grid; gap: 10px; text-align: left; }
.dialog .t { font: 700 1.1em/1.25 var(--display); }
.dialog .acts { display: flex; justify-content: flex-end; gap: 16px; font-weight: 700; color: #1D4ED8; margin-top: 4px; }
.mbtn { background: #1D4ED8; color: #fff; text-align: center; font-weight: 700; border-radius: 12px; padding: 11px; }
.mbtn.alt { background: #fff; color: #0F141B; border: 1px solid #DDE3EC; }
.mbtn.white { background: #fff; color: #B42318; }
.menu { position: absolute; right: 10px; top: 44px; background: #fff; color: #0F141B; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 6px 0; min-width: 190px; font-size: .9em; }
.menu div { padding: 10px 14px; } .menu .hl { outline-offset: -3px; border-radius: 8px; }
.notif { background: #fff; color: #0F141B; border-radius: 18px; padding: 12px 14px; display: grid; gap: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.notif .app { display: flex; align-items: center; gap: 6px; font-size: .72em; color: #566072; }
.notif .app i { width: 14px; height: 14px; border-radius: 4px; background: #1D4ED8; display: inline-block; }
.notif b { font-size: .95em; } .notif p { font-size: .82em; color: #3B4453; }
.notif .acts { display: flex; gap: 14px; font-weight: 700; font-size: .8em; color: #1D4ED8; margin-top: 4px; }
.wall { background: linear-gradient(160deg, #2B3A67, #121827); }
.warn-ic { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.8); display: grid; place-items: center; margin: 6px auto 0; }
.warn-ic svg { width: 26px; height: 26px; fill: #fff; }
.caption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* --- Step-by-step guide --- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: 48px; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step .num { counter-increment: step; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font: 800 1.2rem/1 var(--display); }
.step .num::before { content: counter(step); }
.step h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin-top: 14px; }
.step ol, .step ul { margin: 14px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.step .callout { margin-top: 18px; }
@media (max-width: 860px) { .step { grid-template-columns: 1fr; gap: 28px; padding-block: 40px; } }

/* --- Help centre --- */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.topics a { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.topics a strong { font-family: var(--display); font-size: 1.1rem; }
.topics a span { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .topics { grid-template-columns: 1fr; } }
.faq-group { padding-block: 48px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.faq-group > h2 { margin-bottom: 18px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; }
summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details .answer { padding: 0 18px 18px; display: grid; gap: 12px; color: var(--ink); font-size: 1rem; }
details .answer ol, details .answer ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
details .answer .phone { margin-top: 6px; }

/* --- Prose pages (privacy) --- */
.prose h2 { font-size: 1.5rem; margin-top: 40px; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes rise { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
}
