/* The app's own styles (dark-factory #812, #1078). Three stylesheets, in this order: the platform's theme.css with
   the --theme-* custom properties (light and dark), the utilities .container .prose .stack .cluster .card and the app
   shell's classes (.app-*, .skip-link); brand.css, the project's brand; then this file.
   Style here, never there: a rule here wins over the theme's.

   Stübli zur Linde: a menu card with dot leaders between dish and price, the day at a glance on the start page, a
   booking form with the free times as choices, one list pattern (.rows) for the host's book. Every value is a
   --theme-* token. */

[hidden] {
  display: none !important;
}

body {
  font-variant-numeric: lining-nums tabular-nums;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The demo notice above the header: the platform's, so it stands on the neutral surfaces, never on the brand. */
.demo-banner {
  padding: var(--theme-space-3xs) var(--theme-space-s);
  color: var(--theme-text-secondary);
  font-size: var(--theme-size-step--1);
  text-align: center;
  background: var(--theme-surface-sunken);
  border-block-end: 1px solid var(--theme-border-subtle);
}

.demo-banner a,
.demo-banner a:hover {
  color: inherit;
}

/* The brand mark in the logo slot: a linden leaf. */
.brand-mark {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

.brand-mark-ground {
  fill: var(--theme-accent-base);
}

.brand-mark-leaf {
  fill: var(--theme-accent-contrast);
}

.brand-mark-rib,
.brand-mark-stalk {
  fill: none;
  stroke: var(--theme-accent-base);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.brand-mark-stalk {
  stroke: var(--theme-accent-contrast);
  stroke-width: 1.6;
}

footer small + small {
  margin-inline-start: auto;
}

.muted {
  color: var(--theme-text-muted);
}

/* Page rhythm: the head of a page, then sections a clear step apart. */
.hero {
  padding-block: var(--theme-space-l) var(--theme-space-2xs);
}

.hero h1 {
  max-inline-size: 18ch;
  margin-block-end: var(--theme-space-xs);
  font-size: var(--theme-size-step-5);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lede {
  max-inline-size: var(--theme-measure-prose);
  color: var(--theme-text-secondary);
  font-size: var(--theme-size-step-1);
}

main > .section,
main > .practical,
main > .menu {
  margin-block-start: var(--theme-space-xl);
}

main h2 {
  font-size: var(--theme-size-step-2);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-2xs) var(--theme-space-l);
  align-items: baseline;
  justify-content: space-between;
  margin-block-end: var(--theme-space-s);
}

.section-head h2,
.section-head p {
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-xs) var(--theme-space-m);
  align-items: center;
  margin: var(--theme-space-m) 0 0;
}

/* A link that is the main action of its block looks like the theme's button. */
.button,
.button:hover,
.button:focus-visible {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--theme-control-min);
  padding: var(--theme-space-2xs) var(--theme-space-s);
  color: var(--theme-accent-contrast);
  font-weight: 700;
  text-decoration: none;
  background: var(--theme-accent-base);
  border-radius: var(--theme-radius-m);
}

.button:hover,
.button:focus-visible {
  background: var(--theme-accent-strong);
}

button {
  font-weight: 700;
}

button.secondary:hover,
button.secondary:focus-visible {
  background: var(--theme-surface-sunken);
}

.notice {
  padding: var(--theme-space-xs) var(--theme-space-s);
  background: var(--theme-surface-raised);
  border: 1px solid var(--theme-border-strong);
  border-inline-start: var(--theme-space-3xs) solid var(--theme-accent-base);
  border-radius: var(--theme-radius-m);
}

/* The start page: the invitation beside the day at a glance. */
.welcome {
  display: grid;
  gap: var(--theme-space-l);
  align-items: end;
}

.today {
  position: relative;
  overflow: hidden;
  border-block-start: var(--theme-space-3xs) solid var(--theme-accent-base);
}

.today h2 {
  margin-block-end: var(--theme-space-xs);
  font-size: var(--theme-size-step-1);
}

.today-leaf {
  position: absolute;
  inset-block-end: var(--theme-space-s);
  inset-inline-end: var(--theme-space-s);
  inline-size: var(--theme-space-2xl);
  fill: none;
  stroke: var(--theme-highlight-base);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.today-list {
  margin: 0;
}

.today-list div {
  padding-block: var(--theme-space-xs);
  border-block-start: 1px solid var(--theme-border-subtle);
}

.today-list dt,
.facts dt {
  color: var(--theme-text-muted);
  font-size: var(--theme-size-step--1);
}

.today-list dd,
.facts dd {
  margin: 0;
  font-weight: 700;
}

.today-detail {
  display: block;
  color: var(--theme-text-secondary);
  font-weight: 400;
}

.state-full {
  color: var(--theme-state-danger);
  font-weight: 700;
}

/* The menu card: a dish, a leader of dots, its price; what is on the plate below. */
.menu {
  display: grid;
  gap: var(--theme-space-xl) var(--theme-space-2xl);
}

.course h2 {
  margin-block-end: var(--theme-space-2xs);
  padding-block-end: var(--theme-space-2xs);
  border-block-end: 2px solid var(--theme-highlight-base);
}

.course-note {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: var(--theme-size-step--1);
}

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

.dish {
  padding-block: var(--theme-space-xs);
}

.dish p {
  margin: 0;
}

.dish-line {
  display: flex;
  gap: var(--theme-space-2xs);
  align-items: baseline;
}

.dish-name {
  font-size: var(--theme-size-step-1);
  font-weight: 700;
}

.dish-leader {
  flex: 1 1 var(--theme-space-m);
  min-inline-size: var(--theme-space-m);
  border-block-end: 2px dotted var(--theme-border-strong);
}

.dish-price {
  font-size: var(--theme-size-step-1);
  font-weight: 700;
}

.dish-detail {
  max-inline-size: var(--theme-measure-prose);
  color: var(--theme-text-secondary);
}

.tag {
  display: inline-block;
  padding: 0 var(--theme-space-2xs);
  color: var(--theme-accent-base);
  font-size: var(--theme-size-step--1);
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--theme-accent-base);
  border-radius: var(--theme-radius-s);
}

.menu-foot {
  max-inline-size: var(--theme-measure-prose);
}

/* The diet filter: links; the one applied is filled. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--theme-control-min);
  padding: var(--theme-space-2xs) var(--theme-space-s);
  color: var(--theme-text-primary);
  text-decoration: none;
  background: var(--theme-surface-raised);
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--theme-radius-full);
}

.chip:hover {
  color: var(--theme-text-primary);
  border-color: var(--theme-accent-base);
}

.chip[aria-current='true'] {
  color: var(--theme-accent-contrast);
  font-weight: 700;
  background: var(--theme-accent-base);
  border-color: var(--theme-accent-base);
}

/* Opening hours and the way to the house. */
.practical {
  display: grid;
  gap: var(--theme-space-l) var(--theme-space-2xl);
}

.hours {
  margin: 0;
}

.hours div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--theme-space-m);
  justify-content: space-between;
  padding-block: var(--theme-space-2xs);
  border-block-start: 1px solid var(--theme-border-subtle);
}

.hours dd {
  margin: 0;
  color: var(--theme-text-secondary);
}

.hours-today dt,
.hours-today dd {
  color: var(--theme-text-primary);
  font-weight: 700;
}

.hours-mark {
  margin-inline-start: var(--theme-space-2xs);
  padding: 0 var(--theme-space-2xs);
  color: var(--theme-accent-contrast);
  font-size: var(--theme-size-step--1);
  background: var(--theme-accent-base);
  border-radius: var(--theme-radius-s);
}

/* Booking: the day and the party, then the free times and the contact details. */
.booking {
  display: grid;
  gap: var(--theme-space-m);
  align-items: start;
  margin-block-start: var(--theme-space-m);
}

.step h2 {
  margin-block-end: var(--theme-space-s);
  font-size: var(--theme-size-step-1);
}

.field {
  margin-block-end: var(--theme-space-s);
}

.field label,
.times legend {
  color: var(--theme-text-primary);
  font-weight: 700;
}

.field-hint {
  margin: 0 0 var(--theme-space-3xs);
  color: var(--theme-text-muted);
  font-size: var(--theme-size-step--1);
}

.field-error {
  margin: var(--theme-space-3xs) 0 0;
  color: var(--theme-state-danger);
  font-size: var(--theme-size-step--1);
  font-weight: 700;
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea {
  border: 2px solid var(--theme-state-danger);
}

.form-errors {
  margin-block-end: var(--theme-space-s);
  padding: var(--theme-space-s);
  border: 2px solid var(--theme-state-danger);
  border-radius: var(--theme-radius-m);
}

.form-errors-title {
  margin-block-end: var(--theme-space-2xs);
  color: var(--theme-state-danger);
  font-weight: 700;
}

.form-errors ul {
  margin: 0;
  padding-inline-start: var(--theme-space-m);
}

.form-errors a {
  color: var(--theme-text-primary);
}

.times {
  min-inline-size: 0;
  margin: 0 0 var(--theme-space-s);
  padding: 0;
  border: 0;
}

.times legend {
  padding: 0;
}

.times-service {
  margin: var(--theme-space-xs) 0 var(--theme-space-2xs);
  color: var(--theme-text-muted);
  font-size: var(--theme-size-step--1);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--theme-space-3xl) * 0.9), 1fr));
  gap: var(--theme-space-2xs);
}

.time {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--theme-space-2xs);
  align-items: center;
  min-block-size: var(--theme-control-min);
  margin: 0;
  padding: var(--theme-space-2xs) var(--theme-space-xs);
  color: var(--theme-text-primary);
  font-weight: 700;
  cursor: pointer;
  background: var(--theme-surface-raised);
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--theme-radius-m);
}

.time input {
  inline-size: auto;
  margin: 0;
  accent-color: var(--theme-accent-base);
}

.time:has(input:checked) {
  border: 2px solid var(--theme-accent-base);
}

.time:has(input:focus-visible) {
  outline: 2px solid var(--theme-accent-base);
  outline-offset: 2px;
}

.time-off {
  color: var(--theme-text-muted);
  font-weight: 400;
  cursor: not-allowed;
  background: var(--theme-surface-sunken);
  border-style: dashed;
}

.time-off .time-clock {
  text-decoration: line-through;
}

.time-state {
  font-size: var(--theme-size-step--1);
}

/* The confirmation. */
.ticket {
  max-inline-size: var(--theme-measure-prose);
  border-block-start: var(--theme-space-3xs) solid var(--theme-accent-base);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(var(--theme-space-3xl) * 1.6), 1fr));
  gap: 0 var(--theme-space-l);
  margin: 0;
}

.facts div {
  padding-block: var(--theme-space-xs);
  border-block-start: 1px solid var(--theme-border-subtle);
}

.ref {
  font-size: var(--theme-size-step-1);
  letter-spacing: 0.08em;
}

/* The host's book: one row a party, in the order they arrive. */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-s);
  align-items: end;
}

.filter .field {
  flex: 0 1 calc(var(--theme-space-3xl) * 2);
  margin: 0;
}

.day-links {
  display: flex;
  gap: var(--theme-space-m);
  align-items: center;
  min-block-size: var(--theme-control-min);
  margin: 0;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--theme-surface-raised);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-l);
}

.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--theme-space-3xs) var(--theme-space-m);
  align-items: start;
  padding: var(--theme-space-s) var(--theme-space-m);
}

.row + .row {
  border-block-start: 1px solid var(--theme-border-subtle);
}

.row-time {
  min-inline-size: var(--theme-space-xl);
  font-size: var(--theme-size-step-1);
  font-weight: 700;
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-3xs);
  min-inline-size: 0;
}

.row-title {
  font-size: var(--theme-size-step-1);
  font-weight: 700;
  line-height: 1.2;
}

.row-sub {
  color: var(--theme-text-secondary);
  font-size: var(--theme-size-step--1);
}

.row-guests,
.row-table {
  grid-column: 2;
  color: var(--theme-text-secondary);
}

.row-guests {
  font-weight: 700;
}

@media (min-width: 52em) {
  .hero {
    padding-block-start: var(--theme-space-xl);
  }

  .hero h1 {
    font-size: var(--theme-size-step-6);
  }

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

  .welcome .hero {
    padding-block-end: 0;
  }

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

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

  .booking-row {
    grid-template-columns: auto minmax(0, 4fr) minmax(0, 1fr) minmax(0, 3fr);
    align-items: center;
  }

  .row-guests,
  .row-table {
    grid-column: auto;
  }
}
