/* ==========================================================================
   AMICO — components. Tokens live in theme.css.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* soft mesh behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 110vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 12% 4%, var(--bg-mesh-1), transparent 62%),
    radial-gradient(38vw 38vw at 88% 0%, var(--bg-mesh-2), transparent 60%),
    radial-gradient(46vw 46vw at 62% 42%, var(--bg-mesh-3), transparent 64%);
  filter: blur(6px);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

.icon { flex: none; }
.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.4rem, 720px); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.muted { color: var(--text-mute); }
.soft { color: var(--text-soft); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: .6rem; }
.row > .input, .row > .select { min-width: 0; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }

.eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--text-mute);
}
.gradient-text {
  background: linear-gradient(100deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(1.5) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.02em; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: var(--brand-ink); box-shadow: var(--shadow-brand);
}
/* the stacked name and tagline carry their own leading: the 1.55 the body
   sets is meant for paragraphs, and here it only pushed the two lines apart */
.brand__lines { display: flex; flex-direction: column; justify-content: center; }
.brand__text { font-size: 1.05rem; line-height: 1.2; }
.brand__tag { font-size: .68rem; line-height: 1.2; color: var(--text-mute); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.05rem; border-radius: 999px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 650; font-size: .94rem; cursor: pointer; white-space: nowrap;
  /* a button never grows past what holds it: a long label in a long language
     (German) used to push the whole page sideways */
  max-width: 100%;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
/* …and where the label is a sentence rather than a word, it wraps instead */
.btn--wrap { white-space: normal; text-align: center; overflow-wrap: anywhere; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0) scale(.99); }
.btn--primary {
  --btn-bg: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--accent) 65%, var(--brand)));
  --btn-fg: var(--brand-ink); --btn-bd: transparent;
  box-shadow: var(--shadow-brand);
}
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: transparent; }
.btn--ghost { --btn-bg: transparent; --btn-bd: var(--border-strong); }
.btn--quiet { --btn-bg: transparent; --btn-bd: transparent; color: var(--text-soft); }
.btn--danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn--block { width: 100%; }
.btn--lg { padding: .85rem 1.5rem; font-size: 1.02rem; }
.btn--sm { padding: .4rem .8rem; font-size: .85rem; }
.btn--icon { padding: .42rem; aspect-ratio: 1; }  /* label lives in the tooltip */
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-1);
}
.card--flush { padding: 0; overflow: hidden; }
.card--glass { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(12px); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .22rem .62rem; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border);
}
.pill--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.pill--warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.pill--danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.pill--brand { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }

/* ---------- forms ---------- */
.field { display: block; }
.field__label { display: block; font-size: .86rem; font-weight: 650; color: var(--text-soft); margin-bottom: .35rem; }
.input, .select, .textarea {
  width: 100%; padding: .74rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
  background: var(--surface);
}
.textarea { min-height: 90px; resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.checkbox input { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); margin-top: .15rem; }

/* ---------- hit page: the whole product, on one screen ---------- */
.hit { padding: clamp(1.5rem, 4vw, 3rem) 0 3rem; }
.hit__object {
  display: inline-flex; align-items: center; gap: .6rem; padding: .4rem .9rem .4rem .5rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.hit__object-icon {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
/* the owner's own name for the object, under the kind and only where they
   switched it on. Softer than the kind because it is the second thing read,
   and it wraps: "cancello sul retro, quello verde" is a name somebody types */
.hit__object-name {
  display: block; font-size: .84rem; line-height: 1.25; color: var(--text-soft);
  overflow-wrap: anywhere;
}
.options { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.option {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .75rem;
  padding: 1.05rem 1rem 1.1rem; min-height: 128px; text-align: left; cursor: pointer;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-1);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  /* the severity strip is clipped by the card itself: a 4px-tall band cannot
     reproduce a 26px corner on its own, and its ends escaped the curve */
  overflow: hidden;
}
.option::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: var(--opt-color, var(--brand)); opacity: .9;
}
.option:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--opt-color, var(--brand)) 45%, var(--border)); }
.option:active { transform: translateY(-1px) scale(.99); }
.option__icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--opt-color, var(--brand)) 14%, transparent);
  color: var(--opt-color, var(--brand));
}
.option__text { font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.option--info { --opt-color: var(--info); }
.option--warn { --opt-color: var(--warn); }
.option--urgent { --opt-color: var(--danger); }

.help { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.help > summary {
  display: flex; align-items: center; gap: .45rem; padding: .6rem .8rem; cursor: pointer;
  font-size: .85rem; font-weight: 650; color: var(--text-soft); list-style: none;
}
.help > summary::-webkit-details-marker { display: none; }
.help[open] > summary { border-bottom: 1px solid var(--border); }
.help > *:not(summary) { padding-inline: .85rem; }
.help > *:last-child { padding-bottom: .8rem; }
.help__steps { margin: .7rem 0 .5rem; padding-left: 2rem; display: grid; gap: .4rem; font-size: .85rem; color: var(--text-soft); }
.help__steps li::marker { color: var(--brand); font-weight: 700; }

.note-toggle { border: 1px dashed var(--border-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.note-toggle > summary {
  display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; cursor: pointer;
  font-size: .9rem; font-weight: 650; color: var(--text-soft); list-style: none;
}
.note-toggle > summary::-webkit-details-marker { display: none; }
.note-toggle[open] > summary { border-bottom: 1px solid var(--border); }
.note-toggle .textarea { border: 0; background: transparent; border-radius: 0 0 var(--radius) var(--radius); }
.note-toggle .textarea:focus { box-shadow: none; }

.result { display: grid; place-items: center; gap: 1.2rem; padding: clamp(2rem,7vw,4.5rem) 0; text-align: center; }
.result__badge {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok);
  animation: pop 420ms cubic-bezier(.2,1.4,.4,1);
}
.result__badge--warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.result__badge--danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
@keyframes pop { from { transform: scale(.6); opacity: 0 } to { transform: scale(1); opacity: 1 } }

/* ---------- landing ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero__sub { font-size: clamp(1rem, .95rem + .35vw, 1.2rem); color: var(--text-soft); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.phone {
  position: relative; margin-inline: auto; width: min(320px, 78vw); aspect-ratio: 9/17.5;
  border-radius: 42px; padding: 12px; background: var(--surface-3);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-2);
}
.phone__screen {
  height: 100%; border-radius: 32px; background: var(--surface); overflow: hidden;
  display: flex; flex-direction: column; gap: .55rem; padding: 1.1rem .9rem;
  border: 1px solid var(--border);
}
.phone__notch { position: absolute; top: 18px; left: 50%; translate: -50% 0; width: 92px; height: 22px; border-radius: 999px; background: var(--surface-3); }
.notif {
  display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .75rem; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-1);
  animation: slidein 600ms both cubic-bezier(.2,.9,.3,1);
}
.notif:nth-child(2) { animation-delay: .5s } .notif:nth-child(3) { animation-delay: 1s }
.notif__icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.notif__title { font-size: .82rem; font-weight: 750; }
.notif__body { font-size: .78rem; color: var(--text-soft); }
@keyframes slidein { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
/* a grid item's automatic minimum is its content: without this an e-mail
   address with no break opportunity widens the column past the viewport */
.grid-3 > * { min-width: 0; }
/* The three steps. The number is the loudest thing on the card on purpose: it
   is what makes three cards read as a sequence rather than as three features,
   and a sequence is what somebody needs before they decide to start one. */
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps > * { min-width: 0; }
.step { display: flex; gap: 1rem; align-items: flex-start; position: relative; overflow: hidden; }
.step__num {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 800; line-height: 1; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--accent));
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent);
}
.step__title { font-size: 1.12rem; line-height: 1.2; }
.step__body { color: var(--text-soft); font-size: .94rem; line-height: 1.6; margin-top: .35rem; }
/* the same three cards, tighter, where they are a reminder and not the pitch */
.steps--compact .step { padding: 1.1rem; gap: .85rem; }
.steps--compact .step__num { width: 38px; height: 38px; border-radius: 13px; font-size: 1.08rem; }
.steps--compact .step__title { font-size: 1.02rem; }
.steps--compact .step__body { font-size: .9rem; }
/* the icon sits above the text, not in a narrow column of its own */
.type-card { display: flex; flex-direction: column; gap: .85rem; }
.type-card > * { min-width: 0; }
.type-card h3 { line-height: 1.25; }
/* a card that is itself a link: it says so by moving, and by the arrow in the
   corner, rather than by holding a button that repeats where it goes */
.type-card--link { position: relative; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.type-card--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.type-card--link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.type-card__go {
  position: absolute; top: 1.25rem; right: 1.25rem; display: inline-flex;
  color: var(--text-mute); transition: color var(--transition), transform var(--transition);
}
/* the corner arrow is the only mark that says the whole card is a link, so it
   is drawn heavier than the icons elsewhere — here rather than in the macro,
   which would thicken every icon in the app to fix one of them */
.type-card__go .icon { stroke-width: 2.2; }
.type-card--link:hover .type-card__go { color: var(--brand); transform: translateX(3px); }
/* the kind of object is a mark and a name read as one thing: stacked, the icon
   sat alone on a line of its own and the name started the paragraph. The right
   padding keeps the longest name off the corner arrow. */
.type-card__head { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.type-card--link .type-card__head { padding-right: 1.7rem; }
.type-card__icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  flex: 0 0 auto; background: color-mix(in srgb, currentColor 14%, var(--surface-2));
}
/* the same tile at the head of an object's own page, where it is the subject
   and not a list item. It scales with the viewport instead of holding 112px on
   a phone, where it would leave the title a column three words wide. */
.type-card__icon--xl {
  width: clamp(72px, 18vw, 112px); height: clamp(72px, 18vw, 112px);
  border-radius: clamp(20px, 5vw, 30px);
}
.type-card__icon--xl .icon { width: 50%; height: 50%; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip { font-size: .78rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); }

/* ---------- type picker (create form) ---------- */
/* Only a column gap: the rows are spaced by the options' own margin instead,
   because a closed preview panel is still a row of this grid — a row gap would
   leave its blank space behind between every pair of options. */
.type-pick { display: grid; gap: 0 .6rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.type-opt {
  display: flex; gap: .7rem; align-items: center; padding: .8rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color var(--transition), background var(--transition);
}
.type-opt { margin-bottom: .6rem; }
.type-opt input { accent-color: var(--brand); }
.type-opt:hover { border-color: var(--border-strong); }
.type-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.type-opt__name { font-weight: 650; font-size: .92rem; }
/* The options of the chosen type, shown in place — one full-width row of the
   grid. It is never display:none, because a box that is not laid out cannot
   animate: the height is what opens and closes (0fr → 1fr), so choosing another
   kind closes the panel that was open and opens the new one in one movement. */
.type-peek {
  grid-column: 1 / -1; display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--peek-time, .3s) ease, margin-bottom var(--peek-time, .3s) ease;
}
/* hidden, not merely clipped: a closed panel is out of reach of the tab key and
   of a screen reader. The delay keeps it visible for as long as it is closing. */
.type-peek__clip {
  overflow: hidden; min-height: 0;
  visibility: hidden; transition: visibility 0s linear var(--peek-time, .3s);
}
.type-peek__card {
  padding: .9rem 1rem 1rem; border-radius: var(--radius);
  border: 1px dashed var(--border-strong); background: var(--surface-2);
  opacity: 0; transform: translateY(-.35rem);
  transition: opacity var(--peek-time, .3s) ease, transform var(--peek-time, .3s) ease;
}
.type-opt:has(input:checked) + .type-peek { grid-template-rows: 1fr; margin-bottom: .6rem; }
.type-opt:has(input:checked) + .type-peek .type-peek__card { opacity: 1; transform: none; }
.type-opt:has(input:checked) + .type-peek .type-peek__clip { visibility: visible; transition-delay: 0s; }
.type-peek__lead { font-size: .8rem; font-weight: 650; color: var(--text-mute); margin-top: .6rem; }

/* The options of a type, as badges you tick: they used to be a read-only list,
   and they are now the choice of what this one code will offer. An option that
   is off keeps its place, drawn hollow and grey — the point is comparing it
   with the ones that are on, which a disappearing badge would not allow. The
   checkbox itself is sr-only: it is what a keyboard and a screen reader drive,
   and what posts with JavaScript off. */
.opt-pick { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0 0; padding: 0; }
.opt-pick > li { display: flex; max-width: 100%; }
.opt-pick__item {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; padding: .34rem .7rem;
  max-width: 100%; border-radius: 999px; cursor: pointer;
  color: var(--text-soft); background: var(--surface);
  border: 1px dashed var(--border-strong);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
/* the label is a sentence: it has to be allowed to wrap, and a word with no
   break in it must not push the badge past the edge of the card */
.opt-pick__item > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.opt-pick__item .icon { flex: 0 0 auto; opacity: .55; }
/* hover is a pointer's affordance and a phone has none — worse, a tap leaves it
   stuck on. Off a pointer, the ring below is what says "this can be tapped". */
@media (hover: hover) {
  .opt-pick__item:hover { border-color: var(--brand); color: var(--text); }
}
.opt-pick__item:active { border-color: var(--brand); }
/* The tick keeps its box whether or not it is ticked. It used to appear with
   the check, which grew the badge by its own width on every tap — and now that
   a tap *is* the save, that reflow ran under the finger through the whole
   wrapped row. Empty, it also reads as a checkbox, which is the one thing the
   off state never said out loud. */
.opt-pick__mark {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .45;
  transition: opacity var(--transition), background var(--transition), border-color var(--transition);
}
.opt-pick__mark .icon { opacity: 0; transition: opacity var(--transition); }
.opt-pick__item:has(input:checked) {
  border-style: solid; color: var(--opt-color, var(--text-soft));
  border-color: color-mix(in srgb, var(--opt-color, var(--border)) 32%, var(--border));
  background: color-mix(in srgb, var(--opt-color, var(--brand)) 7%, var(--surface));
}
.opt-pick__item:has(input:checked) .icon { opacity: 1; }
.opt-pick__item:has(input:checked) .opt-pick__mark {
  opacity: 1; border-color: transparent;
  background: color-mix(in srgb, var(--opt-color, var(--brand)) 18%, transparent);
}
.opt-pick__item:has(input:checked) .opt-pick__mark .icon { opacity: 1; }
.opt-pick__item:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt-pick__item--info { --opt-color: var(--info); }
.opt-pick__item--warn { --opt-color: var(--warn); }
.opt-pick__item--urgent { --opt-color: var(--danger); }

/* On a phone these stop being badges and become rows. The labels are whole
   sentences: side by side in a column three words wide they wrapped into
   ragged blocks, and a pill that has wrapped to two lines is not a pill. One
   per line, tall enough to be a real target for a thumb. */
@media (max-width: 560px) {
  .opt-pick { gap: .5rem; }
  .opt-pick > li { flex: 1 1 100%; }
  .opt-pick__item {
    width: 100%; border-radius: 14px; padding: .6rem .8rem; min-height: 46px; font-size: .9rem;
  }
}

@media (min-width: 860px) {
  /* desktop has the room for three: the types in two columns of their own, and
     the preview of the chosen one standing beside them instead of below.
     --type-rows-2 is half the list, rounded up: that is what makes the options
     fill left-to-right instead of running down a single tall column. */
  .type-pick {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: repeat(var(--type-rows-2, 4), auto);
    align-items: start;
  }
  .type-opt { grid-column: auto; }
  /* every panel shares that one cell; a closed one is 0 tall, so it takes none */
  .type-peek { grid-column: 3; grid-row: 1 / -1; align-self: start; position: sticky; top: 1rem; }
}

.disclaimer {
  display: flex; gap: .5rem; align-items: flex-start; margin-left: 1.75rem;
  padding-left: .7rem; border-left: 2px solid var(--border-strong);
  font-size: .82rem; line-height: 1.5; color: var(--text-mute);
}
.disclaimer .icon { flex: 0 0 auto; margin-top: .15rem; }

/* A setting whose small print appears only once the setting is on — on the
   create form by the checkbox next to it, on a code's page by the switch. It
   holds the free message and the visible name, and neither note is worth
   reading before its own decision has been taken. Same trick as the type
   preview: the height is what opens, because a box that is not laid out
   cannot animate. */
.setting-note { display: grid; gap: .5rem; }
.setting-note__note {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--peek-time, .3s) ease;
}
.setting-note__note-clip {
  overflow: hidden; min-height: 0;
  visibility: hidden; transition: visibility 0s linear var(--peek-time, .3s);
}
.setting-note:has(input:checked) .setting-note__note,
.setting-note:has([aria-pressed="true"]) .setting-note__note { grid-template-rows: 1fr; }
.setting-note:has(input:checked) .setting-note__note-clip,
.setting-note:has([aria-pressed="true"]) .setting-note__note-clip {
  visibility: visible; transition-delay: 0s;
}
.consent { font-size: .8rem; line-height: 1.5; color: var(--text-mute); max-width: 46rem; }
.sheet-picks { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.sheet-picks .btn { justify-content: flex-start; }

/* What to do with the badge: two buttons for the two things people came for,
   and one more holding the rest. The panel is positioned rather than in flow,
   so opening it does not push the switch and the reports below it down the
   page — the card has no overflow of its own to clip it. */
.qr-actions { position: relative; display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; }
.qr-more { position: relative; }
.qr-more > summary { list-style: none; cursor: pointer; }
.qr-more > summary::-webkit-details-marker { display: none; }
/* the chevron is the site's only arrow: turned a quarter to point down at what
   is about to open, and up once it is open */
.qr-more > summary .icon { transform: rotate(90deg); transition: transform var(--transition); }
.qr-more[open] > summary .icon { transform: rotate(-90deg); }
.qr-more__panel {
  position: absolute; z-index: 20; top: calc(100% + .45rem); right: 0;
  width: max-content; max-width: min(20rem, 76vw); padding: .85rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  animation: slidein var(--transition) both;
}
/* On a phone the button it hangs off is somewhere in a wrapped row, and a panel
   anchored to it lands half off the screen. Dropping the inner positioning
   hands the panel to .qr-actions instead, where it spans the whole row. */
@media (max-width: 560px) {
  .qr-more { position: static; }
  .qr-more__panel { left: 0; right: 0; width: auto; max-width: none; }
}

/* ---------- add-a-channel: buttons + :target dialogs ---------- */
.chan-add { display: flex; flex-wrap: wrap; gap: .45rem; }
.chan-add .btn { gap: .4rem; }
.chan-add .icon:last-child { opacity: .7; }

/* margin: 0 spelled out, and not because of the reset at the top of the file.
   A modal is markup that sits wherever the page that owns it has room for it,
   and .stack — the owl selector every column on this site is built out of —
   hands each of its children after the first a margin-top of the column's gap.
   A margin applies to a fixed box too: inset: 0 then means "the top edge, plus
   that margin", so the scrim began a gap below the top of the screen and ended
   a gap short of the bottom. What that looks like is a bright bar across the
   header and a dimming that starts too low, which reads as a broken overlay
   rather than as a stray margin. */
.modal { position: fixed; inset: 0; margin: 0; z-index: 80; display: none; }
/* --open is the same dialog opened by the server rather than by a hash: the
   congratulations after a code is created is not something the reader asked
   for by clicking, so there is no :target to key it on */
.modal:target, .modal--open { display: grid; place-items: center; padding: 1.2rem; }
.modal__scrim {
  position: absolute; inset: 0; background: color-mix(in srgb, #05070f 58%, transparent);
  backdrop-filter: blur(2px);
}
.modal__panel {
  position: relative; width: min(100%, 430px); max-height: 86vh; overflow: auto;
  display: grid; gap: .9rem; padding: 1.2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
  animation: slidein var(--transition) both;
}
/* what to do next with a code that exists but is still only on the screen */
.next-steps { display: grid; gap: .7rem; }
.next-step {
  display: flex; gap: .75rem; padding: .8rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.next-step__icon {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand);
}

/* ---------- the introduction the report page opens with ----------
   Wears the panel and the scrim above, because it is that same server-opened
   modal; only what sits inside it is its own. */
.intro__langs { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
/* One thumb on a phone held in the rain is the only pointer this row will ever
   see, so the pills are taller than the 0.78rem chips elsewhere and wrap onto a
   second line rather than shrinking to fit five languages across. */
.intro__lang {
  display: inline-flex; align-items: center; gap: .34rem;
  min-height: 34px; padding: .28rem .72rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-soft); font-size: .84rem; font-weight: 700; letter-spacing: .05em;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.intro__lang:hover { border-color: var(--border-strong); color: var(--text); }
/* the one being read is filled, not merely outlined: on a row of five flags the
   reader has to see at a glance which language failed them */
.intro__lang[aria-current="true"] {
  background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  color: var(--brand); font-weight: 800;
}
/* The logo, at the size of something introducing itself. The gradient tile is
   what makes it the AMICO mark rather than a line drawing that resembles it —
   the same composition the header brand wears, four times the area, centred
   over the title. */
.intro__mark {
  width: 66px; height: 66px; border-radius: 21px; margin-inline: auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: var(--brand-ink); box-shadow: var(--shadow-brand);
}
.intro__actions { display: grid; gap: .6rem; margin-top: .2rem; }
/* deliberately bigger than btn--lg: two targets, tapped once, by somebody who
   is not looking at the screen very hard */
.intro__choice { min-height: 3.2rem; text-align: center; }

/* ---------- confirmation dialog ---------- */
.dialog {
  /* fixed + inset 0 + margin auto: centred on both axes, like the :target
     modals, instead of wherever the UA stylesheet decides to drop it */
  position: fixed; inset: 0; margin: auto;
  width: min(100% - 2.4rem, 420px); max-height: 86vh; overflow: auto;
  border: 0; padding: 0; background: transparent; color: var(--text);
}
.dialog::backdrop { background: color-mix(in srgb, #05070f 58%, transparent); backdrop-filter: blur(2px); }
.dialog__panel {
  display: grid; gap: .7rem; padding: 1.3rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
  animation: slidein var(--transition) both;
}
.dialog__mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger);
}
/* not every dialog is a warning: the note asked for before a report is sent
   wears the brand rather than the danger colour */
.dialog__mark--brand { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
/* deliberately short: one line of detail before sending, not a letter */
.dialog__note { min-height: 68px; }
.dialog__title { font-size: 1.15rem; }
.dialog__text { color: var(--text-soft); font-size: .92rem; line-height: 1.55; }
.dialog__actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: .3rem; }

/* ---------- dashboard ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.6rem; }
.code-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.code-card { display: flex; flex-direction: column; gap: .9rem; transition: transform var(--transition), box-shadow var(--transition); }
.code-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.code-card__top { display: flex; gap: .8rem; align-items: flex-start; }
.code-card__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); }
.code-card__id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--text-mute); letter-spacing: .06em; }
.qr-frame { background: #fff; border-radius: var(--radius); padding: .8rem; display: grid; place-items: center; border: 1px solid var(--border); }
.qr-frame svg, .qr-frame img { width: 100%; height: auto; }
/* the printable badge draws its own frame: give it paper, nothing else */
.badge-preview { background: #fff; border-radius: var(--radius); padding: .35rem; display: grid; place-items: center; }
.badge-preview svg { width: 100%; height: auto; }

/* thirty rows to a page: a little tighter, so a screenful is a useful read */
.timeline { display: grid; gap: .1rem; }
.timeline__item { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.timeline__item:last-child { border-bottom: 0; }
.timeline__dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-soft); }
.timeline__dot--urgent { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.timeline__dot--warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }

/* the page turner sits under the history, at the far end of the card: small
   enough to be there without competing with the reports themselves */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; padding-top: .15rem; }
.pager__at { font-size: .75rem; color: var(--text-mute); margin-right: .3rem; }
.pager__step { padding: .3rem .5rem; }

.list { display: grid; gap: .55rem; }
.list__row {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.list__row > .icon, .list__row > form, .list__row > .pill, .list__row > .timeline__dot { flex: 0 0 auto; }
/* a row that is a link says so on the way past */
a.list__row { transition: border-color var(--transition), background var(--transition); }
a.list__row:hover { border-color: var(--border-strong); background: var(--surface); }
.list__row__main { flex: 1 1 8rem; min-width: 0; }
/* addresses, chat ids and phone numbers have no spaces to break on */
.list__row__value { font-size: .76rem; overflow-wrap: anywhere; }
/* the same rows inside a card that already draws the frame: a border and a fill
   on each of them would make a column of things to press out of a list of
   things to read. A hairline between neighbours is all the separation needed. */
.list--plain { gap: 0; }
.list--plain .list__row { border: 0; border-radius: 0; background: none; padding: .7rem .1rem; }
.list--plain .list__row + .list__row { border-top: 1px solid var(--border); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-mute); flex: none; }
.dot--ok { background: var(--ok) } .dot--warn { background: var(--warn) } .dot--danger { background: var(--danger) }

.empty { display: grid; place-items: center; gap: .8rem; text-align: center; padding: clamp(2rem,6vw,4rem) 1rem; }
.empty__art { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }

/* ---------- admin ---------- */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; justify-content: space-between; padding: .8rem 1rem; }
.tiles { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1rem; display: grid; gap: .1rem; box-shadow: var(--shadow-1);
}
.tile__value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tile__label { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); }
.tile__delta { font-size: .76rem; color: var(--text-mute); font-weight: 650; }
.tile__delta.is-up { color: var(--ok); }
.tile__delta.is-down { color: var(--danger); }
.chart { display: block; width: 100%; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .75rem 1rem; text-align: left; vertical-align: top; }
.table thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-mute);
  background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table tbody tr + tr td { border-top: 1px solid var(--border); }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
/* where a header is the control that sorts by it (admin › codes): a { color:
   inherit } leaves the link looking exactly like the label it replaced, so
   until the pointer lands on one nothing in the row says it can be pressed */
.table thead th a:hover { color: var(--text); }

/* The outbox's error column. A provider's message is either six words or a
   whole SMTP transcript, and the table breaks both ways: truncated to thirty
   characters it says nothing, printed in full it pushes the actions off the
   screen. Two lines in the row, the whole text one hover away in `title`, the
   rest in the CSV. No utility here clamps, and a fixed height would cut a
   glyph in half. */
.table .cell-error { max-width: 34ch; }
.cell-error__text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; font-size: .82rem;
}

/* ---------- switchers ---------- */
.switcher { position: relative; }
.switcher__menu {
  position: absolute; right: 0; top: calc(100% + .5rem); min-width: 190px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: .35rem; display: grid; gap: .1rem;
}
.switcher__menu[hidden] { display: none; }
.switcher__item {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem;
  border-radius: 10px; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: .9rem;
}
.switcher__item:hover { background: var(--surface-2); }
.switcher__item[aria-current="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.swatch { width: 30px; height: 18px; border-radius: 6px; border: 1px solid var(--border-strong); flex: none; }

/* ---------- flashes ---------- */
.flashes { position: fixed; inset: auto 1rem 1rem; z-index: 60; display: grid; gap: .5rem; justify-items: center; }
.flash {
  display: flex; gap: .6rem; align-items: center; padding: .7rem 1rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-2); font-size: .9rem;
  animation: slidein 300ms both;
}
.flash--ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.flash--error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
/* a warning is not a refusal: the watcher was added, the address just looks
   mistyped — see .notice, which says the same thing where there is room for it */
.flash--warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }

/* the card that closes the public pages: centred, with its one paragraph kept
   to a measure — full width, the invitation reads as a banner and not a line */
.cta-card { text-align: center; }
.cta-card p { margin: .5rem auto 1rem; max-width: 44rem; }

/* ---------- the pages meant to be found: breadcrumbs, an article, a toc ----------
   Long-form text needs a measure and a rhythm the app's cards never needed:
   ~68 characters a line, and space above a heading that belongs to what follows
   it rather than to what came before. */
.crumbs { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-mute); }
.crumbs a { color: var(--text-soft); }
.crumbs a:hover { color: var(--brand); }
.crumbs .icon { opacity: .55; }

.article { max-width: 68ch; }
.article__lead { font-size: 1.06rem; line-height: 1.7; color: var(--text-soft); margin-top: 1.4rem; }
.article h2 { font-size: 1.32rem; line-height: 1.3; margin: 2.2rem 0 .7rem; }
.article p { line-height: 1.75; color: var(--text-soft); }
.article p + p { margin-top: .9rem; }

.toc { margin-top: 1.6rem; padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.toc ol { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.toc a { color: var(--text-soft); font-size: .92rem; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- footer ---------- */
/* the smallest print on the page — but it was small enough to be unreadable
   rather than merely quiet, so a fifth larger than the .62rem it used to be.
   The social icons are drawn at a fixed pixel size, not in em, so they take
   their own fifth in the markup and in .social-links__item below. */
.site-footer { margin-top: auto; padding: 2.5rem 0; border-top: 1px solid var(--border); color: var(--text-mute); font-size: .74rem; }
.site-footer a:hover { color: var(--text); }

/* ---------- misc ---------- */
.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.divider { height: 1px; background: var(--border); border: 0; margin: 1.2rem 0; }
.flip { transform: scaleX(-1); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tabs { display: flex; gap: .3rem; padding: .25rem; background: var(--surface-2); border-radius: 999px; border: 1px solid var(--border); }
.tab { padding: .4rem .9rem; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-size: .88rem; font-weight: 650; color: var(--text-soft); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

@media (max-width: 560px) {
  .brand__tag { display: none; }
  .site-header__inner { gap: .35rem; }
  .btn { padding: .55rem .85rem; }
  .options { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: .6rem; }
  .option { min-height: 116px; padding: .9rem .8rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body::before { display: none; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ---- shop: kit cards, the landing hint ---- */
.kit-grid { align-items: stretch; }
.kit-card { display: flex; flex-direction: column; gap: .7rem; }
.kit-card__head { display: flex; align-items: flex-start; gap: .7rem; }
.kit-card__icon { display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); flex: none; }
.kit-card__price { font-weight: 700; font-size: .95rem; }
.kit-card--pick { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-1); }
.kit-card__flag { align-self: flex-start; display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.kit-hint { display: flex; align-items: center; gap: .55rem; margin-top: .8rem; padding: .55rem .7rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
.kit-hint:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.kit-hint__icon { display: inline-flex; flex: none; }
.kit-hint__label { display: block; font-size: .7rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-mute); }
.kit-hint__name { font-size: .88rem; font-weight: 650; }
.kit-hint__price { font-size: .82rem; font-weight: 650; white-space: nowrap; }
.btn.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 700; }

/* the kit filter: wraps on a desktop, scrolls sideways on a phone */
.type-scroller { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 1.4rem; }
.type-scroller > .btn { white-space: nowrap; }

@media (max-width: 720px) {
  .type-scroller {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* bleed into the page gutter so the row visibly runs off the screen edge */
    margin-inline: -1.2rem;
    /* the ends clear the fade, so the first and last chip are never veiled */
    padding: .15rem 2.2rem .5rem;
    scroll-padding-inline: 2.2rem;
    /* both ends fade out instead of being cut: the row reads as continuing */
    --fade: 1.9rem;
    -webkit-mask-image: linear-gradient(to right,
      transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
    mask-image: linear-gradient(to right,
      transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  }
  .type-scroller::-webkit-scrollbar { display: none; }
  .type-scroller > .btn { flex: none; scroll-snap-align: start; }
}

/* kits on the code page: a band under the three columns, not a fourth column */
.kit-strip { margin-top: 1.2rem; }
.kit-strip__grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kit-tile {
  display: flex; flex-direction: column; gap: .35rem; padding: .9rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease;
}
.kit-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.kit-tile--pick { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.kit-tile__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--surface);
  display: grid; place-items: center; margin-bottom: .2rem; }
.kit-tile__name { font-weight: 650; font-size: .92rem; }
.kit-tile__meta { color: var(--text-mute); font-size: .76rem; }
.kit-tile__price { margin-top: auto; padding-top: .35rem; font-weight: 700; font-size: .88rem;
  display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.kit-tile__flag { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: .15rem .45rem; }

/* admin: an order's production panel — the artwork beside the specs */
.prod-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .prod-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); } }

/* a card wide two columns — but only once the grid actually has two: spanning
   a single-column grid invents an implicit track and pushes the page sideways */
.span-2 { grid-column: auto; }
@media (min-width: 760px) { .span-2 { grid-column: span 2; } }

/* filters on a phone: the presets scroll, the custom date range steps aside */
@media (max-width: 720px) {
  /* printing from a phone is a desktop errand: the button only takes room */
  .no-mobile { display: none !important; }
  .filter { gap: .6rem; }
  .filter__custom { display: none; }
  .filter .tabs { width: 100%; overflow-x: auto; scroll-snap-type: x proximity;
    overscroll-behavior-x: contain; scrollbar-width: none; }
  .filter .tabs::-webkit-scrollbar { display: none; }
  .filter .tab { flex: none; scroll-snap-align: center; white-space: nowrap; }
}

/* Tables on a phone: each row becomes a small card. Two levels of two cells
   plus an optional footer line, so the eye still finds the same things in the
   same places; the columns that only matter side-by-side are dropped. */
@media (max-width: 720px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody { display: block; width: 100%; }
  .table--stack tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .7rem;
    align-items: center; padding: .85rem 1rem; border-top: 1px solid var(--border);
  }
  .table--stack tbody tr:first-child { border-top: 0; }
  .table--stack tbody tr + tr td { border-top: 0; }
  .table--stack td { display: block; padding: 0; font-size: .85rem; min-width: 0; }
  .table--stack .num { text-align: left; }
  .table--stack .cell-title { grid-area: 1 / 1; }
  .table--stack .cell-badge { grid-area: 1 / 2; justify-self: end; }
  .table--stack .cell-detail { grid-area: 2 / 1; }
  .table--stack .cell-detail-end { grid-area: 2 / 2; justify-self: end; text-align: right; }
  .table--stack .cell-foot { grid-area: 3 / 1 / auto / -1; }
  /* the outbox stacks nine columns into a card built for five, and neither the
     error nor the row's own actions may be the one that hides: the error takes
     the footer line and the buttons a fourth row under it, so the reason is
     still above the button that retries it */
  .table--stack .cell-wide { grid-area: 4 / 1 / auto / -1; }
  .table--stack .cell-error { max-width: none; }  /* a phone has no column to spare it for */
  .table--stack .cell-hide { display: none; }
  .table--stack td[colspan] { grid-area: auto / 1 / auto / -1; }
  /* a bare number means nothing once the header is gone */
  .table--stack [data-label]::before {
    content: attr(data-label) " "; color: var(--text-mute); font-weight: 400; font-size: .78rem;
  }
}

/* social profiles in the footer */
.social-links { display: inline-flex; align-items: center; gap: .15rem; }
/* the box grew with the glyph inside it: at 22px in a 34px target the hover
   fill sat on the icon with no margin to speak of, and the tile read as a
   border rather than as a backdrop */
.social-links__item {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 11px; color: var(--text-mute); transition: color .15s ease, background .15s ease;
}
.social-links__item:hover { color: var(--brand); background: var(--surface-2); }

/* admin: a value per language, side by side */
.i18n-grid { display: grid; gap: .35rem; }
.i18n-grid__row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .4rem; align-items: start; }
.i18n-grid__tag {
  display: inline-flex; align-items: center; justify-content: center; height: 2.4rem;
  border-radius: 8px; background: var(--surface-2); color: var(--text-mute);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
}
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: start; }
.form-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-start; }

/* dev mail viewer: the message drawn at a real device width */
.mail-stage { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; display: flex; justify-content: center; overflow-x: auto; }
.mail-stage__frame { border: 0; background: #fff; border-radius: 10px; box-shadow: var(--shadow-1);
  width: 100%; height: 70vh; min-height: 420px; }
.mail-stage__frame--mobile { width: 390px; max-width: 100%; flex: none; }
.mail-stage__frame--desktop { width: 760px; max-width: 100%; }

/* ---------- admin catalogue forms ---------- */

/* language tabs: one language at a time, all fields together */
.i18n__pane { display: none; gap: .7rem; }
.i18n__tabs { width: fit-content; margin-bottom: .7rem; }
.i18n__tab--it, .i18n__tabs .tab { cursor: pointer; user-select: none; }
.i18n__radio:focus-visible ~ .i18n__tabs .tab { outline: 2px solid var(--brand); outline-offset: 2px; }

/* icon picker: the sprite, drawn */
.icon-pick {
  /* exactly three rows, then it scrolls: the picker never pushes the form's
     buttons off the screen, however many icons the sprite grows to */
  --icon-cell: 44px; --icon-gap: .3rem; --icon-pad: .45rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--icon-cell), 1fr));
  gap: var(--icon-gap); padding: var(--icon-pad);
  max-height: calc(var(--icon-cell) * 3 + var(--icon-gap) * 2 + var(--icon-pad) * 2);
  overflow-y: auto; scrollbar-width: thin;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.icon-pick__item {
  display: grid; place-items: center; height: var(--icon-cell); border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; color: var(--text-soft); transition: background .12s ease, color .12s ease;
}
.icon-pick__item:hover { background: var(--surface); color: var(--text); }
.icon-pick__item:has(input:checked) {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand);
}
.icon-pick__item:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }

/* badges you add by tapping */
.badge-pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.badge-pick__item {
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem;
  border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--text-soft); background: transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.badge-pick__item:hover { border-color: var(--brand); color: var(--text); }
.badge-pick__mark { display: none; }
.badge-pick__item:has(input:checked) {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand);
}
.badge-pick__item:has(input:checked) .badge-pick__mark { display: inline-flex; }
.badge-pick__item:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* on/off switch */
.switch-form { display: inline-flex; }
.switch-btn { gap: 0; padding-inline: .55rem; }
.switch-btn__track {
  width: 30px; height: 18px; border-radius: 999px; background: var(--border-strong);
  display: inline-flex; align-items: center; padding: 2px; transition: background .15s ease;
}
.switch-btn__knob {
  width: 14px; height: 14px; border-radius: 50%; background: var(--surface);
  box-shadow: var(--shadow-1); transition: transform .15s ease;
}
.switch-btn.is-on { color: var(--brand); }
.switch-btn.is-on .switch-btn__track { background: var(--brand); }
.switch-btn.is-on .switch-btn__knob { transform: translateX(12px); }

/* The same switch driven by a checkbox instead of by a button, for the settings
   panel: there, eight of them sit on one form that is saved in one go, so the
   state comes from :checked rather than from a class the server wrote. The track
   and the knob above are reused untouched — this only says which of them moves
   and when, so the two switches on the panel cannot drift apart. */
.switch-check { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; }
.switch-check__text { min-width: 0; padding-top: .42rem; }
/* the two states of the button the catalogue's switch wears: quiet when off —
   no border, soft ink — and ghost when on. There the server writes the class
   after the tap posts; here the checkbox beside it decides, so that eight of
   them can be read and thrown before anything is saved. */
.switch-check__box { flex: 0 0 auto; --btn-bg: transparent; --btn-bd: transparent; color: var(--text-soft); }
.switch-check:has(input:checked) .switch-check__box { --btn-bd: var(--border-strong); color: var(--brand); }
.switch-check:has(input:checked) .switch-btn__track { background: var(--brand); }
.switch-check:has(input:checked) .switch-btn__knob { transform: translateX(12px); }
/* off, the label is quiet rather than absent: the difference between two rows
   has to be legible at a glance down a column of eight, and the track alone is
   30px of it */
.switch-check__label { display: block; font-weight: 650; color: var(--text-soft); }
.switch-check:has(input:checked) .switch-check__label { color: var(--text); }
/* the real checkbox is off-screen, so the ring goes on the box that is on
   screen, or a keyboard loses its place entirely */
.switch-check:has(input:focus-visible) .switch-check__box {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

/* drag to reorder */
.flip-up { transform: rotate(-90deg); }
.flip-down { transform: rotate(90deg); }
[data-sortable] tbody tr { cursor: grab; }
[data-sortable] tbody tr.is-dragging { opacity: .4; background: var(--surface-2); }
[data-sortable].is-sorting tbody tr { user-select: none; cursor: grabbing; }
/* the drop line is drawn inside the row: no size changes, no scroll jumps */
[data-sortable] tbody tr.is-over-before td { box-shadow: inset 0 3px 0 -1px var(--brand); }
[data-sortable] tbody tr.is-over-after td { box-shadow: inset 0 -3px 0 -1px var(--brand); }
.drag-handle { color: var(--text-mute); display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 1.6rem; cursor: grab; }
[data-sortable] tbody tr:hover .drag-handle { color: var(--brand); }
/* a short flash on the row that just landed: the drop is visibly the change */
@keyframes row-landed { from { background: var(--brand-soft); } to { background: transparent; } }
[data-sortable] tbody tr.is-just-moved td { animation: row-landed .6s ease-out; }

/* the reordering columns take what they need and no more */
.col-drag { width: 2.2rem; min-width: 2.2rem; padding: .4rem 0 .4rem .6rem !important; vertical-align: middle; }
/* the buttons of a row sit side by side: a column squeezed to its minimum
   stacked them on top of each other */
.col-order { width: 1%; white-space: nowrap; }
.col-actions { width: 1%; min-width: 8.5rem; white-space: nowrap; }
.col-actions .row { flex-wrap: nowrap; }

/* four fields on one line, stacking down to one on a phone */
.quad { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: start; }
/* a checkbox lines up with the inputs beside it, not with their labels */
.field--center { display: flex; flex-direction: column; }
.field--center .checkbox { min-height: 2.6rem; display: flex; align-items: center; }
/* the compact language strip: small chips, no hint under the field */
.i18n--compact .i18n__tabs { padding: .15rem; gap: .15rem; margin-bottom: .4rem; }
.i18n--compact .i18n__tabs .tab { padding: .15rem .5rem; font-size: .72rem; }
.modal__panel--wide { width: min(100%, 860px); }
.modal__panel--roomy { width: min(100%, 645px); }

/* a language that is behind the others */
/* the badge of a language that still needs work, right next to its name:
   filled while something is missing, hollow green once it is complete but not
   saved yet, gone when what is on screen is what is stored */
.i18n__tabs .tab { display: inline-flex; align-items: center; gap: .3rem; }
.lang-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  animation: lang-dot-in .18s ease-out both;
}
.lang-dot[data-state="ok"] { display: none; }
.lang-dot[data-state="missing"] { background: var(--brand); }
.lang-dot[data-state="ready"] { background: transparent; box-shadow: inset 0 0 0 2px var(--ok); }
@keyframes lang-dot-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* the colour control: the swatch is the control, the value is readable */
.colour {
  display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: .55rem;
  padding: .4rem .6rem; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface-2); cursor: pointer; position: relative;
}
.colour:hover { border-color: var(--brand); }
.colour__input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.colour__swatch {
  width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), var(--shadow-1);
}
.colour__value { font-size: .8rem; font-weight: 650; letter-spacing: .02em; }
.colour:has(.colour__input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 1. the panel's scrollbar stays inside the rounded shape */
.modal__panel { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.modal__panel::-webkit-scrollbar { width: 10px; }
.modal__panel::-webkit-scrollbar-track { background: transparent; margin: 1.1rem 0; }
.modal__panel::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
.modal__panel::-webkit-scrollbar-thumb:hover { background: var(--text-mute); background-clip: content-box; }

/* urgency, in the colours the reporter will see */
.sev-pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.sev-pick__item {
  --sev: var(--info);
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem;
  border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer;
  font-size: .86rem; font-weight: 650; color: var(--text-soft);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.sev-pick__item--info { --sev: var(--info); }
.sev-pick__item--warn { --sev: var(--warn); }
.sev-pick__item--urgent { --sev: var(--danger); }
.sev-pick__item:hover { border-color: var(--sev); color: var(--sev); }
.sev-pick__item:has(input:checked) {
  border-color: var(--sev); color: var(--sev);
  background: color-mix(in srgb, var(--sev) 13%, transparent);
  box-shadow: inset 0 0 0 1px var(--sev);
}
.sev-pick__item:has(input:focus-visible) { outline: 2px solid var(--sev); outline-offset: 2px; }

/* form validation, in the app's own voice: the browser's bubble is turned off
   and the message is drawn under the field it belongs to */
.input.is-invalid, .textarea.is-invalid, .select.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent);
}
.field-error {
  display: flex; align-items: center; gap: .4rem; margin-top: .35rem;
  font-size: .8rem; font-weight: 600; color: var(--danger);
  animation: field-error-in .16s ease-out both;
}
.field-error::before {
  content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger); color: var(--surface);
  font-size: .72rem; font-weight: 800; display: grid; place-items: center;
}
@keyframes field-error-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }

/* ---------- a notice attached to what it is about ----------
   Neither a flash (transient, floating, gone on the next page) nor a
   .disclaimer (small print nobody has to read): one sentence about the thing
   directly above it — the address that was refused, the domain that looks like
   a slip of the finger. The live check in app.js builds this same markup under
   a field while somebody types, so what the server renders and what the
   browser draws are one component and not two that drift apart.

   Every colour is a token mixed against the surface, so all four themes get it
   right without a rule each: --tone is the only thing a variant changes. */
.notice {
  --tone: var(--info);
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem;
  margin: 0; padding: .6rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent);
  background: color-mix(in srgb, var(--tone) 10%, var(--surface));
  color: var(--text); font-size: .84rem; line-height: 1.45; text-align: left;
}
.notice--warn { --tone: var(--warn); }
.notice--danger { --tone: var(--danger); }
.notice--ok { --tone: var(--ok); }
.notice .icon { flex: none; margin-top: .1rem; color: var(--tone); }
/* the sentence takes the room that is left and wraps; the suggestion beside it
   drops onto its own line rather than squeezing the words on a narrow phone */
.notice > span { flex: 1 1 12rem; min-width: 0; }
/* a suggestion is a thing you take, not a sentence you read: one tap puts it in
   the field. Same shape as a small pill button, in the tone of the notice. */
.notice__fix {
  flex: none; margin-left: auto; align-self: center;
  padding: .25rem .65rem; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--tone) 55%, transparent);
  background: transparent; color: var(--tone); text-decoration: none;
  font: inherit; font-size: .8rem; font-weight: 700; white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}
.notice__fix:hover { background: color-mix(in srgb, var(--tone) 16%, transparent); }
.notice__fix:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
/* drawn under the input it belongs to, with the same lift as a field error */
.field > .notice { margin-top: .4rem; animation: field-error-in .16s ease-out both; }

/* ---------- a button that is waiting for the server ----------
   One tap, one mail, one order: while the answer is on its way the button is
   out of service and says so. The three dots keep the wait visibly alive, and
   the width is frozen at what the label measured so nothing on the page moves. */
.btn.is-busy[disabled], .btn.is-busy { opacity: 1; cursor: progress; }
.dots { display: inline-flex; align-items: center; gap: .28em; }
.dots i {
  width: .34em; height: .34em; border-radius: 50%; background: currentColor;
  animation: dots-wave 1.1s ease-in-out infinite both;
}
.dots i:nth-child(2) { animation-delay: .16s; }
.dots i:nth-child(3) { animation-delay: .32s; }
@keyframes dots-wave {
  0%, 70%, 100% { opacity: .28; transform: translateY(0) scale(.85); }
  35%           { opacity: 1;   transform: translateY(-.22em) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  /* the global rule kills the duration, which would leave the dots frozen mid-air */
  .dots i { animation: none !important; opacity: .55; transform: none; }
}

/* the opening words of a legal chapter carry its title */
.legal__lead { color: var(--text); font-weight: 700; }

/* The donation notice: the theme, in negative. Painting it with the text
   colour on the surface colour makes it the one thing on the page that is not
   the page — which is the point of a notice — and it follows every theme for
   free, light or dark.

   It is centred with left/right and auto margins rather than a translate: a
   fixed element wider than the viewport is not clipped by the body, and that
   is how a long language (German) ends up hanging off the right edge. */
.coffee-pop {
  position: fixed; z-index: 60; bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  /* the page is drawn edge to edge (viewport-fit=cover): without the safe-area
     insets a notched phone in landscape puts the card under the rounded corner */
  left: calc(.8rem + env(safe-area-inset-left, 0px));
  right: calc(.8rem + env(safe-area-inset-right, 0px));
  width: auto; max-width: min(33rem, calc(100vw - 1.6rem)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: .5rem .9rem;
  align-items: center;
  /* nothing inside may ever paint outside: a fixed element that overflows is
     not clipped by the body, which is how this ends up off the screen edge */
  overflow: hidden;
  padding: .9rem 2.4rem .9rem 1.1rem;
  border-radius: var(--radius);
  background: var(--text); color: var(--surface);
  border: 1px solid color-mix(in srgb, var(--surface) 22%, transparent);
  box-shadow: 0 22px 55px -14px rgba(0, 0, 0, .6), 0 4px 14px rgba(0, 0, 0, .25);
  transform: translateY(calc(100% + 2rem));
}
.coffee-pop.is-in { animation: coffee-pop-in .62s cubic-bezier(.16, 1.16, .3, 1.12) forwards; }
.coffee-pop[hidden] { display: none; }

@keyframes coffee-pop-in {
  0%   { transform: translateY(calc(100% + 2rem)) scale(.96); opacity: 0; }
  60%  { transform: translateY(-12px) scale(1.02); opacity: 1; }
  80%  { transform: translateY(4px) scale(.997); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.coffee-pop__text { display: grid; gap: .15rem; min-width: 0; }
.coffee-pop__title {
  font-size: .92rem; font-weight: 700; line-height: 1.25;
  overflow-wrap: anywhere; /* German compounds are long and must not push out */
}
.coffee-pop__body {
  font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere;
  color: color-mix(in srgb, var(--surface) 76%, transparent);
  max-height: 4.5em; overflow-y: auto; overscroll-behavior: contain;
}
.coffee-pop__button { justify-self: end; display: flex; border-radius: 10px; min-width: 0; max-width: 100%; }
/* the official artwork keeps its ratio and shrinks rather than pushing */
.coffee-pop__button img { display: block; width: 142px; height: auto; max-width: 100%; }
.coffee-pop__button:hover { transform: translateY(-1px); }
.coffee-pop__close {
  position: absolute; top: .45rem; right: .45rem;
  border: 0; background: transparent; cursor: pointer;
  color: color-mix(in srgb, var(--surface) 60%, transparent);
  padding: .25rem; border-radius: 8px; display: inline-flex;
}
.coffee-pop__close:hover {
  color: var(--surface); background: color-mix(in srgb, var(--surface) 16%, transparent);
}

/* a long language gets the button on its own line, before anything is squeezed */
@media (max-width: 680px) {
  .coffee-pop { grid-template-columns: minmax(0, 1fr); padding-right: 1.1rem; }
  .coffee-pop__button { justify-self: stretch; justify-content: center; }
  .coffee-pop__title { padding-right: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .coffee-pop.is-in { animation: none; transform: translateY(0); }
}
