/* HailPort owner dashboard. Mobile first; brand: navy #022A5A, warm orange
   #E8590C, white and soft warm neutrals. No inline styles anywhere (strict
   CSP), so every visual lives here. */
/* Geist (SIL Open Font License 1.1, public/owner/fonts/OFL.txt), self-hosted
   so the dashboard makes no third-party requests. */
@font-face { font-family: "Geist"; src: url("/owner/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/owner/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #022a5a;
  --navy-2: #0b3a75;
  --navy-3: #164c8f;
  --navy-ink: var(--navy);   /* navy used as TEXT; the dark theme lightens this one, never the backgrounds */
  --orange: #e8590c;
  --orange-ink: #b4450a;      /* AA text on white */
  --orange-btn: #c2410c;      /* AA with white text */
  --orange-soft: #fff1e6;
  --sand: #faf7f2;
  --sand-2: #f3ede4;
  --card: #ffffff;
  --ink: #14213a;
  --muted: #55607a;
  --line: rgb(2 42 90 / 0.1);
  --line-2: rgb(2 42 90 / 0.16);
  --green-bg: #e3f5ea;
  --green-ink: #126b34;
  --on-status-ink: #fff;      /* text drawn ON a status ink; dark flips both */
  --red-bg: #fdeaea;
  --red-ink: #a3191b;
  --red: #d42a2d;
  --amber-bg: #fff1e3;
  --amber-ink: #8f3a05;
  --slate-bg: #e9eef5;
  --slate-ink: #33445f;
  --bubble-in: #ffffff;
  --bubble-out: #0b3a75;
  --bubble-owner: #c2410c;
  --shadow: 0 1px 2px rgb(2 42 90 / 0.06), 0 10px 30px rgb(2 42 90 / 0.08);
  --shadow-lift: 0 2px 4px rgb(2 42 90 / 0.08), 0 18px 40px rgb(2 42 90 / 0.14);
  --r: 20px;
  --r-s: 12px;
  --tap: 48px;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* per-component colors that change in the dark palette */
  --value-ink: var(--navy);
  --stat-ink: var(--navy);
  --stat-bg: var(--sand);
  --chip-web-bg: #e8f0fb;
  --chip-web-ink: #1d4d8f;
  --phone-bg: var(--sand-2);
  --pill-on: var(--navy);
  --seg-on-ink: var(--navy);
  --auth-title: var(--navy);
  --auth-logo-bg: transparent;
  --auth-logo-pad: 0;
  color-scheme: light;
}
/* Dark palette. Two copies of the SAME declarations (tests/owner-dashboard-pure
   checks they match): one for an explicit Dark choice (data-theme="dark" on
   <html>, set by the server from the hp_theme cookie), one for Auto when the
   OS is dark. An explicit Light choice opts out of the media query. Component
   rules only read variables, so nothing else needs a dark copy. */
:root[data-theme="dark"] {
  --sand: #07111f;
  --sand-2: #0d1b2e;
  --card: #0f2036;
  --ink: #eef2f8;
  --muted: #a8b4c8;
  --line: rgb(238 242 248 / 0.1);
  --line-2: rgb(238 242 248 / 0.18);
  --orange-ink: #ff9a5c;
  --orange-soft: #3a1f0f;
  --green-bg: #0f3321;
  --green-ink: #7fe0a6;
  --on-status-ink: #06210f;
  --red-bg: #3c1416;
  --red-ink: #ff9b9d;
  --amber-bg: #3a250f;
  --amber-ink: #ffc58a;
  --slate-bg: #1b2c45;
  --slate-ink: #c8d4e6;
  --bubble-in: #16294a;
  --bubble-out: #2a5ca3;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.35);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 40px rgb(0 0 0 / 0.45);
  /* per-component */
  --value-ink: #fff;
  --stat-ink: #fff;
  --stat-bg: var(--sand-2);
  --chip-web-bg: #1b2c45;
  --chip-web-ink: #a9c8f5;
  --phone-bg: #0a1729;
  --pill-on: #2a5ca3;
  --seg-on-ink: #fff;
  --auth-title: #fff;
  --navy-ink: #cfe0f7;
  --auth-logo-bg: #fff;
  --auth-logo-pad: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sand: #07111f;
    --sand-2: #0d1b2e;
    --card: #0f2036;
    --ink: #eef2f8;
    --muted: #a8b4c8;
    --line: rgb(238 242 248 / 0.1);
    --line-2: rgb(238 242 248 / 0.18);
    --orange-ink: #ff9a5c;
    --orange-soft: #3a1f0f;
    --green-bg: #0f3321;
    --green-ink: #7fe0a6;
  --on-status-ink: #06210f;
    --red-bg: #3c1416;
    --red-ink: #ff9b9d;
    --amber-bg: #3a250f;
    --amber-ink: #ffc58a;
    --slate-bg: #1b2c45;
    --slate-ink: #c8d4e6;
    --bubble-in: #16294a;
    --bubble-out: #2a5ca3;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 40px rgb(0 0 0 / 0.45);
    /* per-component */
    --value-ink: #fff;
    --stat-ink: #fff;
    --stat-bg: var(--sand-2);
    --chip-web-bg: #1b2c45;
    --chip-web-ink: #a9c8f5;
    --phone-bg: #0a1729;
    --pill-on: #2a5ca3;
    --seg-on-ink: #fff;
    --auth-title: #fff;
  --navy-ink: #cfe0f7;
    --auth-logo-bg: #fff;
    --auth-logo-pad: 10px;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--sand);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 40px; } }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 8px;
}
.skip { position: absolute; left: 12px; top: -60px; background: #fff; color: var(--navy); padding: 10px 14px; border-radius: 10px; z-index: 50; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background-color: var(--navy);
  background-image:
    linear-gradient(180deg, rgb(2 42 90 / 0.62) 0%, rgb(2 42 90 / 0.78) 55%, rgb(2 30 66 / 0.97) 100%),
    url("/site/hp-1-marina-1600.webp");
  background-size: cover;
  background-position: center 38%;
  padding: 14px 18px 86px;
  overflow: hidden;
}
.hero::after { /* soft water shimmer at the bottom edge */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 60px;
  background: linear-gradient(180deg, transparent, rgb(232 89 12 / 0.12));
  pointer-events: none;
}
.hero.compact { padding-bottom: 64px; }
.hero-inner { max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); }
.brand { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 6px 10px; box-shadow: 0 4px 14px rgb(0 0 0 / 0.18); }
.brand img { height: 26px; width: auto; }
/* The strip wraps, it never scrolls: it used to scroll with the scrollbar hidden, so below ~1100px the last
   item (Help) simply disappeared - the worst outcome for a nav. Two lines beat a missing tab. */
.topnav { display: none; gap: 4px; flex-wrap: wrap; row-gap: 2px; min-width: 0; }
.topnav a { color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; }
.topnav a:hover { background: rgb(255 255 255 / 0.12); }
.topnav a[aria-current="page"] { background: rgb(255 255 255 / 0.18); }
@media (min-width: 900px) { .topnav { display: flex; } }
.signout button { background: rgb(255 255 255 / 0.14); color: #fff; border: 1px solid rgb(255 255 255 / 0.28); }
.signout button:hover { background: rgb(255 255 255 / 0.24); }
.topbar-end { display: flex; align-items: center; gap: 8px; }
/* Auto / Light / Dark: the .segmented look, in the hero's glass colors. */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgb(255 255 255 / 0.14); border: 1px solid rgb(255 255 255 / 0.28); }
.theme-switch button { min-height: 36px; min-width: 36px; padding: 0; border-radius: 9px; background: transparent; color: rgb(255 255 255 / 0.85); }
.theme-switch button:hover { background: rgb(255 255 255 / 0.14); color: #fff; }
.theme-switch button[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgb(0 0 0 / 0.2); }
.theme-switch svg { width: 18px; height: 18px; }
.signout button { white-space: nowrap; }
@media (max-width: 370px) { .topbar { gap: 8px; } .theme-switch button { min-width: 30px; } .signout button { padding: 10px 10px; } .brand { padding: 6px 8px; } }
.auth-theme { display: flex; justify-content: center; margin-top: 14px; }
.hero-title { margin-top: 26px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #ffd2b5; }
.hero h1 { font-size: clamp(28px, 7vw, 44px); font-weight: 700; margin-top: 6px; line-height: 1.1; text-shadow: 0 2px 18px rgb(0 0 0 / 0.25); }
.hero-sub { margin-top: 8px; color: rgb(255 255 255 / 0.9); font-size: 16px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.14); border: 1px solid rgb(255 255 255 / 0.24); font-size: 13px; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee08e; }
.hero-chip .dot.moon { background: #ffd2b5; }
.shop-switch { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; }
.shop-switch select { background: rgb(255 255 255 / 0.16); color: #fff; border: 1px solid rgb(255 255 255 / 0.3); border-radius: 10px; padding: 8px; font: inherit; }
.shop-switch option { color: #14213a; }

/* ---------- Layout ---------- */
main { max-width: 1080px; margin: -62px auto 0; padding: 0 14px; position: relative; z-index: 2; }
.hero.compact + main { margin-top: -40px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid > *, .stack > * { min-width: 0; }
@media (min-width: 900px) {
  main { padding: 0 24px; }
  /* stretch, not start: two cards in one row are one visual unit, so their bottom edges must meet.
     Content-height cards left a dead strip under the shorter one. */
  .grid.two { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: stretch; }
  .grid.two > .card { display: flex; flex-direction: column; }
  /* the card's own action sits on the shared baseline instead of floating mid-card */
  .grid.two > .card > form:last-of-type, .grid.two > .card > .confirm-box + form { margin-top: auto; }
  /* A card whose whole body is one form has no small action to sit on the baseline: pushing that form
     down leaves a dead hole under its heading (the Alerts cards). Optical alignment, not a float. */
  .grid.two > .card.flow > form:last-of-type { margin-top: 0; }
}
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 18px; font-weight: 650; }
.card-head .count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.card-head a.more { font-size: 14px; color: var(--orange-ink); font-weight: 600; text-decoration: none; padding: 8px 0; }
.card-head a.more:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }

/* ---------- Value tile ---------- */
.value {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(232 89 12 / 0.14) 0%, transparent 55%),
    var(--card);
  border-radius: 24px;
  padding: 22px 20px 18px;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--line);
}
.value-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.value-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-ink); }
.value-big { font-size: clamp(40px, 12vw, 60px); font-weight: 750; line-height: 1; margin-top: 8px; color: var(--value-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.value-cap { margin-top: 6px; font-size: 16px; color: var(--muted); }
.value-cap strong { color: var(--ink); }
.spark { width: 132px; height: 58px; flex: none; }
.spark-line { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.spark-dot { fill: var(--orange); stroke: var(--card); stroke-width: 2; }
.spark-cap { font-size: 11.5px; color: var(--muted); text-align: right; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.stat { background: var(--stat-bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; }
.stat b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--stat-ink); }
.stat span { font-size: 12.5px; color: var(--muted); line-height: 1.25; display: block; margin-top: 2px; }
.value-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.value-note a { color: var(--orange-ink); font-weight: 600; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.chip.pending { background: var(--amber-bg); color: var(--amber-ink); }
.chip.approved { background: var(--green-bg); color: var(--green-ink); }
.chip.emergency { background: var(--red-bg); color: var(--red-ink); }
.chip.paused, .chip.neutral { background: var(--slate-bg); color: var(--slate-ink); }
.chip.owner { background: var(--orange-soft); color: var(--orange-ink); }
.chip.web { background: var(--chip-web-bg); color: var(--chip-web-ink); }

/* ---------- Buttons ---------- */
button, .btn {
  font: inherit; font-weight: 600; font-size: 15px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
}
button:active, .btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange-btn); color: #fff; box-shadow: 0 6px 16px rgb(194 65 12 / 0.28); }
.btn-primary:hover { background: #a9380a; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-approve { background: #13773b; color: #fff; }
.btn-approve:hover { background: #0f6531; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--sand); }
.btn-deny { background: transparent; color: var(--red-ink); border-color: color-mix(in srgb, var(--red-ink) 40%, transparent); }
.btn-deny:hover { background: var(--red-bg); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b51f22; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > form { display: contents; }
.btn-row button { flex: 1 1 0; }

/* ---------- Pending requests ---------- */
.req { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--card); }
.req + .req { margin-top: 12px; }
.req-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.req-code { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.req h3 { font-size: 17px; font-weight: 650; margin-top: 6px; }
.req-meta { display: grid; gap: 4px; margin: 8px 0 12px; font-size: 14.5px; color: var(--muted); }
.req-meta span { display: flex; gap: 8px; align-items: center; }
.req-meta svg { flex: none; width: 16px; height: 16px; color: var(--orange-ink); }
/* Status and triage share the top row; the status reads first, the code layer's verdict second. */
.req-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* A square marker says "this is what the reading decided", not another status pill. */
.chip.triage::before { border-radius: 2px; }
.req-photo { margin: 10px 0 2px; }
.req-shot { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--sand-2); }
.req-shot img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; }
.req-photo figcaption { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* ---------- Suggested price reply ----------
   The exact text the send path will deliver, with its segment count on the same row as the button, so the
   owner can see the commitment before one tap sends it. */
.req-price { margin-top: 12px; border-left: 2px solid var(--orange); padding-left: 10px; }
.req-price-lead { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.req-price-text { font-size: 14px; line-height: 1.45; margin: 5px 0 9px; }
.req-price form { margin: 0 0 5px; }
.req-price button { width: 100%; }
.req-price-meta { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- Cost panel ----------
   Terminal-dense: one row per call site, numbers right-aligned and tabular, so the four sites line up and a
   missing figure reads as a word in the same column instead of a 0 that looks measured. */
.usage-table { width: 100%; border-collapse: collapse; margin: 10px 0 6px; font-size: 13.5px; }
.usage-table th, .usage-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.usage-table thead th { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.usage-table tbody tr:last-child td { border-bottom: 0; }
.usage-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage-missing { font-family: var(--sans); font-style: italic; color: var(--muted); }

/* ---------- Conversation list ---------- */
.convos { list-style: none; margin: 0; padding: 0; }
.convos li + li { border-top: 1px solid var(--line); }
.convo { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; text-decoration: none; border-radius: 12px; }
.convo:hover { background: var(--sand); }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; }
.avatar.emergency { background: linear-gradient(135deg, #e04345, #a3191b); }
.avatar svg { width: 22px; height: 22px; }
.avatar.web { background: linear-gradient(135deg, #f08a4b, var(--orange-btn)); }
.convo-body { min-width: 0; flex: 1; display: block; }
.convo-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.convo-name { font-weight: 650; }
.convo-time { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.convo-text { display: block; color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.convo-name, .convo-time { display: block; }
.convo-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 26px 12px 18px; }
.empty svg { width: 56px; height: 56px; color: var(--orange); margin: 0 auto 10px; }
.empty h3 { font-size: 16.5px; font-weight: 650; }
.empty p { color: var(--muted); font-size: 14.5px; margin-top: 4px; max-width: 34ch; margin-left: auto; margin-right: auto; }

/* ---------- Flash ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 15px; font-weight: 500; margin-bottom: 14px; border: 1px solid transparent; box-shadow: var(--shadow); }
.flash.ok { background: var(--green-bg); color: var(--green-ink); border-color: color-mix(in srgb, var(--green-ink) 20%, transparent); }
.flash.err { background: var(--red-bg); color: var(--red-ink); border-color: color-mix(in srgb, var(--red-ink) 20%, transparent); }
.flash svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
/* Demo shop banner (demo mask: numbers hidden / shown until ...) */
.demo-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; margin-bottom: 14px; background: var(--amber-bg); color: var(--amber-ink); border: 1px solid color-mix(in srgb, var(--amber-ink) 20%, transparent); }
.demo-bar.shown { background: var(--slate-bg); color: var(--slate-ink); border-color: color-mix(in srgb, var(--slate-ink) 20%, transparent); }
.demo-bar svg { flex: none; width: 18px; height: 18px; }
.demo-bar span { flex: 1 1 200px; }
.demo-bar form { margin: 0; }
.demo-bar .more-link, .demo-bar button { color: inherit; font-weight: 600; }
.demo-bar .more-link { padding: 0; }

/* ---------- Demo watermark (read-only demo links only) ----------
   Fixed, outside <main>, so a screenshot of any scroll position carries it. Pointer-events off: it never
   blocks a control. Kept to one short pill at the top right rather than a tiled sheet, because the board
   behind it still has to be readable — that is the thing being demonstrated. */
.demo-wm { position: fixed; top: 10px; right: 10px; z-index: 40; max-width: min(70vw, 22rem); padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; line-height: 1.3; text-align: center; color: var(--amber-ink); background: color-mix(in srgb, var(--amber-bg) 92%, transparent); border: 1px solid color-mix(in srgb, var(--amber-ink) 35%, transparent); pointer-events: none; }
.demo-wm-inline { display: block; margin-bottom: 2px; letter-spacing: .02em; }
.demo-lead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.demo-lead input { min-width: 12rem; padding: 7px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--amber-ink) 30%, transparent); background: var(--card); color: var(--ink); font: inherit; }
.demo-lead .btn-navy { padding: 7px 12px; }
.demo-lead-note { flex-basis: 100%; font-size: 13px; opacity: .85; }

/* A printed demo is not a usable copy: the board is blanked and only the attribution prints. Non-demo pages
   print exactly as they did before — there is no print rule for them at all. */
@media print {
  .is-demo .demo-wm { display: none !important; }
  .is-demo .demo-bar, .is-demo .hero, .is-demo main, .is-demo .tabbar, .is-demo .skip { display: none !important; }
  .is-demo::after { content: "DEMO - Crimson Digital Services LLC - HailPort — this printed page is not a copy of the product."; display: block; padding: 2rem 0; text-align: center; font-size: 14px; color: #333; }
}
.errors { margin: 0 0 14px; padding: 12px 14px 12px 32px; border-radius: 14px; background: var(--red-bg); color: var(--red-ink); font-size: 14.5px; }

/* ---------- Thread (phone text thread) ---------- */
.thread-head { display: flex; align-items: center; gap: 12px; }
.thread-head .avatar { width: 52px; height: 52px; font-size: 16px; border: 2px solid rgb(255 255 255 / 0.5); }
.back { color: #fff; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 10px 0; }
.phone {
  background: var(--phone-bg);
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 16px 12px 12px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5);
}
.bubbles { display: flex; flex-direction: column; gap: 6px; }
.day { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 0 4px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 20px; font-size: 15.5px; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
.bubble.in { align-self: flex-start; background: var(--bubble-in); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.out { align-self: flex-end; background: var(--bubble-out); color: #fff; border-bottom-right-radius: 6px; }
.bubble.owner { background: var(--bubble-owner); }
.bubble.failed { opacity: 0.75; outline: 2px dashed var(--red); }
.meta { font-size: 11.5px; color: var(--muted); margin: 0 6px 4px; }
.meta.out { align-self: flex-end; }
.meta.in { align-self: flex-start; }
.composer { margin-top: 12px; display: flex; gap: 8px; align-items: flex-end; background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; padding: 6px 6px 6px 14px; }
.composer textarea { flex: 1; border: 0; background: transparent; resize: vertical; min-height: 42px; max-height: 200px; font: inherit; color: var(--ink); padding: 10px 0; }
.composer textarea:focus { outline: none; }
.composer:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }
.composer button { border-radius: 999px; min-width: 76px; }
.lock {
  display: grid; gap: 10px;
  background: var(--red-bg); color: var(--red-ink);
  border: 1px solid color-mix(in srgb, var(--red-ink) 25%, transparent);
  border-radius: 18px; padding: 16px;
}
.lock h3 { font-size: 16.5px; display: flex; gap: 8px; align-items: center; }
.lock svg { width: 20px; height: 20px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 550; }

/* ---------- Forms ---------- */
/* The same stack whether the field is a <label> or a <div>: a title, its control, and the sentence that
   explains it, with an even gap between all three. Only label.field carried this, so every <div class="field">
   - the Email choice among them - stacked its parts with no gap at all. */
.field { display: grid; gap: 8px; }
label.field { font-weight: 600; font-size: 14.5px; }
input[type="text"], input[type="tel"], input[type="time"], input[type="number"], input[type="password"], textarea.input, select {
  font: inherit; font-weight: 450; color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-2); border-radius: 12px;
  min-height: 48px; padding: 10px 12px; width: 100%;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.45; }
input:focus-visible, textarea.input:focus-visible, select:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.help { font-weight: 450; font-size: 13.5px; color: var(--muted); }
.form-grid { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
form > fieldset:only-of-type { display: grid; gap: 16px; }
legend { font-weight: 600; font-size: 14.5px; margin-bottom: 8px; padding: 0; }
.days { display: flex; flex-wrap: wrap; gap: 8px; }
.day-pill { position: relative; }
.day-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day-pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; cursor: pointer; background: var(--card); user-select: none; }
.day-pill input:checked + span { background: var(--pill-on); color: #fff; border-color: var(--pill-on); }
.day-pill input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Tactile switch */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle-text b { display: block; font-weight: 650; }
.toggle-text span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.switch {
  appearance: none; -webkit-appearance: none;
  flex: none; position: relative; width: 58px; height: 34px; margin: 0;
  border-radius: 999px; background: #c5cedb; cursor: pointer;
  box-shadow: inset 0 2px 4px rgb(2 42 90 / 0.25);
  transition: background 0.2s ease;
}
.switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #eef1f6);
  box-shadow: 0 2px 6px rgb(2 42 90 / 0.35), 0 0 0 0.5px rgb(2 42 90 / 0.1);
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.6, 1);
}
.switch:checked { background: #13773b; }
.switch:checked::before { transform: translateX(24px); }
.switch:disabled { cursor: not-allowed; opacity: 1; background: var(--red); }
.switch:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.locked-note svg { width: 14px; height: 14px; }
.toggle-text .locked-note { display: inline-flex; width: auto; color: var(--red-ink); font-size: 12.5px; margin-top: 8px; }
/* Texting rules (read-only compliance locks, /owner/shop) */
.locked-list { margin: 8px 0 0; }
.locked-list dt { display: flex; gap: 6px; align-items: center; font-weight: 650; padding-top: 12px; }
.locked-list dt svg, .help svg { width: 14px; height: 14px; vertical-align: -2px; }
.locked-list dd { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.locked-list dd:last-child { border-bottom: 0; }
.locked-list dd .locked-note { display: table; margin-top: 6px; }
p.locked-note { display: flex; border-radius: 12px; padding: 8px 12px; }
.locked-note { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 650; color: var(--red-ink); background: var(--red-bg); border-radius: 999px; padding: 3px 10px; margin-top: 6px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--sand); padding: 5px; border-radius: 14px; border: 1px solid var(--line); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; text-align: center; padding: 0 6px; }
.segmented input:checked + span { background: var(--card); box-shadow: var(--shadow); color: var(--seg-on-ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 1px; }
.confirm-box { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--orange-soft); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); }
.confirm-box p { color: var(--ink); font-size: 14.5px; }

/* ---------- Summary ---------- */
.more-link { color: var(--orange-ink); font-weight: 600; display: inline-block; padding: 12px 0 0; }
.held { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.summary-day { border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.summary-day + .summary-day { margin-top: 10px; }
.summary-day h3 { font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.summary-day ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; display: grid; gap: 4px; }

/* ---------- Sign-in ---------- */
.auth-body {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px 16px;
  background-color: var(--navy);
  background-image:
    linear-gradient(180deg, rgb(2 42 90 / 0.55) 0%, rgb(2 42 90 / 0.85) 60%, rgb(2 30 66 / 0.97) 100%),
    url("/site/hp-1-marina-1600.webp");
  background-size: cover; background-position: center 38%;
}
.auth-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 26px; padding: 28px 24px 24px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.35); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; background: var(--auth-logo-bg); border-radius: 14px; padding: var(--auth-logo-pad); }
.auth-logo img { height: 46px; width: auto; }
.auth-card h1 { font-size: 23px; text-align: center; font-weight: 700; color: var(--auth-title); }
.auth-card .lede { text-align: center; color: var(--muted); margin: 6px 0 20px; font-size: 15px; }
.code-input { font-family: var(--mono) !important; font-size: 28px !important; letter-spacing: 0.4em; text-align: center; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--orange-ink); font-weight: 600; padding: 8px; min-height: 0; text-decoration: underline; }
.auth-tagline { color: rgb(255 255 255 / 0.88); text-align: center; margin-top: 18px; font-size: 14px; }

/* ---------- Mobile tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; border-radius: 12px; min-height: 52px; align-content: center; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--orange-ink); background: var(--orange-soft); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* Help (/owner/help). Codes are select-on-tap (no scripts under the CSP). */
.help-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
/* Each topic is a native disclosure: the runtime CSP has no script-src, so the open/close is the browser's own. */
.help-topic { padding: 0; overflow: hidden; }
/* The card padding the section used to carry, moved onto the row so the closed box is exactly one tap target. */
.help-topic > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer;
  margin: 0; padding: 18px 20px; min-height: 48px; list-style: none; }
.help-topic > summary::-webkit-details-marker { display: none; }
.help-topic > summary h2 { font-size: 18px; font-weight: 650; margin: 0; line-height: 1.35; }
.help-topic > summary:hover { background: color-mix(in srgb, var(--line) 22%, transparent); }
.help-topic > summary:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.help-topic .chev { flex: none; font-size: 22px; line-height: 1; color: var(--muted-ink); transition: transform .15s ease; }
.help-topic[open] .chev { transform: rotate(90deg); }
.help-topic[open] > summary { border-bottom: 1px solid var(--line); }
/* The body, padded to the same 20px as every other card, with the vertical rhythm the page's `p { margin: 0 }` removes. */
.help-topic > :not(summary) { padding-left: 20px; padding-right: 20px; }
.help-topic > * + * { margin-top: 10px; }
.help-topic > summary + * { margin-top: 0; padding-top: 16px; }
.help-topic > :not(summary):last-child { padding-bottom: 18px; }
.help-topic .steps { margin: 0; }
.help-topic .notice { margin: 10px 0; }
.help-topic .notice:last-child { margin-bottom: 0; }
/* A deep link to a closed topic lands on its heading; tint it so the eye finds the row it must tap. */
.help-topic:target > summary { background: color-mix(in srgb, var(--orange) 12%, transparent); }
.help-sub { font-size: 15px; margin: 18px 0 8px; }
.steps { margin: 8px 0; padding-left: 22px; display: grid; gap: 6px; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-bg); color: var(--amber-ink); border-radius: var(--r-s); padding: 12px 14px; margin: 12px 0; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.notice p { margin: 0 0 6px; }
.notice a, .notice .muted { color: inherit; }
.notice-plain { background: var(--slate-bg); color: var(--slate-ink); }
.carriers { display: grid; gap: 8px; }
.carrier { border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 10px 14px; }
.carrier summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.carrier[open] summary { margin-bottom: 6px; }
.code-head { font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 10px 0 4px; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.code-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; }
.code-label { font-size: 13.5px; color: var(--muted); }
.dial-code { font-family: var(--mono); font-size: 16px; font-weight: 600; background: var(--sand-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 10px; -webkit-user-select: all; user-select: all; word-break: break-all; }

.foot { text-align: center; font-size: 12.5px; color: var(--muted); margin: 28px 0 8px; }

/* Cards that are siblings inside <main> need the rhythm Today already gets from its .stack wrapper.
   Without this, Shop info, Help, Calendar and Conversations stack their cards edge to edge. */
main > * + * { margin-top: 16px; }

/* ---------------------------------------------------------------- calendar
   Same tokens as everything else, so light/dark/auto follow without a second palette. The grid is for
   width; the agenda is for a phone. Both render, CSS picks — no JavaScript on this dashboard. */
.cal-nav { display: flex; gap: 8px; }
.cal-nav a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 999px; border: 1px solid var(--line-2); color: var(--navy-ink); text-decoration: none;
  font-weight: 700; background: var(--card); }
.cal-nav a:hover { background: var(--sand); }
[data-theme="dark"] .cal-nav a { color: #cfe0f7; }
.cal-key { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.cal-key span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key i { width: 12px; height: 12px; border-radius: 4px; border-left: 3px solid currentColor; display: inline-block; }
.cal-key .k-booked { background: var(--green-bg); color: var(--green-ink); }
.cal-key .k-done { background: var(--slate-bg); color: var(--slate-ink); border-left-color: var(--green-ink); }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.cal-dow span { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 650; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell { min-height: 92px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 6px 7px;
  background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.cal-cell.out { background: transparent; border-style: dashed; opacity: .55; }
.cal-cell.today { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.cal-date { font-size: 12px; font-weight: 650; color: var(--muted); }
.cal-cell.today .cal-date { color: var(--orange-ink); }
.cal-item { font-size: 12px; line-height: 1.25; padding: 3px 6px; border-radius: 7px; border-left: 3px solid currentColor; }
.cal-item b { font-weight: 650; }
.cal-item.booked { background: var(--green-bg); color: var(--green-ink); }
.cal-item.done { background: var(--slate-bg); color: var(--slate-ink); border-left-color: var(--green-ink); }
.cal-item.done b::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; margin-right: 4px; border-radius: 50%; background: var(--green-ink); color: var(--on-status-ink);
  font-size: 9px; font-weight: 700; line-height: 1; vertical-align: 1px; }
.cal-more { font-size: 11px; color: var(--muted); }
.agenda { display: none; gap: 10px; }
.agenda-day { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: start; }
.agenda-date { font-size: 12px; font-weight: 650; color: var(--muted); padding-top: 4px; }
.agenda-items { display: grid; gap: 6px; }

/* A phone gets the list, not a seven-column squeeze. */
@media (max-width: 640px) {
  .cal, .cal-dow { display: none; }
  .agenda { display: grid; }
}

/* A section heading between cards, for a page that carries more than one group. */
.section-head { font-size: 15px; font-weight: 650; color: var(--navy-ink); margin: 26px 0 -4px; letter-spacing: .01em; }
[data-theme="dark"] .section-head { color: #cfe0f7; }

/* ------------------------------------------------- top nav
   The names stay and the spacing gives. When even that is not enough the NAV takes a second row rather than
   losing an item: with the bar pinned to one line and no sideways scroll, everything past the edge was simply
   clipped, and the last tab in the list (Help) was the one that went. A header that grows is honest; a tab that
   vanishes is not. */
.topbar { flex-wrap: wrap; }
.topnav { flex-wrap: wrap; min-width: 0; row-gap: 2px; }
.topnav a { white-space: nowrap; font-size: 14px; padding: 9px 11px; }

/* The confirmation template: a small textarea inside a field, plus the "what they'll read" line under it. */
label.field textarea { width: 100%; min-height: 82px; resize: vertical; font: inherit; line-height: 1.45;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
label.field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.preview { display: block; margin: 10px 0 2px; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: 13px; line-height: 1.5; }

/* ---- a booked job whose day has passed (lib/owner/job-age.ts) ----
   Sea-blue for the first week, red from day eight, and off the grid at three weeks into the "Still open" card.
   Colour is the second signal, never the only one: every stale entry carries "not marked done · Nd". */
:root { --sea-bg: #e4f1f7; --sea-ink: #14566f; --sea: #2b7fa3; }
.cal-key .k-late { background: var(--sea-bg); color: var(--sea-ink); border-left-color: var(--sea); }
.cal-key .k-overdue { background: var(--red-bg); color: var(--red-ink); }
.cal-item.late { background: var(--sea-bg); color: var(--sea-ink); border-left-color: var(--sea); }
.cal-item.overdue { background: var(--red-bg); color: var(--red-ink); border-left-color: var(--red); }
.cal-item.archived { background: var(--red-bg); color: var(--red-ink); border-left-color: var(--red); }
a.cal-item { text-decoration: none; display: block; }
a.cal-item:hover { filter: brightness(.97); }
.cal-badge { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 650; letter-spacing: .01em; opacity: .9; }
.cal-check { float: right; font-weight: 700; }
.still-open { display: grid; gap: 6px; }

/* Foldable sections (2026-11-09): Shop settings and Help both fold, and the jump links open what they point at.
   Native <details> on purpose — the owner pages run under `default-src 'none'` with no script-src, so anything
   scripted would work in dev and be blocked in production. */
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.jump-a { font-size: .82rem; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 999px;
  text-decoration: none; color: var(--navy-ink); background: var(--card); }
.jump-a:hover { border-color: var(--orange); color: var(--orange-ink); }
details.fold { margin: 0 0 14px; }
details.fold > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 15px; font-weight: 650; font-size: 1.02rem; cursor: pointer; list-style: none;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; font-size: .8em; color: var(--muted); }
details.fold[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
details.fold[open] > summary::after { content: "▴"; }
/* A card that opens a fold sits under the summary, so its top corners are square. Scoped to the first
   card only, so a stack of them still reads as separate cards. */
details.fold > .card,
details.fold .stack > .card:first-child { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
/* The title is the summary; the card's own heading would say it twice. Chips stay. A card holding a
   different subject from its neighbours keeps its heading, or the fold reads as two unlabelled columns. */
details.fold .card-head h2 { display: none; }
details.fold .card.keep-title .card-head h2 { display: block; }

/* Compliance rules read across, not down: two rows at most on a phone. */
/* Five rules on a three-column grid: three across, two below. Fixed tracks, never flex-grow, so no
   single chip can stretch the page. */
.locked-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none;
  margin: 8px 0 0; padding: 0; }
.locked-chip { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  background: var(--sand); }
.locked-chip b { display: flex; gap: 5px; align-items: center; font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--slate-ink); margin-bottom: 3px; }
/* The icon helper emits a viewBox with no width/height, so an unconstrained svg fills its parent: the
   padlock grew to the width of the chip and pushed the page taller. Every other icon site sets a size. */
.locked-chip b svg { flex: none; width: 13px; height: 13px; }
.locked-chip span { display: block; font-size: .88rem; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 900px) { .locked-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .locked-chips { grid-template-columns: minmax(0, 1fr); } }

/* The registration card (2026-11-09): legal name + an EIN whose last four digits are masked. */
.reg-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 6px; }
.reg-list dt { color: var(--ink-2, #4a5768); font-size: 0.92rem; }
.reg-list dd { margin: 0; font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: 0.02em; word-break: break-word; }
.ein-masked { letter-spacing: 0.14em; }
.ein-full { letter-spacing: 0.02em; }
#reg-h .help { margin-top: 4px; }
/* ---------- The owner's photo of finished work (/owner/job/<id>) ----------
   The upload sits under the picture it replaces, and the file input is left at its natural size: the label above
   it is the instruction, and a full-width file picker reads as a drop zone this page does not have. */
.job-photo-figure { max-width: 420px; }
.job-photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px; }
.job-photo-label { flex: 1 1 100%; font-size: 13px; font-weight: 600; }
.job-photo-form input[type="file"] { flex: 1 1 220px; min-width: 0; font-size: 13px; }

/* ---- missed-call log (Conversations / "Calls") ------------------------------ */
.card-note { font-size: 13.5px; color: var(--muted); }
.calllog {
  list-style: none; margin: 0; padding: 0;
  max-height: 248px; overflow-y: auto; overscroll-behavior: contain;
}
.calllog li + li { border-top: 1px solid var(--line); }
.call {
  display: grid; grid-template-columns: 104px 128px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 2px; font-size: 14.5px;
}
.call-when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.call-who { font-weight: 650; font-variant-numeric: tabular-nums; }
.call-line { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 5px;
  background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted);
  font-size: 11.5px; font-weight: 650; letter-spacing: .02em; vertical-align: 1px; }
.call-what { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-what b { color: var(--ink); font-weight: 620; }
.call-link { color: var(--orange-ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.call-link:hover { text-decoration: underline; }
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.tag.t-texted { background: var(--green-bg); color: var(--green-ink); }
.tag.t-hungup { background: var(--amber-bg); color: var(--amber-ink); }
.tag.t-noans { background: var(--line); color: var(--muted); }
@media (max-width: 640px) {
  .call { grid-template-columns: 88px 1fr auto; gap: 8px; font-size: 14px; }
  .call-who { display: none; }
  .calllog { max-height: 196px; }
}

/* A sub-section inside a card: a rule, a heading, its explanation, then its own form. One rhythm, so the
   description does not sit flush against the heading above it or the first control below it. */
.block { display: grid; gap: 12px; }
.block > hr.card-rule { margin: 6px 0 2px; }
.block > h3 { margin: 0; }

/* An unselected segment only had the trough behind it, so it read as loose text next to the chosen one. */
.segmented label:hover span { background: color-mix(in srgb, var(--card) 45%, transparent); }
