/* Olanava site styles: shared by olanava.com and every app microsite.
   Tokens first; each microsite overrides --accent from its app.json. */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --edge: #e7e5e0;
  --fg: #1c1c1e;
  --muted: #5f5f63;
  --faint: #8e8e93;
  --brand: #4a7c59;
  --accent: var(--brand);
  --on-accent: #ffffff;
  --available: #4a7c59;       /* S32: "Available" pill, same in light and dark (white text 4.9:1) */
  --on-available: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --space: 16px;
  --max: 960px;
  --prose: 680px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161617; --surface: #1f1f21; --edge: #2e2e31; --fg: #f2f2f4;
    --muted: #a8a8ad; --faint: #7c7c82; --brand: #7fb58f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161617; --surface: #1f1f21; --edge: #2e2e31; --fg: #f2f2f4;
  --muted: #a8a8ad; --faint: #7c7c82; --brand: #7fb58f; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space); }
.prose { max-width: var(--prose); }

/* Header / footer */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 17px; }
.wordmark img { width: 28px; height: 28px; border-radius: 22.5%; }
.wordmark .brand-mark { color: var(--brand); flex: none; }
.crumbs { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.crumbs .sep { color: var(--faint); }
.crumbs .crumb-app { color: var(--fg); text-decoration: none; font-weight: 650; }
.crumbs a:hover span, .crumbs .crumb-app:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
main { flex: 1; }
.site-footer { padding: 32px 0 40px; font-size: 13.5px; color: var(--faint); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.site-footer a { color: var(--faint); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 18px; font-weight: 700; }
.hero p.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 600px; margin: 0; }
.app-hero { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; } /* S21: icon stays put when the opt-in expands */
.app-hero .icon { width: 128px; height: 128px; }
.app-hero > .icon { margin-top: calc(clamp(32px, 5vw, 46px) * 0.205); } /* S22: icon top level with the title cap height */
.app-hero h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 8px; }
.app-hero .tagline { font-size: clamp(18px, 2.4vw, 22px); color: var(--fg); margin: 0 0 10px; font-weight: 500; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--edge); border-radius: 999px; padding: 3px 10px; vertical-align: middle; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; }
.btn.secondary { background: var(--surface); color: var(--fg); border: 1px solid var(--edge); }
.meta { font-size: 13px; color: var(--faint); }

/* App icon fallback (monogram) */
.icon { border-radius: 22.5%; box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.06); }
.monogram { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; }

/* Cards */
.section { padding: 24px 0 56px; }
.section h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
a.card:not(.app-card) { display: block; }
a.card { color: inherit; text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: var(--faint); }
.grid.apps { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.app-card { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.app-card .icon { width: 56px; height: 56px; }
.app-card .row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.app-card .row h3 { margin: 0; }
.app-card .plat { font-size: 13px; color: var(--faint); }
/* S32: whole card links via a stretched link; the Download link sits above it. Ring only on hover / keyboard focus. */
.app-card { position: relative; transition: border-color .15s; }
.app-card:hover { border-color: var(--faint); }
.app-card .card-link { color: inherit; text-decoration: none; }
.app-card .card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.app-card .card-link:focus-visible { outline: none; }
.app-card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-card .card-action { position: relative; z-index: 1; display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }
.app-card .card-action:hover { text-decoration: underline; }
.status-available { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--on-available); background: var(--available); border-radius: 999px; padding: 3px 10px 3px 8px; }
.status-available .dot { font-size: 9px; line-height: 1; }
.status-quiet { font-size: 13px; color: var(--muted); }

/* Prose pages (privacy, terms, support) */
.page { padding: 40px 0 64px; }
.page h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; margin: 0 0 6px; }
.page .updated { color: var(--faint); font-size: 14px; margin: 0 0 28px; }
.page h2 { font-size: 20px; margin: 36px 0 10px; }
.page p, .page li { color: var(--fg); }
.page ul { padding-left: 22px; }
.page li { margin: 6px 0; }
.start .lede { font-size: 18px; color: var(--muted); margin: 0 0 8px; }
.start-steps { padding-left: 22px; }
.start-steps li { margin: 8px 0; }
.start-shot { margin: 18px 0 4px; }
.start-shot .screenshot { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--edge); }
.start-shot figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.dl-next { margin-top: 20px; }
.callout { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 18px 20px; font-size: 16.5px; }
details { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius-sm); padding: 14px 16px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Download page */
.dl { padding: 48px 0 40px; text-align: center; }
.dl .brand { display: inline-flex; align-items: center; gap: 14px; text-align: left; }
.dl .brand .icon { width: 64px; height: 64px; }
.dl .brand h1 { font-size: 26px; margin: 0; }
.dl .status { margin-top: 28px; font-size: 18px; font-weight: 600; }
.dl .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px auto 0; max-width: 760px; text-align: left; }
.step { background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; padding: 14px; }
.step .num { width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step b.t { display: block; font-size: 14px; margin-top: 10px; }
.step p { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.45; }
.linkbox { margin: 18px auto 0; max-width: 480px; background: var(--surface); border: 1px solid var(--edge); border-radius: 10px; padding: 10px; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.dl-actions { justify-content: center; margin-top: 28px; }
.btn.big { height: 52px; padding: 0 28px; font-size: 17px; border-radius: 14px; gap: 10px; }
.btn .btn-meta { font-weight: 500; opacity: .75; font-size: 14px; }
.btn .btn-meta:empty { display: none; }
.sendlink { max-width: 360px; margin: 26px auto 0; text-align: left; font-size: 14px; }
.sendlink label { display: block; font-weight: 600; margin-bottom: 6px; }
.sendlink-row { display: flex; gap: 8px; }
.sendlink-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; font: inherit; font-size: 16px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--fg); }
.sendlink .hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.sendlink-status { margin-top: 8px; color: var(--fg); min-height: 0; }
.sendlink-status:empty { display: none; }
.sendlink-note { margin-top: 6px; color: var(--muted); font-size: 13px; }
.sendlink.sent .sendlink-row { display: none; }
.dl .foot { margin-top: 22px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.only-phone, .only-unavailable { display: none; }
body.is-phone .only-mac { display: none; } body.is-phone .only-phone { display: block; }
body.is-unavailable .only-mac, body.is-unavailable .only-phone { display: none; } body.is-unavailable .only-unavailable { display: block; }

@media (max-width: 640px) {
  .hero { padding: 44px 0 36px; }
  .app-hero { grid-template-columns: 1fr; gap: 18px; }
  .app-hero .icon { width: 96px; height: 96px; }
  .app-hero > .icon { margin-top: 0; }
  .steps { grid-template-columns: 1fr; }
  .site-footer .wrap { flex-direction: column; }
}

/* Pricing + purchase pages (src/commerce-pages.mjs) */
[hidden] { display: none !important; }
.pricing-hero { padding-bottom: 32px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; max-width: 820px; }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.section .plan h2 { margin: 0; font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--fg); font-weight: 650; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding-left: 20px; color: var(--muted); flex: 1; }
.plan li { margin: 6px 0; }
.plan .btn { align-self: flex-start; }
.faq { margin-top: 48px; }
.faq h2 { font-size: 20px; margin: 0 0 8px; }
.commerce .status { font-size: 18px; font-weight: 600; margin-top: 8px; }
.commerce .sub { color: var(--muted); margin: 6px 0 0; }
.license { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.license-head { display: flex; align-items: center; gap: 10px; }
.license .actions { margin-top: 6px; }
.token-label { display: block; font-size: 14px; color: var(--muted); }
.token { display: block; width: 100%; margin-top: 6px; font-family: var(--mono); font-size: 12.5px; padding: 10px; border: 1px solid var(--edge); border-radius: var(--radius-sm); background: var(--bg); color: var(--fg); resize: vertical; overflow-wrap: anywhere; }
.recover { margin-top: 20px; }
.recover label { display: block; font-weight: 600; margin-bottom: 6px; }
.recover .row { display: flex; gap: 10px; flex-wrap: wrap; }
.recover input { flex: 1 1 240px; height: 44px; padding: 0 12px; font: inherit; border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); color: var(--fg); }
.pro-line { font-size: 16px; font-weight: 500; color: var(--fg); margin: 4px 0 16px; }
.commerce-help { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--edge); font-size: 14px; color: var(--muted); }
.renew-dates { margin: 16px 0 8px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); display: grid; gap: 8px; }
.renew-dates div { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.renew-dates dt { color: var(--muted); }
.renew-dates dd { margin: 0; font-weight: 600; }
.renew-dates div:last-child dd { color: var(--accent); }
.renew-rule { font-size: 14px; }

/* App home extras (draft copy, S12) */
.grid.pair { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.secondary-note { margin: 20px 0 0; color: var(--muted); font-size: 15px; }
.shot { padding-top: 0; }
.screenshot { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--edge); box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.screenshot-slot { display: flex; align-items: center; justify-content: center; text-align: center; aspect-ratio: 16 / 10; padding: 24px; border: 2px dashed var(--edge); border-radius: var(--radius); color: var(--faint); font-size: 15px; }
.site-footer .footnote { font-size: 12.5px; }
.meta a { color: inherit; text-decoration: underline; }
.app-hero h1.hero-tagline { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.12; margin-bottom: 14px; }
/* Focus rings for keyboard users only */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* S16 cards-first layout (Allegro draft) */
.hero.compact { padding: 28px 0 28px; }
.cards-under-hero { padding: 0 0 40px; }
.grid.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid.cards-4 .card { padding: 18px; }
.grid.cards-4 .card h3 { font-size: 15.5px; }
.grid.cards-4 .card p { font-size: 14px; }
@media (max-width: 900px) { .grid.cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.cards-4 { grid-template-columns: 1fr; } }
/* Screenshot carousel */
.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; overflow-y: hidden; transition: height .3s ease; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); align-items: flex-start; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel .slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; padding: 2px; box-sizing: border-box; }
.carousel .screenshot { box-shadow: none; }
.carousel figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 12px; }
.carousel-btn { position: absolute; top: 40%; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--edge); background: var(--surface); color: var(--fg); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.carousel-btn.prev { left: -22px; } .carousel-btn.next { right: -22px; }
.carousel-btn:disabled { opacity: 0; pointer-events: none; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: var(--edge); cursor: pointer; }
.carousel-dots button[aria-current] { background: var(--accent); width: 20px; }
@media (max-width: 1040px) { .carousel-btn.prev { left: 8px; } .carousel-btn.next { right: 8px; } }
.privacy-note { padding-top: 8px; }
.privacy-note p { margin: 0 auto; max-width: 720px; text-align: center; color: var(--muted); font-size: 15px; }
/* Optional email opt-ins (S18) */
.optin { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; text-align: left; }
.optin-email span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.optin-email input { width: 100%; max-width: 360px; height: 40px; padding: 0 12px; font: inherit; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--fg); }
.optin-email input[readonly] { color: var(--muted); }
.optin-box { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.optin-box input { width: 18px; height: 18px; accent-color: var(--accent); }
.optin-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.optin-status { font-size: 14px; color: var(--muted); }
.optin.saved .btn { display: none; }
/* S23: a plain link that expands, not a bar */
.optin-details { margin-top: 14px; font-size: 14px; color: var(--muted); background: none; border: 0; border-radius: 0; padding: 0; }
.optin-details summary { cursor: pointer; display: inline-block; list-style: none; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.optin-details summary::-webkit-details-marker { display: none; }
.optin-details summary:hover { text-decoration-color: currentColor; }
.optin-details[open] summary { color: var(--fg); text-decoration: none; }
.optin-details summary[data-pointer]:focus { outline: none; } /* S21: no ring after a click (WebKit counts summary clicks as focus-visible) */
.dl .optin-details { max-width: 420px; margin: 22px auto 0; }
.optin-wrap { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--edge); }
.optin-title { font-size: 17px; margin: 0; }
/* S29: five nav links fit on one line on phones */
@media (max-width: 420px) { .nav { gap: 12px; font-size: 14px; } }
