/* Public pages (#7): score card, score plate, Tafelrose, criteria, ranking and visit lists.
 * Design: branding canvas, mockup AC-V3. Tokens only (tokens.css). */

.site-header__link {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-target);
    padding: 0 var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    text-decoration: none;
}

.site-header__link:hover {
    text-decoration: underline;
}

.demo-banner {
    margin: 0;
    padding: var(--space-2) var(--page-gutter);
    background: var(--color-accent);
    color: var(--color-dark);
    font-size: var(--text-sm);
    text-align: center;
}

section {
    margin-bottom: var(--space-8);
}

.lead {
    font-size: var(--text-lg);
    max-width: 40rem;
}

.columns {
    display: grid;
    gap: var(--space-8);
}

@media (min-width: 52rem) {
    .columns {
        grid-template-columns: 1fr 1fr;
    }
}

.pill {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    line-height: 1.3;
    color: var(--color-muted);
    text-decoration: none;
}

.pill--on-dark {
    border-color: var(--color-line-on-dark);
    color: var(--color-text-on-dark);
}

/* Score plate: apricot circle with score and votes */
.score-plate {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-dark);
    text-align: center;
    line-height: 1.1;
}

.score-plate--large {
    width: 92px;
    height: 92px;
}

.score-plate--small {
    width: 76px;
    height: 76px;
}

.score-plate__value {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xl);
}

.score-plate--small .score-plate__value {
    font-size: var(--text-lg);
}

.score-plate__votes {
    font-size: var(--text-xs);
    padding: 0 var(--space-1);
}

/* Plate avatar (#110): generated SVG per restaurant, decorative; sits on paper and on petrol */
.plate-avatar {
    flex-shrink: 0;
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    filter: drop-shadow(0 1px 1.5px rgb(16 69 79 / 0.18));
}

.plate-avatar--large {
    width: 88px;
    height: 88px;
}

.score-card__named {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-width: 0;
}

@media (max-width: 30rem) {
    .score-card__named .plate-avatar--large {
        width: 64px;
        height: 64px;
    }
}

.plate-samples {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.plate-samples .plate-avatar {
    width: 56px;
    height: 56px;
}

.plate-admin__current {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.plate-admin__current .plate-avatar {
    width: 120px;
    height: 120px;
}

.plate-admin__current p {
    flex: 1;
    min-width: 12rem;
    margin: 0;
}

.plate-admin__choices fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-4) 0;
    padding: 0;
    border: 0;
}

.plate-admin__choices legend {
    margin-bottom: var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.plate-admin__choice {
    position: relative;
    display: block;
    padding: var(--space-1);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
}

.plate-admin__choice input {
    position: absolute;
    opacity: 0;
}

.plate-admin__choice:has(input:checked) {
    border-color: var(--color-dark);
}

.plate-admin__choice:has(input:focus-visible) {
    box-shadow: var(--focus-ring);
}

.plate-admin__choice .plate-avatar {
    width: 72px;
    height: 72px;
}

/* Score card: petrol block at the top of restaurant and visit pages */
.score-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.score-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
}

.score-card__meta {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-muted-on-dark);
}

.score-card__title {
    margin: 0 0 var(--space-2);
    color: var(--color-text-on-dark);
}

.score-card__title a {
    color: inherit;
}

.score-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
}

.score-card__pills:empty {
    display: none;
}

.score-card :focus-visible {
    box-shadow: 0 0 0 3px var(--color-dark), 0 0 0 5px var(--color-accent);
}

/* Start page: today's or the next visit, above the ranking (#28) */
.upcoming {
    margin-bottom: var(--space-6);
}

/* Tafelrose */
.rose-block {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.rose {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.rose__track {
    fill: var(--color-soft);
}

.rose__value {
    fill: var(--color-dark);
}

/* Hovered or tapped segment (#80); js/rose.js sets .is-active and shows .rose-tip */
.rose__segment {
    cursor: default;
}

.rose__segment:hover .rose__track,
.rose__segment.is-active .rose__track {
    fill: var(--color-accent);
}

.rose-tip {
    position: fixed;
    z-index: 10;
    max-width: 16rem;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
    font-size: var(--text-sm);
    pointer-events: none;
}

/* Criteria with bars */
.criteria {
    list-style: none;
    margin: 0;
    padding: 0;
}

.criteria__line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-1) var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.criteria__value {
    color: var(--color-muted);
    font-size: var(--text-sm);
    text-align: right;
}

.criteria__bar {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--color-soft);
    overflow: hidden;
}

.criteria__bar span {
    display: block;
    height: 100%;
    border-radius: var(--radius-pill);
    background: var(--color-dark);
}

/* Ranking */
.ranking,
.visit-list,
.dishes {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
}

.ranking__item,
.visit-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.ranking__item--closed {
    opacity: 0.75;
}

.ranking__rank {
    width: 2ch;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
    text-align: right;
}

.ranking__name,
.visit-list__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: var(--touch-target);
    justify-content: center;
    text-decoration: none;
}

.ranking__name > span:first-child,
.visit-list__name {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-lg);
    line-height: 1.2;
}

.ranking__name:hover > span:first-child,
.visit-list__link:hover .visit-list__name,
.visit-list__link:hover .visit-list__date {
    text-decoration: underline;
}

.ranking .pill {
    margin-left: var(--space-2);
}

/* Ranking with Tafelrose (#22): place 1 as petrol card, places 2-3 as two cards, the rest as rows */
.rose-icon {
    flex-shrink: 0;
}

.rose-icon--lg {
    width: 128px;
    height: 128px;
}

.rose-icon--md {
    width: 84px;
    height: 84px;
}

.rose-icon--sm {
    width: 40px;
    height: 40px;
}

.rose-icon__track {
    fill: var(--color-soft);
}

.rose-icon__value {
    fill: var(--color-dark);
}

.podium {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.podium__first,
.podium__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.podium__first {
    gap: var(--space-3);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.podium__first:hover {
    background: var(--color-dark-hover);
}

.podium__first:focus-visible {
    box-shadow: 0 0 0 3px var(--color-ground), 0 0 0 5px var(--color-accent);
}

.podium__first .rose-icon__track {
    fill: var(--color-dark-soft);
}

.podium__first .rose-icon__value {
    fill: var(--color-accent);
}

.podium__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-2);
}

.podium__place {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.podium__first .podium__place,
.podium__first .podium__meta,
.podium__strengths {
    color: var(--color-muted-on-dark);
}

.podium__body {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.podium__text {
    flex: 1;
    min-width: 9rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
}

.podium__text .score-plate {
    margin-top: var(--space-2);
}

.podium__first .ranked-name {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
}

.podium__first:hover .ranked-name,
.podium__card:hover .ranked-name {
    text-decoration: underline;
}

.podium__meta {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.podium__strengths {
    font-size: var(--text-sm);
}

.podium__pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.podium__card {
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-soft);
    color: var(--color-dark);
    text-align: center;
}

.podium__card .rose-icon__track {
    fill: var(--color-ground);
}

.podium__card .ranked-name {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.ranking--roses .ranking__item {
    gap: var(--space-2) var(--space-3);
}

.badge-new {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 0 var(--space-2);
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--color-dark);
    font-family: var(--font-text);
    font-weight: var(--weight-text-strong);
    font-size: var(--text-xs);
    line-height: 1.6;
    vertical-align: middle;
}

@media (min-width: 52rem) {
    .podium {
        display: grid;
        grid-template-columns: 3fr 2fr;
        align-items: stretch;
    }
}

.visit-list__date {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.visit-list__date--main {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-lg);
    color: var(--color-dark);
}

.visit-list__marker {
    padding: var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--color-line);
    font-size: var(--text-sm);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    color: var(--color-muted);
}

/* Visits on the restaurant page (#29): <details> per visit, summary line when closed */
.visit-entries {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
}

.visit-entry {
    border-bottom: var(--border-width) solid var(--color-line);
}

.visit-entry__summary {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    min-height: var(--touch-target);
    cursor: pointer;
    list-style: none;
}

.visit-entry__summary::-webkit-details-marker {
    display: none;
}

.visit-entry__summary::before {
    content: "▸";
    flex-shrink: 0;
    width: 1ch;
    color: var(--color-muted);
    line-height: 1.6;
}

details[open] > .visit-entry__summary::before {
    content: "▾";
}

.visit-entry__head {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.visit-entry__date {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-lg);
    line-height: 1.2;
}

.visit-entry__summary:hover .visit-entry__date {
    text-decoration: underline;
}

.visit-entry__meta {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

/* The dot sticks to the item before it, so a wrapped line never starts with one. */
.visit-entry__meta > span + span::before {
    content: "\00a0· ";
}

.visit-entry__teaser {
    font-size: var(--text-sm);
    overflow-wrap: anywhere;
}

details[open] .visit-entry__teaser {
    display: none;
}

.visit-entry__score {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.visit-entry__body {
    padding: 0 0 var(--space-4) calc(1ch + var(--space-3));
}

.visit-entry__body h3 {
    margin: var(--space-4) 0 var(--space-1);
    font-size: var(--text-md);
}

.visit-entry__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

/* Change against the visit before: signed number with a tooltip; no colour coding */
.delta {
    font-size: var(--text-sm);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    color: var(--color-muted);
    white-space: nowrap;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-3);
    margin: var(--space-4) 0 var(--space-6);
}

.filters label {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.filters select {
    min-height: var(--touch-target);
    padding: 0 var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-ground);
    color: var(--color-dark);
    font: inherit;
    font-size: var(--text-md);
}

.filters .filters__check {
    flex-direction: row;
    align-items: center;
    min-height: var(--touch-target);
    gap: var(--space-2);
    color: var(--color-dark);
    font-size: var(--text-md);
}

.filters input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--color-dark);
}

/* Visit page */
.dishes__item {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.dishes__item {
    align-items: center;
}

.dishes__photo {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-soft);
}

.dishes__name {
    flex: 1;
}

.dishes__price {
    white-space: nowrap;
    color: var(--color-muted);
}

.legacy-post {
    max-width: 42rem;
}

.legacy-post img {
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-2) 0;
}

/* #97: one look for all photos in post text. Landscape spans the text width; portrait is capped in height so it
   does not tower over the text. width/height attributes keep the aspect ratio, so nothing jumps while loading. */
.legacy-post img.photo--landscape {
    display: block;
    width: 100%;
    max-width: 42rem;
}

.legacy-post img.photo--portrait {
    display: block;
    width: auto;
    max-width: 100%;
    height: min(34rem, 75vh);
}

.legacy-post table {
    border-collapse: collapse;
}

.legacy-post td,
.legacy-post th {
    padding: var(--space-1) var(--space-2);
    border-bottom: var(--border-width) solid var(--color-line);
}

/* Comments */
.comments {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
}

.comments__item {
    padding: var(--space-3) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.comments__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    margin: 0 0 var(--space-1);
    font-size: var(--text-sm);
}

.comments__meta strong {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.comments__body {
    margin: 0;
    white-space: pre-line;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: 40rem;
    margin-bottom: var(--space-8);
}

.comment-form label {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.comment-form textarea {
    width: 100%;
    padding: var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-ground);
    color: var(--color-dark);
    font: inherit;
    resize: vertical;
}

.comment-form textarea[aria-invalid="true"] {
    border-color: var(--color-dark);
    border-width: 2px;
}

.comment-form .button {
    align-self: flex-start;
}

.form-error {
    margin: 0;
    font-weight: var(--weight-text-strong);
    color: var(--color-dark);
}

/* Map (#30): markers coloured by score bucket; shape and border carry the status, not colour alone */
.map {
    height: min(70vh, 560px);
    margin: 0 0 var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-soft);
    z-index: 0;
}

.map-marker {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--color-dark);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: 11px;
    line-height: 1;
    color: var(--color-dark);
    background: var(--color-ground);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
}

.map-marker--b1 { background: #F6E3D0; }
.map-marker--b2 { background: #F2C9A0; }
.map-marker--b3 { background: #F2B279; }
.map-marker--b4 { background: #4F8086; color: #FFFFFF; }
.map-marker--b5 { background: #10454F; color: #FFFFFF; border-color: #F2B279; }

.map-marker--few { border-style: dotted; }
.map-marker--tenant { border-style: dashed; border-width: 3px; }
.map-marker--unrated { background: var(--color-ground); border-style: solid; border-width: 2px; }
.map-marker--closed {
    border-radius: var(--radius-sm);
    background: #D9D6CE;
    color: #55615F;
    text-decoration: line-through;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
}

.map-legend li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.map-legend .map-marker {
    width: 18px;
    height: 18px;
}

.map-list {
    margin: 0 0 var(--space-6);
}

.map-list__count {
    margin: 0 0 var(--space-4);
    font-size: var(--text-lg);
}

.map-list__item[hidden] {
    display: none;
}

.map-popup {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-text);
}

.map-popup .ranking__name > span:first-child {
    font-size: var(--text-md);
}

/* Comment moderation (#41) */
.comments__item--pending .comments__body {
    color: var(--color-muted);
}

.admin-sections {
    padding-left: var(--space-5);
}

.admin-sections li {
    margin-bottom: var(--space-2);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

/* Restaurant admin (#38) */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.admin-table th,
.admin-table td {
    padding: var(--space-2);
    border-bottom: var(--border-width) solid var(--color-line);
    text-align: left;
    vertical-align: top;
}

.admin-table__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 32rem;
    margin-bottom: var(--space-8);
}

.admin-form label {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.admin-form input,
.filters input[type="search"] {
    min-height: var(--touch-target);
    padding: 0 var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    font: inherit;
    color: inherit;
    background: var(--color-ground);
}

.notice {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--color-soft);
}

/* Criteria admin and public criteria page (#18) */
.admin-fieldset {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0 0 var(--space-4);
    padding: var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
}

.admin-form textarea,
.admin-form select {
    padding: var(--space-2) var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    font: inherit;
    color: inherit;
    background: var(--color-ground);
}

.admin-form .admin-number {
    width: 5em;
}

.criteria-version {
    margin-bottom: var(--space-8);
}

/* Restaurant timeline (#42): a rail on the left, one node per visit (its score) or event (a diamond),
   grouped by year with a sticky year header. Visits before a Pächterwechsel are archive: dashed rail, outlined node. */
.timeline {
    --rail-x: 1.5rem;
    --rail-gutter: 3.5rem;
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
}

.timeline-year__head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-3);
    margin: 0;
    padding: var(--space-2) 0 var(--space-2) var(--rail-gutter);
    background: var(--color-ground);
    border-bottom: var(--border-width) solid var(--color-line);
    font-size: var(--text-md);
}

.timeline-year__year {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
}

.timeline-year__sub {
    font-family: var(--font-text);
    font-weight: var(--weight-text);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.timeline-year__sub > span + span::before {
    content: "\00a0· ";
}

.timeline .visit-entries {
    margin: 0;
}

.timeline .visit-entry,
.timeline-event {
    position: relative;
    padding-left: var(--rail-gutter);
    border-bottom: 0;
    /* the sticky year header must not cover the entry a link jumps to */
    scroll-margin-top: 3.5rem;
}

.timeline .visit-entry::before,
.timeline-event::before {
    content: "";
    position: absolute;
    left: calc(var(--rail-x) - 1px);
    top: 0;
    bottom: 0;
    border-left: 2px solid var(--color-dark);
}

.timeline .visit-entry--archived::before {
    border-left-style: dashed;
    border-left-color: var(--color-muted);
}

/* the rail ends at a Pächterwechsel; what follows is archive */
.timeline-event--cut::before {
    bottom: auto;
    height: 1.4rem;
}

.timeline-node {
    position: absolute;
    z-index: 1;
    left: calc(var(--rail-x) - 1.375rem);
    top: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--color-dark);
    color: var(--color-text-on-dark);
    box-shadow: 0 0 0 4px var(--color-ground);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xs);
}

.visit-entry--archived > .timeline-node,
.timeline-node--unrated {
    background: var(--color-ground);
    color: var(--color-muted);
    border: 2px dashed var(--color-muted);
}

.timeline-node--event {
    left: calc(var(--rail-x) - 0.5rem);
    top: var(--space-4);
    width: 1rem;
    height: 1rem;
    border-radius: 0;
    background: var(--color-accent);
    border: 2px solid var(--color-dark);
    transform: rotate(45deg);
}

.timeline .visit-entry__summary {
    min-height: 3.75rem;
}

.timeline .visit-entry__body {
    padding-left: 0;
}

.visit-entry__votes {
    font-size: var(--text-xs);
    color: var(--color-muted);
    white-space: nowrap;
}

.timeline .visit-entry__score {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.timeline-event__box {
    margin: var(--space-2) 0 var(--space-4);
    padding: var(--space-2) 0;
}

.timeline-event__box p {
    margin: 0 0 var(--space-1);
}

.timeline-event__box p:last-child {
    margin-bottom: 0;
}

.timeline-event--cut .timeline-event__box {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.timeline-event__head {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    align-items: baseline;
}

.timeline-event__head strong {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.timeline-event--pending {
    opacity: 0.75;
}

/* Turning photos (#94): one card per photo, the picture shown whole (not cropped) so its orientation is clear */
.photo-turn {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: var(--space-4);
}

.photo-turn__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    scroll-margin-top: var(--space-4);
}

.photo-turn__item img {
    width: 100%;
    height: 12rem;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--color-soft);
}

.photo-turn__caption {
    font-size: var(--text-sm);
    overflow-wrap: anywhere;
}

.photo-turn__buttons {
    display: flex;
    gap: var(--space-2);
}

.photo-turn__buttons form {
    flex: 1;
}

.photo-turn__buttons .button {
    box-sizing: border-box;
    width: 100%;
    justify-content: center;
    font-size: var(--text-lg);
}

/* Small timeline on a visit page (#103): same rail as the restaurant timeline, small nodes, this visit apricot */
.mini-timeline {
    margin: 0 0 var(--space-6);
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.mini-timeline__title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-md);
}

.mini-timeline__list {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
}

.mini-timeline__row {
    position: relative;
    padding-left: var(--space-6);
}

.mini-timeline__row::before {
    content: "";
    position: absolute;
    left: calc(0.625rem - 1px);
    top: 0;
    bottom: 0;
    border-left: 2px solid var(--color-dark);
}

.mini-timeline__row:first-child::before {
    top: 50%;
}

.mini-timeline__row:last-child::before {
    bottom: 50%;
}

.mini-timeline__row--archived::before {
    border-left-style: dashed;
    border-left-color: var(--color-muted);
}

.mini-timeline__node {
    position: absolute;
    z-index: 1;
    left: 0.25rem;
    top: 50%;
    box-sizing: border-box;
    width: 0.75rem;
    height: 0.75rem;
    margin-top: -0.375rem;
    border-radius: 50%;
    background: var(--color-dark);
}

.mini-timeline__row--archived .mini-timeline__node {
    background: var(--color-soft);
    border: 2px dashed var(--color-muted);
}

.mini-timeline__row--current .mini-timeline__node {
    left: 0.0625rem;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: -0.5625rem;
    background: var(--color-accent);
    border: 2px solid var(--color-dark);
}

.mini-timeline__row--event .mini-timeline__node {
    border-radius: 0;
    background: var(--color-accent);
    border: 2px solid var(--color-dark);
    transform: rotate(45deg);
}

.mini-timeline__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--touch-target);
}

.mini-timeline__row--current .mini-timeline__link {
    font-weight: var(--weight-text-strong);
}

.mini-timeline__score {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    white-space: nowrap;
}

.mini-timeline__event {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 var(--space-3);
    min-height: var(--touch-target);
    padding: var(--space-2) 0;
    box-sizing: border-box;
    font-size: var(--text-sm);
}

.mini-timeline__all {
    box-sizing: border-box;
    width: 100%;
    justify-content: center;
}

/* Score strip above the timeline (#42): one dot per rated visit, oldest left */
.score-strip {
    margin: 0 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.score-strip__caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
}

.score-strip__title {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
}

.score-strip__plot {
    position: relative;
    height: 5.5rem;
    margin: var(--space-6) var(--space-4) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.score-strip__cut {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 2px dashed var(--color-dark);
}

.score-strip__point {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target);
    height: var(--touch-target);
    transform: translate(-50%, 50%);
}

.score-strip__value {
    position: absolute;
    bottom: calc(50% + 0.6rem);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xs);
    line-height: 1;
    white-space: nowrap;
}

.score-strip__point::after {
    content: "";
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background: var(--color-dark);
}

.score-strip__point--archived::after {
    box-sizing: border-box;
    background: var(--color-soft);
    border: 2px dashed var(--color-muted);
}

.score-strip__point:hover::after,
.score-strip__point:focus-visible::after {
    box-shadow: 0 0 0 4px var(--color-accent);
}

.score-strip__axis {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: var(--space-1) 0 0;
    font-size: var(--text-xs);
    color: var(--color-muted);
}

.score-strip__cut-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.club-events {
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.club-events h2 {
    margin-top: 0;
}

.club-events__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.club-events__list li {
    display: flex;
    flex-direction: column;
}

/* Member area navigation (#51): one row of 44 px targets, scrolls sideways on narrow phones */
.member-nav {
    background: var(--color-soft);
}

.member-nav__inner {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
    overflow-x: auto;
}

.member-nav a,
.member-nav button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: var(--touch-target);
    padding: 0 var(--space-3);
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-md);
    color: var(--color-dark);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.member-nav a:hover,
.member-nav button:hover {
    text-decoration: underline;
}

.member-nav a[aria-current="page"] {
    border-bottom-color: var(--color-dark);
    font-weight: var(--weight-display);
}

.member-nav__new span[aria-hidden] {
    font-weight: var(--weight-display);
}

.member-nav__logout {
    margin: 0 0 0 auto;
}

.member-nav__logout button {
    color: var(--color-muted);
}

/* New entry (#8): search results and similar restaurants */
.new-entry-list {
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
}

.new-entry-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 var(--space-2);
    min-height: var(--touch-target);
    padding: var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.admin-form .new-entry-confirm {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--touch-target);
}

.admin-form .new-entry-confirm input {
    min-height: auto;
    width: 1.25rem;
    height: 1.25rem;
}

/* Capture wizard (#8): steps, dishes, one criterion per screen with large choices */
.capture-steps {
    display: flex;
    gap: var(--space-1);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
    counter-reset: step;
    font-size: var(--text-sm);
}

.capture-steps li {
    flex: 1;
    counter-increment: step;
    border-bottom: 3px solid var(--color-line);
}

.capture-steps li[aria-current="step"] {
    border-bottom-color: var(--color-dark);
    font-weight: var(--weight-text-strong);
}

.capture-steps a,
.capture-steps span {
    display: flex;
    align-items: center;
    min-height: var(--touch-target);
}

.capture-steps a::before,
.capture-steps span::before {
    content: counter(step) ". ";
    white-space: pre;
}

.capture-dishes {
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
}

.capture-dishes li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.capture-dishes img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.capture-dishes__name {
    flex: 1;
    min-width: 8rem;
}

.capture-dishes form {
    margin: 0;
}

.address address {
    display: flex;
    flex-direction: column;
    font-style: normal;
}

.address__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.pin-map {
    height: 16rem;
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
}

.pin-map[hidden] {
    display: none;
}

.rate__progress {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    max-width: 32rem;
}

.rate__progress progress {
    width: 100%;
    height: 0.5rem;
    accent-color: var(--color-dark);
}

.rate__options {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: 32rem;
    margin: 0 0 var(--space-4);
    padding: 0;
    border: 0;
}

.rate__options legend {
    margin-bottom: var(--space-3);
    padding: 0;
}

.rate__options legend h1 {
    margin: 0;
}

.rate__option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: calc(var(--touch-target) + var(--space-3));
    padding: var(--space-2) var(--space-4);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-md);
    background: var(--color-ground);
    color: var(--color-text);
    font: inherit;
    font-size: var(--text-lg);
    text-align: left;
    cursor: pointer;
}

.rate__option:hover {
    background: var(--color-soft);
}

.rate__option--selected {
    border: 2px solid var(--color-dark);
    background: var(--color-soft);
    font-weight: var(--weight-text-strong);
}

.rate__stars {
    min-width: 6.5em;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

.rate__nav {
    display: flex;
    gap: var(--space-5);
}

.rate__nav a {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-target);
}

.rate-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2) var(--space-4);
    max-width: 32rem;
}

.rate-summary dt,
.rate-summary dd {
    margin: 0;
    padding-bottom: var(--space-2);
    border-bottom: var(--border-width) solid var(--color-line);
}

.rate-summary dd {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0 var(--space-3);
}

.ratings-table {
    width: 100%;
    border-collapse: collapse;
}

.ratings-table th,
.ratings-table td {
    padding: var(--space-2) var(--space-2) var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--color-line);
    text-align: left;
    vertical-align: baseline;
}

.ratings-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Facts (#55): start page highlight, facts page blocks and bars. Bars: one hue, value-labelled, no chart library */
.highlight {
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    border-left: 6px solid var(--color-accent);
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.highlight__kicker {
    margin: 0 0 var(--space-1);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.highlight__text {
    margin: 0 0 var(--space-3);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
    line-height: var(--leading-tight);
}

.highlight__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-4);
    margin: 0;
}

.highlight__links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-target);
}

.facts {
    display: grid;
    gap: var(--space-8);
    margin-top: var(--space-6);
}

@media (min-width: 52rem) {
    .facts {
        grid-template-columns: 1fr 1fr;
    }
}

.fact h2 {
    margin-bottom: var(--space-1);
}

.fact-bars {
    display: grid;
    grid-template-columns: minmax(4rem, max-content) 1fr max-content;
    gap: var(--space-2) var(--space-3);
    align-items: center;
    margin: var(--space-3) 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
}

.fact-bars li {
    display: contents;
}

.fact-bars__track {
    height: 12px;
    background: var(--color-line);
    border-radius: 0 4px 4px 0;
}

.fact-bars__fill {
    display: block;
    height: 100%;
    background: var(--color-dark);
    border-radius: 0 4px 4px 0;
}

.fact-bars__value {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.fact-rows {
    margin: var(--space-3) 0;
}

.fact-rows > div {
    padding: var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.fact-rows dt {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.fact-rows dd {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-2);
    margin: 0;
}

.fact-method summary {
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.admin-form--wide {
    max-width: 44rem;
}

/* Privacy policy (#63): long legal prose, kept to a readable line length */
.legal {
    max-width: 44rem;
}

/* "Datenschutzerklärung" is wider than a 390 px phone at --text-2xl */
.legal h1 {
    hyphens: auto;
    overflow-wrap: break-word;
}

.legal section {
    margin-top: var(--space-8);
}

.legal h2 {
    font-size: var(--text-lg);
}

.legal h3 {
    margin-top: var(--space-5);
    font-size: var(--text-md);
}

.legal ul {
    margin: 0 0 var(--space-4);
    padding-left: var(--space-5);
}

.legal li + li {
    margin-top: var(--space-1);
}

.legal address {
    margin: 0 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-left: 3px solid var(--color-accent);
    background: var(--color-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: normal;
}

.legal code {
    font-size: 0.9em;
}

.legal__summary {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.legal__summary ul {
    margin-bottom: 0;
}

.legal__binding {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.legal__list {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) 1fr;
    gap: var(--space-2) var(--space-4);
    margin: 0 0 var(--space-4);
}

.legal__list dt {
    font-weight: var(--weight-text-strong);
}

.legal__list dd {
    margin: 0;
}

@media (max-width: 30rem) {
    .legal__list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .legal__list dd {
        margin-bottom: var(--space-3);
    }
}

/* Lunches (#60): list, guest picker, answer buttons */
.lunch-list {
    margin: 0 0 var(--space-6);
    padding: 0;
    list-style: none;
}

.lunch-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-1) var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.lunch-list a {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
}

.lunch-list__item--cancelled a,
.lunch-list__item--cancelled > span:not(.pill) {
    text-decoration: line-through;
    color: var(--color-muted);
}

.lunch-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.guest-picker {
    margin: 0 0 var(--space-4);
    padding: 0;
    border: 0;
}

.guest-picker legend {
    margin-bottom: var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
}

.admin-form .guest-picker__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--touch-target);
}

.admin-form .guest-picker__item input {
    width: 1.25rem;
    height: 1.25rem;
    min-height: 0;
    padding: 0;
    accent-color: var(--color-dark);
}

.lunch-answer__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.invitation .button {
    min-width: 12rem;
}

.invitation__confirm {
    margin-bottom: var(--space-4);
}

/* Member admin (#68) */
.admin-table__row--off td {
    color: var(--color-muted);
}

.admin-form label.checkbox {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
}

/* Help pages (#70): processes as a vertical flow of numbered steps, coloured by who does the step. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.help-legend ul,
.help-flow,
.help-toc ol {
    margin: 0;
    padding: 0;
}

.help-legend ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    margin-bottom: var(--space-6);
}

.help-toc {
    margin-bottom: var(--space-8);
}

.help-toc ol {
    padding-left: var(--space-5);
}

.help-section {
    margin-bottom: var(--space-12);
    scroll-margin-top: var(--space-8);
}

.help-flow {
    list-style: none;
    counter-reset: help-step;
    max-width: 40rem;
    margin: var(--space-4) 0;
}

.help-step {
    position: relative;
    counter-increment: help-step;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 2.25rem);
    border: var(--border-width) solid var(--color-line);
    border-left: 6px solid var(--help-actor, var(--color-line));
    border-radius: var(--radius-md);
    background: var(--color-ground);
}

.help-step::before {
    content: counter(help-step);
    position: absolute;
    left: var(--space-3);
    top: var(--space-3);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-pill);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-sm);
    line-height: 1.75rem;
    text-align: center;
}

/* Connector: a short line with an arrow head between two steps. */
.help-step + .help-step {
    margin-top: var(--space-6);
}

.help-step + .help-step::after {
    content: "↓";
    position: absolute;
    left: var(--space-3);
    top: calc(-1 * var(--space-6));
    width: 1.75rem;
    height: var(--space-6);
    color: var(--color-dark);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    line-height: var(--space-6);
    text-align: center;
}

.help-step__actor {
    align-self: flex-start;
    padding: 0 var(--space-2);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    line-height: 1.6;
    border: var(--border-width) solid transparent;
}

.help-step__text {
    font-size: var(--text-md);
}

.help-step--member, .help-actor--member { --help-actor: var(--color-dark); }
.help-step--admin, .help-actor--admin { --help-actor: var(--color-accent); }
.help-step--app, .help-actor--app { --help-actor: var(--color-soft); }
.help-step--mail, .help-actor--mail { --help-actor: var(--color-line-on-dark); }
.help-step--wordpress, .help-actor--wordpress { --help-actor: var(--color-muted); }
.help-step--pocket-id, .help-actor--pocket-id { --help-actor: var(--color-dark-hover); }

.help-actor--member { background: var(--color-dark); color: var(--color-text-on-dark); }
.help-actor--admin { background: var(--color-accent); color: var(--color-dark); }
.help-actor--app { background: var(--color-soft); color: var(--color-dark); }
.help-actor--mail { background: var(--color-ground); color: var(--color-dark); border: var(--border-width) dashed var(--color-dark); }
.help-actor--wordpress { background: var(--color-ground); color: var(--color-muted); border-color: var(--color-muted); }
.help-actor--pocket-id { background: var(--color-ground); color: var(--color-dark); border-color: var(--color-dark); }

.help-notes {
    max-width: 40rem;
    padding-left: var(--space-5);
    color: var(--color-muted);
}

.help-notes li + li {
    margin-top: var(--space-2);
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
}

.help-link > span[aria-hidden] {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: var(--border-width) solid currentColor;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xs);
    line-height: calc(1.25rem - 2px);
    text-align: center;
}

/* Type-to-filter (#71): combo.js puts a text field and a list over a <select data-combo>, which stays in the form. */
.combo {
    position: relative;
}

.combo__input {
    width: 100%;
}

.combo__native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.combo__list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + var(--space-1));
    max-height: 18rem;
    overflow-y: auto;
    margin: 0;
    padding: var(--space-1) 0;
    list-style: none;
    background: var(--color-ground);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 20px rgb(16 69 79 / 0.15);
}

.combo__option,
.combo__info {
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
}

.combo__option {
    cursor: pointer;
}

.combo__option:hover,
.combo__option--active {
    background: var(--color-soft);
}

.combo__option[aria-selected="true"] {
    font-weight: var(--weight-text-strong);
}

.combo__info {
    color: var(--color-muted);
    font-size: var(--text-sm);
}

.filter-list__input {
    width: 100%;
    max-width: 24rem;
    margin-bottom: var(--space-3);
}

/* Items hidden by the filter; their own display rule (flex) would otherwise win over [hidden]. */
[data-filter-item][hidden] {
    display: none;
}

/* The filter field looks like the other inputs wherever it sits (ranking filters, admin forms). */
.combo__input,
.filter-list__input {
    min-height: var(--touch-target);
    padding: 0 var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    font: inherit;
    color: inherit;
    background: var(--color-ground);
}

/* Header with search, tab bar on phones, language switch in the footer (#54). Phones first:
   row 1 logo and login, row 2 the search field; the main links live in the tab bar at the bottom. */
.site-header .brand { order: 1; }
.site-header__login { order: 2; }
.site-search { order: 3; }
.site-nav { order: 4; display: none; }

.site-search {
    position: relative;
    flex: 1 1 100%;
}

.site-search input {
    width: 100%;
    min-height: var(--touch-target);
    padding: 0 calc(var(--touch-target) + var(--space-1)) 0 var(--space-4);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-pill);
    font: inherit;
    color: inherit;
    background: var(--color-ground);
}

.site-search input::-webkit-search-cancel-button {
    display: none;
}

.site-search__button {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--touch-target);
    height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-dark);
    cursor: pointer;
}

.site-search__list {
    max-height: 22rem;
}

.site-search__option {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.site-search__option .muted {
    font-size: var(--text-sm);
}

.site-nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.tab-bar {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--color-ground);
    border-top: var(--border-width) solid var(--color-line);
}

.tab-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    color: var(--color-muted);
    text-decoration: none;
}

.tab-bar a[aria-current="page"] {
    color: var(--color-dark);
    font-weight: var(--weight-display);
    box-shadow: inset 0 3px 0 var(--color-accent);
}

body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

@media (min-width: 52rem) {
    .site-nav {
        order: 2;
        display: flex;
        gap: var(--space-1);
    }

    .site-search {
        order: 3;
        flex: 1 1 12rem;
        max-width: 22rem;
    }

    .site-header__login { order: 4; }

    .tab-bar {
        display: none;
    }

    body {
        padding-bottom: 0;
    }
}

/* In the footer the language menu opens upwards. */
.site-footer .language-switch ul {
    top: auto;
    bottom: 100%;
    left: 0;
    right: auto;
    margin: 0 0 var(--space-1);
}

.site-footer .language-switch summary {
    color: var(--color-muted);
}

/* Search results (#54) */
.search-group {
    margin-bottom: var(--space-8);
}

.search-hit {
    justify-content: space-between;
}

.search-hit__main {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.search-hit__name {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
}

.search-hit--closed {
    opacity: 0.75;
}

.search-hit__reasons {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
}

.search-hit__reasons q {
    font-style: italic;
}

.search-municipalities,
.search-visits {
    padding-left: 0;
    list-style: none;
}

.search-municipalities li,
.search-visits li {
    padding: var(--space-2) 0;
    border-bottom: var(--border-width) solid var(--color-line);
}

.search-visits p {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
}

/* Error log (#72) */
.error-log {
    list-style: none;
    margin: 0;
    padding: 0;
}

.error-log__entry {
    padding: var(--space-3) 0 var(--space-3) var(--space-3);
    border-bottom: var(--border-width) solid var(--color-line);
    border-left: 4px solid var(--color-line);
}

.error-log__entry--error {
    border-left-color: var(--color-dark);
}

.error-log__entry--warn {
    border-left-color: var(--color-accent);
}

.error-log__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    font-size: var(--text-sm);
}

.error-log__message {
    margin: var(--space-1) 0;
    overflow-wrap: anywhere;
}

.error-log__context {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0 0 var(--space-1);
    font-size: var(--text-xs);
}

.error-log pre {
    overflow-x: auto;
    font-size: var(--text-xs);
}

.error-log__copy {
    min-height: 2rem;
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
}

/* Audit trail (#73) */
.audit-types {
    flex-basis: 100%;
}

.audit-types summary {
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    cursor: pointer;
}

.audit-types__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: var(--space-1) var(--space-4);
    padding: var(--space-2) 0;
}

.filters .audit-types__list label {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2);
    text-align: left;
}

.audit-types__list .filter-list__input {
    grid-column: 1 / -1;
}

.audit-table__filter {
    margin-left: var(--space-1);
    text-decoration: none;
}

.audit-table__details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--color-muted);
}

.filters input[type="date"] {
    min-height: var(--touch-target);
    padding: 0 var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    font: inherit;
    color: inherit;
    background: var(--color-ground);
}

/* Select all / none (#85); [hidden] must win over display: flex */
.select-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-1) 0 var(--space-2);
}

.select-buttons[hidden],
[data-select-box][hidden] {
    display: none;
}

.audit-types__group {
    display: flex;
    flex-direction: column;
}

.filters .audit-types__list .audit-types__group-label {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    min-height: var(--touch-target);
}

.audit-types__list > .select-buttons {
    grid-column: 1 / -1;
}

/* Admin status page (#81): state as symbol and word; fill and border only from brand tokens, never colour alone */
.status-overall {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-lg);
}

.status-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-display);
    white-space: nowrap;
}

.status-badge--up {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-text-on-dark);
}

.status-badge--down {
    background: var(--color-accent);
    border: 2px solid var(--color-dark);
    color: var(--color-dark);
}

.status-badge--out_of_service {
    border: 2px dashed var(--color-dark);
    color: var(--color-dark);
}

.status-badge--unknown {
    background: var(--color-soft);
    color: var(--color-muted);
}

.status-table__part td:first-child {
    padding-left: var(--space-6);
    color: var(--color-muted);
}

.status-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 var(--space-3);
    margin: 0;
    font-size: var(--text-sm);
}

.status-details dt {
    color: var(--color-muted);
}

.status-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Guest comment form (#57) */
.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100%;
    min-height: var(--touch-target);
    padding: var(--space-2) var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-ground);
    color: var(--color-dark);
    font: inherit;
}

.comment-form label.checkbox {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    font-family: var(--font-text);
    font-weight: var(--weight-text);
}

.comment-form label.checkbox input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* Spam trap: off screen, out of the tab order, hidden from screen readers */
.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Search by criteria (#23): petal buttons on an ellipse around the Tafelrose; positions come from CriteriaSearch */
.criteria-search {
    max-width: 40rem;
}

.petals {
    position: relative;
    width: 100%;
    max-width: 24rem;
    aspect-ratio: 1 / 1;
    margin: var(--space-4) auto;
}

.petals__rose {
    position: absolute;
    left: 31%;
    top: 31%;
    width: 38%;
    height: 38%;
}

.petals__segment {
    cursor: pointer;
}

.petals__track {
    fill: var(--color-soft);
}

.petals__value {
    fill: var(--color-accent);
}

.petals__segment:hover .petals__track {
    fill: var(--color-line);
}

.petals__button {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 6.5rem;
    min-height: var(--touch-target);
    padding: var(--space-1) var(--space-2);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-pill);
    background: var(--color-ground);
    color: var(--color-dark);
    font-family: var(--font-text);
    font-size: var(--text-sm);
    line-height: 1.2;
    cursor: pointer;
}

.petals__button:hover {
    border-color: var(--color-dark);
}

.petals__button[aria-pressed="true"] {
    border-color: var(--color-dark);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
    font-weight: var(--weight-text-strong);
}

.petals__button:focus-visible {
    box-shadow: var(--focus-ring);
}

.criteria-search__list {
    margin-bottom: var(--space-4);
    padding: var(--space-2) var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-sm);
}

.criteria-search__list summary {
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.criteria-search__check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--touch-target);
}

.criteria-search__check input {
    width: 1.25rem;
    height: 1.25rem;
}

.criteria-search__links,
.ranking-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
}

/* Member statistics (#24, #36): tiles, Tafelrose with outline, diverging bars, year bars */
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin: var(--space-4) 0 var(--space-8);
}

@media (min-width: 52rem) {
    .stat-tiles {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.stat-tile--dark {
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.stat-tile__value {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
    overflow-wrap: anywhere;
}

.stat-tile__value--text {
    font-size: var(--text-lg);
    line-height: 1.25;
}

.stat-tile__label {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.stat-tile--dark .stat-tile__label {
    color: var(--color-muted-on-dark);
}

.stats-section {
    max-width: 40rem;
}

.rose--large {
    width: 170px;
    height: 170px;
}

.rose__value--mine {
    fill: var(--color-accent);
}

.rose__outline {
    fill: none;
    stroke: var(--color-dark);
    stroke-width: 1.5;
    pointer-events: none;
}

.chart-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    font-size: var(--text-sm);
}

.chart-legend li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.chart-legend--row {
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    color: var(--color-muted);
}

.chart-legend__swatch {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.chart-legend__swatch--mine {
    background: var(--color-accent);
}

.chart-legend__swatch--outline {
    border: 2px solid var(--color-dark);
}

.chart-legend__swatch--strict {
    background: var(--color-strict);
}

.chart-legend__swatch--generous {
    background: var(--color-generous);
}

.diverging {
    list-style: none;
    margin: 0;
    padding: 0;
}

.diverging__row {
    display: grid;
    grid-template-columns: minmax(5.5rem, 7.5rem) 1fr 3rem;
    gap: var(--space-2);
    align-items: center;
    min-height: 2rem;
    font-size: var(--text-sm);
}

.diverging__track {
    position: relative;
    height: 16px;
}

.diverging__track::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    bottom: -4px;
    width: 1px;
    background: var(--color-line);
}

.diverging__bar {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
}

.diverging__bar.is-strict {
    right: 50%;
    background: var(--color-strict);
}

.diverging__bar.is-generous {
    left: 50%;
    background: var(--color-generous);
}

.diverging__value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stats-more summary {
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    cursor: pointer;
}

.year-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-end;
    gap: var(--space-1);
    height: 9rem;
    margin-bottom: var(--space-8);
    border-bottom: var(--border-width) solid var(--color-line);
}

.year-bars__year {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    position: relative;
}

.year-bars__count {
    font-size: var(--text-xs);
    color: var(--color-muted);
}

.year-bars__bar {
    width: 100%;
    max-width: 22px;
    min-height: 1px;
    border-radius: 4px 4px 0 0;
    background: var(--color-dark);
}

.year-bars__label {
    position: absolute;
    bottom: -1.4rem;
    font-size: var(--text-xs);
    color: var(--color-muted);
}

/* Section tabs (#93): "Zahlen" = facts, municipalities, club, me */
/* Start page key figures (#112): big numbers with a rule on top, each a link to its page */
.key-figures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5) var(--space-4);
    margin: var(--space-6) 0 var(--space-2);
}

@media (min-width: 40rem) {
    .key-figures {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.key-figure {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: 2px solid var(--color-dark);
    text-decoration: none;
    transition: border-color 0.15s;
}

.key-figure__number {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.key-figure__of {
    font-size: 0.5em;
    letter-spacing: 0;
    color: var(--color-muted);
}

.key-figure__label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.key-figure__label > span:last-child {
    transition: transform 0.15s;
}

.key-figure:hover {
    border-top-color: var(--color-accent);
}

.key-figure:hover .key-figure__label {
    color: var(--color-dark);
}

.key-figure:hover .key-figure__label > span:last-child {
    transform: translateX(4px);
}

/* "Die Besten" on the start page: plate, name with rank, cuisine and municipality as filter links */
.home-best__body {
    flex: 1;
    min-width: 0;
}

.home-best__meta {
    margin: 0;
}

.home-best__rank {
    flex: none;
    width: 1.5rem;
    text-align: center;
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xl);
}

.home-best__name {
    display: block;
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-lg);
    line-height: 1.2;
    text-decoration: none;
}

.home-best__name:hover {
    text-decoration: underline;
}

.home-best__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-2);
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.home-best__meta a {
    color: inherit;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.home-best__meta .tag {
    padding: 0 var(--space-2);
    border-radius: var(--radius-pill);
    background: var(--color-soft);
    color: var(--color-dark);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    text-decoration: none;
}

.home-best .plate-avatar {
    width: 48px;
    height: 48px;
}

.more-link::after {
    content: " →";
}

@media (prefers-reduced-motion: reduce) {
    .key-figure,
    .key-figure__label > span:last-child {
        transition: none;
    }
}

/* Visit chronicle (#111) */
.year-jump {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-4) 0 var(--space-6);
}

.year-jump a {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-target);
    padding: 0 var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}

.year-jump a:hover {
    border-color: var(--color-dark);
}

.visit-year {
    margin-top: var(--space-8);
    scroll-margin-top: var(--space-4);
}

.visit-year h2 {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-dark);
    font-variant-numeric: tabular-nums;
}

.visit-year__count {
    font-family: var(--font-text);
    font-weight: var(--weight-text);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.visit-list .plate-avatar {
    width: 56px;
    height: 56px;
}

.section-tabs {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
    border-bottom: var(--border-width) solid var(--color-line);
    overflow-x: auto;
}

.section-tabs a {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-target);
    padding: 0 var(--space-3);
    border-bottom: 3px solid transparent;
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    text-decoration: none;
}

.section-tabs a[aria-current="page"] {
    border-bottom-color: var(--color-dark);
    font-weight: var(--weight-display);
}

.diverging--raters .diverging__row {
    grid-template-columns: 4rem 1fr 5.5rem;
}

.diverging__label--alias {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.outliers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.outliers__item {
    display: flex;
    flex-direction: column;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-soft);
    text-decoration: none;
    font-size: var(--text-sm);
}

.outliers__head {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-md);
}

.outliers__item:hover .outliers__head {
    text-decoration: underline;
}

.trends {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.trends__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-md);
}

.trends__head {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    font-size: var(--text-sm);
}

.trends__value {
    color: var(--color-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.trends__chart {
    width: 100%;
    height: auto;
}

.trends__axis {
    stroke: var(--color-line);
    stroke-width: 1;
}

.trends__line {
    fill: none;
    stroke: var(--color-dark);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.trends__dot {
    fill: var(--color-dark);
}

/* Municipality progress (#31): progress card, tiles per region (visited filled, open dashed), places abroad */
.progress-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: 40rem;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.progress-card p {
    margin: 0;
}

.progress-card__count {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-lg);
}

.progress-card__number {
    font-weight: var(--weight-display);
    font-size: var(--text-2xl);
    line-height: 1;
    color: var(--color-accent);
}

.progress-card__bar {
    display: flex;
    gap: 3px;
}

.progress-card__segment {
    flex: 1;
    height: 10px;
    border: var(--border-width) solid var(--color-line-on-dark);
    border-radius: 3px;
}

.progress-card__segment.is-visited {
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.progress-card__note {
    font-size: var(--text-sm);
    color: var(--color-muted-on-dark);
}

.municipality-region {
    max-width: 40rem;
    margin-top: var(--space-6);
}

.municipality-tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

@media (min-width: 52rem) {
    .municipality-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.municipality-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-sizing: border-box;
    height: 100%;
    min-height: 76px;
    padding: var(--space-3);
    border: 2px dashed var(--color-muted);
    border-radius: var(--radius-md);
    text-decoration: none;
}

.municipality-tile.is-visited {
    border: 2px solid var(--color-soft);
    background: var(--color-soft);
}

.municipality-tile:hover .municipality-tile__name {
    text-decoration: underline;
}

.municipality-tile__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-1);
}

.municipality-tile__name {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-md);
    overflow-wrap: anywhere;
}

.municipality-tile__badge {
    padding: 0 var(--space-2);
    border: var(--border-width) solid var(--color-muted);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    white-space: nowrap;
}

.municipality-tile.is-visited .municipality-tile__badge {
    border-color: var(--color-dark);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.municipality-tile__sub {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.municipality-abroad {
    list-style: none;
    margin: 0;
    padding: 0;
}

.municipality-abroad a {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-1) var(--space-3);
    min-height: var(--touch-target);
    padding: var(--space-2) 0;
    border-top: var(--border-width) solid var(--color-line);
    text-decoration: none;
    font-size: var(--text-sm);
}

.municipality-abroad__name {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-md);
}

.municipality-abroad a:hover .municipality-abroad__name {
    text-decoration: underline;
}

/* Count of open things on "Ich", the alias button and the member navigation (#93) */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    box-sizing: border-box;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--color-dark);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xs);
    line-height: 1;
}

.site-header__login {
    gap: var(--space-2);
}

.tab-bar__icon {
    position: relative;
    display: inline-flex;
}

.nav-badge--tab {
    position: absolute;
    top: -6px;
    right: -12px;
}

/* Member overview (#93): to-do cards, workflow tiles, what is under way */
.overview-section {
    max-width: 40rem;
    margin-bottom: var(--space-8);
}

.todo-list,
.action-tiles,
.underway {
    list-style: none;
    margin: 0;
    padding: 0;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.todo {
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.todo--quiet {
    background: none;
    border: var(--border-width) solid var(--color-line);
}

.todo--invitation {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.todo__link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: var(--touch-target);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
}

.todo__kicker {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted-on-dark);
}

.todo__title {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
    line-height: 1.2;
}

.todo--invitation .todo__title {
    color: var(--color-text-on-dark);
}

.todo__link:hover .todo__title {
    text-decoration: underline;
}

.todo__meta {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.todo--invitation .todo__meta {
    color: var(--color-muted-on-dark);
}

.todo__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
}

.button--accent {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-dark);
}

.button--accent:hover {
    background: var(--color-ground);
    border-color: var(--color-ground);
}

.button--on-dark {
    background: transparent;
    border-color: var(--color-line-on-dark);
    color: var(--color-text-on-dark);
}

.button--on-dark:hover {
    border-color: var(--color-text-on-dark);
}

.action-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

@media (min-width: 52rem) {
    .action-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.action-tile {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    box-sizing: border-box;
    height: 100%;
    min-height: 6rem;
    padding: var(--space-3);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-md);
    text-decoration: none;
}

.action-tile:hover {
    border-color: var(--color-dark);
}

.action-tile__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-pill);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
}

.action-tile__title {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    line-height: 1.2;
}

.action-tile__sub {
    font-size: var(--text-sm);
    color: var(--color-muted);
    line-height: 1.3;
}

.underway__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    min-height: 3.25rem;
    padding: var(--space-2) 0;
    border-top: var(--border-width) solid var(--color-line);
    text-decoration: none;
}

.underway__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.underway__name {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.underway__item:hover .underway__name {
    text-decoration: underline;
}

.stage-chip {
    flex-shrink: 0;
    padding: 2px var(--space-3);
    border: var(--border-width) solid var(--color-muted);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    white-space: nowrap;
}

.stage-chip--visit,
.stage-chip--rating {
    border-color: var(--color-dark);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.overview-ideas summary {
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
}

/* Lifecycle bar (#93), members only: five steps, then the next step */
.flow {
    max-width: 40rem;
    margin: var(--space-4) 0 var(--space-6);
}

.flow__steps {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: var(--space-3) var(--space-2);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-1);
    border-radius: var(--radius-md);
    background: var(--color-dark);
}

.flow__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    min-height: var(--touch-target);
    text-align: center;
    text-decoration: none;
    color: var(--color-muted-on-dark);
}

a.flow__link:hover .flow__name {
    text-decoration: underline;
}

.flow__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    box-sizing: border-box;
    border: var(--border-width) solid var(--color-line-on-dark);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-sm);
}

.flow__name {
    font-size: var(--text-xs);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.flow__step.is-done .flow__dot {
    border-color: var(--color-ground);
    background: var(--color-ground);
    color: var(--color-dark);
}

.flow__step.is-current .flow__dot {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-dark);
}

.flow__step.is-current .flow__name {
    color: var(--color-text-on-dark);
    font-weight: var(--weight-text-strong);
}

.flow__steps :focus-visible {
    box-shadow: 0 0 0 3px var(--color-dark), 0 0 0 5px var(--color-accent);
}

.flow__next {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4);
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-md);
}

.flow__kicker {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.flow__title {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
    line-height: 1.2;
}

.flow__text {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.flow__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

/* Actions (#93): what a member may do, admin actions in a dashed box, the "⋯" menu per visit */
.actions {
    max-width: 40rem;
    margin-bottom: var(--space-6);
}

.actions__title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.action-buttons {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
}

.action-buttons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    box-sizing: border-box;
    height: 100%;
    min-height: 4.5rem;
    padding: var(--space-2);
    border: var(--border-width) solid var(--color-line);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    font-size: var(--text-sm);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.action-buttons a:hover {
    border-color: var(--color-dark);
}

.admin-box {
    padding: var(--space-3);
    border: 2px dashed var(--color-muted);
    border-radius: var(--radius-md);
}

.admin-badge {
    padding: 1px var(--space-2);
    border-radius: var(--radius-pill);
    background: var(--color-muted);
    color: var(--color-text-on-dark);
    letter-spacing: 0;
}

.admin-box__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
}

.action-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

.action-list a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 3rem;
    padding: 0 var(--space-4);
    border-top: var(--border-width) solid var(--color-line);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    text-decoration: none;
}

.action-list li:first-child a {
    border-top: 0;
}

.action-list a:hover span:last-child {
    text-decoration: underline;
}

.action-list__danger {
    color: var(--color-danger);
}

.more-menu {
    position: relative;
}

.more-menu summary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: var(--touch-target);
    padding: 0 var(--space-4);
    border: var(--border-width) solid var(--color-dark);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
    cursor: pointer;
    list-style: none;
}

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

.more-menu[open] summary {
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.more-menu .action-list {
    margin-top: var(--space-2);
    min-width: 16rem;
}

/* Admin hub (#93): search on top, then what is waiting and grouped tiles */
.admin-hub__search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    max-width: 40rem;
    margin-bottom: var(--space-8);
}

.admin-hub__search label {
    flex-basis: 100%;
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.admin-hub__search input {
    flex: 1 1 14rem;
    min-height: var(--touch-target);
    padding: 0 var(--space-4);
    border: var(--border-width) solid var(--color-dark);
    border-radius: var(--radius-pill);
    background: var(--color-ground);
    color: var(--color-dark);
    font: inherit;
}

.admin-hub__search .muted {
    flex-basis: 100%;
    font-size: var(--text-sm);
}

.todo--admin {
    background: var(--color-dark);
}

.todo--admin .todo__title {
    color: var(--color-text-on-dark);
}

.todo--admin .todo__meta {
    color: var(--color-muted-on-dark);
}

.admin-hits {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
    max-width: 40rem;
}

.admin-hits > li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-2) 0;
    border-top: var(--border-width) solid var(--color-line);
}

.admin-hits > li > a,
.admin-hits__main {
    display: flex;
    flex-direction: column;
    min-height: var(--touch-target);
    justify-content: center;
    text-decoration: none;
}

.admin-hits__name {
    font-family: var(--font-display);
    font-weight: var(--weight-display-light);
}

.admin-hits a:hover .admin-hits__name {
    text-decoration: underline;
}

.admin-hits__buttons {
    display: flex;
    gap: var(--space-2);
}

/* Phones (#93): the member navigation wraps instead of scrolling, so "Verwaltung" and "Abmelden" stay in sight */
@media (max-width: 36rem) {
    .member-nav__inner {
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 0 var(--space-2);
        gap: 0;
    }

    .member-nav a,
    .member-nav button {
        padding: 0 var(--space-2);
    }
}

/* Score of a single rating (#98): member summary and admin page */
.rate-summary__score {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.rate-summary__score strong {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-dark);
}

/* Redesign (#125): petrol header bar, petrol footer, cards, compact criteria, visit page.
 * Mockup: https://claude.ai/artifact/82XetkzDxDCVPNRZEoPUHZ */

.site-header-bar {
    background: var(--color-dark);
}

.site-header-bar .wordmark,
.site-header-bar .site-header__link {
    color: var(--color-text-on-dark);
}

.site-header-bar .site-nav a[aria-current="page"] {
    text-decoration-color: var(--color-accent);
}

.site-header-bar .site-search input {
    border-color: var(--color-line-on-dark);
}

.site-header-bar .site-header__login {
    border-color: var(--color-line-on-dark);
    color: var(--color-text-on-dark);
}

.site-header-bar .site-header__login:hover {
    background: var(--color-dark-soft);
}

.site-header-bar :focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-dark), 0 0 0 5px var(--color-accent);
}

.site-footer {
    border-top: 0;
    background: var(--color-dark);
}

.site-footer__inner,
.site-footer .language-switch summary {
    color: var(--color-muted-on-dark);
}

.site-footer__inner a,
.site-footer__links a {
    color: var(--color-text-on-dark);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-4);
}

.site-footer :focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-dark), 0 0 0 5px var(--color-accent);
}

/* Cards: white on paper */
.card {
    margin: 0;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.card__head {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.card__head .rose {
    width: 72px;
    height: 72px;
}

.card__title {
    margin: 0;
    font-size: var(--text-lg);
}

.card__meta {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
}

.card__foot {
    margin: var(--space-4) 0 0;
    font-size: var(--text-sm);
}

.card__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-line);
    font-family: var(--font-display);
}

.card__total-value {
    font-size: var(--text-xl);
    font-variant-numeric: tabular-nums;
}

/* Compact criteria: label, short bar, value */
.criteria-compact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* One grid for all rows: bars and values line up, whatever the value text is */
    grid-template-columns: minmax(0, 1fr) 4.5rem max-content;
    column-gap: var(--space-3);
    row-gap: var(--space-2);
    font-size: var(--text-sm);
}

.criteria-compact__line {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
}

.criteria-compact__label {
    line-height: 1.3;
}

.criteria-compact__bar {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--color-soft);
    overflow: hidden;
}

.criteria-compact__bar span {
    display: block;
    height: 100%;
    border-radius: var(--radius-pill);
    background: var(--color-dark);
}

.criteria-compact__value {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

/* Visit page: head */
.visit-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin: var(--space-4) 0 var(--space-5);
}

.visit-head__named {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-width: 0;
    flex: 1 1 20rem;
}

.visit-head__meta {
    margin: 0 0 var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.visit-head__title {
    margin: 0;
    font-size: var(--text-2xl);
    line-height: var(--leading-tight);
}

.visit-head__title a {
    color: inherit;
    text-decoration: none;
}

.visit-head__title a:hover {
    text-decoration: underline;
}

.visit-head__score {
    border-radius: 50%;
    text-decoration: none;
}

/* Phones: plate, name and score stay in one row, as in the restaurant hero */
@media (max-width: 30rem) {
    .visit-head {
        flex-wrap: nowrap;
        gap: var(--space-3);
    }

    .visit-head__named {
        flex: 1 1 auto;
        gap: var(--space-3);
    }

    .visit-head .plate-avatar--large {
        width: 56px;
        height: 56px;
    }

    .visit-head__meta {
        font-size: var(--text-xs);
    }

    .visit-head__title {
        font-size: var(--text-xl);
        overflow-wrap: anywhere;
    }

    .visit-head .score-plate {
        width: 64px;
        height: 64px;
    }

    .visit-head .score-plate__value {
        font-size: var(--text-lg);
    }
}

/* Visit page: photo gallery. Phones: the first photo over the full width, the others in a row of four. */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 5rem;
    gap: var(--space-2);
    margin: 0 0 var(--space-3);
}

.gallery__item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-soft);
}

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

.gallery__item--main {
    grid-column: 1 / -1;
    grid-row: span 3;
}

.gallery__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: var(--space-2) var(--space-3);
    background: var(--color-dark-veil);
    color: var(--color-text-on-dark);
    font-size: var(--text-sm);
    line-height: 1.3;
}

.gallery__item:focus-visible {
    box-shadow: var(--focus-ring);
}

@media (min-width: 40rem) {
    .gallery {
        grid-auto-rows: 11rem;
    }

    .gallery__item--main {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery--1 .gallery__item--main {
        grid-column: 1 / -1;
    }

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

    .gallery--2 .gallery__item:not(.gallery__item--main),
    .gallery--3 .gallery__item:not(.gallery__item--main) {
        grid-row: span 2;
    }

    .gallery--4 .gallery__item:nth-child(2) {
        grid-column: span 2;
    }
}

.gallery-more {
    margin: 0 0 var(--space-8);
}

.gallery-more__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
    grid-auto-rows: 6rem;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.gallery + .visit-layout {
    margin-top: var(--space-8);
}

/* Visit page: two columns from 52rem; on phones the side column sits between dishes and comments */
.visit-layout {
    display: grid;
    gap: var(--space-8);
}

.visit-layout > * {
    margin: 0;
    min-width: 0;
}

.visit-layout__side {
    display: grid;
    gap: var(--space-5);
    align-content: start;
}

.visit-layout__side > * {
    margin: 0;
}

@media (min-width: 52rem) {
    .visit-layout {
        grid-template-columns: minmax(0, 1fr) 20rem;
        grid-template-rows: auto auto 1fr;
        column-gap: var(--space-12);
        align-items: start;
    }

    .visit-layout__main {
        grid-column: 1;
    }

    .visit-layout__side {
        grid-column: 2;
        grid-row: 1 / span 3;
    }
}

/* Dish cards */
.dish-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

@media (min-width: 40rem) {
    .dish-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dish-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 5rem;
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.dish-card__photo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-soft);
}

.dish-card__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
    padding-left: var(--space-1);
}

.dish-card__name {
    font-weight: var(--weight-text-strong);
    line-height: 1.3;
}

.dish-card__price {
    font-family: var(--font-display);
    font-size: var(--text-sm);
}

.visit-layout__side .mini-timeline {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5) var(--space-5);
}

/* Photo lightbox on the visit page (#129) */
.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: var(--space-4);
    border: 0;
    background: transparent;
    color: var(--color-text-on-dark);
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox::backdrop {
    background: var(--color-backdrop);
}

.lightbox__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
}

.lightbox__image {
    display: block;
    max-width: min(100%, 1600px);
    max-height: calc(100dvh - 7rem);
    object-fit: contain;
    border-radius: var(--radius-md);
    pointer-events: auto;
}

.lightbox__caption {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    text-align: center;
}

.lightbox__counter {
    color: var(--color-muted-on-dark);
}

.lightbox__button {
    position: fixed;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--color-glass);
    color: var(--color-text-on-dark);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__button:hover {
    background: var(--color-glass-strong);
}

.lightbox__button:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.lightbox__button--prev {
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__button--next {
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__button--close {
    right: var(--space-3);
    top: var(--space-3);
}

.lightbox--single .lightbox__button[data-step] {
    display: none;
}

/* Restaurant page (#126): dark petrol head over the full width.
   Phones: small plate, name and score in one row, pills below; from 52rem one flex row. */
.restaurant-hero {
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.restaurant-hero__inner {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: var(--space-5) var(--page-gutter) var(--space-6);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "plate head score"
        "pills pills pills";
    align-items: center;
    column-gap: var(--space-3);
    row-gap: var(--space-4);
}

.plate-avatar--hero {
    grid-area: plate;
    width: 56px;
    height: 56px;
    box-shadow: 0 0 0 4px var(--color-dark-soft);
}

.restaurant-hero__text {
    display: contents;
}

.restaurant-hero__head {
    grid-area: head;
    min-width: 0;
}

.restaurant-hero__kicker {
    margin: 0 0 var(--space-1);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted-on-dark);
}

.restaurant-hero__title {
    margin: 0;
    font-size: var(--text-xl);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.restaurant-hero__former {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
    color: var(--color-muted-on-dark);
}

.restaurant-hero__pills {
    grid-area: pills;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
}

.restaurant-hero__pills a.pill:hover {
    border-color: var(--color-accent);
}

.restaurant-hero__score {
    grid-area: score;
    color: inherit;
    text-decoration: none;
}

.restaurant-hero .score-plate {
    width: 64px;
    height: 64px;
}

.restaurant-hero .score-plate__value {
    font-size: var(--text-lg);
}

.restaurant-hero :focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

@media (min-width: 52rem) {
    .restaurant-hero__inner {
        display: flex;
        align-items: center;
        gap: var(--space-8);
        padding-top: var(--space-8);
        padding-bottom: var(--space-12);
    }

    .plate-avatar--hero {
        width: 148px;
        height: 148px;
        box-shadow: 0 0 0 10px var(--color-dark-soft);
    }

    .restaurant-hero__text {
        display: block;
        flex: 1 1 18rem;
        min-width: 0;
    }

    .restaurant-hero__kicker {
        font-size: var(--text-sm);
    }

    .restaurant-hero__title {
        font-size: calc(var(--text-2xl) * 1.4);
    }

    .restaurant-hero__former {
        margin-top: var(--space-2);
        font-size: inherit;
    }

    .restaurant-hero__pills {
        margin-top: var(--space-4);
    }

    .restaurant-hero .score-plate {
        width: 92px;
        height: 92px;
    }

    .restaurant-hero .score-plate__value {
        font-size: var(--text-xl);
    }
}

/* Restaurant page: timeline left, address, criteria and actions right; stacked on phones */
.restaurant-layout {
    display: grid;
    gap: var(--space-8);
    margin-top: var(--space-4);
}

.restaurant-layout > *,
.restaurant-layout__side > * {
    margin: 0;
    min-width: 0;
}

.restaurant-layout__side {
    display: grid;
    gap: var(--space-5);
    align-content: start;
}

@media (min-width: 52rem) {
    .restaurant-layout {
        grid-template-columns: minmax(0, 1fr) 22rem;
        column-gap: var(--space-12);
        align-items: start;
    }

    /* a candidate has no timeline: the side column stays on the right */
    .restaurant-layout__side:only-child {
        grid-column: 2;
    }
}

.restaurant-layout__side .actions {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5) var(--space-5);
}

.card__address {
    display: flex;
    flex-direction: column;
    margin: var(--space-2) 0 var(--space-4);
    font-style: normal;
}

/* Visit card in the timeline (#126): links to the visit page */
.timeline .visit-entry {
    padding-bottom: var(--space-3);
}

.visit-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
}

.visit-card:hover .visit-card__date {
    text-decoration: underline;
}

.visit-card:focus-visible {
    outline: 3px solid var(--color-dark);
    outline-offset: 2px;
}

.visit-entry--current .visit-card {
    box-shadow: 0 0 0 3px var(--color-accent);
}

.visit-entry--archived .visit-card {
    background: transparent;
    border: var(--border-width) dashed var(--color-line);
}

.visit-card__photo {
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-soft);
}

.visit-card__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visit-card__date {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-md);
}

.visit-card__dishes {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visit-card__meta,
.visit-card__teaser,
.visit-card__votes {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.visit-card__meta > span + span::before {
    content: " · ";
}

.visit-card__teaser {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.visit-card__score {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-right: var(--space-2);
    text-align: right;
}

@media (min-width: 40rem) {
    .visit-card__photo {
        width: 112px;
        height: 84px;
    }
}

.timeline-older > summary {
    min-height: var(--touch-target);
    padding: var(--space-2) 0 var(--space-2) 3.5rem;
    font-family: var(--font-display);
    color: var(--color-dark);
    text-decoration: underline;
    cursor: pointer;
||||||| cf899cd
}

/* Start page (#127): entry with mosaic, top band, photo cards, best list with a side column; stacked on phones */
.page--home {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.page--home > * {
    margin-top: 0;
    margin-bottom: 0;
}

.home-hero {
    display: grid;
    gap: var(--space-6);
    align-items: center;
    padding-top: var(--space-2);
}

.home-hero__title {
    margin: 0;
    font-size: calc(var(--text-2xl) * 1.15);
    line-height: 1;
}

.home-hero__lead {
    margin: var(--space-4) 0 0;
    max-width: 34ch;
    font-size: var(--text-lg);
    line-height: 1.45;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: var(--space-6) 0 0;
}

/* Phones: one row of six small circles; from 52rem two staggered rows of three */
.home-mosaic {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-2);
}

.home-mosaic__tile {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: 3px solid var(--color-surface);
    border-radius: 50%;
    background: var(--color-soft);
    object-fit: cover;
    overflow: hidden;
}

.home-mosaic__tile--plate .plate-avatar {
    width: 86%;
    height: 86%;
    filter: none;
}

.home-mosaic__tile--count {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-dark);
    font-family: var(--font-display);
    line-height: 1;
}

.home-mosaic__tile--count strong {
    font-size: var(--text-md);
}

.home-mosaic__tile--count span {
    display: none;
    font-size: var(--text-xs);
}

@media (min-width: 52rem) {
    .home-hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: var(--space-12);
        padding-top: var(--space-8);
    }

    .home-hero__title {
        font-size: calc(var(--text-2xl) * 1.7);
    }

    .home-mosaic {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-3);
        padding-bottom: var(--space-6);
    }

    .home-mosaic__tile {
        border-width: 8px;
    }

    .home-mosaic__tile:nth-child(3n+2) {
        transform: translateY(var(--space-6));
    }

    .home-mosaic__tile--count strong {
        font-size: var(--text-xl);
    }

    .home-mosaic__tile--count span {
        display: block;
        margin-top: var(--space-1);
    }
}

/* Top band: next lunch or the visit of the day on petrol */
.home-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4) var(--space-5);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.plate-avatar--band {
    width: 56px;
    height: 56px;
}

.home-band__text {
    flex: 1 1 12rem;
    min-width: 0;
}

.home-band__kicker {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted-on-dark);
}

.home-band__title {
    margin: var(--space-1) 0 0;
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
    overflow-wrap: anywhere;
}

.home-band__title a {
    color: inherit;
    text-decoration: none;
}

.home-band__title a:hover {
    text-decoration: underline;
}

.home-band__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-1) 0 0;
    color: var(--color-muted-on-dark);
}

.home-band :focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

@media (min-width: 52rem) {
    .home-band {
        padding: var(--space-6) var(--space-8);
        gap: var(--space-6);
    }

    .plate-avatar--band {
        width: 84px;
        height: 84px;
    }

    .home-band__kicker {
        font-size: var(--text-sm);
    }

    .home-band__title {
        font-size: var(--text-2xl);
    }
}

.home-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2) var(--space-4);
    margin-bottom: var(--space-4);
}

.home-section-head h2 {
    margin: 0;
}

/* "Zuletzt am Tisch": photo cards with the score plate on the edge of the photo */
.home-latest__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-4);
}

@media (min-width: 40rem) {
    .home-latest__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-5);
    }
}

.photo-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
    color: inherit;
    text-decoration: none;
}

.photo-card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.photo-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 10rem;
    background: var(--color-soft);
}

.photo-card__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-card__score {
    position: absolute;
    right: var(--space-4);
    bottom: calc(var(--space-6) * -1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--color-surface);
    background: var(--color-accent);
    color: var(--color-dark);
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-md);
    font-variant-numeric: tabular-nums;
}

.photo-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4) calc(56px + var(--space-6)) var(--space-5) var(--space-5);
}

.photo-card__name {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--text-lg);
    line-height: var(--leading-tight);
}

.photo-card:hover .photo-card__name {
    text-decoration: underline;
}

.photo-card__meta {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

@media (min-width: 40rem) {
    .photo-card__media {
        height: 12rem;
    }
}

/* "Die Besten" as white rows; side column with key figures and club events */
.home-columns {
    display: grid;
    gap: var(--space-8);
    align-items: start;
}

@media (min-width: 52rem) {
    .home-columns {
        grid-template-columns: minmax(0, 1fr) 20rem;
    }

    .home-columns__side:only-child {
        grid-column: 2;
    }
}

.home-columns__main h2 {
    margin: 0 0 var(--space-4);
}

.home-columns__side {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.home-columns__side .card__title {
    margin-bottom: var(--space-4);
}

.home-columns__side .key-figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    margin: 0;
}

.home-columns__side .key-figure__number {
    font-size: var(--text-xl);
}

.home-columns__side .key-figure__label {
    letter-spacing: 0.04em;
}

.card.club-events {
    margin: 0;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.home-best-list {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.home-best {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

@media (min-width: 40rem) {
    .home-best {
        gap: var(--space-4);
    }
}

/* List pages (#128): shared head, filter bar, ranking cards, facts as cards */
.list-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-4) var(--space-6);
    margin: var(--space-4) 0 var(--space-6);
}

.list-head__text {
    max-width: 60ch;
}

.list-head h1 {
    margin: 0;
    font-size: var(--text-2xl);
    line-height: var(--leading-tight);
}

.list-head__lead {
    margin: var(--space-2) 0 0;
    font-size: var(--text-md);
}

.list-head__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
}

@media (min-width: 52rem) {
    .list-head h1 {
        font-size: calc(var(--text-2xl) * 1.35);
    }

    .list-head__lead {
        font-size: var(--text-lg);
    }
}

.filters--bar {
    align-items: center;
    gap: var(--space-2) var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.filters--bar label {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    color: var(--color-dark);
}

.filters--bar .filters__check {
    margin-left: auto;
}

/* Podium with plates: place 1 on petrol, places 2 and 3 as white cards */
.plate-avatar--podium {
    width: 72px;
    height: 72px;
}

.podium__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.podium__card {
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.podium__visuals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.podium__card .rose-icon__track {
    fill: var(--color-soft);
}

@media (min-width: 52rem) {
    .podium {
        grid-template-columns: 1fr 1fr;
    }

    .plate-avatar--podium {
        width: 96px;
        height: 96px;
    }
}

/* Remaining places and map restaurants: white cards, two columns from 52rem */
.ranking--cards {
    display: grid;
    gap: var(--space-2) var(--space-4);
}

.ranking--cards .ranking__item {
    padding: var(--space-2) var(--space-3);
    border-bottom: 0;
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.ranking--cards .ranking__name {
    min-width: 0;
}

.ranking--cards .ranking__name > span:first-child {
    font-size: var(--text-md);
}

.plate-avatar--row {
    display: none;
    width: 44px;
    height: 44px;
}

@media (min-width: 40rem) {
    .plate-avatar--row {
        display: block;
    }
}

@media (min-width: 52rem) {
    .ranking--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fact.card {
    padding: var(--space-5);
}

.fact.card h2 {
    margin-top: 0;
}

.facts {
    gap: var(--space-5);
    align-items: start;
}

/* Facts charts (#128): server-side SVG in petrol and apricot; the values stay on the page as text */
.chart {
    display: block;
    width: 100%;
    height: auto;
    margin: var(--space-3) 0;
    overflow: visible;
    font-family: var(--font-display);
}

.chart__axis,
.chart__grid {
    stroke: var(--color-line);
    stroke-width: 1;
}

.chart__grid {
    stroke-dasharray: 2 3;
}

.chart__line {
    fill: none;
    stroke: var(--color-dark);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.chart__dot {
    fill: var(--color-dark);
    stroke: var(--color-surface);
    stroke-width: 2;
}

.chart__dot--accent {
    fill: var(--color-accent);
}

.chart__dot--muted {
    fill: var(--color-line-on-dark);
    stroke-width: 1;
}

.chart__column {
    fill: var(--color-dark);
}

.chart__column--accent {
    fill: var(--color-accent);
}

.chart__slope {
    stroke-width: 3;
    stroke-linecap: round;
}

.chart__slope--rise {
    stroke: var(--color-dark);
}

.chart__slope--fall {
    stroke: var(--color-accent);
}

.chart__range {
    stroke: var(--color-dark);
    stroke-width: 12;
    stroke-linecap: round;
}

.chart__range--accent {
    stroke: var(--color-accent);
}

.chart__value,
.chart__rank {
    fill: var(--color-dark);
    font-size: 12px;
    font-weight: var(--weight-display);
    font-variant-numeric: tabular-nums;
}

.chart__rank {
    font-size: 10px;
}

.chart__label,
.chart__caption {
    fill: var(--color-muted);
    font-size: 11px;
}

.chart__caption {
    font-family: var(--font-text);
}

/* Criteria: the Tafelrose of the club beside its legend */
.fact-rose {
    display: flex;
    justify-content: center;
    margin: var(--space-3) 0;
}

.fact-rose .rose {
    width: 180px;
    height: 180px;
}

.fact-bars--legend .fact-bars__track {
    display: none;
}

.fact-bars--legend {
    grid-template-columns: 1fr max-content;
}

/* Cuisines and municipalities: a dot per group on a common scale, a dashed line for the club average */
.fact-bars--dots {
    grid-template-columns: minmax(4rem, 9rem) 1fr 3rem;
}

.fact-bars--dots .fact-bars__track {
    position: relative;
    height: 2px;
    border-radius: 0;
    background: var(--color-line);
}

.fact-bars--dots .fact-bars__track::before {
    content: "";
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: var(--average);
    border-left: 2px dashed var(--color-accent);
}

.fact-bars--dots .fact-bars__fill {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-dark);
    transform: translate(-50%, -50%);
}

.fact-bars--dots .fact-bars__label {
    overflow-wrap: anywhere;
}

.fact-scale {
    display: grid;
    grid-template-columns: minmax(4rem, 9rem) 1fr 3rem;
    column-gap: var(--space-3);
    margin: calc(var(--space-2) * -1) 0 var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    color: var(--color-muted);
}

.fact-scale__ends {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
}

.fact-scale__average {
    grid-column: 1 / -1;
    margin-top: var(--space-2);
}

.fact-scale__average::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0.9em;
    margin-right: var(--space-2);
    border-left: 2px dashed var(--color-accent);
    vertical-align: -0.1em;
}
