:root {
  --surface-page: #11131a;
  --surface-panel: #191c24;
  --surface-raised: #232734;
  --brand: #0d9488;
  --brand-deep: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #5eead4;
  --gold: #f0b429;
  --gold-soft: #fbd989;
  --text: #e9eaee;
  --text-muted: #949aa9;
  --warn: #f0894b;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

/* A class that sets `display` outranks the browser's [hidden] rule, so state
   it explicitly — otherwise hiding a flex element silently does nothing. */
[hidden] {
  display: none !important;
}

/* The page is at least one screen tall and the main content absorbs any
   spare height, so a short page (training weapons) still has its footer at
   the bottom of the screen instead of floating halfway up. dvh tracks mobile
   browser toolbars; vh is the fallback for older browsers. */
body {
  background-color: var(--surface-page);
  font-family: Roboto, system-ui, sans-serif;
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  color: var(--text);
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- header ---------- */

/* One slim bar that stays at the top while scrolling. On phones the tool
   links move to a bottom tab bar and this bar hides while scrolling down
   (see wireHeaderScroll). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(17, 19, 26, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: top 0.25s ease;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-name em {
  font-style: normal;
  color: var(--brand-soft);
}

.tool-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.tool-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}

.tool-link:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.05);
}

.tool-link[aria-current="page"] {
  color: var(--gold-soft);
  background-color: rgba(240, 180, 41, 0.1);
}

.tool-link:focus-visible,
.today-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.tool-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.today-menu {
  position: relative;
  flex: none;
}

.today-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.84rem;
  user-select: none;
}

.today-toggle::-webkit-details-marker {
  display: none;
}

.today-toggle:hover,
.today-menu[open] .today-toggle {
  color: var(--text);
  border-color: var(--brand);
}

.today-countdown {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.today-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 290px;
  display: grid;
  gap: 10px;
  padding: 14px;
  background-color: var(--surface-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.today-panel-title {
  margin: 0 0 2px;
  color: var(--brand-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.today-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-row-save {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.today-row-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: none;
}

.today-row-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.today-row-label {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.today-row-text strong {
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- layout ---------- */

.page {
  /* Needed inside the flex column: auto margins would otherwise shrink the
     content to fit instead of letting it widen up to max-width. */
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

.tool-title {
  text-align: center;
  margin-bottom: 26px;
}

.tool-title h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: 0.01em;
}

.panel-hint.entry-hint {
  margin: 10px 0 0;
}

.tool-lead {
  color: var(--text-muted);
  max-width: 56ch;
  margin: 10px auto 0;
  line-height: 1.5;
}

.panel {
  background-color: var(--surface-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}

.panel-heading {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-soft);
  margin-bottom: 14px;
}

.panel-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: -8px 0 14px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
}

/* ---------- mode switch ---------- */

.mode-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.mode-button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--surface-raised);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.mode-button small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.mode-button:hover {
  border-color: var(--brand);
}

.mode-button.active {
  background-color: var(--brand-deep);
  border-color: var(--gold);
}

.mode-button.active small {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- fields ---------- */

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
  flex: 1 1 190px;
}

.field-action {
  justify-content: flex-end;
}

label {
  color: var(--brand-soft);
  font-size: 0.85rem;
}

input[type="text"],
input[type="number"],
input[type="date"] {
  background-color: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 9px 11px;
  width: 100%;
  min-height: 42px;
}

input:focus-visible,
button:focus-visible,
th:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.slider-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- range slider ---------- */

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 0;
  /* Keeps the hit area above the 24px touch minimum without a fat track. */
  padding: 13px 0;
  cursor: pointer;
}

.slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

.slider::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--surface-page);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s;
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--surface-page);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.slider:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

/* ---------- buttons ---------- */

.primary-button {
  background-color: var(--brand);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 11px 18px;
  font: inherit;
  cursor: pointer;
  min-height: 42px;
  transition: background-color 0.15s;
}

.primary-button:hover {
  background-color: var(--brand-soft);
  color: var(--surface-page);
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: progress;
}

.add-character {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.add-character input {
  flex: 1 1 240px;
  width: auto;
}

.add-manual {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.add-manual-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.add-manual-controls input {
  flex: 0 1 160px;
  width: auto;
}

.secondary-button {
  background-color: transparent;
  color: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  min-height: 42px;
  transition: background-color 0.15s, color 0.15s;
}

.secondary-button:hover {
  background-color: var(--brand);
  color: white;
}


.form-message {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: var(--brand-soft);
  font-size: 0.9rem;
}

.form-message[data-kind="error"] {
  color: var(--warn);
}

.result-line {
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  margin: 16px 0 0;
}

/* ---------- tables ---------- */

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  /* Digits share a width, so columns of numbers line up and can be compared
     by eye rather than read one at a time. */
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 10px 7px;
  text-align: right;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
}

.data-table thead th {
  color: var(--brand-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  /* A two-word heading may wrap, so the column is as wide as its values
     rather than its label. */
  white-space: normal;
  vertical-align: bottom;
}

.data-table thead th:hover {
  color: var(--gold-soft);
}

.data-table thead th[data-sorted] {
  color: var(--gold);
}

.data-table thead th[data-sorted]::after {
  content: "\00a0▾";
}

.data-table thead th[data-sorted="asc"]::after {
  content: "\00a0▴";
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.data-table td[data-kind="highlight"] {
  color: var(--gold);
  font-weight: bold;
}

.data-table td[data-kind="error"] {
  color: var(--warn);
  white-space: normal;
}

.data-table td[data-kind="muted"] {
  color: var(--text-muted);
}

.milestone tbody th {
  text-align: left;
  color: var(--gold-soft);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}

/* The values a player can change for one character, right in its row. */
.row-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Scoped to the table so they outrank the site-wide input[type=...] rules. */
.data-table .row-input {
  width: 64px;
  padding: 5px 7px;
  min-height: 32px;
  text-align: right;
  font-size: 0.9rem;
}

/* A day count and a date are short; left at their natural width they would
   push the table past the page. */
/* No spinner arrows: they take a third of a narrow field, and the arrow keys
   still step the value. */
.data-table .row-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.data-table .row-input::-webkit-inner-spin-button,
.data-table .row-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.data-table .row-input-hours {
  width: 46px;
}

.data-table .row-input-date {
  width: 124px;
  padding: 5px 4px 5px 7px;
  text-align: left;
}

.row-input-unit {
  color: var(--text-muted);
  font-size: 0.8rem;
  min-width: 1.4em;
  text-align: left;
}

.series-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.series-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.series-meta {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.series-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
  display: inline-block;
  margin-right: 6px;
}

.delete-button {
  background-color: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.delete-button:hover {
  color: var(--warn);
  background-color: rgba(255, 255, 255, 0.06);
}

/* ---------- loot split ---------- */

.analyser-input {
  width: 100%;
  background-color: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  padding: 12px;
  resize: vertical;
}

.analyser-input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.summary-label {
  color: var(--brand-soft);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.summary-value {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.transfer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transfer-list li {
  background-color: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text-muted);
}

.transfer-list strong {
  color: var(--text);
}

.transfer-amount {
  color: var(--gold);
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

/* ---------- goal tracker ---------- */

.track-name-field {
  flex-grow: 2;
}

.tracker-explainer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 10px;
  max-width: 75ch;
}

.tracker-explainer strong {
  color: var(--text);
}

.tracker-explainer .storage-warning {
  color: var(--warn);
}

.tracker-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.tracker-name {
  font-size: 1.25rem;
}

.tracker-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.tracker-goal {
  margin-bottom: 14px;
}

.tracker-goal .field {
  max-width: 240px;
}

.tracker-status {
  border-left: 3px solid var(--brand);
  background-color: var(--surface-raised);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 14px;
}

.tracker-status[data-status="ahead"],
.tracker-status[data-status="reached"] {
  border-left-color: var(--brand-soft);
}

.tracker-status[data-status="behind"],
.tracker-status[data-status="overdue"],
.tracker-status[data-status="stalled"] {
  border-left-color: var(--warn);
}

.summary-note {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.tracker-note {
  margin: 12px 0 0;
}

.tracker-chart {
  margin-top: 16px;
  height: 280px;
}

.tracker-history {
  margin-top: 14px;
}

.tracker-history summary {
  cursor: pointer;
  color: var(--brand-soft);
  font-size: 0.88rem;
  padding: 6px 0;
}

/* ---------- chart ---------- */

.chart-holder {
  position: relative;
  height: 360px;
}

/* ---------- home ---------- */

.hero {
  text-align: center;
  padding: 10px 0 30px;
}

.hero h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  letter-spacing: 0.01em;
}

.hero-lead {
  color: var(--text-muted);
  max-width: 54ch;
  margin: 12px auto 0;
  line-height: 1.55;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.today-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  background-color: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
}

.today-label {
  color: var(--brand-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.today-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.today-value {
  color: var(--text);
  font-size: 1.02rem;
}

.today-value.countdown {
  color: var(--gold);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
}

.today-note {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.tool-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  display: block;
  background-color: var(--surface-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-left-color 0.15s, transform 0.15s;
}

.tool-card:hover {
  border-left-color: var(--gold);
  transform: translateY(-2px);
}

.tool-card h2 {
  color: var(--brand-soft);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--surface-panel);
  margin-top: 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.footer-brand strong {
  color: var(--gold-soft);
  font-size: 0.92rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footer-links a,
.footer-meta a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color 0.15s;
}

.footer-links a:hover,
.footer-meta a:hover {
  color: var(--gold-soft);
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.language-switch label {
  font-size: 0.78rem;
}

.language-switch select {
  background-color: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.language-switch select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.footer-legal {
  border-top: 1px solid var(--border);
  padding: 8px 16px 10px;
}

.footer-legal p {
  max-width: 1100px;
  margin: 0 auto 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
}

.footer-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.footer-meta a {
  font-size: 0.7rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  /* The clock icon and countdown carry the meaning; the word is what gives
     way first when the tool tabs need the room. */
  .today-toggle-label {
    display: none;
  }
}

@media (max-width: 760px) {
  /* The header must not create a containing block here (no transform, no
     backdrop-filter): the bottom tab bar inside it is position: fixed, and
     either property would pin that bar to the header instead of the screen. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: var(--surface-page);
  }

  .site-header.is-hidden {
    top: -60px;
  }

  .site-header-inner {
    height: 52px;
    gap: 10px;
  }

  .brand {
    margin-right: auto;
  }

  .tool-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    background-color: var(--surface-panel);
    border-top: 1px solid var(--border);
  }

  .tool-link {
    flex-direction: column;
    gap: 3px;
    padding: 6px 2px;
    font-size: 0.68rem;
    justify-content: center;
  }

  .tool-icon {
    width: 20px;
    height: 20px;
  }

  .today-toggle-label {
    display: none;
  }

  .today-panel {
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  /* Keeps the last content and the footer clear of the bottom tab bar. */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .language-switch {
    margin-left: 0;
  }

  .chart-holder {
    height: 260px;
  }

  /* Each row becomes its own card — the layout the card grid was always
     better suited to, now that it is only carrying one character. */
  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td,
  .milestone tbody th {
    display: block;
    width: 100%;
  }

  .data-table tr {
    background-color: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 12px;
    margin-bottom: 12px;
    position: relative;
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 6px 0;
    text-align: right;
    white-space: normal;
  }

  .data-table td:first-child {
    font-size: 1.05rem;
    padding-top: 8px;
    /* Leave room for the absolutely positioned remove button. */
    padding-right: 32px;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
  }

  .data-table td[data-label=""] {
    position: absolute;
    top: 6px;
    right: 6px;
    width: auto;
    padding: 0;
  }

  .data-table td[data-label=""]::before {
    content: none;
  }

  /* The column headings are hidden at this width, so the hint is not true. */
  .sort-hint {
    display: none;
  }

  .milestone tbody th {
    font-size: 1.05rem;
    border-bottom: none;
    padding: 8px 0 0;
  }
}
