/* Even Stevens (埋數) website. Colours follow the app's Navy theme and the larches.io greens. */
:root {
  color-scheme: light dark;
  --bg: #F7F5EF;
  --surface: #FFFDF8;
  --raised: #F3F0E8;
  --text: #1F2A44;
  --muted: #535C70;
  --line: #DDD8CC;
  --link: #00702E;
  --button: #00C950;
  --on-button: #032E15;
  --chop: #C8291F;
  --hero: #1F2A44;
  --on-hero: #FFFDF8;
  --on-hero-2: #C9CED6;
  --note-bg: #FFF4D6;
  --note-text: #5C3B00;
  --note-line: #E8C770;
  --radius: 16px;
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1424;
    --surface: #1A2338;
    --raised: #26324F;
    --text: #F3F1EA;
    --muted: #AEB6C6;
    --line: #2A3550;
    --link: #05DF72;
    --hero: #141C30;
    --on-hero-2: #A3ACBD;
    --note-bg: #3A2C08;
    --note-text: #FFE7A3;
    --note-line: #7A5C14;
  }
}
:lang(zh-Hant) { --font: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
:lang(zh-HK) { --font: -apple-system, "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", sans-serif; }
:lang(zh-Hans) { --font: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
:lang(zh) { --display: var(--font); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font); }
:lang(zh) body, body:lang(zh) { line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--button); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header */
.site-header { background: var(--hero); color: var(--on-hero); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin-right: auto; }
.brand img { width: 36px; height: 36px; }
.brand .zh { color: var(--on-hero-2); font-weight: 600; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--on-hero); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; }
.nav-links a:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 720px) { .nav-links { display: none; } }

.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; font-size: .9rem; white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; list-style: none; margin: 0; padding: 6px; min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.lang li a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.lang li a:hover { background: var(--raised); }
.lang li a[aria-current] { font-weight: 700; color: var(--link); }

/* Hero */
.hero { background: var(--hero); color: var(--on-hero); padding: 32px 0 64px; overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.15fr .85fr; } .hero { padding: 56px 0 88px; } }
.hero-mark { position: relative; width: 120px; height: 120px; margin-bottom: 24px; }
.hero-mark .icon { width: 120px; height: 120px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.hero-mark .chop { position: absolute; width: 64px; height: 64px; right: -36px; bottom: -14px; transform: rotate(-8deg); }
.hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 3.8rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .25em; }
.hero h1 .zh { color: var(--on-hero-2); font-weight: 700; margin-left: .25em; }
.hero .tagline { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); font-weight: 600; margin-bottom: .5em; }
.hero .lede { color: var(--on-hero-2); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 28px; }
.cta .note { color: var(--on-hero-2); font-size: .95rem; }

/* App Store button. Swap for Apple's official localized badge before launch (README). */
.store { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; text-decoration: none; border: 1px solid #A6A6A6; border-radius: 12px; padding: 9px 18px 9px 14px; min-height: 56px; }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: .72rem; }
.store strong { font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.store:hover { background: #1a1a1a; }

/* Receipt mock in the hero */
.receipt { position: relative; background: #FFFDF8; color: #1F2A44; border-radius: 6px 6px 0 0; padding: 22px 22px 28px; max-width: 360px; margin: 0 auto; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); transform: rotate(2deg); font-variant-numeric: tabular-nums; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; background: linear-gradient(-45deg, transparent 8px, #FFFDF8 0) 0 0 / 16px 12px repeat-x, linear-gradient(45deg, transparent 8px, #FFFDF8 0) 0 0 / 16px 12px repeat-x; }
.receipt h3 { font-size: 1rem; margin: 0 0 2px; }
.receipt .meta { color: #535C70; font-size: .8rem; margin-bottom: 12px; }
.receipt .person { border-top: 1px dashed #C9CED6; padding: 10px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.receipt .row.total { font-weight: 700; margin-top: 4px; }
.receipt .who { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 4px; }
.receipt .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .7rem; font-weight: 700; }
.receipt .stamp { position: absolute; right: 14px; top: 12px; width: 62px; height: 62px; transform: rotate(-12deg); opacity: .92; }
.receipt h3, .receipt .meta { padding-right: 64px; }
.receipt .settled { color: #00702E; font-weight: 700; font-size: .85rem; margin-top: 10px; }

/* Sections */
section.block { padding: 64px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.alt .card { background: var(--bg); }
.card p { color: var(--muted); margin: 0; }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--raised); color: var(--link); margin-bottom: 14px; }
.card .ico svg { width: 24px; height: 24px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; }
.steps .num::before { content: counter(step); }
.steps .num { width: 36px; height: 36px; border-radius: 50%; background: var(--chop); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; font-family: var(--display); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--raised); color: var(--muted); margin-left: 6px; vertical-align: middle; }

/* Plans */
.plans { display: grid; gap: 20px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--button); position: relative; }
.plan .badge { position: absolute; top: -12px; left: 20px; background: var(--button); color: var(--on-button); font-size: .75rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; }
.plan .price { font-family: var(--display); font-size: 2rem; font-weight: 800; margin: 4px 0 0; color: var(--text); }
.plan .price small { display: block; font-size: .9rem; font-weight: 600; color: var(--muted); }
.plan .alt-price { color: var(--muted); font-size: .9rem; margin: 0 0 12px; min-height: 1.4em; }
.plan ul { padding-left: 1.2em; margin: 8px 0 0; color: var(--text); }
.plan li { margin: 4px 0; }
.trial { display: flex; gap: 14px; align-items: center; background: var(--raised); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.trial img { width: 48px; height: 48px; flex: none; }
.trial p { margin: 0; }
.fineprint { color: var(--muted); font-size: .875rem; margin-top: 20px; max-width: 48em; }

/* Closing CTA */
.closing { text-align: center; }
.closing img { width: 96px; margin: 0 auto 16px; }
.closing .cta { justify-content: center; }

/* Documents (privacy, terms, support) */
.doc { padding: 40px 0 64px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2em; }
.doc h3 { margin-top: 1.4em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: .35em 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.doc .updated { color: var(--muted); }
.draft { background: var(--note-bg); color: var(--note-text); border: 1px solid var(--note-line); border-radius: 12px; padding: 14px 16px; margin: 16px 0 24px; }
.draft strong { display: block; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 24px; }
.toc ol { margin: 0; columns: 2 220px; column-gap: 24px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 16px; }
.faq details > div { padding: 0 16px 6px; }
.contact { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.button { display: inline-block; background: var(--button); color: var(--on-button); font-weight: 700; text-decoration: none; padding: 12px 18px; border-radius: 12px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--raised); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 20px; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer .lockup { width: 220px; background: #FFFDF8; border-radius: 12px; padding: 8px 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer .made { margin: 12px 0 0; }
.site-footer .made a { font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .receipt { transition: transform .3s ease; }
  .receipt:hover { transform: rotate(0); }
}
@media print {
  .site-header, .site-footer, .skip { display: none; }
  body { background: #fff; color: #000; }
}
