/* ============================================================================
   PURCHASES.SALVAGEFOUNDRY.CA — ZERO-BOX NATIONAL GEOGRAPHIC × CAMPBELL RIVER
   Sunlit Botanical Linen (Default) ↔ Tidal Atlas Dark + White-Outlined Hearts
   ============================================================================ */
:root {
  --canvas: #F6F5F0;
  --surface: #FFFFFF;
  --surface-tint: #EFECE3;
  --ink: #17241D;
  --ink-soft: #59665E;
  --ink-faint: #8A948D;
  --hair: rgba(23, 36, 29, 0.11);
  --hair-strong: rgba(23, 36, 29, 0.24);
  --ng-gold: #E8BC1E;
  --brass: #9C7326;
  --emerald: #1F7A57;
  --emerald-lit: #10B981;
  --crimson: #C0392B;
  --heart-fill: #E11D48;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
}

body.theme-tidal {
  --canvas: #08191E;
  --surface: #0D232A;
  --surface-tint: #112C35;
  --ink: #E8F0EC;
  --ink-soft: #8CA6A0;
  --ink-faint: #627D78;
  --hair: rgba(216, 236, 230, 0.11);
  --hair-strong: rgba(216, 236, 230, 0.26);
  --ng-gold: #E4BD42;
  --brass: #D8B366;
  --emerald: #34D399;
  --emerald-lit: #34D399;
  --crimson: #F87171;
  --heart-fill: #FB7185;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  transition: background 0.2s ease, color 0.2s ease;
}

/* ===== SERENE ZERO-BOX PASSWORD GATE ===== */
.auth-gate {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 24px;
  position: relative;
}
.auth-corner {
  position: absolute; top: 24px; right: 32px; display: flex; gap: 12px; align-items: center;
}
.auth-inner {
  width: min(420px, 100%);
  display: flex; flex-direction: column; gap: 22px;
}
.auth-mark-row { display: flex; align-items: center; gap: 14px; }
.auth-inner h1 {
  font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1.1;
}
.auth-inner p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.auth-input-row {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1.5px solid var(--hair-strong); padding-bottom: 8px;
}
.auth-input-row:focus-within { border-bottom-color: var(--ng-gold); }
.auth-input {
  flex: 1; border: none; background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 17px; letter-spacing: 0.08em; outline: none;
}
.auth-err {
  font-size: 12.5px; color: var(--crimson); min-height: 18px;
}
.auth-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
  border-top: 1px solid var(--hair); padding-top: 16px; margin-top: 12px;
}

/* ===== ULTRA-CRISP SINGLE-ROW 64px MASTHEAD ===== */
.masthead {
  position: sticky; top: 0; z-index: 40;
  height: 64px; padding: 0 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
@media (max-width: 820px) { .masthead { padding: 0 18px; gap: 12px; } }

.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--ink); flex-shrink: 0;
}
.ng-mark {
  width: 15px; height: 22px; border: 3px solid var(--ng-gold);
  display: inline-block; flex-shrink: 0;
}
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 400; letter-spacing: 0.01em; }
.brand-sub { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-left: 2px; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-lit);
  opacity: 0.9; cursor: help;
}

.nav-rail { display: flex; align-items: center; gap: 24px; overflow-x: auto; }
.nav-link {
  appearance: none; background: transparent; border: none;
  padding: 20px 0 18px; border-bottom: 2px solid transparent;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  color: var(--ink-soft); cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); border-bottom-color: var(--ng-gold); }

.utility-rail { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.util-btn {
  appearance: none; background: transparent; border: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  padding: 6px 2px; cursor: pointer; transition: color 0.15s ease;
}
.util-btn:hover, .util-btn.active { color: var(--ink); }
.util-circle {
  appearance: none; background: transparent; border: 1px solid var(--hair);
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; color: var(--ink-soft); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
}
.util-circle:hover { color: var(--ink); border-color: var(--hair-strong); }
.util-circle.spinning { animation: spin 0.9s linear infinite; color: var(--ng-gold); border-color: var(--ng-gold); }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.heart-trigger {
  appearance: none; background: transparent; border: none;
  border-left: 1px solid var(--hair); padding-left: 14px;
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.heart-trigger .h-glyph { color: var(--heart-fill); font-size: 14px; }
.heart-trigger em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--brass); font-weight: 700; }
.heart-trigger:hover { color: var(--brass); }

/* ===== PROGRESSIVE DISCLOSURE FILTER SHELF ===== */
.filter-shelf { display: none; border-bottom: 1px solid var(--hair); background: var(--surface); }
.filter-shelf.open { display: block; }
.filter-shelf-inner {
  max-width: 1360px; margin: 0 auto; padding: 14px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.quiet-search {
  border: none; border-bottom: 1px solid var(--hair-strong); background: transparent;
  padding: 6px 2px; font-size: 13.5px; color: var(--ink); width: min(300px, 100%);
  outline: none; font-family: var(--sans);
}
.quiet-search:focus { border-bottom-color: var(--ng-gold); }
.filter-links { display: flex; gap: 16px; flex-wrap: wrap; }
.filter-link {
  appearance: none; background: transparent; border: none;
  font-size: 12.5px; color: var(--ink-soft); cursor: pointer; padding: 4px 0;
  border-bottom: 1.5px solid transparent; transition: all 0.15s ease;
}
.filter-link:hover { color: var(--ink); }
.filter-link.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ng-gold); }
.shelf-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.quiet-select-wrap { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-faint); }
.quiet-select-wrap select, .quiet-select-wrap input {
  border: none; border-bottom: 1px solid var(--hair-strong); background: transparent;
  color: var(--ink); font-size: 12.5px; padding: 3px 2px; outline: none; font-family: var(--sans);
}

/* ===== CANVAS & EDITORIAL TYPOGRAPHY ===== */
.canvas-wrap { max-width: 1360px; margin: 0 auto; padding: 42px 36px 96px; }
@media (max-width: 820px) { .canvas-wrap { padding: 28px 18px 80px; } }

.section-lead {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  border-bottom: 1px solid var(--hair); padding-bottom: 16px; margin-bottom: 34px; flex-wrap: wrap;
}
.section-lead h1, .section-lead h2 { font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1.15; }
.section-lead p { color: var(--ink-soft); font-size: 14px; max-width: 660px; margin-top: 6px; }
.micro-label {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 4px;
}

/* NAKED TYPOGRAPHIC KPI STRIP (ZERO BOXES) */
.naked-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 26px;
  padding: 22px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  margin-bottom: 38px;
}
.naked-kpi strong { display: block; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.1; }
.naked-kpi strong.gold { color: var(--brass); }
.naked-kpi strong.emerald { color: var(--emerald); }
.naked-kpi span {
  display: block; margin-top: 4px; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* QUICK ACTION RIBBON (ZERO BOXES — HAIRLINE ONLY) */
.quick-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 34px; padding-bottom: 14px; border-bottom: 1px solid var(--hair);
}
.quick-strip-left { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* ===== ZERO-BOX SPECIMEN RADAR GRID WITH WHITE-OUTLINED HEART ===== */
.specimen-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px 36px;
}
@media (max-width: 1040px) { .specimen-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .specimen-grid { grid-template-columns: 1fr; } }

.specimen {
  cursor: pointer; display: flex; flex-direction: column;
  padding-bottom: 20px; border-bottom: 1px solid var(--hair);
  position: relative;
}
.specimen.is-hearted { border-bottom-color: var(--heart-fill); }

.specimen-plate {
  position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden;
  background: #101B1F; margin-bottom: 14px;
}
.specimen-plate img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.specimen:hover .specimen-plate img { transform: scale(1.035); }

/* Typographic fallback plate when seller posted zero photos */
.plate-fallback {
  width: 100%; height: 100%; padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(circle at 22% 20%, #17333B 0%, #0A181D 100%);
  color: #E8F0EC;
}
.plate-fallback .fb-town { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ng-gold); }
.plate-fallback .fb-title { font-family: var(--serif); font-size: 20px; line-height: 1.25; opacity: 0.92; }
.plate-fallback .fb-meta { font-family: var(--mono); font-size: 11px; opacity: 0.62; }

/* Subtle corner score tag (no loud neon pill) */
.plate-score {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(8, 22, 26, 0.80); backdrop-filter: blur(6px);
  color: #F7F5EE; padding: 4px 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  border-left: 2px solid var(--ng-gold);
}
.plate-score.s-tier { border-left-color: var(--ng-gold); color: #FCE28B; }
.plate-score.a-tier { border-left-color: var(--emerald-lit); }

/* BEN'S SIGNATURE WHITE-OUTLINED HEART (The Field standard!) */
.heart-btn {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(8, 22, 26, 0.42); backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.heart-btn:hover { transform: scale(1.09); background: rgba(8, 22, 26, 0.68); }
.heart-btn svg { width: 19px; height: 19px; transition: fill 0.18s ease, stroke 0.18s ease; }
.heart-btn svg path { fill: transparent; stroke: #FFFFFF; stroke-width: 2.1; }
.heart-btn.hearted { background: rgba(225, 29, 72, 0.92); border-color: #FFFFFF; }
.heart-btn.hearted svg path { fill: #FFFFFF; stroke: #FFFFFF; }

.specimen-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px;
}
.specimen-cat {
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--brass); font-weight: 600;
}
.specimen-cat.s-tier { color: var(--emerald); }
.specimen-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; }

.specimen-title {
  font-family: var(--serif); font-size: 19.5px; font-weight: 400; line-height: 1.25;
  color: var(--ink); margin-bottom: 6px;
}
.specimen-fine {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; margin-bottom: 14px;
}
.specimen-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.specimen-price { font-family: var(--serif); font-size: 21px; font-weight: 400; }
.specimen-price small { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-left: 5px; }

.specimen-actions { display: flex; gap: 14px; align-items: center; }
.text-action {
  appearance: none; background: transparent; border: none; text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em; color: var(--ink-soft);
  cursor: pointer; padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease; display: inline-flex; align-items: center; gap: 4px;
}
.text-action:hover { color: var(--ink); border-bottom-color: var(--ng-gold); }
.text-action.primary { color: var(--ink); border-bottom-color: var(--hair-strong); }
.text-action.primary:hover { color: var(--brass); border-bottom-color: var(--ng-gold); }
.text-action.hearted-txt { color: var(--heart-fill); border-bottom-color: var(--heart-fill); }

/* ===== TWO-COLUMN EDITORIAL LAYOUTS (ITINERARY, COMMS, SOURCES) ===== */
.two-col { display: grid; grid-template-columns: 1.45fr 1fr; gap: 52px; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }

.col-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--hair-strong); padding-bottom: 10px; margin-bottom: 18px;
}
.col-head h3 { font-family: var(--serif); font-size: 21px; font-weight: 400; }

table.editorial { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 32px; }
table.editorial th {
  text-align: left; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); padding: 8px 10px 10px 0; border-bottom: 1px solid var(--hair); font-weight: 600;
}
table.editorial td { padding: 13px 10px 13px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.mono { font-family: var(--mono); font-size: 11.5px; }

/* SCORE PILLAR BARS (ZERO BOXES — PURE HAIRLINE PROGRESS) */
.pillar-list { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.pillar-row { display: grid; grid-template-columns: 140px 1fr 48px; align-items: center; gap: 12px; font-size: 12px; }
.pillar-track { height: 4px; background: var(--hair); position: relative; overflow: hidden; }
.pillar-fill { height: 100%; background: var(--ng-gold); }
.pillar-fill.emerald { background: var(--emerald); }

/* COMMS CHASE STOP BLOCKS (HAIRLINE SEPARATED, ZERO HEAVY CARDS) */
.chase-stop {
  padding: 24px 0; border-bottom: 1px solid var(--hair-strong);
  display: flex; flex-direction: column; gap: 14px;
}
.chase-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.chase-head h3 { font-family: var(--serif); font-size: 21px; font-weight: 400; }
.status-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.status-pill {
  appearance: none; background: transparent; border: none; border-bottom: 1.5px solid transparent;
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint); padding: 3px 0; cursor: pointer;
}
.status-pill:hover { color: var(--ink); }
.status-pill.active { color: var(--emerald); font-weight: 700; border-bottom-color: var(--emerald); }
.status-pill.active.gone { color: var(--crimson); border-bottom-color: var(--crimson); }

.draft-area {
  width: 100%; min-height: 92px; padding: 12px 14px;
  border: none; border-left: 2px solid var(--ng-gold);
  background: var(--surface-tint); color: var(--ink);
  font-family: var(--sans); font-size: 13px; line-height: 1.55; outline: none; resize: vertical;
}
.chase-inputs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .chase-inputs { grid-template-columns: 1fr; } }
.field-label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.field-input {
  border: none; border-bottom: 1px solid var(--hair-strong); background: transparent;
  color: var(--ink); padding: 6px 2px; font-size: 13px; outline: none; font-family: var(--sans);
}
.field-input:focus { border-bottom-color: var(--ng-gold); }

.notice-line {
  padding: 12px 0 12px 16px; border-left: 2px solid var(--brass);
  font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 12px 0;
}
.notice-line.ok { border-left-color: var(--emerald); color: var(--ink); }
.notice-line.warn { border-left-color: var(--crimson); color: var(--crimson); }

.action-bar-btn {
  appearance: none; border: none; background: var(--ink); color: var(--canvas);
  padding: 13px 20px; width: 100%; font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  transition: opacity 0.16s ease, background 0.16s ease;
}
.action-bar-btn:hover { background: var(--brass); color: #FFF; }
.action-bar-btn.emerald { background: var(--emerald); color: #FFF; }
.action-bar-btn.heart-cta { background: var(--heart-fill); color: #FFF; }
.action-bar-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ===== BORDERLESS SLIDE-OVER FIELD DOSSIER ===== */
.scrim {
  position: fixed; inset: 0; background: rgba(8, 18, 22, 0.48); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease; z-index: 55;
}
.scrim.open { opacity: 1; pointer-events: auto; }

.side-sheet {
  position: fixed; top: 0; right: -540px; width: min(520px, 100vw); height: 100vh;
  background: var(--surface); border-left: 1px solid var(--hair); z-index: 65;
  transition: right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
.side-sheet.open { right: 0; }
.sheet-head {
  padding: 20px 28px 16px; border-bottom: 1px solid var(--hair);
  display: flex; justify-content: space-between; align-items: center;
}
.close-x {
  appearance: none; border: none; background: transparent;
  font-size: 26px; line-height: 1; color: var(--ink-soft); cursor: pointer;
}
.close-x:hover { color: var(--ink); }
.sheet-body {
  padding: 22px 28px 40px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 16px;
}
.dossier-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.dossier-title { font-family: var(--serif); font-size: 25px; font-weight: 400; line-height: 1.2; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 12px 0; }
.spec-pair span { display: block; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.spec-pair strong { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); }

.whisper-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(14px);
  background: var(--ink); color: var(--canvas); padding: 10px 20px; font-size: 12.5px;
  border-left: 3px solid var(--ng-gold);
  opacity: 0; pointer-events: none; transition: all 0.2s ease; z-index: 95;
}
.whisper-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }
