/* ============================================================
   Archive North Portal
   The same design system as archivenorth.ca, ported: Northern
   Navy + Parchment + Copper, Manrope (display) + Inter (body).
   Tokens are copied from the site's global.css so the portal is
   unmistakably the same company. Keep them in step by hand; the
   palette moves rarely and on purpose.

   Most clients open this portal on a phone, from a link in a
   welcome email, so the small screen is the primary design and
   wider screens are the enhancement. Two rules follow from that:
   every tap target is at least 44px tall, and nothing is ever
   allowed to scroll the page sideways.

   Contents:
     1. Fonts and tokens
     2. Reset and base
     3. Focus and motion
     4. Chrome: topbar, logo, footer
     5. Buttons and action groups
     6. Cards, panels, stats, badges
     7. Forms and flashes
     8. Tables
     9. Auth screens
    10. Uploads: dropzone and queue
    11. Page headers and utilities
    12. Small screens (max-width: 40rem)
    13. Reduced motion
   ============================================================ */

/* --- 1. Fonts and tokens --- */

@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-wght-normal.938c6e8019b6.woff2") format('woff2-variations');
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format('woff2-variations');
}

:root {
  /* --- Brand palette (identical to the site) --- */
  --navy: #17324d;
  --navy-deep: #102539;
  --navy-lift: #1e4066;
  --archive-blue: #3e6f8e;
  --glacier: #dce5e8;
  --parchment: #f4f0e7;
  --copper: #b56f44;
  --copper-soft: #c98d63;
  --charcoal: #252a2e;

  --paper: #ffffff;
  --paper-warm: #fbf9f4;
  --ink: var(--charcoal);
  --ink-soft: #4c545a;
  --muted: #7c848a;
  --line: #e2ddd1;
  --line-cool: #cdd8dd;

  --accent: var(--archive-blue);
  --accent-ink: #34607b;
  --accent-soft: #e5edf1;
  --detail: var(--copper);

  --ok: #2c6e49;
  --warn: #9c3a2b;

  --grad-navy:
    radial-gradient(90rem 46rem at 88% -12%, rgba(62, 111, 142, 0.36), transparent 62%),
    radial-gradient(60rem 34rem at -8% 112%, rgba(181, 111, 68, 0.14), transparent 58%),
    linear-gradient(163deg, var(--navy-lift) 0%, var(--navy) 44%, var(--navy-deep) 100%);
  --mark-ghost: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1.25'%3E%3Crect x='16' y='16' width='68' height='68'/%3E%3Ccircle cx='50' cy='50' r='34'/%3E%3Cline x1='50' y1='16' x2='50' y2='84'/%3E%3Cline x1='16' y1='50' x2='84' y2='50'/%3E%3Cline x1='16' y1='16' x2='84' y2='84'/%3E%3Cline x1='84' y1='16' x2='16' y2='84'/%3E%3C/g%3E%3C/svg%3E");

  --font-display: 'Manrope Variable', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: clamp(0.83rem, 0.79rem + 0.18vw, 0.94rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.25rem + 1vw, 2rem);
  --step-3: clamp(1.8rem, 1.45rem + 1.75vw, 2.85rem);

  --shell: 68rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 2px 8px rgba(23, 50, 77, 0.05), 0 18px 40px -24px rgba(23, 50, 77, 0.22);
  --shadow-raised: 0 6px 14px rgba(23, 50, 77, 0.07), 0 26px 54px -30px rgba(23, 50, 77, 0.38);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Minimum comfortable tap height. 44px is the accessibility floor. */
  --tap: 2.75rem;
}

/* --- 2. Reset and base --- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* the lesson from the website build */

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh; /* the address bar on phones makes 100vh a lie */
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  /* clip preferred over hidden: hidden quietly creates a scroll
     container. The hidden line stays as the older-browser fallback. */
  overflow-x: hidden;
  overflow-x: clip;
}
h1, h2, h3, h4 {
  font-family: var(--font-display); color: var(--navy); line-height: 1.15; margin: 0 0 0.5em;
  overflow-wrap: break-word; /* a long project name must wrap, never push the page wide */
}
h1, h2 { text-wrap: balance; }
h1 { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 0.75em; }
/* Headings alone were not enough (audit 2026-07-30): a preview address is
   printed as its own link text on the desk review page, and 50 unbroken
   characters overflowed the card on a phone, where the body's overflow clip
   then cut the tail off entirely. The owner reads that page from a phone. */
p, li, dd, dt, a, td { overflow-wrap: break-word; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Any control anywhere renders at 16px minimum, or iOS zooms the whole
   page when it is focused and never zooms back out. */
input, select, textarea, button { font-size: max(1rem, 1em); }

.shell { width: min(var(--shell), 100% - 2 * var(--gutter)); margin-inline: auto; }
.main { flex: 1; padding-block: clamp(1.5rem, 4vw, 3rem); }

/* --- 3. Focus and motion --- */
:focus-visible {
  outline: 2px solid var(--archive-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible, .dropzone:focus-visible { outline-offset: 3px; border-radius: 999px; }
.dropzone:focus-visible { border-radius: var(--radius-lg); }

/* --- 4. Chrome: topbar, logo, footer --- */
.topbar { background-image: var(--grad-navy); color: #fff; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.topbar__nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem 1rem; }
.topbar__nav a {
  color: color-mix(in srgb, #ffffff 88%, transparent);
  font-family: var(--font-display); font-weight: 600; font-size: var(--step--1);
  /* real padding, not just text: a fingertip needs the full 44px */
  display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 0.2rem;
}
.topbar__nav a:hover { color: #fff; text-decoration: none; }
.topbar__logout { margin: 0; }
.topbar__logout button {
  border: 1px solid color-mix(in srgb, #ffffff 35%, transparent);
  background: none; color: #fff; border-radius: 999px; padding: 0.3em 1.1em;
  font: inherit; font-family: var(--font-display); font-weight: 600; font-size: var(--step--1); cursor: pointer;
  min-height: var(--tap);
}
.topbar__logout button:hover { background: color-mix(in srgb, #ffffff 12%, transparent); }

/* --- Logo (ported from Logo.astro) --- */
.logo { display: inline-flex; align-items: center; gap: 0.65rem; color: inherit; min-height: var(--tap); }
.logo:hover { text-decoration: none; }
.logo__mark { width: 2.35rem; height: 2.35rem; flex: none; }
.logo__word { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-family: var(--font-display); font-weight: 600; font-size: 1.24rem; letter-spacing: 0.005em; white-space: nowrap; }
.logo__descriptor {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  margin-top: 0.32rem; color: var(--copper-soft); white-space: nowrap;
}

/* --- Footer --- */
.footer { background: var(--navy-deep); color: color-mix(in srgb, #ffffff 72%, transparent); }
.footer__inner { display: flex; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; padding-block: 1.2rem; font-size: var(--step--1); }
/* The padding grows the tap area to 44px; the negative margin gives the
   space back visually so the footer stays one quiet line. */
.footer a { color: color-mix(in srgb, #ffffff 85%, transparent); display: inline-block; padding-block: 0.9em; margin-block: -0.65em; }
.footer p { margin: 0; }

/* --- 5. Buttons and action groups --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  border: 1px solid var(--archive-blue); background: var(--archive-blue); color: #fff;
  border-radius: 999px; padding: 0.55em 1.6em; cursor: pointer;
  min-height: var(--tap);
  font-family: var(--font-display); font-weight: 600; font-size: var(--step--1); letter-spacing: 0.01em;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0) scale(0.985); box-shadow: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--quiet { background: transparent; color: var(--accent-ink); }
.btn--quiet:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn--danger { background: transparent; border-color: var(--warn); color: var(--warn); }
.btn--danger:hover { background: color-mix(in srgb, var(--warn) 8%, transparent); border-color: var(--warn); color: var(--warn); }

/* A group of related buttons. On wide screens they sit in a row; the
   small-screen block below stacks them full width, which is what makes
   them feel like proper mobile controls rather than shrunken links. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 0.75em; }
.actions:last-child { margin-bottom: 0; }

/* --- 6. Cards, panels, stats, badges --- */
.card {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-warm) 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.9rem); box-shadow: var(--shadow-soft);
}
.card--flag { position: relative; overflow: hidden; }
.card--flag::before {
  content: ''; position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--copper), color-mix(in srgb, var(--copper) 18%, transparent));
}
/* Cards laid side by side become columns so their action rows line up
   along the bottom edge instead of floating mid-card. */
.grid-2 > .card { display: flex; flex-direction: column; }
.grid-2 > .card > .actions:last-child { margin-top: auto; padding-top: 0.5rem; }

.panel { background: var(--glacier); border: 1px solid var(--line-cool); border-radius: var(--radius); padding: 1rem 1.15rem; }

.eyebrow {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--detail); margin: 0 0 0.6rem;
}

/* --- Stat tiles --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.75rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; display: grid; gap: 0.15rem; }
.stat b { font-family: var(--font-display); font-size: var(--step-2); color: var(--navy); line-height: 1; }
.stat span { font-size: var(--step--1); color: var(--ink-soft); }
.stat--warn b { color: var(--copper); }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.3em 0.8em; border-radius: 999px; background: var(--glacier); color: var(--ink-soft);
  font-family: var(--font-display); line-height: 1.4; white-space: nowrap;
}
.badge--reserved, .badge--warn { background: color-mix(in srgb, var(--copper) 16%, transparent); color: color-mix(in srgb, var(--copper) 92%, var(--ink)); }
.badge--confirmed, .badge--ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.badge--picked-up { background: color-mix(in srgb, var(--archive-blue) 15%, transparent); color: var(--accent-ink); }
.badge--returned { background: var(--glacier); color: var(--muted); }
.badge--cancelled { background: var(--glacier); color: var(--muted); text-decoration: line-through; }

/* --- 7. Forms and flashes --- */
.field { display: grid; gap: 0.45rem; margin-bottom: 1.1rem; }
.field label { font-family: var(--font-display); font-size: var(--step--1); font-weight: 600; color: var(--navy); }
/* Checkboxes and radios opt out of the text-input treatment: a native
   checkbox stretched full width and 44px tall reads as broken, and its label
   is the real tap target anyway. */
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; padding: 0.7em 0.9em; background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: var(--step-0); color: var(--ink);
  min-height: var(--tap);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--archive-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--archive-blue) 20%, transparent);
}
.field .hint { font-size: var(--step--1); color: var(--muted); }
.errorlist { list-style: none; margin: 0 0 0.75rem; padding: 0.6rem 0.85rem; border-radius: 8px; font-size: var(--step--1); color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }

.flash { padding: 0.7rem 1rem; border-radius: 10px; font-size: var(--step--1); margin-bottom: 1rem; }
.flash--success { background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); }
.flash--error, .flash--warning { background: color-mix(in srgb, var(--warn) 9%, transparent); color: var(--warn); }
.flash--info { background: var(--accent-soft); color: var(--accent-ink); }

/* --- 8. Tables --- */
/* Wide tables scroll inside their own container. The page never scrolls
   sideways; that rule has no exceptions. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.listing { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.listing th {
  text-align: left; font-family: var(--font-display); font-weight: 600; color: var(--ink-soft);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--line);
}
.listing td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.listing tr:hover td { background: var(--paper-warm); }

/* Key-value tables (booking details, brief answers): the first cell is a
   label, the second the answer. Wide screens keep two columns; the
   small-screen block below stacks each pair into its own little row,
   which reads far better than a cramped two-column squeeze. */
.listing--kv td:first-child, .listing--kv th[scope="row"] {
  font-family: var(--font-display); font-weight: 600; color: var(--ink-soft);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); width: 34%;
}
.listing--kv tr:last-child td, .listing--kv tr:last-child th { border-bottom: none; }
.listing--kv tr:hover td { background: none; }

/* --- 9. Auth screens (navy hero treatment, like the site's dark bands) --- */
.auth {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  background-image: var(--grad-navy); position: relative; overflow: hidden;
  padding: var(--gutter);
  padding-bottom: max(var(--gutter), env(safe-area-inset-bottom));
}
.auth::after {
  content: ''; position: absolute; right: -6rem; top: 50%; transform: translateY(-50%);
  width: 26rem; height: 26rem; background: var(--mark-ghost) center / contain no-repeat; pointer-events: none;
}
.auth__card {
  width: min(26rem, 100%); background: var(--paper); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 6vw, 2.5rem); box-shadow: var(--shadow-raised); position: relative; z-index: 1;
}
.auth__card .logo { color: var(--navy); margin-bottom: 1.4rem; }
.auth__card .logo__descriptor { color: var(--detail); }
.auth__lede { color: var(--ink-soft); font-size: var(--step--1); }

/* --- 10. Uploads: dropzone and queue --- */
/* The dropzone is really a big button. On a phone nobody drags anything:
   the whole area is the tap target, and pressing it should feel like
   pressing a control, hence the active state. */
.dropzone {
  border: 2px dashed var(--line-cool); border-radius: var(--radius-lg); background: var(--paper-warm);
  padding: clamp(1.75rem, 5vw, 3rem) 1.25rem; text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.15s var(--ease);
}
.dropzone:hover { border-color: var(--archive-blue); }
.dropzone:active { transform: scale(0.99); background: var(--accent-soft); }
.dropzone.is-over { border-color: var(--archive-blue); background: var(--accent-soft); }
.dropzone__icon {
  width: 1.9rem; height: 1.9rem; margin-inline: auto; color: var(--accent-ink);
  display: block; padding: 0.85rem; box-sizing: content-box;
  background: var(--accent-soft); border-radius: 999px;
}
.dropzone__title { font-family: var(--font-display); font-weight: 700; color: var(--navy); margin: 0.85rem 0 0.3rem; font-size: var(--step-0); }
.dropzone__hint { font-size: var(--step--1); color: var(--muted); margin: 0; }

.upload-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--line); font-size: var(--step--1); }
.upload-row:last-child { border-bottom: none; }
.upload-row__thumb { width: 3rem; height: 3rem; border-radius: 8px; object-fit: cover; background: var(--glacier); flex: none; }
.upload-row__icon { width: 3rem; height: 3rem; border-radius: 8px; background: var(--glacier); display: grid; place-items: center; color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.05em; flex: none; }
.upload-row__name { font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.upload-row__meta { color: var(--muted); }
/* 6px, not 4: on a phone at arm's length the progress bar is the only
   feedback during a slow upload, so it has to be legible at a glance. */
.upload-row__bar { height: 6px; border-radius: 999px; background: var(--glacier); overflow: hidden; margin-top: 0.4rem; }
.upload-row__bar i { display: block; height: 100%; width: 0; background: var(--archive-blue); transition: width 0.2s var(--ease); }
.upload-row.is-done .upload-row__bar i { background: var(--ok); }
.upload-row.is-error .upload-row__bar i { background: var(--warn); }
.upload-row .btn { flex: none; padding-inline: 1.1em; }

/* --- 11. Page headers and utilities --- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.pagehead__sub { color: var(--ink-soft); font-size: var(--step--1); margin: 0.35rem 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.6rem; }

/* min() so the 19rem floor cannot exceed the column itself: at a 320px
   viewport the shell is 284.8px and a bare 19rem (304px) floor made every
   card overhang the margin. */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }
.stack > * + * { margin-top: 1.25rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'Cascadia Mono', monospace; font-size: 0.85em; }

/* --- 12. Small screens --- */
/* One consolidated block: everything below is the phone treatment. */
@media (max-width: 40rem) {
  /* Chrome tightens but keeps the full brand lockup: the descriptor is
     the one word telling a first-time visitor what this page is. */
  .topbar__inner { padding-block: 0.6rem; }
  .topbar__nav { gap: 0.25rem 0.6rem; }
  .logo__mark { width: 2rem; height: 2rem; }
  .logo__name { font-size: 1.08rem; }
  .logo__descriptor { font-size: 0.55rem; letter-spacing: 0.2em; }

  /* Page headers stack, and their action becomes a full-width control. */
  .pagehead { flex-direction: column; align-items: stretch; }
  .pagehead > .btn { width: 100%; }

  /* Grouped buttons become a full-width column: easy thumb targets,
     clear order of importance, no wrapped-pill clutter. */
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }

  /* Key-value tables stack: label above answer, one bordered group per
     row. The label column was unreadable at two columns on 375px. */
  .listing--kv thead { display: none; }
  .listing--kv, .listing--kv tbody, .listing--kv tr, .listing--kv td, .listing--kv th[scope="row"] { display: block; width: 100%; }
  .listing--kv tr { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .listing--kv tr:last-child { border-bottom: none; }
  .listing--kv td, .listing--kv th[scope="row"] { border: none; padding: 0; }
  .listing--kv td:first-child, .listing--kv th[scope="row"] { margin-bottom: 0.2rem; }
  .listing--kv td:not(:first-child) { font-size: var(--step-0); }

  /* Upload rows: keep the thumb and the text side by side, let the
     remove button take its own full-width line below. */
  .upload-row { flex-wrap: wrap; }
  .upload-row form { flex-basis: 100%; }
  .upload-row form .btn { width: 100%; }

  .grid-2 { gap: 1rem; }
  .footer__inner { flex-direction: column; gap: 0.25rem; }

  /* The ghost mark crowds a small screen; keep the card the only focus. */
  .auth::after { width: 17rem; height: 17rem; right: -7rem; top: auto; bottom: -5rem; transform: none; }
}

/* --- 13. Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .btn:active, .dropzone:active { transform: none; }
}

/* The way home under the auth card: quiet, legible on the navy field. */
.auth__back { margin-top: 1.1rem; text-align: center; font-size: var(--step--1); }
.auth__back a {
  color: color-mix(in srgb, #ffffff 72%, transparent);
  text-decoration: none;
  display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 0.6rem;
}
.auth__back a:hover { color: #ffffff; text-decoration: underline; }

/* The archived agreement text: readable body type, never monospace walls,
   wrapped so nothing scrolls the page sideways. */
.agreement-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-family: var(--font-body);
  font-size: var(--step--1);
  line-height: 1.7;
  margin: 0;
}

/* --- The client's progress timeline -------------------------------------
   Seven steps down the left of the project page. Deliberately quiet: it is
   reassurance, not a dashboard, and it must read at a glance on a phone. */
.timeline { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.timeline__step {
  position: relative;
  display: grid;
  grid-template-columns: 1.35rem 1fr auto;
  align-items: start;
  gap: 0 0.7rem;
  padding: 0 0 1.05rem;
}
/* The connecting line, drawn from each dot to the next. Not on the last
   step, or the line dangles past the end of the sequence. */
.timeline__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.53rem;
  top: 1.05rem;
  bottom: -0.15rem;
  width: 2px;
  background: var(--line);
}
.timeline__step.is-done:not(:last-child)::before { background: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.timeline__dot {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper);
  z-index: 1;
}
.timeline__step.is-done .timeline__dot { border-color: var(--ok); background: var(--ok); }
.timeline__step.is-current .timeline__dot {
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.timeline__body { display: grid; gap: 0.1rem; min-width: 0; }
.timeline__label { font-weight: 600; color: var(--ink-soft); }
.timeline__step.is-current .timeline__label { color: var(--navy); }
.timeline__step.is-done .timeline__label { color: var(--ink-soft); }
.timeline__detail { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.timeline__when { font-size: 0.8rem; color: var(--muted); white-space: nowrap; padding-top: 0.1rem; }
.timeline__step.is-current .timeline__when { color: var(--accent); font-weight: 600; }
@media (max-width: 30rem) {
  .timeline__detail { display: none; }
}

/* --- The desk's filmstrip of client uploads -----------------------------
   Shown above the approve button so nobody starts a build without seeing
   what it will be built from. Square crops so a mixed set of portrait and
   landscape phone photos still reads as a tidy row. */
.filmstrip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.filmstrip__item { margin: 0; min-width: 0; }
.filmstrip__item a {
  display: block;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--parchment);
  border: 1px solid var(--line);
}
.filmstrip__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.filmstrip__item a:hover { border-color: var(--accent); }
.filmstrip__doc {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.filmstrip figcaption {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
