/* Kvatr homepage. The palette is the DTU deck's (2026-09-30): navy and cream, an orange and a blue
   for the lit windows. The type is Noto Sans for every word in seven languages, as on the web app
   (docs/languages.md, phase 5); Space Grotesk stays only in the logo's word.

   Dark mode follows the visitor's system setting (prefers-color-scheme) — no toggle, no script.
   The hero, the header, the "Kvatr" boxes, the screens and the contact band stay navy in both
   themes; everything else reads its colours from the tokens below.

   Every text/background pair holds WCAG AA (4.5:1) in both themes (checked 2026-10-01). */

:root {
    --navy: #16232E;
    --navy-2: #1D2F3E;
    --navy-3: #2B4155;
    --navy-line: #2E4558;
    --cream: #F5F3EE;
    --on-navy-muted: #B9C6CF;
    --orange: #F0925E;
    --blue: #7CC3E0;

    --bg: #F3F2EE;
    --bg-alt: #E7EBEA;
    --surface: #FBFAF7;
    --surface-cool: #E2E9EE;
    --surface-warm: #F7E0D2;
    --text: #16232E;
    --muted: #4A5866;
    --accent: #A9481A;
    --accent-cool: #2A6886;
    --border: #DEDBD3;

    --font-head: 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
    --font-logo: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    --radius: 12px;
    --gutter: 24px;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F171E;
        --bg-alt: #131E27;
        --surface: #17232C;
        --surface-cool: #1E2F3C;
        --surface-warm: #3A2B22;
        --text: #ECE8E1;
        --muted: #A3B0BA;
        --accent: #F0925E;
        --accent-cool: #7CC3E0;
        --border: #263540;
    }
}

/* ---- Base ---- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    /* Noto Sans at 600 reads lighter than Space Grotesk did; 650 keeps the headings as heavy as before. */
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); max-width: 22em; }

/* A heading's lines are balanced (2026-11-22): »Skriv, hvad I har brug for, så gør AI-« broke Danish's assistant title at its hyphen at 1280 px.
   Not in Chinese, which breaks between any two characters: there the balance moves a break into a word, as it did in the hero's. */
h2 { text-wrap: balance; }

h2:lang(zh) { text-wrap: wrap; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p { margin: 0; }

/* Line breaks by language (#615). Korean breaks between words, at its spaces — a break inside one (»스« / »크린«) reads as a
   mistake —, so its words are kept whole on the whole page; Chinese, with no spaces, breaks between any two characters and
   never takes keep-all. Japanese text breaks at a phrase's end where the browser can (auto-phrase; a browser without it
   ignores the line), all of it: the headline no longer cuts »アプリ« as »アプ« / »リ«, nor the body text »メッセージ«. */
:lang(ko) { word-break: keep-all; }

:lang(ja) { word-break: auto-phrase; }

/* On a narrow phone a Korean word too long for its line still breaks, rather than push the page wide. */
@media (max-width: 400px) {
    :lang(ko) { overflow-wrap: anywhere; }
}

a { color: var(--accent-cool); text-underline-offset: 3px; }

ul, ol { margin: 0; padding: 0; list-style: none; }

svg { display: block; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container.narrow { max-width: 760px; }

@media (max-width: 600px) {
    :root { --gutter: 16px; }
}

.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 100;
    background: var(--orange);
    color: var(--navy);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus { top: 12px; }

/* ---- Buttons ---- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--orange);
    color: var(--navy);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid var(--orange);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover { background: #F4A77B; border-color: #F4A77B; }

.button-ghost {
    background: transparent;
    color: var(--cream);
    border-color: var(--navy-line);
}

.button-ghost:hover { background: var(--navy-2); border-color: var(--on-navy-muted); }

.button-small { min-height: 40px; padding: 8px 18px; font-size: 0.9375rem; }

/* ---- Header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--navy);
    border-bottom: 1px solid var(--navy-line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 68px;
}

.brand { text-decoration: none; color: var(--cream); }

/* The logo's proportions are brand/kvatr-logo.svg's: the mark's box is 64 units to the word's
   54.6, and the word starts 14.7 units after the mark. */
.logo { display: inline-flex; align-items: center; gap: 0.27em; font-size: 1.5rem; color: var(--cream); }

.logo-mark { width: auto; height: 1.17em; flex: none; }

.logo-word {
    font-family: var(--font-logo);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.header-nav { display: flex; gap: 28px; margin-inline-start: auto; }

.header-nav a {
    color: var(--on-navy-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9875rem;
}

.header-nav a:hover { color: var(--cream); }

/* The header's row, measured in Chrome in the 33 languages (lane HH, 2026-11-21, #601), each item at its own width with its
   word on one line; the widest rows, in px:
                   with the menu       the four, gutters   without »Contact«,   below 400 px: gaps of 12 px,
                   (its links wrap)    of 24 | 16 px       gaps of 32 px        the logo at 1.5 | 1.125rem
     Finnish       1033                602 | 586           390                  338 | 316
     Icelandic     1024                531 | 515           337                  285 | 263
     Greek         979 (1081 whole)    521 | 505           341                  289 | 268
     Hungarian     998                 546 | 530           387                  335 | 313
     Romanian      942                 531 | 515           386                  334 | 312
     Portuguese    938                 535 | 519           381                  329 | 307
     English       853                 478 | 462           333                  281 | 259
     Korean        746                 438 | 422           324                  272 | 250
   Each breakpoint below stands at or above its column's widest, and SourceRulesTests.Phone holds it there. The first column
   was measured again when the menu's word for the assistant became »AI assistant« in every language (2026-11-22, after
   lane HP7 measured it for »Price«): the narrowest window, in whole px, that holds the row, a link wrapping at its spaces
   but never at a hyphen — »AI-|avustaja« over two lines is no menu word. Finnish and Icelandic are the hyphened words
   whole (»AI-avustaja«, »AI-aðstoðarmaður«); Ukrainian is fourth with 980. Before, Finnish needed 1013, with four links 943. */

/* A header button's word never breaks over two lines (#601): a row too wide for its window would show as a sideways scroll,
   never as »Sig« over »in« cut off at the edge. */
.header-inner .button { white-space: nowrap; }

/* The menu's five links go below 1051 px: the row with them needs 1033 px in Finnish, and the breakpoint stands 18 px above
   it, as it stood for »Assistant« (1013 px, below 1031 px: lane HP7) and for four links (943 px, below 961 px: lane HH). 2026-11-03 the four went below 900 px, where they pushed
   the header past its window in Greek, Hungarian and Lithuanian, but above it »Sign in« still broke over two lines in six
   languages. The language menu and the buttons stay. */
@media (max-width: 1050px) {
    .header-nav { display: none; }
    .header-inner .language-menu { margin-inline-start: auto; }
}

/* »Contact« gives way to the page's own contact band wherever the four do not fit in one row (#601): Finnish needs 602 px
   (at 600 px it was up to 1.3 px short at 601 and 602 px, where the gutters grow from 16 to 24 px). Without it the widest,
   Finnish, needs 390 px with the gaps of 32 px, so the narrow gaps below wait for 400 px. »Sign in« stays: the one a person
   on a phone comes for (#33). */
@media (max-width: 620px) {
    .header-inner .header-contact { display: none; }
}

/* On a narrow phone a long word in a heading (»Конфіденційність«, »Datenschutzerklärung«) breaks rather
   than push the page sideways. */
@media (max-width: 400px) {
    h1, h2, h3 { hyphens: auto; overflow-wrap: break-word; }
}

/* A 320 px phone fits the logo, the language menu and »Sign in« in one row in every language (WCAG 1.4.10): the gaps
   narrow to 12 px and the button's padding to 12 px, and below 360 px the logo is drawn at 1.125rem — with the full logo
   Finnish needs 338 px, with this one 316. Its mark is then 21 px high, the brand's least 20 px (brand/README.md); the gaps
   alone could not give the 18 px Finnish lacked without crowding the mark, whose clear space is a third of its height. */
@media (max-width: 400px) {
    .header-inner { gap: 12px; }
    .header-inner .button-small { padding-inline: 12px; }
}

@media (max-width: 359px) {
    .header-inner .logo { font-size: 1.125rem; }
}

/* The language menu (Shared/LanguageMenu.razor): a <details>, so it opens without script. The
   summary shows the page's language code; the list opens below it, over the page, with the seven
   languages by their own names. On navy in both themes, like the header. */
.language-menu { position: relative; flex: none; }

.language-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--navy-line);
    border-radius: 999px;
    color: var(--cream);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    list-style: none;
}

.language-menu summary::-webkit-details-marker { display: none; }

.language-menu summary::after {
    content: "";
    width: 0;
    height: 0;
    border-inline-start: 4px solid transparent;
    border-inline-end: 4px solid transparent;
    border-top: 5px solid var(--on-navy-muted);
}

.language-menu[open] summary::after { border-top: 0; border-bottom: 5px solid var(--on-navy-muted); }

.language-menu summary:hover { border-color: var(--on-navy-muted); }

.language-menu summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.language-menu ul {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 60;
    min-width: 11rem;
    /* 33 languages (#91): the list scrolls rather than run off a phone's screen. */
    max-height: min(70vh, 32rem);
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--navy-2);
    border: 1px solid var(--navy-line);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.language-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--on-navy-muted);
    text-decoration: none;
    font-size: 0.9375rem;
}

.language-menu a:hover,
.language-menu a:focus-visible { background: var(--navy-3); color: var(--cream); }

.language-menu a[aria-current="page"] { color: var(--cream); font-weight: 600; }

.language-menu a[aria-current="page"]::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-inline-end: 8px;
    border-radius: 50%;
    background: var(--orange);
    vertical-align: middle;
}

/* ---- Hero ---- */

.hero {
    background: var(--navy);
    color: var(--cream);
    padding: 88px 0 0;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: 48px;
}

.hero-text { padding-bottom: 96px; }

/* The headline's lines are balanced, in every language (#615): no last line of one word, or of one character. */
.hero h1 {
    font-size: clamp(2.75rem, 6.4vw, 5.25rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 18px 0 22px;
    text-wrap: balance;
}

/* But not in Chinese, zh-Hans and zh-Hant: it breaks between any two characters, and the balance moved zh-Hans's break into
   »服务« (»一个应用，服 / 务整个楼宇«); its headline wraps as it did. */
.hero h1:lang(zh) { text-wrap: wrap; }

.hero-lead {
    font-size: clamp(1.125rem, 1.9vw, 1.375rem);
    color: var(--on-navy-muted);
    max-width: 30em;
}

/* Kvatr's own price, the hero's third line (lane HP7): a link to the section that says the rest. */
.hero-price { margin-top: 18px; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); font-weight: 600; max-width: 30em; }
.hero-price a { color: var(--orange); text-decoration: none; }
.hero-price a:hover, .hero-price a:focus-visible { text-decoration: underline; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-status {
    margin-top: 28px;
    font-size: 0.9375rem;
    color: var(--on-navy-muted);
}

.hero-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-inline-end: 10px;
    border-radius: 50%;
    background: var(--blue);
    vertical-align: 1px;
}

.hero-art { align-self: end; position: relative; }

.skyline { width: 100%; max-width: 520px; height: auto; margin-inline-start: auto; }

/* The hero's picture (lane HP3): the app's Home on a phone, whole, standing before the skyline — the house in the hand.
   The frame is the picture's own edge, rounded as a phone's screen; no device is drawn. */
.hero-shot {
    position: absolute;
    inset-inline-start: 0;
    bottom: 24px;
    width: 50%;
    max-width: 270px;
    border: 6px solid var(--navy-3);
    border-radius: 30px;
    overflow: hidden;
    background: var(--navy-2);
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
}

.hero-shot .shot { border: 0; border-radius: 0; }

@media (max-width: 860px) {
    .hero { padding-top: 56px; }
    .hero-inner { grid-template-columns: 1fr; gap: 0; }
    .hero-text { padding-bottom: 40px; }
    .hero-art { max-width: 420px; width: 100%; margin: 24px auto 0; }
    .skyline { max-width: 360px; margin-inline: auto 0; }
    .hero-shot { bottom: 12px; width: 46%; max-width: 190px; border-width: 4px; border-radius: 22px; }
}

/* ---- Sections ---- */

.section { padding: 96px 0; }

.section-alt { background: var(--bg-alt); }

@media (max-width: 600px) {
    .section { padding: 64px 0; }
}

.eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.eyebrow-on-dark { color: var(--orange); margin: 0; }

.lead {
    font-size: 1.1875rem;
    color: var(--muted);
    max-width: 40em;
    margin-top: 18px;
}

.page-title { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 16px; }

.section .narrow .button { margin-top: 28px; }

.note { margin-top: 32px; color: var(--muted); max-width: 52em; }

/* ---- The privacy page (Pages/Privacy.razor): running text at a reading width ---- */

.privacy h2 { font-size: 1.375rem; margin: 40px 0 12px; max-width: none; }

.privacy h3 { font-size: 1.125rem; margin: 28px 0 8px; }

.privacy p,
.privacy ul { max-width: 65ch; margin: 0 0 12px; }

.privacy ul { padding-inline-start: 1.25em; list-style: disc; display: grid; gap: 8px; }

.privacy .note { margin-top: 16px; }

.note strong { color: var(--text); }

.source { margin-top: 24px; font-size: 0.875rem; color: var(--muted); }

/* ---- Cards ---- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.card h3 { margin-bottom: 8px; }

.card p { color: var(--muted); }

.card-grid { display: grid; gap: 20px; margin-top: 40px; }

.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
}

/* ---- Who Kvatr is for: a door for each side of the house, under the hero (2026-11-22) ---- */

/* A first reader did not find that the page is in two parts. The two doors say it at the top, each in the colour and with the
   sign of its side, and each side's section below wears the same: warm for the people who work in the house, cool for the
   people who run it. */
.door-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }

.door {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.door h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.25; margin: 0; text-wrap: balance; }

.door-who { color: var(--muted); margin: 0; }

.door-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }

.door-list li { position: relative; padding-inline-start: 24px; }

.door-list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 2px;
    top: 0.6em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--side);
}

.door-link { margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--side); }

.door-link::after { content: " \2193"; }

.door-sign { display: block; width: 40px; height: 40px; color: var(--side); }

.door-tenants, .band-tenants { --side: var(--accent); background: var(--surface-warm); }

.door-operations, .band-operations { --side: var(--accent-cool); background: var(--surface-cool); }

.band .door-sign { margin-bottom: 14px; }

@media (max-width: 760px) {
    .door-pair { grid-template-columns: 1fr; gap: 16px; }
    .door { padding: 24px; }
}

/* ---- The AI assistant's examples: what a person writes, and what it does (2026-11-22) ---- */

.asks-title { margin-top: 40px; }

.asks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.ask {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* What the person writes, as their own message stands in a conversation: at the end of the line, its corner there squared. */
.ask-said {
    align-self: flex-end;
    max-width: 90%;
    margin: 0;
    padding: 10px 16px;
    background: var(--surface-cool);
    border-radius: 18px;
    border-end-end-radius: 4px;
    font-weight: 600;
}

.ask-answer { margin: 0; color: var(--muted); padding-inline-start: 14px; border-inline-start: 3px solid var(--accent); }

@media (max-width: 760px) {
    .asks { grid-template-columns: 1fr; gap: 16px; }
}

/* ---- Pictures of Kvatr itself (lanes HP3 and HP4) ---- */

/* A screenshot from the test house: its own edge, rounded as a screen's, on the card's surface. The size is in the markup,
   so the box is there before the picture. */
.shot {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    background: var(--surface-cool);
}

.shot-phone { border-radius: 22px; }

.shot-wide { border-radius: 8px; }

/* The app's three cards, a picture each: the phone's upright card beside the web's wide one, the screen's below across both. */
.app-show {
    display: grid;
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
    gap: 20px;
    margin-top: 40px;
    padding: 0;
    list-style: none;
}

.app-card { display: flex; flex-direction: column; }

.app-card:last-child { grid-column: 1 / -1; }

.app-stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: -8px -8px 20px;
    padding: 20px;
    border-radius: 8px;
    background: var(--bg-alt);
    overflow: hidden;
}

/* The phone's picture shows its upper part at the web picture's height; the rest runs off the stage's foot. */
.app-card-phone .app-stage { flex: 1; max-height: 440px; padding-bottom: 0; }

/* At most 240 px and never wider than the card (lane HH): a bare 240 px kept the card 314 px wide in a 320 px window. */
.app-card-phone .shot { max-width: min(240px, 100%); border-bottom: 0; border-radius: 22px 22px 0 0; }

.app-card:last-child .shot { max-width: 760px; width: 100%; }

@media (max-width: 900px) {
    .app-show { grid-template-columns: 1fr; }
    .app-card-phone .app-stage { max-height: 380px; }
}

/* The story (lane HP4): the operations section's four cards in the order a fault takes, a picture a step, the picture and
   the words side by side and changing sides down the page; the step's number is drawn, not written. */
.story {
    display: grid;
    gap: 20px;
    margin-top: 40px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.story-step {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    padding: 32px;
    counter-increment: step;
}

/* Every other step has its picture on the far side, and the wider column with it. */
.story-step:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }

.story-step:nth-child(even) .story-shot { order: 2; }

.story-shot { display: flex; justify-content: center; }

/* A phone's picture shows its upper part and runs off the step's foot, as the hero's and the app card's do. */
.story-step-phone { padding-bottom: 0; }

.story-step-phone .story-shot { align-self: end; align-items: flex-start; max-height: 420px; overflow: hidden; }

.story-step-phone .shot { max-width: 250px; border-bottom: 0; border-radius: 22px 22px 0 0; }

.story-text h3 { display: flex; align-items: center; gap: 12px; }

/* The heading's words beside its drawn number break a long first word (»Störungsmeldungen«, 198 px where 191 are left at
   320 px) rather than widen every step, where the browser cannot hyphenate it, as `.house-section h3`'s do. Two classes, so
   that `.card h3`'s break-word further down does not undo it. */
.story-step .story-text h3 { overflow-wrap: anywhere; }

.story-text h3::before {
    content: counter(step);
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.875em;
}

@media (max-width: 900px) {
    /* One column: the step's words first, its picture under them, in every step. */
    .story-step,
    .story-step:nth-child(even) { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
    .story-step .story-shot,
    .story-step:nth-child(even) .story-shot { order: 2; }
    .story-step-phone { padding-bottom: 0; }
    .story-step-phone .story-shot { max-height: 380px; }
    .story-step-phone .shot { max-width: 220px; }
}

/* A link under a card's sentence: the data processing agreement in the privacy section. */
.card-link { margin-top: 12px; }

/* What comes next (2026-11-03): none of it in use — the sign-up built, not open; the rest still to come —, so the cards
   are drawn open: a dashed edge, no fill. */
.card-next { background: transparent; border-style: dashed; border-color: var(--muted); }

/* A design's picture under »What comes next« (Helpers/Designs.cs): dashed as the cards it belongs to, so it never reads as a
   screenshot of what is built; its caption says so in words. */
.design { margin: 32px 0 0; display: grid; gap: 12px; justify-items: start; }
.design-picture { display: block; max-width: min(100%, 960px); height: auto; border: 1px dashed var(--muted); border-radius: 8px; }
.design figcaption { color: var(--muted); font-size: 0.95rem; }

/* A long word in a card (»Auftragsverarbeitungsvertrag«, »app.kvatr.com/dpa«) or a long Japanese phrase breaks rather than
   widen the grid: at 900 px and less the cards stand in one column of 1fr, whose least is the widest card's least width,
   which break-word does not lower and anywhere does (lane HH: with Japanese broken at its phrases' ends, #615, a phrase of
   about 270 px in the people's cards widened the page by 15 px at 320 px). */
.card h3, .card p, .note, .fact-line li { overflow-wrap: anywhere; }

/* Languages and countries (2026-11-03): one line of four facts, a dot after each but the last. The facts run as one
   sentence does and wrap at its spaces; the dot hangs on its fact by a no-break space, so no line starts with one. */
.fact-line {
    margin-top: 28px;
    font-size: 1.1875rem;
    font-weight: 500;
    line-height: 1.7;
    max-width: 52em;
}

.fact-line li { display: inline; }

.fact-line li:not(:last-child)::after { content: "\00a0\00a0\00b7\00a0 "; color: var(--accent); font-weight: 700; }

/* ---- Stats ---- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat { display: flex; flex-direction: column; gap: 8px; }

.stat-number {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(2.5rem, 4.4vw, 3.25rem);
    line-height: 1;
    color: var(--accent);
}

.stat-text { color: var(--text); }

@media (max-width: 980px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* ---- The platform flow: in → Kvatr → out ---- */

.flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-top: 44px;
}

.flow-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.pill-list { display: grid; gap: 10px; }

.pill-list li { padding: 11px 16px; border-radius: 8px; color: var(--text); }

.pill-list-cool li { background: var(--surface-cool); }

.pill-list-warm li { background: var(--surface-warm); }

.flow-arrow::before {
    content: "→";
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.flow-core {
    background: var(--navy);
    color: var(--cream);
    border-radius: 16px;
    padding: 28px;
}

.flow-core-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.module-grid li {
    background: var(--navy-2);
    border: 1px solid var(--navy-3);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9375rem;
}

@media (max-width: 960px) {
    .flow { grid-template-columns: 1fr; gap: 16px; }
    .flow-arrow { justify-self: center; }
    .flow-arrow::before { content: "↓"; }
}

/* ---- People ---- */

.person-role {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card .person-role { color: var(--accent); }

/* ---- Contact ---- */

.contact {
    background: var(--navy);
    color: var(--cream);
    padding: 96px 0;
    text-align: center;
}

.contact h2 { margin: 0 auto; }

.contact-lead { color: var(--on-navy-muted); font-size: 1.1875rem; margin: 18px auto 32px; max-width: 34em; }

@media (max-width: 600px) {
    .contact { padding: 64px 0; }
    .contact .button { width: 100%; }
}

/* ---- Footer ---- */

.site-footer {
    background: var(--navy);
    color: var(--on-navy-muted);
    border-top: 1px solid var(--navy-line);
    padding: 40px 0;
    font-size: 0.9375rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 26em; }

.footer-meta { display: flex; flex-direction: column; gap: 4px; }

.site-footer a { color: var(--cream); }

.footer-copy { margin-top: 8px; }

/* ---- A house's public page (Pages/HousePage.razor, Shared/HouseLayout.razor; docs/guide.md »The public page«): the house's own page at
   kvatr.com/<slug> — no Kvatr header, a reading width, the house's text with its own line breaks (pre-line) and its own direction (dir="auto"). ---- */

.house-page { padding: 64px 0 48px; }

.house {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.house-head { margin-bottom: 40px; }

.house h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); overflow-wrap: anywhere; }

.house h2 { font-size: 1.5rem; margin-top: 8px; overflow-wrap: anywhere; }

.house-address { margin-top: 16px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px; row-gap: 4px; }

.house-group .house-address { margin-top: 8px; }

.house-address-lines { white-space: pre-line; }

.house-group { border-top: 1px solid var(--border); padding-top: 32px; margin-top: 32px; }

.house-head + .house-group { border-top: 0; padding-top: 0; }

.house-section { margin-top: 24px; }

.house-section h3 { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }

.kind-icon { flex: none; color: var(--accent-cool); }

.house-body { margin-top: 10px; white-space: pre-line; overflow-wrap: anywhere; text-align: start; }

.house-updated { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }

.house-foot {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9375rem;
    color: var(--muted);
}

.house-foot p { display: flex; flex-wrap: wrap; column-gap: 8px; row-gap: 4px; }
