/*
 * MH Handcraft — brand tokens + admin shell + inquiries kanban.
 * Palette/fonts lifted from the design bundle. "Brand, in a utility key."
 */

:root {
  --cream: #f5efe6;
  --cream-2: #ebe3d4;
  --paper: #fbf8f3;
  --ink: #1a1714;
  --ink-2: #2a241f;
  --muted: #6b6157;
  --line: #d9d0c0;
  --line-2: #ece5d6;
  --accent: #b8593a;     /* warm terracotta — from their arch palette */
  --accent-2: #c98a5b;
  --sage: #7a8a72;
  --gold: #c9a86a;
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #efeae2;
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- Admin shell: dark rail + cream working surface --------------------- */

.admin {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
  background: #f7f4ed;
}

.rail {
  background: var(--ink);
  color: var(--cream);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}

.rail__brand {
  padding: 4px 6px 22px;
  border-bottom: 1px solid rgba(245, 239, 230, .12);
}

.rail__section {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, .4);
  margin: 22px 6px 10px;
}

.rail__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  cursor: pointer;
  color: rgba(245, 239, 230, .78);
  font-size: 13px;
  text-decoration: none;
}
.rail__item:hover { background: rgba(245, 239, 230, .06); color: var(--cream); }
.rail__item.is-active { background: rgba(245, 239, 230, .1); color: var(--cream); font-weight: 500; }
.rail__item .ic { width: 14px; opacity: .8; }
.rail__item .label { flex: 1; }
.rail__badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* Logo */
.logo { display: flex; align-items: baseline; font-family: var(--serif); font-weight: 400; }
.logo .m, .logo .h { font-style: italic; }
.logo .dot { opacity: .5; margin: 0 1px; }
.logo .word {
  margin-left: 8px;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-style: normal;
  font-family: var(--sans);
  font-weight: 500;
}

.main { min-width: 0; }

.topbar {
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
  background: #fbf9f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.topbar__eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.topbar__title { font-family: var(--serif); font-weight: 300; font-size: 32px; margin: 6px 0 0; letter-spacing: -.01em; }
.topbar__actions { display: flex; gap: 10px; align-items: center; }

.btn {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
}
.btn--primary { background: var(--ink); color: var(--cream); border: none; font-weight: 600; letter-spacing: .06em; }
.btn--accent { background: var(--accent); color: #fff; border: none; font-weight: 600; letter-spacing: .06em; }
.search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.search input { border: none; outline: none; background: transparent; font-size: 13px; font-family: inherit; width: 200px; }

/* ---- KPI strip --------------------------------------------------------- */

.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 20px 32px 0; }
.kpi { background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 14px 16px; }
.kpi__label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kpi__value { font-family: var(--serif); font-size: 28px; line-height: 1.1; margin-top: 6px; }
.kpi__delta { font-size: 11px; margin-top: 4px; color: var(--muted); }
.kpi__delta.is-warn { color: var(--accent); }
.kpi__delta.is-good { color: #5a8060; }

/* ---- Kanban ------------------------------------------------------------ */

.board-wrap { padding: 24px 32px 48px; overflow-x: auto; }
.board { display: grid; grid-template-columns: repeat(5, minmax(260px, 1fr)); gap: 14px; min-width: 1300px; }

.col { background: #f0ebe1; border-radius: 10px; padding: 12px; min-height: 600px; }
.col__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; border-bottom: 1px dashed var(--line); }
.col__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.col__title { font-size: 13px; font-weight: 600; }
.col__title .count { color: var(--muted); font-weight: 400; margin-left: 4px; }
.col__hint { font-size: 10px; color: var(--muted); margin-top: 2px; }
.col__body { padding-top: 12px; min-height: 40px; }
.col__empty { font-size: 11px; color: var(--muted); text-align: center; padding: 24px 0; font-style: italic; }

/* ---- Lead card --------------------------------------------------------- */

.card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: grab;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
  position: relative;
}
.card:active { cursor: grabbing; }
.card.sortable-ghost { opacity: .4; }
.card.sortable-drag { box-shadow: 0 12px 28px rgba(26, 23, 20, .22); }

.card__hot {
  position: absolute; top: -6px; right: 10px;
  background: var(--accent); color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; letter-spacing: .1em; text-transform: uppercase;
}
.card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card__who { display: flex; align-items: center; gap: 8px; }
.avatar { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 11px; font-family: var(--serif); }
.card__name { font-size: 13px; font-weight: 600; }
.card__days { font-size: 10px; color: var(--muted); }
.card__date { font-size: 11px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.card__date .d { font-family: var(--serif); color: var(--ink-2); font-size: 13px; }
.card__venue { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.pill { font-size: 10px; padding: 3px 7px; background: var(--cream); border-radius: 999px; color: var(--ink-2); }
.card__msg { font-size: 11.5px; color: var(--ink-2); font-style: italic; border-left: 2px solid var(--line); padding-left: 8px; line-height: 1.45; margin-bottom: 8px; }
.card__followup { font-size: 10.5px; color: var(--accent); font-weight: 600; margin-bottom: 8px; letter-spacing: .04em; }
.card__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 8px; }
.card__total { font-family: var(--serif); font-size: 16px; }
.card__deposit { font-size: 10px; padding: 3px 7px; background: #fff3e0; color: var(--accent); border-radius: 4px; font-weight: 600; }

/* ====================================================================
   Toasts, rail extras, shared chrome
   ==================================================================== */
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200;
  padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 500;
  box-shadow: 0 12px 32px rgba(26,23,20,.22); transition: opacity .4s, transform .4s; }
.toast--notice { background: #2a241f; color: var(--cream); }
.toast--alert { background: var(--accent); color: #fff; }
.toast.is-leaving { opacity: 0; transform: translateX(-50%) translateY(-12px); }

.rail__item.is-disabled { opacity: .4; cursor: default; }
.rail__user { position: absolute; bottom: 20px; left: 18px; right: 18px; display: flex; align-items: center;
  gap: 10px; padding: 10px; background: rgba(245,239,230,.06); border-radius: 8px; }
.rail__avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg,#c98a5b,#b8593a); color:#fff; font-family: var(--serif); font-size: 13px; }
.rail__user-meta { flex: 1; min-width: 0; }
.rail__user-name { font-size: 13px; font-weight: 500; }
.rail__user-sub { font-size: 11px; color: rgba(245,239,230,.5); }
.rail__signout-form { margin: 0; }
.rail__signout { background: transparent; border: none; color: rgba(245,239,230,.6); cursor: pointer; font-size: 16px; }
.muted-link, .slug-chip { font-size: 12px; color: var(--muted); }
.slug-chip { font-family: ui-monospace, monospace; background: var(--cream); padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line-2); }

.card__actions { margin-top: 10px; }
.card__promote button, .card__promote { width: 100%; }
.card__promote { padding: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; cursor: pointer; font-family: inherit; }
.card__open { display: block; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 11px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.card__promote form { margin: 0; }

/* ====================================================================
   Sign-in
   ==================================================================== */
.signin { min-height: 100vh; display: grid; place-items: center; background: var(--cream); padding: 24px; }
.signin__card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 44px 40px;
  width: 380px; text-align: center; box-shadow: 0 18px 50px rgba(26,23,20,.08); }
.signin__card .logo { margin-bottom: 24px; }
.signin__title { font-family: var(--serif); font-weight: 300; font-size: 30px; margin: 0; }
.signin__sub { font-size: 14px; color: var(--muted); margin: 8px 0 28px; line-height: 1.5; }
.signin__google, .signin__dev { width: 100%; padding: 13px; border-radius: 8px; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; }
.signin__google { background: var(--ink); color: var(--cream); border: none; }
.signin__google .g { background: #fff; color: var(--ink); width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-size: 13px; }
.signin form { margin: 10px 0 0; }
.signin__dev { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.signin__foot { font-size: 11px; color: var(--muted); margin: 22px 0 0; line-height: 1.5; }

/* ====================================================================
   Public site
   ==================================================================== */
.pub { background: var(--paper); color: var(--ink); }
.pub-eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.pub-h2 { font-family: var(--serif); font-weight: 300; font-size: 52px; letter-spacing: -.01em; margin: 12px 0 0; line-height: 1.05; }
.pub-h2 em, .pub-hero__h em { font-style: italic; color: var(--accent); font-weight: 300; }
.pub-link { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.pub-link.sm { letter-spacing: .14em; margin-top: auto; align-self: flex-start; }
.pub-btn-dark { display: inline-block; padding: 16px 28px; background: var(--ink); color: var(--paper);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; text-decoration: none; }
.pub-img { width: 100%; object-fit: cover; display: block; }
.r4x5 { aspect-ratio: 4/5; } .r5x4 { aspect-ratio: 5/4; }
/* Graceful fallback when a curated/by-name product has no image (never 500 the home page) */
.pub-img--ph { background: #ece5d6; }
.pub-tile__ph { width: 100%; aspect-ratio: 4/5; }

.pub-nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 56px; border-bottom: 1px solid var(--line); }
.pub-nav .logo { text-decoration: none; color: var(--ink); }
.pub-nav__links { display: flex; gap: 36px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.pub-nav__links a { color: var(--ink); text-decoration: none; }
.pub-nav__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; padding: 10px 18px; background: var(--accent); color: #fff; text-decoration: none; }
.pub-nav__cta .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }

.pub-hero { padding: 72px 56px 56px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: end; }
.pub-hero__h { font-family: var(--serif); font-weight: 300; font-size: 96px; line-height: .95; margin: 32px 0 0; letter-spacing: -.02em; }
.pub-hero__p { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 480px; margin: 36px 0 24px; }
.pub-paths-mini { display: flex; gap: 8px; margin-bottom: 36px; flex-wrap: wrap; }
.pub-path-pill { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; display: flex; align-items: baseline; gap: 8px; }
.pub-path-pill .t { font-family: var(--serif); font-style: italic; font-size: 15px; }
.pub-path-pill .s { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.pub-hero__cta { display: flex; gap: 14px; align-items: center; }
.pub-hero__photo { position: relative; }
.pub-quote { position: absolute; left: -32px; bottom: 32px; background: var(--paper); padding: 18px 22px;
  font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink-2); max-width: 240px; border-left: 2px solid var(--accent); }
.pub-quote__by { margin-top: 8px; font-family: var(--sans); font-style: normal; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.pub-marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; overflow: hidden; white-space: nowrap; }
.pub-marquee__row { display: flex; gap: 48px; padding-left: 56px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-2); }
.pub-marquee__row span { display: flex; align-items: center; gap: 48px; }
.pub-marquee__row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.pub-section { padding: 80px 56px; }
.pub-rule { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; margin-bottom: 36px; }
.pub-rule span { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.pub-rule i { height: 1px; background: var(--line); display: block; }
.pub-section__head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 36px; }

.pub-paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pub-path { background: #fff; border: 1px solid var(--line); padding: 28px 28px 24px; display: flex; flex-direction: column; position: relative; }
.pub-path.is-feature { background: var(--cream); }
.pub-path__tag { position: absolute; top: -1px; right: 18px; padding: 4px 10px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.pub-path__num { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.pub-path__h { font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1.05; margin: 12px 0 14px; letter-spacing: -.02em; }
.pub-path__h em { font-style: italic; color: var(--accent); }
.pub-path__blurb { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; }
.pub-path__list { list-style: none; padding: 0; margin: 0 0 22px; border-top: 1px solid var(--line-2); }
.pub-path__list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.pub-path__list span { color: var(--accent); font-family: var(--serif); font-style: italic; }

.pub-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.pub-tile { margin: 0; }
.pub-tile__img { position: relative; background: #1a1714; overflow: hidden; }
.pub-tile__img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.span-4 .pub-tile__img img { aspect-ratio: 1/1; } .span-3 .pub-tile__img img { aspect-ratio: 3/4; }
.pub-tile__badge { position: absolute; right: 14px; top: 12px; padding: 4px 8px; background: rgba(255,255,255,.92); color: #1a1714; border-radius: 999px; font-size: 9px; font-weight: 600; }
.pub-tile figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.pub-tile figcaption .t { font-family: var(--serif); font-size: 17px; }
.pub-tile figcaption .s { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---- Public Collection (catalog) page ------------------------------- */
.pub-catalog { padding: 36px 56px 88px; }
/* A clean, even card grid (the home teaser uses bespoke spans; this is uniform). */
.pub-grid--catalog { grid-template-columns: repeat(3, 1fr); }
.pub-grid--catalog .pub-tile { grid-column: auto; }
a.pub-tile { text-decoration: none; color: var(--ink); display: block; }
a.pub-tile:hover .pub-tile__img img { transform: scale(1.03); }
.pub-tile__img img { transition: transform .4s ease; }
.pub-tile__noimg { position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--cream); font-family: var(--serif); font-style: italic; font-size: 14px; aspect-ratio: 1/1; }
a.pub-tile:hover figcaption .s { color: var(--accent); }

/* Category filter chips */
.pub-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.pub-chip { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2);
  text-decoration: none; transition: all .2s ease; }
.pub-chip:hover { border-color: var(--ink); color: var(--ink); }
.pub-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* Empty state — a brand-new shop has no published pieces yet */
.pub-empty { text-align: center; padding: 64px 24px 88px; }
.pub-empty__mark { font-family: var(--serif); font-size: 40px; color: var(--accent); margin-bottom: 20px; }
.pub-empty__mark .dot { color: var(--ink-2); }
.pub-empty__h { font-family: var(--serif); font-weight: 300; font-size: 32px; margin: 0 0 12px; }
.pub-empty__p { font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 440px; margin: 0 auto; }
.pub-empty__p a { color: var(--accent); }

.pub-process { background: var(--cream); }
.pub-process__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; margin-top: 36px; }
.pub-process__num { font-family: var(--serif); font-style: italic; font-size: 42px; color: var(--accent); line-height: 1; }
.pub-process__t { font-family: var(--serif); font-size: 22px; margin-top: 14px; line-height: 1.2; }
.pub-process__d { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.55; }

.pub-makers { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.pub-makers__p { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 480px; margin-top: 16px; }

.pub-inquire { background: var(--ink); padding: 80px 56px; }
.pub-footer { background: var(--ink); color: var(--cream); padding: 56px; }
.pub-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; align-items: start; }
.pub-footer p { font-size: 13px; color: rgba(245,239,230,.7); margin-top: 18px; max-width: 320px; line-height: 1.6; }
.pub-footer__h { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }
.pub-footer__i { display: block; font-size: 13px; margin-bottom: 8px; color: rgba(245,239,230,.85); text-decoration: none; transition: color .15s; }
a.pub-footer__i:hover { color: var(--cream); }
.pub-footer__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(245,239,230,.12); font-size: 12px; color: rgba(245,239,230,.5); }
.pub-footer__signin { color: var(--accent-2); }

/* ---- Static doc pages (about / contact / faq / policies) --------------- */
.pub-doc__head { padding: 72px 56px 36px; border-bottom: 1px solid var(--line); }
.pub-doc__title { font-family: var(--serif); font-weight: 300; font-size: 64px; line-height: 1.02; letter-spacing: -.02em; margin: 14px 0 0; }
.pub-doc__title em { font-style: italic; color: var(--accent); }
.pub-doc__lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 640px; margin: 22px 0 0; }
.pub-doc { padding: 48px 56px 88px; }
.pub-doc__body { max-width: 720px; }
.pub-doc__body p, .pub-doc__list li, .pub-steps li { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.pub-doc__body p { margin: 0 0 18px; }
.pub-doc__body h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -.01em; margin: 38px 0 14px; }
.pub-doc__list, .pub-steps { margin: 0 0 18px; padding-left: 0; list-style: none; }
.pub-doc__list li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.pub-doc__list li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.pub-steps { counter-reset: step; }
.pub-steps li { position: relative; padding-left: 40px; margin-bottom: 14px; counter-increment: step; }
.pub-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px;
  border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--accent); font-weight: 600; }
.pub-legal h2 { font-size: 22px; margin-top: 30px; }
.pub-legal p { font-size: 15px; color: var(--muted); }
.pub-doc__cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 36px; }

/* Contact cards */
.pub-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 720px; }
.pub-contact__card { display: block; padding: 26px 28px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.pub-contact__card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pub-contact__k { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.pub-contact__v { font-family: var(--serif); font-size: 20px; margin: 8px 0 6px; word-break: break-word; }
.pub-contact__s { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* FAQ accordion */
.pub-faq { max-width: 720px; border-top: 1px solid var(--line); }
.pub-faq__item { border-bottom: 1px solid var(--line); }
.pub-faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; font-family: var(--serif); font-size: 20px; color: var(--ink); }
.pub-faq__item summary::-webkit-details-marker { display: none; }
.pub-faq__mark { position: relative; width: 14px; height: 14px; flex: none; }
.pub-faq__mark::before, .pub-faq__mark::after { content: ""; position: absolute; background: var(--accent); transition: transform .2s; }
.pub-faq__mark::before { top: 6px; left: 0; width: 14px; height: 2px; }
.pub-faq__mark::after { top: 0; left: 6px; width: 2px; height: 14px; }
.pub-faq__item[open] .pub-faq__mark::after { transform: scaleY(0); }
.pub-faq__item p { margin: 0; padding: 0 0 24px; font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 620px; }

/* Inquiry form */
.inq { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; max-width: 1000px; margin: 0 auto; color: var(--cream); }
.inq__intro .pub-eyebrow { color: var(--accent-2); }
.inq__intro .pub-h2 { color: var(--cream); }
.inq__intro p { font-size: 15px; line-height: 1.6; color: rgba(245,239,230,.75); margin: 18px 0; }
.inq__facts { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; font-size: 13px; color: rgba(245,239,230,.85); }
.inq__facts strong { color: var(--cream); }
.inq__form { background: var(--paper); border-radius: 12px; padding: 28px; }
/* Honeypot: off-screen (not display:none — some bots skip hidden fields) so a
   real, sighted user never sees it but a form-filling bot trips it. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.inq__label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.inq__kinds { display: flex; gap: 6px; margin-bottom: 14px; }
.inq__kind { flex: 1; }
.inq__kind input { position: absolute; opacity: 0; }
.inq__kind span { display: block; text-align: center; padding: 8px 4px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--ink); }
.inq__kind input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); font-weight: 600; }
.inq__input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; font-family: inherit; color: var(--ink); margin-bottom: 10px; box-sizing: border-box; }
.inq__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inq__submit { width: 100%; padding: 14px; border: none; background: var(--accent); color: #fff; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; cursor: pointer; font-family: inherit; border-radius: 6px; margin-top: 4px; }
.inq__note { font-size: 11px; color: var(--muted); text-align: center; margin: 12px 0 0; }

/* Ask widget */
.ask-widget { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--ink); color: var(--cream); text-decoration: none;
  box-shadow: 0 8px 24px rgba(26,23,20,.25); }
.ask-widget__avatars { display: flex; }
.ask-widget__avatars .a { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--cream);
  background: linear-gradient(135deg,#c98a5b,#b8593a); }
.ask-widget__avatars .a2 { margin-left: -10px; background: linear-gradient(135deg,#7a8a72,#5a6b54); }
.ask-widget__text .t { display: block; font-size: 13px; font-weight: 600; }
.ask-widget__text .s { display: block; font-size: 11px; color: rgba(245,239,230,.65); }

/* ====================================================================
   Project workspace
   ==================================================================== */
.proj-hero-wrap { padding: 18px 32px 0; }
.proj-hero { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 18px 22px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 24px; align-items: center; }
.proj-hero__status { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.proj-hero__status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.proj-hero__event { font-family: var(--serif); font-size: 22px; margin-top: 6px; }
.proj-hero__sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.proj-stat .l { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: block; }
.proj-stat .v { font-family: var(--serif); font-size: 18px; display: block; margin-top: 4px; }
.proj-stat .s { font-size: 10.5px; color: var(--muted); display: block; margin-top: 3px; }
.proj-flags { display: flex; flex-direction: column; gap: 6px; }
.flag-toggle { padding: 6px 10px; border-radius: 999px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-family: inherit; }
.flag-toggle.is-on { background: #eaf1e6; color: #5a8060; border-color: #cfe0c8; }
.proj-flags form { margin: 0; }

/* Lifecycle stage picker — a compact dropdown in the project header. */
.stage-form { margin: 0; }
.stage-select { padding: 7px 30px 7px 12px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink);
  color: var(--cream); font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23f4ece0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.stage-select:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }

.proj-tabs { padding: 20px 32px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 24px; align-items: center; }
.proj-tab { padding: 10px 2px 14px; font-size: 13px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.proj-tab.is-on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.proj-tab .c { font-size: 11px; color: var(--muted); }
.proj-tabs__meta { margin-left: auto; font-size: 11px; color: var(--muted); }
.proj-body { padding: 20px 32px 48px; }
.proj-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.proj-col { display: flex; flex-direction: column; gap: 24px; }

.panel { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.panel__eyebrow { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.panel__h { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0; }
.panel__quote { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); font-style: italic; padding: 4px 0 14px; }
.panel__empty { font-size: 12px; color: var(--muted); font-style: italic; padding: 10px 0; }
.panel__hint { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }

.kv > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.kv dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.kv dd { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.5; }

.timeline { position: relative; padding-left: 8px; }
.timeline__row { display: grid; grid-template-columns: 14px 56px 1fr; gap: 8px; align-items: baseline; padding: 7px 0; position: relative; }
.timeline__dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; }
.timeline__row.is-done .timeline__dot { background: var(--ink); border: none; }
.timeline__row.is-now .timeline__dot { background: var(--accent); border: none; }
.timeline__row.is-soon .timeline__dot { border: 2px solid var(--accent); }
.timeline__date { font-size: 10.5px; color: var(--muted); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.timeline__title { font-size: 13.5px; color: var(--ink); }
.timeline__row.is-done .timeline__title { color: var(--muted); text-decoration: line-through; }
.timeline__flag { font-size: 9px; padding: 2px 6px; background: #fff3e0; color: var(--accent); border-radius: 3px; font-weight: 700; text-transform: uppercase; }
.timeline__now { font-size: 9px; padding: 2px 6px; background: var(--accent); color: #fff; border-radius: 3px; font-weight: 700; text-transform: uppercase; }
.timeline__sub { grid-column: 3; font-size: 11.5px; color: var(--muted); }

.log-form { display: flex; gap: 8px; margin-bottom: 12px; }
.log-form__input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-family: inherit; }
.log-form__btn { padding: 9px 14px; border: 1px solid var(--line); background: var(--ink); color: var(--cream); border-radius: 6px; font-size: 12px; cursor: pointer; font-family: inherit; }
.log-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.log-row__when { font-size: 11px; color: var(--muted); }
.log-row__body { font-size: 13px; line-height: 1.55; color: var(--ink-2); }

.asset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.asset-grid.sm { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lib__grid-wrap .asset-grid { grid-template-columns: repeat(5, 1fr); }
.asset { border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.asset__img { position: relative; aspect-ratio: 1/1; background: #1a1714; }
.asset__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset__filechip { width: 100%; height: 100%; display: grid; place-items: center; color: var(--cream); background: #2a241f; font-size: 11px; padding: 8px; text-align: center; }
.asset__star { position: absolute; top: 6px; right: 8px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.asset__type { position: absolute; top: 8px; left: 8px; font-size: 9px; padding: 3px 7px; border-radius: 3px; color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.asset__share { position: absolute; bottom: 40px; left: 8px; font-size: 9px; padding: 2px 6px; border-radius: 3px; background: rgba(255,255,255,.9); color: var(--ink); font-weight: 600; }
.asset__foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 8px; background: linear-gradient(to top, rgba(0,0,0,.78), transparent); color: #fff; }
.asset__proj { font-size: 11px; font-weight: 600; }
.asset__edit { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; align-items: center; }
.asset__sel { font-size: 11px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 5px; font-family: inherit; }
.asset__check { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.asset__save { font-size: 11px; padding: 5px 10px; background: var(--ink); color: var(--cream); border: none; border-radius: 5px; cursor: pointer; font-family: inherit; }
.asset__del { width: 100%; padding: 6px; background: transparent; border: none; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 11px; cursor: pointer; font-family: inherit; }
.asset__del form, .asset .asset__del { margin: 0; }

.upload-form { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--cream); border-radius: 10px; }
.upload-form__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upload-form__sel { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-family: inherit; background: #fff; }
.upload-form__check { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.upload-form__btn { padding: 8px 16px; background: var(--ink); color: var(--cream); border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* ---- Branded upload zone (Files tab) ---------------------------------- */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 26px 20px; border: 1.5px dashed var(--line);
  border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover { border-color: var(--accent-2); background: var(--paper); }
.dropzone.is-over { border-color: var(--accent); background: #fbf1ea; }
.dropzone.is-filled { border-style: solid; border-color: #cfe0c8; background: #f3f7f0; }
.dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__icon { color: var(--muted); line-height: 0; }
.dropzone.is-over .dropzone__icon { color: var(--accent); }
.dropzone__prompt { display: flex; flex-direction: column; gap: 3px; }
.dropzone__title { font-size: 14px; font-weight: 600; color: var(--ink); }
.dropzone__hint { font-size: 11.5px; color: var(--muted); }
.dropzone__status { font-size: 13px; font-weight: 600; color: #5a8060; padding: 2px 0; }
.dropzone__mob { display: none; }
@media (max-width: 768px) {
  .dropzone { padding: 22px 16px; }
  .dropzone__desk { display: none; }
  .dropzone__mob { display: inline; }
  .upload-form__btn { flex: 1; padding: 11px 16px; }
}

.msg-form { display: flex; flex-direction: column; gap: 10px; }
.msg-form__input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-family: inherit; width: 100%; box-sizing: border-box; }
.msg-form__btn { align-self: flex-start; padding: 11px 18px; background: var(--accent); color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; cursor: pointer; font-family: inherit; }

/* Photo picker in the client-update composer — tick photos to embed in the email. */
.photo-pick__label { font-size: 12px; color: var(--ink-soft, #6b6157); margin-bottom: 6px; }
.photo-pick__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-pick__item { position: relative; display: block; cursor: pointer; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.photo-pick__thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .12s; }
.photo-pick__check { position: absolute; top: 6px; left: 6px; z-index: 2; width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.photo-pick__item:has(.photo-pick__check:checked) { outline: 2px solid var(--accent); outline-offset: -2px; }
.photo-pick__item:has(.photo-pick__check:not(:checked)) .photo-pick__thumb { opacity: .65; }
@media (max-width: 520px) { .photo-pick__grid { grid-template-columns: repeat(3, 1fr); } }
.sent-row { padding: 10px 0; border-top: 1px solid var(--line-2); }
.sent-row__subj { font-size: 13px; font-weight: 500; }
.sent-row__meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Projects index */
.proj-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px 32px 48px; }
.proj-card { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 18px; text-decoration: none; color: var(--ink); display: block; }
.proj-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.proj-card__status { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--cream); color: var(--accent); }
.proj-card__days { font-size: 11px; color: var(--muted); }
.proj-card__name { font-family: var(--serif); font-size: 22px; }
.proj-card__meta { font-size: 12px; color: var(--muted); margin: 4px 0 12px; }
.proj-card__foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.proj-card__total { font-family: var(--serif); font-size: 17px; }
.proj-card__flag { font-size: 10px; padding: 3px 8px; background: #eaf1e6; color: #5a8060; border-radius: 4px; }
.proj-card__slug { margin-left: auto; font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); }

/* Library */
.lib { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 90px); }
.lib__rail { padding: 20px 18px; border-right: 1px solid var(--line-2); background: #fbf9f3; }
.lib__section { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 18px 6px 8px; }
.lib__item { display: block; padding: 7px 8px; border-radius: 5px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.lib__item.sm { font-size: 12px; }
.lib__item.is-on { background: var(--ink); color: var(--cream); font-weight: 600; }
.lib__grid-wrap { padding: 20px 28px 60px; }

/* Unified lifecycle stepper wraps (8 stages now); build stages flagged subtly. */
.stage-stepper { row-gap: 8px; }
.stage-pill.is-build:not(.is-on) { border-style: dashed; }

/* ====================================================================
   Phone upload, QR panel, quick-add, tappable milestones
   ==================================================================== */

/* Tappable milestone rows (button reset, keep the grid) */
.timeline__form { margin: 0; }
button.timeline__row {
  width: 100%; background: none; border: none; font-family: inherit; text-align: left;
  cursor: pointer; border-radius: 6px;
}
button.timeline__row:hover { background: var(--cream); }
button.timeline__row .timeline__title { transition: color .1s; }

/* Files-tab top: upload form + scan panel side by side */
.files-top { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: stretch; }
.phone-panel { display: flex; gap: 14px; align-items: center; background: var(--ink); color: var(--cream);
  border-radius: 8px; padding: 14px 16px; max-width: 360px; }
.phone-panel .qr { background: #fff; border-radius: 6px; padding: 6px; flex: none; }
.phone-panel .qr svg { display: block; width: 100%; height: 100%; }
.phone-panel__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.phone-panel__txt strong { font-size: 13px; }
.phone-panel__txt span { font-size: 11.5px; color: rgba(245,239,230,.7); line-height: 1.4; }
.phone-panel__txt code { font-size: 10px; color: var(--accent-2); word-break: break-all; }
@media (max-width: 1100px) { .files-top { grid-template-columns: 1fr; } .phone-panel { max-width: none; } }

/* ---- Mobile photo upload page ---- */
.mobile-body { background: var(--cream); }
.mup { max-width: 520px; margin: 0 auto; padding: 18px 16px 40px; min-height: 100vh; }
.mup__head { display: flex; align-items: center; gap: 12px; padding: 8px 4px 18px; border-bottom: 1px solid var(--line); }
.mup__proj { min-width: 0; }
.mup__name { font-family: var(--serif); font-size: 20px; line-height: 1.1; }
.mup__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mup__form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.mup__big { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 96px; border-radius: 14px; font-size: 18px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.mup__big--camera { background: var(--ink); color: var(--cream); }
.mup__big--library { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.mup__file { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.mup__opts { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px;
  font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.mup__opts select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font-family: inherit; font-size: 14px; }
.mup__share { display: flex; align-items: center; gap: 6px; }
.mup__hint { font-size: 12px; color: var(--muted); text-align: center; margin: 6px 0 0; }
.mup__recent { margin-top: 28px; }
.mup__recent-h { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.mup__recent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mup__thumb { aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; background: #e8ddc8; }
.mup__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mup__back { display: inline-block; margin-top: 28px; font-size: 14px; color: var(--ink-2); text-decoration: none; }

/* ---- Quick-add inquiry form ---- */
.quickadd { max-width: 760px; padding: 24px 32px 48px; }
.quickadd__lead { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.quickadd__form { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 24px; }
.quickadd__row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.quickadd__row label, .quickadd__full { display: flex; flex-direction: column; gap: 5px; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); flex: 1; min-width: 120px; }
.quickadd__full { margin-bottom: 16px; }
.quickadd input, .quickadd select, .quickadd textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; font-family: inherit; font-size: 14px;
  color: var(--ink); background: #fff; text-transform: none; letter-spacing: normal; }
.quickadd__products { border: none; padding: 0; margin: 0 0 18px; }
.quickadd__products legend { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
.quickadd__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quickadd__chip input { position: absolute; opacity: 0; }
.quickadd__chip span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; cursor: pointer; color: var(--ink-2); background: #fff; }
.quickadd__chip input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.quickadd__actions { display: flex; align-items: center; gap: 16px; }

/* ---- Products catalog (admin curation) ---- */
.prod-wrap { padding: 24px 32px 48px; }
.prod-lead { font-size: 14px; color: var(--muted); margin: 0 0 22px; max-width: 720px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.prod-card { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.prod-card__img { position: relative; aspect-ratio: 4/3; background: #e8ddc8; }
.prod-card__img img { width: 100%; height: 100%; object-fit: cover; }
.prod-card__noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.prod-card__cat { position: absolute; top: 10px; left: 10px; font-size: 9px; padding: 4px 9px; border-radius: 999px;
  background: rgba(26, 23, 20, .82); color: var(--cream); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.prod-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.prod-card__name { margin: 0; font-size: 16px; color: var(--ink); }
.prod-card__blurb { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.prod-card__act { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.btn--sm { padding: 6px 12px; font-size: 12px; }
/* Public-visibility toggle in the product form. */
.prod-form__pub { display: flex; gap: 10px; align-items: flex-start; background: #fbf9f3; border: 1px solid var(--line-2);
  border-radius: 10px; padding: 12px 14px; margin: 2px 0 4px; cursor: pointer; }
.prod-form__pub input { margin-top: 3px; flex: 0 0 auto; }
.prod-form__pub strong { display: block; font-size: 13.5px; color: var(--ink); }
.prod-form__pub .hint { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

/* Visibility badge on catalog cards + archived dimming. */
.prod-card__vis { position: absolute; top: 10px; right: 10px; font-size: 9px; padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.prod-card__vis.is-public { background: #eef3ee; color: #5a8060; }
.prod-card__vis.is-hidden { background: rgba(26, 23, 20, .72); color: var(--cream); }
.prod-card.is-archived { opacity: .72; }
.prod-card.is-archived .prod-card__img { filter: grayscale(.4); }

/* Admin preview ribbon on a not-yet-public detail page. */
.pdetail__preview { background: #fbf1ea; border-bottom: 1px solid var(--line); color: var(--ink-2);
  font-size: 12.5px; padding: 9px 20px; text-align: center; }
.pdetail__preview a { color: var(--accent); font-weight: 600; }

/* Current-photos strip in the product form — each thumb has a delete chip. */
.prod-form__photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 6px; }
.prod-form__photo { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.prod-form__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-form__photodel { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: none; cursor: pointer;
  border-radius: 999px; background: rgba(26, 23, 20, .8); color: #fff; font-size: 12px; line-height: 22px; }
.prod-form__photodel form, .prod-form__photodel { display: inline; }

/* Internal documents — admin-only working files on a product. */
.prod-docs { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 18px 20px; margin-top: 22px; max-width: 680px; }
.prod-docs__h2 { font-size: 15px; margin: 0 0 4px; color: var(--ink); }
.prod-docs__hint { font-size: 12px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.prod-docs__hint strong { color: var(--accent); }
.prod-docs__meta { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.prod-docs__list { list-style: none; padding: 0; margin: 16px 0 0; }
.prod-docs__row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.prod-docs__badge { font-size: 9px; padding: 3px 7px; border-radius: 4px; background: var(--cream); color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 700; white-space: nowrap; }
.prod-docs__name { font-size: 13px; color: var(--ink); flex: 1; word-break: break-all; }
.prod-docs__del { margin-left: auto; background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; font-size: 11px; color: var(--muted); cursor: pointer; font-family: inherit; }
.prod-docs__empty { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* ---- Public product detail page (mobile layout) ---- */
.pdetail { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.pdetail__head { padding: 16px 20px; }
.pdetail__noimg { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; background: #e8ddc8;
  color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.pdetail__body { padding: 22px 24px 8px; }
.pdetail__cat { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; margin-bottom: 8px; }
.pdetail__name { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--ink); margin: 0 0 14px; }
.pdetail__blurb { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.pdetail__cta { display: inline-block; margin-top: 18px; font-weight: 600; color: var(--accent); text-decoration: none; font-size: 14px; }
.pdetail__foot { margin-top: auto; padding: 28px 24px; font-size: 11px; color: var(--muted); text-align: center; letter-spacing: .04em; }

/* Carousel — CSS scroll-snap with JS-enhanced arrows + dots. */
.pcarousel { position: relative; }
.pcarousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; }
.pcarousel__track::-webkit-scrollbar { display: none; }
.pcarousel__slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4/3; background: #e8ddc8; }
.pcarousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcarousel__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: none; cursor: pointer;
  border-radius: 999px; background: rgba(26, 23, 20, .55); color: #fff; font-size: 22px; line-height: 1; display: flex;
  align-items: center; justify-content: center; }
.pcarousel__arrow--prev { left: 10px; }
.pcarousel__arrow--next { right: 10px; }
.pcarousel__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 7px; }
.pcarousel__dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .55); box-shadow: 0 0 3px rgba(0, 0, 0, .35); transition: background .2s; }
.pcarousel__dot.is-active { background: #fff; }

/* Client portal — the project's catalog pieces, linking to public detail pages. */
.portal__pieces { display: flex; flex-direction: column; gap: 8px; }
.portal__piece { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none;
  color: var(--ink); background: #fff; border: 1px solid var(--line-2); }
.portal__piecethumb { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 8px; overflow: hidden; background: #e8ddc8; }
.portal__piecethumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portal__piecename { font-family: var(--serif); font-size: 16px; }

/* ---- Order type + schedule / logistics ---- */
.order-badge { font-size: 9px; padding: 3px 8px; border-radius: 999px; background: var(--cream); color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-left: 10px; }
.order-badge.is-rental { background: #eef3ee; color: #5a8060; }

.sched { display: flex; gap: 8px; margin-bottom: 12px; }
.sched__step { flex: 1; background: var(--cream); border-radius: 8px; padding: 10px 12px; text-align: center; }
.sched__label { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sched__date { font-family: var(--serif); font-size: 15px; margin-top: 4px; }
.sched__date.is-empty { color: var(--muted); }
.sched__note { font-size: 12.5px; color: var(--ink-2); background: #fff7ef; border: 1px solid #f0e2d2;
  border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; }

.sched-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 12px; }
.sched-facts__item { display: flex; flex-direction: column; gap: 2px; }
.sched-facts dt { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sched-facts dd { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.sched-facts dd a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.sched-facts dd a:hover { border-bottom-color: var(--ink); }

.sched-edit { border-top: 1px solid var(--line-2); }
.sched-edit > summary { list-style: none; cursor: pointer; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding: 12px 0 2px; display: inline-flex; align-items: center; gap: 6px; }
.sched-edit > summary::-webkit-details-marker { display: none; }
.sched-edit > summary::before { content: "✎"; font-size: 12px; }
.sched-edit[open] > summary { color: var(--ink-2); margin-bottom: 4px; }
.sched-edit .sched-form { border-top: 0; padding-top: 4px; }

.sched-form { border-top: 1px solid var(--line-2); padding-top: 14px; }
.sched-form__row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sched-form__row label, .sched-form__note { display: flex; flex-direction: column; gap: 4px; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sched-form__row label { flex: 1; min-width: 110px; }
.sched-form__row label.is-muted { opacity: .5; }
.sched-form .hint { text-transform: none; letter-spacing: normal; color: var(--muted); }
.sched-form input, .sched-form select, .sched-form textarea { padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 6px; font-family: inherit; font-size: 13px; text-transform: none; letter-spacing: normal;
  color: var(--ink); background: #fff; }
.sched-form__note { margin-bottom: 12px; }

/* Delivery / pickup segmented toggle inside the schedule form. */
.seg { flex: 1; min-width: 110px; border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.seg legend { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0; }
.seg__opts { display: flex; width: 100%; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
/* Beat `.sched-form__row label` (which would pin each option to min-width 110px
   and overflow the toggle) — these labels must shrink to share the row. */
.seg .seg__opt { flex: 1; min-width: 0; margin: 0; }
.seg__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg__opt span { display: block; text-align: center; padding: 8px 10px; font-size: 12px; cursor: pointer;
  background: #fff; color: var(--ink-2); text-transform: none; letter-spacing: normal; }
.seg__opt + .seg__opt span { border-left: 1px solid var(--line); }
.seg__opt input:checked + span { background: var(--ink); color: var(--cream); }
.seg__opt input:focus-visible + span { outline: 2px solid var(--ink-2); outline-offset: -2px; }
/* `label { display: flex }` outranks the UA [hidden] rule, so the toggle's
   inactive date field stays visible — force it hidden with matching specificity. */
.sched-form [hidden] { display: none; }

/* ---- Expiry / stale / lost ---- */
.card__stale { font-size: 10.5px; color: #9a6a2a; background: #fdf3e3; border: 1px solid #f0dcbf;
  border-radius: 4px; padding: 4px 7px; margin-bottom: 8px; font-weight: 600; }
.card__actions { display: flex; gap: 6px; align-items: center; }
.card__open { flex: 1; }
.card__expire { padding: 8px 10px; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 6px; font-size: 11px; cursor: pointer; font-family: inherit; }
.card__expire:hover { color: var(--accent); border-color: var(--accent); }
.card__expire form, .card__actions form { margin: 0; }

.lost-banner { margin: 16px 32px 0; padding: 12px 18px; background: #2a241f; color: var(--cream);
  border-radius: 8px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.lost-banner__btn { margin-left: auto; padding: 6px 12px; background: var(--accent); color: #fff; border: none;
  border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.lost-banner form { margin: 0; }
/* Junk is a quieter, greyer dead-end than a real lost lead. */
.lost-banner--junk { background: #3a3733; color: #cfc9c1; }

.lost { padding: 24px 32px 48px; }
.lost__lead { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.lost__row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 20px; align-items: center;
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; }
.lost__name { font-family: var(--serif); font-size: 19px; }
.lost__meta { font-size: 12px; color: var(--muted); margin: 3px 0 8px; }
.lost__reason { font-size: 13px; color: var(--ink-2); font-style: italic; }
.lost__when { font-size: 11px; color: var(--muted); margin-top: 3px; }
.lost__act { display: flex; gap: 8px; align-items: center; }
.lost__act form { margin: 0; }
/* Phone: the 3-column row stacks; actions go full-width so nothing bleeds. */
@media (max-width: 600px) {
  .lost { padding: 20px 16px 40px; }
  .lost__row { grid-template-columns: 1fr; gap: 10px; }
  .lost__act { width: 100%; }
  .lost__act .btn, .lost__act form { flex: 1; }
  .lost__act .btn { width: 100%; text-align: center; }
}

/* ====================================================================
   Client portal (PIN gate + unlocked) + admin portal panel + buckets
   ==================================================================== */
.portal { max-width: 520px; margin: 0 auto; padding: 18px 16px 48px; }
.portal--locked { display: grid; place-items: center; min-height: 100vh; }
.portal--quote { max-width: 600px; }
.portal--quote .pquote { margin-top: 18px; }
.portal__quotelink { text-align: center; margin: 18px 0 0; font-size: 13px; color: var(--muted); }

/* Layout wrappers vanish on phones (display:contents) so the stacked order and
   spacing stay byte-identical to the original single-column portal. On desktop
   they become a two-column grid: status rail on the right, content on the left. */
.portal__body, .portal__side, .portal__main { display: contents; }
@media (min-width: 760px) {
  .portal { max-width: 1060px; padding: 24px 28px 64px; }
  .portal__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px; align-items: start; }
  .portal__main { display: block; grid-column: 1; grid-row: 1; min-width: 0; }
  .portal__side { display: block; grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
  .portal__main > :first-child, .portal__side > :first-child { margin-top: 0; }
  .portal__sched { flex-wrap: wrap; }
  .portal__sched .portal__schedstep { flex: 1 1 calc(50% - 4px); }
  .portal__grid { grid-template-columns: repeat(4, 1fr); }
  .portal__pieces { display: grid; grid-template-columns: 1fr 1fr; }
}
.portal__lockcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 40px 32px;
  text-align: center; width: 100%; max-width: 360px; }
.portal__locktitle { font-family: var(--serif); font-weight: 300; font-size: 26px; margin: 18px 0 6px; }
.portal__locksub { font-size: 14px; color: var(--muted); margin: 0 0 24px; line-height: 1.5; }
.portal__pinform { display: flex; flex-direction: column; gap: 10px; }
.portal__pininput { padding: 16px; font-size: 28px; text-align: center; letter-spacing: .4em;
  border: 1px solid var(--line); border-radius: 12px; font-family: inherit; }
.portal__pinbtn { padding: 14px; background: var(--ink); color: var(--cream); border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
.portal__lockfoot { font-size: 12px; color: var(--muted); margin: 20px 0 0; }

.portal__head { display: flex; align-items: center; gap: 12px; padding: 8px 4px 18px; border-bottom: 1px solid var(--line); }
.portal__name { font-family: var(--serif); font-size: 20px; }
.portal__status { font-size: 12px; color: var(--accent); display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-top: 2px; }
.portal__status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.portal__sched { display: flex; gap: 8px; margin: 18px 0; }
.portal__schedstep { flex: 1; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; text-align: center; }
.portal__schedstep .l { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.portal__schedstep .d { font-family: var(--serif); font-size: 15px; margin-top: 3px; }
.portal__schedstep .d.is-empty { color: var(--muted); }
.portal__upload { background: var(--ink); color: var(--cream); border-radius: 14px; padding: 20px; margin: 18px 0; }
.portal__h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0 0 4px; }
.portal__h2 span { font-size: 13px; color: var(--muted); font-family: var(--sans); }
.portal__upload .portal__h2 { color: var(--cream); }
.portal__hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.portal__upload .portal__hint { color: rgba(245,239,230,.6); }
.portal__form { display: flex; flex-direction: column; gap: 10px; }
.portal__bucket { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(245,239,230,.6);
  display: flex; flex-direction: column; gap: 5px; }
.portal__bucket select { padding: 10px; border-radius: 8px; border: none; font-family: inherit; font-size: 14px;
  text-transform: none; letter-spacing: normal; }
.portal__add { position: relative; display: flex; align-items: center; justify-content: center; min-height: 80px;
  background: rgba(245,239,230,.08); border: 1px dashed rgba(245,239,230,.3); border-radius: 12px;
  color: var(--cream); font-size: 16px; font-weight: 600; cursor: pointer; }
.portal__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.portal__section { margin: 24px 0; }

/* ---- Portal quote: review + approve / request changes / decline ---- */
.pquote { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; }
.pquote__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pquote__head .portal__h2 { margin: 0; }
.pquote__banner { background: #faf5ea; border: 1px solid #ecdcb4; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 14px; color: var(--ink); line-height: 1.5; }
.pquote__banner--ok { background: #e7efe2; border-color: #cfe0c4; color: #3d5a2e; }
.pquote__banner--muted { background: var(--cream-2); border-color: var(--line-2); color: var(--muted); }
.pquote__note { margin-top: 8px; font-style: italic; color: var(--ink-2); }
.pquote__doc { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.pquote__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--line-2); }
.pquote__btn { display: inline-block; width: 100%; box-sizing: border-box; text-align: center;
  padding: 13px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.pquote__btn--approve { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 16px; }
.pquote__btn--decline { background: #fff; border-color: #e0c4bd; color: var(--accent); }
.pquote__actions form { margin: 0; }
.pquote__more { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.pquote__more > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-size: 14px;
  font-weight: 600; color: var(--ink-2); background: var(--cream-2); }
.pquote__more > summary::-webkit-details-marker { display: none; }
.pquote__more[open] > summary { border-bottom: 1px solid var(--line-2); }
.pquote__form { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pquote__label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.pquote__opt { color: var(--line); }
.pquote__form textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--line);
  border-radius: 8px; font-family: inherit; font-size: 15px; color: var(--ink); resize: vertical; line-height: 1.5; }
.portal__h3 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.portal__h3 span { font-family: var(--sans); letter-spacing: 0; }
.portal__group { margin: 14px 0; }
.portal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.portal__tile { margin: 0; }
.portal__thumb { display: block; width: 100%; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden;
  background: #e8ddc8; padding: 0; border: none; cursor: pointer; }
.portal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portal__thumb--doc { text-decoration: none; }
.portal__file { width: 100%; height: 100%; display: grid; place-items: center; gap: 2px; font-size: 22px; color: var(--muted); }
.portal__file span { font-size: 9px; padding: 0 4px; text-align: center; word-break: break-word; }
.portal__file em { font-size: 9px; font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.portal__cap { font-size: 11px; color: var(--muted); margin: 4px 2px 0; line-height: 1.35; }

/* Empty-state cards so sections stay visible before there's any data. */
.portal__empty { background: #fff; border: 1px dashed var(--line); border-radius: 12px;
  padding: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; text-align: center; }

/* Read-only progress timeline. */
.portal__timeline { list-style: none; margin: 0; padding: 0; }
.portal__step { display: flex; align-items: flex-start; gap: 12px; padding: 0 0 16px; position: relative; }
.portal__step::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.portal__step:last-child::before { display: none; }
.portal__stepdot { flex: 0 0 12px; width: 12px; height: 12px; border-radius: 50%; margin-top: 2px;
  background: #fff; border: 2px solid var(--line); position: relative; z-index: 1; }
.portal__step.is-done .portal__stepdot { background: var(--accent); border-color: var(--accent); }
.portal__step.is-now .portal__stepdot { background: var(--ink); border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(20,20,20,.12); }
.portal__steptitle { font-size: 14px; }
.portal__step.is-todo .portal__steptitle { color: var(--muted); }
.portal__stepsub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.portal__stepdate { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; padding-top: 1px; }

/* Full-screen photo viewer. */
.portal__lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20,18,16,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.portal__lightbox[hidden] { display: none; }
.portal__lightbox img { max-width: 100%; max-height: 80vh; border-radius: 8px; object-fit: contain; }
.portal__lbcap { color: rgba(245,239,230,.85); font-size: 13px; text-align: center; margin: 0; max-width: 520px; }
.portal__lbclose { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(245,239,230,.15); color: var(--cream); font-size: 18px; cursor: pointer; }

.portal__foot { text-align: center; font-size: 11px; color: var(--muted); margin-top: 32px; }

.portal-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--cream); border: 1px solid var(--line-2); border-radius: 10px; padding: 14px 16px; margin: 14px 0; }
.portal-panel__label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.portal-panel__url { font-size: 12px; color: var(--ink-2); word-break: break-all; }
.portal-panel__pin { font-size: 13px; margin-top: 4px; }
.portal-panel__pin strong { font-size: 16px; letter-spacing: .12em; }
.portal-panel__act form { margin: 0; }
/* On a phone the row crushes the button into a tall sliver — stack it and let
   the email button go full width below the link + PIN. */
@media (max-width: 480px) {
  .portal-panel { flex-direction: column; align-items: stretch; gap: 12px; }
  .portal-panel__act form, .portal-panel__act .btn { width: 100%; }
}

.bucket { margin-top: 18px; }
.bucket__head { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.bucket__head span { color: var(--ink-2); margin-left: 4px; }

.lib__item .lib__hint { float: right; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lib__item.is-on .lib__hint { color: rgba(245,239,230,.55); }

/* ======================================================================
 * Public marketing page — responsive layer.
 * Desktop styles above are the source of truth; these only collapse the
 * grids and dial back type/padding for tablet (≤900) and phone (≤600).
 * ====================================================================== */

/* ---- Tablet ----------------------------------------------------------- */
@media (max-width: 900px) {
  .pub-nav { padding: 18px 28px; }
  .pub-nav__links { display: none; }

  .pub-hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 28px 44px; align-items: start; }
  .pub-hero__h { font-size: 64px; }

  .pub-section { padding: 56px 28px; }
  .pub-inquire, .pub-footer { padding: 56px 28px; }

  .pub-paths { grid-template-columns: 1fr; }
  .pub-process__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .pub-makers { grid-template-columns: 1fr; gap: 32px; }
  .pub-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* 12-col tile grid → 2-up; reset the named spans. */
  .pub-grid { grid-template-columns: 1fr 1fr; }
  .pub-grid .pub-tile { grid-column: auto; }
  .pub-grid--catalog { grid-template-columns: 1fr 1fr; }
  .pub-catalog { padding: 36px 28px 64px; }

  .inq { grid-template-columns: 1fr; gap: 36px; }

  /* Doc pages */
  .pub-doc__head { padding: 48px 28px 28px; }
  .pub-doc__title { font-size: 44px; }
  .pub-doc { padding: 36px 28px 64px; }
}

/* ---- Phone ------------------------------------------------------------ */
@media (max-width: 600px) {
  .pub-nav { padding: 16px 18px; }
  .pub-nav__cta { font-size: 10px; padding: 9px 12px; }

  .pub-hero { padding: 28px 18px 36px; gap: 28px; }
  .pub-hero__h { font-size: 44px; margin-top: 20px; }
  .pub-hero__p { font-size: 15px; margin: 24px 0 20px; }
  .pub-hero__cta { flex-wrap: wrap; gap: 16px; }
  .pub-btn-dark { width: 100%; text-align: center; }

  /* Quote was absolutely positioned off the photo's left edge — that
     overflows on a phone, so flow it under the image instead. */
  .pub-quote { position: static; left: auto; bottom: auto; margin-top: 16px; max-width: none; }

  .pub-marquee__row { font-size: 18px; gap: 32px; padding-left: 18px; }
  .pub-marquee__row span { gap: 32px; }

  .pub-section { padding: 44px 18px; }
  .pub-inquire, .pub-footer { padding: 44px 18px; }

  .pub-h2 { font-size: 34px; }
  .pub-path__h { font-size: 32px; }

  .pub-rule { grid-template-columns: 1fr; gap: 14px; }
  .pub-section__head { flex-direction: column; align-items: flex-start; gap: 16px; }

  .pub-grid { grid-template-columns: 1fr; gap: 14px; }
  .pub-grid--catalog { grid-template-columns: 1fr; }
  .pub-catalog { padding: 28px 18px 56px; }
  .pub-empty__h { font-size: 26px; }
  .pub-process__grid { grid-template-columns: 1fr; gap: 24px; }
  .pub-footer__grid { grid-template-columns: 1fr; gap: 28px; }

  .inq__form { padding: 20px; }
  .inq__row { grid-template-columns: 1fr; }
  /* 16px keeps iOS Safari from auto-zooming the page on input focus. */
  .inq__input { font-size: 16px; }

  /* Floating widget shrinks to the avatars so it doesn't cover the CTA. */
  .ask-widget { right: 14px; bottom: 14px; padding: 8px; gap: 0; }
  .ask-widget__text { display: none; }

  /* Honour iOS safe areas on the long dark sections + footer. */
  .pub-footer { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }

  /* Doc pages */
  .pub-doc__head { padding: 36px 18px 24px; }
  .pub-doc__title { font-size: 36px; }
  .pub-doc__lede { font-size: 16px; }
  .pub-doc { padding: 28px 18px 56px; }
  .pub-contact { grid-template-columns: 1fr; }
  .pub-doc__cta { flex-direction: column; align-items: stretch; gap: 16px; }
  .pub-faq__item summary { font-size: 18px; }
}

/* ======================================================================
 * Internal admin (workshop) — responsive layer.
 * The app is desktop-built but used at the dinner table on a phone, so the
 * fixed side rail becomes an app-style bottom tab bar and every desktop
 * grid (kanban, KPIs, project workspace, library) collapses to a single
 * scrollable column. Desktop (>1024px) is untouched.
 * ====================================================================== */

/* ---- Tablet / small laptop: tighten padding, fewer columns ------------ */
@media (max-width: 1024px) {
  .topbar { padding: 18px 20px; }
  .kpis { grid-template-columns: repeat(3, 1fr); padding: 16px 20px 0; }
  .board-wrap, .proj-body, .proj-index { padding-left: 20px; padding-right: 20px; }
  .proj-hero-wrap, .stage-stepper, .proj-tabs, .lib__grid-wrap { padding-left: 20px; padding-right: 20px; }
  .proj-index { grid-template-columns: repeat(2, 1fr); }
  .proj-hero { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .proj-cols { grid-template-columns: 1fr; }
  .asset-grid, .lib__grid-wrap .asset-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Phone / small tablet: bottom tab bar + single column ------------- */
@media (max-width: 768px) {
  /* Shell: one column; leave room at the bottom for the fixed tab bar. */
  .admin { grid-template-columns: 1fr; }
  .main { padding-bottom: 72px; }

  /* Side rail → fixed bottom tab bar. Keep only the workspace links. */
  .rail {
    position: fixed; inset: auto 0 0 0; top: auto;
    height: auto; width: 100%; z-index: 100;
    display: flex; gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(245, 239, 230, .14);
  }
  .rail__brand, .rail__section, .rail__user, .rail__item.is-disabled { display: none; }
  .rail__item {
    flex: 1; flex-direction: column; gap: 3px; justify-content: center;
    margin: 0; padding: 8px 4px; position: relative; font-size: 11px; text-align: center;
  }
  .rail__item .ic { width: auto; font-size: 17px; opacity: 1; }
  .rail__item .label { flex: none; }
  .rail__badge { position: absolute; top: 4px; right: 22px; }

  /* Topbar stacks; the (non-functional) search is dropped on phones. */
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .topbar__title { font-size: 26px; }
  .topbar__actions { width: 100%; flex-wrap: wrap; }
  .search { display: none; }

  .kpis { grid-template-columns: repeat(2, 1fr); padding: 14px 16px 0; }

  /* Kanban: stack the columns vertically instead of a 1300px scroll. */
  .board-wrap { padding: 16px 16px 32px; overflow-x: visible; }
  .board { grid-template-columns: 1fr; min-width: 0; gap: 12px; }
  .col { min-height: 0; }

  /* Project workspace: everything to one column. */
  .proj-hero-wrap, .stage-stepper, .proj-body { padding-left: 16px; padding-right: 16px; }
  .proj-hero { grid-template-columns: 1fr; gap: 16px; }
  .proj-tabs { padding: 14px 16px 0; gap: 18px; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  .proj-tabs__meta { display: none; }
  .proj-index { grid-template-columns: 1fr; padding: 16px; }
  .log-form { flex-wrap: wrap; }

  .asset-grid, .asset-grid.sm, .lib__grid-wrap .asset-grid { grid-template-columns: repeat(2, 1fr); }

  /* Library: the filter rail becomes a compact chip area above the grid. */
  .lib { grid-template-columns: 1fr; min-height: 0; }
  .lib__rail { border-right: none; border-bottom: 1px solid var(--line-2); padding: 14px 16px; }
  .lib__item { display: inline-block; }
  .lib__grid-wrap { padding: 16px; }

  /* Products catalog: full-width padding, single-column grid on phones. */
  .prod-wrap { padding: 16px 16px 32px; }
  .prod-grid { grid-template-columns: 1fr; }

  /* Sign-in card fits a 375px screen. */
  .signin { padding: 16px; }
  .signin__card { width: 100%; max-width: 380px; padding: 32px 24px; }
}

/* ====================================================================== */
/* Quotes                                                                  */
/* ====================================================================== */

/* Status chips */
.qstatus { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2); white-space: nowrap; }
.qstatus--draft      { background: var(--cream-2); color: var(--muted); }
.qstatus--sent       { background: #e9eef0; color: #3a5a6a; }
.qstatus--accepted   { background: #e7efe2; color: #4a6a3a; }
.qstatus--declined   { background: #f3e0db; color: var(--accent); }
.qstatus--changes_requested { background: #f5ecd6; color: #8a6a2c; }
.qstatus--superseded { background: #efe9df; color: #9a8f80; }

/* Client's portal response surfaced to the admin (changes request / decline note) */
.quote-feedback { border: 1px solid var(--line-2); border-left: 3px solid #c79a36; border-radius: 8px;
  padding: 12px 14px; margin: 0 0 18px; background: #faf5ea; }
.quote-feedback--declined { border-left-color: var(--accent); background: #f9efec; }
.quote-feedback p { margin: 6px 0 0; font-size: 14px; color: var(--ink); }
.quote-feedback p.muted { font-size: 12.5px; color: var(--muted); }

/* Action bar above the document / in the tab */
.quote-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.quote-actions form { margin: 0; }

/* ---- Receipt callout (shown on an accepted quote) ---- */
.quote-receipt { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  align-items: center; background: var(--paper-2, #f6f1e8); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; }
.quote-receipt__main { flex: 1; min-width: 220px; }
.quote-receipt p.muted { margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; }
.quote-receipt .quote-actions { margin-bottom: 0; }

/* ---- Draft editor form ---- */
.quote-form__errors { background: #f3e0db; color: var(--accent); border-radius: 6px;
  padding: 10px 14px; font-size: 12.5px; margin-bottom: 14px; }
.quote-form__meta { display: flex; flex-wrap: wrap; gap: 12px; }
.quote-form__meta label, .quote-form__intro {
  display: flex; flex-direction: column; gap: 4px; font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); }
.quote-form__meta label { flex: 1; min-width: 120px; }
.quote-form__intro { margin-top: 12px; }
.quote-form .hint { text-transform: none; letter-spacing: normal; color: var(--muted); }
.quote-form input:not([type=submit]), .quote-form textarea, .quote-form select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px;
  font-family: inherit; color: var(--ink); background: #fff; width: 100%; box-sizing: border-box; }
.quote-form textarea { resize: vertical; line-height: 1.5; }
.quote-form__addbtns { display: flex; gap: 8px; }

/* Line item rows */
.qlines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.qline { display: grid; grid-template-columns: 18px 1fr 80px 100px 110px 28px; gap: 10px;
  align-items: start; padding: 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--paper); }
.qline--note { grid-template-columns: 18px 1fr 28px; background: #fbf6ee; border-style: dashed; }
.qline__handle { color: var(--line); font-size: 14px; padding-top: 22px; text-align: center; cursor: default; }
.qline__desc { display: flex; flex-direction: column; gap: 3px; }
.qline__tag { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.qline__lbl { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.qline__desc-input { resize: vertical; min-height: 38px; }
.qline__qty, .qline__price { display: flex; flex-direction: column; gap: 3px;
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.qline__num { text-align: right; }
.qline__amount { display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.qline__amount span[data-amount] { font-family: var(--serif); font-size: 15px; color: var(--ink); letter-spacing: 0; }
.qline__amount--note { color: var(--line); padding-top: 8px; }
.qline__rm { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 6px; border-radius: 4px; }
.qline__rm:hover { background: #f3e0db; color: var(--accent); }

/* Cost rows (internal BOM + shop time) — mirrors the quote line editor */
.cline { display: grid; grid-template-columns: 18px 1fr 80px 100px 110px 28px; gap: 10px;
  align-items: start; padding: 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--paper); }
.cline--labor { background: #f0f2ee; }
.cline__handle { color: var(--line); font-size: 14px; padding-top: 22px; text-align: center; cursor: default; }
.cline__desc { display: flex; flex-direction: column; gap: 3px; }
.cline__tag { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); font-weight: 700; }
.cline__lbl { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cline__desc-input { resize: vertical; min-height: 38px; }
.cline__qty, .cline__price { display: flex; flex-direction: column; gap: 3px;
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cline__num { text-align: right; }
.cline__amount { display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.cline__amount span[data-amount] { font-family: var(--serif); font-size: 15px; color: var(--ink); letter-spacing: 0; }
.cline__rm { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 6px; border-radius: 4px; }
.cline__rm:hover { background: #f3e0db; color: var(--accent); }

/* Quote sample / reference gallery editor */
.qsamples__grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.qsamples__item { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); }
.qsamples__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qsamples__rmform { position: absolute; top: 4px; right: 4px; margin: 0; }
.qsamples__rm { border: none; background: rgba(26,23,20,.72); color: #fff; width: 22px; height: 22px; border-radius: 999px;
  font-size: 11px; line-height: 1; cursor: pointer; padding: 0; }
.qsamples__rm:hover { background: var(--accent); }
.dropzone--sm { padding: 18px 16px; }
.qsamples__upload { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.qsamples__upload .dropzone { width: 100%; }
.qsamples__pickhead { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.qsamples__pickgrid { display: flex; flex-wrap: wrap; gap: 10px; }
.qsamples__pickform { margin: 0; }
.qsamples__pickitem { position: relative; width: 80px; height: 80px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px;
  overflow: hidden; cursor: pointer; background: none; display: block; }
.qsamples__pickitem:hover { border-color: var(--ink-2); }
.qsamples__add { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(26,23,20,.55); color: #fff; font-size: 11px; opacity: 0; transition: opacity .12s; }
.qsamples__pickitem:hover .qsamples__add { opacity: 1; }

/* Quote sample gallery in the rendered document */
.qdoc__samples { margin: 8px 0 18px; }
.qdoc__samplegrid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.qdoc__sample { width: 130px; height: 130px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-2); }

/* Live totals in the editor */
.qtotals { margin-left: auto; max-width: 320px; border-top: 1px solid var(--line); padding-top: 12px; }
.qtotals__row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--ink-2); }
.qtotals__row--total { font-family: var(--serif); font-size: 19px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.qtotals__row--muted { color: var(--muted); font-size: 12px; }
.quote-form__terms { font-size: 12.5px; }
.quote-form__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.quote-form__actions .btn { width: auto; }
.quote-form__cancel { margin-left: 6px; font-size: 12px; color: var(--muted); text-decoration: none; }
.quote-form__cancel:hover { color: var(--ink); }

/* ---- Revision history ---- */
.qhist { display: flex; flex-direction: column; }
.qhist__row { display: grid; grid-template-columns: 44px 100px 1fr auto 70px; gap: 12px; align-items: center;
  padding: 11px 6px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink-2); font-size: 13px; }
.qhist__row:last-child { border-bottom: none; }
.qhist__row:hover { background: var(--paper); }
.qhist__row.is-current { background: #fbf6ee; }
.qhist__v { font-family: var(--serif); font-size: 16px; color: var(--ink); }
.qhist__title { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qhist__total { font-family: var(--serif); font-size: 15px; }
.qhist__when { font-size: 11px; color: var(--muted); text-align: right; }

/* ====================================================================== */
/* The rendered quote document                                            */
/* ====================================================================== */
.qdoc { background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 40px 44px; max-width: 760px; margin: 0 auto; color: var(--ink); }
.qdoc__head { display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 22px; border-bottom: 2px solid var(--ink); margin-bottom: 24px; }
.qdoc__logo { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1; }
.qdoc__logo .dot { color: var(--accent); margin: 0 1px; }
.qdoc__brandword { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.qdoc__title { text-align: right; }
.qdoc__doctype { font-family: var(--serif); font-size: 24px; font-weight: 300; letter-spacing: .04em; }
.qdoc__num { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.qdoc__date, .qdoc__valid { font-size: 12px; color: var(--muted); margin-top: 3px; }
.qdoc__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 22px; }
.qdoc__plabel { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.qdoc__pname { font-family: var(--serif); font-size: 17px; }
.qdoc__pline { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.qdoc__intro { font-size: 14px; line-height: 1.65; color: var(--ink-2); margin: 0 0 22px;
  padding: 14px 18px; background: var(--paper); border-left: 3px solid var(--gold); border-radius: 0 6px 6px 0; }
.qdoc__intro span { display: block; }
.qdoc__table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 8px; }
.qdoc__table thead th { text-align: left; font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.qdoc__table .c-qty, .qdoc__table .c-unit, .qdoc__table .c-amt { text-align: right; white-space: nowrap; width: 1%; padding-left: 18px; }
.qdoc__table tbody td { padding: 12px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; line-height: 1.5; }
.qdoc__table tbody td.c-amt { font-family: var(--serif); font-size: 15px; }
.qdoc__note td { color: var(--muted); font-style: italic; }
.qdoc__note-tag { display: inline-block; font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-style: normal; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.qdoc__empty { color: var(--muted); font-style: italic; text-align: center; padding: 22px 0; }
.qdoc__foot { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin-top: 22px; align-items: start; }
.qdoc__terms { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.qdoc__terms span { display: block; }
.qdoc__totals { border-top: 2px solid var(--ink); padding-top: 12px; }
.qdoc__trow { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; color: var(--ink-2); }
.qdoc__trow--total { font-family: var(--serif); font-size: 22px; color: var(--ink);
  border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.qdoc__trow--accent { color: var(--accent); font-weight: 600; }
.qdoc__trow--muted { color: var(--muted); font-size: 12px; }
.qdoc__sign { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-2);
  font-size: 12px; color: var(--muted); text-align: center; }

/* ---- Print: just the document ---- */
@media print {
  .rail, .topbar, .proj-tabs, .proj-hero-wrap, .stage-stepper, .quote-actions, .no-print, .toast { display: none !important; }
  .admin, .main, .proj-body { display: block !important; padding: 0 !important; background: #fff !important; }
  .qdoc { border: none; max-width: none; padding: 0; }
  body { background: #fff; }
}

/* ---- Mobile (375px gate) ---- */
@media (max-width: 768px) {
  .qline { grid-template-columns: 1fr 1fr; gap: 8px; }
  .qline__handle { display: none; }
  .qline__desc { grid-column: 1 / -1; }
  .qline--note { grid-template-columns: 1fr; }
  .qline__amount { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .qline__rm { position: absolute; }
  .qline { position: relative; padding-top: 30px; }
  .qline__rm { top: 6px; right: 6px; }

  .cline { grid-template-columns: 1fr 1fr; gap: 8px; position: relative; padding-top: 30px; }
  .cline__handle { display: none; }
  .cline__desc { grid-column: 1 / -1; }
  .cline__amount { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .cline__rm { position: absolute; top: 6px; right: 6px; }

  .qtotals { max-width: none; }

  .qdoc { padding: 24px 18px; }
  .qdoc__head { flex-direction: column; gap: 14px; }
  .qdoc__title { text-align: left; }
  .qdoc__parties { grid-template-columns: 1fr; gap: 16px; }
  .qdoc__foot { grid-template-columns: 1fr; gap: 20px; }
  .qdoc__table .c-unit { display: none; }

  .qhist__row { grid-template-columns: 38px 1fr auto; row-gap: 4px; }
  .qhist__title, .qhist__when { display: none; }
}

/* ====================================================================== */
/* Handbook (admin "how it works")                                         */
/* ====================================================================== */

.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-2); }

.hb-stamp { font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* Layout: TOC rail + reading column */
.hb { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px;
  padding: 20px 32px 56px; align-items: start; }

.hb__toc { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 20px; }
.hb__tocitem { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 9px;
  text-decoration: none; color: var(--ink-2); border: 1px solid transparent; }
.hb__tocitem:hover { background: #fff; border-color: var(--line-2); }
.hb__tocitem.is-on { background: var(--ink); border-color: var(--ink); }
.hb__tocitem.is-on .hb__toctitle, .hb__tocitem.is-on .hb__tocicon { color: var(--cream); }
.hb__tocitem.is-on .hb__tocblurb { color: rgba(245,239,230,.6); }
.hb__tocicon { font-size: 15px; line-height: 1.4; color: var(--muted); width: 18px; text-align: center; flex: none; }
.hb__toctext { display: flex; flex-direction: column; gap: 2px; }
.hb__toctitle { font-weight: 600; font-size: 13.5px; }
.hb__tocblurb { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* The reading column */
.hb__page { background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 36px 44px 28px; max-width: 760px; }
.hb-lede { font-family: var(--serif); font-weight: 300; font-size: 21px; line-height: 1.5;
  color: var(--ink); margin: 0 0 8px; letter-spacing: -.01em; }
.hb-h2 { font-family: var(--serif); font-weight: 400; font-size: 23px; margin: 34px 0 12px;
  padding-top: 22px; border-top: 1px solid var(--line-2); }
.hb-h3 { font-size: 14px; font-weight: 700; letter-spacing: .02em; margin: 20px 0 10px; color: var(--ink-2); }
.hb-p { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); margin: 0 0 12px; }
.hb-muted { color: var(--muted); font-size: 13px; }
.hb-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(184,89,58,.3); }
.hb-link:hover { border-bottom-color: var(--accent); }
.hb__page code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em;
  background: var(--cream-2); padding: 1px 6px; border-radius: 4px; color: var(--ink-2); }

/* Callout */
.hb-callout { background: var(--paper); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
  padding: 14px 18px; margin: 18px 0; font-size: 14px; line-height: 1.65; color: var(--ink-2); }

/* Card grid */
.hb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
.hb-card { border: 1px solid var(--line-2); border-radius: 10px; padding: 16px; background: var(--paper); }
.hb-card__tag { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  font-weight: 700; margin-bottom: 8px; }
.hb-card__h { font-family: var(--serif); font-weight: 400; font-size: 17px; margin: 0 0 6px; }
.hb-card p { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin: 0; }

/* Definition-style table */
.hb-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; }
.hb-table th { text-align: left; vertical-align: top; width: 30%; padding: 11px 16px 11px 0;
  font-size: 13px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.hb-table td { vertical-align: top; padding: 11px 0; font-size: 13.5px; line-height: 1.6;
  color: var(--ink-2); border-bottom: 1px solid var(--line-2); }

/* Numbered steps */
.hb-steps { margin: 12px 0 16px; padding: 0; counter-reset: hb; list-style: none; }
.hb-steps li { position: relative; padding: 4px 0 12px 38px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.hb-steps li::before { counter-increment: hb; content: counter(hb); position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--cream);
  font-family: var(--serif); font-size: 13px; display: grid; place-items: center; }

/* Stage chips row */
.hb-stages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 16px; }
.hb-stage { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2); }
.hb-stage.is-build { background: var(--ink); color: var(--cream); }
.hb-stage__arrow { color: var(--line); font-size: 12px; }

.hb-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.hb-tag { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--cream-2);
  color: var(--ink-2); letter-spacing: .02em; }

/* Data-model tree */
.hb-tree { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.hb-tree ul { margin: 2px 0 2px; }

.hb__pagefoot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* ---- Handbook responsive ---- */
/* Below the admin shell's tablet breakpoint there isn't room for a 264px TOC
   beside the reading column, so the TOC folds into a horizontal chip strip. */
@media (max-width: 1024px) {
  .hb { grid-template-columns: 1fr; gap: 16px; padding: 18px 20px 48px; }
  .hb__toc { position: static; flex-direction: row; gap: 8px; overflow-x: auto;
    margin: 0 -20px; padding: 0 20px 4px; -webkit-overflow-scrolling: touch; }
  .hb__tocitem { flex: none; width: 168px; }
  .hb__tocblurb { display: none; }
  .hb__page { max-width: none; }
}
@media (max-width: 768px) {
  .rail__item--desk { display: none; }   /* keep the bottom tab bar at 3 */
  .hb { padding: 16px 16px 40px; }
  .hb__toc { margin: 0 -16px; padding: 0 16px 4px; }
  .hb__tocitem { width: 150px; }
  .hb__page { padding: 22px 18px; }
  .hb-lede { font-size: 18px; }
  .hb-h2 { font-size: 20px; }
  .hb-table th { white-space: normal; width: 38%; }
}

/* ── Expire-lead confirm dialog ───────────────────────────────────────────
   Replaces the stock browser confirm() on the Leads/Projects cards with a
   styled choice between Lost and Junk. One <dialog> lives in the layout. */
.modal {
  border: none;
  border-radius: 14px;
  padding: 0;
  background: transparent;
  max-width: 380px;
  width: calc(100% - 32px);
}
.modal::backdrop { background: rgba(26, 23, 20, .45); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .14s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.modal__panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(26, 23, 20, .28);
}
.modal__title { font-family: "Fraunces", serif; font-size: 21px; font-weight: 500; color: var(--ink); margin: 0 0 4px; }
.modal__sub { font-size: 13px; color: var(--muted); margin: 0 0 18px; line-height: 1.45; }

.modal__actions { display: flex; flex-direction: column; gap: 10px; }
.modal__actions form { margin: 0; }

.modal__choice {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; text-align: left;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, background .12s, transform .04s;
}
.modal__choice:hover { transform: translateY(-1px); }
.modal__choice:active { transform: translateY(0); }
.modal__choice-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.modal__choice-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.modal__choice--lost:hover { border-color: var(--accent); background: #fbf1ec; }
.modal__choice--lost .modal__choice-title { color: var(--accent); }
.modal__choice--junk:hover { border-color: var(--ink-2); background: var(--cream); }

.modal__cancel {
  display: block; width: 100%;
  margin-top: 14px; padding: 9px;
  background: transparent; border: none;
  color: var(--muted); font-family: inherit; font-size: 13px; cursor: pointer;
}
.modal__cancel:hover { color: var(--ink); }

@media (max-width: 480px) {
  .modal__panel { padding: 18px 16px 14px; }
  .modal__title { font-size: 19px; }
}

/* ── Email updates (Marketing → Email updates) ────────────────────────────
   Admin compose/preview screens + the public "sign up for updates" form and
   the token-keyed unsubscribe page. Mobile rules are folded into the existing
   admin (≤768) and public (≤600) blocks below this section. */

/* Admin: audience counters */
.bc-audiences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.bc-aud { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.bc-aud__n { font-family: "Fraunces", serif; font-size: 26px; color: var(--ink); }
.bc-aud__l { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Admin: email update list */
.bc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bc-row { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.bc-row__link { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; text-decoration: none; color: var(--ink); }
.bc-row__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bc-row__subject { font-weight: 600; font-size: 15px; }
.bc-row__meta { font-size: 12px; color: var(--muted); }
.bc-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.bc-tag--sent { background: #eaf0e6; color: #5a6e4e; }
.bc-tag--sending { background: #fff3e0; color: var(--accent); }
.bc-tag--draft { background: var(--cream); color: var(--ink-2); }
.bc-empty { color: var(--muted); font-size: 14px; padding: 18px 0; }

/* Admin: body padding so content aligns with the topbar (matches .quickadd/.board-wrap) */
.bc-body { padding: 24px 32px 48px; }

/* Admin: preview screen */
.bc-preview { max-width: 560px; }
.bc-preview__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 18px;
  font-size: 13px; color: var(--ink-2); }
.bc-preview__k { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bc-preview__email { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.bc-preview__brand { text-align: center; padding: 18px 0; border-bottom: 1px solid #ece5d6;
  font-family: Georgia, serif; color: #1a1714; }
.bc-preview__body { padding: 24px 22px; line-height: 1.6; font-size: 15px; color: #1a1714; }
.bc-preview__foot { padding: 16px 22px; border-top: 1px solid #ece5d6; font-size: 12px;
  color: #6b6157; text-align: center; line-height: 1.7; }
.bc-preview__foot a { color: #6b6157; }
.bc-send { margin-top: 18px; }
.bc-preview__note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Public: "sign up for updates" band on the storefront */
.pub-updates { background: var(--ink); color: var(--cream); padding: 64px 56px; }
.pub-updates__inner { max-width: 560px; margin: 0 auto; text-align: center; }
.pub-updates .pub-eyebrow { color: var(--accent-2); }
.pub-updates .pub-h2 { color: var(--cream); }
.pub-updates .pub-h2 em { color: var(--accent-2); }
.pub-updates__p { color: rgba(245, 239, 230, .82); font-size: 16px; line-height: 1.6; margin: 16px 0 28px; }
.pub-updates__form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pub-updates__input { flex: 1; min-width: 200px; padding: 14px 16px; font-size: 16px;
  border: 1px solid rgba(245, 239, 230, .22); border-radius: 8px;
  background: rgba(245, 239, 230, .06); color: var(--cream); }
.pub-updates__input::placeholder { color: rgba(245, 239, 230, .5); }
.pub-updates__submit { padding: 14px 24px; font-size: 15px; font-weight: 700; letter-spacing: .04em;
  border: none; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; }

/* Public: unsubscribe / signup-result card (mobile-first, phone layout) */
.sub-card { width: 100%; max-width: 420px; margin: 8vh auto; padding: 36px 26px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; text-align: center;
  box-sizing: border-box; }
.sub-card__brand { font-family: Georgia, serif; font-size: 20px; color: var(--ink); margin-bottom: 18px; }
.sub-card__h { font-family: "Fraunces", serif; font-weight: 500; font-size: 24px; color: var(--ink); margin: 0 0 12px; }
.sub-card__p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 22px; }
.sub-card__note { font-size: 13px; color: var(--muted); margin-top: 16px; }
.sub-btn { display: inline-block; width: 100%; box-sizing: border-box; padding: 14px 18px;
  font-size: 16px; font-weight: 600; border-radius: 9px; border: none; cursor: pointer;
  text-decoration: none; text-align: center; }
.sub-btn--dark { background: var(--ink); color: var(--cream); }
.sub-card form { margin: 0; }

/* Admin mobile (≤768): collapse counters + tidy preview */
@media (max-width: 768px) {
  .bc-body { padding: 16px 16px 32px; }
  .bc-audiences { grid-template-columns: 1fr; gap: 10px; }
  .bc-preview { max-width: none; }
  .bc-row__link { flex-direction: row; }
  /* 16px so iOS Safari doesn't auto-zoom the compose fields on focus. */
  .quickadd__form input[type=text], .quickadd__form input:not([type]),
  .quickadd__form textarea, .quickadd__form select { font-size: 16px; }
}

/* Public mobile (≤600): stack the signup form, full-width controls */
@media (max-width: 600px) {
  .pub-updates { padding: 48px 20px; }
  .pub-updates__form { flex-direction: column; }
  .pub-updates__input, .pub-updates__submit { width: 100%; min-width: 0; }
  .sub-card { margin: 4vh auto; padding: 28px 20px; }
}
