/* openIVR Cloud public site.
   Tokens mirror portal/src/styles.css (itself copied from the NVR's base.css)
   so the site, the portal and the product read as one thing. Light first,
   dark under prefers-color-scheme. No external fonts, no images. */
:root {
  --color-background: #fefefe;
  --color-background-soft: #f6f6f7;
  --color-background-mute: #f1f1f3;
  --color-border: #e4e4e7;
  --color-heading: #1c1c1f;
  --color-text: #3a3a40;
  --color-text-muted: #6b6b73;
  --color-primary: #12a783;
  --color-primary-dark: #0c8267;
  --color-on-primary: #053328;
  --color-primary-on-surface: #0e8468;
  --color-success: #16a34a;
  --color-warning: #b45309;
  --color-danger: #dc2626;
  --color-danger-on-surface: #d32424;
  --color-card: #ffffff;
  --brand-wash: rgba(14, 132, 104, 0.08);
  --brand-wash-hover: rgba(14, 132, 104, 0.14);
  --brand-edge: rgba(14, 132, 104, 0.35);
  --brand-ring: rgba(14, 132, 104, 0.45);
  --radius: 12px;
  --radius-sm: 8px;
  --measure: 66ch;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #0a0a0b;
    --color-background-soft: #151517;
    --color-background-mute: #222226;
    --color-border: rgba(255, 255, 255, 0.11);
    --color-heading: #ffffff;
    --color-text: #d4d4d8;
    --color-text-muted: #a1a1aa;
    --color-warning: #f59e0b;
    --color-card: #141416;
    --color-primary-on-surface: #34d0a8;
    --color-danger-on-surface: #f87171;
    --brand-wash: rgba(52, 208, 168, 0.1);
    --brand-wash-hover: rgba(52, 208, 168, 0.18);
    --brand-edge: rgba(52, 208, 168, 0.4);
    --brand-ring: rgba(52, 208, 168, 0.5);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--color-heading); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; }
p, ul, ol, table { margin: 0 0 1em; }
p, li { max-width: var(--measure); }
a { color: var(--color-primary-on-surface); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 3px; border-radius: 4px; }
code { font: 0.9em var(--mono); background: var(--color-background-mute); padding: 0.1em 0.35em; border-radius: 4px; color: var(--color-heading); }
pre { background: var(--color-background-mute); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 0.9rem 1rem; overflow-x: auto; font: 0.85rem/1.5 var(--mono); }
pre code { background: none; padding: 0; }
svg { max-width: 100%; height: auto; }
.muted { color: var(--color-text-muted); }
.small { font-size: 0.9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Skip link */
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--color-primary); color: var(--color-on-primary); padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.skip:focus { top: 1rem; }

/* Layout */
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3rem, 6vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--color-border); }
.section-head { max-width: var(--measure); margin-bottom: 2.5rem; }
.section-head p { font-size: 1.1rem; color: var(--color-text-muted); }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary-on-surface); margin-bottom: 0.75rem; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose li + li { margin-top: 0.35em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-background); border-bottom: 1px solid var(--color-border); }
.nav { position: relative; display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--color-heading); text-decoration: none; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand b { color: var(--color-primary-on-surface); font-weight: 700; }
.nav-links { display: flex; gap: 0.25rem; margin: 0 0 0 auto; padding: 0; list-style: none; align-items: center; }
.nav-links a { display: inline-block; padding: 0.45rem 0.7rem; border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; font-weight: 500; }
.nav-links a:hover { background: var(--color-background-soft); color: var(--color-heading); }
.nav-links a[aria-current="page"] { color: var(--color-primary-on-surface); font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--color-border); border-radius: var(--radius-sm); width: 44px; height: 44px; color: var(--color-heading); cursor: pointer; font: inherit; }
.nav-toggle svg { width: 22px; height: 22px; }
.lang { display: inline-flex; border: 1px solid var(--color-border); border-radius: 999px; overflow: hidden; margin-left: 0.5rem; }
.lang a { padding: 0.3rem 0.7rem; font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted); text-decoration: none; border-radius: 0; }
.lang a[aria-current="true"] { background: var(--brand-wash); color: var(--color-primary-on-surface); }
@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--color-background); border-bottom: 1px solid var(--color-border); padding: 0.75rem 1.25rem 1rem; gap: 0.15rem; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0.6rem; }
  .nav-links .lang { margin: 0.5rem 0 0; align-self: flex-start; }
  .nav-links .btn { margin: 0.5rem 0 0; text-align: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.25rem; border-radius: var(--radius-sm); text-decoration: none; border: 1px solid var(--color-border); background: var(--color-card); color: var(--color-heading); cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2; transition: background 0.15s, border-color 0.15s; }
.btn:hover { background: var(--color-background-soft); border-color: var(--brand-edge); }
.btn.primary { background: var(--color-primary); border-color: var(--color-primary-dark); color: var(--color-on-primary); }
.btn.primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn.ghost { background: var(--brand-wash); border-color: transparent; color: var(--color-primary-on-surface); }
.btn.ghost:hover { background: var(--brand-wash-hover); }
.btn.large { padding: 0.9rem 1.6rem; font-size: 1.05rem; }
.nav-links .btn { padding: 0.45rem 0.9rem; margin-left: 0.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }

/* Hero */
.hero { padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero .lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--color-text-muted); max-width: 34rem; }
.hero .fine { margin-top: 1.25rem; font-size: 0.9rem; color: var(--color-text-muted); }
@media (max-width: 880px) { .hero .grid { grid-template-columns: 1fr; } }

/* Diagram (inline SVG, styled with the same tokens) */
.diagram { width: 100%; display: block; }
.diagram text { font-family: var(--font); fill: var(--color-text); }
.diagram .t-head { fill: var(--color-heading); font-weight: 700; }
.diagram .t-muted { fill: var(--color-text-muted); }
.diagram .t-accent { fill: var(--color-primary-on-surface); font-weight: 700; }
.diagram .box { fill: var(--color-card); stroke: var(--color-border); stroke-width: 1.5; }
.diagram .box-accent { fill: var(--brand-wash); stroke: var(--brand-edge); stroke-width: 1.5; }
.diagram .line { stroke: var(--color-text-muted); stroke-width: 2; fill: none; }
.diagram .line-accent { stroke: var(--color-primary-on-surface); stroke-width: 2.5; fill: none; }
.diagram .dash { stroke-dasharray: 6 5; }
.diagram .callout { fill: var(--color-background); stroke: var(--color-primary-on-surface); stroke-width: 1.5; }
.diagram .lan { fill: var(--color-background-soft); stroke: var(--color-border); stroke-dasharray: 6 5; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li { position: relative; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 999px; background: var(--brand-wash); color: var(--color-primary-on-surface); font-weight: 700; margin-bottom: 1rem; }
.steps h3 { font-size: 1.1rem; }
.steps p { margin: 0; color: var(--color-text-muted); font-size: 0.97rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* Two columns (local vs transit) */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.split > div { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; }
.split h3 { display: flex; align-items: center; gap: 0.6rem; }
.split .dot { width: 0.7rem; height: 0.7rem; border-radius: 999px; background: var(--color-primary); flex: none; }
.split .dot.neutral { background: var(--color-text-muted); }
.split ul { padding-left: 1.2rem; margin: 0; }
.split li { margin-top: 0.4em; }
.split .never { margin-top: 1.25rem; padding: 0.8rem 1rem; border-radius: var(--radius-sm); background: var(--brand-wash); color: var(--color-primary-on-surface); font-weight: 600; font-size: 0.95rem; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 0; margin: 0; list-style: none; }
.features li { padding: 1.25rem 0 0; border-top: 2px solid var(--color-border); }
.features h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.features p { margin: 0; color: var(--color-text-muted); font-size: 0.97rem; }
@media (max-width: 880px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Pricing */
.toggle { display: inline-flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; flex-wrap: wrap; }
.toggle .seg { display: inline-flex; border: 1px solid var(--color-border); border-radius: 999px; padding: 3px; background: var(--color-background-soft); }
.toggle button { border: 0; background: none; border-radius: 999px; padding: 0.4rem 1rem; font: inherit; font-weight: 600; color: var(--color-text-muted); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--color-card); color: var(--color-heading); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.toggle .save { font-size: 0.85rem; color: var(--color-primary-on-surface); font-weight: 600; }
.pricing-status { font-size: 0.85rem; color: var(--color-text-muted); margin: 0 0 2rem; min-height: 1.4em; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 0; margin: 0 0 1rem; list-style: none; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.75rem 1.5rem; }
.plan.featured { border-color: var(--brand-edge); box-shadow: 0 0 0 3px var(--brand-wash); }
.plan .tag { align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-primary-on-surface); background: var(--brand-wash); padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 0.75rem; }
.plan h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.plan .desc { color: var(--color-text-muted); font-size: 0.95rem; min-height: 3em; margin-bottom: 1rem; }
.plan .price { display: flex; align-items: baseline; gap: 0.35rem; margin-bottom: 0.25rem; }
.plan .amount { font-size: 2.4rem; font-weight: 700; color: var(--color-heading); letter-spacing: -0.03em; line-height: 1; }
.plan .per { color: var(--color-text-muted); font-size: 0.95rem; }
.plan .billed { font-size: 0.85rem; color: var(--color-text-muted); min-height: 1.4em; margin-bottom: 1.25rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.plan li { position: relative; padding-left: 1.6rem; font-size: 0.95rem; margin-top: 0.5em; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 0.9rem; height: 0.5rem; border-left: 2.5px solid var(--color-primary-on-surface); border-bottom: 2.5px solid var(--color-primary-on-surface); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }
.plan .note { font-size: 0.85rem; color: var(--color-text-muted); margin: 0.75rem 0 0; }
@media (max-width: 880px) { .plans { grid-template-columns: 1fr; max-width: 30rem; } }
.teaser { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 0; margin: 0 0 1.5rem; list-style: none; }
.teaser li { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.teaser .name { font-weight: 700; color: var(--color-heading); }
.teaser .amount { font-size: 1.6rem; font-weight: 700; color: var(--color-heading); letter-spacing: -0.02em; }
.teaser p { margin: 0.25rem 0 0; color: var(--color-text-muted); font-size: 0.95rem; }
@media (max-width: 800px) { .teaser { grid-template-columns: 1fr; } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
thead th { background: var(--color-background-soft); color: var(--color-heading); font-size: 0.85rem; letter-spacing: 0.02em; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.yes { color: var(--color-primary-on-surface); font-weight: 700; }
td.no { color: var(--color-text-muted); }
tbody th[scope="row"] { font-weight: 500; color: var(--color-text); }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; }

/* Extras (store, support) */
.extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.extras > div { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; }
.extras .amount { font-weight: 700; color: var(--color-heading); }
.extras p:last-child { margin-bottom: 0; }
@media (max-width: 800px) { .extras { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: var(--measure); }
.faq details { border-top: 1px solid var(--color-border); padding: 0.25rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--color-border); }
.faq summary { cursor: pointer; padding: 0.9rem 0; font-weight: 600; color: var(--color-heading); list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--color-primary-on-surface); flex: none; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 1rem; }

/* CTA band */
.cta-band { background: var(--color-background-soft); border-top: 1px solid var(--color-border); padding: clamp(3rem, 6vw, 5rem) 0; text-align: center; }
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { margin-inline: auto; color: var(--color-text-muted); }
.cta-band .actions { justify-content: center; }

/* Status */
.status-card { display: flex; align-items: center; gap: 1rem; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; max-width: 34rem; margin-bottom: 1.5rem; }
.status-card .light { width: 1rem; height: 1rem; border-radius: 999px; background: var(--color-text-muted); flex: none; }
.status-card[data-state="up"] .light { background: var(--color-success); box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.2); }
.status-card[data-state="down"] .light { background: var(--color-danger); box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.2); }
.status-card[data-state="checking"] .light { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.status-card .title { font-weight: 700; color: var(--color-heading); }
.status-card .detail { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }

/* Legal */
.legal-meta { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 1.5rem; }
.placeholder { background: rgba(217, 119, 6, 0.15); color: var(--color-warning); padding: 0 0.3em; border-radius: 4px; font-weight: 600; }
.draft { border: 1px solid rgba(217, 119, 6, 0.5); background: rgba(217, 119, 6, 0.08); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 0.95rem; max-width: var(--measure); margin-bottom: 2rem; }
.draft p { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding: 3rem 0 2.5rem; font-size: 0.9rem; color: var(--color-text-muted); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-heading); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-top: 0.4em; }
.site-footer a { color: var(--color-text); text-decoration: none; }
.site-footer a:hover { color: var(--color-primary-on-surface); text-decoration: underline; }
.site-footer .bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--color-border); padding-top: 1.5rem; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* 404 */
.notfound { text-align: center; padding: clamp(4rem, 12vw, 9rem) 0; }
.notfound .code { font-size: 5rem; font-weight: 700; color: var(--color-border); letter-spacing: -0.05em; line-height: 1; }
.notfound p { margin-inline: auto; }
