/*
 * Standalone stylesheet. Deliberately does not share app.css with the CRM:
 * this is a public, customer-facing surface and shouldn't break because an
 * internal style changed. It borrows the same palette so the two look related.
 */
:root{
  --ink:#1F3A34; --ink-soft:#3E5850;
  --paper:#F5F1E8; --paper-raised:#FFFFFF;
  --line:#DAD3C2; --line-strong:#C3BAA4;
  --mustard:#B8792E; --mustard-soft:#EFDFC7;
  --sage:#7C9082; --sage-soft:#E4E9DF;
  --brick:#B8433C; --brick-soft:#F3DEDB;
  --green-dot:#4C8B5C;
  --text-muted:#8A8570; --subtle-bg:#FBF9F3; --radius:6px;
}
*{box-sizing:border-box;}
body{margin:0;background:var(--paper);color:var(--ink);
     font-family:'IBM Plex Sans',sans-serif;-webkit-font-smoothing:antialiased;
     /* One font (2026-10-27): same-width digits, so figures line up without a code face. */
     font-variant-numeric:tabular-nums;}

.centred{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;}
.card{background:var(--paper-raised);border:1px solid var(--line);border-radius:10px;
      padding:32px;width:100%;max-width:420px;}
.card.wide{max-width:620px;}

.brand{font-family:'Fraunces',serif;font-weight:600;font-size:21px;display:block;}
.brand.small{font-size:17px;}
.sub{font-size:13px;color:var(--ink-soft);margin:6px 0 20px;}
h2{font-family:'Fraunces',serif;font-size:20px;font-weight:600;margin:18px 0 8px;}
h3{font-family:'Fraunces',serif;font-size:15px;font-weight:600;margin:22px 0 10px;
   padding-bottom:6px;border-bottom:1px solid var(--line);}
a{color:var(--ink);text-decoration:underline;}

/* position:relative anchors the absolutely-positioned validation message. */
.field{margin-bottom:14px;display:flex;flex-direction:column;position:relative;}
.field label{font-size:12px;font-weight:500;margin-bottom:5px;color:var(--ink-soft);}
.field label .optional{font-weight:400;color:var(--text-muted);font-size:11px;}
.field-error-msg{position:absolute;top:0;right:0;color:var(--brick);font-size:11px;font-weight:600;margin:0;white-space:nowrap;}
/* Address check feedback. Deliberately quieter than field-error-msg above —
   this is advice and must not read as a rejection of what somebody typed. */
.address-check{background:var(--subtle-bg);border:1px solid var(--line);border-radius:var(--radius);padding:10px 12px;margin:-6px 0 16px;}
.address-check-actions{display:flex;gap:8px;margin-top:8px;}
.address-check-note{font-size:12px;color:var(--text-muted);margin:-6px 0 14px;}
.address-check .address-check-note{margin:0;color:var(--ink-soft);}
.address-check-note.ok{color:var(--green-dot);}
.address-check-note.warn{color:var(--mustard);}
.field.field-invalid input,
.field.field-invalid select,
.field.field-invalid textarea{border-color:var(--brick) !important;}
input,textarea,select{font-family:'IBM Plex Sans',sans-serif;font-size:14px;padding:9px 11px;
  border:1px solid var(--line-strong);border-radius:var(--radius);
  background:var(--paper-raised);color:var(--ink);width:100%;}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--mustard);
  box-shadow:0 0 0 2px var(--mustard-soft);}
textarea{resize:vertical;}
.hint{font-size:12px;color:var(--text-muted);margin-top:5px;line-height:1.5;}

.row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.row.three{grid-template-columns:1.4fr 0.6fr 0.8fr;}
@media (max-width:560px){ .row,.row.three{grid-template-columns:1fr;} }

.btn{font-family:'IBM Plex Sans',sans-serif;font-size:14px;font-weight:500;padding:10px 18px;
  border-radius:var(--radius);border:1px solid var(--ink);background:var(--ink);
  color:var(--paper);cursor:pointer;width:100%;}
.btn:hover{background:var(--ink-soft);}
.btn:disabled{opacity:0.5;cursor:default;}
.btn.ghost{background:transparent;color:var(--ink);border-color:var(--line-strong);}
.btn.ghost:hover{background:var(--subtle-bg);}
.btn.small{width:auto;padding:6px 12px;font-size:13px;}
.modal-actions{display:flex;gap:10px;margin-top:20px;}

.alert{padding:11px 14px;border-radius:var(--radius);font-size:13px;margin-bottom:16px;line-height:1.5;}
.alert.error{background:var(--brick-soft);color:#8C332E;border:1px solid var(--brick);}
.alert.info{background:var(--sage-soft);color:#3E5340;border:1px solid var(--sage);}
.muted{color:var(--text-muted);font-size:13px;}
/* Custom order stage track */
.stage-track{display:inline-flex;gap:5px;align-items:center;margin-top:5px;}
.stage-dot{width:22px;height:4px;border-radius:2px;background:var(--line-strong);display:inline-block;}
.stage-dot.done{background:var(--sage);}
pre.contract{white-space:pre-wrap;font-family:inherit;font-size:13px;line-height:1.6;
  background:var(--subtle-bg);border:1px solid var(--line);border-radius:var(--radius);
  padding:14px;max-height:280px;overflow-y:auto;margin:10px 0 16px;}

/* Order builder */
.tab-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap;}
.tab-head h2{margin:0;}
.ob-results{max-height:210px;overflow-y:auto;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--paper-raised);margin-bottom:4px;}
.ob-results:empty{display:none;}
.ob-result{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 12px;
  border-bottom:1px solid var(--line);cursor:pointer;font-size:13px;}
.ob-result:last-child{border-bottom:none;}
.ob-result:hover{background:var(--subtle-bg);}
.data tfoot td{border-top:2px solid var(--line-strong);padding-top:10px;}

.pref-list{display:flex;flex-direction:column;gap:2px;margin-top:14px;}
.pref{display:flex;gap:10px;align-items:flex-start;padding:11px 12px;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--paper-raised);cursor:pointer;font-size:13px;}
.pref:hover{border-color:var(--line-strong);}
.pref input{margin-top:2px;flex:0 0 auto;width:auto;}
.pref .hint{margin-top:2px;}
ul.always-on{margin:6px 0 0;padding-left:18px;}
ul.always-on li{margin-bottom:3px;}

.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:16px 28px;background:var(--paper-raised);border-bottom:1px solid var(--line);}
.topbar-right{display:flex;align-items:center;gap:14px;}
.main{max-width:940px;margin:0 auto;padding:32px 28px 60px;}
@media (max-width:560px){ .topbar{padding:14px 18px;} .main{padding:22px 18px 48px;} }

.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);
  background:var(--ink);color:var(--paper);padding:11px 18px;border-radius:var(--radius);
  font-size:13px;display:none;z-index:100;max-width:90vw;}
.toast.show{display:block;}

.empty{border:1px dashed var(--line-strong);border-radius:8px;padding:34px 20px;text-align:center;}
.empty h3{border:none;margin:0 0 6px;}

/* Account tabs */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:22px;flex-wrap:wrap;}
.tab{background:none;border:none;border-bottom:2px solid transparent;padding:9px 14px;
  font-family:inherit;font-size:14px;color:var(--ink-soft);cursor:pointer;}
.tab:hover{color:var(--ink);}
.tab.active{color:var(--ink);border-bottom-color:var(--mustard);font-weight:500;}

/* Overview stats */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-top:18px;}
.stat{background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;padding:16px;}
.stat-label{display:block;font-size:12px;color:var(--text-muted);margin-bottom:6px;}
.stat-value{font-family:'Fraunces',serif;font-size:23px;font-weight:600;}
.stat-value.owing{color:var(--brick);}

/* Tables */
table.data{width:100%;border-collapse:collapse;background:var(--paper-raised);
  border:1px solid var(--line);border-radius:8px;overflow:hidden;}
table.data th{text-align:left;font-variant-numeric:tabular-nums;font-size:10px;
  text-transform:uppercase;letter-spacing:0.06em;color:var(--text-muted);
  padding:10px 12px;background:var(--subtle-bg);border-bottom:1px solid var(--line);}
table.data td{padding:11px 12px;font-size:13px;border-bottom:1px solid var(--line);}
table.data tr:last-child td{border-bottom:none;}
.mono{font-variant-numeric:tabular-nums;}
table.totals{width:100%;max-width:280px;margin-left:auto;margin-top:14px;border-collapse:collapse;}
table.totals td{padding:6px 0;font-size:13px;}
table.totals td:last-child{text-align:right;}
table.totals tr.grand td{border-top:1px solid var(--line-strong);font-weight:600;padding-top:9px;}
@media (max-width:560px){ table.data{display:block;overflow-x:auto;} }

/* Status pills */
.pill{display:inline-block;font-size:11px;padding:3px 9px;border-radius:20px;white-space:nowrap;}
.pill.ok{background:var(--green-dot);color:#fff;}
.pill.info{background:var(--sage-soft);color:#3E5340;}
.pill.wait{background:var(--mustard-soft);color:#8A5A1E;}
.pill.bad{background:var(--brick-soft);color:#8C332E;}
.pill.muted{background:var(--subtle-bg);color:var(--text-muted);}

/* Detail sheet */
.overlay{position:fixed;inset:0;background:rgba(31,58,52,0.45);
  align-items:flex-start;justify-content:center;padding:32px 20px;overflow-y:auto;z-index:90;display:flex;}
.sheet{background:var(--paper-raised);border-radius:10px;padding:26px;width:100%;max-width:640px;}
.sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:6px;}
.sheet-head h2{margin:0;}

/* Printing an invoice should give a clean page, not the whole app. */
@media print{
  .topbar,.tabs,.btn,.toast,.mnav,.mnav-more{display:none !important;}
  .overlay{position:static;background:none;padding:0;display:block;}
  .sheet{max-width:none;border:none;padding:0;}
}

/* ---------- messages ---------- */
.msg-thread{max-height:420px;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:4px 2px;}
.msg{max-width:78%;padding:9px 12px;border-radius:10px;border:1px solid #e3ddcf;background:#fff;}
.msg.mine{align-self:flex-end;background:#eef3ea;border-color:#cfdac7;}
.msg.theirs{align-self:flex-start;}
.msg-meta{font-size:11px;color:#8a8574;margin-bottom:3px;}
.msg-body{white-space:pre-wrap;word-break:break-word;font-size:14px;}

/* ---------- list toolbar (custom requests) ---------- */
/* Both .btn and every input are width:100% portal-wide, which is right for a
   form and wrong in a row: .tab-head has always been justify-content:
   space-between, and that could never do anything while the button filled the
   line. An action beside a heading sizes to its own text. */
.tab-head .btn{width:auto;flex:0 0 auto;}

/* The search takes the slack so the status select stays its natural width,
   and both drop onto their own lines on a phone rather than squashing. */
.pf-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 14px;}
.pf-toolbar .pf-search{flex:1 1 240px;width:auto;min-width:0;}
.pf-toolbar select{flex:0 0 auto;width:auto;}
@media (max-width:520px){
  .pf-toolbar .pf-search,.pf-toolbar select{flex:1 1 100%;}
}

/* ---------- the catalogue ---------- */

.cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;}

/* A card is a button, so the browser's own button styling has to be undone
   rather than merely overridden in places. text-align matters: a default
   button centres everything, including the name and price. */
.cat-card{display:flex;flex-direction:column;gap:0;padding:0;text-align:left;font:inherit;color:inherit;
  background:var(--paper-raised);border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;cursor:pointer;width:100%;}
.cat-card:hover{border-color:var(--line-strong);background:var(--subtle-bg);}

/* A fixed square whether or not there is a photo. An image that simply isn't
   rendered leaves its card shorter than its neighbours, and a grid of
   different-height cards reads as a failed load rather than a missing photo. */
.cat-photo{position:relative;display:flex;align-items:center;justify-content:center;width:100%;
  aspect-ratio:1;background:var(--subtle-bg);border-bottom:1px solid var(--line);
  overflow:hidden;flex:0 0 auto;}
/* Absolute, so the photograph never sizes its own box. With the image in flow,
   `height:100%` against an aspect-ratio height is circular and the browser
   falls back to the image's intrinsic ratio — a portrait Etsy shot then made a
   taller card than a square one, and the row went ragged. Measured at two
   distinct card heights before this, one after. */
.cat-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;}
.cat-photo.empty{background:repeating-linear-gradient(45deg,var(--subtle-bg),var(--subtle-bg) 10px,
  var(--paper) 10px,var(--paper) 20px);}
.cat-photo.empty .hint{text-align:center;padding:0 10px;}

.cat-card-body{display:flex;flex-direction:column;gap:3px;padding:10px 12px 12px;}
/* Etsy-imported names run past 70 characters, which no card width survives.
   Clamped to two lines with the full text on a title attribute. */
/* min-height reserves BOTH lines whether or not the name needs them. Without
   it a short name makes a shorter card, and the row it sits in goes ragged —
   invisible on wide screens where every Etsy name wraps anyway, and obvious on
   a phone. Measured at two distinct card heights before, one after. */
.cat-name{font-weight:600;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;min-height:2.6em;}
.cat-meta{font-size:12px;color:var(--text-muted);min-height:16px;}
/* Two lines by construction — see cataloguePriceFromHtml. Both labels and
   both price kinds therefore occupy identical space. */
.cat-price{margin-top:2px;}
.cat-price-label{display:block;font-size:11px;color:var(--text-muted);line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cat-price-value{display:block;font-size:14px;font-weight:600;line-height:1.3;}

/* The picks bar. Sticks under the toolbar so what has been chosen stays in
   view while scrolling a long grid. */
.cat-basket{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;background:var(--sage-soft);border:1px solid var(--sage);
  border-radius:var(--radius);padding:10px 14px;margin-bottom:14px;color:#3E5340;font-size:13px;}
.cat-basket-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
/* One line, or a dozen picks push the buttons off the bar. */
.cat-basket-text .hint{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52ch;}
.cat-basket-actions{display:flex;gap:8px;flex:0 0 auto;}

.cat-detail{display:flex;gap:16px;align-items:flex-start;margin-bottom:6px;}
.cat-detail .cat-photo{width:140px;flex:0 0 140px;border:1px solid var(--line);border-radius:var(--radius);}
/* Etsy listing copy runs to 4,000 characters. Scroll it rather than letting
   it push the options somebody opened the piece to see off the screen. */
.cat-description{max-height:150px;overflow-y:auto;font-size:13px;line-height:1.5;white-space:pre-line;}

.cat-variations{display:flex;flex-direction:column;border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;}
.cat-variation{display:flex;align-items:center;gap:12px;padding:10px 12px;font-size:13px;
  border-bottom:1px solid var(--line);background:var(--paper-raised);}
.cat-variation:last-child{border-bottom:none;}
.cat-variation-photo{width:38px;height:38px;object-fit:cover;border-radius:4px;flex:0 0 auto;}
/* min-width:0 or a long finish name refuses to shrink and pushes the Add
   button out of the row. */
.cat-variation-text{display:flex;flex-direction:column;gap:1px;flex:1 1 auto;min-width:0;}
.cat-variation-price{text-align:right;flex:0 0 auto;line-height:1.35;}

@media (max-width:520px){
  .cat-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));}
  .cat-detail{flex-direction:column;}
  .cat-detail .cat-photo{width:100%;flex:0 0 auto;}
  .cat-basket{position:static;}
}

/* ---------- the mobile bottom bar ---------- */

/* Nine sections wrapped to three rows on a phone. Four sit in a thumb-reachable
   bar and the rest go behind More.

   640px, not the 520px used elsewhere: the tab row needs 823px of width for
   nine tabs (more with consignment on), so between 640 and 880 it wraps to two
   tidy rows, which is fine. Three rows on a phone was the problem. */
.mnav{display:none;}
.mnav-more{display:none;}

@media (max-width:640px){
  .tabs{display:none;}

  .mnav{position:fixed;left:0;right:0;bottom:0;z-index:80;display:flex;
    background:var(--paper-raised);border-top:1px solid var(--line);
    /* The home indicator on a modern iPhone sits over the bottom of the
       screen; without the inset the last row of labels is under it. */
    padding-bottom:env(safe-area-inset-bottom,0px);}

  .mnav-item{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:3px;
    /* 52px plus the label keeps every target past the 44px minimum. */
    padding:8px 2px 9px;background:none;border:none;font-family:inherit;font-size:10px;
    line-height:1.2;color:var(--ink-soft);cursor:pointer;}
  .mnav-item span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .mnav-item.active{color:var(--mustard);font-weight:500;}
  .mnav-ic{width:22px;height:22px;stroke:currentColor;fill:none;}

  /* Messages normally lives behind More, so its count has to show on More. */
  .mnav-badge{position:absolute;top:4px;left:calc(50% + 6px);min-width:16px;height:16px;
    padding:0 4px;border-radius:9px;background:var(--brick);color:#fff;
    font-size:10px;line-height:16px;text-align:center;}

  /* Below the bar's z-index deliberately: an order or invoice modal must cover
     the navigation, not compete with it. */
  .mnav-more{position:fixed;inset:0;z-index:79;}
  .mnav-scrim{position:absolute;inset:0;background:rgba(31,58,52,0.45);}
  .mnav-panel{position:absolute;left:0;right:0;bottom:0;background:var(--paper-raised);
    border-top:1px solid var(--line);border-radius:12px 12px 0 0;padding:8px 0;
    padding-bottom:calc(8px + 62px + env(safe-area-inset-bottom,0px));
    max-height:70vh;overflow-y:auto;}
  .mnav-row{display:flex;align-items:center;justify-content:space-between;gap:12px;
    width:100%;background:none;border:none;font-family:inherit;font-size:15px;
    color:var(--ink);text-align:left;padding:13px 20px;cursor:pointer;}
  .mnav-row.active{color:var(--mustard);font-weight:500;}
  .mnav-row:hover{background:var(--subtle-bg);}

  /* Content has to clear the bar, or the last row of any list sits under it. */
  .main{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px));}
}

/* ---------- order requests ---------- */

/* Nothing outstanding, so the strip is a status line rather than a call to
   act. The other .alert variants all carry a colour that says "attend to me". */
.alert.neutral{background:var(--subtle-bg);color:var(--ink-soft);border:1px solid var(--line);}

/* ONE row: the summary takes the slack, the single button keeps its own width
   against the portal-wide .btn{width:100%}. */
.req-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.req-summary .btn{width:auto;flex:0 0 auto;}

.req-list{display:flex;flex-direction:column;border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;}
.req-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;
  border-bottom:1px solid var(--line);background:var(--paper-raised);}
.req-row:last-child{border-bottom:none;}
/* min-width:0 or a long review note refuses to shrink and pushes the actions
   out of the row. */
.req-row-main{display:flex;flex-direction:column;gap:2px;flex:1 1 200px;min-width:0;}
.req-row-actions{display:flex;gap:6px;flex:0 0 auto;flex-wrap:wrap;}

/* Actions drop to their own line on a phone rather than squeezing to nothing,
   and go full width there so each stays a comfortable target. */
@media (max-width:520px){
  .req-row-actions{flex:1 1 100%;}
  .req-row-actions .btn{flex:1 1 0;}
}

/* ---------- the merged orders tab ---------- */

/* Two actions beside the heading. .btn is width:100% portal-wide, which is
   right in a form and wrong in a row, so both size to their own text. */
.tab-head-actions{display:flex;gap:8px;flex-wrap:wrap;flex:0 0 auto;}
.tab-head-actions .btn{width:auto;flex:0 0 auto;}

/* Four kinds of record share one list, so each row has to say which it is.
   Quieter than a .pill: the pill carries the status, which is the thing being
   scanned for, and two coloured badges per row would compete. */
.kind-tag{display:inline-block;font-size:10px;letter-spacing:0.04em;text-transform:uppercase;
  color:var(--text-muted);border:1px solid var(--line);border-radius:3px;
  padding:1px 5px;margin-bottom:3px;}

.enq-images{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.enq-images img{width:92px;height:92px;object-fit:cover;border-radius:var(--radius);
  border:1px solid var(--line);}

@media (max-width:520px){
  .tab-head-actions{flex:1 1 100%;}
  .tab-head-actions .btn{flex:1 1 0;}
}

/* ---------- guest mode ---------- */

/* The guest door sits on the sign-in card below its links, separated by a
   rule so it reads as a second way in rather than part of the form. */
.guest-door{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);text-align:center;}
.guest-door .sub{margin-bottom:10px;}
/* A ghost-weight button in the brand green: visible enough to be the obvious
   path for a first-time visitor without shouting over Sign in. */
.btn.guest{background:var(--paper-raised);color:var(--green-ink,#2E5539);border:1px solid var(--green-dot,#4C7A57);}
.btn.guest:hover{background:var(--green-soft,#E4EEE4);}

/* ---------- checkout totals ---------- */

/* A ledger, not a table: labels left, figures right, the total set apart by
   weight and a rule rather than by colour, which would fight the tab accent. */
.totals{margin-top:16px;padding-top:12px;border-top:1px solid var(--line);}
.totals-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:5px 0;}
.totals-row.total{border-top:1px solid var(--line);margin-top:6px;padding-top:10px;font-weight:600;font-size:16px;}
.totals-row .hint{font-weight:400;}
.ship-methods{margin-top:18px;}
.ship-methods h3{margin:0 0 8px;}
/* The price sits hard right of the name so the options compare down a column
   rather than needing to be read as sentences. */
.ship-methods .pref span{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;width:100%;}
.ship-methods .pref .mono{margin-left:auto;}
.ship-methods .pref .hint{flex-basis:100%;margin-left:0;}

/* An Etsy product name runs past 70 characters, which no table column
   survives: unclamped it wrapped to fourteen lines in the checkout modal and
   pushed the money column off the screen. Clamped to two lines with the full
   text on a title attribute, the same treatment the CRM's production
   suggestions list already needed. */
.draft-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;font-weight:500;}

@media (max-width: 560px){
  /* Five columns cannot fit a phone inside a modal. "Each" is the one that
     can go: the line total is what somebody is checking, and the unit price
     is one tap away in the catalogue. */
  .draft-lines th:nth-child(3), .draft-lines td:nth-child(3){display:none;}
  .draft-lines th, .draft-lines td{padding-left:6px;padding-right:6px;}
}

@media (max-width: 560px){
  /* The last 76px of overflow was the word "Remove" and a 70px number box.
     A cross does the same job in a quarter of the width, and the qty box only
     ever holds two or three digits. */
  .draft-lines td:last-child .btn{font-size:0;padding:6px 9px;}
  .draft-lines td:last-child .btn::after{content:"\00d7";font-size:16px;line-height:1;}
  .draft-lines td input[type=number]{width:52px !important;}
}

/* A test-mode carrier rate. Deliberately loud: a test rate is a real-looking
   number that nobody should act on, and quietly showing it beside genuine
   prices is how somebody ships against a figure that was never real. */
.hint.test-rate{
  color:var(--brick, #a33);
  font-weight:600;
}

/* The description of a bespoke piece on a quote. Prose under the item name,
   so the line breaks somebody typed into it survive - the dimensions are
   usually written on their own line. Orders and invoices share this table and
   carry no `details`, so nothing renders for them. */
.line-details{white-space:pre-wrap;margin-top:2px;font-size:12px;line-height:1.45;}

/* Paid, and unmistakably so.

   Its own variant rather than reusing .info: this page's whole job is telling
   somebody whether they owe money, and "paid" reading the same as "payment on
   its way" is the confusion the variant exists to remove. Deliberately greener
   and with a stronger border than .info's sage, so the two are told apart at a
   glance rather than by reading. */
.alert.success{background:#DCEBDE;color:#2F5136;border:1px solid var(--green-dot);}

/* The business's mark beside its name in the header.

   Sized in em off the text rather than fixed, so it scales with whatever
   .brand happens to be (the topbar uses .brand.small), and contained rather
   than stretched: a wordmark distorted to fill a square is worse than one
   letterboxed by half a pixel.

   Deliberately does NOT touch .brand itself, which is display:block on eight
   screens - flipping that to inline-flex would shrink it to its content and
   change how the centred card headers sit. An inline image inside a block
   span needs no such change. */
.brand-logo{height:1.4em;width:auto;max-width:120px;object-fit:contain;
  vertical-align:-0.25em;margin-right:9px;}

/* The signing page.
   Its own classes rather than .card, which is max-width:420px because it was
   built for the login and register forms: using it for a document put a 420px
   block of wording beside an 829px table, which reads as a broken layout. */
.sign-page{max-width:720px;margin:0 auto;}
/* The ?track= pay page: ONE centred reading column for the heading, the
   payment banner, the invoice and the Pay button. `.card` is capped at 420px
   for the login form, which left the invoice pinned to the left under a
   banner spanning the whole page (reported 2026-10-12). */
#track-body{max-width:720px;margin:0 auto;}
#track-body .card{max-width:none;}
/* A reading measure. A legal document set across the full width of a desktop
   window is one people skim rather than read, and this is the one screen where
   that matters. */
.sign-doc{background:var(--paper-raised);border:1px solid var(--line);
  border-radius:var(--radius);padding:18px 20px;margin-bottom:16px;}
.sign-doc .msg-body{white-space:pre-wrap;line-height:1.65;}
.sign-fingerprint{word-break:break-all;}

/* The size-by-finish grid on a catalogue product: sizes across, finishes down. */
.cat-sizes-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:8px;margin-bottom:12px}
.cat-sizes{border-collapse:collapse;width:100%;font-size:13px}
.cat-sizes th,.cat-sizes td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:right;vertical-align:top}
.cat-sizes thead th{font-weight:600;white-space:nowrap}
.cat-sizes thead th .hint{display:block;font-weight:400}
.cat-sizes tbody th{text-align:left;font-weight:600;white-space:nowrap}
.cat-sizes tbody tr:last-child th,.cat-sizes tbody tr:last-child td{border-bottom:none}
.cat-sizes-cell{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.cat-sizes-cell .btn{margin-top:4px}
.cat-sizes-none{color:var(--ink-soft)}
.cat-sizes-cell .mono{white-space:nowrap;font-size:11px}

/* ---------- the account link page ---------- */
.acct-owe{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  background:var(--paper-raised);border:1px solid var(--line);border-radius:10px;padding:16px 18px;margin-top:14px;}
.acct-owe-label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);}
.acct-owe-amount{font-family:'Fraunces',Georgia,serif;font-size:32px;font-weight:600;line-height:1.15;font-variant-numeric:tabular-nums;}
.acct-late{color:var(--brick);font-weight:600;}
.tab-head .btn,.acct-owe .btn,.acct-acts .btn{width:auto;}
.acct-h{font-size:15px;margin:24px 0 8px;padding-bottom:6px;border-bottom:1px solid var(--line);}
.acct-list{background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;overflow:hidden;}
.acct-row{display:grid;grid-template-columns:minmax(0,1fr) 104px 292px;gap:12px;align-items:center;
  padding:11px 14px;border-top:1px solid var(--line);}
.acct-row:first-child{border-top:0;}
.acct-row.focus{background:var(--subtle-bg);box-shadow:inset 3px 0 0 var(--mustard);}
.acct-row.acct-pay{grid-template-columns:minmax(0,1fr) 104px;}
.acct-main{min-width:0;display:flex;flex-direction:column;gap:4px;align-items:flex-start;}
button.acct-main{background:none;border:0;padding:0;margin:0;text-align:left;cursor:pointer;color:inherit;font:inherit;width:auto;}
button.acct-main:hover .mono{text-decoration:underline;}
button.acct-main:focus-visible{outline:2px solid var(--mustard);outline-offset:3px;border-radius:4px;}
.acct-main .mono{font-size:13px;}
.acct-sub{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.acct-sub .hint{margin-top:0;}
.acct-money{text-align:right;font-variant-numeric:tabular-nums;font-size:14px;}
.acct-acts{display:flex;gap:6px;justify-content:flex-end;}
.acct-dl{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
.acct-dl .ic{width:16px;height:16px;stroke:currentColor;flex:none;}
.acct-preview-lines{margin-top:6px;}
.acct-preview-acts{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px;}
.acct-alloc{max-width:none;margin:8px 0 14px;}
@media (max-width:560px){
  .acct-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;}
  .acct-row .acct-acts{grid-column:1 / -1;}
  .acct-row.acct-pay .acct-money{grid-column:2;}
  .acct-owe .btn{width:100%;}
}
}

/* ---------- the refund request page ---------- */
.rf-row select{width:auto;min-width:64px;}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
