/*
 * UptimeChecker styles. One file, no build step.
 *
 * Colours and sizes are set once in :root, and again for dark mode below it.
 * A rule never names a colour of its own: it takes a variable, so the dark
 * mode only has to change the variables. Most rules style plain elements
 * (table, form, button), so a new page looks right without extra classes.
 * The page is served with a Content-Security-Policy that forbids inline
 * styles: everything visual belongs in this file.
 */

/* Inter, from this site. Two files: the browser loads the second one only
   for a letter that is not in the first, for example in a name. The ranges
   are the ones Google Fonts gives the two files (README, "Fonts"). */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/static/fonts/inter-latin.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;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light dark;

    --bg: #fafcfb;
    --surface: #ffffff;
    --surface-2: #f1f6f3;
    --ink: #0f1a15;
    --muted: #55645c;
    --line: #e2ebe6;
    --line-strong: #cbd9d1;

    /* Emerald is the brand: buttons, links, the glow. The icon files
       (favicon.svg, og-image.svg) have it written out: change them
       together. White on --accent has a contrast of 5.5:1. */
    --accent: #047857;
    --accent-strong: #065f46;
    --accent-soft: #e7f8f0;
    --accent-ink: #064e3b;      /* text on accent-soft */
    --accent-text: #047857;     /* links and icons on a surface */
    --accent-ring: rgb(4 120 87 / 0.2);
    --on-accent: #ffffff;
    --selection: rgb(4 120 87 / 0.18);

    /* Sky only decorates. It is too light for text. */
    --sky: #38bdf8;
    --sky-soft: rgb(56 189 248 / 0.2);

    --glow: rgb(16 185 129 / 0.18);
    --glow-sky: rgb(56 189 248 / 0.12);

    /* The dark band at the end of a marketing page */
    --band: #0f1a15;
    --band-glow: rgb(52 211 153 / 0.45);
    --on-band: #ffffff;
    --band-muted: #b5c9bf;

    /* The status of a site: up, down, and in between (checking, an
       expiring certificate). Down and in between must stand out next to
       the green of the brand, so they are red and amber. */
    --success-soft: #e7f8f0;
    --success-line: #bfe6d2;
    --success-ink: #065f46;

    --warning-soft: #fff7e0;
    --warning-line: #f3d58a;
    --warning-ink: #7a4b00;

    --danger: #c8372d;
    --danger-soft: #fdecea;
    --danger-line: #f1c4bf;
    --danger-ink: #7d1f17;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgb(15 26 21 / 0.05);
    --shadow: 0 1px 2px rgb(15 26 21 / 0.05), 0 8px 24px rgb(15 26 21 / 0.07);
    --shadow-lg: 0 2px 4px rgb(15 26 21 / 0.04), 0 24px 64px rgb(6 78 59 / 0.18);
    --shadow-button: 0 1px 2px rgb(15 26 21 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.15);

    /* The width of the content. Navigation, page and footer span the whole
       window and keep their content inside this width with their padding. */
    --page: 1120px;
    --gutter: max(1.25rem, (100% - var(--page)) / 2);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0f0d;
        --surface: #131a16;
        --surface-2: #18211c;
        --ink: #e8f0ec;
        --muted: #9cada4;
        --line: #24302a;
        --line-strong: #35443c;

        /* A brighter green with dark text: white on it would be too weak */
        --accent: #10b981;
        --accent-strong: #34d399;
        --accent-soft: #0b2e22;
        --accent-ink: #a7f3d0;
        --accent-text: #34d399;
        --accent-ring: rgb(52 211 153 / 0.35);
        --on-accent: #022c22;
        --selection: rgb(52 211 153 / 0.3);

        --sky-soft: rgb(56 189 248 / 0.25);
        --glow: rgb(16 185 129 / 0.25);
        --glow-sky: rgb(56 189 248 / 0.1);

        --band: #0e2219;
        --band-glow: rgb(52 211 153 / 0.45);
        --band-muted: #b9d3c6;

        --success-soft: #0e2a1f;
        --success-line: #1d4d39;
        --success-ink: #a7f3d0;

        --warning-soft: #2a2108;
        --warning-line: #5c4712;
        --warning-ink: #fde68a;

        --danger: #f87171;
        --danger-soft: #2a1416;
        --danger-line: #5c2626;
        --danger-ink: #fecaca;

        --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
        --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
        --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.4), 0 24px 64px rgb(0 0 0 / 0.55);
        --shadow-button: 0 1px 2px rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.12);
    }
}

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

/* The navigation stays at the top on wide screens. A link to an anchor
   (#how) must not end under it. */
html {
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--selection);
}

main {
    padding: 0 var(--gutter) 5rem;
}

/* Text */

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    overflow-wrap: break-word;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 1.4rem;
    font-weight: 650;
    margin-top: 2.5rem;
}

h3 {
    font-size: 1.05rem;
    font-weight: 620;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1rem;
    text-wrap: pretty;
}

a {
    color: var(--accent-text);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--ink);
}

a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

code {
    font-family: var(--mono);
    font-size: 0.875em;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
    overflow-wrap: anywhere;
}

small, .hint, .field-hint {
    color: var(--muted);
    font-size: 0.875rem;
}

/* Navigation */

nav {
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    padding: 0.8rem var(--gutter);
    margin-bottom: 2.75rem;
    border-bottom: 1px solid var(--line);
}

/* On a wide screen the navigation stays at the top, and the page shows
   through it, blurred. On a phone it has three or four lines: it would take
   a third of the screen. There it has no background of its own, so that the
   glow behind a heading reaches under it without an edge. */
@media (min-width: 641px) {
    nav {
        position: sticky;
        top: 0;
        background: color-mix(in srgb, var(--bg) 80%, transparent);
        -webkit-backdrop-filter: saturate(1.6) blur(14px);
        backdrop-filter: saturate(1.6) blur(14px);
    }
}

nav a {
    padding: 0.35rem 0.7rem;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
}

nav a:not(.btn):hover {
    color: var(--ink);
    background: var(--surface-2);
}

/* The marketing pages in the navigation. The one that is shown stands out. */
nav a[aria-current="page"] {
    color: var(--accent-ink);
    background: var(--accent-soft);
}

/* The name with the icon of the site in front of it */
nav .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding-left: 0;
    margin-right: 1rem;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

nav .brand::before {
    content: "";
    width: 1.65rem;
    height: 1.65rem;
    background: url("/static/favicon.svg") center / contain no-repeat;
}

nav a.brand:hover {
    background: none;
}

/* Pushes itself and everything after it to the right */
.nav-end {
    margin-left: auto;
}

.nav-user {
    padding: 0 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

/* The legal links under every page. The marketing pages list themselves in a
   line of their own above them. The icon of the site comes first. */
footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.5rem;
    padding: 2.25rem var(--gutter) 2.75rem;
    font-size: 0.875rem;
    background: var(--surface-2);
    border-top: 1px solid var(--line);
}

footer::before {
    content: "";
    flex-basis: 100%;
    height: 1.5rem;
    margin-bottom: 0.75rem;
    background: url("/static/favicon.svg") left center / contain no-repeat;
}

footer ul {
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    gap: 0.35rem 1.5rem;
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--line);
}

footer a {
    color: var(--muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--ink);
}

/* Messages. The one of the layout stands between navigation and page. */

.flash {
    padding: 0.8rem 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--success-ink);
    background: var(--success-soft);
    border: 1px solid var(--success-line);
    border-left-width: 4px;
    border-radius: var(--radius);
}

body > .flash {
    margin-inline: var(--gutter);
}

.flash.error {
    color: var(--danger-ink);
    background: var(--danger-soft);
    border-color: var(--danger-line);
}

.flash.warning {
    color: var(--warning-ink);
    background: var(--warning-soft);
    border-color: var(--warning-line);
}

/* Long texts: imprint, privacy policy, terms, the marketing pages. Lines stay
   short enough to read. */
article {
    max-width: 46rem;
}

article h2 {
    margin-top: 2.75rem;
}

article h3 {
    margin-top: 1.75rem;
}

article h4 {
    margin: 1.25rem 0 0.5rem;
}

article li {
    margin-bottom: 0.4rem;
}

article li::marker {
    color: var(--accent-text);
}

/* The questions of the FAQ, one below the other with a line between them */
article > h2[id] {
    padding-top: 1.75rem;
    margin-top: 1.75rem;
    font-size: 1.15rem;
    border-top: 1px solid var(--line);
}

/* A marketing page opens with a heading and a lead outside an article. They
   stay as narrow as one. Headings of other pages keep the full width. */
main > h1:has(+ .lead), main > .lead {
    max-width: 46rem;
}

/* The heading of a marketing page without a hero is nearly as big as the one
   of the start page, with a glow behind it that reaches under the
   navigation. The FAQ has its heading inside the article. */
main > h1:has(+ .lead), article > h1:has(+ .lead) {
    padding-top: 1.5rem;
    font-size: clamp(2.2rem, 5vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    /* The area of the image reaches 100vmax to both sides: a position in
       percent counts from its edge, 50% is the middle of the heading. It
       starts above the top of the page, where its edge cannot be seen. */
    border-image: radial-gradient(56rem 22rem at 50% 38%, var(--glow), transparent 70%) fill 0 // 16rem 100vmax 14rem;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--muted);
    margin-bottom: 1.75rem;
}

/* A section of a marketing page: a heading over cards */
main > h2:has(+ .cards) {
    margin-top: 4rem;
    margin-bottom: 1.25rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.035em;
}

/* Lists of a contract whose items carry their own "(a)", "(b)" */
ol.clauses, ol.clauses ol {
    list-style: none;
    padding-left: 0;
}

ol.clauses ol {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

ol.clauses li {
    margin-bottom: 0.5rem;
}

/* The title of a page and its main button in one line */
main > header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.75rem;
}

main > header h1 {
    margin: 0;
}

/* Facts about a thing, each in a tile */
dl.facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr));
    gap: 0.75rem;
    margin: 0 0 2rem;
}

dl.facts > div {
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

dl.facts dt {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
}

dl.facts dd {
    margin: 0.1rem 0 0;
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

/* An address to copy. One click selects all of it. */
code.copy {
    display: block;
    max-width: 46rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: var(--accent-ink);
    background: var(--accent-soft);
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    user-select: all;
    cursor: text;
}

/* Tables */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

th, td {
    text-align: left;
    vertical-align: middle;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
}

tbody tr:last-child th, tbody tr:last-child td {
    border-bottom: none;
}

th {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

thead th {
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    background: var(--surface-2);
}

thead + tbody tr:hover td {
    background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

/* Forms */

form {
    max-width: 34rem;
    margin-bottom: 1rem;
}

/* A form with fields to fill in is a card. A form of only a button (delete,
   cancel, sign out) or a slot stays plain. */
main form:has(input:not([type="hidden"]), select, textarea) {
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1.1rem;
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0 0.4rem 0 0;
    vertical-align: -0.15em;
    accent-color: var(--accent);
}

/* A label with a checkbox in front of its text */
label.checkbox {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

fieldset {
    margin: 0.5rem 0 1.5rem;
    padding: 1rem 1.25rem 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

legend {
    padding: 0 0.4rem;
    font-weight: 650;
}

.field-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: -0.85rem;
    margin-bottom: 0.85rem;
}

/* Sits tight under the input it explains */
.field-hint {
    margin-top: -0.85rem;
    margin-bottom: 0.85rem;
}

.hint {
    margin-top: 0.75rem;
}

/* A form that sits in a line of text or in a table cell */
.inline-form {
    display: inline;
    margin-left: 0.6rem;
}

/* Buttons. Links that should look like buttons get the class "btn". A button
   without a class is the main one: green. */

button, .btn {
    display: inline-block;
    padding: 0.6rem 1.15rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--on-accent);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 10px;
    box-shadow: var(--shadow-button);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

button:hover, .btn:hover {
    color: var(--on-accent);
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

button:active, .btn:active {
    transform: translateY(1px);
}

/* Two buttons in a row keep a little distance */
button + .btn, .btn + .btn, .btn + button, button + button {
    margin-left: 0.4rem;
}

/* The same as a button without a class. The pages of the marketing site name
   it, so it stays. */
.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-secondary {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    color: var(--ink);
    background: var(--surface-2);
    border-color: var(--line-strong);
}

.btn-danger {
    color: var(--danger);
    background: var(--surface);
    border-color: var(--danger-line);
    box-shadow: none;
}

.btn-danger:hover {
    color: var(--on-accent);
    background: var(--danger);
    border-color: var(--danger);
}

.btn-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-large {
    padding: 0.85rem 1.5rem;
    font-size: 1.05rem;
    border-radius: 12px;
}

/* Buttons and links next to each other, wrapping on small screens */
.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.actions > *, .actions > .btn {
    margin: 0;
}

/* Small labels, e.g. the number of sites that are down in the navigation */
.tag {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 550;
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-radius: 999px;
    white-space: nowrap;
}

/* The status of a site: a pill with a dot in front */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.12rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 999px;
}

.status::before {
    content: "";
    width: 0.5em;
    height: 0.5em;
    background: currentColor;
    border-radius: 50%;
}

.status-up {
    color: var(--success-ink);
    background: var(--success-soft);
    border-color: var(--success-line);
}

.status-down {
    color: var(--danger-ink);
    background: var(--danger-soft);
    border-color: var(--danger-line);
}

.status-pending {
    color: var(--warning-ink);
    background: var(--warning-soft);
    border-color: var(--warning-line);
}

.status-paused {
    color: var(--muted);
    background: var(--surface-2);
    border-color: var(--line);
}

/* The pill of an expiring certificate shows a date, without the dot */
.status-date::before {
    display: none;
}

.tag-down {
    color: var(--danger-ink);
    background: var(--danger-soft);
}

/* What went wrong at the last check, under the address of the site */
small.problem {
    color: var(--danger-ink);
}

/* Landing page */

/* The bands of a marketing page reach from edge to edge of the window. The
   colour outside the page is painted with border-image: it does not count
   as content, so the page cannot scroll sideways. */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
    margin-bottom: 1rem;
    border-image: radial-gradient(70rem 34rem at 60% 15%, var(--glow), transparent 70%) fill 0 // 5rem 100vmax 0;
}

/* The navigation lies on the glow of the hero */
body:has(> main > .hero:first-child) > nav {
    margin-bottom: 0;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 750;
    line-height: 1.04;
    letter-spacing: -0.045em;
    margin-bottom: 1.25rem;
    color: var(--ink);
    background: linear-gradient(100deg, var(--ink) 35%, var(--accent-text));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* A small line above the heading */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    padding: 0.3rem 0.9rem 0.3rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.eyebrow::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    background: var(--sky);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--sky-soft);
}

/* A picture of the app made of plain HTML, in a window */
.example {
    position: relative;
    margin: 0;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* The three dots of a window */
.example::before {
    content: "";
    position: absolute;
    top: 1.15rem;
    left: 1.25rem;
    width: 3.2rem;
    height: 0.7rem;
    background:
        radial-gradient(circle at 0.35rem 50%, var(--line-strong) 0.3rem, transparent 0.32rem),
        radial-gradient(circle at 1.6rem 50%, var(--line-strong) 0.3rem, transparent 0.32rem),
        radial-gradient(circle at 2.85rem 50%, var(--line-strong) 0.3rem, transparent 0.32rem);
}

/* The caption is the title bar of the window, right of the dots */
.example figcaption {
    margin: 0 -1.5rem 1.25rem;
    padding: 0 1.5rem 0.85rem 5.25rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: right;
    border-bottom: 1px solid var(--line);
}

.example h3 {
    margin-bottom: 0.3rem;
}

.example > p {
    color: var(--muted);
    font-size: 0.875rem;
}

.example dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
    gap: 0.6rem;
    margin: 1.1rem 0 0;
}

.example dl > div {
    display: grid;
    align-content: start;
    gap: 0.4rem;
}

.example dt {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.example dd {
    margin: 0;
    padding: 0.45rem 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-radius: 8px;
}

.example dd.picked {
    color: var(--on-accent);
    background: var(--accent);
    box-shadow: 0 6px 16px var(--glow);
}

.example .hint {
    margin: 1.1rem 0 0;
}

/* The sites in the picture of the app */
.example ul {
    display: grid;
    gap: 0.6rem;
    margin: 1.1rem 0 0;
    padding: 0;
    list-style: none;
}

.example li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.example li small {
    display: block;
    font-weight: 400;
    color: var(--muted);
}

.example li .status {
    flex: none;
}

@media (min-width: 900px) {
    /* A warm glow behind the picture. It must fade out inside the hero:
       outside of it the box would cut it off with a visible edge. */
    .hero {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 3.5rem;
        padding: 5.5rem 0 3.5rem;
        background: radial-gradient(22rem 14rem at 75% 50%, var(--glow-sky), transparent 70%);
    }

    .example {
        transform: perspective(1600px) rotateY(-7deg) rotateX(3deg);
    }
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

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

/* The icon of a card (static/icons.svg) */
.card > svg {
    display: block;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0.6rem;
    margin-bottom: 1.1rem;
    color: var(--accent-text);
    background: var(--accent-soft);
    border-radius: 12px;
}

/* Cards of different widths. In rows of three, a wide one changes sides. */
@media (min-width: 900px) {
    .bento {
        grid-template-columns: repeat(3, 1fr);
    }

    .bento > :nth-child(1), .bento > :nth-child(4), .bento > :nth-child(5) {
        grid-column: span 2;
    }
}

.bento > :first-child {
    background: linear-gradient(135deg, var(--accent-soft), var(--surface) 65%);
}

.bento > :first-child > svg {
    background: var(--surface);
}

/* Numbered steps. The numbers come from the list itself. */
ol.steps {
    list-style: none;
    padding: 0;
    counter-reset: step;
}

ol.steps li {
    counter-increment: step;
}

ol.steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-radius: 50%;
    box-shadow: 0 6px 16px var(--glow);
}

/* The dark band at the end of a marketing page. It meets the footer. */
.closing {
    padding: 4.5rem 0;
    margin-top: 4.5rem;
    text-align: center;
    color: var(--on-band);
    background: var(--band);
    box-shadow: 0 0 0 100vmax var(--band);
    clip-path: inset(0 -100vmax);
    border-image: radial-gradient(48rem 18rem at 50% 0%, var(--band-glow), transparent 70%) fill 0 // 0 100vmax;
}

main:has(> .closing:last-child) {
    padding-bottom: 0;
}

.closing h2 {
    margin-top: 0;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    letter-spacing: -0.035em;
}

.closing .lead, .closing .hint {
    color: var(--band-muted);
}

.closing .hint a {
    color: var(--on-band);
}

.closing .actions {
    justify-content: center;
}

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

    .card:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 2.5rem 0 3rem;
    }

    main > h2:has(+ .cards) {
        margin-top: 3rem;
    }

    main form:has(input:not([type="hidden"]), select, textarea) {
        padding: 1.25rem;
    }

    /* German has long words. A big heading may split them on a phone. On a
       wide screen it has room, and a split word only looks broken. */
    :lang(de) h1 {
        hyphens: auto;
        /* only words of 10 letters or more, with 4 on each side of the break */
        hyphenate-limit-chars: 10 4 4;
    }

    /* No pills on a phone: the links line up under the name, and more of
       them fit into a line */
    nav {
        gap: 0.35rem 1rem;
    }

    nav a {
        padding: 0.2rem 0;
        font-size: 0.9rem;
    }

    nav a:not(.btn):hover {
        background: none;
    }

    /* On a phone the second half of the navigation wraps anyway. Pushed to
       the right, its first link would stand alone in the middle. */
    .nav-end {
        margin-left: 0;
    }

    nav a[aria-current="page"] {
        color: var(--accent-text);
        background: none;
        text-decoration: underline 2px;
        text-underline-offset: 0.45em;
    }

    .lead {
        font-size: 1.1rem;
    }

    /* The navigation of a marketing page in three lines: the name and the
       button, the pages, the rest. The empty ::before and ::after are the
       line breaks. */

    nav:has(.nav-page) > * {
        order: 5;
    }

    nav:has(.nav-page) .brand {
        order: 0;
    }

    nav:has(.nav-page) .btn {
        order: 1;
        margin-left: auto;
    }

    nav:has(.nav-page)::before, nav:has(.nav-page)::after {
        content: "";
        flex-basis: 100%;
        order: 2;
    }

    nav:has(.nav-page) .nav-page {
        order: 3;
    }

    nav:has(.nav-page)::after {
        order: 4;
    }

    /* On a phone the times of a day stand next to each other */
    .slot-days section {
        grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    }

    .slot-days h3 {
        grid-column: 1 / -1;
    }

    /* A table that is wider than the phone scrolls sideways on its own */
    table {
        display: block;
        overflow-x: auto;
    }

    th, td {
        padding: 0.6rem 0.75rem;
        white-space: nowrap;
    }
}
