/* Divine Domain & Co. client portal styles.
   Brand tokens, @font-face, type roles and portal rules are copied from site/styles.css (the 2026-11-16 redesign
   concept, her brand). Edits to the copied rules are marked "live app". Do not restyle the brand here: change it in
   site/styles.css first. */

@font-face {
  font-family: "Chloe";
  src: url("https://static.showit.co/file/8N5ZnXX44X6OW_RRW0gOQg/shared/chloe-regular.woff") format("woff");
  font-display: swap;
}

:root {
  /* her palette: brand guide p.15 (brand/air-2026-11-17/brand-guide.pdf), owner 2026-11-17 "Yes, match exactly" */
  --cream: #FFF9F0;
  --linen: #EAE5DD;
  --taupe: #B8A89A;      /* lines and fills only: 2.2:1 on cream, never text */
  --charcoal: #221F20;   /* 15.6:1 on cream */
  /* added for readable text */
  --ink-2: #2E2A2B;      /* body text, 13.5:1 on cream */
  --muted: #4A4340;      /* small print, 9.2:1 on cream */
  --script: #6A5546;     /* script accents, 6.7:1 on cream */
  --on-dark-2: #DCCFC4;  /* secondary text on charcoal, 10.7:1 */
  /* Alert red, off-brand on purpose (owner 2026-11-17: "these can be in red we dont need to stick to brand colors
     when we need things to stick out"). Deadlines and money due only. ~6:1 on cream; the light one ~7:1 on charcoal. */
  --alert: #B3261E;
  --alert-on-dark: #FF9C90;
  --ok: #1F7A4A;         /* "done" green: swipe fill, header "Approved" (owner 2026-11-17) */
  --warn: #B5651D;       /* amber for "later" / "change this" while swiping */
  --paper: #F6F1EA;      /* raised surfaces: warm, never pure white (owner 2026-11-17) */

  --f-display: "Chloe", "Cormorant Garamond", Georgia, serif;
  --f-script: "Parisienne", "Pinyon Script", cursive;
  --f-body: "Karla", system-ui, sans-serif;

  --gutter: 24px;
  --section: 88px;
  --radius: 2px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-2);
  font: 500 17px/1.65 var(--f-body);
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.display {               /* Chloe: headlines only, never smaller than 30px */
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin: 0;
}
.display-xl { font-size: clamp(38px, 10.5vw, 64px); }
.display-l  { font-size: clamp(32px, 8.6vw, 48px); }
.display-m  { font-size: clamp(26px, 7vw, 34px); }

.script {                /* Pinyon: one flourish per section, 32px minimum */
  font-family: var(--f-script);
  color: var(--script);
  font-size: clamp(32px, 9vw, 44px);
  line-height: 1;
  margin: 0 0 6px;
}
.label {                 /* Karla caps: 13px, medium, spaced — replaces the 9–10px light caps */
  font: 600 13px/1.3 var(--f-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.lede { font-size: 19px; line-height: 1.6; font-weight: 500; color: var(--ink-2); }
.small { font-size: 15px; font-weight: 500; color: var(--muted); }
p { margin: 0 0 1em; max-width: 34em; }

/* Chloe and Pinyon ship in one thin weight only; a fine stroke thickens the hairlines */
/* thicker on big headings so they carry as much weight as the 500-weight body text */
.display, .quote-big, .menu nav a { -webkit-text-stroke: 1px currentColor; }
.service-list h3, .rail h3, .projects h2, .steps li::before { -webkit-text-stroke: 0.8px currentColor; }
.brand span { -webkit-text-stroke: 0.6px currentColor; }
.script, .signature { -webkit-text-stroke: 0.3px currentColor; }

.wrap { padding: 0 var(--gutter); max-width: 720px; margin: 0 auto; }
.rule { width: 48px; height: 1px; background: var(--taupe); border: 0; margin: 28px 0; }

/* ===== Client portal concept (portal.html) ===== */
/* On a phone the app fills the width as a rounded card; from 520px it sits in a phone frame. */
.portal-stage { padding: 8px var(--gutter) var(--section); }
.phone { max-width: 390px; margin: 0 auto; }
.app {
  position: relative; display: flex; flex-direction: column; height: min(760px, 86vh);
  background: var(--cream); border: 1px solid rgba(33, 31, 32, 0.16); border-radius: 28px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(33, 31, 32, 0.45);
}
@media (min-width: 520px) {
  .phone { padding: 12px; background: var(--charcoal); border-radius: 52px; box-shadow: 0 40px 80px -36px rgba(33, 31, 32, 0.6); }
  .app { border: 0; border-radius: 40px; box-shadow: none; }
}
.app-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid rgba(185, 168, 155, 0.5);
}
.app-brand { font: 400 17px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--charcoal); -webkit-text-stroke: 0.6px currentColor; }
.app-brand .amp { font-size: 0.6em; vertical-align: 0.15em; }
.app-avatar {
  width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  background: var(--linen); font: 600 14px var(--f-body); color: var(--charcoal);
}
.app-body { flex: 1; overflow-y: auto; padding: 22px 20px 40px; -webkit-overflow-scrolling: touch; }
.app-body p { max-width: none; }
.app-hello { font: 36px/1.15 var(--f-script); color: var(--script); margin: 4px 0 18px; -webkit-text-stroke: 0.3px currentColor; }
.app-h { font: 600 14px/1.3 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--charcoal); margin: 4px 0 6px; }
.app-sub { font-size: 15px; color: var(--muted); margin: 0 0 16px; }

.app-proj { background: var(--charcoal); color: var(--on-dark-2); border-radius: 22px; padding: 22px 20px 20px; margin-top: 32px; }
.app-proj .label { color: var(--cream); }
.app-proj-sub { font-size: 16px; margin: 6px 0 18px; color: var(--on-dark-2); }
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; } /* one equal column per step (was an inline style; CSP) */
.phases li { height: 6px; border-radius: 3px; background: rgba(255, 248, 241, 0.18); }
.phases li.done { background: var(--on-dark-2); }
.phases li.now { background: linear-gradient(90deg, var(--cream) 55%, rgba(255, 248, 241, 0.18) 55%); }
.phases span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.phase-now { margin: 10px 0 0; font: 600 13px var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream); }
.phase-now span { color: var(--on-dark-2); font-weight: 500; }

.app-card { background: var(--paper); border: 1px solid rgba(185, 168, 155, 0.45); border-radius: 22px; padding: 24px 20px; margin-top: 40px; }
.app-card .label { display: block; font-size: 12px; margin-bottom: 10px; color: var(--muted); }
.app-card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.app-card strong { color: var(--charcoal); }
.app-update .who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.app-update .who img { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; object-position: 50% 25%; }
.app-update .who p { display: flex; flex-direction: column; line-height: 1.2; }
.app-update .who span { font-size: 13px; color: var(--muted); }
.update-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.update-photos img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; display: block; }

.app-cta {
  display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 12px;
  min-height: 52px; padding: 0 18px; border: 0; border-radius: 16px; cursor: pointer;
  background: rgba(106, 85, 70, 0.14); color: var(--charcoal); font: 600 15px var(--f-body); text-align: left;
}
.app-cta span:last-child { color: var(--script); font-size: 18px; }

.app-btn {
  min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--charcoal); background: var(--charcoal); color: var(--cream);
  font: 600 13px var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
}
.app-link {
  min-height: 40px; padding: 0 6px; border: 0; background: none; cursor: pointer;
  font: 600 14px var(--f-body); color: var(--script); text-decoration: underline; text-underline-offset: 3px;
}

.appr-list, .doc-list { list-style: none; margin: 0; padding: 0; }
.appr { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid rgba(185, 168, 155, 0.5); }
.appr img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.appr-tag {
  width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center;
  background: var(--linen); font: 600 15px var(--f-body); letter-spacing: 0.1em; color: var(--script);
}
.appr h3, .doc h3 { font: 600 15px/1.3 var(--f-body); color: var(--charcoal); margin: 0 0 2px; }
.appr p, .doc p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.appr .due { color: var(--script); font-weight: 600; }
.appr-act { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.done-note { font-weight: 600; color: var(--script) !important; margin: 0; }

.seg { display: flex; gap: 6px; padding: 4px; margin: 8px 0 14px; background: var(--linen); border-radius: 999px; }
.seg button {
  flex: 1 1 auto; min-height: 38px; padding: 0 10px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 600 13px var(--f-body); color: var(--muted); white-space: nowrap;
}
.seg button[aria-selected="true"] { background: var(--paper); color: var(--charcoal); box-shadow: 0 1px 3px rgba(33, 31, 32, 0.12); }
.doc { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: start; padding: 14px 0; border-top: 1px solid rgba(185, 168, 155, 0.5); }
.doc-sign { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
.pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(106, 85, 70, 0.12); font: 600 12px var(--f-body); letter-spacing: 0.06em; color: var(--script);
}
.pill-wait { background: var(--charcoal); color: var(--cream); }
.pill-new { background: var(--linen); color: var(--charcoal); }
.co-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.co-sum div { background: var(--linen); border-radius: 14px; padding: 10px 12px; }
.co-sum span { display: block; font-size: 12px; line-height: 1.3; color: var(--muted); }
.co-sum strong { font: 600 15px/1.3 var(--f-body); color: var(--charcoal); }

.notes details { border-top: 1px solid rgba(185, 168, 155, 0.5); padding: 4px 0 12px; }
.notes summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; padding: 10px 28px 4px 0; position: relative; }
.notes summary::-webkit-details-marker { display: none; }
.notes time { font: 600 12px var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--script); }
.notes summary span { font: 600 16px/1.3 var(--f-body); color: var(--charcoal); }
.notes .label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 2px; }
.notes p, .notes li { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.notes p { margin: 0; }
.notes ul { margin: 0; padding-left: 18px; }

.app-tabs {
  flex: none; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid rgba(185, 168, 155, 0.5);
}
.app-tabs button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 52px; border: 0; background: none; cursor: pointer;
  font: 600 11px var(--f-body); letter-spacing: 0.04em; color: var(--muted);
}
.app-tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-tabs button[aria-selected="true"] { color: var(--charcoal); }
.app-tabs button[aria-selected="true"] svg { stroke: var(--script); stroke-width: 1.9; }
.badge {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--script); color: var(--cream); font: 700 11px/18px var(--f-body);
}

/* ===== live app (not in site/styles.css) ===== */
/* Tabs are links here, not buttons. */
.app-tabs { grid-template-columns: repeat(3, 1fr); }
.app-tabs a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 52px; justify-content: center; text-decoration: none;
  font: 600 11px var(--f-body); letter-spacing: 0.04em; color: var(--muted);
}
.app-tabs a[aria-current="page"] { color: var(--charcoal); }
.app-tabs a[aria-current="page"] svg { stroke: var(--script); stroke-width: 1.9; }

/* Full-screen on a phone; a centered card on wider screens (the concept's phone frame is for the marketing page). */
body.portal { background: var(--linen); }
.portal .app { height: 100vh; height: 100dvh; max-width: 430px; margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; }
@media (min-width: 520px) {
  .portal .app { height: calc(100dvh - 48px); margin: 24px auto; border: 1px solid rgba(33, 31, 32, 0.16); border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(33, 31, 32, 0.45); }
}
.phase-list { list-style: none; margin: 0; padding: 0; }
.phase-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(185, 168, 155, 0.5); font-size: 16px; }
.phase-list li:first-child { border-top: 0; }
.muted { color: var(--muted); font-size: 14px; }

/* Studio (staff) pages: same tokens, plain layout. */
body.staff { background: var(--cream); }
.staff-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter); border-bottom: 1px solid rgba(185, 168, 155, 0.5); }
.staff-bar a { text-decoration: none; }
.staff-main { max-width: 560px; margin: 0 auto; padding: 24px var(--gutter) 64px; }
.staff-main p { max-width: none; }
.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.stack { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-end { align-items: end; margin-bottom: 10px; } /* was an inline style (CSP) */
/* Form fields: the site's contact-form look (site/styles.css "form"): soft, slightly sunken off-white
   pills with a warm focus ring, instead of flat white boxes. Labels use the site's spaced caps. */
.field { display: grid; gap: 8px; }
.field > span { font: 600 13px/1.3 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--charcoal); }
/* a checkbox line (show to client, signing consent) keeps plain sentence text */
.field > span:has(input) { display: flex; gap: 10px; align-items: flex-start; font: 500 15px/1.5 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.field > span:has(input) input { margin-top: 4px; }
.field input, .field textarea, .field select, .sel-form textarea {
  width: 100%; min-height: 52px; padding: 12px 18px;
  font: 500 16px var(--f-body); color: var(--charcoal);
  background: linear-gradient(180deg, rgba(234, 229, 221, 0.55), rgba(255, 255, 255, 0.45));
  border: 1px solid rgba(33, 31, 32, 0.2); border-radius: 16px;
  box-shadow: inset 0 1px 3px rgba(33, 31, 32, 0.08), 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input, .field textarea, .sel-form textarea { -webkit-appearance: none; appearance: none; }
.field textarea { min-height: 112px; resize: vertical; }
.sel-form textarea { min-height: 72px; resize: vertical; }
.field input[type="checkbox"], .field input[type="radio"] { width: auto; min-height: 0; padding: 0; box-shadow: none; -webkit-appearance: auto; appearance: auto; }
.field input[type="file"] { padding: 12px 14px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(74, 67, 64, 0.7); }
.field input:focus, .field textarea:focus, .field select:focus, .sel-form textarea:focus {
  outline: none; border-color: rgba(33, 31, 32, 0.5); background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 3px rgba(33, 31, 32, 0.06), 0 0 0 4px rgba(106, 85, 70, 0.16);
}
.app-btn:focus-visible, .app-link:focus-visible, a:focus-visible { outline: 2px solid var(--script); outline-offset: 2px; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
.linkbreak { word-break: break-all; }
.error { color: #7a1f1f; font-weight: 600; }
.staff-main .doc h3 a { color: var(--charcoal); }

/* M2: selections and approvals */
.sel-comments { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.sel-form { margin-top: 10px; }
.appr-act { flex-wrap: wrap; }
.lock-badge { display: inline-block; margin-top: 6px !important; padding: 6px 10px; border-radius: 10px; background: var(--linen); color: var(--charcoal) !important; font-weight: 600; }
.sel-more summary { list-style: none; cursor: pointer; }
.sel-more summary::-webkit-details-marker { display: none; }

/* M4: change orders and the budget meter */
.co-meter { display: block; width: 100%; height: 12px; border-radius: 999px; overflow: hidden; background: var(--linen); margin: 4px 0 8px; } /* an SVG: part widths are attributes (CSP) */
.co-budget { fill: var(--charcoal); }
.co-approved { fill: var(--script); }
.co-pending { fill: var(--taupe); }
.co-meter-line { margin: 2px 0; font-size: 14px; color: var(--muted); }
.co-meter-line strong { color: var(--charcoal); }
.co-meter-none { font-size: 15px; color: var(--ink-2); margin: 2px 0; }

/* ---------- client home: one big fact per card, quieter supporting text ---------- */
.home-next { border: 2px solid var(--charcoal); }
.home-next-clear { border: 1px solid rgba(185, 168, 155, 0.45); }
.app-card .home-next-title { font: 700 21px/1.3 var(--f-body); color: var(--charcoal); }
.home-next-clear .home-next-title span { color: var(--script); margin-right: 4px; }
.app-card .home-next-due { margin-top: 6px; font-size: 15px; color: var(--muted); }
.home-next-btn { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 52px; margin-top: 16px; text-decoration: none; font-size: 15px; }
.app-proj .label { margin-bottom: 8px; }
.home-now { margin: 0; font: 400 34px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--cream); -webkit-text-stroke: 0.8px currentColor; }
.app-proj .phases { gap: 6px; }
.app-proj .phases li { height: 10px; border-radius: 5px; }
.home-pct { margin: 16px 0 0; font-size: 15px; color: var(--on-dark-2); }
.home-pct strong { font: 700 28px/1 var(--f-body); color: var(--cream); margin-right: 4px; }
.home-pct span { white-space: nowrap; }
.home-update + .home-update { margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(185, 168, 155, 0.5); }
.home-update-title { margin: 0; font: 700 18px/1.3 var(--f-body); color: var(--charcoal); }
.app-card .home-update-when { margin: 2px 0 10px; font-size: 14px; color: var(--muted); }
.home-update .update-photos { margin-top: 14px; gap: 10px; }
.phase-list li > div { display: flex; flex-direction: column; gap: 2px; }
.phase-list li.is-now strong { color: var(--charcoal); font-size: 17px; }
.phase-list li:not(.is-now) strong { font-weight: 600; color: var(--ink-2); }

/* ---------- press-and-hold confirm for big decisions (src/views/hold.ts + public/portal.js) ---------- */
.hold-btn {
  position: relative; overflow: hidden; width: 100%; min-height: 60px; padding: 0 20px; cursor: pointer;
  border: 2px solid var(--charcoal); border-radius: 999px; background: var(--charcoal); color: var(--cream);
  font: 700 15px/1.2 var(--f-body); letter-spacing: 0.04em; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.hold-fill { position: absolute; inset: 0; background: var(--script); transform-origin: left center; transform: scaleX(var(--p, 0)); }
.hold-text { position: relative; color: var(--cream); }
.hold-btn.held { background: var(--charcoal); }
.hold-btn:focus-visible { outline: 3px solid var(--script); outline-offset: 3px; }
.app-card .hold-hint, .hold-hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* anything the page or its script marks hidden stays hidden, whatever display a class gives it */
[hidden] { display: none !important; }

/* ---------- big, plain buttons (client screens) ---------- */
.btn-solid, .btn-outline, .btn-quiet {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 20px;
  border-radius: 999px; cursor: pointer; text-decoration: none; text-align: center;
  font: 700 15px/1.2 var(--f-body); letter-spacing: 0.06em;
}
.btn-solid { border: 2px solid var(--charcoal); background: var(--charcoal); color: var(--cream); }
.btn-outline { border: 2px solid var(--charcoal); background: transparent; color: var(--charcoal); }
.btn-quiet { border: 0; background: transparent; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; min-height: 48px; }
.btn-solid:focus-visible, .btn-outline:focus-visible, .btn-quiet:focus-visible, summary.btn-outline:focus-visible { outline: 3px solid var(--script); outline-offset: 3px; }
summary.btn-outline { list-style: none; }
summary.btn-outline::-webkit-details-marker { display: none; }

/* ---------- approvals: one item per card, one big action ---------- */
.page-title { margin: 6px 0 8px; }
.page-help { font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 0 0 8px; }
.section-label { display: block; margin: 36px 0 0; color: var(--muted); font-size: 13px; }
.appr-list { display: grid; gap: 36px; margin-top: 24px; }
.appr-card { background: var(--paper); border: 1px solid rgba(185, 168, 155, 0.45); border-radius: 24px; overflow: hidden; }
.appr-photo img, .appr-photo .appr-tag { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: 0; }
.appr-photo .appr-tag { display: grid; place-items: center; font-size: 40px; }
.appr-main { padding: 20px 20px 22px; display: grid; gap: 14px; }
.appr-main > * { margin: 0; }
.appr-name { margin: 0; font: 700 20px/1.25 var(--f-body); color: var(--charcoal); }
.appr-price { font: 700 26px/1.1 var(--f-body); color: var(--charcoal); margin-top: -6px !important; }
.appr-due { font-size: 15px; line-height: 1.45; color: var(--script); font-weight: 600; }
.appr-late { color: #8A2E1F; }
.appr-form { display: grid; gap: 14px; margin-top: 4px; }
.appr-change { display: grid; gap: 14px; }
.appr-change[open] > summary { background: var(--linen); border-color: transparent; }
.appr-change > *:not(summary) { margin-top: 14px; }
.appr-details summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font: 600 15px var(--f-body); color: var(--muted); }
.appr-details summary::-webkit-details-marker { display: none; }
.appr-details dl { margin: 4px 0 0; display: grid; gap: 8px; }
.appr-details dl div { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px; font-size: 15px; }
.appr-details dt { color: var(--muted); }
.appr-details dd { margin: 0; color: var(--ink-2); }
.appr-details p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.appr-decided .appr-photo img, .appr-decided .appr-photo .appr-tag { height: 120px; }
.appr-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.appr-status .pill { font-size: 13px; padding: 5px 12px; }
.appr-price-sm { font: 700 17px var(--f-body); color: var(--charcoal); }
.appr-when { font-size: 15px; color: var(--muted); }
.appr-card .sel-comments li { background: var(--cream); border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.appr-bulk { display: grid; gap: 12px; margin-top: 40px; }
.appr-bulk p { margin: 0; }
.done-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--linen); color: var(--charcoal) !important; font-weight: 600; }

/* ---------- motion: smooth and calm everywhere (owner 2026-11-17: "smooth and elegant transitions everywhere") ---------- */
:root { --ease: cubic-bezier(0.22, 0.8, 0.25, 1); }
.btn-solid, .btn-outline, .btn-quiet, .app-btn, .app-link, .hold-btn, .app-tabs button, .seg button, .chip, summary {
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), transform .18s var(--ease), opacity .25s var(--ease);
}
.btn-solid:active, .btn-outline:active, .app-btn:active { transform: scale(0.98); }
@media (hover: hover) {
  .btn-solid:hover { background: #3A3536; border-color: #3A3536; }
  .btn-outline:hover { background: rgba(106, 85, 70, 0.08); }
}
/* the hold bar glides back if you let go early; while holding it follows your finger exactly */
.hold-fill { transition: transform .5s var(--ease); }
.hold-btn.holding .hold-fill, .hold-btn.held .hold-fill { transition: none; }
.hold-btn.holding { transform: scale(0.985); }
.hold-text { transition: opacity .22s var(--ease); }
.hold-text.fade { opacity: 0; }
.hold-btn.held { border-color: var(--script); }
/* pages ease in, and ease out when a form is sent */
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.app-body > * { animation: page-in .45s var(--ease) both; }
.app-body > *:nth-child(2) { animation-delay: .04s; } .app-body > *:nth-child(3) { animation-delay: .08s; } .app-body > *:nth-child(4) { animation-delay: .12s; }
body.leaving .app-body { opacity: .55; transition: opacity .3s var(--ease); }
/* folded sections slide open */
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
details.just-opened > *:not(summary) { animation: unfold .35s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hold-btn.holding { transform: none; }
}

/* ---------- whole-row links (client lists: contracts, documents, invoices) ----------
   The title link stretches over the whole row, so a tap or click anywhere on it opens the item.
   Only rows marked .doc-link get this, so staff rows with their own buttons are untouched. */
.doc-list:has(> .doc-link) { display: grid; gap: 14px; }
.doc-link { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px;
  padding: 16px; margin: 0; border: 1px solid transparent; border-top: 1px solid transparent; border-radius: 18px; cursor: pointer;
  background: rgba(255, 248, 241, 0.6); transition: background-color .25s var(--ease, ease), border-color .25s var(--ease, ease); }
.doc-link > div { grid-column: 1; grid-row: 1; min-width: 0; }
.doc-link .pill { grid-column: 1; grid-row: 2; justify-self: start; position: relative; pointer-events: none; }
.doc-link::after { content: "\2192"; grid-column: 2; grid-row: 1 / span 2; font: 400 22px/1 var(--f-body); color: var(--script); }
.doc-link h3 { font-size: 17px; line-height: 1.3; }
.doc-link h3 a { color: var(--charcoal); text-decoration: none; }
.doc-link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.doc-link h3 a:focus-visible { outline: none; }
.doc-link:has(a:focus-visible) { outline: 3px solid var(--script); outline-offset: 2px; }
.doc-link p { font-size: 15px; margin-top: 4px; }
.doc-link:active { background: rgba(106, 85, 70, 0.12); }
@media (hover: hover) { .doc-link:hover { background: rgba(106, 85, 70, 0.08); } }
.doc-urgent { border: 2px solid var(--charcoal); background: var(--cream); }

/* ---------- documents: top two per group, "See all", and the All documents search page ---------- */
.doc-group .label { margin-bottom: 14px; }
.doc-more a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border-radius: 18px; text-decoration: none;
  font: 700 15px var(--f-body); color: var(--charcoal); transition: background-color .25s var(--ease); }
.doc-more .dots { font-size: 22px; letter-spacing: 2px; color: var(--script); line-height: 1; }
@media (hover: hover) { .doc-more a:hover { background: rgba(106, 85, 70, 0.08); } }
.doc-more a:active { background: rgba(106, 85, 70, 0.12); }
.search-entry { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 16px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(33, 31, 32, 0.2); background: linear-gradient(180deg, rgba(234, 229, 221, 0.55), rgba(255, 255, 255, 0.45));
  color: var(--muted); font: 500 16px var(--f-body); text-decoration: none; transition: border-color .25s var(--ease); }
.search-entry span { font-size: 18px; color: var(--script); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--script); font: 600 15px var(--f-body); text-decoration: none; }
.search-box { display: grid; gap: 10px; margin-top: 12px; }
.search-box input[type="search"] { width: 100%; min-height: 56px; padding: 0 20px; font: 500 17px var(--f-body); color: var(--charcoal);
  background: linear-gradient(180deg, rgba(234, 229, 221, 0.55), rgba(255, 255, 255, 0.45)); border: 1px solid rgba(33, 31, 32, 0.2); border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(33, 31, 32, 0.08); -webkit-appearance: none; appearance: none; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.search-box input[type="search"]:focus { outline: none; border-color: rgba(33, 31, 32, 0.5); box-shadow: inset 0 1px 3px rgba(33, 31, 32, 0.06), 0 0 0 4px rgba(106, 85, 70, 0.16); }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(33, 31, 32, 0.22);
  font: 600 15px var(--f-body); color: var(--charcoal); text-decoration: none; transition: background-color .25s var(--ease), color .25s var(--ease); }
.filter-chip[aria-current="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.doc-all { margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- payments: friendly bills ---------- */
.bill-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.bill-row { background: var(--paper); border: 1px solid rgba(185, 168, 155, 0.45); }
.bill-row.bill-due { border: 2px solid var(--charcoal); }
.bill-amount { grid-column: 1; grid-row: 2; justify-self: start; font: 700 22px/1.1 var(--f-body); color: var(--charcoal); }
.bill-card { margin-top: 12px; padding: 26px 22px 24px; border-radius: 26px; background: var(--linen); display: grid; gap: 10px; }
.bill-card.bill-sent { background: var(--charcoal); }
.bill-card.bill-sent .label, .bill-card.bill-sent .bill-when, .bill-card.bill-sent .bill-safe, .bill-card.bill-sent .bill-note { color: var(--on-dark-2); }
.bill-card.bill-sent .bill-big { color: var(--cream); }
.bill-card.bill-sent .btn-solid { background: var(--cream); border-color: var(--cream); color: var(--charcoal); }
.bill-card .label { margin: 0; }
.bill-big { margin: 0; font: 400 52px/1 var(--f-display); color: var(--charcoal); -webkit-text-stroke: 1px currentColor; letter-spacing: 0.01em; }
.bill-when { margin: 0; font: 600 16px/1.4 var(--f-body); color: var(--ink-2); }
.bill-pay { display: grid; gap: 10px; margin-top: 8px; }
.bill-safe, .bill-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.bill-paid .bill-when { color: #1F7A4A; }
.bill-items { margin-top: 20px; }
.bill-items .phase-list { margin-top: 6px; }
.bill-ref { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- client home: next-step card, one look per kind (m1 next-step) ---------- */
.home-next .label { margin-bottom: 6px; }
.home-next-payment, .home-next-signature, .home-next-approval, .home-next-co { border-radius: 26px; }
.app-card .home-next-sub { margin-top: 6px; font-size: 15px; color: var(--muted); }
/* payment: a warm money card, the amount is the one big fact */
.home-next-payment { background: var(--linen); border: 0; padding: 26px 22px 24px; }
.home-next-payment .home-next-title { font-size: 18px; }
.app-card .home-next-big { margin-top: 10px; font: 400 52px/1 var(--f-display); color: var(--charcoal); -webkit-text-stroke: 1px currentColor; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.home-next-payment .home-next-due { margin-top: 10px; font: 600 16px/1.4 var(--f-body); color: var(--ink-2); }
/* approval: the item's photo, then one button */
.home-next-approval { border: 1px solid rgba(185, 168, 155, 0.45); }
.home-next-row { display: flex; gap: 14px; align-items: center; }
.home-next-text { min-width: 0; flex: 1; }
.home-next-thumb { flex: none; width: 84px; height: 84px; object-fit: cover; border-radius: 18px; background: var(--linen); }
.home-next-approval .home-next-title { overflow-wrap: anywhere; }
/* signature: cream, with a script-coloured edge like a signing line */
.home-next-signature { background: var(--cream); border: 2px solid var(--script); }
.home-next-signature .label { color: var(--script); }
/* change order: dark card, the change in cost and days is the big fact */
.home-next-co { background: var(--charcoal); border: 0; padding: 26px 22px 24px; }
.home-next-co .label, .home-next-co .home-next-sub, .home-next-co .home-next-due { color: var(--on-dark-2); }
.app-card.home-next-co .home-next-title, .app-card.home-next-co .home-next-big { color: var(--cream); }
.app-card.home-next-co .home-next-big { font: 400 34px/1.1 var(--f-display); margin-top: 14px; }
.home-next-co .btn-solid { background: var(--cream); border-color: var(--cream); color: var(--charcoal); }
@media (hover: hover) { .home-next-co .btn-solid:hover { background: var(--linen); border-color: var(--linen); } }
.home-next-btn.btn-solid { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 52px; margin-top: 18px; text-decoration: none; }

/* Payments tab: four tabs, and a small dot when a bill is waiting */
.app-tabs { grid-template-columns: repeat(4, 1fr); }
.app-tabs a { min-width: 0; font-size: 11px; letter-spacing: 0.02em; }
.tab-dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 999px; background: var(--script); border: 2px solid var(--paper); }

/* ---------- deadlines and money due stand out in red (and only those) ---------- */
.appr-due, .appr-late, .appr .due { color: var(--alert); font-weight: 700; }
.app-card .home-next-due, .home-next-payment .home-next-due { color: var(--alert); font-weight: 700; }
.home-next-co .home-next-due { color: var(--alert-on-dark); font-weight: 700; }
.bill-row.bill-due p { color: var(--alert); font-weight: 700; }
.bill-card.bill-sent .bill-when { color: var(--alert-on-dark); font-weight: 700; }
.bill-paid .bill-when, .bill-row:not(.bill-due) p { color: inherit; }
.home-next-clear .home-next-due { color: var(--muted); font-weight: 500; }

/* ---------- header flash: the logo dissolves, a green "Approved ✓" shows, then the logo returns ---------- */
.app-bar { position: relative; }
.app-brand { transition: opacity .35s var(--ease), filter .35s var(--ease), transform .35s var(--ease); }
.app-bar.flashing .app-brand { opacity: 0; filter: blur(4px); transform: scale(.96); }
.app-flash { position: absolute; left: 20px; top: 50%; transform: translateY(-50%) scale(.96); opacity: 0; pointer-events: none;
  font: 700 19px/1 var(--f-body); letter-spacing: .02em; color: var(--ok); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.app-flash.warm { color: var(--warn); }
.app-bar.flashing .app-flash { opacity: 1; transform: translateY(-50%) scale(1); }

/* ---------- tactile buttons (owner 2026-11-17: "i dont like the black buttons", with tactile-UI references) ----------
   Raised keys with a lit top edge and a soft shadow; pressing sinks them to 97% with the shadow pulled in.
   Main action = green, second action = cream. No black buttons on client screens. */
:root { --go: #2E7D55; --go-top: #3C9667; --go-bottom: #276B48; --key: #FBF7F1; --key-bottom: #EFE8DE; }
.btn-solid, .app-btn, .btn-outline, summary.btn-outline {
  position: relative; border-radius: 999px; font-weight: 700; letter-spacing: 0.03em;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), background .25s var(--ease), filter .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-solid, .app-btn {
  border: 1px solid #22603F; color: #FFFDF8;
  background: linear-gradient(180deg, var(--go-top), var(--go-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    0 2px 3px rgba(33, 31, 32, 0.16), 0 10px 20px -10px rgba(39, 107, 72, 0.7);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.btn-outline, summary.btn-outline {
  border: 1px solid rgba(33, 31, 32, 0.16); color: var(--charcoal);
  background: linear-gradient(180deg, #FFFFFF, var(--key-bottom));
  box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -3px 0 rgba(106, 85, 70, 0.10),
    0 2px 3px rgba(33, 31, 32, 0.10), 0 10px 18px -12px rgba(33, 31, 32, 0.45);
}
@media (hover: hover) {
  .btn-solid:hover, .app-btn:hover { filter: brightness(1.05); background: linear-gradient(180deg, var(--go-top), var(--go-bottom)); border-color: #22603F; }
  .btn-outline:hover, summary.btn-outline:hover { filter: brightness(1.02); background: linear-gradient(180deg, #FFFFFF, var(--key-bottom)); }
}
.btn-solid:active, .app-btn:active, .btn-outline:active, summary.btn-outline:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.18), 0 1px 1px rgba(33, 31, 32, 0.10);
}
.btn-solid:focus-visible, .app-btn:focus-visible, .btn-outline:focus-visible, summary.btn-outline:focus-visible { outline: 3px solid var(--script); outline-offset: 3px; }
/* on the dark bill and change-order cards the main key stays green, which reads well on charcoal */
.bill-card.bill-sent .btn-solid, .home-next-co .btn-solid { background: linear-gradient(180deg, var(--go-top), var(--go-bottom)); border-color: #22603F; color: #FFFDF8; }
/* press-and-hold: a cream key that fills green; the fill carries its own light copy of the words */
.hold-btn {
  border: 1px solid rgba(33, 31, 32, 0.16); color: var(--charcoal);
  background: linear-gradient(180deg, #FFFFFF, var(--key-bottom));
  box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -3px 0 rgba(106, 85, 70, 0.10), 0 2px 3px rgba(33, 31, 32, 0.10), 0 10px 18px -12px rgba(33, 31, 32, 0.45);
}
.hold-text { color: var(--charcoal); }
.hold-fill {
  transform: none; display: grid; place-items: center; padding: 0 20px; color: #FFFDF8; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  background: linear-gradient(180deg, var(--go-top), var(--go-bottom));
  clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0 round 999px); transition: clip-path .5s var(--ease);
}
.hold-fill::after { content: attr(data-label); font: inherit; }
.hold-btn.holding .hold-fill, .hold-btn.held .hold-fill { transition: none; }
.hold-btn.holding { transform: translateY(1px) scale(0.97); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.14), 0 1px 1px rgba(33, 31, 32, 0.10); }
.hold-btn.held { border-color: #22603F; }
@media (prefers-reduced-motion: reduce) { .btn-solid:active, .app-btn:active, .btn-outline:active, .hold-btn.holding { transform: none; } }

/* ---------- All steps: finished steps fold to one line; dates show on tap ---------- */
.steps-done > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 48px;
  font: 600 16px var(--f-body); color: var(--muted); border-bottom: 1px solid rgba(185, 168, 155, 0.5); }
.steps-done > summary::-webkit-details-marker { display: none; }
.steps-done-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: rgba(31, 122, 74, 0.12); color: var(--ok, #1F7A4A); font-weight: 700; font-size: 14px; }
.steps-done .phase-list li { padding: 10px 0; font-size: 15px; }
.step-more { width: 100%; }
.step-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-more > summary::-webkit-details-marker { display: none; }
.step-more > .muted { display: block; margin-top: 4px; font-size: 14px; }
.phase-list li:has(.step-more) { display: block; }

/* ---------- MOTION RULE (owner 2026-11-17: "id like actions to go slower when buttons are clicked ... elegant ui ux") ----------
   Nothing snaps. Presses sink in ~0.26 s and rise back slower (~0.5 s); things that appear take 0.6-0.8 s, one after
   another; colours and fills change over 0.4-0.6 s. One easing curve everywhere: --ease. Reduced motion: none at all.
   New screens use these tokens instead of their own numbers. */
:root { --t-press: .26s; --t-release: .5s; --t-change: .45s; --t-appear: .7s; --t-flash: .6s; }
.btn-solid, .app-btn, .btn-outline, summary.btn-outline, .hold-btn, .chip-btn, .filter-chip, .doc-link, .doc-more a, .search-entry,
.app-tabs a, .app-tabs button, .app-cta, .seg button {
  transition: transform var(--t-release) var(--ease), box-shadow var(--t-release) var(--ease), background-color var(--t-change) var(--ease),
    color var(--t-change) var(--ease), border-color var(--t-change) var(--ease), filter var(--t-change) var(--ease), opacity var(--t-change) var(--ease);
}
.btn-solid:active, .app-btn:active, .btn-outline:active, summary.btn-outline:active, .doc-link:active, .doc-more a:active {
  transition-duration: var(--t-press);
}
.app-body > * { animation-duration: var(--t-appear); }
.app-body > *:nth-child(2) { animation-delay: .08s; } .app-body > *:nth-child(3) { animation-delay: .16s; } .app-body > *:nth-child(4) { animation-delay: .24s; }
details.just-opened > *:not(summary) { animation-duration: .6s; }
.app-brand, .app-flash { transition-duration: var(--t-flash); }
.hold-fill { transition: clip-path .7s var(--ease); }
.hold-text { transition: opacity .35s var(--ease); }
body.leaving .app-body { transition: opacity .5s var(--ease); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- bill breakdown ("What this covers"): clear shades, amounts on the same line ----------
   Owner 2026-11-17 (screenshot of the breakdown): "colors can help here to similar shades". */
.bill-items .phase-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: baseline; padding: 14px 0; }
.bill-items .phase-list li > div { min-width: 0; color: var(--charcoal); }
.bill-items .phase-list li > div strong { font-weight: 600; color: var(--charcoal); }
.bill-items .phase-list li > div br { display: none; }
.bill-items .phase-list li > div .muted { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.bill-items .phase-list li > span { font: 600 16px var(--f-body); color: var(--charcoal); font-variant-numeric: tabular-nums; }
/* totals: a soft tinted box; subtotal and tax quiet, the total big and green */
.bill-items .phase-list + .phase-list { margin-top: 18px; padding: 4px 16px; border-radius: 16px; background: var(--linen); }
.bill-items .phase-list + .phase-list li { padding: 10px 0; color: var(--muted); font-size: 15px; border-top-color: rgba(106, 85, 70, 0.18); }
.bill-items .phase-list + .phase-list li > span { color: var(--muted); font-weight: 500; font-size: 15px; }
.bill-items .phase-list + .phase-list li:last-child { padding: 14px 0 12px; border-top: 2px solid rgba(39, 107, 72, 0.45); }
.bill-items .phase-list + .phase-list li:last-child strong { font: 700 19px var(--f-body); color: var(--go, #2E7D55); font-variant-numeric: tabular-nums; }
.bill-items > p { margin-top: 16px; padding: 10px 14px; border-left: 3px solid var(--script); border-radius: 4px; font-style: italic; font-size: 15px; color: var(--muted); background: rgba(234, 229, 221, 0.4); }

/* ---------- card titles sit above their cards, not inside (owner 2026-11-17: "move title outside and above each card
   for more space"). Any card whose first child is a .label gets it lifted into the gap above it. ---------- */
.app-card:has(> .label:first-child), .app-proj:has(> .label:first-child) { position: relative; margin-top: 64px; }
.app-card > .label:first-child, .app-proj > .label:first-child {
  position: absolute; left: 6px; bottom: 100%; margin: 0 0 12px; font-size: 13px; letter-spacing: 0.16em; color: var(--muted);
}
.app-proj > .label:first-child { color: var(--muted); }
/* the first card on a page needs a little room above its lifted title */
.app-hello + .app-card:has(> .label:first-child), .app-hello + section.app-card:has(> .label:first-child) { margin-top: 56px; }

/* ---------- search screens (owner 2026-11-17): raised filter keys, warm focus, floating search ---------- */
/* filter keys: cream raised keys; the selected one is the green key */
.chip-btn, .filter-chip {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; text-decoration: none;
  font: 700 15px var(--f-body); letter-spacing: 0.02em; color: var(--charcoal);
  border: 1px solid rgba(33, 31, 32, 0.14); background: linear-gradient(180deg, #FFFFFF, var(--key-bottom, #EFE8DE));
  box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -2px 0 rgba(106, 85, 70, 0.10), 0 2px 3px rgba(33, 31, 32, 0.08), 0 8px 14px -10px rgba(33, 31, 32, 0.4);
}
.chip-btn[aria-current="true"], .filter-chip[aria-current="true"] {
  color: #FFFDF8; border-color: #22603F; background: linear-gradient(180deg, var(--go-top, #3C9667), var(--go-bottom, #276B48));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 6px 14px -8px rgba(39, 107, 72, 0.7);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.chip-btn:active, .filter-chip:active { transform: translateY(1px) scale(0.97); transition-duration: var(--t-press, .26s); }
.choice-filters, .filter-chips { gap: 10px; }
/* the search box keeps its warm tone when tapped (it went white) */
.choice-search input[type="search"]:focus, .search-box input[type="search"]:focus, .field input[type="search"]:focus {
  background: linear-gradient(180deg, rgba(234, 229, 221, 0.7), rgba(246, 241, 234, 0.9));
}
/* floating search: a round magnifying glass bottom-left once the search box scrolls away */
.search-fab {
  position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(33, 31, 32, 0.14); color: var(--charcoal);
  background: linear-gradient(180deg, #FFFFFF, var(--key-bottom, #EFE8DE));
  box-shadow: inset 0 1px 0 #FFFFFF, 0 10px 22px -10px rgba(33, 31, 32, 0.55), 0 2px 4px rgba(33, 31, 32, 0.12);
  opacity: 0; transform: translateY(14px) scale(0.9); pointer-events: none;
  transition: opacity var(--t-change, .45s) var(--ease), transform var(--t-release, .5s) var(--ease);
}
.search-fab.show { opacity: 1; transform: none; pointer-events: auto; }
.search-fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-fab:active { transform: scale(0.95); }
/* the slim bar that sits right above the keyboard */
.search-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 10px; align-items: center;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(246, 241, 234, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(185, 168, 155, 0.6); box-shadow: 0 -10px 24px -16px rgba(33, 31, 32, 0.5);
  transform: translateY(110%); transition: transform var(--t-release, .5s) var(--ease);
}
.search-dock.open { transform: translateY(calc(-1 * var(--kb, 0px))); }
.search-dock input {
  flex: 1; min-width: 0; height: 42px; padding: 0 16px; border-radius: 999px; font: 500 17px var(--f-body); color: var(--charcoal);
  border: 1px solid rgba(33, 31, 32, 0.22); background: linear-gradient(180deg, rgba(234, 229, 221, 0.7), rgba(246, 241, 234, 0.9));
  -webkit-appearance: none; appearance: none;
}
.search-dock input:focus { outline: none; border-color: rgba(33, 31, 32, 0.5); box-shadow: 0 0 0 3px rgba(106, 85, 70, 0.16); }
.search-dock button { flex: none; width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; font: 400 24px/1 var(--f-body); color: var(--muted); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .search-fab, .search-dock { transition: none; } }

/* floating search sits in the centre of the bottom tab bar, half in and half out (owner 2026-11-17).
   portal.js measures the tab bar and sets --tabbar-h. */
.search-fab.in-tabbar {
  left: 50%; right: auto; bottom: calc(var(--tabbar-h, 64px) - 28px);
  transform: translateX(-50%) translateY(10px) scale(0.92);
  width: 58px; height: 58px; z-index: 45;
  border: 3px solid var(--cream);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 8px 18px -8px rgba(33, 31, 32, 0.55), 0 1px 3px rgba(33, 31, 32, 0.18);
}
.search-fab.in-tabbar.show { transform: translateX(-50%); }
.search-fab.in-tabbar:active { transform: translateX(-50%) scale(0.95); }

/* the page's own search bar is replaced by the tab-bar magnifier (it stays for phones without JavaScript) */
.dock-search form[role="search"]:not(.search-dock) { display: none; }
.search-active { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 0; padding: 4px 4px 4px 16px; border-radius: 999px;
  background: rgba(31, 122, 74, 0.10); color: var(--charcoal); font: 600 15px var(--f-body); }
.search-active[hidden] { display: none; }
.search-active button { width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; font: 400 22px/1 var(--f-body); color: var(--muted); cursor: pointer; }

/* ---------- see-through keys (owner 2026-11-17: "id still prefer even colors to be semitransparent on all buttons") ----------
   Same raised shape and press; the fills are translucent so the page tone shows through, frosted with a light blur. */
.btn-solid, .app-btn, .chip-btn[aria-current="true"], .filter-chip[aria-current="true"],
.bill-card.bill-sent .btn-solid, .home-next-co .btn-solid {
  background: linear-gradient(180deg, rgba(60, 150, 103, 0.86), rgba(39, 107, 72, 0.9));
  border-color: rgba(34, 96, 63, 0.7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.btn-outline, summary.btn-outline, .hold-btn, .chip-btn, .filter-chip, .search-fab, .search-entry {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(239, 232, 222, 0.5));
  border-color: rgba(33, 31, 32, 0.14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chip-btn[aria-current="true"], .filter-chip[aria-current="true"] { color: #FFFDF8; }
@media (hover: hover) {
  .btn-solid:hover, .app-btn:hover { background: linear-gradient(180deg, rgba(60, 150, 103, 0.92), rgba(39, 107, 72, 0.95)); }
  .btn-outline:hover, summary.btn-outline:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(239, 232, 222, 0.6)); }
}

/* ---------- tinted-glass main keys (owner 2026-11-17: "the approve button still needs transparent effect") ----------
   A clearly see-through green tint with a green edge and dark green words (readable at any tint), instead of a
   near-solid green. Second keys stay clear frosted glass with dark words. */
:root { --go-ink: #1C5537; --go-tint-top: rgba(46, 125, 85, 0.20); --go-tint-bottom: rgba(46, 125, 85, 0.34); --go-edge: rgba(46, 125, 85, 0.55); }
.btn-solid, .app-btn, .chip-btn[aria-current="true"], .filter-chip[aria-current="true"] {
  color: var(--go-ink); text-shadow: none; border: 1px solid var(--go-edge);
  background: linear-gradient(180deg, var(--go-tint-top), var(--go-tint-bottom));
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(46, 125, 85, 0.18), 0 8px 18px -12px rgba(46, 125, 85, 0.7);
}
@media (hover: hover) {
  .btn-solid:hover, .app-btn:hover { background: linear-gradient(180deg, rgba(46, 125, 85, 0.28), rgba(46, 125, 85, 0.42)); }
}
.btn-solid:active, .app-btn:active { box-shadow: inset 0 2px 6px rgba(46, 125, 85, 0.35); }
/* on the dark bill and change-order cards the tint glows lighter */
.bill-card.bill-sent .btn-solid, .home-next-co .btn-solid {
  color: #D5F2E0; border-color: rgba(120, 200, 150, 0.55); background: linear-gradient(180deg, rgba(90, 180, 130, 0.22), rgba(90, 180, 130, 0.34));
}
/* press-and-hold: the fill is the same tinted glass, filling left to right */
.hold-fill { color: var(--go-ink); text-shadow: none; background: linear-gradient(180deg, rgba(46, 125, 85, 0.30), rgba(46, 125, 85, 0.46)); }
.hold-btn.held { border-color: var(--go-edge); }

/* lighter keys: softer, shorter shadows so buttons sit on the page instead of looming over it */
.btn-outline, summary.btn-outline, .hold-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(33, 31, 32, 0.08), 0 6px 12px -10px rgba(33, 31, 32, 0.35);
}
.btn-solid, .app-btn { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 12px -10px rgba(46, 125, 85, 0.6); }

/* ---------- one Filter key that opens the filter keys ---------- */
.filter-menu { margin: 16px 0 6px; }
.filter-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 10px; width: auto; min-height: 48px; padding: 0 18px; cursor: pointer; }
.filter-menu > summary::-webkit-details-marker { display: none; }
.filter-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.filter-toggle b { font-weight: 700; color: var(--go-ink, #1C5537); }
.filter-menu:not(.is-filtered) .filter-toggle b { color: var(--muted); font-weight: 600; }
.filter-toggle i { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--t-change, .45s) var(--ease); opacity: .6; }
.filter-menu[open] .filter-toggle i { transform: rotate(-135deg) translateY(-2px); }
.filter-menu > nav { margin: 12px 0 0; padding: 12px; border-radius: 20px; background: rgba(234, 229, 221, 0.45); }
.filter-menu[open] > nav { animation: unfold .6s var(--ease) both; }

/* ---------- glass shadows for the see-through keys (owner 2026-11-17: "still need good shadowing on transparent buttons")
   Layered like real glass: a lit top edge, a faint inner base, a close contact shadow and a wider soft lift.
   Green keys cast a green-tinted lift; clear keys a neutral one. Pressing pulls the shadows in. */
:root {
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(33, 31, 32, 0.06);
  --lift-clear: 0 1px 1px rgba(33, 31, 32, 0.07), 0 3px 6px -1px rgba(33, 31, 32, 0.10), 0 14px 26px -12px rgba(33, 31, 32, 0.32);
  --lift-green: 0 1px 1px rgba(28, 85, 55, 0.10), 0 4px 8px -2px rgba(46, 125, 85, 0.20), 0 16px 28px -12px rgba(46, 125, 85, 0.50);
  --press-clear: inset 0 2px 5px rgba(33, 31, 32, 0.14), 0 1px 1px rgba(33, 31, 32, 0.06);
  --press-green: inset 0 2px 6px rgba(28, 85, 55, 0.30), 0 1px 1px rgba(28, 85, 55, 0.10);
}
.btn-outline, summary.btn-outline, .hold-btn, .chip-btn, .filter-chip, .filter-toggle, .search-entry { box-shadow: var(--glass-edge), var(--lift-clear); }
.btn-solid, .app-btn, .chip-btn[aria-current="true"], .filter-chip[aria-current="true"] { box-shadow: var(--glass-edge), var(--lift-green); }
.search-fab, .search-fab.in-tabbar { box-shadow: var(--glass-edge), 0 2px 4px rgba(33, 31, 32, 0.10), 0 12px 24px -8px rgba(33, 31, 32, 0.40); }
.btn-outline:active, summary.btn-outline:active, .chip-btn:active, .filter-chip:active, .hold-btn.holding { box-shadow: var(--press-clear); }
.btn-solid:active, .app-btn:active { box-shadow: var(--press-green); }
@media (hover: hover) {
  .btn-outline:hover, summary.btn-outline:hover, .chip-btn:hover, .filter-toggle:hover { box-shadow: var(--glass-edge), 0 1px 1px rgba(33, 31, 32, 0.07), 0 5px 10px -2px rgba(33, 31, 32, 0.12), 0 18px 30px -12px rgba(33, 31, 32, 0.36); }
  .btn-solid:hover, .app-btn:hover { box-shadow: var(--glass-edge), 0 1px 1px rgba(28, 85, 55, 0.10), 0 6px 12px -2px rgba(46, 125, 85, 0.24), 0 20px 32px -12px rgba(46, 125, 85, 0.56); }
}
/* on dark cards the lift is a soft glow */
.bill-card.bill-sent .btn-solid, .home-next-co .btn-solid { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px -10px rgba(120, 200, 150, 0.45); }
/* ---------- Steps: done = green check badge; expanded step links to its own page (owner 2026-11-17) ---------- */
.step-check { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 999px; background: rgba(31, 122, 74, 0.14); color: var(--ok); font: 700 15px/1 var(--f-body); }
.step-more > .step-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; color: var(--script); font: 600 15px var(--f-body); text-decoration: none; transition: color var(--t-change) var(--ease), gap var(--t-change) var(--ease); }
.step-more > .step-link span { font-size: 22px; line-height: 1; }
@media (hover: hover) { .step-more > .step-link:hover { color: var(--charcoal); gap: 10px; } }
.step-more > .step-link:focus-visible { outline: 3px solid var(--script); outline-offset: 2px; border-radius: 6px; }
.step-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; font-size: 16px; }
.step-meta .muted { font-size: 15px; }
.step-state { font-weight: 600; color: var(--ok); }
.step-update { padding: 18px 0; border-top: 1px solid rgba(185, 168, 155, 0.5); }
.step-update:first-of-type { border-top: 0; padding-top: 6px; }
.step-update .news-photos { margin: 10px 0; }
.step-tag { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step-tag select { max-width: 100%; min-height: 40px; }
/* ---------- payments: paid bills fold into one line (m5 paid) ---------- */
.paid-fold { margin-top: 22px; }
.paid-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px;
  font: 600 16px var(--f-body); color: var(--muted); border-bottom: 1px solid rgba(185, 168, 155, 0.5); }
.paid-fold > summary::-webkit-details-marker { display: none; }
.paid-list { list-style: none; margin: 0; padding: 0; }
.paid-row a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; min-height: 48px; text-decoration: none; color: var(--charcoal);
  border-bottom: 1px solid rgba(185, 168, 155, 0.35); }
.paid-name { font: 600 16px var(--f-body); overflow-wrap: anywhere; }
.paid-amount { grid-row: 1; grid-column: 2; font: 700 16px var(--f-body); }
.paid-when { grid-column: 1; font-size: 14px; color: var(--muted); }

/* less green glow (owner 2026-11-17: "less green glow to show shadow glass"): green keys cast the same neutral glass
   shadow as the clear keys; the colour stays in the glass, not around it. */
:root {
  --lift-green: 0 1px 1px rgba(33, 31, 32, 0.08), 0 3px 6px -1px rgba(33, 31, 32, 0.11), 0 14px 26px -12px rgba(33, 31, 32, 0.30);
  --press-green: inset 0 2px 5px rgba(28, 85, 55, 0.22), 0 1px 1px rgba(33, 31, 32, 0.06);
}
@media (hover: hover) {
  .btn-solid:hover, .app-btn:hover { box-shadow: var(--glass-edge), 0 1px 1px rgba(33, 31, 32, 0.08), 0 5px 10px -2px rgba(33, 31, 32, 0.13), 0 18px 30px -12px rgba(33, 31, 32, 0.34); }
}
.bill-card.bill-sent .btn-solid, .home-next-co .btn-solid { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 22px -10px rgba(0, 0, 0, 0.55); }

/* filter key: a round icon-only glass key; a small green dot when a filter is on */
.filter-menu > summary.filter-toggle { width: 52px; height: 52px; min-height: 52px; padding: 0; justify-content: center; position: relative; border-radius: 999px; }
.filter-toggle svg { width: 22px; height: 22px; }
.filter-dot { position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 999px; background: var(--ok, #1F7A4A); border: 2px solid rgba(255, 253, 248, 0.95); opacity: 0; transform: scale(0.6); transition: opacity var(--t-change, .45s) var(--ease), transform var(--t-change, .45s) var(--ease); }
.filter-menu.is-filtered .filter-dot { opacity: 1; transform: none; }

/* "Search everything": a small kind tag on each row */
.search-kind { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; font: 700 12px var(--f-body); letter-spacing: .04em; color: var(--muted); background: rgba(185, 168, 155, 0.22); }

/* ---------- tab bar: icons only, bigger, with depth; a gap in the middle for the centre button (owner 2026-11-17:
   "remove words and make icons bigger and give depth"). The words stay for screen readers (font-size 0). ---------- */
.app-tabs { grid-template-columns: 1fr 1fr 72px 1fr 1fr; padding-top: 10px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); align-items: end; }
.app-tabs > a:nth-child(3) { grid-column: 4; }
.app-tabs > a:nth-child(4) { grid-column: 5; }
.app-tabs a { font-size: 0; letter-spacing: 0; min-height: 52px; justify-content: center; position: relative; }
.app-tabs a svg { width: 30px; height: 30px; stroke-width: 1.7; filter: drop-shadow(0 2px 1.5px rgba(33, 31, 32, 0.18)); transition: transform var(--t-release, .5s) var(--ease), filter var(--t-change, .45s) var(--ease); }
.app-tabs a:active svg { transform: translateY(1px) scale(0.94); filter: drop-shadow(0 1px 0.5px rgba(33, 31, 32, 0.2)); transition-duration: var(--t-press, .26s); }
/* the current tab sits in a pressed-in glass well */
.app-tabs a[aria-current="page"]::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 44px; transform: translate(-50%, -50%); border-radius: 16px; z-index: -1;
  background: linear-gradient(180deg, rgba(234, 229, 221, 0.75), rgba(246, 241, 234, 0.55));
  box-shadow: inset 0 2px 4px rgba(33, 31, 32, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.8);
}
.app-tabs a[aria-current="page"] svg { stroke: var(--go-ink, #1C5537); }
.app-tabs .tab-dot { top: 8px; left: calc(50% + 10px); }

/* ---------- step tags: Now = amber, Planned = lake blue (owner: "color code the now planned and make transparent glass
   recessed"); the look itself is the global .pill below. ---------- */
.phase-list .pill:not(.pill-wait) { --tint-ink: var(--lake-ink); --tint-bg: var(--lake-bg); --tint-edge: var(--lake-edge); }
.app-tabs a { isolation: isolate; }
.app-tabs { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }

/* ---------- next-step card: the facts as coloured, see-through, pressed-in glass tags (owner 2026-11-17: "add the
   same style to this card ... should fit more intuitively like the glass cards that are dif colors").
   Red = the deadline (allowed: deadlines only), lake blue = how many are waiting. ---------- */
.home-next-approval .home-next-row { align-items: center; }
.home-next-approval .home-next-title { flex: 1; min-width: 0; font-size: 21px; line-height: 1.25; }
.home-next-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.gtag { --tint-ink: var(--neutral-ink); --tint-bg: var(--neutral-bg); --tint-edge: var(--neutral-edge);
  display: inline-flex; align-items: center; border-radius: 999px; font: 700 15px/1.2 var(--f-body); letter-spacing: 0.01em;
  color: var(--tint-ink); background: var(--tint-bg); border: 1px solid var(--tint-edge); box-shadow: var(--glass-inset);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gtag-due { --tint-ink: var(--red-ink); --tint-bg: var(--red-bg); --tint-edge: var(--red-edge); }
.gtag-due-soft { --tint-ink: #8E2A22; --tint-bg: rgba(179, 38, 30, 0.06); --tint-edge: rgba(179, 38, 30, 0.18); font-weight: 600; }
.gtag-count { --tint-ink: var(--lake-ink); --tint-bg: var(--lake-bg); --tint-edge: var(--lake-edge); }
/* on the dark change-order card the glass is lit from inside instead */
.home-next-co .gtag { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.12); }
.home-next-co .gtag-due { color: var(--alert-on-dark); background: rgba(255, 156, 144, 0.14); border-color: rgba(255, 156, 144, 0.35); }
.home-next-co .gtag-due-soft { color: #FFC2BA; background: rgba(255, 156, 144, 0.07); border-color: rgba(255, 156, 144, 0.2); }

/* next-step tags: slimmer, with clear space under the photo (owner 2026-11-17: "reduce height of containers and
   proper padding from image") */
.app-card .home-next-tags { margin-top: 18px; gap: 6px 8px; }
.gtag { min-height: 0; padding: 4px 11px; font-size: 14px; line-height: 1.3; }

/* ---------- sign-in: two biometric keys with symbols (owner 2026-11-17: "make two buttons with face symbol and
   fingerprint symbol"). Same tactile see-through glass as the main key. ---------- */
.bio-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bio-key {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 108px;
  border-radius: 24px; border: 1px solid rgba(46, 125, 85, 0.35); color: var(--go-ink, #1C5537);
  font: 700 15px/1.2 var(--f-body); letter-spacing: 0.02em; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, rgba(220, 236, 226, 0.85), rgba(188, 212, 196, 0.7));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -3px 0 rgba(33, 31, 32, 0.06),
    0 2px 3px rgba(33, 31, 32, 0.10), 0 12px 22px -14px rgba(33, 31, 32, 0.45);
  transition: transform var(--t-release, .5s) var(--ease), box-shadow var(--t-release, .5s) var(--ease), opacity var(--t-change, .45s) var(--ease);
}
.bio-key svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(33, 31, 32, 0.15)); }
.bio-key:active { transform: translateY(1px) scale(0.97); transition-duration: var(--t-press, .26s);
  box-shadow: inset 0 2px 5px rgba(33, 31, 32, 0.16), 0 1px 2px rgba(33, 31, 32, 0.08); }
.bio-key:focus-visible { outline: 2px solid var(--script); outline-offset: 3px; }
.bio-key:disabled { opacity: 0.6; cursor: default; }
.bio-pin { text-align: center; margin-top: 4px; }

/* every text box turns clean white while you type in it (owner 2026-11-17: "email box turns white on click") */
.field input:focus, .field textarea:focus, .field select:focus, .sel-form textarea:focus { background: #FFFFFF; }

/* a send key waits pressed-in until the form is filled in right, then rises (see portal.js data-ready-when-valid) */
.btn-solid.is-waiting, .btn-outline.is-waiting {
  background: rgba(234, 229, 221, 0.6); color: rgba(74, 67, 64, 0.75); border-color: rgba(33, 31, 32, 0.12);
  box-shadow: inset 0 2px 5px rgba(33, 31, 32, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.7);
  text-shadow: none; filter: none; transform: translateY(1px);
  transition: background var(--t-change, .45s) var(--ease), box-shadow var(--t-change, .45s) var(--ease), color var(--t-change, .45s) var(--ease), transform var(--t-change, .45s) var(--ease);
}
@media (hover: hover) { .btn-solid.is-waiting:hover, .btn-outline.is-waiting:hover { background: rgba(234, 229, 221, 0.6); filter: none; } }

/* ---------- "Where we are": see-through glass instead of a black card (owner 2026-11-17: "now this doesnt vibe with
   transparent ui"). Soft green glass, dark text, the step bar pressed into the glass with green glass fill. ---------- */
.app-proj {
  color: var(--ink-2); border: 1px solid rgba(46, 125, 85, 0.22);
  background: linear-gradient(160deg, rgba(232, 242, 235, 0.88), rgba(205, 225, 212, 0.62));
  backdrop-filter: blur(10px) saturate(1.15); -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 4px rgba(33, 31, 32, 0.06), 0 16px 30px -18px rgba(33, 31, 32, 0.35);
}
.app-proj .home-now { color: var(--charcoal); -webkit-text-stroke: 0.6px currentColor; }
.app-proj .app-proj-sub, .app-proj .home-pct, .app-proj .phase-now span { color: var(--ink-2); }
.app-proj .home-pct strong { color: var(--charcoal); }
.app-proj .phases li { background: rgba(33, 31, 32, 0.07); box-shadow: inset 0 1px 2px rgba(33, 31, 32, 0.18), 0 1px 0 rgba(255, 255, 255, 0.7); }
.app-proj .phases li.done { background: linear-gradient(180deg, rgba(60, 150, 103, 0.75), rgba(39, 107, 72, 0.8)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.app-proj .phases li.now { background: linear-gradient(90deg, rgba(60, 150, 103, 0.75) 55%, rgba(33, 31, 32, 0.07) 55%); }

/* ---------- ONE glass tag look for the whole site (owner 2026-11-17: "the now pills need updated site wide make sure we
   have some ui changes that can happen globally"). Every .pill and .gtag is see-through glass pressed into the page;
   its colour comes from three tint variables, so a page only picks a tint and never restyles the pill.
   Tints: neutral (default), amber = now / waiting on you, lake = planned / counts, green = new / done, red = deadlines only.
   Change a colour here and every page follows. ---------- */
:root {
  --glass-inset: inset 0 2px 3px rgba(33, 31, 32, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.7);
  --neutral-ink: #4A4340; --neutral-bg: rgba(33, 31, 32, 0.06); --neutral-edge: rgba(33, 31, 32, 0.16);
  --amber-ink: #7A4310;   --amber-bg: rgba(181, 101, 29, 0.16); --amber-edge: rgba(181, 101, 29, 0.32);
  --lake-ink: #2F5470;    --lake-bg: rgba(64, 108, 140, 0.13);  --lake-edge: rgba(64, 108, 140, 0.28);
  --green-ink: #1C5537;   --green-bg: rgba(46, 125, 85, 0.13);  --green-edge: rgba(46, 125, 85, 0.30);
  --red-ink: var(--alert); --red-bg: rgba(179, 38, 30, 0.12);   --red-edge: rgba(179, 38, 30, 0.28);
}
.pill {
  --tint-ink: var(--neutral-ink); --tint-bg: var(--neutral-bg); --tint-edge: var(--neutral-edge);
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  font-weight: 700; color: var(--tint-ink); background: var(--tint-bg); border: 1px solid var(--tint-edge);
  box-shadow: var(--glass-inset); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pill-wait, .tint-amber { --tint-ink: var(--amber-ink); --tint-bg: var(--amber-bg); --tint-edge: var(--amber-edge); }
.pill-new, .tint-green { --tint-ink: var(--green-ink); --tint-bg: var(--green-bg); --tint-edge: var(--green-edge); }
.tint-lake { --tint-ink: var(--lake-ink); --tint-bg: var(--lake-bg); --tint-edge: var(--lake-edge); }
.tint-red { --tint-ink: var(--red-ink); --tint-bg: var(--red-bg); --tint-edge: var(--red-edge); }
.tint-neutral { --tint-ink: var(--neutral-ink); --tint-bg: var(--neutral-bg); --tint-edge: var(--neutral-edge); }
/* three more glass tints, for kinds of things (search results): plum, clay, sky */
:root {
  --plum-ink: #5E3A63; --plum-bg: rgba(122, 76, 128, 0.12); --plum-edge: rgba(122, 76, 128, 0.28);
  --clay-ink: #6E3F2A; --clay-bg: rgba(160, 96, 66, 0.13);  --clay-edge: rgba(160, 96, 66, 0.30);
  --sky-ink: #1F5A66;  --sky-bg: rgba(46, 132, 150, 0.12);  --sky-edge: rgba(46, 132, 150, 0.28);
}
.tint-plum { --tint-ink: var(--plum-ink); --tint-bg: var(--plum-bg); --tint-edge: var(--plum-edge); }
.tint-clay { --tint-ink: var(--clay-ink); --tint-bg: var(--clay-bg); --tint-edge: var(--clay-edge); }
.tint-sky { --tint-ink: var(--sky-ink); --tint-bg: var(--sky-bg); --tint-edge: var(--sky-edge); }
/* a document waiting on the client: amber glass edge, not a black outline (no black on client screens) */
.doc-urgent { border: 1px solid var(--amber-edge); background: linear-gradient(180deg, rgba(181, 101, 29, 0.07), rgba(181, 101, 29, 0.02)), var(--cream); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 18px -14px rgba(122, 67, 16, 0.45); }

/* ---------- Update from Programa (studio): the preview of what a Programa file will change. Calm cards, old value
   muted, new value dark; tints come from the one glass pill system above (no red: nothing here is a deadline or money due). ---------- */
.pg-card { display: grid; gap: 14px; }
.pg-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.pg-summary { font: 600 24px/1.35 var(--f-body); color: var(--charcoal); margin: 24px 0 4px; }
.pg-head { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.pg-list { list-style: none; margin: 0; padding: 0; }
.pg-list > li { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid rgba(185, 168, 155, 0.45); }
.pg-list > li:first-child { border-top: 0; padding-top: 4px; }
.pg-changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; color: var(--ink-2); }
.pg-field { display: inline-block; min-width: 9em; font-weight: 600; color: var(--muted); }
.pg-old { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(74, 67, 64, 0.35); }
.pg-example { display: block; }
.pg-card select { min-height: 48px; }
.pg-list > li > .pill { justify-self: start; }

/* ---------- upload note (public/uploads.js): a file is too big to send. Amber glass tint, never red (nothing here is a
   deadline or money due); plain words for very non-technical people. ---------- */
.upload-note { --tint-ink: var(--amber-ink); --tint-bg: var(--amber-bg); --tint-edge: var(--amber-edge); margin: 14px 0; padding: 14px 18px; border-radius: 18px; font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--tint-ink); background: var(--tint-bg); border: 1px solid var(--tint-edge); box-shadow: var(--glass-inset); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: upload-note-in var(--t-appear) var(--ease) both; }
@keyframes upload-note-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .upload-note { animation: none; } }
