/* ═══════════════════════════════════════════════════════════
   STUDIO OS — visual system
   Palette and type inherited from widgy-weddings-site so the
   back office feels like the same studio as the front door.
   ═══════════════════════════════════════════════════════════ */

:root {
  --ivory:      #FAF8F4;
  --warm-white: #F2EFE9;
  --charcoal:   #1C1B19;
  --ink:        #1C1B19;
  --muted:      #4A4743;
  --faint:      #8B8781;
  --gold:       #8B7040;
  --gold-light: #B8954E;
  --gold-pale:  #D9CBA8;
  --line:       #E4DFD6;
  --line-dark:  #34322E;

  --green:      #4A7C59;
  --amber:      #B8863B;
  --rust:       #A85539;

  --serif: 'Playfair Display', Georgia, serif;
  --body:  'Lora', Georgia, serif;
  --sans:  'Montserrat', system-ui, -apple-system, sans-serif;

  --rail: 244px;
  --r:    3px;
  --shadow: 0 1px 2px rgba(28,27,25,.04), 0 8px 24px -12px rgba(28,27,25,.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -.01em; }
a { color: inherit; }

.eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Shell ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }

.rail {
  width: var(--rail);
  flex: 0 0 var(--rail);
  background: var(--charcoal);
  color: var(--ivory);
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rail .brand { padding: 0 26px 30px; border-bottom: 1px solid var(--line-dark); }
.rail .brand .mark {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.15;
  display: block;
}
.rail .brand .sub {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 7px;
  display: block;
}

.rail nav { padding: 22px 14px; flex: 1; }
.rail nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  color: #B5B0A8;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px;
  border-radius: var(--r);
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}
.rail nav button:hover { background: rgba(255,255,255,.05); color: var(--ivory); }
.rail nav button.on { background: var(--gold); color: #fff; }
.rail nav button .n {
  margin-left: auto;
  font-size: 10px;
  background: rgba(255,255,255,.12);
  padding: 2px 7px;
  border-radius: 20px;
}
.rail nav button.on .n { background: rgba(0,0,0,.22); }

.rail .foot {
  padding: 18px 26px 0;
  border-top: 1px solid var(--line-dark);
  font-family: var(--sans);
  font-size: 11px;
  color: var(--faint);
}
.rail .foot button {
  background: none; border: 0; color: var(--gold-light);
  font-family: var(--sans); font-size: 11px; cursor: pointer;
  padding: 6px 0; letter-spacing: .08em;
}

/* ── Main ──────────────────────────────────────────────── */
.main { flex: 1; min-width: 0; padding: 34px 40px 80px; }

.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.head h1 { font-size: 32px; }
.head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: var(--ivory);
  border-radius: var(--r);
  cursor: pointer;
  transition: opacity .15s, background .15s;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { opacity: .86; }
.btn.ghost { background: none; color: var(--charcoal); }
.btn.ghost:hover { background: var(--warm-white); opacity: 1; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.sm { padding: 8px 14px; font-size: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Stat strip ────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 34px;
}
.stat { background: var(--ivory); padding: 20px 22px; }
.stat .k {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.stat .v { font-family: var(--serif); font-size: 30px; margin-top: 6px; line-height: 1; }
.stat .note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat .v.gold { color: var(--gold); }

/* ── Board ─────────────────────────────────────────────── */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(266px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 14px;
  align-items: start;
}
.col { background: var(--warm-white); border-radius: var(--r); padding: 14px; min-height: 140px; }
.col > h3 {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; margin-bottom: 12px;
}
.col.drop { outline: 2px dashed var(--gold-pale); outline-offset: -4px; }

.card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 10px;
  cursor: grab;
  box-shadow: var(--shadow);
  transition: border-color .15s, transform .1s;
}
.card:hover { border-color: var(--gold-pale); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: .4; }
.card .name { font-family: var(--serif); font-size: 17px; }
.card .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.card .row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; flex-wrap: wrap;
}

.tag {
  font-family: var(--sans); font-size: 9px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
  background: var(--warm-white); color: var(--muted);
  border: 1px solid var(--line);
}
.tag.gold  { background: var(--gold-pale); color: #5C4A26; border-color: transparent; }
.tag.green { background: #E4EDE6; color: var(--green); border-color: transparent; }
.tag.amber { background: #F5E9D4; color: #7A5A22; border-color: transparent; }
.tag.rust  { background: #F3E1DB; color: var(--rust); border-color: transparent; }

.stale { color: var(--rust); font-family: var(--sans); font-size: 10px; font-weight: 600; }

/* ── Table ─────────────────────────────────────────────── */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
  text-align: left; padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line);
}
table.data td { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: rgba(242,239,233,.6); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Forms ─────────────────────────────────────────────── */
label.f { display: block; margin-bottom: 14px; }
label.f > span {
  display: block; font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
input, select, textarea {
  width: 100%; font-family: var(--body); font-size: 15px;
  padding: 11px 13px; border: 1px solid var(--line);
  background: var(--ivory); color: var(--ink); border-radius: var(--r);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(139,112,64,.1);
}
textarea { min-height: 90px; resize: vertical; }

/* ── Drawer ────────────────────────────────────────────── */
.scrim {
  position: fixed; inset: 0; background: rgba(28,27,25,.42);
  opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 40;
}
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%);
  background: var(--ivory); z-index: 50; padding: 30px 32px 60px;
  overflow-y: auto; transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid var(--line);
}
.drawer.on { transform: none; }
.drawer .x {
  position: absolute; top: 20px; right: 24px; background: none; border: 0;
  font-size: 26px; line-height: 1; color: var(--faint); cursor: pointer;
}
.drawer h2 { font-size: 26px; margin-bottom: 4px; padding-right: 40px; }

.timeline { border-left: 1px solid var(--line); padding-left: 18px; margin-top: 8px; }
.timeline .ev { position: relative; padding-bottom: 16px; font-size: 13.5px; }
.timeline .ev::before {
  content: ''; position: absolute; left: -23px; top: 7px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold-pale);
}
.timeline .ev .t { font-family: var(--sans); font-size: 10px; color: var(--faint); letter-spacing: .06em; }

.sect { margin-top: 30px; }
.sect > h3 {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}

.empty { text-align: center; padding: 70px 20px; color: var(--faint); }
.empty .big { font-family: var(--serif); font-size: 22px; color: var(--muted); margin-bottom: 6px; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 90px);
  background: var(--charcoal); color: var(--ivory); padding: 13px 24px;
  border-radius: var(--r); font-family: var(--sans); font-size: 12px;
  letter-spacing: .06em; z-index: 90; transition: transform .26s; box-shadow: var(--shadow);
}
.toast.on { transform: translate(-50%, 0); }

.hide { display: none !important; }

/* ── Statement uploader ────────────────────────────────── */
.dropzone {
  border: 1px dashed var(--gold-pale);
  border-radius: var(--r);
  background: var(--warm-white);
  padding: 54px 24px;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.dropzone.over { border-color: var(--gold); background: #EFE9DC; }
.dropzone .big { font-family: var(--serif); font-size: 21px; margin: 0 0 8px; }
.dropzone .small { font-size: 13.5px; color: var(--muted); margin: 0 0 4px; }
.dropzone .small.quiet { color: var(--faint); font-size: 12px; margin-top: 12px; }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--gold); font-family: var(--body); font-size: 13.5px;
  text-decoration: underline; text-underline-offset: 2px;
}

.total-card {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 34px; margin-top: 26px; text-align: center; background: var(--ivory);
}
.total-card .grand { font-family: var(--serif); font-size: 58px; line-height: 1; margin: 10px 0 4px; }
.total-card .grand.neg { color: var(--rust); }

.col-pick {
  display: flex; gap: 12px; align-items: flex-end;
  justify-content: center; margin-top: 24px; flex-wrap: wrap;
}
.col-pick label.f { margin: 0; text-align: left; min-width: 190px; }

/* ── Ledger (statement breakdown) ──────────────────────── */
.ledger { margin-top: 26px; text-align: left; }
.ledger-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.ledger-row .detail {
  display: block; font-family: var(--sans); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 3px;
}
.ledger-row .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-row.tithe { background: var(--warm-white); margin: 0 -14px; padding: 12px 14px; }
.ledger-row.tithe .num { color: var(--gold); }
.ledger-row.total {
  border-bottom: 0; border-top: 2px solid var(--charcoal);
  margin-top: 6px; padding-top: 14px; font-size: 19px;
}
.ledger-aside { font-size: 12.5px; color: var(--faint); margin: 14px 0 0; text-align: left; }

.rules-box {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--warm-white); padding: 0 20px; margin-bottom: 22px;
}
.rules-box summary {
  cursor: pointer; padding: 16px 0; font-family: var(--sans);
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.rules-box[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.rules-grid {
  display: grid; gap: 0 16px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.rules-note { font-size: 12px; color: var(--faint); margin: 10px 0 20px; }

.flagnote {
  background: #F3E1DB; border-left: 3px solid var(--rust);
  padding: 14px 16px; font-size: 13.5px; color: #7A3524;
  border-radius: var(--r); margin-bottom: 16px; line-height: 1.6;
}

.rows-table td.desc {
  font-size: 13px; color: var(--muted);
  max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rows-table tr.off { opacity: .42; }
.rows-table tr.flagged td { background: rgba(168,85,57,.05); }
.rows-table .rowamt { width: 96px; padding: 7px 9px; font-size: 13.5px; text-align: right; }
.rows-table input[type="checkbox"] { width: 18px; height: 18px; }

tr.given td { background: rgba(74,124,89,.05); }
.givenbox { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.givenbox input { width: 18px; height: 18px; margin: 0; }
.givenbox span { font-size: 13px; color: var(--muted); }

/* Move control on a card */
select.move {
  width: 100%; margin-top: 10px; padding: 8px 10px;
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: var(--warm-white);
  border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
}
select.move:hover { border-color: var(--gold-pale); color: var(--ink); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — everything below has to work with a thumb
   ═══════════════════════════════════════════════════════ */

/* Tablet: rail stays, board scrolls */
@media (max-width: 1100px) {
  :root { --rail: 210px; }
  .main { padding: 30px 26px 80px; }
}

@media (max-width: 860px) {
  .shell { flex-direction: column; }

  /* Rail becomes a sticky two-row header */
  .rail {
    width: 100%; flex: none; height: auto;
    position: sticky; top: 0; z-index: 30;
    padding: 12px 0 0;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0;
  }
  .rail .brand { border: 0; padding: 0 16px 10px; flex: 1 1 auto; min-width: 0; }
  .rail .brand .mark { font-size: 17px; white-space: nowrap; }
  .rail .brand .sub { display: none; }

  .rail .foot {
    border: 0; margin: 0; padding: 0 16px 10px; text-align: right;
    flex: 0 0 auto; max-width: 52%;
  }
  .rail .foot div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }

  .rail nav {
    order: 3; flex: 1 0 100%; width: 100%;
    display: flex; gap: 4px; overflow-x: auto;
    padding: 8px 12px; border-top: 1px solid var(--line-dark);
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .rail nav::-webkit-scrollbar { display: none; }
  .rail nav button { width: auto; white-space: nowrap; padding: 10px 14px; }

  .main { padding: 22px 16px 80px; }
  .head { margin-bottom: 22px; }
  .head h1 { font-size: 27px; }

  /* Stat strip fits as many as the width allows, with no dead cells */
  .stats { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
  .stat { padding: 16px; }
  .stat .v { font-size: 25px; }

  /* Board: one column at a time, snapped */
  .board {
    grid-auto-columns: 86%;
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .col { scroll-snap-align: start; }

  /* Cards are tapped, not dragged */
  .card { cursor: pointer; padding: 15px; }
  .card:active { cursor: pointer; }

  /* Drawer is full-height and full-width */
  .drawer { width: 100%; padding: 22px 18px 80px; border-left: 0; }
  .drawer h2 { font-size: 23px; }
  .drawer .x { top: 14px; right: 16px; font-size: 32px; padding: 6px; }

  /* Tables become stacked cards — no horizontal scrolling to read a number */
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr {
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 14px; margin-bottom: 10px; background: var(--ivory);
  }
  table.data tr:hover td { background: none; }
  table.data td {
    border: 0; padding: 5px 0; display: flex;
    justify-content: space-between; align-items: baseline; gap: 14px;
    text-align: right;
  }
  table.data td::before {
    content: attr(data-l);
    font-family: var(--sans); font-size: 10px; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
    text-align: left; flex: 0 0 auto;
  }
  table.data td:not([data-l]) { justify-content: flex-end; }
  table.data td.num { text-align: right; }
  .rows-table td.desc { max-width: none; white-space: normal; text-align: right; }
  .rows-table .rowamt { width: 110px; }

  /* Empty states shouldn't inherit the card chrome */
  table.data tr:has(.empty) { border: 0; padding: 0; }

  .total-card { padding: 24px 18px; }
  .total-card .grand { font-size: 42px; }
  .total-card .split { gap: 28px; }
  .col-pick { flex-direction: column; align-items: stretch; }
  .col-pick label.f { min-width: 0; }
  .col-pick .btn { width: 100%; margin-bottom: 0 !important; }

  .dropzone { padding: 34px 18px; }
  .rules-grid { grid-template-columns: 1fr 1fr; }

  /* Comfortable thumb targets everywhere */
  .btn { padding: 13px 20px; }
  .btn.sm { padding: 10px 14px; }
  input, select, textarea { font-size: 16px; padding: 12px 13px; }  /* 16px stops iOS zooming */
  .timeline .ev { padding-bottom: 18px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .board { grid-auto-columns: 92%; }
  .head { flex-direction: column; align-items: stretch; }
  /* Only the action group (a SECOND child) becomes a button row —
     never the title block on views that have no actions. */
  .head > div + div { display: flex; gap: 8px; }
  .head > div + div .btn,
  .head > div + div select { flex: 1; }
  .total-card .grand { font-size: 36px; }
  .rules-grid { grid-template-columns: 1fr; }
}

/* Anything without hover (phones, tablets) hides drag affordances */
@media (hover: none) {
  .card { cursor: pointer; }
  select.move { border-color: var(--gold-pale); }
}

.rows-table .rowamt.wants {
  border-color: var(--rust);
  background: #FCF4F1;
}

/* ── Campaigns ─────────────────────────────────────────── */
.bar {
  height: 4px; background: var(--line); border-radius: 4px;
  overflow: hidden; margin-top: 6px; min-width: 80px;
}
.bar span { display: block; height: 100%; background: var(--gold); transition: width .3s; }

.hint {
  font-size: 12.5px; color: var(--faint); line-height: 1.7;
  background: var(--warm-white); padding: 12px 14px;
  border-radius: var(--r); margin: 0 0 16px;
}
.hint strong { color: var(--muted); font-weight: 600; }

#contact-search { width: 210px; }
/* The action group only — never a lone title block (see the 480px rule). */
.head > div + div { display: flex; gap: 8px; align-items: center; }

.drawer textarea[name="body"] {
  font-family: var(--body); font-size: 15px; line-height: 1.7; min-height: 260px;
}

@media (max-width: 860px) {
  #contact-search { width: 100%; }
  .drawer textarea[name="body"] { min-height: 220px; }
}

/* ── Campaign media ────────────────────────────────────── */
.media-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px;
}
.media-bar .btn { flex: 1; min-width: 104px; }

/* A second drawer layer, so adding a photo never loses the draft. */
.drawer.stack { z-index: 60; box-shadow: -18px 0 40px -20px rgba(28,27,25,.3); }

/* ── Report tabs ───────────────────────────────────────── */
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.tabs .tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 12px; cursor: pointer;
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.tabs .tab:hover { color: var(--ink); }
.tabs .tab.on { color: var(--ink); border-bottom-color: var(--gold); }
.tabs .tab span {
  display: inline-block; margin-left: 5px; padding: 1px 6px;
  background: var(--warm-white); border-radius: 20px; color: var(--muted);
}
.tabs .tab.on span { background: var(--gold-pale); color: #5C4A26; }

table.data.compact td { padding: 10px 0; font-size: 13.5px; }
.drawer .stats { grid-template-columns: 1fr 1fr; }
.drawer .stat { padding: 14px 16px; }
.drawer .stat .v { font-size: 22px; }

/* ── Estimates ─────────────────────────────────────────── */
.line-item {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px; margin-bottom: 8px; background: var(--ivory);
}
.line-item input { margin-bottom: 6px; }
.line-item .li-label { font-family: var(--serif); font-size: 16px; }
.line-item .li-detail { font-size: 13.5px; color: var(--muted); }
.li-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.li-row .li-qty { width: 64px; margin: 0; text-align: center; }
.li-row .li-price { width: 108px; margin: 0; text-align: right; }
.li-row .li-x { color: var(--faint); font-size: 13px; }
.li-row .li-eq {
  margin-left: auto; font-family: var(--serif); font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.li-del {
  background: none; border: 0; color: var(--faint); font-size: 22px;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.li-del:hover { color: var(--rust); }

.est-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 2px solid var(--charcoal); margin-top: 12px; padding-top: 12px;
}
.est-total span {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.est-total strong { font-family: var(--serif); font-size: 26px; }

ol.steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.8; color: var(--muted); }
ol.steps li { margin-bottom: 12px; }
ol.steps strong { color: var(--ink); }
.kv { display: flex; gap: 10px; align-items: baseline; margin: 5px 0; font-size: 12.5px; }
.kv span {
  font-family: var(--sans); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); min-width: 58px;
}
.kv code {
  background: var(--warm-white); padding: 3px 7px; border-radius: 3px;
  font-size: 11.5px; word-break: break-all; color: var(--ink);
}

.sec-edit {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px; margin-bottom: 10px; background: var(--ivory);
}
.sec-head { display: flex; gap: 6px; align-items: center; }
.sec-head .s-heading {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; margin: 0;
}
.sec-edit textarea { margin-top: 8px; min-height: 0; font-size: 14px; }
.sec-edit .s-bullets { font-size: 13.5px; color: var(--muted); }

/* ── The year ──────────────────────────────────────────── */
.year-grid {
  display: grid; gap: 16px; margin-bottom: 34px;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.ypanel {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 22px; background: var(--ivory);
}
.ypanel h4 {
  margin: 0 0 12px; font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.yrow {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.yrow:last-child { border-bottom: 0; }
.yrow span:first-child { color: var(--muted); }
.yrow span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Portal management ─────────────────────────────────── */
.fb-card {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--r); padding: 16px 18px; margin-bottom: 10px;
  background: var(--ivory);
}
.fb-card.read { border-left-color: var(--line); opacity: .62; }
.fb-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-top strong { font-family: var(--serif); font-size: 17px; }
.fb-stars { color: var(--gold-light); font-size: 13px; letter-spacing: 1px; }
.fb-when {
  margin-left: auto; font-family: var(--sans); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.fb-card p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.fb-acts { display: flex; gap: 8px; margin-top: 12px; }

.canva-row {
  display: block; padding: 13px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.canva-row:last-of-type { border-bottom: 0; }
.canva-row:hover .cl { color: var(--gold); }
.canva-row .cl { display: block; font-family: var(--serif); font-size: 17px; }
.canva-row .ch { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Design library ────────────────────────────────────── */
.asset-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.asset {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--ivory); cursor: pointer; overflow: hidden;
  text-align: left; transition: border-color .15s, transform .1s;
}
.asset:hover { border-color: var(--gold-pale); }
.asset.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.asset img {
  display: block; width: 100%; height: 92px;
  object-fit: cover; background: var(--warm-white);
}
.asset .a-label {
  display: block; padding: 8px 10px 0; font-family: var(--serif);
  font-size: 14px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asset .a-meta {
  display: block; padding: 2px 10px 10px;
  font-family: var(--sans); font-size: 9.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint);
  /* One line always, so every tile in a row is the same height. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asset .a-pick {
  position: absolute; top: 7px; right: 7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: #fff;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
