/* ==========================================================================
   H20 Property Services — component library
   --------------------------------------------------------------------------
   Every component reads semantic tokens only, which is what lets the same
   button, card, input, and badge work on the sand page and inside a marine
   `.on-deep` band with no per-component dark rules.

   Order: buttons, links, badges, media, cards, forms, notices, header, footer,
   disclosure, segmented, stats, breadcrumbs, empty/skeleton, table, drawer,
   toast, decorative.
   ========================================================================== */

/* ============================== BUTTONS ================================== */

.btn {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-line: var(--line-2);
  --btn-shadow: none;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9em 1.6em;
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  line-height: 1.15;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  /* A label wraps rather than running past its container. With `nowrap`, a
     long upper-case label ("Submit a request in the portal") was wider than a
     phone viewport and crossed the page edge. */
  white-space: normal;
  text-wrap: balance;
  max-inline-size: 100%;
  color: var(--btn-ink);
  background: var(--btn-bg);
  border: 1px solid var(--btn-line);
  border-radius: var(--r-sm);
  box-shadow: var(--btn-shadow);
  cursor: pointer;
  transition: var(--transition-colors);
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* A button changes colour on hover rather than moving. Nothing on this site
   should shift under a finger that is already on its way down. */
.btn:hover {
  color: var(--btn-ink);
}

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

/* Primary: the one action a screen region is asking for. It is near-black on
   paper and flips to near-white inside an `.on-deep` band, which is why it
   reads the theme rather than picking a colour of its own. */
.btn--primary {
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  --btn-line: transparent;
}

.btn--primary:hover {
  opacity: 0.88;
}

/* Secondary: a real outline, for the second-choice action beside a primary. */
.btn--outline {
  --btn-bg: var(--surface);
  --btn-line: var(--line-2);
}

.btn--outline:hover {
  --btn-line: var(--ink);
  --btn-ink: var(--ink);
}

/* Ghost: inline, no chrome until hover. */
.btn--ghost {
  --btn-bg: transparent;
  --btn-line: transparent;
  --btn-ink: var(--ink-2);
  padding-inline: 0.8em;
}

.btn--ghost:hover {
  --btn-bg: var(--brand-soft);
  --btn-ink: var(--brand);
}

/* The same solid as --primary; kept as a name because pages that want to be
   explicit about "heavy action" already use it. */
.btn--ink {
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  --btn-line: transparent;
}

.btn--ink:hover {
  opacity: 0.88;
}

.btn--danger {
  --btn-bg: var(--danger);
  --btn-ink: var(--white);
  --btn-line: transparent;
}

.btn--danger:hover {
  --btn-bg: var(--danger-hover);
}

/* Sizes */
.btn--sm {
  padding: 0.72em 1.15em;
  font-size: var(--step--2);
}

.btn--lg {
  padding: 1.05em 1.9em;
  font-size: var(--step-0);
}

/* A button that fills its container — used inside cards and drawers. */
.btn--block {
  width: 100%;
}

/* Icon-only, square. Always needs an aria-label. */
.btn--icon {
  padding: 0.7em;
  border-radius: var(--r-sm);
}

.btn--icon.btn--ghost {
  padding: 0.6em;
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
  transform: none;
}

/* A busy button keeps its width and swaps its label for a spinner, so the
   layout does not jump mid-submit. */
.btn.is-busy {
  color: transparent;
  pointer-events: none;
}

.btn.is-busy::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.05em;
  height: 1.05em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--btn-ink);
  animation: spin 620ms linear infinite;
}

/* ============================== BADGES =================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.32em 0.6em;
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  white-space: nowrap;
}

.badge--brand {
  color: var(--brand);
  background: var(--brand-soft);
}

.badge--accent {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.badge--positive {
  color: var(--positive);
  background: var(--positive-soft);
}

.badge--ink {
  color: var(--bg);
  background: var(--ink);
}

.badge--outline {
  color: var(--ink-2);
  background: transparent;
  border-color: var(--line-2);
}

/* Badges that sit on a photograph need their own contrast, whatever theme the
   surrounding section is in. A flat dark plate, never glass: blurring the
   photo behind a label makes the label harder to read, not easier. */
.badge--glass {
  color: #fff;
  background: rgba(14, 18, 19, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
}

.badge--glass.badge--accent {
  color: var(--on-sun);
  background: var(--ochre-300);
  border-color: transparent;
}

/* Small solid dot used for live/available indicators. */
.dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.dot--pulse {
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2.4s var(--ease) infinite;
}

/* ============================== MEDIA ==================================== */

.media {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--r-lg);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--4x3 {
  aspect-ratio: 4 / 3;
}

.media--3x2 {
  aspect-ratio: 3 / 2;
}

.media--1x1 {
  aspect-ratio: 1 / 1;
}

.media--16x9 {
  aspect-ratio: 16 / 9;
}

/* The gradient that lets glass badges stay legible over a bright photo. */
.media__scrim {
  position: absolute;
  inset: 0;
  background: var(--grad-media);
  pointer-events: none;
}

/* ============================== CARDS ==================================== */

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  /* Cards, panels and form wells all use the stronger hairline. On a white
     page the faint one left people unsure whether they were looking at a
     panel or at the page. */
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}

.card--pad {
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.card--interactive {
  transition: var(--transition-lift), border-color var(--dur-2) var(--ease);
}

.card--interactive:hover {
  transform: translateY(-3px);
  border-color: var(--brand-line);
  box-shadow: var(--sh-md);
}

/* A card that is entirely a link must not double-underline its heading. */
a.card,
a.card:hover {
  color: inherit;
  text-decoration: none;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: clamp(1rem, 2.5vw, 1.4rem);
  flex: 1;
}

/* ============================== FORMS ==================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.field__label,
.label {
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  color: var(--ink-2);
}

.field__label .req {
  color: var(--danger);
  margin-left: 0.15em;
}

.field__hint,
.hint {
  font-size: var(--step--2);
  line-height: var(--leading-normal);
  color: var(--ink-3);
}

.field__error,
.error-text {
  font-size: var(--step--2);
  font-weight: var(--weight-medium);
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.7em 0.9em;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: var(--transition-colors), box-shadow var(--dur-1) var(--ease);
  appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-4);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--line-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: var(--leading-normal);
}

.select {
  padding-right: 2.4em;
  /* A chevron drawn as a background so no extra markup is needed. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%235b7278' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9em center;
  background-size: 0.7em;
  cursor: pointer;
}

.input[aria-invalid='true'],
.select[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--danger);
}

.input[disabled],
.select[disabled],
.textarea[disabled],
.input[readonly] {
  color: var(--ink-3);
  background: var(--surface-2);
  cursor: not-allowed;
}

/* Checkbox / radio share one look. The control is a real input so keyboard
   behaviour is native; only the paint is ours. */
.check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  font-size: var(--step--1);
  line-height: var(--leading-normal);
  color: var(--ink-2);
}

.check input[type='checkbox'],
.check input[type='radio'] {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.15em;
  accent-color: var(--brand);
  cursor: pointer;
}

.check__text strong {
  display: block;
  color: var(--ink);
  font-weight: var(--weight-semibold);
}

/* An inline control row: label on the left, control on the right. */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}

.field-row:last-child {
  border-bottom: 0;
}

.field-row__text {
  min-width: 0;
}

.field-row__text b {
  display: block;
  font-size: var(--step-0);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

.field-row__text span {
  font-size: var(--step--2);
  color: var(--ink-3);
}

/* A two-column form grid that collapses on small screens. */
.form-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .form-grid__full {
    grid-column: 1 / -1;
  }
}

/* ============================== NOTICES ================================== */

.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--step--1);
  line-height: var(--leading-normal);
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-4);
  border-radius: var(--r-md);
}

.notice svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  margin-top: 0.15em;
}

.notice strong {
  color: var(--ink);
}

.notice--brand {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  border-left-color: var(--brand);
}

.notice--accent {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.notice--danger {
  background: var(--danger-soft);
  border-left-color: var(--danger);
}

.notice--positive {
  background: var(--positive-soft);
  border-left-color: var(--positive);
}

/* ============================== HEADER =================================== */

/* Solid paper, always, with one hairline under it. A translucent blurred bar
   looks modern and reads badly: it puts the page behind the menu into the
   menu's contrast budget. */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur-2) var(--ease);
}

.site-header.is-stuck {
  box-shadow: var(--sh-xs);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

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

.brand__mark {
  width: 40px;
  height: 40px;
  flex: none;
}

/* In the footer the mark's dark tile would vanish into the near-black band, so
   it gets a hairline of its own to keep the same rounded-square silhouette. */
.site-footer .brand__mark {
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand__sub {
  font-size: 0.6rem;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-inline-start: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav items are plain upper-case words separated by space, not pills. The
   underline on hover is the only affordance, which is how a printed menu
   behaves and what an unfamiliar visitor already expects. */
.nav__links a {
  display: block;
  padding: 0.9em 0.1em;
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition-colors);
}

.nav__links a:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.nav__links a[aria-current='page'] {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-inline-start: var(--sp-5);
}

/* The header is a fixed-height row; a wrapped label would change its height. */
.nav__actions .btn {
  white-space: nowrap;
}

.nav__portal {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.9em 0;
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  /* The label must never wrap: a two-line label makes the header taller than
     its own min-height and pushes the nav out of shape. */
  white-space: nowrap;
  color: var(--ink-2);
  text-decoration: none;
  transition: var(--transition-colors);
}

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

/* The mobile menu button. Hidden until the nav collapses. */
.nav__toggle {
  display: none;
  width: var(--control-sm);
  height: var(--control-sm);
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: none;
}

.nav__toggle span {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: var(--r-pill);
  transition: var(--transition-colors), transform var(--dur-2) var(--ease);
}

.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: var(--r-pill);
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}

.nav__toggle span::before {
  top: -5px;
}

.nav__toggle span::after {
  top: 5px;
}

.nav__toggle[aria-expanded='true'] span {
  background: transparent;
}

.nav__toggle[aria-expanded='true'] span::before {
  transform: translateY(5px) rotate(45deg);
}

.nav__toggle[aria-expanded='true'] span::after {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 960px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-4) var(--gutter) var(--sp-6);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility var(--dur-2);
  }

  .nav__links.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav__links a {
    padding: var(--sp-4) var(--sp-2);
    font-size: var(--step-2);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-normal);
    text-transform: none;
    border-bottom: 1px solid var(--line);
    border-radius: var(--r-sm);
  }

  .nav__links a:hover,
  .nav__links a[aria-current='page'] {
    border-bottom-color: var(--line);
    background: var(--brand-soft);
    color: var(--brand);
  }

  .nav__links li:last-child a {
    border-bottom: 0;
  }

  .nav__portal-label {
    display: none;
  }
}

/* The header is the one row that cannot wrap, so below this width the brand
   sub-line and the phone number drop out and the call button becomes an icon.
   Without this the header's intrinsic width exceeds a phone viewport, which
   widens the whole document and clips every section below it to the right. */
@media (max-width: 620px) {
  .brand__sub {
    display: none;
  }

  .nav__cta-label {
    display: none;
  }

  /* Both header controls become the same square box. Before this the call
     button was a small filled 34px chip beside a 44px outlined menu button. */
  .nav__actions .btn {
    width: var(--control-sm);
    height: var(--control-sm);
    padding: 0;
    gap: 0;
    flex: none;
  }

  .nav__actions .btn svg {
    width: 20px;
    height: 20px;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
  }
}

/* ============================== FOOTER =================================== */

.site-footer {
  margin-top: auto;
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--sp-8);
  color: var(--ink-2);
  /* Flat near-black. The white page above it is the entire separation; no
     gradient edge, no glow line. */
  background: var(--ink-950);
}

.site-footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.site-footer h2,
.site-footer h3 {
  color: var(--ink);
}

.site-footer .eyebrow {
  color: var(--brand);
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer__brand .brand__name {
  color: var(--ink);
}

.site-footer__brand .brand__sub {
  color: var(--ink-3);
}

.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  font-size: var(--step--1);
}

.site-footer address {
  font-style: normal;
  font-size: var(--step--1);
  line-height: var(--leading-relaxed);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--step--2);
  color: var(--deep-muted);
}

.eho {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

.eho svg {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}

/* ============================ DISCLOSURE ================================= */

/* <details> styled as an accordion. No JavaScript, works without it. */
.accordion {
  border-top: 1px solid var(--line);
}

.accordion__item {
  border-bottom: 1px solid var(--line);
}

.accordion__item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  font-family: var(--font-sans);
  font-size: var(--step-1);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: var(--transition-colors);
}

.accordion__item > summary::-webkit-details-marker {
  display: none;
}

.accordion__item > summary:hover {
  color: var(--brand);
}

/* A plus that becomes a minus, drawn from two bars. */
.accordion__mark {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition: var(--transition-colors), transform var(--dur-2) var(--ease);
}

.accordion__mark::before,
.accordion__mark::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  border-radius: var(--r-pill);
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}

.accordion__mark::before {
  width: 9px;
  height: 1.5px;
}

.accordion__mark::after {
  width: 1.5px;
  height: 9px;
}

.accordion__item[open] > summary {
  color: var(--brand);
}

.accordion__item[open] .accordion__mark {
  border-color: var(--brand);
  transform: rotate(90deg);
}

.accordion__item[open] .accordion__mark::after {
  opacity: 0;
}

.accordion__panel {
  padding-bottom: var(--sp-6);
  max-width: var(--prose-max);
  color: var(--ink-2);
  line-height: var(--leading-relaxed);
}

/* ============================ SEGMENTED ================================== */

/* A row of mutually exclusive pills. Used for listing filters and view
   switches; state is `aria-pressed`, so it is also the accessible control. */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.segmented__item {
  padding: 0.45em 0.95em;
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: var(--transition-colors);
}

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

.segmented__item[aria-pressed='true'],
.segmented__item[aria-selected='true'] {
  color: var(--bg);
  background: var(--ink);
  box-shadow: var(--sh-xs);
}

/* ============================== STATS ==================================== */

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.stat__value {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

.stat__label {
  font-size: var(--step--1);
  color: var(--ink-3);
}

/* ============================ BREADCRUMBS ================================ */

/* Accepts the class on the <nav> or on the <ol>; two call sites had picked
   different ones and the nav-wrapped variant silently stacked its items. */
.breadcrumbs,
.breadcrumbs > ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
  color: var(--ink-3);
}

.breadcrumbs a {
  color: var(--ink-3);
  text-decoration: none;
}

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

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.breadcrumbs li + li::before {
  content: '/';
  color: var(--line-3);
}

/* ========================== EMPTY & LOADING ============================== */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--sp-6);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
}

.empty__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.empty p {
  max-width: 46ch;
  color: var(--ink-3);
}

/* A loading placeholder breathes rather than shimmers. A sliding gradient
   pulls the eye to a block that has nothing in it yet. */
.skeleton {
  background: var(--surface-3);
  border-radius: var(--r-sm);
  animation: breathe 1.6s ease-in-out infinite;
}

.skeleton--text {
  height: 0.85em;
  margin-block: 0.3em;
}

.skeleton--media {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--line-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 620ms linear infinite;
}

/* ============================== TABLE ==================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

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

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

.table th {
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-2);
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--brand-soft);
}

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

/* ============================ DRAWER / MODAL ============================= */

.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: grid;
  grid-template-columns: 1fr min(30rem, 100%);
  visibility: hidden;
}

.drawer[hidden] {
  display: none;
}

.drawer__scrim {
  background: var(--overlay);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}

.drawer__panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--sh-xl);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
  overflow: hidden;
}

.drawer.is-open {
  visibility: visible;
}

.drawer.is-open .drawer__scrim {
  opacity: 1;
}

.drawer.is-open .drawer__panel {
  transform: none;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--line);
}

.drawer__body {
  padding: var(--sp-6);
  overflow-y: auto;
}

@media (max-width: 720px) {
  .drawer {
    grid-template-columns: 1fr;
  }
}

/* ============================== TOAST ==================================== */

.toast-stack {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--step--1);
  color: var(--ink-inverse);
  background: var(--ink-950);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  pointer-events: auto;
  animation: toast-in var(--dur-3) var(--ease);
}

.toast--positive {
  border-left: 3px solid var(--positive);
}

.toast--danger {
  border-left: 3px solid var(--deep-danger);
}

.toast a {
  color: var(--brand);
  font-weight: var(--weight-semibold);
}

/* ============================== KEYFRAMES ================================ */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 0.5em transparent;
  }

  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes breathe {
  50% {
    opacity: 0.55;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}