/* Radar Bandi: the site's stylesheet.
   One idea runs through it: a call is a blip on a radar, and the closer it sits to the centre the more it is for you.
   The look is the one the home page set: flat shapes with a corner cut at 45 degrees, thin lines, large heavy titles,
   a small line in the accent that names what follows, and one colour, a radar's green, for what acts and what fits.
   It comes in two looks, light and dark, with the same shapes: the system's choice by default, or the one a person
   picked at the foot of a page. Everything else stays quiet, so that the three things a person decides on (is it for
   us, by when, what is in the way) are the loudest on the page. The dial is an inline SVG the server draws. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url("fonts/onest.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Colour, the light look. Each colour has one job and is named after it. `--ink` is the words; `--paper` a card and
     `--mist` the page under it; `--line` divides, `--edge` outlines what can be written in or pressed. The accent is a
     radar's green: `--accent` fills (always with `--on-accent` words on it), `--accent-line` draws lines and marks,
     `--accent-ink` writes words; `--action` (what acts: links) and `--good` («fa per voi») are that green. `--mark`
     (yellow) is what marks: the blip, what is new, what is in the way. `--alert` (red) says "soon" and "wrong". A tint
     is the same colour as a background for words. The dark look below gives the same names other values. */
  color-scheme: light dark;

  --ink: #14171c;
  --ink-soft: #3b414b;
  --muted: #5a616d;
  --paper: #ffffff;
  --mist: #eef0f3;
  --line: #d9dde3;
  --edge: #7c838f;
  --accent: #57ff65;
  --accent-line: #0e9033;
  --accent-ink: #0a7d2c;
  --on-accent: #14171c;
  --action: var(--accent-ink);
  --action-deep: #065c1f;
  --action-tint: #e2f6e6;
  --mark: #fdc700;
  --mark-ink: #8a6500;
  --mark-tint: #fff4c4;
  --good: var(--accent-ink);
  --good-tint: #e2f6e6;
  --alert: #c4161c;
  --alert-tint: #fde8e8;
  --on-alert: #ffffff;

  /* The decoration: the dots of a pattern, and the terrain of the home page's scene, a picture of light contour lines
     that the light look turns dark without changing its green. */
  --dots: rgb(20 23 28 / 0.14);
  --dots-strong: rgb(20 23 28 / 0.2);
  --terrain-filter: invert(1) hue-rotate(180deg);
  --terrain-opacity: 0.55;

  /* Type. A display face with some neighbourhood character for titles and figures; a calm, open face with plain zeros
     for everything a person has to read carefully: amounts in euro are full of zeros, and a slashed zero gets in the way. */
  --display: "Bricolage Grotesque", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem);

  /* Space. Every distance on the site is one of these eight: what belongs together sits one or two steps apart, what
     is a new subject sits six or seven. A value that is not on the scale is a mistake. */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;

  /* The inside of a box (a card, a panel, a section of a form) and the gap between two boxes of a list. */
  --pad: var(--s-5);
  --gap: var(--s-4);

  /* The corner a card has cut away, at its top right, as long on each side as --s-5. A card is drawn by its background,
     so the cut takes nothing away from what is inside it: a focus ring at its edge stays whole. */
  --corner: calc(var(--s-5) * 0.7071);
  --card: linear-gradient(225deg, transparent var(--corner), var(--paper) calc(var(--corner) + 0.5px));

  --radius: 0;
  --measure: 72rem;
  --control: 2.75rem;
}

/* The dark look: the one the system asks for, unless the person chose the light one, or the one the person chose. The
   two lists are the same list; a colour changed in one is changed in the other. */
:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --ink: #ffffff;
  --ink-soft: #d5d9e0;
  --muted: #a3a9b4;
  --paper: #1d2128;
  --mist: #14171c;
  --line: #343a44;
  --edge: #6e7684;
  --accent-line: #57ff65;
  --accent-ink: #57ff65;
  --action-deep: #a6ffad;
  --action-tint: #15301c;
  --mark-ink: #fdc700;
  --mark-tint: #3d3410;
  --good-tint: #12351f;
  --alert: #ff7a7f;
  --alert-tint: #401a1c;
  --on-alert: #14171c;
  --dots: rgb(255 255 255 / 0.1);
  --dots-strong: rgb(255 255 255 / 0.16);
  --terrain-filter: none;
  --terrain-opacity: 0.5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --ink: #ffffff;
    --ink-soft: #d5d9e0;
    --muted: #a3a9b4;
    --paper: #1d2128;
    --mist: #14171c;
    --line: #343a44;
    --edge: #6e7684;
    --accent-line: #57ff65;
    --accent-ink: #57ff65;
    --action-deep: #a6ffad;
    --action-tint: #15301c;
    --mark-ink: #fdc700;
    --mark-tint: #3d3410;
    --good-tint: #12351f;
    --alert: #ff7a7f;
    --alert-tint: #401a1c;
    --on-alert: #14171c;
    --dots: rgb(255 255 255 / 0.1);
    --dots-strong: rgb(255 255 255 / 0.16);
    --terrain-filter: none;
    --terrain-opacity: 0.5;
  }
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
}

/* Nothing has a margin of its own: the distance between two things is decided where they meet (see "The rhythm of a
   page"). The reset has no specificity, so those rules, which have none either, win by coming later. */
:where(h1, h2, h3, p, ul, ol, dl, dd, figure) {
  margin: 0;
}

/* What the page hides stays hidden: a rule that gives an element its `display` (every button has one) would otherwise
   win over the browser's own rule for the `hidden` attribute, and show a button the page meant to keep back. */
[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-2);
  font-weight: 800;
}

h3 {
  font-size: var(--step-1);
}

a {
  color: var(--action);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--action-deep);
  text-decoration-thickness: 0.16em;
}

:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* The small line that names what follows: in the accent, small, spaced capitals. */
.eyebrow,
.kicker {
  color: var(--accent-ink);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ───────── The bar: the brand and the navigation, on the page itself ───────── */

.band {
  position: relative;
  z-index: 5;
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-6);
  padding-block: var(--s-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--ink);
}

.brand .dial {
  width: 1.75rem;
  height: 1.75rem;
}

/* The brand's blip is the radar's green, as in the icon of the browser's tab: the yellow one marks the calls. */
.brand .dial-blip {
  fill: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-1) var(--s-5);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.nav a,
.nav button {
  display: inline-block;
  min-height: 0;
  padding: var(--s-2) 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  clip-path: none;
}

.nav button::before,
.nav button::after {
  content: none;
}

.nav a:hover,
.nav button:hover {
  border-bottom-color: var(--ink);
  background: none;
  color: var(--ink);
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--accent-line);
}

.nav .nav-quiet a,
.nav .nav-quiet button {
  color: var(--ink-soft);
  font-weight: 400;
}

/* "Esci" is a form, because leaving changes something: its button reads like the links next to it. */
.nav form {
  display: inline;
  margin: 0;
}

/* The way in, for a visitor: a filled button in the accent, both corners cut. Under the pointer it turns to ink. */
.nav a[href="/accedi"] {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  height: 2.25rem;
  padding: 0 var(--s-4);
  border: 0;
  background: var(--rest);
  color: var(--on-rest);
  font-weight: 500;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));

  --rest: var(--accent);
  --on-rest: var(--on-accent);
  --fill: var(--ink);
  --on-fill: var(--mist);
  --c: 0.625rem;
}

.nav a[href="/accedi"]:is(:hover, :focus-visible) {
  border: 0;
  background: var(--rest);
  color: var(--on-fill);
}

/* ───────── The menu of a narrow screen: three bars that open the navigation over the whole window ───────── */

/* The button is shown by the site's script, and only a narrow screen has it. Without the script the navigation stays
   in sight, on a second line under the brand. */
.menu-button {
  display: none;
}

@media (width <= 52rem) {
  .has-menu .topbar {
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
  }

  .has-menu .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--control);
    height: var(--control);
    min-height: 0;
    margin-right: calc(var(--s-2) * -1);
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    clip-path: none;
  }

  .menu-button::before,
  .menu-button::after {
    content: none;
  }

  /* Three bars: the middle one is the element, the other two are drawn above and under it. Open, the middle one goes
     and the other two cross. */
  .menu-bars,
  .menu-bars::before,
  .menu-bars::after {
    display: block;
    width: var(--s-5);
    height: 2px;
    background: currentColor;
  }

  .menu-bars {
    position: relative;
  }

  .menu-bars::before,
  .menu-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-bars::before {
    top: -7px;
  }

  .menu-bars::after {
    top: 7px;
  }

  .menu-open .menu-bars {
    background: transparent;
  }

  .menu-open .menu-bars::before {
    top: 0;
    rotate: 45deg;
  }

  .menu-open .menu-bars::after {
    top: 0;
    rotate: -45deg;
  }

  /* Closed, the navigation is out of the page. Open, the bar fills the window and the navigation is a column of large
     links under the brand, the way in last. The page behind does not scroll. */
  .has-menu nav {
    display: none;
    width: 100%;
  }

  .band.menu-open {
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow-y: auto;
    background: var(--mist);
  }

  .menu-open nav {
    display: block;
  }

  .menu-open .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-5);
    padding-block: var(--s-7);
    overflow: visible;
    font-family: var(--display);
    font-size: var(--step-3);
  }

  .menu-open .nav a[href="/accedi"] {
    font-family: var(--body);
    font-size: var(--step-0);
  }

  .menu-locked {
    overflow: hidden;
  }
}

@media (width <= 52rem) and (prefers-reduced-motion: no-preference) {
  .menu-bars,
  .menu-bars::before,
  .menu-bars::after {
    transition:
      rotate 0.2s ease,
      top 0.2s ease,
      background-color 0.2s ease;
  }
}

/* ───────── The head of a page: the small line, a large title, the sentence under it ───────── */

/* Under the bar, over the contour lines of the home page's terrain, fading towards the words on the left. A line closes
   it. */
.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: calc(var(--s-8) * -1) 0 0 35%;
  z-index: -1;
  background: url("home-terrain.webp") left center / cover no-repeat;
  opacity: var(--terrain-opacity);
  filter: var(--terrain-filter);
  mask-image: linear-gradient(to right, transparent, #000 45%);
  pointer-events: none;
}

.hero {
  padding-block: var(--s-6) var(--s-7);
}

.eyebrow {
  margin-bottom: var(--s-3);
}

.eyebrow a {
  color: inherit;
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-line {
  max-width: 46rem;
  margin-top: var(--s-4);
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.45;
}

.hero-line strong {
  color: var(--ink);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-5);
}

/* The first thing a keyboard reaches: a way past the navigation. Out of sight until it has the focus. */
.skip {
  position: absolute;
  top: var(--s-3);
  left: -999rem;
  z-index: 30;
  padding: var(--s-2) var(--s-4);
  background: var(--mark);
  color: var(--on-accent);
  font-weight: 700;
}

.skip:focus {
  left: var(--s-3);
}

/* ───────── The dial: three rings and a blip. Nearer the centre means nearer to what the association looks for ───────── */

.dial {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--ink);
}

.dial-ring {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.4;
  stroke-width: 1.25;
}

/* The inner ring is where "fa per voi" lives: it turns green only when the blip is inside it. */
.dial-core {
  fill: var(--good-tint);
  stroke: var(--accent-line);
  stroke-width: 1.75;
}


.dial-blip {
  fill: var(--mark);
  stroke: var(--ink);
  stroke-width: 1.75;
}

.band .dial-ring {
  stroke-opacity: 0.7;
}

.dial-large {
  width: 4.5rem;
  height: 4.5rem;
}

/* ───────── Page body ───────── */

/* The page fills the window, so that on a short page the footer stays at the bottom instead of floating under two lines. */
body > main {
  flex: 1 0 auto;
}

.main {
  padding-block: var(--s-7) var(--s-8);
}

/* The rhythm of a page. Two things that follow each other stand one step of the scale apart; a heading takes a breath
   from what came before and stays close to what it introduces. Zero specificity, so that a component which sets its
   own distance keeps it. */
:where(.main, .main section, .prose, .narrow, .panel, .card-section, .aside, .verdict > div) > :where(* + *) {
  margin-top: var(--s-4);
}

:where(.main) > :where(* + *) {
  margin-top: var(--s-5);
}

:where(.main, .prose, .narrow) > :where(* + h2),
:where(.main) > :where(* + section),
:where(.main) > :where(section + *) {
  margin-top: var(--s-7);
}

:where(.main, .prose, .narrow, .panel) > :where(* + h3) {
  margin-top: var(--s-5);
}

:where(h2) + :where(*) {
  margin-top: var(--s-4);
}

:where(h3) + :where(*) {
  margin-top: var(--s-2);
}

/* ───────── Cards: a filled shape on the page, no outline, the top right corner cut ───────── */

.call,
.panel,
.toolbar,
.stat,
.facts,
.rows,
.table-wrap,
fieldset {
  background: var(--card);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 0;
  list-style: none;
}

.filters a {
  display: inline-block;
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--edge);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
}

.filters a:hover {
  background: var(--paper);
  color: var(--ink);
}

.filters a[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--mist);
}

.group + .group {
  margin-top: var(--s-7);
}

.group-title {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  font-size: var(--step-2);
}

.group-count {
  color: var(--muted);
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 400;
  letter-spacing: 0;
}

.group-note {
  margin-top: var(--s-2);
  color: var(--muted);
}

.calls {
  display: grid;
  gap: var(--gap);
  padding: 0;
  list-style: none;
}

/* A call on the list: the dial, what it is, and when. */
.call {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0 var(--s-5);
  align-items: start;
  padding: var(--pad);
}

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

.call-title a {
  color: var(--ink);
  text-decoration: none;
}

.call-title a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.call-meta {
  margin-top: var(--s-1);
  color: var(--muted);
  font-size: var(--step--1);
}

.call-summary {
  max-width: 62ch;
  margin-top: var(--s-3);
  color: var(--ink-soft);
}

/* What is in the way, under the summary: its name in yellow capitals, as on the card of the home page. */
.call-todo {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-2);
  margin-top: var(--s-3);
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.call-todo b {
  color: var(--mark-ink);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.call-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-5);
  margin-top: var(--s-3);
  font-size: var(--step--1);
}

/* The deadline is the second thing a person looks for: a date they can read from across the room. */
.when {
  width: 9.5rem;
  padding-left: var(--s-5);
  border-left: 1px solid var(--line);
  text-align: right;
}

.when-day {
  display: block;
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.when-month {
  display: block;
  margin-top: var(--s-1);
  color: var(--ink-soft);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.when-left {
  display: block;
  margin-top: var(--s-1);
  color: var(--muted);
  font-size: var(--step--1);
}

.when-open {
  display: block;
  margin-left: auto;
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.3;
}

.when-soon .when-day,
.when-soon .when-left {
  color: var(--alert);
}

.when-soon .when-left {
  font-weight: 700;
}

.amount {
  display: block;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: var(--s-6) var(--pad);
  border: 1px dashed var(--edge);
  color: var(--ink-soft);
}

/* ───────── A long list: views, search, order, pages ─────────
   An association with a broad profile can have hundreds of proposals. The list is never longer than one page of
   twenty, the order is the person's choice, and what was put aside stays out of the way but can be found again. */

.tabs {
  display: flex;
  gap: var(--s-6);
  padding: 0;
  border-bottom: 1px solid var(--line);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.tabs a {
  display: inline-block;
  padding: var(--s-2) 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}

.tabs a:hover {
  border-bottom-color: var(--edge);
  color: var(--ink);
}

.tabs a[aria-current="page"] {
  border-bottom-color: var(--accent-line);
  color: var(--ink);
  font-weight: 700;
}

.tabs .count {
  margin-left: var(--s-1);
  color: var(--muted);
  font-weight: 400;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) repeat(3, minmax(9rem, 1fr)) auto;
  gap: var(--s-3) var(--s-4);
  align-items: end;
  padding: var(--s-4) var(--pad);
}

.toolbar label {
  margin-top: 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* A line that answers what the person just did: on a card, with a yellow edge. */
.notice {
  padding: var(--s-4) var(--pad);
  border-left: 3px solid var(--mark);
  background: var(--paper);
}

.notice strong {
  font-weight: 700;
}

.result-line {
  color: var(--muted);
  font-size: var(--step--1);
}

.result-line + .group,
.result-line + .calls {
  margin-top: var(--s-4);
}

.badge-new {
  display: inline-block;
  margin-left: var(--s-2);
  padding: 0.1rem var(--s-2);
  background: var(--mark);
  color: var(--on-accent);
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.15em;
}

/* Under each call: where to read more on the left, what to do with it on the right. */
.call-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
}

.call-actions .call-links {
  margin-top: 0;
}

.call-keep {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-6);
}

.pager-info {
  color: var(--muted);
  font-size: var(--step--1);
}

/* ───────── Tables ───────── */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

th,
td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

/* The names of the columns: the small spaced capitals of the site, over a line a little stronger than the rows'. */
thead th {
  border-bottom: 1px solid var(--edge);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody th {
  font-weight: 600;
}

/* A link in a table is one of many, row after row: in ink, underlined, so the column reads as a list and not as a wall
   of colour. The pointer turns it to the accent. */
td a:not(.button, .button-plain),
tbody th a {
  color: var(--ink);
}

td a:not(.button, .button-plain):hover,
tbody th a:hover {
  color: var(--accent-ink);
}

tbody tr:last-child > * {
  border-bottom: 0;
}

/* A form in a cell is a button on a row: the buttons of one row stand side by side and never break in two lines. */
td:has(> form) {
  white-space: nowrap;
}

td > form {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}

td > form + form {
  margin-left: var(--s-2);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

caption {
  caption-side: top;
  padding: var(--s-3) var(--s-4);
  color: var(--ink-soft);
  font-size: var(--step--1);
  font-weight: 700;
  text-align: left;
}

/* A short list of names and their values: who wrote, when, from where. The names line up on the left. */
dl:not([class]) {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--s-2) var(--s-5);
}

dl:not([class]) dt {
  color: var(--muted);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--gap);
}

.stat {
  padding: var(--s-4) var(--pad);
}

.stat-value {
  display: block;
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: var(--step--1);
}

/* ───────── The public pages: what the service is, in three moves ───────── */





.prose {
  max-width: 44rem;
}

.prose ul,
.prose ol {
  padding-left: var(--s-5);
}

.prose li + li {
  margin-top: var(--s-2);
}

.narrow {
  max-width: 30rem;
}

/* A page of one short column, as the pages of the way in: the head and the column stand in the middle of the page, and
   so do the line that answers what was done and the list of what to correct. Inside the column a form keeps its names
   on the left, where the eye looks for them. */
.centered .hero {
  text-align: center;
}

.centered .hero h1,
.centered .hero-line,
.centered .main > :is(.narrow, .form, .notice, .error-summary) {
  margin-inline: auto;
}

.centered .main > :is(.notice, .error-summary) {
  max-width: 30rem;
}

.centered .page-head::before {
  inset: calc(var(--s-8) * -1) 0 0;
  mask-image: linear-gradient(to right, transparent, #000 25%, #000 75%, transparent);
}

/* ───────── Buttons: low, flat, square, with a corner cut at 45 degrees ───────── */

/* A button is a filled shape: `--rest` is the colour it has and `--on-rest` its words, `--fill` the colour it takes
   under the pointer or the focus and `--on-fill` its words then, `--c` how much of a corner is cut. The one to press
   is in the accent, with the corner at the bottom left cut; the others say below how they differ. */
.button,
button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  overflow: hidden;
  min-height: var(--control);
  padding: var(--s-2) var(--s-5);
  border: 0;
  border-radius: var(--radius);
  background: var(--rest);
  color: var(--on-rest);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));

  --rest: var(--accent);
  --on-rest: var(--on-accent);
  --fill: var(--ink);
  --on-fill: var(--mist);
  --c: 0.625rem;
}

/* The cuts a page may choose instead: the corner at the top right, or both. The inside of an outline button (its
   ::before) is cut the same way. */
.cut-bl,
.cut-bl::before {
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}

.cut-tr,
.cut-tr::before,
.button-quiet,
.button-quiet::before,
.button-danger,
.button-danger::before {
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%);
}

.cut-both,
.cut-both::before {
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}

/* Under the pointer, or with the focus, the words take the colour that goes on the fill. With the focus a thin frame
   inside the button shows it too, in the colour of the words. */
.button:is(:hover, :focus-visible),
button:is(:hover, :focus-visible) {
  color: var(--on-fill);
}

.button:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -5px;
}

/* How it takes its colour: a full circle grows from where the pointer came in (site.js writes the point; without it,
   the middle) until it covers the button, and closes on the point where the pointer leaves. It is wide enough to reach
   the far corner from any point of the edge, and it is drawn behind the words. */
@media (prefers-reduced-motion: no-preference) {
  .button::after,
  button::after,
  .nav a[href="/accedi"]::after {
    content: "";
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    z-index: -1;
    width: 250%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--fill);
    translate: -50% -50%;
    scale: 0;
    transition: scale 0.45s ease-in;
    pointer-events: none;
  }

  .button:is(:hover, :focus-visible)::after,
  button:is(:hover, :focus-visible)::after,
  .nav a[href="/accedi"]:is(:hover, :focus-visible)::after {
    scale: 1;
    transition: scale 0.65s ease-out;
  }
}

/* For a person who asked for less motion there is no circle: the button takes its colour at once. */
@media (prefers-reduced-motion: reduce) {
  .button:is(:hover, :focus-visible),
  button:is(:hover, :focus-visible),
  .nav a[href="/accedi"]:is(:hover, :focus-visible),
  :is(.button-quiet, .button-danger):is(:hover, :focus-visible)::before {
    background: var(--fill);
  }
}

/* The outline one: a thin edge and words in ink; under the pointer it fills with ink. A border would be cut away with
   the corner, so the edge is the button itself and its inside is a shape one pixel smaller, in the colour of what is
   under the button, cut a little less so that the slanted edge is as thin as the straight ones. */
.button-quiet,
.button-danger {
  --rest: var(--edge);
  --on-rest: var(--ink);
  --fill: var(--ink);
  --on-fill: var(--mist);
}

.button-quiet::before,
.button-danger::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -2;
  background: var(--surface, var(--mist));

  --c: calc(0.625rem - 0.6px);
}

/* What is inside a card has the card under it. */
:is(.call, .panel, .toolbar, .stat, .facts, .rows, .table-wrap, fieldset, .notice) {
  --surface: var(--paper);
}

/* What cannot be taken back (deleting an association, an account) is an outline in red: never the button that stands
   out. Under the pointer it fills with red. */
.button-danger {
  --rest: var(--alert);
  --on-rest: var(--alert);
  --fill: var(--alert);
  --on-fill: var(--on-alert);
}

/* A favourite keeps its star filled, so the list says which ones were chosen without opening them. */
.button-on {
  --rest: var(--mark);
  --on-rest: var(--on-accent);
}

/* A link that does something small: words, underlined, no shape. */
.button-plain {
  min-height: 0;
  padding: var(--s-1);
  background: none;
  color: var(--ink-soft);
  font-weight: 400;
  text-decoration: underline;
  clip-path: none;
}

.button-plain::before,
.button-plain::after {
  content: none;
}

.button-plain:is(:hover, :focus-visible) {
  background: none;
  color: var(--alert);
}

.button-plain:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

.button-small {
  min-height: 2.25rem;
  padding: var(--s-1) var(--s-3);
  font-size: var(--step--1);

  --c: var(--s-2);
}

.button-plain.button-small {
  min-height: 0;
  padding: var(--s-1);
}

.button-wide {
  width: 100%;
}

/* ───────── The page of one call ───────── */

.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: var(--s-6);
  align-items: start;
}

.panel {
  padding: var(--pad);
}

.panel + .panel,
.panel + .facts,
.facts + .panel {
  margin-top: var(--gap);
}

/* The verdict: where the blip sits, in words, and what stands in the way. Its edge in the accent, as the card of the
   home page. */
.verdict {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 var(--s-5);
  border-left: 3px solid var(--accent-line);
}

.verdict > :where(* + *) {
  margin-top: 0;
}

.verdict-level {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.verdict-score {
  margin-top: var(--s-1);
  color: var(--muted);
  font-size: var(--step--1);
}

.verdict-reason {
  margin-top: var(--s-4);
}

.todo {
  margin-top: var(--s-2);
  padding: 0;
  list-style: none;
}

.todo-title {
  margin-top: var(--s-4);
  color: var(--mark-ink);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.todo li {
  position: relative;
  padding-left: var(--s-5);
}

.todo li + li {
  margin-top: var(--s-2);
}

.todo li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0.15rem;
  width: 0.6rem;
  height: 0.6rem;
  border: 2px solid var(--mark);
  border-radius: 50%;
}

.fineprint {
  color: var(--muted);
  font-size: var(--step--1);
}

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

.facts div {
  padding: var(--s-4) var(--pad);
}

.facts div + div {
  border-left: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.facts dd {
  margin-top: var(--s-1);
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.facts small {
  display: block;
  margin-top: var(--s-1);
  color: var(--muted);
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: 0;
}

.facts .soon,
.facts .soon small {
  color: var(--alert);
}

.card-section + .card-section {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.card-section h2 {
  font-size: var(--step-1);
}

.card-section p {
  max-width: 66ch;
}

.plain-list {
  padding-left: var(--s-5);
}

.plain-list li + li {
  margin-top: var(--s-2);
}

/* Requirements are things to tick off before applying, so they look like it. */
.checks {
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding: var(--s-3) 0 var(--s-3) var(--s-6);
  border-top: 1px solid var(--line);
}

.checks li:first-child {
  padding-top: 0;
  border-top: 0;
}

.checks li:last-child {
  padding-bottom: 0;
}

.checks li::before {
  content: "";
  position: absolute;
  top: calc(var(--s-3) + 0.25em);
  left: 0;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid var(--edge);
}

.checks li:first-child::before {
  top: 0.25em;
}

.aside {
  position: sticky;
  top: var(--s-4);
}

.aside h2 {
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: 0;
}

.stack {
  display: grid;
  gap: var(--s-3);
}

.stack > :where(* + *),
.pair > :where(* + *) {
  margin-top: 0;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

.tally {
  color: var(--muted);
  font-size: var(--step--1);
}

/* Only the line under a call's actions: a table row may be called "source" too, and must not inherit this. */
p.source {
  color: var(--muted);
  font-size: var(--step--1);
  overflow-wrap: anywhere;
}

/* ───────── Forms ───────── */

.form {
  max-width: 44rem;
}

/* A form of many sections, as the profile of an association: wide enough for three fields side by side, each showing
   its whole choice. */
.form-wide {
  max-width: 58rem;
}

/* Its sections are numbered, as the steps of the home page: a person sees how far along the form they are. The number
   is decoration, so a screen reader is told nothing (the text after the slash), where the browser knows how. */
.form {
  counter-reset: section;
}

.form > fieldset[data-section] {
  counter-increment: section;
}

.form > fieldset[data-section] > legend::before {
  content: counter(section, decimal-leading-zero);
  content: counter(section, decimal-leading-zero) / "";
  display: block;
  margin-bottom: var(--s-2);
  color: var(--accent-ink);
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* The pieces of a form (a section, a field, the buttons at its end) stand a field's distance apart; a field's own
   parts say below how close they stay to each other. */
:where(.form) > :where(* + *) {
  margin-top: var(--s-5);
}

/* A section of a form is a card with its name inside, like every other card of the site. The legend is floated so
   that it sits inside the box instead of on its edge. */
fieldset {
  min-width: 0;
  margin: 0;
  padding: var(--pad);
  border: 0;
}

fieldset + fieldset,
fieldset + .form-end {
  margin-top: var(--s-5);
}

legend {
  float: left;
  width: 100%;
  margin-bottom: var(--s-4);
  padding: 0;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 800;
  line-height: 1.2;
}

legend + * {
  clear: left;
}

/* A field is its name, the place to write, and what helps: close to each other, and a step away from the next field. */
label {
  display: block;
  margin-top: var(--s-5);
  font-weight: 600;
}

legend + label,
.form > label:first-child,
.form > input[type="hidden"]:first-child + label,
.field-row label,
.toolbar label {
  margin-top: 0;
}

/* Every place to write looks the same, whatever kind of text it takes: a little deeper than what is around it, with an
   edge a person who sees little still finds. */
input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"], [type="button"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: var(--control);
  margin-top: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--mist);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-soft);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent-line);
  outline-offset: 0;
}

.hint {
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: var(--step--1);
}

/* The same quiet sentence can open a page, under its tabs: there it keeps the page's own distance. */
.main > nav + .hint,
.main > .hint:first-child {
  margin-top: var(--s-5);
}

.error {
  margin-top: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-left: 3px solid var(--alert);
  background: var(--alert-tint);
  color: var(--alert);
  font-size: var(--step--1);
  font-weight: 700;
}

/* Fields side by side share their rows: the names end on one line, the places to write start on the next, and what
   helps comes under, whatever the length of a name. */
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0 var(--s-4);
  margin-top: var(--s-5);
}

legend + .field-row {
  margin-top: 0;
}

legend + .hint {
  margin-top: 0;
}

legend + .hint + * {
  margin-top: var(--s-4);
}

.field-row > div {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  align-content: start;
}

.field-row > div > label {
  align-self: end;
}

/* Fields that wrap onto a second line keep a field's distance from the first. */
@media (max-width: 44rem) {
  .field-row {
    row-gap: var(--s-5);
  }

  .field-row > div {
    display: block;
  }
}

/* ───────── Choices in a form: themes, regions ───────── */

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-3);
}

/* Radio buttons answer one question, often with a sentence each: they stand one under the other, never side by side. */
.choices:has(input[type="radio"]) {
  grid-template-columns: minmax(0, 1fr);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  margin-top: 0;
  font-weight: 400;
}

fieldset > .choice,
.field-row + .choice {
  margin-top: var(--s-4);
}

.choice + .choice {
  margin-top: var(--s-2);
}

.choices > .choice {
  margin-top: 0;
}

/* A choice in a list is a target as wide as its column, lit under the pointer, and tinted once chosen: a long list of
   themes or regions says at a glance which ones are ticked. */
.choices > .choice {
  margin-inline: calc(var(--s-2) * -1);
  padding: var(--s-1) var(--s-2);
  cursor: pointer;
}

.choices > .choice:hover {
  background: var(--mist);
}

.choices > .choice:has(input:checked) {
  background: var(--good-tint);
}

.choice input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.2rem 0 0;
  accent-color: var(--accent-line);
}

.form-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
}

fieldset > .form-end {
  margin-top: var(--s-5);
}

/* The list of what to correct, at the top of a form that came back. */
.error-summary {
  padding: var(--s-4) var(--pad);
  border-left: 3px solid var(--alert);
  background: var(--alert-tint);
}

.error-summary h2 {
  color: var(--alert);
  font-size: var(--step-1);
}

.error-summary ul {
  margin-top: var(--s-3);
  padding-left: var(--s-5);
}

.error-summary a {
  color: var(--alert);
  font-weight: 700;
}

[aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--alert);
}

/* "(facoltativo)" after the name of a field that may be left empty. */
.optional {
  color: var(--muted);
  font-weight: 400;
}

/* ───────── The ways in ───────── */

/* The page that signs a person in is one column: the address and its button first, because every account has an
   address; under a line that says "oppure", the ways that need no email, each as wide as the column. */
.ways-in {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-6);
}

/* A browser without passkeys keeps that button hidden, and a deployment may offer no provider: when no way is left
   to show, the line that announced them goes too. */
.ways-in:not(:has(.ways-in-list > :not([hidden]))) {
  display: none;
}

.or {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.or::before,
.or::after {
  flex: 1;
  border-top: 1px solid var(--line);
  content: "";
}

.ways-in-list {
  display: grid;
  gap: var(--s-3);
}

/* A way in is a link, a button, or a form with one button: each is as wide as the column. */
.ways-in-list > *,
.ways-in-list > form > button {
  width: 100%;
}

/* The six digits of an email, typed where the link was asked: large, evenly spaced, and no wider than they are. */
input.code {
  max-width: 14rem;
  font-family: var(--display);
  font-size: var(--step-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
}

/* ───────── Rows: a thing, what is known about it, what can be done ───────── */

/* A setting with a few things in it (the accounts that open this one) is a list of rows, not a table: the name on
   the left, what is known in the middle, the one action on the right. On a narrow screen a row wraps. */
.rows {
  padding: 0;
  list-style: none;
}

.rows > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  margin: 0;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
}

.rows > li:last-child {
  border-bottom: 0;
}

.row-name {
  min-width: 7rem;
  font-weight: 700;
}

.row-detail {
  flex: 1;
  color: var(--ink-soft);
  font-size: var(--step--1);
  overflow-wrap: anywhere;
}

.rows > li > form,
.rows > li > .button-quiet {
  margin-left: auto;
}

/* ───────── For who does not see the page, or does not use a mouse ───────── */

/* Read by a screen reader, shown to nobody: the name of the thing a repeated link or button acts on, a table's caption
   when the heading above already says it. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* An action on a card comes back to that card: it is shown, with room above it, so that the eye finds it too. */
:target {
  scroll-margin-top: var(--s-4);
}

.call:target,
tr:target {
  outline: 3px solid var(--mark);
  outline-offset: 2px;
}

/* A link that stands alone on its line is a target at least 24 pixels tall. */
.call-links a,
.pager a,
.footer-grid li a {
  display: inline-block;
  padding-block: 0.15rem;
}

/* ───────── Footer: the brand and whose service this is, two lists of links, the chooser of the look ───────── */

.footer {
  margin-top: var(--s-7);
  color: var(--muted);
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-7);
  padding-block: var(--s-7);
  border-top: 1px solid var(--line);
}

/* With two lists the columns stay where they are: the documents keep the last one. */
.footer-grid > nav:last-child {
  grid-column: 3;
}

.footer-grid .brand {
  font-size: var(--step-2);
}

.footer-grid .brand .dial {
  width: var(--s-6);
  height: var(--s-6);
}

.footer-about p {
  max-width: 24rem;
  margin-top: var(--s-4);
}

.footer-grid h2 {
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-grid ul {
  display: grid;
  gap: var(--s-1);
  margin-top: var(--s-4);
  padding: 0;
  list-style: none;
}

/* A link of the foot is quiet until the pointer or the focus is on it. */
.footer-grid li a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-grid li a:hover,
.footer-grid li a:focus-visible {
  color: var(--accent-ink);
  text-decoration: underline;
}

.footer-about a:not(.brand) {
  color: var(--ink-soft);
}

/* The chooser of the look: its name, and three buttons side by side as one control, the chosen one filled with ink. */
.theme-switch {
  padding-block: var(--s-4) var(--s-6);
  border-top: 1px solid var(--line);
}

.theme-switch fieldset {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  padding: 0;
  background: none;
}

.theme-switch legend {
  width: auto;
  margin: 0;
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 400;
}

.theme-switch-options {
  display: inline-flex;
}

.theme-switch button {
  min-height: 2.25rem;
  padding: var(--s-1) var(--s-4);
  border: 1px solid var(--edge);
  background: none;
  color: var(--ink-soft);
  font-size: var(--step--1);
  font-weight: 500;
  clip-path: none;
}

.theme-switch button + button {
  border-left: 0;
}

.theme-switch button::after {
  content: none;
}

.theme-switch button:hover {
  background: var(--paper);
  color: var(--ink);
}

.theme-switch button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--mist);
}

.theme-switch button:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

@media (width <= 52rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-6);
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-grid > nav:last-child {
    grid-column: auto;
  }
}

/* ───────── Small screens ───────── */

@media (max-width: 52rem) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
  }

  /* Every destination stays in sight: on a narrow screen without the menu the navigation takes a second line instead
     of hiding its end past the edge. */
  .nav {
    flex-wrap: wrap;
    width: 100%;
    overflow-x: visible;
  }

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

  .aside {
    position: static;
  }

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

  .facts div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar .toolbar-search {
    grid-column: 1 / -1;
  }

  .page-head::before {
    inset: 0;
    mask-image: linear-gradient(to bottom, transparent, #000 60%);
  }
}

@media (max-width: 36rem) {
  :root {
    --pad: var(--s-4);
  }

  .wrap {
    padding-inline: var(--s-4);
  }

  /* The date moves under the text and becomes one line: a phone has no room for a third column. */
  .call {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--s-4);
  }

  .when {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--s-1) var(--s-3);
    width: auto;
    margin-top: var(--s-4);
    padding: var(--s-4) 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .dial {
    width: 3rem;
    height: 3rem;
  }

  .when-day {
    font-size: 1.5rem;
  }

  .when-month,
  .when-left,
  .when-open,
  .amount {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .when-open {
    max-width: none;
  }

  .verdict {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--s-3);
  }

  .call-actions {
    grid-column: 1 / -1;
  }

  .pager {
    flex-wrap: wrap;
  }

  dl:not([class]) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  dl:not([class]) dd + dt {
    margin-top: var(--s-3);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a,
  input,
  select,
  textarea,
  .theme-switch button {
    transition:
      background-color 0.12s ease,
      border-color 0.12s ease,
      color 0.12s ease;
  }
}

@media print {
  .page-head {
    border-bottom: 0;
  }

  .page-head::before,
  .nav,
  .aside,
  .filters,
  .theme-switch {
    display: none;
  }
}
