/* ==========================================================================
   UgDocs — design system
   Source of truth: the approved prototype (ugdocs-prototype.html).
   Class names match the prototype on purpose, so page templates can lift
   its markup as-is.

   ONE responsive shell for every audience (customers, guests, staff):
     <= 980px  phones AND tablets : header on top, tab bar at the bottom, cards
     >= 981px  desktop / wide     : sidebar on the left, top bar, content fills the width
   ========================================================================== */

:root{
  --paper:#EFE9DA; --paper-alt:#E4DCC5; --card:#FBF8F0; --ink:#26211B; --ink-soft:#5B5347;
  --line:rgba(38,33,27,0.14); --teal:#24564C; --teal-deep:#173D35; --teal-tint:#DDEAE6;
  --brass:#B4863A; --stamp:#AE3A26; --stamp-tint:#F6DFD8;
  --shadow:0 1px 2px rgba(38,33,27,.08), 0 10px 28px rgba(38,33,27,.10);
  --font-display:'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h:64px; --tabbar-h:64px; --side-w:236px; --safe-b:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#18140F; --paper-alt:#211B14; --card:#221C15; --ink:#EEE7D6; --ink-soft:#B6AC97;
    --line:rgba(255,255,255,.12); --teal:#4FA393; --teal-deep:#3A8577; --teal-tint:#1E322D;
    --brass:#D2A559; --stamp:#D9694F; --stamp-tint:#3A241E;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"]{
  --paper:#18140F; --paper-alt:#211B14; --card:#221C15; --ink:#EEE7D6; --ink-soft:#B6AC97;
  --line:rgba(255,255,255,.12); --teal:#4FA393; --teal-deep:#3A8577; --teal-tint:#1E322D;
  --brass:#D2A559; --stamp:#D9694F; --stamp-tint:#3A241E;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
}

*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0; padding:0;}
body{
  background:var(--paper); color:var(--ink); font-family:var(--font-body);
  min-height:100vh; min-height:100dvh;
  background-image:radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1px);
  background-size:22px 22px;
  display:flex; flex-direction:column;
}
a{color:inherit; text-decoration:none;}
[hidden]{display:none !important;}
::-webkit-scrollbar{width:8px; height:8px;}
::-webkit-scrollbar-thumb{background:var(--line); border-radius:8px;}
:focus-visible{outline:2px solid var(--teal); outline-offset:2px;}
@media (prefers-reduced-motion: reduce){ *{animation-duration:.001ms !important; transition-duration:.001ms !important;} }

@keyframes fadein{from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:translateY(0);}}

/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */

.iconbtn{width:38px; height:38px; border-radius:50%; border:1px solid var(--line); background:var(--card); display:flex; align-items:center; justify-content:center; color:var(--ink); cursor:pointer; position:relative; flex:none; font-family:inherit; padding:0;}
.iconbtn .badge{position:absolute; top:-3px; right:-3px; background:var(--stamp); color:#fff; font-size:10px; font-family:var(--font-mono); min-width:16px; height:16px; border-radius:50%; display:flex; align-items:center; justify-content:center; padding:0 3px; border:2px solid var(--paper);}
.iconbtn.primary{background:var(--teal); color:#fff; border-color:var(--teal);}
.avatar{width:38px; height:38px; border-radius:50%; background:var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:600; font-size:14px; flex:none;}
.avatar.brass{background:var(--brass); color:#2A1F0C;}

h1.page-title{font-family:var(--font-display); font-weight:600; font-size:24px; margin:14px 0 4px; letter-spacing:-.01em;}
h2.section-title{font-family:var(--font-display); font-weight:600; font-size:16.5px; margin:22px 0 12px; letter-spacing:-.005em;}
h2.section-title:first-child{margin-top:6px;}
p.lede{color:var(--ink-soft); font-size:14.5px; line-height:1.6;}

.btn{border:none; cursor:pointer; font-family:var(--font-body); font-weight:600; border-radius:100px; padding:11px 18px; font-size:14px; display:inline-flex; align-items:center; gap:7px; justify-content:center; transition:transform .12s ease, opacity .12s ease;}
.btn:active{transform:scale(.96);}
.btn-light{background:#F3EEDF; color:var(--teal-deep);}
.btn-primary{background:var(--teal); color:#fff;}
.btn-outline{background:transparent; border:1px solid var(--line); color:var(--ink);}
.btn-ghost{background:var(--card); color:var(--ink); border:1px solid var(--line);}
.btn-stamp{background:var(--stamp); color:#fff;}
.btn-block{width:100%;}
.btn-sm{padding:8px 14px; font-size:13px;}
.btn[disabled]{opacity:.5; pointer-events:none;}

.card{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px; box-shadow:var(--shadow);}

.chip{font-size:10.5px; font-weight:600; padding:4px 9px; border-radius:100px; font-family:var(--font-body); white-space:nowrap;}
.chip-progress{background:var(--teal-tint); color:var(--teal-deep);}
.chip-done{background:var(--brass); color:#2A1F0C;}
.chip-wait{background:var(--stamp-tint); color:var(--stamp);}
.pill{font-size:10.5px; font-weight:700; padding:4px 10px; border-radius:100px; display:inline-block;}
.pill-new{background:var(--stamp-tint); color:var(--stamp);}
.pill-progress{background:var(--teal-tint); color:var(--teal-deep);}
.pill-proof{background:#EFE2C0; color:#7A5A15;}
.pill-done{background:var(--brass); color:#2A1F0C;}

/* ---- inputs (prototype styles these globally) ---- */
textarea, input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=search], select{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid var(--line); background:var(--card);
  color:var(--ink); font-family:var(--font-body); font-size:14px; resize:vertical;
}
textarea{min-height:96px;}
label.field-label, .field-label{display:block; font-size:12.5px; font-weight:600; color:var(--ink-soft); margin-bottom:8px;}

/* ---- empty + error states ---- */
.empty-state{text-align:center; padding:40px 20px; color:var(--ink-soft);}
.empty-state svg{margin-bottom:10px; opacity:.6;}
.empty-state .t{font-family:var(--font-display); font-size:15px; color:var(--ink); font-weight:600; margin-bottom:4px;}
.empty-state .s{font-size:12.5px; line-height:1.5;}
.error-text{color:var(--stamp); font-size:12px; margin-top:6px;}
.error-list{color:var(--stamp); font-size:12.5px; background:var(--stamp-tint); border-radius:12px; padding:10px 14px; margin-bottom:14px; list-style:none;}

/* ---- documents / orders list ---- */
.doc-scroll{display:flex; gap:10px; overflow-x:auto; padding:2px 0 8px; scrollbar-width:none;}
.doc-scroll::-webkit-scrollbar{display:none;}
.doc-thumb{flex:none; width:108px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:10px; cursor:pointer; display:block;}
.doc-thumb .sheet-icon{width:100%; height:64px; border-radius:8px; background:var(--paper-alt); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); margin-bottom:8px;}
.doc-thumb .t{font-size:12px; font-weight:600; line-height:1.25;}
.doc-thumb .s{font-size:10.5px; color:var(--ink-soft); margin-top:2px;}

.filters{display:flex; gap:8px; margin:14px 0 16px; overflow-x:auto; scrollbar-width:none;}
.filters::-webkit-scrollbar{display:none;}
.filter-pill{flex:none; font-size:12.5px; font-weight:600; padding:8px 14px; border-radius:100px; border:1px solid var(--line); background:var(--card); color:var(--ink-soft); cursor:pointer; font-family:inherit;}
.filter-pill.active{background:var(--ink); color:var(--paper); border-color:var(--ink);}
.doclist{display:grid; gap:10px;}
.doc-row{display:flex; align-items:center; gap:12px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px; cursor:pointer;}
.doc-row .ic{width:42px; height:42px; border-radius:11px; background:var(--paper-alt); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); flex:none;}
.doc-row .mid{flex:1; min-width:0;}
.doc-row .mid .t{font-weight:600; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.doc-row .mid .s{font-size:12px; color:var(--ink-soft); margin-top:2px;}

/* ---- notifications (alerts feed) ---- */
.notif-toggle{display:flex; align-items:center; gap:12px; margin:14px 0 20px;}
.notif-toggle .ic{width:42px; height:42px; border-radius:12px; background:var(--teal-tint); color:var(--teal-deep); display:flex; align-items:center; justify-content:center; flex:none;}
.notif-toggle .mid{flex:1;}
.notif-toggle .mid .t{font-weight:600; font-size:14px;}
.notif-toggle .mid .s{font-size:12px; color:var(--ink-soft); margin-top:2px; line-height:1.4;}
.switch{width:44px; height:26px; border-radius:100px; background:var(--line); position:relative; cursor:pointer; flex:none; border:none; padding:0;}
.switch::after{content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:var(--card); box-shadow:0 1px 3px rgba(0,0,0,.25); transition:left .18s ease;}
.switch.on{background:var(--teal);}
.switch.on::after{left:21px; background:#fff;}
.notif-day{font-family:var(--font-mono); font-size:10.5px; color:var(--ink-soft); letter-spacing:.03em; margin:18px 0 8px;}
.notif-item{display:flex; gap:11px; padding:12px 0; border-bottom:1px solid var(--line);}
.notif-item .ic{width:34px; height:34px; border-radius:50%; background:var(--paper-alt); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); flex:none;}
.notif-item.unread .ic{background:var(--stamp-tint); color:var(--stamp);}
.notif-item .mid{flex:1;}
.notif-item .mid .t{font-size:13px; font-weight:600;}
.notif-item .mid .s{font-size:12px; color:var(--ink-soft); margin-top:2px; line-height:1.4;}
.notif-item .time{font-size:10.5px; color:var(--ink-soft); font-family:var(--font-mono); white-space:nowrap;}

/* ---- profile ---- */
.profile-card{display:flex; align-items:center; gap:14px; margin:8px 0 20px;}
.profile-card .av{width:58px; height:58px; border-radius:50%; background:var(--teal); color:#fff; font-family:var(--font-display); font-size:20px; font-weight:600; display:flex; align-items:center; justify-content:center; flex:none;}
.profile-card .t{font-family:var(--font-display); font-weight:600; font-size:17px;}
.profile-card .s{font-size:12.5px; color:var(--ink-soft); font-family:var(--font-mono); margin-top:2px;}
.list-row{display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); cursor:pointer; width:100%; background:none; border-left:0; border-right:0; border-top:0; font-family:inherit; color:inherit; text-align:left;}
.list-row .ic{width:34px; height:34px; border-radius:10px; background:var(--card); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); flex:none;}
.list-row .t{flex:1; font-size:13.5px; font-weight:600;}
.list-row .s{font-size:11.5px; color:var(--ink-soft); font-family:var(--font-mono);}

/* ---- chat (customer thread and staff thread pane share these) ---- */
.chat-header{display:flex; align-items:center; gap:10px; padding:6px 0 12px; border-bottom:1px solid var(--line); margin-bottom:12px; flex:none;}
.chat-header .info .t{font-weight:600; font-size:14.5px;}
.chat-header .info .s{font-size:11.5px; color:var(--teal); display:flex; align-items:center; gap:5px;}
.chat-header .info .s .dot{width:6px; height:6px; border-radius:50%; background:var(--teal); display:inline-block;}
.chat-header .info .s.offline{color:var(--ink-soft);}
.chat-header .info .s.offline .dot{background:var(--ink-soft);}
.chat-header .sp{flex:1;}
.chat-log{display:flex; flex-direction:column; gap:10px; padding-bottom:12px;}
.msg{max-width:78%; padding:10px 13px; border-radius:16px; font-size:13.5px; line-height:1.45; overflow-wrap:anywhere;}
.msg.them{align-self:flex-start; background:var(--card); border:1px solid var(--line); border-bottom-left-radius:5px;}
.msg.me{align-self:flex-end; background:var(--teal); color:#fff; border-bottom-right-radius:5px;}
.msg.system{align-self:center; max-width:90%; background:none; border:1px dashed var(--line); color:var(--ink-soft); font-size:12px; text-align:center;}
.msg .time{display:block; font-family:var(--font-mono); font-size:9.5px; margin-top:5px; opacity:.65;}
.msg a{text-decoration:underline;}
.msg audio{max-width:100%; display:block;}
.typing{align-self:flex-start; display:flex; gap:4px; padding:12px 14px; background:var(--card); border:1px solid var(--line); border-radius:16px; border-bottom-left-radius:5px;}
.typing span{width:5px; height:5px; border-radius:50%; background:var(--ink-soft); animation:blink 1.2s infinite ease-in-out;}
.typing span:nth-child(2){animation-delay:.15s;} .typing span:nth-child(3){animation-delay:.3s;}
@keyframes blink{0%,80%,100%{opacity:.25;} 40%{opacity:1;}}
.chat-composer{display:flex; gap:8px; align-items:center; background:var(--paper); padding:8px 0 10px; flex:none;}
.chat-composer input, .chat-composer textarea{flex:1;}
.chat-composer textarea{min-height:42px; max-height:120px; padding:10px 14px; border-radius:21px; resize:none; line-height:1.35;}

/* call overlay + minibar styles live in _call_overlay.html (single source of truth) */

/* ---- toasts (prototype "push toast": also the in-app alert) ---- */
.toast-stack{position:fixed; top:calc(env(safe-area-inset-top,0px) + 14px); left:50%; transform:translateX(-50%); z-index:10000; display:flex; flex-direction:column; gap:8px; width:min(92vw,420px); pointer-events:none;}
.push-toast, .toast{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:12px 13px; box-shadow:var(--shadow); display:flex; gap:10px; align-items:flex-start; transform:translateY(-30px); opacity:0; transition:all .3s cubic-bezier(.22,.9,.35,1); pointer-events:auto; color:var(--ink);}
.push-toast.show, .toast.show{transform:translateY(0); opacity:1;}
.push-toast .ic{width:30px; height:30px; border-radius:9px; background:var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; flex:none;}
.push-toast .t, .toast .t{font-size:12.5px; font-weight:700;}
.push-toast .s, .toast .s{font-size:11.5px; color:var(--ink-soft); margin-top:2px; line-height:1.35;}
.push-toast .tm{font-family:var(--font-mono); font-size:9.5px; color:var(--ink-soft); margin-left:auto; flex:none;}

/* ---- install / offline banners ---- */
.sys-banner{display:none; align-items:center; gap:10px; background:var(--teal-tint); color:var(--teal-deep); font-size:12.5px; font-weight:600; padding:10px 20px; border-bottom:1px solid var(--line);}
.sys-banner.show{display:flex;}
.sys-banner button{margin-left:auto; background:none; border:none; color:var(--teal-deep); font-weight:700; cursor:pointer; font-size:12.5px; font-family:inherit;}
.sys-banner button + button{margin-left:0;}

/* ---- bottom sheet (order / request / proof flows) ---- */
.sheet-backdrop{position:fixed; inset:0; background:rgba(20,17,12,.45); opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:70;}
.sheet-backdrop.show{opacity:1; pointer-events:auto;}
.sheet{position:fixed; left:50%; transform:translate(-50%,100%); bottom:0; width:100%; max-width:560px; background:var(--paper); border-radius:24px 24px 0 0; transition:transform .28s cubic-bezier(.22,.9,.35,1); z-index:71; box-shadow:var(--shadow); max-height:88vh; max-height:88dvh; display:flex; flex-direction:column; visibility:hidden;}
.sheet.show{transform:translate(-50%,0); visibility:visible;}
.sheet.full{height:100%; max-width:none; border-radius:0; max-height:100%; left:0; transform:translateY(100%);}
.sheet.full.show{transform:translateY(0);}
.sheet-head{flex:none; display:flex; align-items:center; justify-content:space-between; padding:18px 20px 8px;}
.sheet-head .t{font-family:var(--font-display); font-weight:600; font-size:17px;}
.sheet-close{width:30px; height:30px; border-radius:50%; background:var(--card); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--ink); padding:0; font-family:inherit;}
.sheet-body{flex:1; overflow-y:auto; padding:8px 20px 4px;}
.sheet-foot{flex:none; padding:14px 20px calc(14px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--line);}

.steps-track{display:flex; gap:6px; margin:6px 0 18px;}
.steps-track div{flex:1; height:4px; border-radius:4px; background:var(--line);}
.steps-track div.on{background:var(--teal);}

.opt-group{margin-bottom:20px;}
.opt-label{font-size:12.5px; font-weight:600; color:var(--ink-soft); margin-bottom:9px;}
.opt-row{display:flex; gap:8px; flex-wrap:wrap;}
.opt-pill{padding:9px 14px; border-radius:100px; border:1px solid var(--line); background:var(--card); font-size:13px; font-weight:600; cursor:pointer; color:var(--ink); font-family:inherit;}
.opt-pill.sel{background:var(--ink); color:var(--paper); border-color:var(--ink);}
.stepper-num{display:flex; align-items:center; gap:14px;}
.stepper-num button{width:34px; height:34px; border-radius:50%; border:1px solid var(--line); background:var(--card); font-size:16px; cursor:pointer; color:var(--ink); font-family:inherit;}
.stepper-num .n{font-family:var(--font-mono); font-size:16px; min-width:24px; text-align:center;}

.source-opt{display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:14px; margin-bottom:10px; cursor:pointer; background:var(--card);}
.source-opt.sel{border-color:var(--teal); box-shadow:0 0 0 1px var(--teal);}
.source-opt .ic{width:38px; height:38px; border-radius:10px; background:var(--teal-tint); color:var(--teal-deep); display:flex; align-items:center; justify-content:center; flex:none;}
.source-opt .t{font-weight:600; font-size:13.5px;}
.source-opt .s{font-size:11.5px; color:var(--ink-soft); margin-top:1px;}

.summary-row{display:flex; justify-content:space-between; gap:12px; font-size:13.5px; padding:8px 0; border-bottom:1px dashed var(--line);}
.summary-row.total{border-bottom:none; padding-top:12px; font-weight:700; font-size:15px;}
.summary-row span:last-child{font-family:var(--font-mono); text-align:right;}

.proof-preview{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; font-family:var(--font-display); line-height:1.6; margin-bottom:16px; min-height:220px;}

/* ---- order form (real checkout inputs; radios styled as prototype pills) ---- */
.field-group{margin-bottom:18px;}
.field-hint{font-size:11px; color:var(--ink-soft); margin-top:5px; line-height:1.4;}
.pill-row{display:flex; flex-wrap:wrap; gap:8px;}
.pill-radio{display:none;}
.pill-radio + label{font-size:13px; font-weight:600; padding:9px 14px; border-radius:100px; border:1px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer;}
.pill-radio:checked + label{background:var(--ink); color:var(--paper); border-color:var(--ink);}
.pill-radio:focus-visible + label{outline:2px solid var(--teal); outline-offset:2px;}
.checkbox-row{display:flex; align-items:center; gap:9px; font-size:13.5px;}
.checkbox-row input{width:auto;}
.doc-row-form{border:1px solid var(--line); border-radius:14px; padding:12px; margin-bottom:10px; background:var(--card);}
.doc-row-form .doc-row-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; gap:10px;}
.doc-row-form .doc-row-head .name{font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.doc-row-form .remove-doc{background:none; border:none; color:var(--stamp); font-size:12px; font-weight:600; cursor:pointer; font-family:inherit;}

/* one-click order CTA on shared/preview pages */
.order-cta{position:sticky; bottom:0; z-index:40; margin:0 -20px; padding:14px 20px calc(14px + env(safe-area-inset-bottom,0px)); background:linear-gradient(to top, var(--paper) 60%, transparent); border-top:1px solid var(--line);}

.tab-fade{animation:fadein .25s ease;}

.reorder-card{background:var(--teal-deep); color:#F3EEDF; border-radius:20px; padding:18px 18px 16px; position:relative; overflow:hidden; box-shadow:var(--shadow);}
.reorder-card::after{content:""; position:absolute; right:-30px; top:-30px; width:130px; height:130px; border-radius:50%; background:rgba(255,255,255,.06); pointer-events:none;}
.reorder-card .tag{font-family:var(--font-mono); font-size:11px; letter-spacing:.03em; color:#CFE7DF; opacity:.85;}
.reorder-card .title{font-family:var(--font-display); font-size:19px; font-weight:600; margin:6px 0 3px;}
.reorder-card .meta{font-size:13px; color:#CFE7DF; opacity:.9; margin-bottom:14px;}
.reorder-card .row{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.reorder-card .price{font-family:var(--font-mono); font-size:15px;}

.quick-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:14px 0 4px;}
.quick-item{display:flex; flex-direction:column; align-items:center; gap:7px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px 6px; cursor:pointer; text-align:center; font-family:inherit; color:inherit;}
.quick-item .ic{width:36px; height:36px; border-radius:10px; background:var(--teal-tint); color:var(--teal-deep); display:flex; align-items:center; justify-content:center;}
.quick-item span{font-size:11.5px; font-weight:600;}

.order-card{margin-bottom:12px;}
.order-card .top{display:flex; justify-content:space-between; align-items:flex-start; gap:10px;}
.order-card .ref{font-family:var(--font-mono); font-size:11.5px; color:var(--ink-soft);}
.order-card .name{font-family:var(--font-display); font-weight:600; font-size:15.5px; margin-top:2px;}
.order-card .foot{display:flex; gap:8px; margin-top:14px;}
.stepper{display:flex; align-items:center; margin:14px 0 4px;}
.stepper .seg{flex:1; display:flex; flex-direction:column; align-items:center; position:relative;}
.stepper .seg .dot{width:12px; height:12px; border-radius:50%; background:var(--paper-alt); border:2px solid var(--line); z-index:1;}
.stepper .seg.done .dot{background:var(--teal); border-color:var(--teal);}
.stepper .seg.now .dot{background:var(--stamp); border-color:var(--stamp); box-shadow:0 0 0 4px var(--stamp-tint);}
.stepper .seg .line{position:absolute; top:5px; left:-50%; width:100%; height:2px; background:var(--line); z-index:0;}
.stepper .seg.done .line, .stepper .seg.now .line{background:var(--teal);}
.stepper .seg:first-child .line{display:none;}
.stepper .seg label{font-size:9.5px; margin-top:6px; color:var(--ink-soft); text-align:center;}

.a-title{font-family:var(--font-display); font-weight:600; font-size:24px; margin:0 0 4px; letter-spacing:-.01em;}
.a-sub{color:var(--ink-soft); font-size:13.5px; margin:0 0 22px;}

.kpi-row{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:26px;}
.kpi{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px; box-shadow:var(--shadow);}
.kpi .l{font-size:11.5px; color:var(--ink-soft); font-weight:600;}
.kpi .v{font-family:var(--font-display); font-size:24px; font-weight:600; margin-top:4px;}
.kpi .d{font-size:11px; color:var(--teal); margin-top:4px; font-family:var(--font-mono);}

.kanban{display:grid; grid-template-columns:repeat(4,1fr); gap:16px; align-items:start;}
.kcol{background:var(--paper-alt); border-radius:16px; padding:12px;}
.kcol h4{font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-soft); margin:4px 6px 12px; display:flex; justify-content:space-between;}
.kcard{background:var(--card); border:1px solid var(--line); border-radius:13px; padding:12px; margin-bottom:10px; box-shadow:var(--shadow); display:block;}
.kcard .ref{font-family:var(--font-mono); font-size:10.5px; color:var(--ink-soft);}
.kcard .t{font-weight:600; font-size:13.5px; margin:3px 0 6px;}
.kcard .meta{font-size:11.5px; color:var(--ink-soft); display:flex; justify-content:space-between; margin-bottom:10px; gap:8px;}
.kcard button{width:100%;}

.table-wrap{overflow-x:auto;}
.req-table, .cust-table{width:100%; border-collapse:collapse;}
.req-table th, .cust-table th{text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--ink-soft); padding:0 12px 10px; font-weight:700; border-bottom:1px solid var(--line); white-space:nowrap;}
.req-table td, .cust-table td{padding:13px 12px; border-bottom:1px solid var(--line); font-size:13.5px; vertical-align:middle;}
.req-table tr:hover td, .cust-table tr:hover td{background:var(--card);}
.req-table tr[data-href], .cust-table tr[data-href]{cursor:pointer;}

.helpdesk{display:grid; grid-template-columns:280px 1fr; border:1px solid var(--line); border-radius:16px; overflow:hidden; height:min(620px, calc(100dvh - 210px)); min-height:420px;}
.hd-list{border-right:1px solid var(--line); overflow-y:auto; background:var(--card);}
.hd-row{display:flex; gap:10px; padding:13px 14px; border-bottom:1px solid var(--line); cursor:pointer; align-items:flex-start;}
.hd-row:hover, .hd-row.sel{background:var(--teal-tint);}
.hd-row .av{width:34px; height:34px; border-radius:50%; background:var(--brass); color:#2A1F0C; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12px; flex:none;}
.hd-row .mid{flex:1; min-width:0;}
.hd-row .mid .t{font-weight:600; font-size:13px;}
.hd-row .mid .s{font-size:11.5px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.hd-row .tm{font-size:10px; color:var(--ink-soft); font-family:var(--font-mono);}
.hd-row .unread-dot{display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--stamp); margin-left:6px;}
.hd-thread{display:flex; flex-direction:column; background:var(--paper); min-width:0; min-height:0;}
.hd-thread-head{display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--line); flex:none;}
.hd-thread-head .sp{flex:1;}
.hd-thread-log{flex:1; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:10px; min-height:0;}
.hd-thread-compose{display:flex; gap:8px; padding:14px 18px; border-top:1px solid var(--line); flex:none;}
.hd-thread-compose input{flex:1;}

.editor-split{display:grid; grid-template-columns:280px 1fr; gap:18px;}
.editor-panel{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px;}
.brief-card .row2{margin-bottom:14px;}
.brief-card .row2 .l{font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--ink-soft); font-weight:700; margin-bottom:4px;}
.brief-card .row2 .v{font-size:13.5px;}

.a-notif-item{display:flex; gap:12px; padding:13px 0; border-bottom:1px solid var(--line);}
.a-notif-item .ic{width:36px; height:36px; border-radius:50%; background:var(--paper-alt); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); flex:none;}
.a-notif-item.unread .ic{background:var(--stamp-tint); color:var(--stamp);}
.a-notif-item .mid{flex:1;}
.a-notif-item .mid .t{font-size:13.5px; font-weight:600;}
.a-notif-item .mid .s{font-size:12.5px; color:var(--ink-soft); margin-top:2px;}
.a-notif-item .time{font-size:11px; color:var(--ink-soft); font-family:var(--font-mono);}

/* Incoming call banner for staff: the ringing state before they accept */
.incoming-call-card{display:flex; align-items:center; gap:16px; background:var(--card); border:1px solid var(--line); border-radius:18px; padding:18px; box-shadow:var(--shadow); max-width:420px;}
.incoming-call-card .av{width:52px; height:52px; border-radius:50%; background:var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:17px; flex:none;}
.incoming-call-card .mid{flex:1; min-width:0;}
.incoming-call-card .t{font-weight:700; font-size:14.5px;}
.incoming-call-card .s{font-size:12px; color:var(--ink-soft); font-family:var(--font-mono);}
.incoming-call-card .acts{display:flex; gap:8px;}
.icon-round{width:42px; height:42px; border-radius:50%; border:none; display:flex; align-items:center; justify-content:center; cursor:pointer; color:#fff;}
.incoming-call-dock{position:fixed; right:20px; bottom:20px; z-index:95; display:flex; flex-direction:column; gap:10px;}

/* ==========================================================================
   ICONS + PAGE-LEVEL PIECES (added with the page templates)
   ========================================================================== */

.i{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex:none;}
.i-sm{width:15px; height:15px;} .i-lg{width:22px; height:22px;}

.back{display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--ink-soft); margin:12px 0 2px; font-weight:600;}
.section-head{display:flex; justify-content:space-between; align-items:baseline; margin:22px 0 12px;}
.section-head h2{font-family:var(--font-display); font-weight:600; font-size:16.5px; margin:0;}
.section-head .more{font-size:12.5px; color:var(--teal); font-weight:600;}
.notice{background:var(--teal-tint); color:var(--teal-deep); border-radius:14px; padding:12px 14px; font-size:13px; line-height:1.5; margin:12px 0;}
.notice.warn{background:var(--stamp-tint); color:var(--stamp);}
.kv{display:flex; justify-content:space-between; gap:14px; padding:9px 0; border-bottom:1px dashed var(--line); font-size:13.5px;}
.kv:last-child{border-bottom:none;}
.kv .k{color:var(--ink-soft);} .kv .v{text-align:right; font-weight:600; overflow-wrap:anywhere;}
.mono{font-family:var(--font-mono);}
.muted{color:var(--ink-soft);}
.row{display:flex; gap:10px; align-items:center;}
.grow{flex:1; min-width:0;}
.stack{display:grid; gap:12px;}
.linklike{background:none; border:none; padding:0; font:inherit; color:var(--teal); font-weight:600; cursor:pointer; text-decoration:underline;}
.doc-row a.dl{color:var(--teal); font-size:12px; font-weight:600;}
.stepper.long .seg label{font-size:8.5px;}

/* auth + landing */
.auth-card{max-width:400px; margin:26px auto 0;}
.auth-card h1{font-family:var(--font-display); font-size:26px; margin:0 0 6px; letter-spacing:-.01em;}
.auth-card .field-group{margin-bottom:14px;}
.hero{padding:28px 0 8px;}
.hero h1{font-family:var(--font-display); font-weight:600; font-size:34px; line-height:1.1; letter-spacing:-.02em; margin:0 0 12px;}
.hero p{color:var(--ink-soft); font-size:15.5px; line-height:1.6; margin:0 0 20px;}
.hero .cta{display:flex; gap:10px; flex-wrap:wrap;}
.how{display:grid; gap:10px; margin:8px 0;}
.how .step{display:flex; gap:12px; align-items:flex-start;}
.how .n{width:28px; height:28px; border-radius:50%; background:var(--teal-tint); color:var(--teal-deep); font-family:var(--font-mono); font-size:12px; display:flex; align-items:center; justify-content:center; flex:none;}
.price-table{width:100%; border-collapse:collapse; font-size:13.5px;}
.price-table th{text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--ink-soft); padding:0 0 8px;}
.price-table td{padding:10px 0; border-top:1px solid var(--line); font-family:var(--font-mono);}
.price-table td:first-child{font-family:var(--font-body);}

/* order wizard */
.wiz-step[hidden]{display:none;}
.wiz-foot{position:sticky; bottom:calc(var(--tabbar-h) - 6px); background:linear-gradient(to top, var(--paper) 70%, transparent); padding:14px 0 8px; display:flex; gap:10px; z-index:20;}
.wiz-foot .btn{flex:1;}
.wiz-foot .btn-ghost{flex:0 0 auto;}
.type-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:10px;}
.type-card{display:flex; flex-direction:column; align-items:center; gap:7px; padding:16px 8px; border:1px solid var(--line); border-radius:16px; background:var(--card); cursor:pointer; font-weight:600; font-size:13px; color:var(--ink); font-family:inherit; text-align:center;}
.type-card .ic{width:38px; height:38px; border-radius:11px; background:var(--teal-tint); color:var(--teal-deep); display:flex; align-items:center; justify-content:center;}
.type-card.sel{border-color:var(--teal); box-shadow:0 0 0 1px var(--teal);}
.type-card small{font-weight:500; color:var(--ink-soft); font-size:11px;}
.dropzone{border:1.5px dashed var(--line); border-radius:16px; padding:22px 14px; text-align:center; color:var(--ink-soft); font-size:13px; background:var(--card); cursor:pointer;}
.dropzone.over{border-color:var(--teal); background:var(--teal-tint);}
.dropzone strong{color:var(--ink); display:block; margin-bottom:3px; font-size:14px;}
.dropzone-actions{display:flex; gap:8px; justify-content:center; margin-top:12px; flex-wrap:wrap;}
.doc-row-form .grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.hidden-file{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0);}
.est-card{background:var(--teal-deep); color:#F3EEDF; border-radius:16px; padding:14px 16px; margin-top:14px;}
.est-card .l{font-size:12px; opacity:.8;} .est-card .v{font-family:var(--font-mono); font-size:20px; margin-top:2px;}
.est-card .lines{font-size:11.5px; opacity:.8; margin-top:6px; line-height:1.5;}

/* order detail */
.detail-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin:12px 0 4px;}
.detail-head .ref{font-family:var(--font-mono); font-size:11.5px; color:var(--ink-soft);}
.detail-head h1{font-family:var(--font-display); font-size:22px; margin:2px 0 0; letter-spacing:-.01em;}
.proof-card{border:1.5px solid var(--stamp); background:var(--stamp-tint); border-radius:18px; padding:16px; margin:14px 0;}
.proof-card h3{font-family:var(--font-display); margin:0 0 4px; font-size:16px; color:var(--ink);}
.proof-card p{margin:0 0 12px; font-size:13px; color:var(--ink-soft); line-height:1.5;}
.preview-frame{width:100%; height:58vh; border:1px solid var(--line); border-radius:14px; background:#fff;}

/* chat extras */
.msg.file, .msg.preview_card{display:flex; flex-direction:column; gap:8px;}
.msg .filecard{display:flex; align-items:center; gap:10px; background:rgba(0,0,0,.05); border-radius:12px; padding:9px 10px; color:inherit;}
.msg.me .filecard{background:rgba(255,255,255,.16);}
.msg .filecard .fi{width:34px; height:34px; border-radius:9px; background:var(--paper-alt); color:var(--ink-soft); display:flex; align-items:center; justify-content:center; flex:none;}
.msg .filecard .ft{font-size:12.5px; font-weight:600; overflow-wrap:anywhere;}
.msg .filecard .fs{font-size:11px; opacity:.75;}
.msg .btn{align-self:flex-start;}
.msg img.thumb{max-width:100%; border-radius:12px; display:block;}
.chat-empty{margin:auto; text-align:center; color:var(--ink-soft); font-size:13px; padding:20px;}
.chat-composer .iconbtn{width:42px; height:42px;}
.chat-composer .iconbtn.rec{background:var(--stamp); color:#fff; border-color:var(--stamp); animation:pulse 1.2s infinite;}
@keyframes pulse{50%{opacity:.6;}}
.rec-bar{display:flex; align-items:center; gap:10px; font-family:var(--font-mono); font-size:13px; flex:1; color:var(--stamp);}
.conn{font-size:11px; color:var(--ink-soft);}
.conn.bad{color:var(--stamp);}

/* profile */
.plain-list{list-style:none; margin:0; padding:0;}

/* ---- staff console additions ---- */
.hd-thread-compose textarea{flex:1; min-height:42px; max-height:120px; padding:10px 14px; border-radius:21px; resize:none; line-height:1.35;}
.hd-thread-compose .iconbtn{width:42px; height:42px;}
.hd-empty{display:flex; align-items:center; justify-content:center; height:100%; color:var(--ink-soft); font-size:13.5px; text-align:center; padding:24px;}
.panel-grid{display:grid; gap:16px; align-content:start; min-width:0;}
.editor-panel h3{font-family:var(--font-display); font-size:15px; margin:0 0 12px; display:flex; align-items:center; justify-content:space-between; gap:10px;}
.editor-panel h3 .sub{font-family:var(--font-body); font-size:11.5px; font-weight:500; color:var(--ink-soft);}
.editor-panel form + form{margin-top:12px;}
.inline-form{display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap;}
.inline-form .grow{min-width:120px;}
.inline-form .btn{flex:none;}
.mini-list{list-style:none; margin:0; padding:0;}
.mini-list li{display:flex; gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid var(--line); font-size:13px;}
.mini-list li:last-child{border-bottom:none;}
.mini-list .meta{font-size:11.5px; color:var(--ink-soft); font-family:var(--font-mono);}
.tag{display:inline-block; font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:100px; background:var(--paper-alt); color:var(--ink-soft);}
.tag.ok{background:var(--teal-tint); color:var(--teal-deep);} .tag.bad{background:var(--stamp-tint); color:var(--stamp);}
.contact-links{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px;}
.kcol-empty{font-size:12px; color:var(--ink-soft); text-align:center; padding:14px 6px;}
.rush{color:var(--stamp); font-weight:700; font-size:10.5px; letter-spacing:.03em;}
.a-toolbar{display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-bottom:14px;}


/* ==========================================================================
   UNIFIED RESPONSIVE SHELL  (.shell)
   Same markup for customers, guests and staff — only the nav items differ.
   ========================================================================== */

.shell{display:flex; min-height:100vh; min-height:100dvh; width:100%;}
.main-col{flex:1; min-width:0; display:flex; flex-direction:column;}

/* ---- navigation: ONE element with two presentations (sidebar / bottom bar) ---- */
.side{flex:none; width:var(--side-w); border-right:1px solid var(--line); padding:22px 16px; display:flex; flex-direction:column; gap:6px; position:sticky; top:0; height:100vh; height:100dvh; overflow-y:auto; background:var(--paper); z-index:35;}
.side-brand{display:flex; align-items:center; gap:10px; padding:4px 8px 16px;}
.mk{width:34px; height:34px; border-radius:9px; background:var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:15px; flex:none;}
.side-brand .t{font-family:var(--font-display); font-weight:600; font-size:15px;}
.side-brand .s{font-size:10.5px; color:var(--ink-soft); font-family:var(--font-mono);}
.side-cta{margin:0 0 10px;}
.nav{display:flex; flex-direction:column; gap:4px;}
.nav-item{position:relative; display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:11px; color:var(--ink-soft); font-size:13.5px; font-weight:600; white-space:nowrap; border:none; background:none; font-family:inherit; cursor:pointer;}
.nav-item:hover{background:var(--card); color:var(--ink);}
.nav-item.active{background:var(--teal-tint); color:var(--teal-deep);}
.nav-item .cnt{margin-left:auto; font-family:var(--font-mono); font-size:10.5px; background:var(--stamp); color:#fff; border-radius:100px; padding:1px 7px;}
.nav-item .l-m{display:none;}
.side-grow{flex:1;}
.side-user{display:flex; align-items:center; gap:10px; padding:12px 8px 4px; border-top:1px solid var(--line); margin-top:8px;}
.side-user .av{width:32px; height:32px; border-radius:50%; background:var(--brass); color:#2A1F0C; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12px; flex:none;}
.side-user .t{font-size:12.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.side-user .s{font-size:10.5px; color:var(--ink-soft); font-family:var(--font-mono);}

/* ---- top bar ---- */
.topbar{position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:14px; padding:16px 28px; background:var(--paper); border-bottom:1px solid var(--line); flex:none;}
.tb-brand{display:none; align-items:center; gap:10px; font-family:var(--font-display); font-weight:600; font-size:17px;}
.shell.no-side .tb-brand{display:flex;}
.tb-greet{display:none; flex-direction:column; min-width:0;}
.tb-greet .hi{font-size:12.5px; color:var(--ink-soft);}
.tb-greet .name{font-family:var(--font-display); font-weight:600; font-size:21px; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.tb-search{position:relative; flex:1; max-width:380px;}
.tb-search input{padding-left:38px;}
.tb-search svg{position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--ink-soft); pointer-events:none;}
.tb-spacer{flex:1;}
.tb-branch{font-family:var(--font-mono); font-size:12px; border:1px solid var(--line); background:var(--card); border-radius:100px; padding:8px 14px; color:var(--ink); white-space:nowrap;}
.tb-actions{display:flex; gap:10px; align-items:center; flex:none;}

/* ---- content fills the width ---- */
.content{flex:1; min-width:0; width:100%; padding:26px 28px 64px;}

/* ---- page-level layout helpers ---- */
.split{display:grid; gap:24px; grid-template-columns:minmax(0,1fr);}
.card-grid, .doclist{display:grid; gap:12px; grid-template-columns:minmax(0,1fr);}
.count-pill{font-family:var(--font-mono); font-size:11px; color:var(--ink-soft);}

@media (min-width:700px){
  .card-grid, .doclist{grid-template-columns:repeat(auto-fill,minmax(340px,1fr));}
}

/* ===================== DESKTOP / WIDE  (>= 981px) ===================== */
@media (min-width:981px){
  .split{grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr); align-items:start;}
  .split.even{grid-template-columns:repeat(2,minmax(0,1fr));}
  .sticky-col{position:sticky; top:92px;}
  h1.page-title{font-size:26px; margin:0 0 4px;}
  .doc-scroll{flex-wrap:wrap; overflow:visible;}
  .doc-thumb{width:150px;}
  .quick-grid{gap:14px; margin:0 0 6px;}
  .quick-item{flex-direction:row; justify-content:flex-start; gap:12px; padding:16px 18px; text-align:left;}
  .msg{max-width:min(78%,640px);}
  .toast-stack{left:auto; right:24px; transform:none; top:80px;}

  /* sheets become centred dialogs, not bottom sheets */
  .sheet{left:50%; top:50%; bottom:auto; width:min(620px,92vw); max-width:none; border-radius:22px; max-height:86vh; transform:translate(-50%,-46%) scale(.98); opacity:0; transition:transform .22s ease, opacity .22s ease, visibility 0s .22s;}
  .sheet.show{transform:translate(-50%,-50%) scale(1); opacity:1; transition:transform .22s ease, opacity .22s ease;}
  .sheet.full{left:0; top:0; width:100%; height:100%; max-height:100%; border-radius:0; transform:translateY(100%); opacity:1;}
  .sheet.full.show{transform:translateY(0);}
}

/* defaults that the phone block below overrides (must come first) */
.m-only{display:none;}
.hd-back{display:none;}

/* ===================== PHONES + TABLETS  (<= 980px) ===================== */
@media (max-width:980px){
  .shell{flex-direction:column;}
  .side{position:fixed; left:0; right:0; bottom:0; top:auto; width:auto; height:auto; padding:8px 6px calc(8px + var(--safe-b)); border-right:none; border-top:1px solid var(--line); flex-direction:row; overflow:visible; z-index:45;}
  .side-brand, .side-cta, .side-user, .side-grow, .side-out{display:none;}
  .nav{flex-direction:row; width:100%; gap:0;}
  .nav-item{flex:1; min-width:0; flex-direction:column; justify-content:center; gap:4px; padding:4px 2px; border-radius:0; font-size:10px; background:none !important; color:var(--ink-soft);}
  .nav-item.active{color:var(--teal);}
  .nav-item .l-d{display:none;} .nav-item .l-m{display:inline;}
  .nav-item .cnt{position:absolute; top:-2px; left:calc(50% + 7px); margin:0; min-width:14px; height:14px; font-size:9px; padding:0 3px; display:flex; align-items:center; justify-content:center;}

  .topbar{padding:calc(env(safe-area-inset-top,0px) + 14px) 20px 14px; border-bottom:none;}
  .tb-greet{display:flex;}
  .shell.no-side .tb-greet{display:none;}
  .tb-search, .tb-branch{display:none;}
  .content{padding:2px 20px calc(var(--tabbar-h) + var(--safe-b) + 24px);}
  .split .m-first{order:-1;}
  .incoming-call-dock{left:14px; right:14px; bottom:calc(var(--tabbar-h) + var(--safe-b) + 14px);}
  .a-toolbar{align-items:flex-start;}

  /* staff board: swipe between columns, one main column at a time */
  .kpi-row{grid-template-columns:repeat(2,1fr);}
  .kanban{display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:12px; margin:0 -20px; padding:0 20px 10px; scrollbar-width:none;}
  .kanban::-webkit-scrollbar{display:none;}
  .kcol{flex:0 0 84%; scroll-snap-align:start;}

  /* tables become stacked cards */
  .table-wrap{overflow:visible;}
  .req-table, .cust-table, .req-table tbody, .cust-table tbody{display:block;}
  .req-table thead, .cust-table thead{display:none;}
  .req-table tbody, .cust-table tbody{display:grid; gap:10px;}
  .req-table tr, .cust-table tr{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; align-items:center; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--card);}
  .req-table td, .cust-table td{display:block; padding:0; border:0;}
  .req-table tr:hover td, .cust-table tr:hover td{background:none;}
  .req-table tr{grid-template-areas:"req status" "cust placed" "act act";}
  .cust-table tr{grid-template-areas:"name orders" "phone last" "act act";}
  .req-table td.c-req{grid-area:req;} .req-table td.c-status{grid-area:status; justify-self:end;} .req-table td.c-cust{grid-area:cust;} .req-table td.c-placed{grid-area:placed; justify-self:end;} .req-table td.c-act, .cust-table td.c-act{grid-area:act;} .req-table td.c-ref{display:none;}
  .cust-table td.c-name{grid-area:name;} .cust-table td.c-orders{grid-area:orders; justify-self:end;} .cust-table td.c-phone{grid-area:phone;} .cust-table td.c-last{grid-area:last; justify-self:end;}
  .c-act .btn{margin-right:6px;}
  .m-only{display:inline;}

  /* helpdesk: list first, then the thread full-screen (like a messaging app) */
  .helpdesk{display:block; height:auto; min-height:0; border:none; border-radius:0; background:none; overflow:visible;}
  .hd-list{border:1px solid var(--line); border-radius:16px; overflow:hidden;}
  .helpdesk.show-thread .hd-list{display:none;}
  .helpdesk:not(.show-thread) .hd-thread{display:none;}
  .hd-back{display:flex;}
  .hd-thread{height:100%;}

  /* chat pages: the log scrolls; the header/composer/tab bar stay put */
  body.chat-page .topbar{display:none;}
  body.chat-page .a-title, body.chat-page .a-sub{display:none;}
  body.chat-page .content{padding-top:calc(env(safe-area-inset-top,0px) + 10px); padding-bottom:calc(var(--tabbar-h) + var(--safe-b));}
}
@media (max-width:560px){ .kpi-row{grid-template-columns:repeat(2,1fr);} .kpi .v{font-size:20px;} }

/* ---- chat page frame (both audiences) ---- */
body.chat-page .main-col{height:100vh; height:100dvh;}
body.chat-page .content{display:flex; flex-direction:column; min-height:0; overflow:hidden; padding-bottom:26px;}
@media (max-width:980px){ body.chat-page .content{padding-bottom:calc(var(--tabbar-h) + var(--safe-b));} }
body.chat-page .helpdesk{flex:1; height:auto; min-height:0;}
body.chat-page .chat-log{flex:1; min-height:0; overflow-y:auto; scrollbar-width:none;}
body.chat-page .chat-log::-webkit-scrollbar{display:none;}
.chat-panel{display:flex; flex-direction:column; flex:1; min-height:0; min-width:0;}
.chat-head{display:flex; align-items:center; gap:10px; padding:4px 0 12px; border-bottom:1px solid var(--line); margin-bottom:10px; flex:none;}
.chat-head .grow .t{font-weight:600; font-size:15px;}
@media (min-width:981px){
  .chat-panel{border:1px solid var(--line); border-radius:16px; background:var(--card); overflow:hidden;}
  .chat-head{padding:14px 18px; margin:0;}
  .chat-panel .chat-log{padding:18px;}
  .chat-panel .chat-composer{background:none; border-top:1px solid var(--line); padding:14px 18px;}
  .chat-panel .doc-row{margin:12px 18px 0 !important;}
}
.hd-thread .chat-log{padding:18px;}

/* ---- customer home layout (mobile order = reorder, quick actions, active order, recents) ---- */
.home-grid{display:grid; gap:0; grid-template-columns:minmax(0,1fr);}
@media (min-width:981px){
  .home-grid{grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr); grid-template-areas:"quick quick" "reorder recent" "active recent"; gap:6px 24px; align-items:start;}
  .hg-quick{grid-area:quick;} .hg-reorder{grid-area:reorder;} .hg-active{grid-area:active;} .hg-recent{grid-area:recent;}
  .hg-active .section-head:first-child, .hg-recent .section-head:first-child{margin-top:6px;}
  .home-grid .empty-state{grid-column:1 / -1;}
  .how{grid-template-columns:repeat(3,1fr); gap:24px;}
  .hero h1{font-size:44px;} .hero p{max-width:640px; font-size:17px;}
}
.editor-split{grid-template-columns:minmax(0,1fr);}
@media (min-width:981px){ .editor-split{grid-template-columns:300px minmax(0,1fr);} }

/* ---- order wizard, desktop: sections stacked on the left, live summary on the right ---- */
.desktop-submit{display:none; margin-top:14px;}
@media (min-width:981px){
  .steps-track{display:none;}
  #orderForm.wiz-desktop{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr); column-gap:32px; align-items:start;}
  #orderForm.wiz-desktop .wiz-step{grid-column:1;}
  #orderForm.wiz-desktop .wiz-step[data-step="1"]{grid-row:2;}
  #orderForm.wiz-desktop .wiz-step[data-step="2"]{grid-row:3; margin-top:28px;}
  #orderForm.wiz-desktop .wiz-step[data-step="3"]{grid-row:4; margin-top:28px;}
  #orderForm.wiz-desktop .wiz-step[data-step="4"]{grid-column:2; grid-row:2 / span 3; position:sticky; top:92px; margin-top:0;}
  #orderForm.wiz-desktop .wiz-step[data-step="2"]::before, #orderForm.wiz-desktop .wiz-step[data-step="3"]::before{display:block; font-family:var(--font-display); font-weight:600; font-size:16px; margin-bottom:12px; padding-top:22px; border-top:1px solid var(--line);}
  #orderForm.wiz-desktop .wiz-step[data-step="2"]::before{content:"Options";}
  #orderForm.wiz-desktop .wiz-step[data-step="3"]::before{content:"Delivery";}
  #orderForm.wiz-desktop .wiz-step[data-step="4"]::before{content:"Your order"; display:block; font-family:var(--font-display); font-weight:600; font-size:16px; margin-bottom:12px;}
  #orderForm.wiz-desktop #wizError{grid-column:1 / -1; grid-row:1;}
  #orderForm.wiz-desktop .wiz-foot{display:none;}
  #orderForm.wiz-desktop .desktop-submit{display:flex;}
  #orderForm.wiz-desktop .type-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  #orderForm.wiz-desktop .stack{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* ---- fixes from the visual pass ---- */
.reorder-card .tag{background:none; padding:0; border-radius:0; font-weight:400; display:block; color:#CFE7DF;}
.msg a{text-decoration:none;}
.msg > a:not(.btn):not(.filecard){text-decoration:underline;}
.msg .filecard .ft{text-decoration:underline;}
@media (min-width:981px){
  .doc-scroll{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; overflow:visible;}
  .doc-thumb{width:auto;}
  h1.page-title{margin:0 0 18px;}
  .back{margin:0 0 10px;}
  .a-title{margin-bottom:4px;}
}

@media (min-width:981px){
  .detail-actions{justify-content:flex-start;}
  .detail-actions .grow{flex:none;}
  .detail-actions .btn{padding:9px 22px;}
  .proof-card .btn-block{width:auto; padding-left:28px; padding-right:28px;}
}

/* ==========================================================================
   HOME PAGE — public landing page
   All components build on the shared design tokens above (--teal, --paper,
   --card, --ink, --brass, --stamp, --line, --font-display, --font-mono …).
   The home page uses the .shell.no-side layout (no sidebar, full-width).
   ========================================================================== */

/* --- Layout shell for the landing page --- */
.home-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
@media (max-width: 640px) { .home-wrap { padding: 0 16px 48px; } }

/* --- Section scaffolding --- */
.section {
  padding: 52px 0;
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: none; }
.section-head { max-width: 56ch; margin-bottom: 28px; }
.section-head .u-eyebrow { display: block; margin-bottom: 8px; }
.section-head p { margin-top: 8px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }

.u-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tear-line { height: 1px; background: var(--line); }
.muted { color: var(--ink-soft); }
.linklike { text-decoration: underline; color: var(--ink); }

/* --- HERO --- */
.hero {
  display: grid;
  gap: 36px;
  padding: 20px 0 8px;
  animation: fadein 420ms ease;
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; padding: 40px 0 20px; }
}

.hero-copy .u-eyebrow { margin-bottom: 14px; }
.hero-copy .u-eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 7px;
  vertical-align: middle;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 18ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(36, 86, 76, 0.35);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.hero-lede {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 24px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.hero-copy .hero-ctas .btn { padding: 13px 22px; font-size: 14.5px; }
.hero-guest-note { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 20px; }
.hero-guest-note a { text-decoration: underline; color: var(--ink); }

.hero-trust-row { display: flex; flex-wrap: wrap; gap: 14px; }
.trust-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.trust-item svg { width: 14px; height: 14px; color: var(--teal); flex: none; }

/* --- Hero mock docket --- */
.hero-visual { position: relative; }
.mock-docket {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 20px 18px 24px;
  max-width: 360px;
  margin: 0 auto;
  transform: rotate(-1.5deg);
}
.mock-docket::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--teal);
  border-radius: 16px 0 0 16px;
}
.mock-docket-tag {
  position: absolute; top: -12px; left: 22px;
  background: var(--brass); color: #2A1F0C;
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 9px; border-radius: 100px;
}
.mock-docket-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.mock-docket-head .u-mono { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); }
.mock-docket-head h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-top: 2px; }
.mock-docket-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.mock-docket-row { display: flex; justify-content: space-between; font-size: 13px; gap: 12px; }
.mock-docket-row .k { color: var(--ink-soft); }
.mock-docket-row .v { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.mock-docket .tear-line { margin: 14px -20px 14px -24px; }
.mock-docket-total { display: flex; justify-content: space-between; align-items: baseline; }
.mock-docket-total .k { font-family: var(--font-mono); text-transform: uppercase; font-size: 10px; letter-spacing: 0.04em; color: var(--ink-soft); }
.mock-docket-total .v { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; }
.mock-docket-caption { text-align: center; font-size: 11px; color: var(--ink-soft); margin-top: 14px; line-height: 1.4; }

.hero-visual .floaty {
  position: absolute;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px 12px;
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
}
.hero-visual .floaty svg { width: 14px; height: 14px; color: var(--teal); }
.hero-visual .floaty-1 { top: -8px; right: 4px; transform: rotate(2.5deg); }
.hero-visual .floaty-2 { bottom: 6px; left: -6px; transform: rotate(-3.5deg); color: var(--brass); }
.hero-visual .floaty-2 svg { color: var(--brass); }
@media (max-width: 560px) {
  .hero-visual .floaty { display: none; }
  .mock-docket { transform: none; }
}

/* badge reused inside mock docket */
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 100px;
  background: var(--paper-alt); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.badge-role-admin   { color: var(--stamp); border-color: var(--stamp-tint); background: var(--stamp-tint); }
.badge-role-finance { color: var(--brass); border-color: var(--paper-alt); background: var(--paper-alt); }
.badge-role-editor  { color: var(--teal-deep); border-color: var(--teal-tint); background: var(--teal-tint); }

/* --- HOW IT WORKS — ticket stub steps --- */
.steps { display: grid; gap: 18px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: visible;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step:nth-child(1) { --tilt: -0.5deg; }
.step:nth-child(2) { --tilt:  0.4deg; }
.step:nth-child(3) { --tilt: -0.3deg; }
.step:nth-child(4) { --tilt:  0.5deg; }
.step:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 4px 20px rgba(38,33,27,.18); }

.step-stub {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.step-stub .step-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--teal);
  background: var(--teal-tint);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; flex: none;
}
.step-body { padding: 14px 16px 18px; }
.step h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.step .step-status { margin-top: 12px; }

/* punch-hole notches */
.step::before, .step::after {
  content: "";
  position: absolute; top: 39px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
}
.step::before { left: -7px; }
.step::after  { right: -7px; }

/* --- ORDER TYPES — index cards --- */
.type-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .type-grid { grid-template-columns: repeat(5, 1fr); } }

.type-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 2px 12px 12px 12px;
  padding: 20px 14px 14px;
  display: flex; flex-direction: column; gap: 7px;
  box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
}
.type-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: var(--stamp); opacity: 0.5;
  border-radius: 2px 12px 0 0;
}
.type-card::after {
  content: "";
  position: absolute; left: 12px; right: 12px; top: 42px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 10px);
}
.type-icon {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--teal-tint); display: grid; place-items: center;
  color: var(--teal-deep); margin-bottom: 8px;
}
.type-icon svg { width: 15px; height: 15px; }
.type-card h3 { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.type-card p  { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.type-tag {
  margin-top: auto; padding-top: 10px;
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: space-between;
}
a.type-card { cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.12s ease; }
a.type-card:hover, a.type-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(38,33,27,.18);
  border-color: var(--teal);
}
a.type-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.type-go {
  opacity: 0; transform: translateX(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  color: var(--teal); font-weight: 700;
}
a.type-card:hover .type-go,
a.type-card:focus-visible .type-go { opacity: 1; transform: translateX(0); }

/* --- PRICING — receipt slips --- */
.price-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }

.price-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 4px 4px 14px 14px;
  padding: 0 16px 16px;
  box-shadow: var(--shadow);
}
.price-card .tear-line { margin: 0 -16px 12px; }
.price-card .receipt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 10px;
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.price-icon { color: var(--teal); }
.price-icon svg { width: 18px; height: 18px; }
.price-card h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.price-card p  { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.price-card a  { text-decoration: underline; color: var(--teal-deep); }
.price-example {
  margin-top: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft);
  background: var(--paper-alt); border-radius: 8px; padding: 7px 10px;
  border: 1px dashed var(--line);
}

/* --- PAPER STACK — FAQ notes with tape --- */
.paper-stack { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.paper {
  --tilt: calc((var(--i) - 2) * 1.5deg);
  position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 18px 16px 16px;
  transform: rotate(var(--tilt));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
}
.paper::before {
  content: "";
  position: absolute; left: 50%; top: -7px;
  width: 26px; height: 13px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(180, 134, 58, 0.45);
  border: 1px solid rgba(180, 134, 58, 0.6);
  border-radius: 2px;
}
.paper .u-eyebrow { font-size: 10px; }
.paper h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 5px 0 8px; }
.paper p  { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.paper:hover { transform: rotate(0deg) translateY(-5px) scale(1.02); box-shadow: 0 6px 24px rgba(38,33,27,.2); z-index: 5; }
@media (max-width: 560px) {
  .paper { transform: none; }
  .paper::before { display: none; }
}

/* --- TRUST STRIP — stamped certificate --- */
.trust-strip {
  position: relative;
  display: grid; gap: 16px;
  padding: 28px 26px;
  border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
  outline: 1px solid var(--line); outline-offset: -6px;
  box-shadow: var(--shadow);
}
@media (min-width: 780px) {
  .trust-strip { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px; }
}
.trust-strip h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.trust-strip > div > p { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 10px; line-height: 1.6; }
.trust-checklist { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.trust-checklist li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink); }
.trust-checklist svg { width: 15px; height: 15px; color: var(--teal); flex: none; margin-top: 2px; }
.trust-stamp {
  position: absolute; top: 14px; right: 16px;
  width: 70px; height: 70px; border-radius: 50%;
  border: 2px dashed rgba(36, 86, 76, 0.5);
  color: var(--teal-deep);
  display: grid; place-items: center; text-align: center;
  transform: rotate(-9deg);
  font-family: var(--font-mono); text-transform: uppercase;
  font-size: 9px; line-height: 1.3; letter-spacing: 0.03em;
  padding: 4px;
}

/* escrow flow diagram */
.escrow-diagram {
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; text-align: center;
}
.escrow-diagram .eq { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.escrow-diagram .dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper-alt); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-soft);
}
.escrow-diagram .eq.is-hold .dot { color: var(--brass); border-color: var(--brass); }
.escrow-diagram .eq.is-release .dot { color: var(--teal); border-color: var(--teal); }
.escrow-diagram .lbl { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.escrow-diagram .arrow { color: var(--line); flex: none; }
.escrow-diagram .arrow svg { width: 14px; height: 14px; }

/* --- SHELF — reference books --- */
.shelf-wrap { padding: 4px 0 16px; }
.shelf { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.book {
  position: relative; display: flex;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.book:hover, .book:focus-within { transform: translateY(-4px); box-shadow: 0 6px 24px rgba(38,33,27,.2); }
.book:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }

.book-spine {
  flex: none; width: 36px;
  background: var(--book-color, var(--teal)); color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 12px 0 10px;
  box-shadow: inset -4px 0 6px rgba(0,0,0,.18), inset 2px 0 0 rgba(255,255,255,.12);
}
.book-vol { font-family: var(--font-mono); font-size: 9px; opacity: 0.8; }
.book-title {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.02em;
  text-transform: uppercase; line-height: 1.2; text-align: center;
}
.book-cover { flex: 1; min-width: 0; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 5px; }
.book-cover .u-eyebrow { font-size: 10px; }
.book-cover h3 { font-family: var(--font-display); font-size: 14px; font-weight: 600; margin: 2px 0; }
.book-cover p  { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

/* --- STAFF CALLOUT — memo note --- */
.staff-callout {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px;
  padding: 22px 22px 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: repeating-linear-gradient(var(--card) 0 31px, var(--line) 31px 32px);
  box-shadow: var(--shadow);
  transform: rotate(-0.3deg);
}
.staff-callout::before {
  content: "";
  position: absolute; top: -9px; left: 26px;
  width: 28px; height: 16px;
  background: rgba(180, 134, 58, 0.5);
  border: 1px solid rgba(180, 134, 58, 0.7);
  border-radius: 2px; transform: rotate(3deg);
}
.staff-callout .u-eyebrow { display: block; margin-bottom: 5px; }
.staff-callout > div > p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; max-width: 46ch; }
.roles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* --- CLOSING CTA --- */
.closing-cta { text-align: center; padding: 48px 20px 8px; }
.closing-cta h2 { font-family: var(--font-display); font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem); font-weight: 600; margin-bottom: 10px; }
.closing-cta > p { max-width: 42ch; margin: 0 auto 20px; font-size: 14px; color: var(--ink-soft); }
.closing-cta .hero-ctas { justify-content: center; }
.closing-cta .btn { width: auto; min-width: 0; }

/* --- footer note --- */
.footer-note { text-align: center; padding: 22px 0 4px; color: var(--ink-soft); font-size: 12px; }