@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* =============================================================================
   ImaginationFoundry — public site design system.
   Public pages: black / yellow / blue, "circuit board" futuristic ground.
   Admin pages (.dash-shell, .login-shell): a scoped grey/white/blue token
   override near the bottom of this file keeps the admin CMS reading as
   plain professional software, whatever this palette does up here.
   ============================================================================= */
:root {
  --bg: #06070B;
  --surface: #12151D;
  --surface-alt: #1B2029;
  --ink: #EEF1F8;
  --muted: #8A93A8;
  --border: #262C3A;

  --primary: #2F8FFF;       /* electric blue — links, icons, secondary UI */
  --primary-dark: #1B4B91;
  --secondary: #59C7FF;

  --accent: #FFD23F;        /* yellow — the one CTA / highlight color */
  --accent-dark: #E8B70F;
  --accent-ink: #06070B;    /* text color placed ON the yellow accent */
  --accent-soft: rgba(255, 210, 63, 0.14);

  --good: #35D399; --good-soft: rgba(53, 211, 153, 0.14);
  --warn: #FFB020; --warn-soft: rgba(255, 176, 32, 0.14);
  --danger: #FF5C5C; --danger-soft: rgba(255, 92, 92, 0.14);

  --radius-md: 8px; --radius-lg: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 28px rgba(0,0,0,0.55);
  --glow-primary: 0 0 0 1px rgba(47,143,255,0.45), 0 0 26px rgba(47,143,255,0.20);
  --glow-accent: 0 0 0 1px rgba(255,210,63,0.55), 0 0 26px rgba(255,210,63,0.20);

  --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --header-height: 76px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* "Circuit board" ground: two soft color blooms + a faint traced grid,
   underneath everything on every public page — not just the homepage. */
body {
  margin: 0;
  background:
    radial-gradient(ellipse 900px 480px at 12% -8%, rgba(47,143,255,0.16), transparent 60%),
    radial-gradient(ellipse 720px 460px at 102% 2%, rgba(255,210,63,0.10), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 64px),
    var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  line-height: 1.6;
}
code, .mono { font-family: 'IBM Plex Mono', monospace; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { font-weight: 700; margin: 0 0 8px; color: var(--ink); }
p { margin: 0 0 0.9em; }
a { color: var(--primary); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); background: rgba(9,11,16,0.82); backdrop-filter: blur(10px); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--primary), var(--accent)); opacity: 0.55; }
.site-header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 16px 0; }
.header-tagline {
  justify-self: center; display: flex; align-items: center; gap: 11px;
  font-family: 'Orbitron', 'IBM Plex Mono', monospace; font-size: 0.94rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
  padding: 9px 22px; border: 1px solid var(--border); border-radius: 999px;
  background: linear-gradient(180deg, rgba(47,143,255,0.10), rgba(255,210,63,0.05));
  box-shadow: 0 0 0 1px rgba(47,143,255,0.12) inset, 0 4px 18px rgba(47,143,255,0.10);
}
.header-tagline .arrow { color: var(--accent); font-weight: 800; font-size: 1.1em; }
@media (max-width: 980px) { .header-tagline { display: none; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--accent-ink); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-family: 'Orbitron', 'IBM Plex Mono', monospace; font-size: 0.78rem; letter-spacing: 0.02em;
}
/* Real logo image (2026-09-06), replacing the old .brand-mark "IF" chip
   everywhere the brand appears — nav bar, admin sidebar, admin/client login
   panels. Sized to roughly the same footprint the old chip held, just a
   touch taller since the source art isn't a perfect square. */
.brand-mark-img { height: 34px; width: auto; display: block; flex-shrink: 0; }
.brand-name { font-weight: 700; color: var(--ink); font-size: 1.05rem; font-family: 'Orbitron', 'IBM Plex Sans', sans-serif; letter-spacing: 0.01em; }
.brand-name-accent { color: var(--accent); }
.nav-admin-link { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.nav-admin-link:hover { color: var(--ink); border-color: var(--primary); }

/* Primary nav + hamburger menu (top-right) — the hamburger is the ONE nav
   control at every screen size (not just a mobile fallback): logo on the
   left, a single toggle button on the right, and the link list lives in a
   dropdown panel that opens under it. Keeps the header bar short and
   consistent instead of spreading a full link row edge-to-edge. */
.site-nav {
  position: absolute; top: 100%; right: 0; margin-top: 10px; min-width: 240px;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 10px; max-height: 0; opacity: 0; overflow: hidden; pointer-events: none;
  transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
}
.site-nav.open { max-height: 420px; opacity: 1; pointer-events: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 11px 14px; border-radius: var(--radius-md); }
.site-nav a:hover { color: var(--primary); background: var(--surface-alt); }
.site-nav .nav-admin-link { font-weight: 600; border: none; padding: 11px 14px; }
.site-nav .nav-cta { margin-left: 0; margin-top: 6px; justify-content: center; }

.nav-toggle {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 40px; height: 36px; padding: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--primary); }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 1px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 560px) {
  .site-nav { right: 0; left: 0; min-width: 0; }
}

.site-footer { padding: 40px 0 32px; color: var(--muted); font-size: 0.85rem; margin-top: 48px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.footer-inner p { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--ink); }
@media (max-width: 560px) { .footer-inner { flex-direction: column; align-items: flex-start; } }

/* Hero — base styling shared by every page's intro section (glow, type).
   Sizes to its own content by default (get-started.php, and any future
   page that reuses .hero for a short intro above other content). */
.hero { position: relative; padding: 56px 0 40px; text-align: center; overflow: hidden; }
/* Hero — homepage-only modifier (.hero-full, index.php): fills the screen
   (viewport minus header) so nothing from the next section peeks into the
   first fold there; an anchor link into that section then actually feels
   like going somewhere instead of a no-op. Not applied globally — that
   was leaving pages with a short intro (get-started.php) centered in a
   100vh box with a big dead gap before their actual content. */
.hero-full { min-height: calc(100vh - var(--header-height)); display: flex; align-items: center; padding: 48px 0; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle 460px at 16% 24%, rgba(47,143,255,0.28), transparent 62%),
    radial-gradient(circle 420px at 86% 76%, rgba(255,210,63,0.20), transparent 62%);
  filter: blur(8px);
  animation: heroGlowDrift 16s ease-in-out infinite alternate;
}
@keyframes heroGlowDrift { from { transform: translate(0, 0) scale(1); } to { transform: translate(3%, -3%) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero .wrap { position: relative; z-index: 1; width: 100%; }
.eyebrow { font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.76rem; font-weight: 600; color: var(--secondary); margin: 0 0 14px; }
.eyebrow::before { content: "●"; color: var(--accent); font-size: 0.6em; vertical-align: middle; margin-right: 8px; }
.hero h1 { font-family: 'Orbitron', 'IBM Plex Sans', sans-serif; font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: 0.005em; text-wrap: balance; }
.hero h1 .accent-word { color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.build-spinner { width: 40px; height: 40px; margin: 28px auto 0; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: buildSpin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .build-spinner { animation: none; border-top-color: var(--border); } }
@keyframes buildSpin { to { transform: rotate(360deg); } }

.hero-stats { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-stat { text-align: center; }
.hero-stat .n { display: block; font-family: 'Orbitron', 'IBM Plex Mono', monospace; font-weight: 800; font-size: 1.5rem; color: var(--accent); }
.hero-stat .l { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* Homepage sections (index.php): How It Works / Industries / Contact.
   scroll-margin-top accounts for the sticky header — without it, an anchor
   link (e.g. "See How It Works" -> #how-it-works) lands with the section's
   own heading hidden UNDER the sticky nav and the step cards cut off at the
   bottom of the viewport instead of a clean, fully-visible section. */
.wrap-narrow { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; scroll-margin-top: calc(var(--header-height) + 8px); }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head .eyebrow { justify-content: center; }
.section-head h2 { font-family: 'Orbitron', 'IBM Plex Sans', sans-serif; font-size: clamp(1.4rem, 3vw, 1.9rem); text-wrap: balance; }
.section-head p { color: var(--muted); margin: 0; }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 20px 22px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.step-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--glow-primary), var(--shadow); }
/* Large ghost number in the corner — ties the four cards together as a
   sequence instead of four unrelated boxes; icon/heading/body sit above it. */
.step-card .step-num {
  position: absolute; top: 8px; right: 14px; font-family: 'Orbitron', 'IBM Plex Mono', monospace;
  font-size: 2.5rem; font-weight: 800; color: var(--border); opacity: 0.65; line-height: 1; margin: 0; z-index: 0; user-select: none;
}
.step-card .icon-wrap {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-alt); border: 1px solid var(--border); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.step-card h3 { position: relative; z-index: 1; font-size: 1rem; margin-bottom: 6px; }
.step-card p { position: relative; z-index: 1; color: var(--muted); font-size: 0.88rem; margin: 0; }
/* Cycle the four steps through the brand palette instead of one flat blue,
   and draw a connecting arrow between them so the row reads as a flow. */
.step-card:nth-child(1) .icon-wrap { background: rgba(47,143,255,0.14); border-color: rgba(47,143,255,0.4); color: var(--primary); }
.step-card:nth-child(2) .icon-wrap { background: rgba(255,210,63,0.14); border-color: rgba(255,210,63,0.4); color: var(--accent); }
.step-card:nth-child(3) .icon-wrap { background: rgba(53,211,153,0.14); border-color: rgba(53,211,153,0.4); color: var(--good); }
.step-card:nth-child(4) .icon-wrap { background: rgba(89,199,255,0.14); border-color: rgba(89,199,255,0.4); color: var(--secondary); }
.step-card:not(:last-child)::after {
  content: "\2192"; position: absolute; top: 50%; right: -15px; transform: translateY(-50%);
  color: var(--muted); font-size: 1.05rem; font-weight: 700; z-index: 2;
}
@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .step-card:not(:last-child)::after { display: none; }
}
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } .hero-actions { flex-direction: column; align-items: stretch; } }

.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px 0 64px; }
.industry-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
}
.industry-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--glow-primary), var(--shadow); }
.industry-card:hover .icon-wrap { transform: scale(1.08); }
.industry-card.unavailable { opacity: 0.45; pointer-events: none; }
.industry-card .icon-wrap {
  width: 42px; height: 42px; border-radius: 11px; color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(47,143,255,0.18), rgba(255,210,63,0.10));
  border: 1px solid rgba(47,143,255,0.30);
  transition: transform .15s ease;
}
.industry-card h3 { font-size: 1rem; margin-bottom: 4px; }
.industry-card .status { position: absolute; top: 18px; right: 18px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; }
.industry-card .status.ready { background: var(--good-soft); color: var(--good); }
.industry-card .status.soon { background: var(--surface-alt); color: var(--muted); }

@media (max-width: 800px) { .industry-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .industry-grid { grid-template-columns: 1fr; } }

/* Multi-trade picker (index.php) */
.industry-pick { cursor: pointer; user-select: none; }
.industry-pick .industry-checkbox { position: absolute; top: 18px; left: 18px; width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.industry-pick.selected { border-color: var(--accent); box-shadow: var(--glow-accent), var(--shadow); }
.continue-bar { position: sticky; bottom: 0; background: rgba(9,11,16,0.88); backdrop-filter: blur(10px); border-top: 1px solid var(--border); box-shadow: 0 -10px 28px rgba(0,0,0,0.5); }
.continue-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 16px 24px; flex-wrap: wrap; }

/* Category picker (index.php — trades grouped so 13+ industries don't
   show as one long wall of tiles; a category tile reveals its trades). */
.category-grid { padding-bottom: var(--space-4); }
.category-card {
  width: 100%; font: inherit; text-align: left; appearance: none; -webkit-appearance: none;
}
.category-card:hover { cursor: pointer; }
.category-card[aria-expanded="true"] { border-color: var(--primary); box-shadow: var(--glow-primary), var(--shadow); }
.category-card.selected { border-color: var(--accent); box-shadow: var(--glow-accent), var(--shadow); }
.category-badge { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.category-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-5); box-shadow: var(--shadow); }
.category-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-2); }
.category-panel-head h2 { margin: 0; font-size: 1.15rem; font-family: 'Orbitron', 'IBM Plex Sans', sans-serif; }
.category-panel .industry-grid { padding: 20px 0 4px; }
.category-panel .industry-card { background: var(--surface-alt); }

/* Forms */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-5); box-shadow: var(--shadow); }
.field { margin-bottom: var(--space-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
/* Two-up field pairs (Identity, Contact, checkout billing, etc.) were the one
   place on this page with no phone breakpoint at all — a 1fr 1fr grid at a
   375px screen width leaves each input under 160px wide. Collapses to one
   column below tablet width, same threshold as .service-row just below. */
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
  font: inherit; font-size: 0.92rem; background: #fff; color: #182230;
}
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-md); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.color-row { display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
.color-field { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.color-field label { font-size: 0.75rem; }
.color-field-hint { font-size: 0.68rem; color: var(--muted); }

/* Live homepage preview (intake.php) — rebuilt 2026-09-06, replacing the
   earlier 4-line color-swatch mock. Mirrors a real delivered homepage's
   actual section order (topbar -> header/nav -> hero+action-cards -> trust
   row -> featured services -> footer — see PLUMBING/public_html/index.php,
   the shared base every industry template builds from) so a prospect sees
   every bit of what their color/logo/name/service choices touch, not just
   disconnected squares. All colors below flow through --pv-* custom
   properties set live by intake.php's inline script — deliberately
   namespaced so they can never collide with this Portal's own
   --primary/--accent/etc theme tokens used everywhere else on this page. */
.color-preview-caption { margin: 8px 0 0; font-size: 0.72rem; }

.site-preview-frame {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  margin-top: var(--space-2); box-shadow: var(--shadow);
  /* Fallback values so the frame still looks right for the instant before
     intake.php's inline script runs its first paint(). */
  --pv-primary: #163654; --pv-primary-dark: #0f2a44; --pv-secondary: #2F6690;
  --pv-accent: #D97B32; --pv-bg: #F5F7FA; --pv-text: #1B2430;
  --pv-muted: #5A6474; --pv-border: #DCE3EC; --pv-surface: #ffffff;
}
.site-preview-browserbar {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: #E4E7EC; border-bottom: 1px solid var(--border);
}
.site-preview-dot { width: 8px; height: 8px; border-radius: 50%; background: #C7CCD4; }
.site-preview-url {
  margin-left: 8px; font-size: 0.72rem; color: #667085; background: #fff;
  border: 1px solid #D0D5DD; border-radius: var(--radius-pill); padding: 2px 10px;
}
.site-preview-scroll {
  /* Deliberately no max-height/scroll here — Shan's explicit ask was that the
     preview show "every bit of what is changing" at a glance, so the frame
     grows to fit the whole mock homepage instead of hiding sections behind
     an inner scrollbar the way a small widget would. */
  background: var(--pv-bg); color: var(--pv-text);
  transition: background-color .15s ease, color .15s ease;
}
.site-preview-topbar {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--pv-primary-dark); color: #fff; font-size: 0.72rem; padding: 6px 20px;
  transition: background-color .15s ease;
}
.site-preview-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; background: var(--pv-surface); border-bottom: 1px solid var(--pv-border);
}
.site-preview-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.98rem; min-width: 0; }
.site-preview-logo-fallback {
  width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--pv-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; flex-shrink: 0;
  transition: background-color .15s ease;
}
.site-preview-brand img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.site-preview-brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-preview-nav { display: flex; gap: 16px; font-size: 0.8rem; font-weight: 600; color: var(--pv-muted); flex-wrap: wrap; }
.site-preview-cta {
  background: var(--pv-accent); color: #fff; font-weight: 700; font-size: 0.78rem;
  padding: 8px 16px; border-radius: var(--radius-md); white-space: nowrap;
}
.site-preview-hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding: 32px 20px;
  background: var(--pv-primary); color: #fff; transition: background-color .15s ease;
}
.site-preview-eyebrow { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .8; margin-bottom: 8px; }
.site-preview-hero-copy h1 { color: #fff; font-size: 1.5rem; margin: 0 0 10px; line-height: 1.2; }
.site-preview-hero-copy p { color: rgba(255,255,255,.82); font-size: 0.85rem; margin: 0 0 14px; max-width: 46ch; }
.site-preview-trust { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.76rem; font-weight: 600; }
.site-preview-actions { display: flex; flex-direction: column; gap: 12px; }
.site-preview-actioncard { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-md); padding: 14px; }
.site-preview-actioncard.is-accent { background: var(--pv-accent); border-color: transparent; }
.site-preview-actioncard h3 { color: #fff; font-size: 0.88rem; margin: 0 0 4px; }
.site-preview-actioncard p { color: rgba(255,255,255,.85); font-size: 0.76rem; margin: 0 0 10px; }
.site-preview-btn {
  display: inline-block; background: #fff; color: var(--pv-primary); font-weight: 700; font-size: 0.76rem;
  padding: 6px 12px; border-radius: var(--radius-md);
}
.site-preview-btn.is-outline { background: transparent; color: #fff; border: 1.5px solid #fff; }
.site-preview-services { padding: 28px 20px; background: var(--pv-bg); transition: background-color .15s ease; }
.site-preview-services h2 { color: var(--pv-primary-dark); font-size: 1.1rem; margin: 0 0 14px; }
.site-preview-cardgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.pv-card { background: var(--pv-surface); border: 1px solid var(--pv-border); border-radius: var(--radius-md); overflow: hidden; }
.pv-card-photo {
  aspect-ratio: 3/2; background: linear-gradient(135deg, var(--pv-border), var(--pv-surface));
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; opacity: .6;
}
.pv-card-body { padding: 12px; }
.pv-card-body h3 { color: var(--pv-text); font-size: 0.85rem; margin: 0 0 4px; }
.pv-card-body p { color: var(--pv-muted); font-size: 0.74rem; margin: 0 0 6px; }
.pv-card-price { font-size: 0.72rem; font-weight: 700; color: var(--pv-accent); }
.site-preview-more { text-align: center; color: var(--pv-muted); font-size: 0.76rem; margin: 12px 0 0; }
.site-preview-footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; background: var(--pv-primary-dark); color: rgba(255,255,255,.75); font-size: 0.74rem;
  transition: background-color .15s ease;
}

@media (max-width: 640px) {
  .site-preview-hero { grid-template-columns: 1fr; }
  .site-preview-header { flex-direction: column; align-items: flex-start; }
}

.service-row { display: grid; grid-template-columns: 2fr 3fr 1fr 1.4fr; gap: var(--space-3); align-items: end; margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.service-row:last-child { border-bottom: none; }
@media (max-width: 700px) { .service-row { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 0.9rem; padding: 11px 20px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-alt); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Flash */
.flash { margin: var(--space-4) 0; padding: 12px 16px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; }
.flash-success { background: var(--good-soft); color: var(--good); border: 1px solid rgba(53,211,153,0.35); }
.flash-error { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(255,92,92,0.35); }
.flash-info { background: var(--surface-alt); color: var(--secondary); border: 1px solid var(--border); }

/* Domain availability status hint (2026-09-07) — intake.php's live check */
.domain-status-checking { color: var(--muted); }
.domain-status-available { color: var(--good); font-weight: 600; }
.domain-status-taken { color: var(--danger); font-weight: 600; }

/* Stat tiles */
.stat-row { display: flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); margin-bottom: var(--space-5); }
.stat { flex: 1; min-width: 130px; padding: 16px 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat .n { font-family: 'IBM Plex Mono', monospace; font-size: 1.4rem; font-weight: 600; color: var(--primary); display: block; }
.stat .l { font-size: 0.78rem; color: var(--muted); }
@media (max-width: 480px) {
  /* Below ~2 tiles per row, a right border on the last tile in each wrapped
     row would otherwise look like a stray line — drop borders altogether
     and stack full-width instead, cleanest at the narrowest phone widths. */
  .stat { flex: 1 1 100%; border-right: none; }
  .stat:last-child { border-bottom: none; }
}

/* A 4-across form-field grid used by admin/db_pool.php's "Add One Database"
   form — pulled out of that file's inline style (2026-09-07) because an
   inline style can't carry a media query, and 4 equal columns is unusable
   below tablet width (each field ends up under 90px wide on a phone). */
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
@media (max-width: 700px) { .form-grid-4 { grid-template-columns: 1fr; } .form-grid-4 [style*="grid-column"] { grid-column: auto !important; } }

/* Domain & Email panel (2026-09-07 — intake.php) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .choice-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .choice-grid-4 { grid-template-columns: 1fr; } }
.choice-card { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 0.88rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 14px; cursor: pointer; }
.choice-card input { width: auto; margin-top: 3px; flex-shrink: 0; }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--surface-alt); }
.choice-inline { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; margin-top: 10px; }
.choice-inline input { width: auto; flex-shrink: 0; margin-top: 2px; }
.domain-sub-block { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--border); }
.mailbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mailbox-row input { flex: 1; min-width: 0; }
.mailbox-at { white-space: nowrap; color: var(--muted); font-size: 0.88rem; }
.mailbox-remove { flex-shrink: 0; padding: 4px 10px; line-height: 1; }
@media (max-width: 480px) {
  .mailbox-row { flex-wrap: wrap; }
  .mailbox-at { flex-basis: 100%; order: 3; }
}

/* Tables */
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data-table th { text-align: left; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 2px solid var(--border); }
table.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data-table tr:hover td { background: var(--surface-alt); }

.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-new { background: rgba(47,143,255,0.14); color: var(--secondary); }
.badge-progress { background: var(--warn-soft); color: var(--warn); }
.badge-completed { background: var(--good-soft); color: var(--good); }
.badge-failed { background: var(--danger-soft); color: var(--danger); }
.badge-hosted { background: var(--surface-alt); color: var(--muted); }

/* Admin shell (mirrors the client-site admin so it feels like the same family) */
.dash-shell { display: flex; min-height: 100vh; background: var(--bg); }
.dash-sidebar { width: 240px; background: var(--primary-dark); color: #fff; padding: 24px 18px; flex-shrink: 0; display: flex; flex-direction: column; }
.dash-sidebar .brand { color: #fff; margin-bottom: 4px; }
.dash-sidebar .brand-name { color: #fff; }
.dash-sidebar .sub { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-bottom: 24px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav a { color: rgba(255,255,255,0.78); text-decoration: none; padding: 9px 12px; border-radius: 7px; font-size: 0.9rem; font-weight: 500; }
.dash-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dash-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.dash-nav-logout-mobile { display: none; } /* shown only in the mobile dropdown -- see the 860px query below; desktop already has its own Log Out link at the bottom of the sidebar */
.dash-main { flex: 1; padding: 32px 40px; max-width: 1200px; background: var(--surface); min-width: 0; }
.dash-topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }

/* Phone layout (2026-09-07) — a fixed 240px sidebar was the single biggest
   gap in "the entire site is phone compatible": at a 375px screen it left
   under 135px for the actual admin content. Collapses the sidebar into a
   short top bar (brand + hamburger) with the same nav list opening as a
   dropdown, mirroring the public site's .site-nav pattern below — same
   interaction language across the whole Portal instead of a one-off. */
.dash-toggle {
  display: none; align-items: center; justify-content: center; gap: 5px;
  width: 40px; height: 36px; padding: 0; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-md); cursor: pointer; flex-shrink: 0;
}
.dash-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px; transition: transform .2s ease, opacity .2s ease; }
.dash-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dash-toggle.open span:nth-child(2) { opacity: 0; }
.dash-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .dash-shell { flex-direction: column; min-height: 0; }
  .dash-sidebar {
    width: 100%; flex-direction: row; align-items: center; justify-content: space-between;
    padding: 14px 16px; position: sticky; top: 0; z-index: 20;
  }
  .dash-sidebar .brand, .dash-sidebar .sub { margin-bottom: 0; }
  .dash-sidebar .sub { display: none; }
  .dash-toggle { display: flex; }
  .dash-nav {
    position: absolute; top: 100%; left: 16px; right: 16px; margin-top: 8px;
    background: var(--primary-dark); border-radius: var(--radius-lg); padding: 8px;
    max-height: 0; opacity: 0; overflow: hidden; pointer-events: none;
    transition: max-height .25s ease, opacity .2s ease;
  }
  .dash-nav.open { max-height: 420px; opacity: 1; pointer-events: auto; overflow-y: auto; }
  .dash-nav-logout-mobile { display: block; border-top: 1px solid rgba(255,255,255,0.15); margin-top: 6px; padding-top: 12px; }
  .dash-sidebar > div:last-child { display: none; } /* the logged-in-as / log out block at the bottom of the tall sidebar has no room on a phone-width top bar; .dash-nav-logout-mobile above replaces it */
  .dash-main { padding: 20px 16px; max-width: 100%; }
  /* Wide reporting tables would otherwise force the whole page to scroll
     sideways — let just the table scroll instead, same fix pattern as any
     wide content in an Artifact. */
  .dash-main table { display: block; overflow-x: auto; white-space: nowrap; }
}

.mb-0 { margin-bottom: 0; }

.login-shell { min-height: calc(100vh - var(--header-height)); width: 100%; margin: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: var(--space-5) 0; }
.login-shell .panel { max-width: 380px; width: 100%; }

/* ---------------------------------------------------------------------------
   ADMIN DEFAULT THEME — Grey / White / Blue, always, regardless of the
   black/yellow/blue palette above. Scoped to .dash-shell and .login-shell:
   every admin surface inherits these instead, so ImaginationFoundry's own
   internal admin reads as plain professional software, not the marketing
   site's brand. (The 13 client-site templates carry the matching override
   in their own style.css, keyed on their --color-* tokens instead.)
   --------------------------------------------------------------------------- */
.dash-shell, .login-shell {
  /* Re-set the inherited `color` property itself, not just the --ink
     variable: body's own `color` was already computed using the public
     theme's --ink before this scope exists, and plain inheritance (for
     any element in here without its own `color: var(--ink)` rule, e.g.
     table cells, paragraphs, labels) would otherwise carry that stale
     value straight through. */
  color: var(--ink);
  --bg: #EEF1F5;
  --surface: #FFFFFF;
  --surface-alt: #E7ECF3;
  --ink: #1C2733;
  --muted: #64748B;
  --border: #D7DEE7;
  --primary: #2B5FAD;
  --primary-dark: #16273D;
  --secondary: #4A6FA5;
  --accent: #2B5FAD;
  --accent-dark: #1B3F73;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(43,95,173,0.10);
  --good: #1F9D6B; --good-soft: #DFF5EB;
  --warn: #C88A1D; --warn-soft: #FBEED1;
  --danger: #C0392B; --danger-soft: #FBE1DE;
  --shadow: 0 1px 2px rgba(20,30,45,0.06), 0 4px 14px rgba(20,30,45,0.06);
}

.login-shell .panel { }

/* ---------------------------------------------------------------------------
   Embedded checkout (checkout.php) — added 2026-09-06, replacing an
   immediate redirect to a bare Square-hosted payment link. Reuses the
   public site's own tokens/panel/btn/flash classes above so this reads as
   the same brand, not a bolted-on payment widget.
   --------------------------------------------------------------------------- */
.checkout-hero { padding: 44px 0 8px; text-align: center; }
.checkout-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--good);
  padding: 7px 16px; border-radius: 999px; background: var(--good-soft);
  border: 1px solid rgba(53,211,153,0.3);
}
.checkout-hero h1 { font-family: 'Orbitron', 'IBM Plex Sans', sans-serif; font-size: clamp(1.5rem, 3.2vw, 2rem); text-wrap: balance; }
.checkout-hero p { color: var(--muted); }

.checkout-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: start; padding: 24px 0 64px; }
@media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }

.order-summary h2, .payment-panel h2 { font-family: 'Orbitron', 'IBM Plex Sans', sans-serif; font-size: 1.05rem; margin-bottom: 4px; }

.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.price-row .mono { font-family: 'IBM Plex Mono', monospace; font-weight: 600; }
.price-row-sub { padding-top: 0; padding-bottom: 12px; font-size: 0.8rem; border-bottom: 1px solid var(--border); }
.price-row-total { border-bottom: none; padding-top: 16px; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.price-row-total .mono { color: var(--accent); font-size: 1.15rem; }

.checkout-includes { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checkout-includes li { position: relative; padding-left: 26px; font-size: 0.86rem; color: var(--muted); }
.checkout-includes li::before {
  content: "\2713"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 5px;
  background: var(--good-soft); color: var(--good); font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.card-field-container {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px; min-height: 44px; display: flex; align-items: center;
}
.card-field-loading { font-size: 0.85rem; padding: 4px 2px; }

.checkout-divider { border: none; border-top: 1px solid var(--border); margin: var(--space-5) 0 var(--space-4); }
.payment-panel input[type=email]:disabled { background: var(--surface-alt); color: var(--muted); cursor: not-allowed; }
.checkout-pay-btn { width: 100%; margin-top: var(--space-4); }
.trust-badges { margin: 14px 0 0; font-size: 0.78rem; text-align: center; }
#checkout-error { margin-bottom: var(--space-4); }
