/* =========================================================================
   Professions Wynncraft — "L'Atelier"
   Light editorial: Fraunces serif display + Inter. Mobile-first, OKLCH.
   ========================================================================= */

:root {
  /* — Light neutral surfaces (cool paper, NOT cream) — */
  --bg:        oklch(0.965 0.003 250);
  --surface:   oklch(1 0 0);
  --surface-2: oklch(0.975 0.003 250);
  --raised:    oklch(0.955 0.004 250);

  /* — Ink ramp (on white / near-white) — */
  --ink:    oklch(0.205 0.012 265);   /* primary text */
  --ink-2:  oklch(0.405 0.012 265);   /* secondary */
  --muted:  oklch(0.515 0.011 265);   /* labels / captions */
  --faint:  oklch(0.62 0.009 265);    /* decorative / dividers */

  --line:        oklch(0.2 0.02 265 / 0.10);
  --line-strong: oklch(0.2 0.02 265 / 0.17);

  /* — Accent: deep emerald (data, selection, progress, key figures) — */
  --accent:      oklch(0.54 0.14 162);
  --accent-soft: oklch(0.54 0.14 162 / 0.12);
  --accent-line: oklch(0.54 0.14 162 / 0.32);

  /* — Primary action = near-black (Tesla/Apple minimal) — */
  --ink-solid: oklch(0.22 0.012 265);
  --on-ink:    oklch(0.98 0 0);

  /* — Per-profession hues (icon + progress, tuned for white bg) — */
  --p-woodcutting:    oklch(0.55 0.13 150);
  --p-mining:         oklch(0.52 0.11 250);
  --p-farming:        oklch(0.60 0.12 75);
  --p-fishing:        oklch(0.55 0.10 215);
  --p-alchemism:      oklch(0.52 0.17 300);
  --p-armouring:      oklch(0.48 0.045 265);
  --p-cooking:        oklch(0.57 0.15 40);
  --p-jeweling:       oklch(0.58 0.16 350);
  --p-scribing:       oklch(0.50 0.15 275);
  --p-tailoring:      oklch(0.54 0.10 195);
  --p-weaponsmithing: oklch(0.54 0.17 25);
  --p-woodworking:    oklch(0.48 0.07 65);

  --error: oklch(0.55 0.19 27);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px oklch(0.2 0.02 265 / 0.05), 0 1px 1px oklch(0.2 0.02 265 / 0.04);
  --shadow-2: 0 1px 3px oklch(0.2 0.02 265 / 0.06), 0 14px 36px -18px oklch(0.2 0.02 265 / 0.22);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 220ms;

  --maxw: 60rem;
  --gut: clamp(1rem, 4.5vw, 2.25rem);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(var(--gut), env(safe-area-inset-right))
    max(2.5rem, env(safe-area-inset-bottom))
    max(var(--gut), env(safe-area-inset-left));
  overflow-x: hidden;
  background-image:
    radial-gradient(60% 50% at 100% 0%, oklch(0.56 0.135 162 / 0.05), transparent 70%),
    radial-gradient(40% 40% at 0% 4%, oklch(0.52 0.11 250 / 0.04), transparent 70%);
  background-attachment: fixed;
}

input, table, .metric__value, .tile__lvl, .tier__val b, .num { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* ---- Page shell ---- */
.page {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.6vw, 1.4rem);
}

/* =========================================================================
   Masthead (editorial)
   ========================================================================= */
.masthead { padding: clamp(0.75rem, 3vw, 2rem) 0.25rem clamp(0.5rem, 2vw, 1rem); }

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 5vw, 2.75rem);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-weight: 450;
}
.brand b { color: var(--ink); font-weight: 600; }
.brand__glyph {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  color: var(--on-ink);
  background: var(--ink-solid);
}
.brand__glyph svg { width: 18px; height: 18px; }
.masthead__meta { font-size: 0.8rem; color: var(--muted); }

.masthead__title {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.masthead__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.masthead__lead {
  margin-top: clamp(1rem, 3vw, 1.5rem);
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--ink-2);
  text-wrap: pretty;
}

/* =========================================================================
   Blocks
   ========================================================================= */
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: clamp(1.25rem, 4vw, 1.85rem);
}

.block__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
}
.block__title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.hint { color: var(--muted); font-size: 0.86rem; margin-top: 1.1rem; }

.badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.28rem 0.6rem;
  border-radius: var(--r-pill);
}

.group + .group { margin-top: 1.5rem; }
.group__label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* =========================================================================
   Forms
   ========================================================================= */
.field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.field--grow { flex: 1 1 auto; }

.field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}
.field label .unit { color: var(--faint); }

.loader { display: flex; flex-direction: column; gap: 0.8rem; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 0.9rem;
}

input, select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 0.8rem 0.95rem;
  min-height: 50px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
input::placeholder { color: var(--muted); }
input:hover, select:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }

.select { position: relative; }
.select select { padding-right: 2.6rem; cursor: pointer; }
.select__chevron {
  position: absolute;
  right: 0.9rem; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}
select option { color: var(--ink); }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  --b-bg: var(--surface);
  --b-fg: var(--ink);
  --b-bd: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--b-fg);
  background: var(--b-bg);
  border: 1px solid var(--b-bd);
  border-radius: var(--r-md);
  min-height: 50px;
  padding: 0 1.4rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease), filter var(--dur) var(--ease),
              background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur);
}
.btn:active { transform: scale(0.975); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }

.btn--primary {
  --b-bg: var(--ink-solid);
  --b-fg: var(--on-ink);
  --b-bd: transparent;
  box-shadow: 0 1px 2px oklch(0.2 0.02 265 / 0.2), 0 10px 24px -12px oklch(0.2 0.02 265 / 0.5);
}
.btn--primary:hover { filter: brightness(1.18); }

.btn--ghost { --b-bg: transparent; --b-fg: var(--ink-2); }
.btn--ghost:hover { --b-fg: var(--ink); background: var(--surface-2); }

.btn:disabled, .btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__label { opacity: 0; }
.btn__spinner {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid oklch(0.98 0 0 / 0.35);
  border-top-color: var(--on-ink);
  opacity: 0;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn__spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   Boost (bonus XP stuff + Double XP)
   ========================================================================= */
.boost {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.boost__field { gap: 0.5rem; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  align-self: flex-start;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-2);
  background: none;
  border: none;
  padding: 0.2rem 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur) var(--ease);
}
.toggle:hover { color: var(--ink); }
.toggle:focus-visible { outline: none; }
.toggle:focus-visible .toggle__track { box-shadow: 0 0 0 4px var(--accent-soft); }

.toggle__track {
  position: relative;
  width: 44px; height: 26px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  flex: none;
}
.toggle__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px oklch(0.2 0.02 265 / 0.25);
  transition: transform 220ms var(--ease);
}
.toggle[aria-checked="true"] .toggle__track { background: var(--accent); border-color: var(--accent); }
.toggle[aria-checked="true"] .toggle__thumb { transform: translateX(18px); }
.toggle[aria-checked="true"] { color: var(--ink); }

.boost__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.boost__total-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.boost__total-value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.actions .btn { flex: 1 1 auto; }
.actions .msg--inline { flex: 1 0 100%; }

/* =========================================================================
   Messages
   ========================================================================= */
.msg {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  min-height: 1.2em;
}
.msg:not(:empty) { margin-top: 1rem; }
.msg--inline, .msg--inline:not(:empty) { margin: 0; }
.msg.is-ok { color: var(--accent); }
.msg.is-error { color: var(--error); }
.msg.is-info { color: var(--ink-2); }

/* =========================================================================
   Profession tiles
   ========================================================================= */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.tile {
  --prof: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 0.85rem 0.9rem 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 130ms var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.tile[data-prof="woodcutting"]    { --prof: var(--p-woodcutting); }
.tile[data-prof="mining"]         { --prof: var(--p-mining); }
.tile[data-prof="farming"]        { --prof: var(--p-farming); }
.tile[data-prof="fishing"]        { --prof: var(--p-fishing); }
.tile[data-prof="alchemism"]      { --prof: var(--p-alchemism); }
.tile[data-prof="armouring"]      { --prof: var(--p-armouring); }
.tile[data-prof="cooking"]        { --prof: var(--p-cooking); }
.tile[data-prof="jeweling"]       { --prof: var(--p-jeweling); }
.tile[data-prof="scribing"]       { --prof: var(--p-scribing); }
.tile[data-prof="tailoring"]      { --prof: var(--p-tailoring); }
.tile[data-prof="weaponsmithing"] { --prof: var(--p-weaponsmithing); }
.tile[data-prof="woodworking"]    { --prof: var(--p-woodworking); }

.tile:hover { transform: translateY(-2px); border-color: var(--ink-2); box-shadow: var(--shadow-2); }
.tile:active { transform: translateY(0) scale(0.99); }
.tile:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.tile.is-active {
  border-color: var(--prof);
  box-shadow: 0 0 0 1px var(--prof), var(--shadow-2);
}
.tile.is-max { opacity: 0.7; }

.tile__top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tile__icon {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--prof);
  background: color-mix(in oklch, var(--prof) 14%, white);
}
.tile__icon svg { width: 18px; height: 18px; }
.tile__lvl {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.tile__lvl small { font-family: 'Inter', sans-serif; font-size: 0.6rem; font-weight: 600; color: var(--muted); }

.tile__name { font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em; }

.tile__track {
  height: 4px;
  border-radius: var(--r-pill);
  background: color-mix(in oklch, var(--prof) 16%, var(--surface-2));
  overflow: hidden;
}
.tile__track span {
  display: block; height: 100%;
  border-radius: inherit;
  background: var(--prof);
  width: 0;
  transition: width 650ms var(--ease);
}
.tile__next { font-size: 0.76rem; color: var(--muted); line-height: 1.3; }
.tile__next b { color: var(--ink); font-weight: 700; }
.tile.is-max .tile__next { color: var(--prof); font-weight: 600; }

/* =========================================================================
   Result block
   ========================================================================= */
.block--result { background: var(--surface); }

.result__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}
.result__title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.result__meta { font-size: 0.92rem; color: var(--muted); font-weight: 500; }

/* metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-bottom: 1.6rem;
}
.metric {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 0.95rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.metric__label { font-size: 0.76rem; font-weight: 500; color: var(--muted); }
.metric__value {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.metric__sub { font-size: 0.77rem; color: var(--muted); }
.metric.is-hero {
  grid-column: 1 / -1;
  background: var(--ink-solid);
  border-color: transparent;
}
.metric.is-hero .metric__label { color: oklch(0.98 0 0 / 0.65); }
.metric.is-hero .metric__sub { color: oklch(0.98 0 0 / 0.6); }
.metric.is-hero .metric__value { color: var(--on-ink); font-size: clamp(2rem, 8vw, 2.8rem); }
.metric.is-hero .metric__value .accent { color: oklch(0.78 0.14 162); }

/* breakdown / tiers */
.breakdown__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.breakdown__title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.breakdown__note { font-size: 0.82rem; color: var(--muted); max-width: 42ch; }

.tiers { display: flex; flex-direction: column; gap: 0.5rem; }
.tier {
  --prof: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.tier::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%);
  background: color-mix(in oklch, var(--prof) 9%, transparent);
  transition: width 600ms var(--ease);
  z-index: 0;
}
.tier > * { position: relative; z-index: 1; }
.tier__main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.tier__name { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.tier__name .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--prof); margin-right: 0.5rem; vertical-align: middle;
}
.tier__range { font-size: 0.78rem; color: var(--muted); }
.tier__val { text-align: right; white-space: nowrap; font-size: 0.82rem; color: var(--muted); }
.tier__val b {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* full detail (collapsible) */
.full { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.full__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 0.3rem 0;
  transition: color var(--dur);
}
.full__summary::-webkit-details-marker { display: none; }
.full__summary:hover { color: var(--ink); }
.full__chevron { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.full[open] .full__chevron { transform: rotate(180deg); }
.full__tools { margin: 1rem 0 0.5rem; }

/* =========================================================================
   Tables
   ========================================================================= */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.table-scroll--capped { max-height: 24rem; overflow-y: auto; }
.table-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); }

.data-table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: 0.88rem; }
.data-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface);
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0.6rem 0.85rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}
.data-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; }
.data-table td:first-child { font-weight: 600; color: var(--ink); }

.res-name { color: var(--ink); font-weight: 500; }
.node-tag { color: var(--muted); font-size: 0.78rem; }
.count-pill { font-weight: 700; color: var(--accent); }

.data-table--compact { font-size: 0.82rem; min-width: 34rem; }
.data-table--compact td, .data-table--compact thead th { padding-block: 0.5rem; }

.del {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem; line-height: 1;
  cursor: pointer;
  transition: color var(--dur), background var(--dur), border-color var(--dur);
}
.del:hover { color: var(--error); border-color: color-mix(in oklch, var(--error) 35%, transparent); background: color-mix(in oklch, var(--error) 8%, transparent); }

/* search */
.search { position: relative; display: flex; align-items: center; }
.search svg {
  position: absolute; left: 0.85rem;
  width: 17px; height: 17px;
  color: var(--muted); pointer-events: none;
}
.search input { padding-left: 2.5rem; min-height: 44px; }

/* =========================================================================
   Footer
   ========================================================================= */
.foot {
  display: flex; flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: center;
  text-align: center;
  color: var(--faint);
  font-size: 0.8rem;
  padding: 1.75rem 0 0.5rem;
}

/* =========================================================================
   Utilities + motion
   ========================================================================= */
.hidden { display: none !important; }

.block { animation: rise 420ms var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.tile, .metric, .tier { animation: rise 360ms var(--ease) both; }
.tiles .tile:nth-child(2), .metrics .metric:nth-child(2), .tiers .tier:nth-child(2) { animation-delay: 35ms; }
.tiles .tile:nth-child(3), .metrics .metric:nth-child(3), .tiers .tier:nth-child(3) { animation-delay: 70ms; }
.tiles .tile:nth-child(4), .metrics .metric:nth-child(4), .tiers .tier:nth-child(4) { animation-delay: 105ms; }
.tiers .tier:nth-child(n+5) { animation-delay: 140ms; }

/* =========================================================================
   Breakpoints
   ========================================================================= */
@media (min-width: 34rem) {
  .loader { flex-direction: row; align-items: flex-end; }
  .loader .btn { flex: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .field--wide { grid-column: span 2; }
  .boost { flex-direction: row; align-items: center; }
  .boost__field { flex: 1 1 12rem; }
  .boost__total { flex: 1 1 12rem; border-top: 0; padding-top: 0; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
  .actions .btn { flex: none; }
  .actions .msg--inline { flex: 1 1 auto; margin-left: 0.4rem; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 50rem) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .field--wide { grid-column: span 1; }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .metric.is-hero { grid-column: span 1; }
  .metric.is-hero .metric__value { font-size: clamp(1.5rem, 3vw, 1.95rem); }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
