/*
 * Miliarium — "Gallery". Editorial ivory, Newsreader + Hanken Grotesk, bronze accent.
 *
 * Values come from design_system/miliarium-design-system.md and the .dc.html files
 * beside it, which are the contract. Plain custom properties instead of Tailwind's
 * @theme, since there is no build step here to compile utilities from — so this file
 * also carries the component layer the Tailwind classes used to provide.
 *
 * Fonts are loaded from a <link> in layout-header.php, not @import here: an @import
 * inside the stylesheet serializes the font fetch behind this file's own download.
 */

:root {
  /* color */
  --color-paper: #faf7f2;         /* page background */
  --color-card: #ffffff;          /* surfaces */
  --color-ink: #211d16;           /* headings, primary buttons */
  --color-ink-2: #57503f;         /* body text */
  --color-ink-3: #6e6455;         /* secondary text */
  --color-faint: #b4a88f;         /* tertiary/meta text */
  --color-border: #e9e2d6;        /* card hairlines */
  --color-border-strong: #d8cfc0; /* input/button borders */
  --color-bronze: #9c7b4f;        /* accent: current stage, overlines, focus */
  --color-bronze-deep: #8c6a4a;   /* bronze on large fills (status page) */
  --color-stone: #eae2d4;         /* empty stage stones */
  --color-hover: #f1ebe0;         /* warm hover tint */
  --color-current-bg: #fbf6ec;    /* current-stage row background */
  --color-quiet-bg: #f5e9d4;      /* "gone quiet" chip bg */
  --color-quiet-ink: #7a5a25;     /* "gone quiet" chip text */
  --color-quiet-border: #d9b98f;  /* quiet job card border */
  --color-moss: #4c6b4f;          /* delivered/success */
  --color-brick: #8c3b2e;         /* destructive/error */

  /* supporting values the components need, taken from the design files */
  --color-ink-hover: #3b3428;          /* primary button hover */
  --color-card-hover: #fffdf9;         /* job row hover fill */
  --color-rule: #efe8dc;               /* tab and topbar rules */
  --color-divider: #f4efe6;            /* dividers inside a card */
  --color-ring: #e0d8ca;               /* hollow stage circles */
  --color-note-bg: #fdfcf9;            /* the note textarea */
  --color-focus-ring: #f1e7d6;         /* 3px focus halo */
  --color-quiet-border-strong: #c9a35b;/* quiet card hover border */
  --color-error-border: #c98b7b;
  --color-moss-bg: #e7ede4;
  --color-brick-border: #e3cfc4;
  --color-brick-bg: #f7eee9;
  --color-disabled-bg: #eae5db;
  --color-disabled-ink: #a79c89;
  --color-credit: #c6bca9;             /* "Updates by Miliarium" */
  --color-avatar-bg: #3e3a33;          /* status-page avatar, softer than ink */
  --color-hairline-soft: #f0eae0;      /* rule inside the "Happening now" card */

  /* type — UI scale (Hanken Grotesk) */
  --text-overline: 11px;
  --text-meta: 12.5px;
  --text-secondary: 13.5px;
  --text-label: 14px;
  --text-body: 15px;
  --text-lead: 18px;

  /* type — display scale (Newsreader) */
  --text-display-sm: 19px;
  --text-display-md: 21px;
  --text-display-lg: 24px;
  --text-display-title: 38px;
  --text-display-hero: 64px;

  --font-display: "Newsreader", ui-serif, Georgia, serif;
  --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* radius */
  --radius-control: 8px; /* buttons, inputs */
  --radius-card: 12px;   /* cards */
  --radius-card-lg: 16px;/* cards on mobile */

  /* motion — 160ms fades, 240ms stone fills. Nothing bounces. */
  --ease-out-soft: cubic-bezier(0.2, 0, 0, 1);

  /* the stone stack shrinks as one unit on small screens */
  --stack-scale: 1;
}

/*
 * Dark is opt-in, never automatic for the photographer's app: that surface is ivory by
 * design and has no dark counterpart. Only the client status page was drawn dark, and it
 * sets .client on <html> to ask for these.
 */
html.client {
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  html.client {
    --color-paper: #17140f;
    --color-card: #201c15;
    --color-border: #322c22;
    --color-border-strong: #322c22;
    --color-rule: #322c22;
    --color-divider: #322c22;
    --color-hairline-soft: #322c22;
    --color-ink: #ede7dc;
    --color-ink-2: #cfc5b4;
    --color-ink-3: #b7ac99;
    --color-faint: #6e6455;
    --color-bronze: #c2a06e;
    --color-bronze-deep: #c2a06e;
    --color-stone: #322c22;
    --color-credit: #6e6455;
    /* The avatar inverts to ink-on-paper — see "Client link · dark" in the mobile file. */
    --color-avatar-bg: #ede7dc;
    --color-avatar-ink: #17140f;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  font-variant-numeric: lining-nums tabular-nums;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: var(--text-display-title);
  line-height: 1.15;
}

h2 {
  font-size: var(--text-display-md);
}

h3 {
  font-size: var(--text-display-sm);
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--color-ink);
  text-decoration: none;
  transition: color 160ms var(--ease-out-soft);
}

a:hover {
  color: var(--color-bronze);
}

:focus-visible {
  outline: 2px solid var(--color-bronze);
  outline-offset: 2px;
}

::selection {
  background: var(--color-quiet-bg);
  color: var(--color-ink);
}

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

img {
  max-width: 100%;
}

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

/*
 * Three column widths, because the design has three: the signed-in app, the marketing
 * pages, and the client status page. Everything else (forms, legal) uses --narrow.
 */
.page {
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 64px;
  flex: 1;
}

.page--app {
  max-width: 1040px;
}

.page--marketing {
  max-width: 1180px;
  padding: 0;
}

.page--narrow {
  max-width: 720px;
}

.page--client {
  max-width: 560px;
  padding: 56px 24px 56px;
  text-align: center;
}

.bleed {
  /* a full-width band inside .page--marketing */
  width: 100%;
}

.bleed__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px;
}

/* ------------------------------------------------------------- site chrome */

.topbar {
  border-bottom: 1px solid var(--color-rule);
}

.topbar__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar--marketing {
  border-bottom: none;
}

.topbar--marketing .topbar__inner {
  max-width: 1180px;
  padding: 18px 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

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

.wordmark svg {
  height: 19px;
  width: 15px;
  flex-shrink: 0;
}

.topbar--marketing .wordmark {
  font-size: 21px;
}

.topbar--marketing .wordmark svg {
  height: 21px;
  width: 17px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: var(--text-label);
  color: var(--color-ink-3);
  white-space: nowrap;
}

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

.nav a[aria-current] {
  color: var(--color-ink);
  font-weight: 600;
}

.topbar--marketing .nav a {
  color: var(--color-ink-2);
}

/* A dot for an open comment, same "add a mark, not a new nav item" reasoning as
   .tabbar__badge below. It's its own link to /comments rather than living inside the
   "Jobs" <a> — nesting it in "Jobs" made the dot decorative, since clicking anywhere on
   that link just went to Jobs. Desktop nav has no tab-bar-style absolute badge slot, so
   this sits inline after "Jobs" instead, wrapped in a small real click target. */
.nav-dot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 8px 4px;
  border-radius: 999px;
}

.nav-dot-link:hover {
  background: var(--color-hover);
}

.nav-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-bronze);
  vertical-align: middle;
}

.badge-unlimited {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-bronze);
  color: var(--color-paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* The tab bar has no room for the text badge, so paid status is a small bronze dot. */
.tabbar__badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-bronze);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.avatar-button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
  transition: opacity 160ms var(--ease-out-soft);
}

.avatar-button:hover {
  opacity: 0.8;
}

/* CSS-only disclosure menu — the marketing nav on a narrow screen. */
.navmenu {
  display: none;
  position: relative;
}

.navmenu > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  cursor: pointer;
  border-radius: var(--radius-control);
}

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

.navmenu > summary:hover {
  background: var(--color-hover);
}

.navmenu__bars,
.navmenu__bars::before,
.navmenu__bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--color-ink);
  content: "";
}

.navmenu__bars {
  position: relative;
}

.navmenu__bars::before {
  position: absolute;
  top: -6px;
}

.navmenu__bars::after {
  position: absolute;
  top: 6px;
}

.navmenu[open] .navmenu__bars {
  background: transparent;
}

.navmenu[open] .navmenu__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.navmenu[open] .navmenu__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.navmenu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 14px 40px rgb(33 29 22 / 10%);
}

.navmenu__panel a,
.navmenu__panel button {
  display: block;
  padding: 11px 12px;
  border-radius: var(--radius-control);
  font-size: var(--text-label);
  font-weight: 600;
  color: var(--color-ink-2);
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.navmenu__panel a:hover,
.navmenu__panel button:hover {
  background: var(--color-hover);
  color: var(--color-ink);
}

/*
 * The signed-in app on a phone: a bottom tab bar rather than a hamburger, so the two
 * places a photographer actually goes stay one thumb away. Hidden on job detail, where
 * the primary action owns the thumb zone instead.
 */
.tabbar {
  display: none;
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  border-top: 1px solid var(--color-rule);
  background: var(--color-paper);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.tabbar a {
  position: relative;
  flex: 1;
  min-width: 64px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-faint);
}

.tabbar a[aria-current] {
  color: var(--color-ink);
}

.tabbar svg {
  height: 17px;
  width: 14px;
}

.tabbar__dot {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentcolor;
  border-radius: 4px;
}

.tabbar__dot--round {
  border-radius: 999px;
}

.site-footer {
  border-top: 1px solid var(--color-rule);
  font-size: 13px;
  color: var(--color-faint);
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer a {
  color: var(--color-faint);
}

.site-footer a:hover {
  color: var(--color-ink-2);
}

.site-footer__links {
  display: flex;
  gap: 24px;
}

/* ------------------------------------------------------------ typography */

.eyebrow {
  font-size: var(--text-overline);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-bronze);
  margin: 0;
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--color-ink-2);
  max-width: 60ch;
}

.subline {
  color: var(--color-ink-3);
  margin: 6px 0 0;
}

.meta {
  font-size: var(--text-meta);
  color: var(--color-faint);
}

.secondary {
  font-size: var(--text-secondary);
  color: var(--color-ink-3);
}

.display-lg {
  font-family: var(--font-display);
  font-size: var(--text-display-lg);
  font-weight: 500;
}

/* --------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius-control);
  padding: 11px 20px;
  font-family: inherit;
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid var(--color-ink);
  background: var(--color-ink);
  color: var(--color-paper);
  text-align: center;
  transition:
    background-color 160ms var(--ease-out-soft),
    border-color 160ms var(--ease-out-soft),
    color 160ms var(--ease-out-soft),
    transform 160ms var(--ease-out-soft);
}

.btn:hover:not([disabled]) {
  background: var(--color-ink-hover);
  border-color: var(--color-ink-hover);
  color: var(--color-paper);
}

.btn:active:not([disabled]) {
  transform: scale(0.98);
}

.btn[disabled],
.btn.disabled {
  background: var(--color-disabled-bg);
  border-color: transparent;
  color: var(--color-disabled-ink);
  cursor: default;
}

.btn.secondary {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-ink);
}

.btn.secondary:hover:not([disabled]) {
  background: var(--color-hover);
  color: var(--color-ink);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-ink-2);
  padding: 11px 14px;
}

.btn.ghost:hover:not([disabled]) {
  background: var(--color-hover);
  color: var(--color-ink);
}

.btn.danger {
  background: transparent;
  border-color: var(--color-brick-border);
  color: var(--color-brick);
}

.btn.danger:hover:not([disabled]) {
  background: var(--color-brick-bg);
  color: var(--color-brick);
}

.btn.small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
}

.btn.large {
  padding: 14px 26px;
  font-size: var(--text-body);
}

.btn.block {
  width: 100%;
}

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

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-ink-2);
  cursor: pointer;
  text-decoration: underline;
}

.link-button:hover {
  color: var(--color-bronze);
}

.inline {
  display: inline;
}

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

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: var(--text-secondary);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  background: var(--color-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  padding: 11px 13px;
  font-family: inherit;
  font-size: var(--text-label);
  color: var(--color-ink);
  transition:
    border-color 160ms var(--ease-out-soft),
    box-shadow 160ms var(--ease-out-soft);
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--color-bronze);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* The error state colours the label and the border, not only the message. */
.field.has-error label {
  color: var(--color-brick);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--color-error-border);
}

.field .error,
.error {
  color: var(--color-brick);
  font-size: var(--text-secondary);
  margin-top: 4px;
}

.field .hint {
  font-size: var(--text-meta);
  color: var(--color-ink-3);
  margin: 6px 0 0;
}

.field .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: var(--text-label);
  line-height: 1.5;
  margin: 0;
}

.field .checkbox input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-bronze);
  flex-shrink: 0;
}

/* A value you edit in place. The dashed underline is the whole affordance. */
.field-inline {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--color-border-strong);
  border-radius: 0;
  padding: 2px 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-ink);
  text-align: right;
  transition: border-color 160ms var(--ease-out-soft);
}

.field-inline:hover {
  border-bottom-color: var(--color-bronze);
}

.field-inline:focus-visible {
  outline: none;
  border-bottom: 1px solid var(--color-bronze);
  box-shadow: none;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-editor__row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.stage-editor__row input {
  width: 100%;
  background: var(--color-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  padding: 9px 12px;
  font: inherit;
  font-size: var(--text-secondary);
  color: var(--color-ink);
}

.stage-editor__row input:focus-visible {
  outline: none;
  border-color: var(--color-bronze);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.stage-editor__remove {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--color-faint);
  flex-shrink: 0;
}

.stage-editor__remove:hover {
  color: var(--color-brick);
  background: var(--color-brick-bg);
}

.stage-editor__row--edit {
  grid-template-columns: auto 1fr 1fr auto auto;
}

.stage-editor__handle {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
  letter-spacing: -3px;
  color: var(--color-faint);
  cursor: grab;
  touch-action: none;
  flex-shrink: 0;
}

.stage-editor__handle:active {
  cursor: grabbing;
}

.stage-editor__row--dragging {
  z-index: 20;
  background: var(--color-card);
  border-radius: var(--radius-control);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.stage-editor__row--placeholder {
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-control);
  background: var(--color-note-bg, transparent);
}

.stage-editor__move {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stage-editor__move button {
  width: 28px;
  height: 17px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  color: var(--color-faint);
}

.stage-editor__move button:hover:not(:disabled) {
  color: var(--color-ink);
}

.stage-editor__move button:disabled {
  opacity: 0.35;
}

@media (width < 560px) {
  .stage-editor__row {
    grid-template-columns: 1fr;
  }

  .stage-editor__remove {
    justify-self: start;
  }

  .stage-editor__row--edit {
    grid-template-columns: 1fr;
  }

  .stage-editor__move {
    flex-direction: row;
    justify-self: start;
  }

  .stage-editor__handle {
    justify-self: start;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

.swatch-row input[type="color"] {
  width: 52px;
  height: 44px;
  padding: 4px;
  background: var(--color-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  cursor: pointer;
}

.notice {
  border: 1px solid var(--color-border);
  background: var(--color-card);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  font-size: var(--text-label);
  color: var(--color-ink-2);
  margin-bottom: 20px;
}

.notice.bad {
  border-color: var(--color-error-border);
  color: var(--color-brick);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  max-width: calc(100% - 48px);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 13px 22px;
  border-radius: var(--radius-control);
  font-size: var(--text-label);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 14px 40px rgb(33 29 22 / 20%);
  /* Resting position: centered, fully visible. The animations only add a transient
     entrance/exit on top of this — without a base transform here, the box would sit
     uncentered in the gap between toast-in finishing and toast-out starting. */
  transform: translateX(-50%);
  animation:
    toast-in 200ms var(--ease-out-soft),
    toast-out 200ms var(--ease-out-soft) 3.6s forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card-lg);
  padding: 22px 24px;
}

.card + .card {
  margin-top: 20px;
}

.card > :last-child,
.status-now > :last-child,
.empty > :last-child {
  margin-bottom: 0;
}

.card__title {
  margin-bottom: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ------------------------------------------------------------------ chips */

.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-hover);
  color: var(--color-ink-2);
  white-space: nowrap;
}

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

/* A comment is someone actively waiting on a reply — ranked above "quiet" in
   attention_items(), so it gets its own bronze tint instead of sharing the plain
   .chip default, which read as the weakest-looking chip despite being the stronger
   signal. */
.chip--comment {
  background: #efe3d0;
  color: #7a5a25;
}

.chip--done {
  background: var(--color-moss-bg);
  color: var(--color-moss);
}

.chip--due {
  background: var(--color-hover);
  color: var(--color-ink-2);
}

.chip--overdue {
  background: var(--color-brick-bg);
  color: var(--color-brick);
}

/* --------------------------------------------- stage stones (the signature) */

/*
 * Progress is stones, never a percent bar.
 * Meter: one rounded rect per stage in a row. Stack: a real cairn, filling bottom-up.
 */
.meter {
  display: flex;
  gap: 4px;
}

.meter__stone {
  flex: 1;
  height: 8px;
  min-width: 8px;
  border-radius: 4px;
  background: var(--color-stone);
  transition: background-color 240ms var(--ease-out-soft);
}

.meter__stone--done {
  background: var(--color-ink);
}

.meter__stone--current {
  background: var(--color-bronze);
}

.stack-stones {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: calc(5px * var(--stack-scale));
}

.stack-stones__stone {
  width: calc(var(--w) * var(--stack-scale) * 1px);
  height: calc(var(--h) * var(--stack-scale) * 1px);
  border-radius: 999px;
  background: var(--color-stone);
  transition: background-color 240ms var(--ease-out-soft);
}

.stack-stones__stone--done {
  background: var(--color-ink);
}

/* Large fills read heavy, so the status page uses the deeper bronze. */
.stack-stones__stone--current {
  background: var(--accent, var(--color-bronze-deep));
}

/* ----------------------------------------------------------- jobs dashboard */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

/*
 * Sits between "Needs attention" and the job list. Overdue and quiet jobs on active
 * plans that carry more than a handful — the point where the plain list stops being
 * scannable at a glance and the backwards-nudge belongs on the desk itself, not only in
 * the daily cron email.
 */
.attention {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--color-current-bg);
  border: 1px solid var(--color-quiet-border);
  border-radius: var(--radius-card);
}

.attention__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.attention__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: var(--radius-control);
}

.attention__row:hover {
  background: var(--color-hover);
}

.attention__link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-ink);
}

.attention__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.comment-inbox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.comment-inbox__row {
  padding: 16px 18px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  transition: opacity 180ms var(--ease-out-soft);
}

.comment-inbox__meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.comment-inbox__client {
  font-weight: 600;
  color: var(--color-ink);
}

.comment-inbox__stage {
  font-size: 12.5px;
  color: var(--color-ink-3);
}

.comment-inbox__meta .meta {
  margin-left: auto;
}

.comment-inbox__body {
  margin: 0 0 14px;
  color: var(--color-ink-2);
  line-height: 1.5;
}

.comment-inbox__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-inbox__resolve {
  margin: 0;
}

.jobs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  margin-bottom: 24px;
}

.search input {
  width: 220px;
  max-width: 100%;
  background: var(--color-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  padding: 9px 13px;
  font: inherit;
  font-size: var(--text-secondary);
  color: var(--color-ink);
}

.search input:focus-visible {
  outline: none;
  border-color: var(--color-bronze);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.tabs {
  display: flex;
  gap: 26px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--color-rule);
  font-size: var(--text-label);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a {
  padding-bottom: 11px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--color-ink-3);
  white-space: nowrap;
}

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

.tabs a[aria-current] {
  border-bottom-color: var(--color-ink);
  color: var(--color-ink);
  font-weight: 600;
}

/* The billing-cycle switch is a different control from the section tabs above. */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-card);
}

.switch a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: var(--text-secondary);
  font-weight: 600;
  color: var(--color-ink-3);
  transition: background-color 160ms var(--ease-out-soft);
}

.switch a:hover {
  background: var(--color-hover);
  color: var(--color-ink);
}

.switch a[aria-current] {
  background: var(--color-ink);
  color: var(--color-paper);
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  display: grid;
  grid-template-columns: 1fr 240px 200px;
  gap: 24px;
  align-items: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 22px 28px;
  color: var(--color-ink);
  transition:
    border-color 160ms var(--ease-out-soft),
    background-color 160ms var(--ease-out-soft);
}

.job-card:hover {
  border-color: var(--color-border-strong);
  background: var(--color-card-hover);
  color: var(--color-ink);
}

.job-card--quiet {
  border-color: var(--color-quiet-border);
}

.job-card--quiet:hover {
  border-color: var(--color-quiet-border-strong);
  background: var(--color-card);
}

.job-card__name {
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  font-weight: 500;
}

.job-card__sub {
  font-size: var(--text-secondary);
  color: var(--color-ink-3);
  margin-top: 3px;
}

.job-card__stage {
  font-size: var(--text-secondary);
  margin-top: 7px;
}

.job-card__stage span {
  color: var(--color-ink-3);
}

.job-card__right {
  text-align: right;
}

.job-card__right .meta {
  margin-top: 3px;
}

.empty {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 48px 28px;
  text-align: center;
}

.empty p {
  margin: 0;
}

.empty p + p {
  margin: 8px auto 0;
  max-width: 36ch;
  color: var(--color-ink-3);
}

.plan-line {
  margin: 28px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--color-faint);
}

.plan-line a {
  color: var(--color-ink-3);
  text-decoration: underline;
}

/* -------------------------------------------------------------- job detail */

.back-link {
  display: inline-block;
  font-size: var(--text-secondary);
  color: var(--color-ink-3);
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
  margin-top: 32px;
}

.stage-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 8px 0;
  overflow: hidden;
}

.stage-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px 4px;
}

.stage-card__head .eyebrow {
  margin: 0;
}

.stage-card__edit {
  padding-top: 4px;
  padding-bottom: 8px;
}

.stage-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--color-divider);
}

.stage-row:last-of-type {
  border-bottom: none;
}

.stage-row__circle {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1.5px solid var(--color-ring);
}

.stage-row__circle--done {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: 12px;
  line-height: 1;
}

.stage-row__circle--current {
  border: 2px solid var(--color-bronze);
}

.stage-row__body {
  flex: 1;
  min-width: 40%;
}

.stage-row__name {
  font-size: var(--text-body);
  color: var(--color-ink-3);
}

.stage-row--done .stage-row__name {
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: var(--color-border-strong);
}

.stage-row--current {
  background: var(--color-current-bg);
  border-left: 3px solid var(--color-bronze);
  border-bottom: 1px solid var(--color-divider);
  border-top: 1px solid var(--color-divider);
  padding: 20px 28px 20px 25px;
  flex-wrap: wrap;
}

.stage-row--current .stage-row__name {
  font-family: var(--font-display);
  font-size: var(--text-display-sm);
  font-weight: 500;
  color: var(--color-ink);
}

.stage-row__client {
  font-size: 13px;
  color: var(--color-ink-3);
  margin-top: 2px;
}

/* Lives inside .stage-row__body now, in the normal top-to-bottom flow (name, client
   line, comment, then the primary action) — not a side rail vertically centered against
   whatever else the row is showing that day. A stage with an open comment used to leave
   this floating at the row's mid-height, disconnected from either. */
.stage-row__advance {
  margin-top: 14px;
}

.stage-comment {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--color-quiet-bg);
  border: 1px solid var(--color-quiet-border);
  border-radius: 8px;
}

.stage-comment__body {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-style: italic;
  color: var(--color-ink-2);
}

.stage-comment__reply {
  margin-top: 8px;
}

.stage-comment__reply textarea {
  width: 100%;
  background: var(--color-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-ink);
  resize: vertical;
  line-height: 1.5;
}

.stage-comment__reply textarea:focus-visible {
  outline: none;
  border-color: var(--color-bronze);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.stage-comment__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.stage-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  border-top: 1px solid var(--color-divider);
}

.stage-card__foot p {
  margin: 0;
}

.detail-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--text-label);
}

.detail-row > span:first-child,
.detail-row > label:first-child {
  color: var(--color-ink-3);
}

.detail-row__value {
  font-weight: 600;
}

.detail-row__value--link {
  color: var(--color-bronze);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-row__pair {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-secondary);
}

.timeline li {
  display: flex;
  gap: 12px;
}

.timeline__when {
  width: 52px;
  flex-shrink: 0;
  color: var(--color-faint);
}

.timeline__what {
  color: var(--color-ink-2);
}

/* --------------------------------------------------------- client status page */

.status-avatar {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-avatar-bg);
  color: var(--color-avatar-ink, var(--color-paper));
  font-family: var(--font-display);
  font-size: var(--text-display-sm);
}

.status-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-business {
  margin: 14px 0 0;
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-ink-3);
}

.status-client {
  margin-top: 14px;
}

.status-type {
  margin: 4px 0 0;
  color: var(--color-ink-3);
}

.status-stack {
  margin: 40px 0 12px;
}

.status-count {
  margin: 0;
  font-size: var(--text-label);
  color: var(--color-ink-3);
}

.status-now {
  margin-top: 32px;
  padding: 28px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  text-align: left;
}

.status-now__label {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: var(--text-display-lg);
  font-weight: 500;
  line-height: 1.25;
}

.status-now__note {
  margin: 8px 0 0;
  line-height: 1.6;
  color: var(--color-ink-2);
  white-space: pre-line;
}

.status-now__when {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--color-hairline-soft);
  font-size: 14.5px;
}

.status-comment {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--color-hairline-soft);
}

.status-comment__label {
  display: block;
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--color-ink-3);
}

.status-comment__form textarea {
  width: 100%;
  background: var(--color-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--color-ink);
  resize: vertical;
  line-height: 1.5;
}

.status-comment__form textarea:focus-visible {
  outline: none;
  border-color: var(--color-bronze);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.status-comment__form .btn {
  margin-top: 10px;
}

.status-comment__sent,
.status-comment__error {
  margin: 0;
  font-size: 12.5px;
  color: var(--color-ink-3);
}

.status-comment__error {
  color: var(--color-brick);
}

.status-now .eyebrow {
  font-size: 11.5px;
  color: var(--accent, var(--color-bronze-deep));
}

.status-business--accent {
  color: var(--accent, var(--color-ink-3));
}

.status-timeline {
  padding: 28px 8px 0;
  text-align: left;
  font-size: var(--text-label);
}

.status-timeline .timeline__when {
  width: 52px;
}

.status-contact {
  margin: 48px 0 0;
  font-size: 12px;
  color: var(--color-faint);
}

.status-contact a {
  color: var(--color-faint);
  text-decoration: underline;
}

.status-credit {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--color-credit);
}

.status-credit a {
  color: inherit;
  text-decoration: underline;
}

/* ------------------------------------------------------------ landing page */

.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
  padding: 56px 24px 80px;
}

.hero h1 {
  font-size: var(--text-display-hero);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 20px 0 0;
}

.hero .lead {
  margin: 24px 0 0;
  max-width: 520px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.hero__fine {
  font-size: var(--text-label);
  color: var(--color-ink-3);
  margin: 16px 0 0;
}

.hero__nudge {
  margin: 44px 0 0;
  font-size: var(--text-label);
  line-height: 1.8;
  color: var(--color-ink-3);
}

.hero__nudge em {
  font-family: var(--font-display);
  font-size: var(--text-body);
}

/* The one shadow the system allows in light mode. */
.phone {
  width: 340px;
  justify-self: center;
  padding: 16px 16px 24px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 32px;
  box-shadow: 0 24px 60px rgb(33 29 22 / 10%);
}

.phone__notch {
  width: 96px;
  height: 5px;
  margin: 2px auto 18px;
  border-radius: 999px;
  background: var(--color-stone);
}

.phone__head {
  text-align: center;
}

.phone__avatar {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-avatar-bg);
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: 15px;
}

.phone__business {
  margin: 9px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink-3);
}

.phone__client {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
}

.phone .stack-stones {
  --stack-scale: 0.69; /* 84 → 58px, the phone size in the design file */

  margin: 20px 0 7px;
}

/* At this size the fill is small, so it takes plain bronze rather than the deeper one. */
.phone .stack-stones__stone--current {
  background: var(--color-bronze);
}

.phone__count {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--color-ink-3);
}

.phone__now {
  margin-top: 14px;
  padding: 15px;
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
}

.phone__now .eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.phone__stage {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 500;
}

.phone__when {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-ink-2);
}

.band {
  background: var(--color-card);
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.steps__num {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--color-border-strong);
}

.steps h2 {
  margin: 10px 0 0;
}

.steps p {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--color-ink-2);
}

.never {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  padding: 72px 24px;
}

.never h2 {
  font-size: 36px;
}

.never__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-ink-2);
}

.never__list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.never__list li::before {
  content: "—";
  color: var(--color-bronze);
  font-weight: 700;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------ plans */

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0 0;
}

.plan {
  display: flex;
  flex-direction: column;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card-lg);
  padding: 28px;
}

.plan--featured {
  border-color: var(--color-bronze);
}

.plan__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.plan__price {
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
}

.plan__price span {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-ink-3);
}

.plan__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-secondary);
  color: var(--color-ink-2);
}

.plan__list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.plan__list li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--color-bronze);
  transform: translateY(-2px);
}

.plan .btn {
  margin-top: 32px;
}

.faq {
  margin: 0;
}

.faq dt {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-display-sm);
  margin-top: 24px;
}

.faq dd {
  margin: 6px 0 0;
  color: var(--color-ink-2);
}

/* ------------------------------------------------------------------ legal */

/*
 * Long-form pages. Headings carry no margin by default so cards and page heads can place
 * them exactly; running prose needs the space back.
 */
.legal,
.prose {
  max-width: 68ch;
}

.legal h2,
.prose h2 {
  margin-top: 40px;
}

.legal h3,
.prose h3 {
  margin-top: 24px;
}

.legal p,
.legal li,
.prose p {
  color: var(--color-ink-2);
}

.prose .lead {
  color: var(--color-ink-2);
}

.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
}

.legal table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: var(--text-label);
}

.legal th,
.legal td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}

.legal th {
  font-weight: 600;
  color: var(--color-ink);
}

/* ------------------------------------------------------------------- demo */

.demo-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  background: var(--color-card);
  font-size: var(--text-secondary);
  color: var(--color-ink-2);
  margin-bottom: 24px;
}

.demo-card {
  display: grid;
  grid-template-columns: 1fr 240px 200px;
  gap: 24px;
  align-items: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 22px 28px;
}

/* Framed like a device preview so it reads as "a different page", not a continuation
   of the dashboard it's embedded in. */
.demo-client-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-card);
}

.demo-client-frame__label {
  margin: 0;
  padding: 16px 24px 0;
  text-align: center;
}

.demo-client-frame .page--client {
  padding-top: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

@media (width >= 768px) {
  .page {
    padding: 48px 48px 72px;
  }

  .page--marketing,
  .page--client {
    padding-left: 24px;
    padding-right: 24px;
  }

  .page--marketing {
    padding-top: 0;
    padding-bottom: 0;
  }

  .page--client {
    padding-top: 72px;
  }

  .topbar__inner {
    padding: 18px 48px;
  }

  .topbar--marketing .topbar__inner,
  .site-footer__inner,
  .bleed__inner,
  .hero,
  .never {
    padding-left: 64px;
    padding-right: 64px;
  }

  .bleed__inner {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .hero {
    padding-top: 72px;
    padding-bottom: 96px;
  }
}

/* Tablet and below: the wide grids collapse before the phone breakpoint does. */
@media (width < 1024px) {
  .hero,
  .never,
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero {
    gap: 48px;
  }

  .phone {
    justify-self: start;
  }
}

/*
 * The job row's three columns need real width to read as three columns. Below this it
 * becomes the stacked card from the 390px frame rather than a two-column compromise
 * that leaves the third column orphaned on its own line.
 */
@media (width < 900px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .job-card,
  .demo-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .job-card__name {
    font-size: var(--text-display-sm);
  }

  .job-card__right {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
  }

  .job-card__right .meta {
    margin-top: 0;
  }
}

@media (width < 768px) {
  :root {
    --stack-scale: 0.86; /* 84 → 72px, matching the 390px frame in the design file */
  }

  h1 {
    font-size: 30px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .never h2 {
    font-size: 28px;
  }

  .jobs-toolbar {
    align-items: stretch;
  }

  .search,
  .search input {
    width: 100%;
  }

  /* Marketing links fold into the disclosure menu; the app uses the tab bar below. */
  .topbar--marketing .nav {
    display: none;
  }

  .navmenu {
    display: block;
  }

  .topbar--app .nav a:not([data-keep]) {
    display: none;
  }

  .has-tabbar .tabbar {
    display: flex;
  }

  .has-tabbar {
    padding-bottom: 76px;
  }

  .page {
    padding-bottom: 48px;
  }

  /* Cards take the roomier mobile radius from the 390px frame. */
  .job-card,
  .demo-card {
    border-radius: var(--radius-card-lg);
    padding: 18px 20px;
  }

  .stage-row,
  .stage-card__foot {
    padding-left: 20px;
    padding-right: 20px;
  }

  .stage-row--current {
    padding-left: 17px;
  }

  /* The advance button moves to its own full-width line, inside the thumb zone. */
  .stage-row--current form,
  .stage-row--current .btn {
    width: 100%;
  }

  .card {
    padding: 18px 20px;
  }

  .status-now {
    padding: 20px;
    border-radius: var(--radius-card-lg);
  }

  .status-now__label {
    font-size: var(--text-display-md);
  }

  .phone {
    width: 100%;
    max-width: 340px;
  }

  .switch,
  .plan .btn {
    width: 100%;
  }

  .switch a {
    flex: 1;
    text-align: center;
  }
}

@media (width < 420px) {
  .page,
  .bleed__inner,
  .hero,
  .never,
  .site-footer__inner,
  .topbar__inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero__cta .btn {
    width: 100%;
  }
}

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