/* -----------------------------------------------------------------------------
 *  GEO Check
 *
 *  Plain CSS, not compiled. Every value reads the host theme's custom property
 *  first and falls back to its own — so on a theme that defines them the check is
 *  indistinguishable from the rest of the site, and on a theme that defines
 *  none of them it still looks finished.
 *
 *  The two branding colours are set as inline custom properties on .geo by the
 *  template, which is why they are read here without a fallback chain: the
 *  template always provides them.
 * -------------------------------------------------------------------------- */

.geo {
    --geo-bg: var(--wn-surface, #121b24);
    --geo-bg-2: var(--wn-surface-2, #18242f);
    --geo-border: var(--wn-border, #223140);
    --geo-border-strong: var(--wn-border-strong, #4e637a);
    --geo-text: var(--wn-text, #e6edf3);
    --geo-muted: var(--wn-text-muted, #9fb0c0);
    --geo-faint: var(--wn-text-faint, #7d90a3);
    --geo-radius: var(--wn-radius-m, 12px);
    --geo-radius-s: var(--wn-radius-s, 6px);
    --geo-pill: var(--wn-radius-pill, 999px);
    --geo-gap: var(--wn-space-m, 1.5rem);
    --geo-gap-s: var(--wn-space-xs, 0.75rem);
    --geo-font: var(--wn-font-body, system-ui, sans-serif);
    --geo-display: var(--wn-font-display, system-ui, sans-serif);
    --geo-mono: var(--wn-font-mono, ui-monospace, monospace);
    --geo-ease: var(--wn-ease, cubic-bezier(0.22, 1, 0.36, 1));

    --geo-critical: #ff8a8a;
    --geo-warning: #f5c26b;
    --geo-notice: #8fb6ff;
    --geo-good: var(--geo-primary, #2fe0b0);

    color: var(--geo-text);
    font-family: var(--geo-font);
}

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

/*
 * The host theme may space adjacent list items. `li + li { margin-top: … }` is
 * a common default and the Web Nomads theme has exactly that, at four pixels.
 *
 * Every list in this report states its own spacing, so the inherited one is
 * dropped once here rather than fought in each component. It is worth naming
 * what it did: in the row of score pills the first item got no top margin and
 * the other two got four pixels, and because the row sized them to a common
 * outer height, the first pill came out four pixels taller than its neighbours
 * and the three lined up on their bottom edge. Nothing about that is visible
 * in this stylesheet, which is why it is reset rather than worked around.
 */
.geo li { margin-top: 0; }

.geo-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* --- Form ---------------------------------------------------------------- */
.geo-form__row { margin-bottom: var(--geo-gap); }

.geo-form__label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: var(--geo-display);
    font-weight: 600;
}

.geo-form__submit { margin-top: var(--geo-gap); }
.geo-form__submit .geo-btn { min-width: 14rem; }

.geo-form__hint {
    margin: 0.45rem 0 0;
    color: var(--geo-faint);
    font-size: 0.875rem;
}

.geo-input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--geo-border-strong);
    border-radius: var(--geo-radius-s);
    background: var(--geo-bg-2);
    color: var(--geo-text);
    font: inherit;
}

.geo-input:focus-visible {
    outline: 2px solid var(--geo-primary, #2fe0b0);
    outline-offset: 2px;
}

.geo-input--mono { font-family: var(--geo-mono); font-size: 0.85rem; }

.geo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.65rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--geo-pill);
    font-family: var(--geo-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 140ms var(--geo-ease), box-shadow 140ms var(--geo-ease);
}

.geo-btn:hover { transform: translateY(-2px); text-decoration: none; }
.geo-btn:active { transform: none; }
.geo-btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.geo-btn--primary {
    background: var(--geo-primary, #2fe0b0);
    border-color: var(--geo-primary, #2fe0b0);
    color: #04120e;
}

.geo-btn--secondary {
    background: var(--geo-secondary, #a78bfa);
    border-color: var(--geo-secondary, #a78bfa);
    color: #14081f;
}

.geo-btn--ghost {
    background: transparent;
    border-color: var(--geo-border-strong);
    color: var(--geo-text);
}

.geo-btn--ghost:hover { border-color: var(--geo-primary, #2fe0b0); color: var(--geo-primary, #2fe0b0); }

/* The honeypot. Off screen rather than display:none — the scripts this is
   meant for check for the latter. */
.geo-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Depth choice -------------------------------------------------------- */
.geo-depth { border: 0; margin: 0 0 var(--geo-gap); padding: 0; }

.geo-depth__options {
    display: grid;
    gap: var(--geo-gap-s);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.geo-depth__option {
    display: flex;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--geo-border);
    border-radius: var(--geo-radius);
    background: var(--geo-bg);
    cursor: pointer;
    transition: border-color 140ms var(--geo-ease), background-color 140ms var(--geo-ease);
}

.geo-depth__option:hover { border-color: var(--geo-border-strong); }
.geo-depth__option:has(input:checked) { border-color: var(--geo-primary, #2fe0b0); background: var(--geo-bg-2); }
.geo-depth__option:has(input:focus-visible) { outline: 2px solid var(--geo-primary, #2fe0b0); outline-offset: 2px; }

.geo-depth__option input { margin-top: 0.3rem; accent-color: var(--geo-primary, #2fe0b0); }
.geo-depth__body { display: block; }

.geo-depth__title {
    display: block;
    font-family: var(--geo-display);
    font-weight: 600;
}

.geo-depth__estimate {
    display: block;
    color: var(--geo-primary, #2fe0b0);
    font-size: 0.8rem;
    font-weight: 600;
}

.geo-depth__text {
    display: block;
    margin-top: 0.3rem;
    color: var(--geo-muted);
    font-size: 0.875rem;
}

/* --- Panels -------------------------------------------------------------- */
.geo-panel {
    padding: var(--geo-gap);
    border: 1px solid var(--geo-border);
    border-radius: var(--geo-radius);
    background: var(--geo-bg);
    margin-bottom: var(--geo-gap);
}

.geo-panel__title { margin: 0 0 0.5rem; font-size: 1.3rem; }
.geo-panel--error { border-color: var(--geo-critical); }

.geo-alert {
    padding: 0.8rem 1rem;
    border: 1px solid var(--geo-critical);
    border-radius: var(--geo-radius-s);
    background: rgba(255, 138, 138, 0.1);
    margin-bottom: var(--geo-gap);
}

/* --- Progress ------------------------------------------------------------ */
.geo-progress__lead { color: var(--geo-muted); }

.geo-meter {
    height: 10px;
    margin: 1rem 0 0.5rem;
    border-radius: var(--geo-pill);
    background: var(--geo-bg-2);
    overflow: hidden;
}

.geo-meter__fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--geo-primary, #2fe0b0), var(--geo-secondary, #a78bfa));
    transition: width 600ms var(--geo-ease);
}

.geo-progress__step {
    display: flex;
    gap: 0.6rem;
    margin: 0 0 1rem;
    color: var(--geo-muted);
    font-size: 0.9rem;
}

.geo-progress__percent {
    font-family: var(--geo-mono);
    font-weight: 700;
    color: var(--geo-primary, #2fe0b0);
    min-width: 3.2em;
}

/* Eight lines deep, newest at the top, the rest reachable by scrolling. A list
   that grows without bound pushes everything below it — including the e-mail
   field — off the screen while the visitor is watching. */
.geo-log {
    --geo-log-line: 1.85rem;

    max-height: calc(var(--geo-log-line) * 8);
    margin: 0;
    padding: 0 0.25rem 0 0;
    list-style: none;
    font-size: 0.9rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--geo-border-strong) transparent;
}

.geo-log:focus-visible {
    outline: 2px solid var(--geo-primary, #2fe0b0);
    outline-offset: 4px;
}

.geo-log::-webkit-scrollbar { width: 6px; }
.geo-log::-webkit-scrollbar-track { background: transparent; }

.geo-log::-webkit-scrollbar-thumb {
    background: var(--geo-border-strong);
    border-radius: 3px;
}

.geo-log__item {
    position: relative;
    padding: 0.25rem 0 0.25rem 1.5rem;
    color: var(--geo-muted);
}

.geo-log__item::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.72rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--geo-border-strong);
}

.geo-log__item--done::before { background: var(--geo-primary, #2fe0b0); }
.geo-log__item--failed::before { background: var(--geo-critical); }

.geo-log__item--running {
    color: var(--geo-text);
    font-weight: 600;
}

.geo-log__item--running::before {
    background: var(--geo-secondary, #a78bfa);
    animation: geo-pulse 1.4s ease-in-out infinite;
}

@keyframes geo-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.7); }
}

@media (prefers-reduced-motion: reduce) {
    .geo-log__item--running::before { animation: none; }
    .geo-meter__fill { transition: none; }
    .geo-btn { transition: none; }
}

/* --- Notify / keep link --------------------------------------------------- */
.geo-notify { margin-top: var(--geo-gap); padding-top: var(--geo-gap); border-top: 1px solid var(--geo-border); }
.geo-notify__title { margin: 0 0 0.3rem; font-size: 1.05rem; }
.geo-notify__hint { margin: 0 0 0.7rem; color: var(--geo-muted); font-size: 0.9rem; }
.geo-notify__row { display: flex; flex-wrap: wrap; gap: var(--geo-gap-s); }
.geo-notify__row .geo-input { flex: 1 1 16rem; }
.geo-notify__feedback:empty { display: none; }
.geo-notify__feedback { margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--geo-primary, #2fe0b0); }
.geo-notify__feedback[data-state='error'] { color: var(--geo-critical); }
.geo-notify__done { margin: 0; color: var(--geo-primary, #2fe0b0); }
.geo-notify__privacy { margin: 0.5rem 0 0; font-size: 0.8rem; }
.geo-notify__privacy a { color: var(--geo-faint); }

/* On the finished report the block is a panel of its own rather than a
   continuation of the progress panel it sits in while the check runs. */
.geo-notify--done {
    margin-top: 2.5rem;
    padding: var(--geo-gap);
    border: 1px solid var(--geo-primary-line, var(--geo-border-strong));
    border-radius: var(--geo-radius);
    background: var(--geo-bg);
}

.geo-keep__title { margin: 0 0 0.3rem; font-size: 1.05rem; }
.geo-keep__hint { margin: 0 0 0.7rem; color: var(--geo-muted); font-size: 0.9rem; }
.geo-keep__row { display: flex; flex-wrap: wrap; gap: var(--geo-gap-s); }
.geo-keep__row .geo-input { flex: 1 1 20rem; }

/* --- Score --------------------------------------------------------------- */
.geo-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--geo-gap);
    padding: var(--geo-gap);
    border: 1px solid var(--geo-border);
    border-radius: var(--geo-radius);
    background:
        radial-gradient(28rem 14rem at 0% 0%, rgba(47, 224, 176, 0.10), transparent 70%),
        var(--geo-bg);
    margin-bottom: var(--geo-gap);
}

/* The ring is a conic gradient cut out by a mask — no image, no canvas, and it
   still prints. --geo-score is set inline as the percentage. */
.geo-score__ring {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: 8.5rem;
    height: 8.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(
        var(--geo-primary, #2fe0b0) calc(var(--geo-score) * 1%),
        var(--geo-bg-2) 0
    );
}

.geo-score__ring::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: var(--geo-bg);
}

/* The grade letter sits on the rim of the ring, so the number and the letter
   read as one mark rather than as two competing figures. */
.geo-score__grade {
    position: absolute;
    right: -0.4rem;
    bottom: -0.4rem;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 2px solid var(--geo-bg);
    background: var(--geo-primary, #2fe0b0);
    color: #04120e;
    font-family: var(--geo-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.geo-score__grade[data-grade='C'],
.geo-score__grade[data-grade='D'] { background: var(--geo-warning); color: #241a00; }
.geo-score__grade[data-grade='E'],
.geo-score__grade[data-grade='F'] { background: var(--geo-critical); color: #2a0b0b; }

.geo-score__value { position: relative; z-index: 1; text-align: center; line-height: 1.1; }
.geo-score__number { display: block; font-family: var(--geo-display); font-size: 2.6rem; font-weight: 700; }
.geo-score__of { color: var(--geo-faint); font-size: 0.85rem; }

.geo-score__body { flex: 1 1 16rem; }
.geo-score__verdict { margin: 0 0 0.9rem; font-family: var(--geo-display); font-size: 1.15rem; font-weight: 600; }

.geo-score__locked {
    margin: 0 0 0.9rem;
    padding-left: 0.8rem;
    border-left: 3px solid var(--geo-critical);
    color: var(--geo-critical);
    font-size: 0.94rem;
}

.geo-score__counts { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--geo-gap-s); margin: 0; padding: 0; list-style: none; }

/*
 * One line box, not a flex row.
 *
 * The number is set in the display face and the label in the body face. As two
 * flex items on a shared baseline, the pill grew by however much the two fonts
 * disagreed about where that baseline sits - which is why "0 kritisch" stood
 * four pixels taller than "11 Handlungsbedarf" and the three pills lined up on
 * their bottom edge instead of being the same height.
 *
 * In a line box the strut of the pill's own font decides the height. Every pill
 * is then exactly one line tall, whatever is written in it, and the digits sit
 * on the same line as the word by construction.
 */
.geo-count {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    /* The height is stated rather than derived. Padding plus a line box would
       make it depend on the metrics of both fonts - and on whatever a host
       theme does to a list item. Stated, all three pills are the same height
       whatever is written in them. */
    align-self: center;
    flex: 0 0 auto;
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--geo-border-strong);
    border-radius: var(--geo-pill);
    font-size: 0.85rem;
    /* With the leading removed, centring the two spans puts the digits and the
       word on the same line - the em boxes are the same size, so their
       baselines land together. */
    line-height: 1;
    /* The label must not wrap: a two-line pill would be taller than its
       neighbours again. Where the row runs out of room the list wraps instead. */
    white-space: nowrap;
}

.geo-count__number {
    font-family: var(--geo-display);
    font-weight: 700;
    /* Digits of one width, so 2, 26 and 45 do not shift the word next to them. */
    font-variant-numeric: tabular-nums;
}
.geo-count--critical { border-color: var(--geo-critical); color: var(--geo-critical); }
.geo-count--warning { border-color: var(--geo-warning); color: var(--geo-warning); }
.geo-count--good { border-color: var(--geo-good); color: var(--geo-good); }

/* --- Sections ------------------------------------------------------------ */
.geo-section { margin: 2.5rem 0; }
.geo-section__title { margin: 0 0 0.4rem; font-size: 1.4rem; }
.geo-section__lead { margin: 0 0 1rem; color: var(--geo-muted); }

.geo-download { display: flex; flex-wrap: wrap; align-items: center; gap: var(--geo-gap-s); margin-bottom: var(--geo-gap); }
.geo-download__hint { color: var(--geo-muted); font-size: 0.9rem; }

/* --- Actions ------------------------------------------------------------- */
.geo-actions__list { margin: 0; padding: 0; list-style: none; counter-reset: geo-action; }

.geo-action {
    display: flex;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--geo-border);
    border-left-width: 3px;
    border-radius: var(--geo-radius-s);
    background: var(--geo-bg);
    margin-bottom: 0.6rem;
}

.geo-action--critical { border-left-color: var(--geo-critical); }
.geo-action--warning { border-left-color: var(--geo-warning); }
.geo-action--notice { border-left-color: var(--geo-notice); }

.geo-action__rank {
    flex: 0 0 auto;
    font-family: var(--geo-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--geo-faint);
    min-width: 1.4em;
}

.geo-action__title { margin: 0 0 0.35rem; font-size: 1.02rem; }
.geo-action__text { margin: 0 0 0.5rem; color: var(--geo-muted); font-size: 0.94rem; }
.geo-action__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }

.geo-chip {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border: 1px solid var(--geo-border-strong);
    border-radius: var(--geo-pill);
    color: var(--geo-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.geo-chip--points { border-color: var(--geo-primary, #2fe0b0); color: var(--geo-primary, #2fe0b0); }
.geo-chip--outdated { border-color: var(--geo-critical); color: var(--geo-critical); }
.geo-chip--elts { border-color: var(--geo-warning); color: var(--geo-warning); }
.geo-chip--active { border-color: var(--geo-good); color: var(--geo-good); }

/* --- Chapter grid / tab bar ---------------------------------------------- */
/* Three columns where there is room, and fewer where there is not. The cards
   are the navigation: geo-check.js turns them into a tablist, and without it
   they stay jump links to the sections below. */
.geo-chapter-grid {
    display: grid;
    gap: var(--geo-gap-s);
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: var(--geo-gap);
}

@media (max-width: 62rem) {
    .geo-chapter-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 38rem) {
    .geo-chapter-grid { grid-template-columns: 1fr; }
}

.geo-chapter-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--geo-border);
    border-radius: var(--geo-radius);
    background: var(--geo-bg);
    color: inherit;
    text-decoration: none;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 140ms var(--geo-ease), background-color 140ms var(--geo-ease), transform 140ms var(--geo-ease);
}

.geo-chapter-card:hover {
    transform: translateY(-2px);
    border-color: var(--geo-border-strong);
    background: var(--geo-bg-2);
    text-decoration: none;
}

.geo-chapter-card:focus-visible {
    outline: 2px solid var(--geo-primary, #2fe0b0);
    outline-offset: 2px;
}

.geo-chapter-card[aria-selected='true'] {
    border-color: var(--geo-primary, #2fe0b0);
    background: var(--geo-bg-2);
}

.geo-chapter-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.geo-chapter-card__title {
    font-family: var(--geo-display);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.25;
}

.geo-chapter-card__score {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    font-family: var(--geo-display);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.geo-chapter-card__grade {
    font-size: 0.8rem;
    color: var(--geo-faint);
}

.geo-chapter-card__bar {
    display: block;
    height: 5px;
    border-radius: var(--geo-pill);
    background: var(--geo-bg-2);
    overflow: hidden;
}

.geo-chapter-card[aria-selected='true'] .geo-chapter-card__bar { background: var(--geo-bg); }
.geo-chapter-card__bar span { display: block; height: 100%; background: var(--geo-primary, #2fe0b0); }

/* The grade colours the number and the bar, so nine cards can be scanned
   without reading a single one. */
.geo-chapter-card--A .geo-chapter-card__score,
.geo-chapter-card--B .geo-chapter-card__score { color: var(--geo-good); }
.geo-chapter-card--C .geo-chapter-card__score,
.geo-chapter-card--D .geo-chapter-card__score { color: var(--geo-warning); }
.geo-chapter-card--E .geo-chapter-card__score,
.geo-chapter-card--F .geo-chapter-card__score { color: var(--geo-critical); }

.geo-chapter-card--C .geo-chapter-card__bar span,
.geo-chapter-card--D .geo-chapter-card__bar span { background: var(--geo-warning); }
.geo-chapter-card--E .geo-chapter-card__bar span,
.geo-chapter-card--F .geo-chapter-card__bar span { background: var(--geo-critical); }

.geo-chapter-card__counts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
}

.geo-chapter-card__weight { margin-left: auto; color: var(--geo-faint); }

.geo-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    padding: 0.05em 0.4em;
    border-radius: var(--geo-pill);
    font-weight: 700;
}

.geo-dot--critical { background: rgba(255, 138, 138, 0.16); color: var(--geo-critical); }
.geo-dot--warning { background: rgba(245, 194, 107, 0.16); color: var(--geo-warning); }
.geo-dot--good { background: rgba(47, 224, 176, 0.14); color: var(--geo-good); }

/* Only set once the script has taken over; without it every panel stays
   visible and the cards are jump links. */
.geo-panels [hidden] { display: none; }

/* --- Chapters ------------------------------------------------------------ */
.geo-chapter {
    padding: var(--geo-gap);
    border: 1px solid var(--geo-border);
    border-radius: var(--geo-radius);
    background: var(--geo-bg);
    margin-bottom: var(--geo-gap-s);
}

.geo-chapter__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--geo-gap-s); }
.geo-chapter__title { margin: 0; font-size: 1.15rem; }
.geo-chapter__score { font-family: var(--geo-display); white-space: nowrap; }
.geo-chapter__number { font-size: 1.5rem; font-weight: 700; }
.geo-chapter__of { color: var(--geo-faint); font-size: 0.85rem; }

.geo-chapter__bar { height: 6px; margin: 0.6rem 0 0.5rem; border-radius: var(--geo-pill); background: var(--geo-bg-2); overflow: hidden; }
.geo-chapter__fill { display: block; height: 100%; border-radius: inherit; background: var(--geo-primary, #2fe0b0); }

.geo-chapter__weight { margin: 0 0 0.5rem; color: var(--geo-faint); font-size: 0.8rem; }
.geo-chapter__intro { margin: 0 0 1rem; color: var(--geo-muted); }
.geo-chapter__empty { margin: 0; color: var(--geo-faint); }

/* --- Findings ------------------------------------------------------------ */
.geo-findings { margin: 0; padding: 0; list-style: none; }

.geo-finding { padding: 0.9rem 0; border-top: 1px solid var(--geo-border); }
.geo-finding:first-child { border-top: 0; }

.geo-finding__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem; }

.geo-finding__badge {
    flex: 0 0 auto;
    padding: 0.1rem 0.5rem;
    border-radius: var(--geo-radius-s);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.geo-finding--critical .geo-finding__badge { background: var(--geo-critical); color: #2a0b0b; }
.geo-finding--warning .geo-finding__badge { background: var(--geo-warning); color: #2a1c05; }
.geo-finding--notice .geo-finding__badge { background: var(--geo-notice); color: #071428; }
.geo-finding--good .geo-finding__badge { background: var(--geo-good); color: #04120e; }

/* The host theme sets small headings in capitals; a finding is a sentence and
   has to stay one. */
.geo-finding__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}
.geo-finding__detail { margin: 0.4rem 0 0; color: var(--geo-muted); font-size: 0.94rem; }

.geo-finding__recommendation {
    margin-top: 0.55rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--geo-radius-s);
    background: var(--geo-bg-2);
}

.geo-finding__recommendation p { margin: 0.2rem 0 0; font-size: 0.94rem; }

.geo-finding__label {
    display: block;
    font-family: var(--geo-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--geo-faint);
}

.geo-finding__evidence { margin-top: 0.55rem; font-size: 0.86rem; }
.geo-finding__evidence summary { cursor: pointer; color: var(--geo-muted); }
.geo-finding__evidence ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.geo-finding__evidence code { font-family: var(--geo-mono); word-break: break-all; }

.geo-finding__sources { margin: 0.55rem 0 0; font-size: 0.82rem; }
.geo-finding__sources a { color: var(--geo-muted); margin-right: 0.6rem; word-break: break-all; }

/* --- Tables -------------------------------------------------------------- */
.geo-table-wrap { overflow-x: auto; }

.geo-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.geo-table th,
.geo-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--geo-border); text-align: left; vertical-align: top; }
.geo-table th { color: var(--geo-faint); font-family: var(--geo-display); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.geo-table__num { text-align: right; white-space: nowrap; }

/* `anywhere` rather than `break-all`: a URL breaks where it has to and stays
   whole where it can, instead of being chopped mid-word on every line. */
.geo-table__url code {
    font-family: var(--geo-mono);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
    word-break: normal;
}

/*
 * On a narrow screen each row becomes a card.
 *
 * Four columns on a phone leave the URL column about two characters wide, and
 * the scroll container around the table only hides that - a reader has to
 * discover the sideways scroll, and then loses the row they were reading. So
 * the row is stacked instead: the URL is the heading of the card, the three
 * values sit under it as labelled pairs.
 *
 * The labels come from `data-label` in the markup, because the column headers
 * are not on screen any more. The headers themselves stay in the document,
 * hidden the accessible way rather than with `display: none`, so a screen
 * reader still announces them.
 */
@media (max-width: 40rem) {
    .geo-table-wrap { overflow-x: visible; }

    .geo-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .geo-table,
    .geo-table tbody,
    .geo-table tr,
    .geo-table td {
        display: block;
        width: auto;
    }

    .geo-table tr {
        padding: 0.75rem 0.85rem;
        border: 1px solid var(--geo-border);
        border-radius: var(--geo-radius-s);
        background: var(--geo-bg);
    }

    .geo-table tr + tr { margin-top: 0.55rem; }

    .geo-table td {
        padding: 0;
        border: 0;
    }

    /* The URL: the card's heading, on its own line, allowed to wrap. The
       selector carries the element so it outweighs `.geo-table td` above
       without reaching for !important. */
    .geo-table td.geo-table__url {
        padding-bottom: 0.55rem;
        border-bottom: 1px solid var(--geo-border);
    }

    /* Every other cell: the label on the left, the value on the right. */
    .geo-table td + td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 0.9rem;
        margin-top: 0.4rem;
        text-align: right;
        /* A flex item will not shrink below its content by default, so a long
           page title pushed the card past the edge of the screen instead of
           wrapping inside it. */
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .geo-table td + td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--geo-faint);
        font-family: var(--geo-display);
        font-size: 0.75rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
}

/* --- Platform / method --------------------------------------------------- */
.geo-platform__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin: 0 0 0.3rem; }
.geo-platform__name { font-family: var(--geo-display); font-size: 1.1rem; font-weight: 700; }
.geo-platform__version { color: var(--geo-muted); }
.geo-platform__source { margin: 0; color: var(--geo-faint); font-size: 0.85rem; }
.geo-method p { color: var(--geo-muted); }

/* --- Teaser --------------------------------------------------------------
 * The compact form for the middle of a page. Same three questions as the full
 * form, none of the explaining - which is what keeps it to about a third of
 * the height.
 */
.geo-teaser {
    padding: var(--geo-gap);
    border: 1px solid var(--geo-border);
    border-left: 3px solid var(--geo-primary, #2fe0b0);
    border-radius: var(--geo-radius);
    background:
        radial-gradient(26rem 13rem at 0% 0%, rgba(47, 224, 176, 0.09), transparent 70%),
        var(--geo-bg);
}

.geo-teaser__intro { margin-bottom: 1.1rem; }

.geo-teaser__title {
    margin: 0 0 0.3rem;
    font-family: var(--geo-display);
    font-size: 1.25rem;
    line-height: 1.25;
}

.geo-teaser__text {
    margin: 0;
    max-width: 60ch;
    color: var(--geo-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

/* Address and e-mail side by side; the address gets the wider share because a
   URL is the longer thing to read back. */
.geo-teaser__fields {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.geo-teaser__field { margin: 0; }

.geo-teaser__label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--geo-faint);
    font-family: var(--geo-display);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.geo-teaser__fields .geo-input { min-height: 2.6rem; }

/* The depth and the button share the last line. */
.geo-teaser__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.geo-teaser__depth {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    border: 0;
}

/*
 * Two buttons rather than the full form's two cards. The radio is off screen
 * instead of `display: none`, so it keeps its place in the tab order and can
 * still be read out; the label carries the appearance and picks up both the
 * checked and the focused state through :has().
 */
.geo-teaser__depth-option {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--geo-border-strong);
    border-radius: var(--geo-pill);
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 140ms var(--geo-ease), background-color 140ms var(--geo-ease);
}

.geo-teaser__depth-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.geo-teaser__depth-option:hover { border-color: var(--geo-primary, #2fe0b0); }

.geo-teaser__depth-option:has(.geo-teaser__depth-input:checked) {
    border-color: var(--geo-primary, #2fe0b0);
    background: rgba(47, 224, 176, 0.12);
}

.geo-teaser__depth-option:has(.geo-teaser__depth-input:focus-visible) {
    outline: 2px solid var(--geo-primary, #2fe0b0);
    outline-offset: 2px;
}

.geo-teaser__depth-title { font-family: var(--geo-display); font-weight: 600; }
.geo-teaser__depth-estimate { color: var(--geo-faint); font-size: 0.78rem; }

.geo-teaser__submit {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* One column once the two fields no longer fit, and the button takes the full
   width rather than sitting alone in a corner. */
@media (max-width: 34rem) {
    .geo-teaser__fields { grid-template-columns: 1fr; }
    .geo-teaser__bottom { flex-direction: column; align-items: stretch; }
    .geo-teaser__depth { justify-content: center; }
    .geo-teaser__submit { width: 100%; }
}

/* Only an editor ever sees this. */
.geo-teaser__hint {
    margin: 0;
    color: var(--geo-warning);
    font-size: 0.94rem;
}
