/* ===========================================================
   Brooklyn Vapor Blasting — shared styles
   Vintage moto heritage: warm charcoal, cream, burnt orange
   =========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Spectral:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  --ink: #16130f; /* warm near-black bg */
  --ink-2: #1d1915; /* raised panel */
  --ink-3: #272019; /* card / border */
  --panel: #1d1915; /* solid drawer/panel bg (alias of --ink-2) — was undefined, made drawers transparent */
  --paper: #e9e2d3; /* warm paper light section */
  --paper-2: #ded5c2;
  --cream: #ece5d8; /* primary text on dark */
  --cream-dim: #b9ad98; /* muted text on dark */
  --rule: #3a3128; /* hairlines on dark */
  --rule-light: #cabfa8; /* hairlines on paper */
  --orange: #c8702d; /* primary accent */
  --orange-hi: #dd8438; /* hover */
  --oxblood: #7a2e22; /* deep secondary */
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);

  --display: "Oswald", "Arial Narrow", sans-serif;
  --serif: "Spectral", Georgia, serif;

  --wrap: 1240px;
  --pad: clamp(20px, 5vw, 72px);
}

/* ===========================================================
   Light theme — enabled server-side via SITE_THEME=light, which
   injects data-theme="light" onto <html> (see lib/site-config.js).
   Strategy: flip the value-named color variables to a warm light
   palette, then patch the handful of rules that hardcode colors or
   intentionally invert. --paper / --paper-2 / --rule-light are
   *inversion* variables (light surfaces/hairlines on the dark site),
   so they flip to DARK values so .paper sections still contrast
   against the now-light page.
   =========================================================== */
html[data-theme="light"] {
  --ink: #f4eee2; /* page bg -> warm paper */
  --ink-2: #ece4d3; /* raised panel */
  --ink-3: #e1d7c2; /* card / border surface */
  --panel: #ece4d3; /* drawer bg (alias of --ink-2) */
  --paper: #2a241d; /* INVERTED: .paper sections go dark */
  --paper-2: #221d17;
  --cream: #1f1a14; /* primary text -> dark warm near-black */
  --cream-dim: #5d5443; /* muted text -> warm taupe */
  --rule: #cabfa8; /* hairline on light */
  --rule-light: #3a3128; /* INVERTED: hairline on now-dark .paper */
  --orange: #b25f1f; /* darkened for AA contrast on light bg */
  --orange-hi: #c8702d; /* hover -> old base orange */
  --oxblood: #7a2e22; /* keep */
  --shadow: 0 24px 60px -28px rgba(60, 45, 20, 0.28);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  /* keep anchored content clear of the 74px sticky nav */
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-weight: 600;
  font-size: 13px;
  color: var(--orange);
  margin: 0;
}
.eyebrow.dark {
  color: var(--oxblood);
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
h1 {
  font-size: clamp(44px, 8vw, 104px);
}
h2 {
  font-size: clamp(34px, 5vw, 64px);
}
h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
}
p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}
.lede {
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.55;
  color: var(--cream);
}
.muted {
  color: var(--cream-dim);
}
strong {
  font-weight: 600;
}

/* ---------- layout ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}
section {
  position: relative;
}
.section-pad {
  padding-block: clamp(64px, 9vw, 128px);
}
.paper {
  background: var(--paper);
  color: var(--ink);
}
.paper .eyebrow {
  color: var(--oxblood);
}
.paper .muted {
  color: #5d5443;
}
.paper h1,
.paper h2,
.paper h3 {
  color: var(--ink);
}

/* hairline label rows */
.kicker-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.kicker-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.paper .kicker-row::after {
  background: var(--rule-light);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 15px;
  padding: 15px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.18s ease;
  line-height: 1;
}
.btn-primary {
  background: var(--orange);
  color: #1b1109;
}
.btn-primary:hover {
  background: var(--orange-hi);
}
.btn-ghost {
  border-color: var(--rule);
  color: var(--cream);
}
.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.paper .btn-ghost {
  border-color: var(--rule-light);
  color: var(--ink);
}
.paper .btn-ghost:hover {
  border-color: var(--oxblood);
  color: var(--oxblood);
}
.btn-arrow {
  transition: transform 0.18s ease;
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ---------- top nav ---------- */
.nav {
  position: sticky;
  /* Offset below the stage banner when present (var defaults to 0 in production). */
  top: var(--stage-banner-h, 0px);
  z-index: 50;
  background: rgba(22, 19, 15, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-right: auto;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border: 2px solid var(--orange);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 700;
  color: var(--orange);
  font-size: 16px;
  letter-spacing: 0.02em;
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 17px;
  line-height: 1;
  color: var(--cream);
}
.brand-name span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--cream-dim);
  font-weight: 500;
  margin-top: 3px;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 14px;
  font-weight: 500;
  color: var(--cream-dim);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: 0.16s;
}
.nav-links a:hover {
  color: var(--cream);
}
.nav-links a.active {
  color: var(--cream);
  border-bottom-color: var(--orange);
}
.nav-phone {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: var(--orange);
  white-space: nowrap;
  border: 1px solid var(--rule);
  padding: 11px 18px;
  transition: 0.16s;
}
.nav-phone:hover {
  border-color: var(--orange);
  background: rgba(200, 112, 45, 0.08);
}
.nav-toggle {
  display: none;
}

@media (max-width: 920px) {
  .nav-links,
  .nav-phone {
    display: none;
  }
  .nav-inner {
    gap: 14px;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink-2);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--pad) 18px;
  }
  .nav-links.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--rule);
    background: none;
    color: var(--cream);
    cursor: pointer;
  }
}

/* ---------- footer ---------- */
.footer {
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
  padding-block: 64px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.footer h4 {
  font-size: 20px;
  margin-bottom: 18px;
}
.footer .big-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 46px);
  color: var(--orange);
  letter-spacing: 0.01em;
}
.footer a.flink {
  display: block;
  color: var(--cream-dim);
  padding: 6px 0;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  font-weight: 500;
}
.footer a.flink:hover {
  color: var(--orange);
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--cream-dim);
  font-size: 13px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.footer-meta a:hover {
  color: var(--orange);
}
@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

/* ---------- misc components ---------- */
.tag {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream-dim);
  border: 1px solid var(--rule);
  padding: 8px 14px;
  white-space: nowrap;
}
.paper .tag {
  border-color: var(--rule-light);
  color: #5d5443;
}

.placeholder-note {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--orange);
  opacity: 0.8;
  margin-top: 10px;
}

/* ---------- inner page hero ---------- */
.page-hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(34px, 5vw, 56px);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow {
  margin-bottom: 18px;
}
.page-hero h1 {
  font-size: clamp(40px, 6.5vw, 84px);
}
.page-hero p {
  max-width: 56ch;
  margin-top: 22px;
}
/* Breadcrumb — top-level rule so it works inside any hero section
   (.page-hero, .estimate-hero, etc.), not just .page-hero. See issue #56. */
.breadcrumb {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--cream-dim);
  margin-bottom: 26px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.breadcrumb a:hover {
  color: var(--orange);
}

/* Interior page hero media layer — mirrors the home-page .hero treatment so
   about/faq/finishing pages get a full-bleed photo behind the heading with a
   legibility scrim. See issue #58. */
.page-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}
.page-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(15, 12, 9, 0.92) 0%,
      rgba(15, 12, 9, 0.78) 40%,
      rgba(15, 12, 9, 0.4) 72%,
      rgba(15, 12, 9, 0.6) 100%
    ),
    linear-gradient(0deg, rgba(15, 12, 9, 0.8), rgba(15, 12, 9, 0) 45%);
}
.page-hero .wrap {
  position: relative;
  z-index: 2;
}

/* ---------- forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field label {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream-dim);
}
.field input,
.field select,
.field textarea {
  background: var(--ink);
  border: 1px solid var(--rule);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 16px;
  padding: 14px 16px;
  width: 100%;
  transition: 0.16s;
}
.field textarea {
  min-height: 140px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: #1a160f;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #6b6150;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- FAQ accordion ---------- */
.faq-group:not(:first-of-type) {
  margin-top: clamp(40px, 6vw, 72px);
}
.faq-list {
  display: flex;
  flex-direction: column;
  max-width: 900px;
}
.faq-item {
  border-top: 1px solid var(--rule);
}
.faq-list .faq-item:last-child {
  border-bottom: 1px solid var(--rule);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.3;
  color: var(--cream);
  transition: color 0.16s ease;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary:hover {
  color: var(--orange);
}
.faq-item summary::after {
  content: "+";
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 0.8;
  color: var(--orange);
  flex: none;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-body {
  padding: 0 0 26px;
  max-width: 64ch;
}
.faq-body p {
  color: var(--cream-dim);
  line-height: 1.6;
  margin: 0 0 12px;
}
.faq-body p:last-child {
  margin-bottom: 0;
}
.faq-body ul {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--cream-dim);
  line-height: 1.55;
}
.faq-body a {
  color: var(--orange);
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.16s ease;
}
.faq-body a:hover {
  border-bottom-color: var(--orange);
}
@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after,
  .faq-item summary {
    transition: none;
  }
}

/* ===========================================================
   Admin console (/admin.html) — internal order & quote board
   =========================================================== */
body.admin {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.45;
}
.admin-bar {
  position: sticky;
  top: var(--stage-banner-h, 0px);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad);
  background: var(--ink-2);
  border-bottom: 1px solid var(--rule);
}
.admin-bar__title h1 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 4px 0 0;
}
.admin-bar__tools,
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
/* Controls (filter toolbar + pipeline summary) freeze beneath the sticky header
   bar so they stay reachable while the board scrolls. .admin-bar is sticky at
   top:0 with ~74px height (18px padding × 2 + ~38px title/buttons); the controls
   sit directly below it. */
.admin-controls {
  position: sticky;
  top: calc(74px + var(--stage-banner-h, 0px));
  z-index: 11;
  background: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
}
/* Secondary toolbar (filter + reload) below the header bar. */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px var(--pad) 0;
}
.admin-filter {
  flex: 1 1 240px;
  font-family: var(--display);
  font-size: 14px;
  padding: 11px 14px;
  min-width: 0;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--rule);
}
.admin-filter:focus {
  outline: none;
  border-color: var(--orange);
}
/* Admin buttons: reuse the base .btn box, give it a filled default + modifiers. */
.admin .btn {
  background: var(--orange);
  color: #1b1109;
  border-color: var(--orange);
}
.admin .btn:hover {
  background: var(--orange-hi);
  border-color: var(--orange-hi);
}
.admin .btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--rule);
}
.admin .btn--ghost:hover {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
.admin .btn--sm {
  padding: 9px 14px;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.admin-note {
  margin: 0;
  padding: 12px var(--pad);
  background: rgba(122, 46, 34, 0.32);
  border-bottom: 1px solid var(--rule);
  color: var(--cream);
  font-size: 13px;
}
/* Status/error notification as a fixed toast so it's visible from anywhere on the
   page — not buried at the top out of view. Hidden until there's a message. */
.admin-msg {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90; /* above the modal (z-index 80) so errors mid-action are seen */
  max-width: min(420px, calc(100vw - 40px));
  margin: 0;
  padding: 13px 18px;
  background: var(--ink-3);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--orange);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  color: var(--cream);
  font-family: var(--display);
  font-size: 14px;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}
.admin-msg.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.admin-msg.is-error {
  border-left-color: var(--orange-hi);
  color: var(--orange-hi);
}
.admin-board {
  padding: 8px var(--pad) 80px;
}
.admin-group {
  margin-top: 28px;
}
.admin-group__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange);
}
.admin-group__summary::-webkit-details-marker {
  display: none;
}
.admin-group__summary::before {
  content: "▸";
  color: var(--orange);
  font-size: 14px;
  transition: transform 0.15s ease;
}
.admin-group[open] > .admin-group__summary::before {
  transform: rotate(90deg);
}
.admin-group__title {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 18px;
}
.admin-count {
  font-size: 13px;
  color: var(--ink);
  background: var(--cream-dim);
  padding: 1px 9px;
  border-radius: 999px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  table-layout: fixed;
}
.admin-table th,
.admin-table td {
  overflow-wrap: break-word;
  word-break: break-word;
}
.admin-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
}
.admin-table td {
  vertical-align: top;
  padding: 14px 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 15px;
}
.admin-strong {
  font-family: var(--display);
  font-weight: 600;
}
.admin-muted {
  color: var(--cream-dim);
  font-size: 13px;
}
/* Email shown as a mailto link in the Customer column. */
.admin-mail {
  display: block;
  color: var(--orange);
  text-decoration: none;
  word-break: break-word;
}
.admin-mail:hover {
  color: var(--orange-hi);
  text-decoration: underline;
}
/* "View Details" link in the Project column toggles the row's expand blocks. */
.admin-viewdetails {
  display: inline-block;
  margin-top: 8px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.admin-viewdetails:hover {
  color: var(--orange-hi);
}
/* Per-row expand blocks: hidden until the row carries `is-expanded`. */
.admin-expand {
  display: none;
  margin-top: 8px;
}
tr.is-expanded .admin-expand {
  display: block;
}
tr.is-expanded .admin-expand .detail__row:last-child {
  border-bottom: none;
}
.admin-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  border: 1px solid var(--rule);
  color: var(--cream);
  font-family: var(--display);
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.admin-photo-btn:hover {
  border-color: var(--orange);
}
.admin-photo-btn img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--rule);
}
.admin-photo-icon {
  font-size: 20px;
}
.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.admin-field {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 8px;
}
.admin-input {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 14px;
  padding: 9px 11px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--rule);
  max-width: 200px;
}
.admin-input:focus {
  outline: none;
  border-color: var(--orange);
}
.admin-input--money {
  max-width: 130px;
}
/* Drag-and-drop after-photo upload (mirrors .file-drop on the estimate form). */
.admin-drop {
  display: block;
  margin-top: 10px;
  max-width: 230px;
  border: 2px dashed var(--rule);
  background: var(--ink-2);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.admin-drop:hover,
.admin-drop.is-drag {
  border-color: var(--orange);
  background: rgba(200, 112, 45, 0.08);
}
.admin-drop__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.admin-drop__cta {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  color: var(--cream);
}
.admin-drop__sub {
  display: block;
  font-size: 12px;
  color: var(--cream-dim);
  margin-top: 2px;
}
.admin-drop__previews {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.admin-drop__previews:not(:empty) {
  padding-top: 2px;
}
.admin-drop__thumb {
  width: 56px;
  height: 56px;
}
.admin-drop__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--rule);
  display: block;
}

/* Promote / Cancel row buttons. Promote uses the default filled .admin .btn. */
.admin .btn--danger {
  background: var(--oxblood);
  color: var(--cream);
  border-color: var(--oxblood);
}
.admin .btn--danger:hover {
  background: #93392b;
  border-color: #93392b;
}

/* Photo grids (used inside the photos overlay). */
.gallery-section {
  margin-bottom: 22px;
}
.gallery-section h3 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin: 0 0 10px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gallery-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 1px solid var(--rule);
}

/* Signed-in admin email in the console nav. */
.admin-signed-in {
  color: var(--cream-dim);
  font-size: 13px;
}
.admin-signed-in:empty {
  display: none;
}

/* ---- Pipeline summary (per-phase counts) ---- */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px var(--pad) 0;
}
.pipeline-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  color: var(--cream);
  font-family: var(--display);
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.pipeline-chip:hover {
  border-color: var(--orange);
}
.pipeline-chip.is-empty {
  opacity: 0.55;
}
.pipeline-chip.is-active {
  border-color: var(--orange);
  background: rgba(200, 112, 45, 0.16);
}
.pipeline-chip__count {
  font-weight: 700;
  font-size: 15px;
  color: var(--orange);
}
.pipeline-chip__label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Empty-phase placeholder inside an accordion section. */
.admin-empty {
  margin: 14px 0 0;
  padding: 16px;
  color: var(--cream-dim);
  font-style: italic;
  border: 1px dashed var(--rule);
}
.admin-empty-cell {
  color: var(--cream-dim);
  font-style: italic;
}

/* ---- Row actions: the "…" kebab trigger ---- */
.admin-actions {
  text-align: right;
}
.admin-th-actions {
  text-align: right;
}
.admin-kebab {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.admin-kebab:hover {
  border-color: var(--orange);
}

/* ---- One aligned column grid for the whole board. Driven by a shared
   <colgroup> (built once in admin.js): Phase + the six data columns. With
   `table-layout: fixed` these <col> widths win over content; in the mobile card
   layout the table becomes `display: block`, so <col> widths are ignored and the
   labelled-card stacking is left untouched — no media query needed. ---- */
.admin-table col:nth-child(1) {
  width: 4%;
} /* Phase (rotated merged cell) */
.admin-table col:nth-child(2) {
  width: 10%;
} /* When */
.admin-table col:nth-child(3) {
  width: 27%;
} /* Customer */
.admin-table col:nth-child(4) {
  width: 23%;
} /* Project */
.admin-table col:nth-child(5) {
  width: 18%;
} /* Quote */
.admin-table col:nth-child(6) {
  width: 11%;
} /* Photos */
.admin-table col:nth-child(7) {
  width: 7%;
} /* Actions */

/* ---- Merged, vertically-written phase column down the left edge ---- */
.admin-phase {
  vertical-align: middle;
  text-align: center;
  background: var(--ink-2);
  border-right: 1px solid var(--rule);
  padding: 8px 2px;
}
.admin-phase__label {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ---- Inline-editable row fields (quote / actual / tracking) ---- */
.admin-inline-field {
  display: block;
  margin-bottom: 8px;
}
.admin-inline-field__label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 2px;
}
.admin-inline {
  width: 100%;
  max-width: 140px;
  font-family: var(--display);
  font-size: 14px;
  padding: 5px 8px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--rule);
}
.admin-inline:focus {
  outline: none;
  border-color: var(--orange);
}
.admin-inline:disabled {
  opacity: 0.6;
}

/* ---- Overlay / modal dialog ---- */
body.modal-open {
  overflow: hidden;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 7, 4, 0.72);
}
.modal__card {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.modal__bar {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}
.modal__title {
  margin: 0;
  font-size: 16px;
}
.modal__body {
  padding: 18px;
  overflow-y: auto;
}

/* Stacked action list inside the "…" overlay. */
.action-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.action-menu__item {
  text-align: left;
  padding: 9px 14px;
  background: transparent;
  color: var(--cream);
  border: none;
  border-radius: 5px;
  font-family: var(--display);
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.action-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.action-menu__item.is-primary {
  color: var(--orange);
  font-weight: 600;
}
.action-menu__item.is-primary:hover {
  background: rgba(200, 112, 45, 0.16);
}
.action-menu__item.is-danger {
  color: var(--orange-hi);
}
.action-menu__item.is-danger:hover {
  background: rgba(124, 32, 24, 0.22);
}
/* Floating, fixed-positioned actions menu (no backdrop). Sits above board content
   but below modals (80) and drawers (9000). A light, low-key panel. */
.action-menu--pop {
  position: fixed;
  z-index: 75;
  min-width: 188px;
  padding: 6px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Detail overlay rows. */
.detail__row {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
.detail__label {
  flex: 0 0 130px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.detail__value {
  font-family: var(--serif);
  font-size: 15px;
}
.detail__notes {
  margin-top: 14px;
}
.detail__notes p {
  margin: 6px 0 0;
  font-family: var(--serif);
  white-space: pre-wrap;
}

/* Form layout inside overlays (quote / promote / cancel / upload). */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-drop--wide {
  max-width: none;
}

/* ---- Admin launchpad ---- */
.launchpad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.launchpad-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--cream);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.launchpad-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}
.launchpad-card__icon {
  font-size: 30px;
}
.launchpad-card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.launchpad-card__desc {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--cream-dim);
  line-height: 1.5;
}

/* ---- Admin mobile layout ---- */
@media (max-width: 760px) {
  .admin-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .admin-nav {
    justify-content: flex-end;
  }
  /* Stickiness would crowd the small viewport — let the controls scroll away. */
  .admin-controls {
    position: static;
    top: auto;
  }
  /* The floating actions menu sizes to the small viewport. */
  .action-menu--pop {
    min-width: 0;
    max-width: calc(100vw - 16px);
  }
  /* Stack each table row into a labelled card. */
  .admin-table thead {
    display: none;
  }
  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }
  .admin-table tr {
    border: 1px solid var(--rule);
    margin-top: 14px;
    padding: 6px 0;
  }
  .admin-table td {
    border-bottom: none;
    padding: 8px 14px;
  }
  .admin-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--display);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream-dim);
    margin-bottom: 3px;
  }
  .admin-actions,
  .admin-th-actions {
    text-align: left;
  }
  /* The merged/rotated phase cell can't span cards on mobile; show it as a
     plain group heading on the first card of each phase instead. */
  .admin-phase {
    border-right: none;
    text-align: left;
  }
  .admin-phase__label {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .modal {
    padding: 0;
  }
  .modal__card {
    max-width: none;
    max-height: 100vh;
    height: 100%;
  }
  .detail__row {
    flex-direction: column;
    gap: 2px;
  }
  .detail__label {
    flex-basis: auto;
  }
}

/* ---- Admin login page ---- */
body.login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  padding: var(--pad);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.login-title {
  font-size: clamp(24px, 4vw, 32px);
  margin: 4px 0 24px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login-label {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 12px;
}
.login-input {
  font-family: var(--display);
  font-size: 15px;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--rule);
}
.login-input:focus {
  outline: none;
  border-color: var(--orange);
}
.login .btn {
  margin-top: 24px;
  background: var(--orange);
  color: #1b1109;
  border-color: var(--orange);
}
.login .btn:hover {
  background: var(--orange-hi);
  border-color: var(--orange-hi);
}
.login .btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.login-error {
  margin: 16px 0 0;
  min-height: 1.2em;
  color: var(--orange-hi);
  font-size: 14px;
}

/* ---- Gallery admin page ---- */
.gallery-admin-upload {
  padding: 28px var(--pad) 0;
}
.gallery-admin-list-section {
  padding: 28px var(--pad) 80px;
}
.gallery-admin-section-title {
  font-family: var(--display);
  font-size: clamp(16px, 2vw, 20px);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
}
.gallery-admin-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 32px;
}
.gallery-admin-caption-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gallery-admin-label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.gallery-admin-caption-input {
  width: 320px;
  max-width: 100%;
}
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.gallery-admin-card {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}
.gallery-admin-img-wrap {
  position: relative;
}
.gallery-admin-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
  display: block;
}
.gallery-admin-hero-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--orange);
  color: #1b1109;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  pointer-events: none;
}
/* Spotlight badge — top-right, opposite the hero-tile badge so both can coexist. */
.gallery-admin-spotlight-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--ink);
  color: var(--orange);
  border: 1px solid var(--orange);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  pointer-events: none;
}
/* Active state for the "Set as spotlight" toggle (no btn--primary in this theme). */
.gallery-admin-card-actions .btn.is-active {
  background: var(--orange);
  color: #1b1109;
  border-color: var(--orange);
}
.gallery-admin-caption {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--cream);
  flex: 1;
  line-height: 1.5;
}
.gallery-admin-caption-textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 14px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--orange);
  padding: 8px;
  resize: vertical;
  min-height: 56px;
}
.gallery-admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ----- Order & Quote Console: 30-day toggle, phase bands, email confirm ----- */

/* "Show older completed/cancelled" toggle in the toolbar. */
.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 13px;
  color: var(--cream-dim);
  cursor: pointer;
  white-space: nowrap;
}
.admin-toggle input {
  accent-color: var(--orange);
}

/* Alternating phase bands: adjacent phase groups get subtly different row
   backgrounds so they don't blend together while scrolling. Band A stays on the
   page background; band B is faintly lifted. The merged phase cell keeps its own
   solid panel background (set on .admin-phase) regardless of band. */
.admin-table tbody tr.phase-band--b td {
  background: rgba(236, 229, 216, 0.035);
}
.admin-table tbody tr.phase-band--b td.admin-phase {
  background: var(--ink-3);
}

/* Email confirmation modal: notes field, optional photo step, live preview. */
.confirm__notes {
  width: 100%;
  font-family: var(--serif);
  font-size: 14px;
  padding: 8px 10px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--rule);
  resize: vertical;
  min-height: 56px;
}
.confirm__notes:focus {
  outline: none;
  border-color: var(--orange);
}
.confirm__photos {
  border: 1px solid var(--rule);
  background: var(--ink);
  padding: 8px 12px;
}
.confirm__photos > summary {
  cursor: pointer;
  font-family: var(--display);
  font-size: 13px;
  color: var(--cream-dim);
}
.email-preview {
  border: 1px solid var(--rule);
  background: var(--ink);
}
.email-preview__head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.email-preview__subject {
  padding: 8px 12px;
  font-family: var(--display);
  font-size: 13px;
  color: var(--cream);
  border-bottom: 1px solid var(--rule);
  word-break: break-word;
}
.email-preview__frame {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background: #fff;
}

/* Email Templates admin page */
.email-tpl-list {
  display: grid;
  gap: 24px;
  margin-top: 16px;
}
.email-tpl-card {
  border: 1px solid var(--rule);
  background: var(--ink-2, var(--panel, #1d1915));
  padding: 20px;
}
.email-tpl-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.email-tpl-card__title {
  margin: 0;
  font-size: 18px;
}
.email-tpl-badge {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 999px;
  padding: 2px 10px;
}
.email-tpl-card__desc {
  margin: 6px 0 10px;
}
.email-tpl-tokens {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--cream-dim);
}
.email-tpl-tokens code,
.admin-board code {
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  color: var(--cream);
}
.email-tpl-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.email-tpl-field {
  display: grid;
  gap: 6px;
}
/* The global .admin-input caps width at 200px; in the editor column let subject/
   heading/body/label fields fill the available width. The color hex input is nested
   in .email-tpl-color (not a direct child) so it keeps its narrow 120px sizing. */
.email-tpl-field > .admin-input {
  width: 100%;
  max-width: none;
}
.email-tpl-label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.email-tpl-textarea {
  resize: vertical;
  min-height: 96px;
  font-family: var(--display);
  line-height: 1.5;
}
.email-tpl-card__actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

/* Template dropdown nav */
.email-tpl-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 8px;
}
.email-tpl-select-label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
}
.email-tpl-select {
  max-width: 380px;
}

/* Token cheat sheet */
.token-ref {
  margin: 0 0 16px;
  border: 1px solid var(--rule);
  background: var(--ink-2, var(--panel, #1d1915));
  padding: 10px 14px;
}
.token-ref > summary {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
  cursor: pointer;
  user-select: none;
}
.token-ref__table {
  border-collapse: collapse;
  margin-top: 10px;
  /* Size columns to content rather than stretching the description across the full
     width (which left a wide band of empty space). */
  width: auto;
  max-width: 620px;
  font-size: 13px;
}
.token-ref__table th,
.token-ref__table td {
  text-align: left;
  padding: 4px 12px 4px 0;
  color: var(--cream);
}
.token-ref__table th {
  color: var(--cream-dim);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}

/* Side-by-side card layout */
.email-tpl-grid {
  display: grid;
  /* Give the editor column a little more room than the preview; minmax(0,…) lets
     long inputs/iframes shrink instead of forcing the grid wider. */
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
}
.email-tpl-preview-col {
  position: sticky;
  top: 16px;
}

/* Color picker pair */
.email-tpl-color {
  display: flex;
  align-items: center;
  gap: 8px;
}
.email-tpl-color__hex {
  flex: 1;
  max-width: 120px;
}
.email-tpl-color__picker {
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  padding: 2px;
}

@media (max-width: 820px) {
  .email-tpl-grid {
    grid-template-columns: 1fr;
  }
  .email-tpl-preview-col {
    position: static;
  }
}

/* Drawers */
.drawer {
  position: fixed;
  top: 0;
  height: 100%;
  width: min(480px, 95vw);
  background: var(--panel);
  border-top: none;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.drawer--right {
  right: 0;
  transform: translateX(110%);
}
.drawer--left {
  left: 0;
  transform: translateX(-110%);
}
.drawer.open {
  transform: none;
}
/* The base .drawer/#lightbox rules set display:flex, which overrides the [hidden]
   attribute (UA [hidden]{display:none} loses to any explicit display). Re-assert
   it so a hidden drawer/lightbox is truly removed and can't blanket the page. */
.drawer[hidden],
#lightbox[hidden] {
  display: none;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}
.drawer-header__title {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--cream);
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}
#drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 8999;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
}
#lightbox img {
  max-width: calc(100vw - 60px);
  max-height: calc(100vh - 60px);
  object-fit: contain;
  border: 1px solid var(--rule);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--cream);
  font-size: 18px;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
}
.lightbox-close:hover {
  background: var(--panel);
}

/* Admin camera icon for photos column */
.admin-photo-icon-svg {
  display: inline-block;
  vertical-align: middle;
}
.admin-photo-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 13px;
  color: var(--cream-dim);
}

/* Edit Details drawer form */
.details-form-field {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}
.details-form-field label {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.details-form-actions {
  display: flex;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  margin-top: 8px;
}

/* ===========================================================
   Light-theme patches — placed at end of file (after the base
   rules they override) so source order stays low→high specificity.
   The variable flip under html[data-theme="light"] (near :root)
   does most of the work; these handle rules that hardcode colors
   or intentionally invert. Enabled via SITE_THEME=light.
   =========================================================== */

/* .paper sections are now dark: hardcoded taupe text becomes a light muted. */
html[data-theme="light"] .paper .muted,
html[data-theme="light"] .paper .tag,
html[data-theme="light"] .quote-grid footer,
html[data-theme="light"] .review-rating,
html[data-theme="light"] .prep-list li,
html[data-theme="light"] .why-img figcaption,
html[data-theme="light"] .mat-img figcaption {
  color: #b9ad98;
}
/* Subtle card lift inside now-dark .paper (the rgba(0,0,0,.03) is invisible there). */
html[data-theme="light"] .compare-card {
  background: rgba(255, 255, 255, 0.04);
}

/* Translucent nav: dark scrim -> light scrim. */
html[data-theme="light"] .nav {
  background: rgba(244, 238, 226, 0.86);
}

/* Form input focus: dark fill -> light fill. */
html[data-theme="light"] .field input:focus,
html[data-theme="light"] .field select:focus,
html[data-theme="light"] .field textarea:focus {
  background: #fbf7ee;
}

/* Inverting count pill: keep dark chip + light text for contrast on light bg. */
html[data-theme="light"] .admin-count {
  color: #f4eee2;
  background: #3a3128;
}

/* White-on-dark hovers / row tints are invisible on light -> dark low-alpha. */
html[data-theme="light"] .action-menu__item:hover {
  background: rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .admin-table tbody tr.phase-band--b td {
  background: rgba(0, 0, 0, 0.03);
}

/* Hero text sits over a dark photo + scrim that stays dark in both themes, so
   keep it light even in light mode. The home .hero and the interior page heroes
   that carry a .page-hero-scrim qualify; results' bare .page-hero (no photo) is
   excluded by :has() so its text flips dark against the light page. Re-pinning the
   --cream/--cream-dim vars in this scope keeps .lede/.breadcrumb light too, and the
   explicit color re-establishes light inherited text for the heading and paragraphs. */
html[data-theme="light"] .hero-content,
html[data-theme="light"] .page-hero:has(.page-hero-scrim) {
  --cream: #ece5d8;
  --cream-dim: #b9ad98;
  color: var(--cream);
}
