/* SentryVine website. Colours follow the app (ui/web/app.css); each is light-dark(light, dark). */
:root {
  color-scheme: light dark;
  --bg: light-dark(#F4F6F3, #141816);
  --bg-2: light-dark(#ECEFEA, #1A1F1C);
  --card: light-dark(#FFFFFF, #212724);
  --surface-2: light-dark(#F1F3F0, #2A302D);
  --text: light-dark(#1B1F1D, #E9EDEA);
  --muted: light-dark(#56605A, #A9B3AD);
  --line: light-dark(#E0E5DF, #313935);
  --line-strong: light-dark(#C5CDC7, #4A544F);
  --accent: light-dark(#1F6F4A, #6FCF9B);
  --accent-hover: light-dark(#185C3D, #8ADBAE);
  --accent-text: light-dark(#FFFFFF, #0F2A1C);
  --tile: light-dark(#1F6F4A, #1D4D36);
  --tile-ink: light-dark(#DFF0E6, #CBEBD8);
  --leaf: light-dark(#DFF0E6, #1D3A2A);
  --leaf-ink: light-dark(#145233, #A6E3C0);
  --link: light-dark(#1F6F4A, #8ADBAE);
  --focus: light-dark(#1F6F4A, #8ADBAE);
  --warn-bg: light-dark(#FCEFD2, #3A2F17); --warn-fg: light-dark(#7A4D00, #F4D9A0);
  --bad-bg: light-dark(#FBE3E0, #43201D); --bad-fg: light-dark(#9C2019, #F6B8B1); --bad-line: light-dark(#E8B9B4, #6A3530);
  --watch-bg: light-dark(#E1EAFA, #1E2E4A); --watch-fg: light-dark(#1D4A91, #B3CBF5);
  --shadow: 0 1px 2px light-dark(rgba(20, 30, 25, .06), rgba(0, 0, 0, .2));
  --shadow-lg: 0 24px 60px -12px light-dark(rgba(12, 40, 26, .35), rgba(0, 0, 0, .6));

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2 { font-family: var(--display); }
h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.04; font-weight: 700; letter-spacing: -.028em; }
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; font-weight: 650; letter-spacing: -.018em; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 8px 14px; background: var(--card); border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }
main { flex: 1; }
main:focus { outline: none; }

/* ---- header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; }
.top nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.top nav a:hover { background: var(--surface-2); }
.top nav a[aria-current="page"] { color: var(--link); font-weight: 600; }
.top nav .button { margin-left: 8px; }
@media (max-width: 720px) {
  .top { position: static; }
  .top .wrap { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .top nav { margin-left: 0; width: 100%; flex-wrap: nowrap; gap: 0; }
  .top nav a { padding: 8px 6px; white-space: nowrap; font-size: 15px; }
  .top nav .button { padding: 0 10px; }
  .top nav .button { margin-left: auto; }
}

/* ---- buttons */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.button:hover, button:hover { background: var(--surface-2); }
.button.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.primary:hover, button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.big { min-height: 52px; padding: 0 26px; font-size: 17px; border-radius: 12px; }
.button.small, button.small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
button.danger { color: var(--bad-fg); border-color: var(--bad-line); }
button.danger:hover { background: var(--bad-bg); }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
button:disabled, .button[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 12ch; }
.hero .lede { margin-top: 24px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; }
.hero .actions { margin-top: 32px; }
.hero .fine { margin-top: 16px; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero h1 { max-width: 16ch; } }

/* The hero's one bold thing: the question SentryVine asks, on the brand tile. */
.stage { position: relative; border-radius: 28px; background: var(--tile); padding: clamp(28px, 4vw, 48px) clamp(18px, 3vw, 40px); overflow: hidden; isolation: isolate; }
.stage::before {
  content: ""; position: absolute; inset: -10% -25% auto auto; width: 120%; aspect-ratio: 1; z-index: -1; opacity: .16;
  background: url("/vine-line.svg") no-repeat center / contain;
}
.pw { background: var(--card); color: var(--text); border-radius: 14px; box-shadow: var(--shadow-lg); max-width: 460px; margin: 0 auto; overflow: hidden; border: 1px solid light-dark(transparent, #3A4440); }
.pw-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.pw-bar img { width: 16px; height: 16px; }
.pw-bar span:last-child { margin-left: auto; }
.pw-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.pw-head { display: flex; gap: 14px; align-items: flex-start; }
.pw-head h3 { font-size: 19px; line-height: 1.25; }
.ltile { flex: none; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--watch-bg); color: var(--watch-fg); }
.pw-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pw-warn { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-fg); }
.pw-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pw-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.pw-result { font-weight: 600; color: var(--leaf-ink); min-height: 1.5em; }
.stage figcaption { color: var(--tile-ink); font-size: 14px; text-align: center; margin-top: 18px; max-width: 40em; margin-inline: auto; }

/* ---- sections */
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.section.tint { background: var(--bg-2); }
.section-head { max-width: 40em; margin-bottom: 40px; display: flex; flex-direction: column; gap: 12px; }
.section-head p { color: var(--muted); font-size: 18px; }

.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 32px; }
.apps h3 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.apps ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.apps li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.apps .ltile { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; background: var(--leaf); color: var(--leaf-ink); }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; position: relative; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 10px; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 700; font-family: var(--display); font-size: 19px;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 56px; right: -20px; height: 2px; background: var(--line-strong); }
.steps p { color: var(--muted); }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { padding: 0 0 0 64px; min-height: 44px; }
  .steps li:not(:last-child)::after { top: 52px; bottom: -22px; left: 21px; right: auto; width: 2px; height: auto; }
}

.honest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.honest > div { display: flex; flex-direction: column; gap: 10px; }
.honest ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .honest { grid-template-columns: 1fr; } }

/* ---- plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.plan.best { border: 2px solid var(--accent); }
.plan-tag { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--leaf); color: var(--leaf-ink); }
.price { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.price small { font-family: var(--font); font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan li.no::before { border: 0; height: 2px; width: 12px; top: .7em; background: var(--muted); transform: none; }
.plan form, .plan .button { width: 100%; }
.plan form button { width: 100%; }
.note { margin-top: 24px; color: var(--muted); max-width: 46em; }

.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .packs { grid-template-columns: 1fr; } }
.pack { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.pack .price { font-size: 34px; }
.pack .credits { font-weight: 600; }
.pack form { margin-top: 10px; }
.pack button { width: 100%; }

table.compare { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.compare th, .compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--surface-2); font-size: 15px; }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
.compare tbody th { font-weight: 500; }
.scroll-x { overflow-x: auto; }

/* ---- FAQ */
.faq { display: flex; flex-direction: column; max-width: 46em; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-weight: 600; font-size: 17px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 24px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 40em; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---- footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }
.foot a { color: var(--muted); }

/* ---- plain pages, forms, account */
.page { padding: clamp(36px, 6vw, 64px) 0 80px; }
.page .wrap > h1 { font-size: clamp(32px, 4.5vw, 48px); }
.page .lede { margin-top: 12px; color: var(--muted); font-size: 18px; max-width: 40em; }
.prose { max-width: 42em; display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.prose h2 { font-size: 22px; margin-top: 12px; }
.narrow { max-width: 440px; margin: 0 auto; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; min-height: 46px; padding: 8px 12px; width: 100%;
}
textarea { min-height: 120px; font-family: var(--mono); font-size: 14px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input.code { font-family: var(--mono); font-size: 26px; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 15px; }
.alert.error { background: var(--bad-bg); color: var(--bad-fg); }
.alert.ok { background: var(--leaf); color: var(--leaf-ink); }
.alert.info { background: var(--watch-bg); color: var(--watch-fg); }
.alert.warn { background: var(--warn-bg); color: var(--warn-fg); }
.form-foot { font-size: 15px; color: var(--muted); text-align: center; margin-top: 18px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.card h2 { font-size: 20px; letter-spacing: -.01em; }
.big-number { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.pro, .badge.ok { background: var(--leaf); color: var(--leaf-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge.bad { background: var(--bad-bg); color: var(--bad-fg); }
.list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.inline { display: inline; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data th, .data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data th { font-weight: 600; color: var(--muted); font-size: 13.5px; }
.data td.num, .data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); padding: 8px 0; }

/* ---- link page */
.linkcode { display: flex; flex-direction: column; gap: 18px; }

/* ---- admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 20px 0 8px; border-bottom: 1px solid var(--line); }
.admin-nav a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 14px; color: var(--muted); }
.qr { width: 220px; height: 220px; background: #fff; padding: 10px; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { font-family: var(--mono); font-size: 16px; letter-spacing: .08em; overflow-wrap: anywhere; background: var(--surface-2); padding: 8px 12px; border-radius: 8px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--link); }
.spacer { height: 36px; }
.page .compare { margin-top: 36px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.row.grow input { flex: 1; }
