/* ==========================================================================
   jobhunter — "Instrument" design system
   See docs/superpowers/specs/2026-07-26-jobhunter-redesign-design.md

   Cool slate ground so the only saturated thing on screen is the score.
   No red in the palette: status is structural, never alarm-colored.
   ========================================================================== */

:root {
  /* Surface */
  --ground: #ebeef1;
  --surface: #ffffff;
  --surface-sunk: #e3e8ec;

  /* Text */
  --ink: #10151a;
  --muted: #6b7681;
  --faint: #97a1aa;

  /* Structure */
  --rule: #d6dce2;
  --rule-strong: #c2cad2;

  /* The one accent: focus, primary action, selection */
  --accent: #0f6b63;
  --accent-hover: #0b544e;
  --accent-wash: #e4f0ee;

  /* Score ramp — used for the gauge and nothing else */
  --gauge-1: #c3e0dc;
  --gauge-2: #8ac7c0;
  --gauge-3: #45a198;
  --gauge-4: #0f6b63;

  /* Type */
  --font-display: "Archivo", system-ui, -apple-system, sans-serif;
  --font-ui: "Public Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Rhythm */
  --radius: 4px;
  --radius-lg: 6px;
  --rail-w: 264px;
  --row-h: 44px;
  --topbar-h: 52px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* One focus treatment everywhere. Never removed, only shaped. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Type scale
   -------------------------------------------------------------------------- */

h1 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112, "wght" 650;
  font-size: 24px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}

h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}

h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}

/* Section eyebrow — marks a region, never decorative */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 10px;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   App frame
   -------------------------------------------------------------------------- */

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 28px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.wordmark {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125, "wght" 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.wordmark:hover {
  text-decoration: none;
  color: var(--accent);
}

.topnav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

/* Signed-in identity, far right of the topbar */
.account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account form {
  margin: 0;
}

.avatar {
  border-radius: 999px;
  display: block;
}

.account-email {
  font-size: 12px;
  color: var(--muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .account-email {
    display: none;
  }
}

.topnav a {
  padding: 6px 11px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.topnav a:hover {
  background: var(--surface-sunk);
  color: var(--ink);
  text-decoration: none;
}

.topnav a[aria-current="page"] {
  background: var(--accent-wash);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Layout: rail + content workspace
   -------------------------------------------------------------------------- */

.workspace {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - var(--topbar-h));
}

.rail {
  background: var(--surface);
  border-right: 1px solid var(--rule);
  padding: 18px 18px 28px;
  position: sticky;
  top: var(--topbar-h);
  align-self: stretch;
  min-height: calc(100vh - var(--topbar-h));
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}

.rail-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.content {
  padding: 20px 24px 56px;
  min-width: 0;
}

/* Pages without a rail; centred so the leftover width is even on both sides
   rather than pooling on the right. */
.page {
  padding: 22px 24px 56px;
  max-width: 1180px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

/* --------------------------------------------------------------------------
   Forms — visible fill, visible border, real placeholders.
   Attempt #1 failed partly on transparent bottom-border-only inputs.
   -------------------------------------------------------------------------- */

.field {
  margin-bottom: 14px;
}

.field > label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

input[type="text"],
input[type="number"],
input[type="search"],
input[type="file"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 7px 9px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input[type="number"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

input::placeholder {
  color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-wash);
}

input[type="file"] {
  padding: 6px;
  cursor: pointer;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.field-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  margin: 0;
  cursor: pointer;
}

.field-check label {
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 7px 13px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  background: var(--surface-sunk);
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--block {
  width: 100%;
}

/* Irreversible actions. Filled ink rather than a new alarm colour: the palette
   has no red on purpose, and a destructive button should not look like the
   download button sitting above it. */
.btn--destructive {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn--destructive:hover {
  background: #000;
  border-color: #000;
}

.btn--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 5px 8px;
}

.btn--quiet:hover {
  background: var(--surface-sunk);
  color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Results table — the core triage surface
   -------------------------------------------------------------------------- */

.results-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.results-count {
  font-size: 13px;
  color: var(--muted);
}

.results-count strong {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
}

/* No `overflow` here: it would make the sticky header resolve against this
   box instead of the viewport, which pushes the header down over row one. */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}

table.rows {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

/* Corners are rounded on the cells themselves, since the wrapper can't clip. */
table.rows thead th:first-child {
  border-top-left-radius: var(--radius-lg);
}

table.rows thead th:last-child {
  border-top-right-radius: var(--radius-lg);
}

table.rows tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}

table.rows tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}

/* Sticky headers are opt-in: only the long results list needs them. */
table.rows--sticky thead th {
  position: sticky;
  top: var(--topbar-h);
  z-index: 10;
}

table.rows thead th {
  background: var(--surface);
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

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

table.rows tbody tr:last-child {
  border-bottom: none;
}

table.rows td {
  padding: 0 12px;
  height: var(--row-h);
  vertical-align: middle;
}

/* Numeric headers sit over right-aligned figures, so they align right too. */
table.rows th.col-num {
  text-align: right;
}

/* Hold the trailing columns to their content so the role and company
   columns absorb the leftover width instead of leaving a dead gap. */
table.rows th.col-status {
  width: 104px;
}

table.rows th.col-actions {
  width: 172px;
}

table.rows th.col-num,
table.rows th.col-mode {
  width: 76px;
}

/* Row states. Focus is a solid accent edge, not a color wash. */
.row:hover {
  background: var(--accent-wash);
}

.row.is-focused {
  background: var(--accent-wash);
  box-shadow: inset 3px 0 0 var(--accent);
}

.row-role {
  font-weight: 600;
  color: var(--ink);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.row-role:hover {
  text-decoration: none;
  color: var(--accent);
}

.row-company {
  color: var(--ink);
}

.row-loc,
.row-mode {
  color: var(--muted);
  white-space: nowrap;
}

.row-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* Row actions stay out of the way until the row is live */
.row-actions {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.row:hover .row-actions,
.row.is-focused .row-actions,
.row-actions:focus-within {
  opacity: 1;
}

.row-action {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 3px 7px;
  cursor: pointer;
}

.row-action:hover {
  background: var(--surface);
  border-color: var(--rule-strong);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   The gauge column — the signature.
   Sorted descending, this column reads as a bar chart of the whole search.
   -------------------------------------------------------------------------- */

.gauge-cell {
  width: 148px;
}

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

.gauge-track {
  position: relative;
  flex: 1;
  height: 6px;
  background: var(--surface-sunk);
  border-radius: 999px;
  overflow: hidden;
}

.gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--gauge-value, 0%);
  border-radius: 999px;
  background: var(--gauge-3);
  transform-origin: left center;
}

.gauge--1 .gauge-fill {
  background: var(--gauge-1);
}
.gauge--2 .gauge-fill {
  background: var(--gauge-2);
}
.gauge--3 .gauge-fill {
  background: var(--gauge-3);
}
.gauge--4 .gauge-fill {
  background: var(--gauge-4);
}

.gauge-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  min-width: 22px;
  text-align: right;
}

.gauge--none .gauge-value {
  color: var(--faint);
  font-weight: 400;
}

/* The one orchestrated moment: gauges fill in a fast stagger on arrival. */
.results-arrive .gauge-fill {
  animation: gauge-in 340ms cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  animation-delay: calc(var(--row-index, 0) * 22ms);
}

@keyframes gauge-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* --------------------------------------------------------------------------
   Dismissed rows collapse to an undo line rather than vanishing
   -------------------------------------------------------------------------- */

.row-dismissed td {
  height: 32px;
  background: var(--surface-sunk);
  color: var(--muted);
  font-size: 12px;
}

.row-dismissed .undo {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Status marks — structural, never alarm-colored
   -------------------------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--rule-strong);
  flex: none;
}

.status--saved::before {
  background: var(--gauge-2);
}

.status--applied {
  color: var(--accent);
}

.status--applied::before {
  background: var(--accent);
}

.status--rejected::before {
  background: transparent;
  border: 1px solid var(--rule-strong);
}

/* --------------------------------------------------------------------------
   Chips — extracted requirements
   -------------------------------------------------------------------------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  font-size: 12px;
  color: var(--ink);
  background: var(--surface-sunk);
  border-radius: var(--radius);
  padding: 3px 8px;
  white-space: nowrap;
}

.chip--num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Panels
   -------------------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.panel + .panel {
  margin-top: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2,
.panel-head .eyebrow {
  margin: 0;
}

/* Panel internals: headings after content need air above, the first child never does. */
.panel h3 {
  margin-top: 14px;
}

.panel > *:first-child {
  margin-top: 0;
}

.panel > .meta {
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Job detail — description left, requirements and actions in a sticky rail
   -------------------------------------------------------------------------- */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.detail-rail {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.description {
  font-size: 13.5px;
  line-height: 1.62;
  color: #232a31;
  white-space: pre-wrap;
  word-break: break-word;
}

.spec-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 14px;
  font-size: 13px;
  margin: 0;
}

.spec-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 1px;
}

.spec-list dd {
  margin: 0;
  color: var(--ink);
}

/* Prev/next keeps triage from dead-ending on the detail page */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Suggestion and issue lists
   -------------------------------------------------------------------------- */

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

.notes li {
  font-size: 13px;
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
  color: #232a31;
}

.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gauge-2);
}

.note-severity {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
}

/* --------------------------------------------------------------------------
   Tracked — three dense tables, not cards
   -------------------------------------------------------------------------- */

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.board-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.board .table-wrap {
  border-radius: var(--radius);
}

.board table.rows td {
  height: 38px;
}

/* --------------------------------------------------------------------------
   Search progress — a real screen, not a spinner in a void
   -------------------------------------------------------------------------- */

.progress {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
}

.progress-steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--faint);
}

.progress-steps li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  flex: none;
}

.progress-steps li.is-active {
  color: var(--ink);
  font-weight: 600;
}

.progress-steps li.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}

.progress-steps li.is-done {
  color: var(--muted);
}

.progress-steps li.is-done::before {
  background: var(--gauge-2);
  border-color: var(--gauge-2);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* --------------------------------------------------------------------------
   Empty states name the next action; messages state what happened
   -------------------------------------------------------------------------- */

.empty {
  background: var(--surface);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
}

.empty h2 {
  margin-bottom: 6px;
}

.empty p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 auto 14px;
  max-width: 44ch;
}

.empty--sm {
  padding: 18px 14px;
  text-align: left;
}

.empty--sm p {
  margin-bottom: 0;
}

.msg {
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px;
  margin: 0 0 14px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
}

.msg--note {
  border-left: 3px solid var(--gauge-3);
}

.msg--problem {
  border-left: 3px solid var(--ink);
}

/* --------------------------------------------------------------------------
   Entry screen — leads with the thesis, for visitors arriving cold
   -------------------------------------------------------------------------- */

.entry {
  max-width: 960px;
  margin: 0 auto;
  padding: 68px 24px 64px;
}

.entry-thesis {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 120, "wght" 700;
  font-size: clamp(34px, 6.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.entry-thesis .turn {
  display: block;
  color: var(--accent);
}

.entry-lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 54ch;
  margin: 0 0 28px;
}

.entry-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.entry-actions .btn {
  padding: 9px 16px;
  font-size: 14px;
}

/* A live sample of the gauge column, so the thesis is shown, not claimed */
.entry-sample {
  margin-bottom: 52px;
}

.entry-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.entry-step {
  background: var(--surface);
  padding: 18px 18px 20px;
}

/* The order is real — you cannot score before you have a resume — so it is numbered. */
.entry-step .num {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  margin-bottom: 8px;
}

.entry-step h2 {
  margin-bottom: 5px;
}

.entry-step p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Keyboard hints
   -------------------------------------------------------------------------- */

.keyhints {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--faint);
}

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.stack-sm > * + * {
  margin-top: 8px;
}

.stack > * + * {
  margin-top: 16px;
}

.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 — the table degrades to stacked rows
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-rail {
    position: static;
  }

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

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    /* min-height must be released too, or the filter form stands a full
       viewport tall above the results on a phone. */
    min-height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }

  .entry-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .content,
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  table.rows thead {
    display: none;
  }

  table.rows tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    padding: 10px 12px;
  }

  table.rows td {
    height: auto;
    padding: 0;
  }

  .gauge-cell {
    width: auto;
    grid-column: 1 / -1;
    order: -1;
    margin-bottom: 4px;
  }

  .row-role {
    max-width: none;
    white-space: normal;
  }

  .row-num,
  .row-mode,
  .row-loc {
    text-align: left;
    font-size: 12px;
  }

  .row-actions {
    opacity: 1;
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 6px;
  }

  .row-action {
    border-color: var(--rule-strong);
    background: var(--surface);
  }
}

/* --------------------------------------------------------------------------
   Reduced motion — the gauge stagger and the progress pulse are the only
   animations in the product, and both are disabled here.
   -------------------------------------------------------------------------- */

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