/* ============================================================
   Countdown — a small precision-instrument utility.
   One accent (indigo), monospaced numerals as the hero,
   a progress track that makes the interval itself visible.
   ============================================================ */

/* ---------- design tokens ---------- */
:root {
  color-scheme: light dark;

  /* light theme */
  --bg: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #14171d;
  --ink-2: #3b434f;
  --muted: #6b7480;
  --line: #e3e6ec;
  --line-strong: #d6dae2;

  --accent: #3d5af1;
  --accent-press: #3149c9;
  --accent-soft: rgba(61, 90, 241, 0.1);
  --on-accent: #ffffff;

  --soon: #a45b12;
  --soon-soft: rgba(164, 91, 18, 0.12);
  --expired: #bd463a;
  --expired-soft: rgba(189, 70, 58, 0.1);

  --track: #e3e6ec;

  --shadow-card: 0 1px 2px rgba(16, 20, 28, 0.05), 0 10px 28px rgba(16, 20, 28, 0.05);
  --shadow-pop: 0 10px 40px rgba(16, 20, 28, 0.18);

  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --r-card: 16px;
  --r-ctl: 10px;
  --r-pill: 999px;

  --page-pad: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1016;
    --surface: #151a22;
    --surface-2: #1a212b;
    --ink: #e9ecf1;
    --ink-2: #c3cad4;
    --muted: #8b95a3;
    --line: #262d38;
    --line-strong: #333b47;

    --accent: #8298ff;
    --accent-press: #9aabff;
    --accent-soft: rgba(130, 152, 255, 0.14);
    --on-accent: #0d1016;

    --soon: #e0a44e;
    --soon-soft: rgba(224, 164, 78, 0.14);
    --expired: #e68374;
    --expired-soft: rgba(230, 131, 116, 0.14);

    --track: #262d38;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 16px 50px rgba(0, 0, 0, 0.55);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 50% -180px, var(--accent-soft), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

.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;
}

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

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  padding: 0.625rem 0.95rem;
  cursor: pointer;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn--primary:hover {
  background: var(--accent-press);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink-2);
  background: var(--surface);
}
.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.btn--danger:hover {
  border-color: var(--expired);
  color: var(--expired);
  background: var(--expired-soft);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- header ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}

.masthead__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.15rem var(--page-pad);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
}

.brand__glyph {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), var(--accent-press));
  color: var(--on-accent);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 4px 14px var(--accent-soft);
}
.brand__glyph svg {
  width: 20px;
  height: 20px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand__name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand__tag {
  font-size: 0.82rem;
  color: var(--muted);
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ---------- layout ---------- */
.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) var(--page-pad) 80px;
}

.notice {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--soon);
  background: var(--soon-soft);
  color: var(--ink);
  border-radius: var(--r-ctl);
  font-size: 0.9rem;
}

/* tag filter bar */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}
.filters[hidden] {
  display: none;
}
.filter {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0.38rem 0.85rem;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

/* ---------- timer card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 1.25rem 1.3rem 1.15rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
/* A thin state-coloured edge along the top of every card. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--state-color, var(--accent)), transparent 85%);
  opacity: 0.9;
}
.card[data-state="soon"] {
  --state-color: var(--soon);
  border-color: color-mix(in srgb, var(--soon) 35%, var(--line));
}
.card[data-state="expired"] {
  --state-color: var(--expired);
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-card), 0 18px 40px -18px var(--state-color, var(--accent));
  }
}

.card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 26px;
}

.card__name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* When there's no name, the pill sits alone, right-aligned. */
.card--noname .card__head {
  justify-content: flex-end;
}

.pill {
  margin-left: auto;
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill[data-state="soon"]::before {
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}
.pill[data-state="active"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.pill[data-state="soon"] {
  color: var(--soon);
  background: var(--soon-soft);
}
.pill[data-state="expired"] {
  color: var(--expired);
  background: var(--expired-soft);
}

/* the hero */
.card__time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--ink);
  min-height: 2.6rem;
}

.seg {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08em;
}
.num {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.expired-label {
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--expired);
}

/* progress track */
.track {
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--track);
  overflow: hidden;
}
.track__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, transparent), var(--accent));
  border-radius: inherit;
  transition: width 0.25s linear;
}
.card[data-state="soon"] .track__fill {
  background: var(--soon);
}
.card[data-state="expired"] .track__fill {
  background: var(--expired);
}
.card[data-state="soon"] .num {
  color: var(--soon);
}

.card__target {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.card__repeat {
  color: var(--accent);
  font-weight: 550;
  white-space: nowrap;
}
.card__repeat::before {
  content: "·";
  margin: 0 0.4em;
  color: var(--muted);
  font-weight: 400;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: -0.35rem 0 0;
  padding: 0;
  list-style: none;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  padding: 0.22rem 0.6rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.card__actions .btn {
  flex: 1;
  padding: 0.5rem 0.4rem;
  font-size: 0.85rem;
}

/* ---------- empty state ---------- */
.empty {
  text-align: center;
  padding: clamp(48px, 12vw, 96px) 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-card);
  background: var(--surface);
}
.empty__glyph {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.empty__glyph svg {
  width: 28px;
  height: 28px;
}
.empty h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.empty p {
  margin: 0 auto 1.5rem;
  max-width: 42ch;
  color: var(--muted);
}

/* ---------- modal ---------- */
.modal[hidden] {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
}
@media (min-width: 560px) {
  .modal {
    place-items: center;
  }
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 18, 0.5);
  backdrop-filter: blur(2px);
}

.dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-pop);
  padding: 1.4rem 1.4rem 1.5rem;
}
@media (min-width: 560px) {
  .dialog {
    border-radius: 18px;
  }
}

.dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.dialog__head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.field {
  margin-bottom: 0.95rem;
}
.field > label,
.fieldset__legend {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.45rem;
}
.field__hint {
  font-weight: 400;
  color: var(--muted);
}
.field__note {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* repeat + tags side by side */
.field--split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0 0.6rem;
}
.field--split label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.45rem;
}
.field--split .field__note {
  grid-column: 1 / -1;
}
.repeat-select {
  width: 100%;
  padding: 0.62rem 0.6rem;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"] {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  padding: 0.62rem 0.7rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* segmented control (type switch) */
.fieldset {
  border: 0;
  margin: 0 0 0.95rem;
  padding: 0;
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
}
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented label {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--ink-2);
  padding: 0.5rem 0.4rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.segmented input:checked + label {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 20, 28, 0.12);
}
.segmented input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.duration-grid label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.chip {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0.32rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* custom date & time picker */
.field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.45rem;
}
.dtpick {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.dtcal {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  padding: 0.6rem;
}
.dtcal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.dtcal__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.dtcal__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.dtcal__dow span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 0.2rem 0;
}
.dtcal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dtcal__cell {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.dtcal__cell--empty {
  visibility: hidden;
}
.dtcal__day {
  width: 100%;
  height: 100%;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.dtcal__day:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--line-strong);
}
.dtcal__day:disabled {
  color: var(--line-strong);
  cursor: default;
}
.dtcal__day.is-today {
  color: var(--accent);
  font-weight: 650;
}
.dtcal__day.is-selected,
.dtcal__day.is-selected:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.dtcal__day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.icon-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.dttime__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dttime__row .dttime__num {
  width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.dttime__colon {
  font-weight: 700;
  color: var(--muted);
}
.dttime__ampm {
  margin-left: 0.25rem;
}

/* header action group */
.masthead__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* selects share the input look */
select {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* alert-sound row */
.sound-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.sound-select {
  flex: 1;
}
.sound-preview {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
}

/* settings toggles */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}
.toggle-row:first-of-type {
  border-top: 0;
}
.toggle-row__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.toggle-row__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.toggle-row__desc {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 34ch;
}
.toggle-hint {
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 0.25rem;
}
.toggle-hint[hidden] {
  display: none;
}

/* settings: calendar + backup */
.settings-section {
  padding: 0.95rem 0 0.2rem;
  border-top: 1px solid var(--line);
}
.settings-section__title {
  margin: 0 0 0.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.settings-section .toggle-row__desc {
  max-width: none;
  margin: 0;
}
.settings-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.settings-actions .btn {
  width: 100%;
  text-align: left;
  padding: 0.68rem 0.85rem;
}

/* toggle switch */
.switch {
  position: relative;
  display: inline-flex;
  flex: none;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch__track {
  width: 44px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  transition: background-color 0.16s ease;
  position: relative;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.3);
  transition: transform 0.16s ease;
}
.switch input:checked + .switch__track {
  background: var(--accent);
}
.switch input:checked + .switch__track::after {
  transform: translateX(18px);
}
.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* confetti overlay */
#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 70;
  max-width: calc(100% - 2rem);
  padding: 0.6rem 0.95rem;
  border-radius: var(--r-ctl);
  background: var(--ink);
  color: var(--surface);
  font-size: 0.85rem;
  font-weight: 550;
  box-shadow: var(--shadow-pop);
}
.toast[hidden] {
  display: none;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-ctl);
  background: var(--expired-soft);
  color: var(--expired);
  font-size: 0.86rem;
  font-weight: 500;
}
.form-error[hidden] {
  display: none;
}

.dialog__actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.dialog__actions .btn {
  flex: 1;
  padding: 0.7rem 1rem;
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- small screens ---------- */
@media (max-width: 420px) {
  .brand__tag {
    display: none;
  }
  .masthead__actions .btn--primary span.btn__label {
    display: none;
  }
  .masthead__actions .btn--primary {
    padding: 0.6rem 0.7rem;
  }
}
