/*
 * klerka.com (site-live), light only. Values copied from the house theme, not linked, so the site stands alone:
 *   ui/src/theme/klerka-colours.css  light neutrals and status colours; Teal Bold #0E7490 (the site's colour)
 *   ui/src/theme/klerka-theme.css    --radius 0.625rem (Classic), card/control radii as its fractions
 *   ui/src/theme/klerka-fonts.css    Inter, self-hosted from ui/src/assets/fonts (OFL), Latin, one variable file
 *   ui/src/theme/klerka-appearance.css  the grey area #F7F8FA and its faint edge (--kt-grey-edge)
 * Design bible (docs/LOOK.md, PAGE-STANDARD A19): level 1 the white page; level 3 grey only for a band that holds cards; level 4 cards
 * white with a light outline. No grey box with a grey outline, never a light colour on a light colour, no pill buttons.
 */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --background: 0 0% 100%;            /* level 1: the white page */
  --foreground: 215 27.9% 16.9%;      /* #1F2937 */
  --card: 0 0% 100%;                  /* #FFFFFF */
  --muted-foreground: 216.5 11.2% 40.2%; /* #5B6472, 6.0:1 on white, 5.7:1 on #F7F8FA */
  --border: 217.5 16.7% 90.6%;        /* #E3E6EB, the light outline */
  --input: 216.5 10.9% 58.6%;         /* #8A93A1, field outline */
  --primary-solid: 192.92 82.28% 30.98%; /* #0E7490 Teal Bold, white text 5.35:1 */
  --primary-solid-hover: 192.92 82.28% 25%;
  --primary-solid-foreground: 0 0% 100%;
  --link: 192.92 82.28% 30.98%;
  --ring: 192.92 82.28% 30.98%;
  --success: 153.6 64.6% 25.5%;       /* #176B46 */
  --destructive: 0 73.7% 41.8%;       /* #B91C1C */
  --warning: 26 90.5% 37.1%;          /* #B45309 */
  --warning-tint: 48 100% 96.1%;      /* #FFFBEB */
  --kt-grey-card: 220 23.1% 97.45%;   /* #F7F8FA, the only grey: level 3 areas */
  --kt-grey-edge: color-mix(in srgb, hsl(var(--kt-grey-card)) 95%, hsl(var(--foreground)));
  --radius: 0.625rem;
  --kt-r-card: calc((var(--radius) + 4px) * .75);
  --kt-r-control: calc(var(--radius) * .75);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground));
  font-family: var(--font); font-size: 1rem; line-height: 1.6; overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: hsl(var(--link)); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p, ul, ol, blockquote, .table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: 0.375rem; }
hr { border: 0; border-top: 1px solid hsl(var(--border)); margin: 2.5rem 0; }
code { font-size: 0.9em; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 640px) { :root { --gutter: 24px; } }

/* Skip link: off screen until focused. */
.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 50; padding: 0.5rem 0.875rem;
  background: hsl(var(--card)); color: hsl(var(--link)); border: 1px solid hsl(var(--border)); border-radius: var(--kt-r-control);
}
.skip-link:focus { top: 0.5rem; }

/* Header: white, light bottom line. */
.site-header { position: sticky; top: 0; z-index: 40; background: hsl(var(--card)); border-bottom: 1px solid hsl(var(--border)); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.wordmark {
  display: inline-flex; align-items: baseline; min-height: 2.75rem; align-items: center; color: hsl(var(--foreground));
  font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; text-transform: lowercase;
}
.wordmark-dot { display: inline-block; width: 0.4rem; height: 0.4rem; margin: 0.55rem 0 0 0.15rem; align-self: center; border-radius: 50%; background: hsl(var(--primary-solid)); }
.header-nav { display: flex; gap: 0.25rem; }
.header-nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem; border-radius: var(--kt-r-control);
  color: hsl(var(--foreground)); font-weight: 500; text-decoration: none;
}
.header-nav a:hover { color: hsl(var(--link)); text-decoration: underline; }
.header-nav a[aria-current="page"] { color: hsl(var(--link)); font-weight: 600; }

/* Bands (Home, Pricing). White by default; a band that holds cards is the grey area with a faint edge only. */
.band { padding: 3rem 0; }
.band + .band:not(.band--area) { border-top: 1px solid hsl(var(--border)); }
.band--area + .band { border-top: 0; }
.band--hero { padding: 3.5rem 0 3rem; }
.band--hero .wrap > * { max-width: 46rem; }
.band--hero h1 { margin-bottom: 1rem; }
.band--hero p { font-size: 1.125rem; }
.band--hero p:first-of-type { font-size: 1.25rem; }
.band--area { background: hsl(var(--kt-grey-card)); border-top: 1px solid var(--kt-grey-edge); border-bottom: 1px solid var(--kt-grey-edge); }
.band h2 { margin-bottom: 1rem; }
.band .wrap > :is(p, ul, ol) { max-width: 46rem; }
.band .wrap > p:last-child, .band .wrap > ul:last-child { margin-bottom: 0; }
@media (min-width: 768px) { .band { padding: 4rem 0; } .band--hero { padding: 5rem 0 4rem; } }

/* Cards: always white with a light outline (level 4). */
.card { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--kt-r-card); padding: 1.5rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card h3 { margin-bottom: 0.5rem; }
.card > :last-child { margin-bottom: 0; }
.cards--plans .card { display: flex; flex-direction: column; }
.cards--plans .card h3 { font-size: 1.25rem; }
.cards--plans .card > p:last-child { margin-top: auto; padding-top: 1rem; border-top: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); }
.cards--plans .card ul { margin-bottom: 1rem; }
.card--featured { border: 2px solid hsl(var(--primary-solid)); padding: calc(1.5rem - 1px); }
.cards--steps h3 { color: hsl(var(--primary-solid)); }

/* Buttons: solid, the radius, never a pill. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.25rem;
  border: 0; border-radius: var(--kt-r-control); background: hsl(var(--primary-solid)); color: hsl(var(--primary-solid-foreground));
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: hsl(var(--primary-solid-hover)); text-decoration: none; }
.btn:focus-visible { outline-offset: 3px; }

/* The waiting list: a lone white card with a light outline. */
.waitlist { max-width: 40rem; margin-top: 1.5rem; }
.waitlist label { display: block; font-weight: 600; margin-bottom: 0.375rem; }
.waitlist-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.waitlist input[type="email"] {
  flex: 1 1 16rem; min-width: 0; min-height: 2.75rem; padding: 0 0.875rem; font: inherit; color: hsl(var(--foreground));
  background: hsl(var(--card)); border: 1px solid hsl(var(--input)); border-radius: var(--kt-r-control);
}
.waitlist input[type="email"]::placeholder { color: hsl(var(--muted-foreground)); opacity: 1; }
.waitlist input[type="email"]:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 1px; border-color: hsl(var(--ring)); }
.waitlist .btn { flex: 0 0 auto; }
@media (max-width: 479.98px) { .waitlist .btn { flex: 1 1 100%; } }
.waitlist-note { margin: 0.75rem 0 0; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.waitlist-status:empty { display: none; }
.waitlist-status, .waitlist-result { margin: 0.75rem 0 0; padding: 0.625rem 0.875rem; border-radius: var(--kt-r-control); background: hsl(var(--card)); font-weight: 600; }
.waitlist-result { display: none; }
.waitlist-result:target { display: block; }
.is-ok { color: hsl(var(--success)); border: 1px solid hsl(var(--success)); }
.is-bad { color: hsl(var(--destructive)); border: 1px solid hsl(var(--destructive)); }
/* The honeypot: off screen, never shown to people. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Long pages: one readable column about 70ch wide. */
.prose { max-width: 70ch; padding: 2.5rem 0 3.5rem; }
.prose h1 { margin-bottom: 0.75rem; font-size: clamp(2rem, 5vw, 2.5rem); }
.prose h2 { margin: 2.5rem 0 0.75rem; font-size: 1.375rem; }
.prose h3 { margin: 1.75rem 0 0.5rem; }
.prose h1 + p { color: hsl(var(--muted-foreground)); }
.prose .anchor { margin-left: 0.25rem; color: hsl(var(--muted-foreground)); text-decoration: none; opacity: 0; }
.prose :is(h2, h3):hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose ul + p, .prose p + ul { margin-top: 0; }
.not-found { padding: 4rem 0 5rem; }
.not-found h1 { margin-bottom: 1.5rem; }

/* "In plain English": a lone white card, light outline, a teal edge (a coloured outline is fine). */
.summary { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-left: 4px solid hsl(var(--primary-solid)); border-radius: var(--kt-r-card); padding: 1.25rem 1.25rem 0.25rem; margin: 1.5rem 0; }
.summary p:first-child { margin-bottom: 0.5rem; }

/* On this page. */
.toc { margin: 1.5rem 0 0.5rem; padding: 1.25rem 1.25rem 0.5rem; border: 1px solid hsl(var(--border)); border-radius: var(--kt-r-card); background: hsl(var(--card)); }
.prose .toc h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.toc ol { list-style: none; padding: 0; columns: 2 16rem; column-gap: 2rem; }
.toc li { margin: 0 0 0.375rem; break-inside: avoid; }

/* Tables: white, outlined; on a phone each row becomes a small outlined block with its column names. */
.table table { width: 100%; border-collapse: collapse; border: 1px solid hsl(var(--border)); font-size: 0.9375rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.625rem 0.75rem; border-bottom: 1px solid hsl(var(--border)); }
.table thead th { border-bottom: 2px solid hsl(var(--input)); }
@media (max-width: 639.98px) {
  .table table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table table { border: 0; }
  .table thead { position: absolute; left: -10000px; }
  .table tr { border: 1px solid hsl(var(--border)); border-radius: var(--kt-r-card); margin-bottom: 0.75rem; }
  .table td { border-bottom: 0; padding: 0.5rem 0.875rem; }
  .table td::before { content: attr(data-label); display: block; font-size: 0.8125rem; font-weight: 600; color: hsl(var(--muted-foreground)); }
}

/* The model withdrawal form's blank for the plan name. */
.form-blank { display: inline-block; width: 12em; max-width: 60%; border-bottom: 1px solid hsl(var(--foreground)); vertical-align: baseline; height: 1em; }

/* Preview builds only: a null fact, and the build date standing in for the publish date. Dark text on pale yellow (9.6:1). */
.fact-missing { background: #FEF08A; color: #713F12; padding: 0 0.25rem; border-radius: 2px; outline: 1px dashed #A16207; }
.fact-preview { outline: 1px dashed #A16207; outline-offset: 1px; }

/* Footer: white with a light top line. */
.site-footer { border-top: 1px solid hsl(var(--border)); background: hsl(var(--card)); padding: 2rem 0 2.5rem; font-size: 0.9375rem; color: hsl(var(--muted-foreground)); }
.site-footer p { margin: 0 0 0.75rem; max-width: 70ch; }
.site-footer p:last-child { margin: 0; }
.footer-links p { color: hsl(var(--muted-foreground)); line-height: 2.25; max-width: none; }
.footer-links a { display: inline-block; padding: 0.125rem 0; color: hsl(var(--foreground)); }
.footer-links a:hover { color: hsl(var(--link)); }
