:root {
    --text: #1c1f23;
    --muted: #5a636e;
    --line: #dfe3e8;
    --accent: #1a56c4;
    --bg: #ffffff;
    --bg-soft: #f6f8fa;
    /* Only ever seen behind a missing photo, so it has to read as "nothing here yet" rather than as
       a drawing worth looking at — one step darker than the tile it sits on, no more. */
    --glyph: #b7c0cc;
    /* Wide enough for three cards at a comfortable size, narrow enough that the group headings stay
       within one eye movement of the cards they label. Prose sets its own, narrower width. */
    --maxw: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    /* No webfont on purpose: the page must render identically for Latin, Cyrillic and Han
       script without shipping (or waiting on) a font that covers all three. */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
                 "Noto Sans", "Noto Sans SC", sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

a { color: var(--accent); }

/* Definitions only — nothing here is drawn where it sits. */
.sprite { display: none; }

/* Icons inherit the colour and are sized by the rule that places them, so one class covers the nav,
   the headings and the empty tiles. */
.ico {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- header ------------------------------------------------------------------------------- */

/* Sticky because the page is a list of shelves: the visitor's position in it is the one thing worth
   keeping on screen while they scroll past a group that isn't theirs. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.header-row {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.brand {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--muted);
    text-decoration: none;
}

.nav > a:hover { color: var(--text); }

.nav > a .ico { color: var(--glyph); }

.nav > a:hover .ico { color: var(--accent); }

/* ---- language switcher -------------------------------------------------------------------- */

.lang { position: relative; }

.lang > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    list-style: none;
}

/* The default disclosure triangle, removed in both spellings — the chevron inside the summary is
   the one that turns. */
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::marker { content: ""; }

.lang > summary:hover { border-color: var(--accent); color: var(--accent); }

.lang[open] > summary { border-color: var(--accent); color: var(--accent); }

.lang .chevron { width: 15px; height: 15px; }

.lang[open] .chevron { transform: rotate(180deg); }

.lang ul {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 40;
    min-width: 190px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(20, 25, 35, 0.10);
}

.lang li a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
}

.lang li a:hover { background: var(--bg-soft); }

.lang li a.active { color: var(--accent); font-weight: 600; }

/* ---- home page ---------------------------------------------------------------------------- */

/* Two lines and out. The filters directly below are what the visitor came to use, and the previous
   version spent a whole screen height before reaching them. */
.hero {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 46px 24px 22px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero p {
    margin: 0;
    max-width: 62ch;
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted);
}

.filters {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filters a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
    color: var(--muted);
    text-decoration: none;
}

.filters a:hover { border-color: var(--accent); color: var(--accent); }

.filters a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 500;
}

/* The tally, one shade back from the label so the row reads as words first and numbers second. */
.filters .n { font-size: 13px; color: var(--glyph); }

.filters a:hover .n { color: var(--accent); }

.filters a.active .n { color: #c9d9f6; }

.catalogue {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px 72px;
}

/* auto-fill rather than auto-fit: with one product in the catalogue the track stays card-sized
   instead of stretching that card across the full width of the page. */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.card:hover { border-color: var(--glyph); }

/* Fixed ratio so a row of cards lines up whether the photos are in yet or not. */
.shot {
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

.shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shot .glyph {
    width: 58px;
    height: 58px;
    fill: none;
    stroke: var(--glyph);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 18px 20px 20px;
}

.card-body h2 { margin: 0; font-size: 17px; line-height: 1.35; }

.card-body h2 a { color: var(--text); text-decoration: none; }

.card-body h2 a:hover { color: var(--accent); }

.card-body p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Above the name rather than beside it: the unfiltered grid mixes groups, and which shelf a card
   came from is the first thing that makes sense of the name underneath. */
.card-body .group-tag {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--glyph);
}

.card-body .group-tag .ico { width: 15px; height: 15px; }

/* margin-top:auto pins the badge to the bottom edge, so badges line up across a row of cards whose
   taglines run to different lengths. */
.badge {
    align-self: flex-start;
    margin-top: auto;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge.released { background: #e7f2ea; color: #1c6b3e; }

.badge.beta { background: #fbeed8; color: #8a5a09; }

.badge.inprogress { background: #eef1f4; color: var(--muted); }

.empty {
    margin: 0;
    padding: 34px 24px;
    background: var(--bg-soft);
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}

/* ---- privacy policy ----------------------------------------------------------------------- */

/* Its own width, narrower than the catalogue: this is a page to be read line by line, and a line of
   legal text stops being readable long before it reaches the width of three cards. */
.policy {
    display: block;
    max-width: 820px;
    margin: 0 auto;
    padding: 44px 24px 72px;
}

.policy header { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 26px; }

.policy h1 { font-size: 1.95rem; line-height: 1.25; margin: 0 0 6px; }

.policy .subtitle { margin: 0; font-size: 1.05rem; color: var(--accent); font-weight: 600; }

.policy .updated { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }

.policy .lead { font-size: 1.06rem; }

.policy h2 {
    font-size: 1.22rem;
    margin: 32px 0 8px;
    padding-top: 4px;
}

.policy p { margin: 0 0 12px; }

/* Data categories: the term is the category, the description says what and why. */
.policy dl { margin: 12px 0 0; }

.policy dt {
    font-weight: 600;
    margin-top: 16px;
    color: var(--text);
}

.policy dd {
    margin: 4px 0 0;
    padding-left: 14px;
    border-left: 3px solid var(--line);
    color: #2c3239;
}

.policy ul { margin: 8px 0 12px; padding-left: 22px; }

.policy li { margin-bottom: 4px; }

/* ---- footer ------------------------------------------------------------------------------- */

footer {
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 14px;
    scroll-margin-top: 88px;
}

.footer-row {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-row p { margin: 0; }

.footer-row .links { display: flex; gap: 22px; }

/* ---- narrower screens --------------------------------------------------------------------- */

/* The grid reflows on its own — auto-fill drops a column whenever one no longer fits 280px — so
   nothing here touches the column count. */
@media (max-width: 700px) {
    .header-row { min-height: 0; padding: 12px 20px; }
    .hero { padding: 34px 20px 18px; }
    .hero h1 { font-size: 27px; }
    .hero p { font-size: 16px; }
    .filters { padding: 0 20px 22px; gap: 8px; }
    .filters a { padding: 7px 13px; font-size: 14px; }
    .catalogue { padding: 0 20px 56px; }
    .cards { gap: 18px; }
    .footer-row { padding: 20px; }
}

@media (max-width: 520px) {
    body { font-size: 16px; }
    .policy h1 { font-size: 1.6rem; }
    .policy { padding: 32px 20px 56px; }
}
