/* TenderDose website. Every colour, space, font size, radius and shadow is the APP's own token, generated into
   tokens.css from renderer/styles/theme.css by build.mjs (plan P4) - so the site looks like the app, and changes
   with it. Light and dark follow the visitor's system (plan P5). Only the site's own layout sizes live here. */
:root {
  --wrap: 1140px;          /* the site is wider than the app's --content-max */
  --hero-shadow: 0 30px 70px -30px rgba(20, 26, 40, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--font-md)/1.6 var(--font-family); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
code { font: 0.9em Consolas, "Cascadia Mono", ui-monospace, monospace; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
strong { font-weight: 650; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 650; }
h3 { font-size: var(--font-lg); font-weight: 650; }
h1 strong, h2 strong { color: var(--primary); font-weight: inherit; }
p { margin: 0 0 1em; }
.muted { color: var(--text-muted); }
.download-version { margin-top: var(--space-3); }

/* the Download page's two choices and the chart between them (owner, 2026-11-16) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-4); }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: var(--border-thin) solid var(--border); box-shadow: var(--shadow-sm); }
.choice h2 { margin: 0; font-size: var(--font-xl); }
.choice p { margin: 0; color: var(--text-muted); }
.choice .btn { margin-top: auto; }
.choice-file { font-size: var(--font-sm); overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.compare-wrap { border-radius: var(--radius-lg); border: var(--border-thin) solid var(--border); background: var(--bg); overflow: hidden; }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-4); border-bottom: var(--border-thin) solid var(--border); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { background: var(--surface-2); font-size: var(--font-md); }
.compare tbody th { font-weight: 600; width: 28%; }
.compare td { color: var(--text-muted); width: 36%; }
.compare-note { margin-top: var(--space-4); }
/* At phone width the three columns become one card per question: the row's question, then each answer named. */
@media (max-width: 640px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare tr { display: block; padding: var(--space-3) var(--space-4); border-bottom: var(--border-thin) solid var(--border); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare th, .compare td, .compare tbody th { display: block; width: auto; padding: var(--space-1) 0; border: 0; }
  .compare td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text); }
}
.wrap { width: min(100% - 2 * var(--space-4), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-4); top: var(--space-4); z-index: 99; background: var(--surface); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
:focus-visible { outline: var(--border-w) solid var(--primary); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ---------- buttons (the app's .btn) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: var(--target-min); padding: 0 1.4em; border-radius: var(--radius-md); border: var(--border-thin) solid transparent;
  font: 600 var(--font-md)/1.2 var(--font-family); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: var(--target-small); padding: 0 1em; font-size: var(--font-sm); }
.btn.is-disabled { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); box-shadow: none; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: var(--border-thin) solid var(--border); box-shadow: var(--shadow-sm); }
.header-row { display: flex; align-items: center; gap: var(--space-5); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand-name { font-weight: 700; font-size: var(--font-lg); white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-1); }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-weight: 500; }
.site-nav a:not(.btn):hover { background: var(--surface-2); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--alert-info-bg); color: var(--alert-info); }
.site-nav .btn { margin-left: var(--space-2); }
.nav-toggle { display: none; margin-left: auto; width: var(--target-min); height: var(--target-min); border: var(--border-thin) solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; margin: auto; background: var(--text); border-radius: 2px; position: relative; transition: transform .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: var(--space-3) var(--space-4) var(--space-4); background: var(--surface); border-bottom: var(--border-thin) solid var(--border); box-shadow: var(--shadow-md); }
  .nav-open .site-nav { display: flex; }
  .site-nav a:not(.btn) { padding: var(--space-3); }
  .site-nav .btn { margin: var(--space-2) 0 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); overflow: hidden; isolation: isolate;
  background: radial-gradient(60% 80% at 90% 10%, var(--alert-info-bg), transparent 70%), radial-gradient(50% 60% at 0% 100%, var(--alert-green-bg), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
.hero .lead { font-size: var(--font-lg); color: var(--text-muted); max-width: 32em; }
.hero-actions { margin: var(--space-5) 0 var(--space-4); }
.hero-meta { color: var(--text-muted); font-size: var(--font-sm); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- screenshots + placeholders ---------- */
.shot { width: 100%; border-radius: var(--radius-lg); background: var(--surface); border: var(--border-thin) solid var(--border); box-shadow: var(--hero-shadow); }
.placeholder { display: grid; place-items: center; text-align: center; padding: var(--space-4); color: var(--text-muted); font-size: var(--font-sm); line-height: 1.5;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface) 12px 24px);
  outline: var(--border-w) dashed var(--border); outline-offset: -10px; }
/* the dark picture is shown only when the visitor's system is dark */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) { .only-dark { display: block; } .only-light { display: none; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-alt { background: var(--surface); border-block: var(--border-thin) solid var(--border); }
.section-tight { padding-block: 0 clamp(40px, 6vw, 64px); }
.section-head { max-width: 760px; margin-bottom: var(--space-6); }
.eyebrow { font-size: var(--font-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: .6em; }
.lead { font-size: var(--font-lg); color: var(--text-muted); }

/* ---------- tones: the app's alert families ---------- */
.tone-info   { --tone: var(--alert-info);   --tone-bg: var(--alert-info-bg); }
.tone-green  { --tone: var(--alert-green);  --tone-bg: var(--alert-green-bg); }
.tone-yellow { --tone: var(--alert-yellow); --tone-bg: var(--alert-yellow-bg); }
.tone-red    { --tone: var(--alert-red);    --tone-bg: var(--alert-red-bg); }
.tone-todo   { --tone: var(--todo);         --tone-bg: var(--todo-bg); }

/* feature cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--card-min)), 1fr)); gap: var(--space-4); }
.card { position: relative; padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: var(--border-thin) solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.section-alt .card { background: var(--bg); }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tone); }
.card-icon { display: grid; place-items: center; width: var(--target-min); height: var(--target-min); margin-bottom: var(--space-4); border-radius: var(--radius-md); font-size: var(--font-xl); background: var(--tone-bg); }
.card p { color: var(--text-muted); margin: 0; }

/* numbered steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-4); }
.step { padding: var(--space-5); border-radius: var(--radius-lg); background: var(--bg); border: var(--border-thin) solid var(--border); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--space-3); border-radius: var(--radius-full); font-weight: 700; color: var(--on-primary); background: var(--primary); }
.step p { color: var(--text-muted); margin: 0; }

/* alternating screenshot + text */
.showcase { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.showcase + .showcase { margin-top: clamp(48px, 7vw, 88px); }
.showcase.flip .showcase-media { order: 2; }
.showcase-text p { color: var(--text-muted); }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } .showcase.flip .showcase-media { order: 0; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding: var(--space-1) 0 var(--space-1) 32px; color: var(--text-muted); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 7px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-full); font-size: var(--font-xs); font-weight: 700; color: var(--on-success); background: var(--success); }

/* ---------- not shipped yet ---------- */
.coming { border: var(--border-w) dashed var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.faq .coming { padding: 0; border: 0; }
.coming-inline { display: inline-flex; }
.coming-action { margin: var(--space-5) 0 0; }

/* ---------- call to action ---------- */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); padding: clamp(24px, 5vw, 44px); border-radius: var(--radius-lg);
  background: var(--alert-info-bg); border: var(--border-thin) solid var(--border); }
.cta h2 { margin-bottom: .25em; }
.cta p { color: var(--text-muted); margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(40px, 6vw, 72px) 0 var(--space-2); background: radial-gradient(60% 120% at 80% 0%, var(--alert-info-bg), transparent 70%); }
.page-head .lead { max-width: 44em; }

.callout { margin-top: var(--space-5); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--tone-bg); border-left: 4px solid var(--tone); }
.callout p { margin: 0; color: var(--text); }

/* FAQ */
.faq { max-width: 860px; display: grid; gap: var(--space-3); }
.faq details { border-radius: var(--radius-md); background: var(--surface); border: var(--border-thin) solid var(--border); }
.faq details[open] { border-color: var(--primary); }
.faq summary { cursor: pointer; list-style: none; padding: var(--space-4) 56px var(--space-4) var(--space-5); font-weight: 600; position: relative; min-height: var(--target-min); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: var(--space-4); top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--surface-2); color: var(--primary); font-size: var(--font-lg); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq-a { padding: 0 var(--space-5) var(--space-4); color: var(--text-muted); }
.faq-a p { margin: 0; }

/* support */
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-5); margin-bottom: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: var(--border-thin) solid var(--border); }
.contact-card h2 { font-size: var(--font-xl); margin-bottom: .2em; }
.contact-card p { margin: 0; }
.contact-card .btn { white-space: normal; overflow-wrap: anywhere; }

/* long text */
.prose { max-width: 760px; }
.prose h2 { font-size: var(--font-xl); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-muted); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--primary); }
.changelog h2 { padding-top: 1em; border-top: var(--border-thin) solid var(--border); font-size: var(--font-lg); }
.changelog h2:first-child { border-top: 0; padding-top: 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 72px); background: var(--surface); border-top: var(--border-thin) solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-6); padding-block: var(--space-7) var(--space-6); }
.footer-brand p { color: var(--text-muted); margin: var(--space-3) 0 var(--space-1); max-width: 30em; }
.footer-brand .muted { font-size: var(--font-sm); }
.footer-col h2 { font-size: var(--font-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-3); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a { color: var(--text); text-decoration: none; display: inline-block; padding-block: var(--space-1); }
.footer-col a:hover { color: var(--primary); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); padding-block: var(--space-4) var(--space-5); border-top: var(--border-thin) solid var(--border); color: var(--text-muted); font-size: var(--font-sm); }
.footer-base p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
