/* ─────────────────────────────────────────────────────────────────
   Quickfolio — Editorial / serif-led design system
   Aesthetic: warm off-white, magazine-like, deep ink, terracotta accent
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Type — Newsreader (editorial serif), Instrument Sans (humanist sans),
     JetBrains Mono (data/labels) */
  --font-serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --font-sans: "Instrument Sans", "Söhne", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Warm paper palette */
  --paper:        oklch(0.972 0.012 80);   /* warm off-white background */
  --paper-2:      oklch(0.945 0.015 80);   /* slightly deeper card bg */
  --paper-3:      oklch(0.915 0.018 80);
  --ink:          oklch(0.20 0.018 60);    /* warm near-black */
  --ink-2:        oklch(0.34 0.015 60);
  --ink-3:        oklch(0.50 0.012 60);
  --ink-4:        oklch(0.66 0.010 60);
  --rule:         oklch(0.86 0.014 70);
  --rule-2:       oklch(0.78 0.014 70);

  /* Accent — terracotta */
  --accent:       oklch(0.62 0.14 40);
  --accent-deep:  oklch(0.52 0.15 38);
  --accent-soft:  oklch(0.92 0.04 50);

  /* Density — overridable from JS */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  --container: 1200px;
  --container-narrow: 880px;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  /* Subtle paper grain via repeating gradient */
  --grain: radial-gradient(transparent 0, rgba(0,0,0,0.012) 1px, transparent 1.5px) 0 0/3px 3px;
}

[data-theme="dark"] {
  --paper:        oklch(0.18 0.012 60);
  --paper-2:      oklch(0.22 0.014 60);
  --paper-3:      oklch(0.27 0.014 60);
  --ink:          oklch(0.94 0.010 80);
  --ink-2:        oklch(0.82 0.012 80);
  --ink-3:        oklch(0.66 0.012 70);
  --ink-4:        oklch(0.50 0.012 70);
  --rule:         oklch(0.32 0.014 60);
  --rule-2:       oklch(0.40 0.014 60);
  --accent-soft:  oklch(0.32 0.05 45);
}

[data-density="compact"] {
  --space-5: 18px; --space-6: 24px; --space-7: 36px;
  --space-8: 48px; --space-9: 72px; --space-10: 96px;
}
[data-density="spacious"] {
  --space-5: 28px; --space-6: 40px; --space-7: 56px;
  --space-8: 80px; --space-9: 120px; --space-10: 160px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-image: var(--grain);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Editorial typography */
.serif { font-family: var(--font-serif); font-optical-sizing: auto; }
.sans  { font-family: var(--font-sans); }
.mono  { font-family: var(--font-mono); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  font-optical-sizing: auto;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
a.underline { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 0.5px; }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* Small caps editorial label — used everywhere */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.rule { height: 0.5px; background: var(--rule); width: 100%; border: 0; }
.rule-thick { height: 1px; background: var(--ink); width: 100%; border: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1),
              background 180ms ease,
              color 180ms ease,
              box-shadow 180ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.3);
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 0.5px solid var(--rule-2);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}
.btn-accent {
  background: var(--accent);
  color: var(--paper);
}
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-1px); }

.btn .arr {
  display: inline-block;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1);
}
.btn:hover .arr { transform: translateX(3px); }

/* InspectStylePanel no-selection empty state. Base rules reproduce the legacy
   inline look (global tokens) so the flag-off layout is unchanged; the review
   shell overrides these under `.review-shell .inspect-rail` (see below). */
.inspect-empty { padding: 14px; border: 0.5px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); }
.inspect-empty .eyebrow { margin-bottom: 8px; }
.inspect-empty p { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 1.45; }

/* Keep decorative landing layers from covering mobile CTA hit targets. */
.hero-video-wrap,
.hero-video-wrap * {
  pointer-events: none;
}

#root > div > header {
  pointer-events: none;
}

#root > div > header a,
#root > div > header button {
  pointer-events: auto;
}

a[href="#/goal"] {
  scroll-margin-top: 96px;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  #root > div > header nav {
    display: none !important;
  }

  #root > div > header .container {
    gap: 12px;
  }

  #root > div > header a:first-child span {
    font-size: 21px !important;
  }

  #root > div > header a {
    white-space: nowrap;
  }

  #root > div > header .site-header-signin {
    display: none !important;
  }

  #root > div > header .btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  #root > div > header .site-header-primary {
    max-width: 164px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-video-wrap {
    margin-bottom: 32px !important;
    overflow: hidden !important;
  }

  .hero-video-wrap + div {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
    margin-top: 32px !important;
  }

  .hero-video-wrap + div h1 {
    font-size: 56px !important;
    max-width: 100% !important;
  }

  .hero-video-wrap + div > div:last-child {
    padding-top: 0 !important;
  }

  .hero-video-wrap + div > div:last-child > div {
    flex-wrap: wrap;
  }

  .landing-meta-strip,
  .landing-hero-kicker,
  .landing-section-intro,
  .landing-step-grid,
  .landing-design-intro,
  .landing-pricing-grid,
  .landing-testimonial-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
  }

  .landing-meta-strip {
    align-items: flex-start !important;
    margin-bottom: 40px !important;
  }

  .landing-step-grid article {
    grid-template-columns: 48px 1fr !important;
    gap: 18px !important;
  }

  .landing-tab-strip {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .landing-tab-strip button {
    flex: 0 0 auto;
  }

  .landing-domain-search {
    display: flex !important;
    flex-direction: column !important;
    border-radius: var(--radius-lg) !important;
  }

  .landing-domain-search .btn {
    border-radius: 0 !important;
    justify-content: center !important;
    min-height: 52px;
  }

  .site-footer-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
  }

  .original-editor-grid {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }

  .original-editor-panel {
    border-left: 0 !important;
    border-top: 0.5px solid var(--rule) !important;
    min-height: 520px;
  }

  .original-editor-preview {
    padding: 16px !important;
  }

  .original-preview-shell {
    padding: 34px 22px !important;
  }
}

.landing-product-panel {
  background: var(--paper);
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  min-height: 320px;
}

.landing-source-row,
.landing-fact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 0.5px solid var(--rule);
}

.landing-source-row:first-of-type,
.landing-fact-row:first-of-type {
  border-top: 0;
}

.landing-source-row span {
  margin-left: auto;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.landing-fact-row input {
  accent-color: var(--accent);
  margin-top: 4px;
}

.landing-mini-site {
  background: var(--ink);
  color: var(--paper);
}

.landing-mini-site span {
  border: 0.5px solid rgba(253,251,246,0.18);
  border-radius: var(--radius);
  color: rgba(253,251,246,0.72);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 10px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .landing-product-flow {
    grid-template-columns: 1fr !important;
  }
}

/* Cards */
.card {
  background: var(--paper);
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color 180ms ease, transform 180ms ease;
}
.card:hover { border-color: var(--rule-2); }
.card-flat {
  border-radius: 0;
  border: 0;
  border-top: 0.5px solid var(--rule);
}

/* Drop cap */
.dropcap::first-letter {
  font-family: var(--font-serif);
  font-size: 4.6em;
  float: left;
  line-height: 0.85;
  margin: 0.08em 0.08em 0 -0.04em;
  font-weight: 400;
  color: var(--accent);
}

@media (max-width: 760px) {
  .dropcap::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    color: inherit;
  }
}

/* Scroll behavior */
html { scroll-behavior: smooth; }

/* Page shell */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle entry animation utility */
@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.entrance { animation: slide-up-fade 600ms cubic-bezier(.2,.8,.2,1) both; }
.entrance.d1 { animation-delay: 60ms; }

@keyframes hero-glow-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1.0;  transform: scale(1.04); }
}
.entrance.d2 { animation-delay: 140ms; }
.entrance.d3 { animation-delay: 220ms; }
.entrance.d4 { animation-delay: 320ms; }
.entrance.d5 { animation-delay: 440ms; }

/* Form controls — editorial, restrained */
.input {
  width: 100%;
  padding: 14px 16px;
  border: 0.5px solid var(--rule-2);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.input:focus { border-color: var(--ink); background: var(--paper); }
.input::placeholder { color: var(--ink-4); }

/* Mono badge / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 0.5px solid var(--rule-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--paper);
}
.chip.dot::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.chip.live::before { background: oklch(0.65 0.16 145); }

/* Review details workspace */
.review-details-page {
  padding: 28px var(--space-6) 56px;
}

.review-details-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.review-details-title {
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 0.98;
  margin-bottom: 10px;
  max-width: 860px;
}

.review-workspace {
  background: color-mix(in oklch, var(--paper) 92%, white);
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 54px -48px rgba(45, 36, 24, 0.42);
  overflow: visible;
}

.review-workspace-toolbar {
  position: sticky;
  top: 64px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 0.5px solid var(--rule);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px) saturate(130%);
}

.review-workspace-subtitle {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 13px;
}

.review-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.review-icon-button {
  padding: 7px 12px;
  font-size: 12px;
}

.review-workspace-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 340px;
  align-items: start;
  min-height: 640px;
}

.review-section-rail,
.review-inspector {
  position: sticky;
  top: 130px;
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.review-section-rail {
  border-right: 0.5px solid var(--rule);
  background: var(--paper-2);
}

.review-section-button {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 0.5px solid var(--rule);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.review-section-button:hover {
  background: color-mix(in oklch, var(--paper) 70%, var(--paper-2));
}

.review-section-button[data-active="true"] {
  background: var(--paper);
  box-shadow: inset 3px 0 0 var(--accent);
}

.review-section-counts {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.review-section-review-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: var(--paper);
  font-size: 10px;
}

.review-queue {
  padding: 18px;
  min-width: 0;
}

.review-queue-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.review-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-item-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 0.5px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.review-item-row:hover,
.review-item-row:focus-visible {
  border-color: var(--rule-2);
  background: color-mix(in oklch, var(--paper) 88%, white);
  outline: none;
}

.review-item-row[data-selected="true"] {
  border-color: color-mix(in oklch, var(--accent) 70%, var(--rule));
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 14%, transparent);
}

.review-item-row[data-status="approved"] {
  background: color-mix(in oklch, var(--paper) 94%, oklch(0.88 0.05 145));
}

.review-kind-mark,
.review-item-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  border: 0.5px solid var(--rule);
  background: var(--paper-2);
  flex-shrink: 0;
}

.review-kind-mark {
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.review-item-thumb {
  object-fit: cover;
  display: block;
}

.review-item-content {
  min-width: 0;
}

.review-item-meta,
.review-inspector-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-item-meta span,
.review-inspector-meta span {
  padding-right: 7px;
  border-right: 0.5px solid var(--rule);
}

.review-item-meta span:last-child,
.review-inspector-meta span:last-child {
  border-right: 0;
}

.review-item-content h3 {
  margin: 5px 0 0;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.15;
}

.review-item-subtitle {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.35;
}

.review-detail-excerpt {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-item-content a,
.review-inspector-link {
  display: block;
  margin-top: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  font-size: 12px;
}

.review-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 210px;
}

.review-item-actions .btn,
.review-inspector-actions .btn,
.review-add-card .btn {
  padding: 7px 10px;
  font-size: 11px;
}

.review-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0.5px solid var(--rule-2);
  padding: 5px 9px;
  background: var(--paper);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.review-status-pill[data-status="needs_review"] {
  color: var(--accent);
  border-color: color-mix(in oklch, var(--accent) 55%, var(--rule));
}

.review-status-pill[data-status="approved"] {
  color: oklch(0.46 0.12 145);
  border-color: color-mix(in oklch, oklch(0.46 0.12 145) 45%, var(--rule));
}

.review-empty-state {
  border: 0.5px dashed var(--rule-2);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--ink-3);
  font-family: var(--font-serif);
  font-style: italic;
}

.review-inspector {
  border-left: 0.5px solid var(--rule);
  padding: 16px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-inspector-card {
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--paper);
}

.review-inspector-primary {
  border-color: color-mix(in oklch, var(--accent) 48%, var(--rule));
}

.review-inspector-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.review-inspector-head h3 {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.1;
}

.review-inspector-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 0.5px solid var(--rule);
  margin-bottom: 12px;
}

.review-full-detail {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.review-evidence {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 0.5px solid var(--rule);
}

.review-evidence-row {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}

.review-evidence-row strong {
  color: var(--ink-2);
  font-weight: 600;
}

.review-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.review-add-card {
  padding: 0;
  overflow: hidden;
}

.review-add-card summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
}

.review-add-card summary::-webkit-details-marker {
  display: none;
}

.review-add-card summary strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.review-add-grid,
.review-form-stack,
.review-image-grid {
  padding: 0 16px 16px;
}

.review-add-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.review-add-button {
  justify-content: flex-start;
}

.review-form-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 0.5px solid var(--rule);
  padding-top: 14px;
}

.review-manual-form {
  border-top: 0;
  padding-top: 0;
}

.review-form-stack .input {
  padding: 10px 12px;
  font-size: 13px;
}

.review-form-stack textarea.input {
  min-height: 76px;
  resize: vertical;
}

.review-manual-submit {
  justify-content: center;
  width: 100%;
}

.review-form-title {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.review-profile-image-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.review-profile-image-head strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.review-profile-image-card .review-image-grid {
  padding: 0;
}

.review-image-option {
  border: 0.5px solid var(--rule);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  position: relative;
}

.review-image-option[data-selected="true"] {
  border: 2px solid var(--accent);
}

.review-image-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-image-option > span:not(.review-image-check) {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ink-3);
  font-size: 11px;
}

.review-image-check {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.review-muted-copy {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 1120px) {
  .review-workspace-grid {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .review-inspector {
    grid-column: 1 / -1;
    position: relative;
    top: auto;
    max-height: none;
    border-left: 0;
    border-top: 0.5px solid var(--rule);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }
}

@media (max-width: 820px) {
  .review-details-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .review-details-hero,
  .review-workspace-toolbar,
  .review-queue-header {
    align-items: stretch;
    flex-direction: column;
  }

  .review-workspace-toolbar {
    top: 64px;
  }

  .review-workspace-grid {
    grid-template-columns: 1fr;
  }

  .review-section-rail {
    position: relative;
    top: auto;
    max-height: none;
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 0.5px solid var(--rule);
  }

  .review-section-button {
    min-width: 170px;
    border-right: 0.5px solid var(--rule);
  }

  .review-item-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .review-kind-mark,
  .review-item-thumb {
    width: 44px;
    height: 44px;
  }

  .review-item-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }

  .review-inspector {
    grid-template-columns: 1fr;
  }
}

/* Section number — oversized editorial marker */
.section-num {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-3);
  font-feature-settings: "lnum";
}

/* Loading pulse */
@keyframes pulse-soft {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.pulse { animation: pulse-soft 1.6s ease-in-out infinite; }

@keyframes qf-progress-glow {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Spinning circle for AI loading */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1.4s linear infinite; }

/* Marquee for testimonial / partner row */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Scrollbar — subtle */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rule-2);
  border-radius: 999px;
  border: 2px solid var(--paper);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

@media (max-width: 900px) {
  .folio-design-grid,
  .folio-template-library-grid,
  .folio-template-library-head,
  .folio-preflight-grid,
  .folio-preflight-projects,
  .folio-preflight-requirements {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 560px) {
  .folio-design-card {
    padding: 12px !important;
  }

  .folio-template-library-grid article {
    min-height: 0 !important;
  }
}

/* ─────────────────────────────────────────────────────────────────
   Review "Claude artifact-builder shell" (flag-gated: ReviewShell)
   ALL tokens + styles are SCOPED under .review-shell so the rest of
   the flow (which uses :root / [data-theme] / [data-density]) is
   untouched. Light Claude chrome · coral/terracotta accent · black
   Proceed pill · hairline borders. Ported from
   docs/review-claude-shell-reference.html.
   ───────────────────────────────────────────────────────────────── */
.review-shell {
  /* surfaces */
  --rsh-chrome:#ffffff; --rsh-rail:#faf9f6; --rsh-canvas:#f1efe9; --rsh-raise:#ffffff;
  /* hairlines */
  --rsh-line:#eeece7; --rsh-line-2:#e2dfd8; --rsh-line-3:#d8d4cb;
  /* text */
  --rsh-text:#211f1b; --rsh-text-2:#6d685f; --rsh-text-3:#a09a8e;
  /* accent (coral/terracotta) */
  --rsh-accent:#cc6f4e; --rsh-accent-2:#bd6243; --rsh-accent-soft:#f6e7df; --rsh-accent-line:#ecd6cb;
  /* misc */
  --rsh-black:#1c1a16; --rsh-ok:#7c9a6a;
  /* type */
  --rsh-ui:"Hanken Grotesk",system-ui,sans-serif;
  --rsh-serif:"Newsreader",Georgia,serif;
  --rsh-mono:"JetBrains Mono",ui-monospace,monospace;
  /* radii */
  --rsh-r:10px; --rsh-pill:999px;

  display:flex; flex-direction:column; height:100vh;
  font-family:var(--rsh-ui); background:var(--rsh-canvas); color:var(--rsh-text);
  -webkit-font-smoothing:antialiased; font-size:14px;
}
.review-shell ::selection { background:var(--rsh-accent-soft); }
.review-shell .mono { font-family:var(--rsh-mono); }

/* ===== top bar ===== */
.review-shell .topbar { display:flex; align-items:center; height:52px; background:var(--rsh-chrome); border-bottom:1px solid var(--rsh-line); padding:0 14px; gap:14px; flex-shrink:0; }
/* The shell mounts at #root > div, so its <header> is caught by the global landing
   rule "#root > div > header { pointer-events:none }" (which only re-enables <a>/<button>
   — why Proceed worked but the <span> tools were click-through). Re-enable the toolbar;
   specificity (1,2,0) beats the global (1,0,2). */
#root .review-shell .topbar { pointer-events: auto; }
.review-shell .tb-left { display:flex; align-items:center; gap:10px; width:312px; flex-shrink:0; }
.review-shell .palette { width:24px; height:24px; border-radius:7px; background:conic-gradient(from 210deg,#cc6f4e,#d8a05f,#7c9a6a,#6f86b8,#9a6fb8,#cc6f4e); }
.review-shell .proj { font-weight:600; display:flex; align-items:center; gap:5px; cursor:pointer; }
.review-shell .caret { color:var(--rsh-text-3); font-size:11px; }
.review-shell .ico { width:30px; height:30px; border-radius:8px; display:grid; place-items:center; color:var(--rsh-text-3); cursor:pointer; font-size:14px; }
.review-shell .ico:hover { background:#f1efe9; color:var(--rsh-text-2); }
.review-shell .tb-file { display:flex; align-items:center; gap:10px; color:var(--rsh-text-2); }
.review-shell .file { display:flex; flex-direction:column; line-height:1.15; cursor:pointer; }
.review-shell .file b { font-size:13px; color:var(--rsh-text); font-weight:600; display:flex; gap:5px; align-items:center; }
.review-shell .file span { font-size:11px; color:var(--rsh-text-3); }
.review-shell .grow { flex:1; }
.review-shell .tb-tools { display:flex; align-items:center; gap:3px; }
.review-shell .findings { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--rsh-text-2); background:#f7f5f0; border:1px solid var(--rsh-line-2); border-radius:var(--rsh-pill); padding:4px 10px; margin-right:8px; cursor:pointer; }
.review-shell .findings .d { width:6px; height:6px; border-radius:50%; background:var(--rsh-accent); }
.review-shell .tool { font-size:13px; color:var(--rsh-text-2); padding:6px 10px; border-radius:8px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.review-shell .tool:hover { background:#f3f1ec; color:var(--rsh-text); }
.review-shell .tool.on { background:var(--rsh-accent-soft); color:var(--rsh-accent-2); font-weight:600; }
.review-shell .tdiv { width:1px; height:20px; background:var(--rsh-line-2); margin:0 5px; }
.review-shell .proceed { background:var(--rsh-black); color:#fff; border:0; font-family:var(--rsh-ui); font-weight:600; font-size:13px; border-radius:var(--rsh-pill); padding:8px 16px; cursor:pointer; display:inline-flex; gap:7px; align-items:center; }
.review-shell .proceed:hover { transform:translateY(-1px); }
.review-shell .avatar { width:28px; height:28px; border-radius:50%; background:var(--rsh-accent); color:#fff; display:grid; place-items:center; font-weight:600; font-size:12px; margin-left:8px; }

/* ===== body ===== */
.review-shell .body { flex:1; display:flex; min-height:0; }
.review-shell .rail { width:312px; flex-shrink:0; background:var(--rsh-rail); border-right:1px solid var(--rsh-line); display:flex; flex-direction:column; min-height:0; }
.review-shell .rail-scroll { flex:1; overflow:auto; padding:16px; }
.review-shell .rail-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 6px; }
.review-shell .rail-head h3 { margin:0; font-size:14px; font-weight:600; }
.review-shell .rail-head .x { cursor:pointer; color:var(--rsh-text-3); }

/* chat */
.review-shell .input { border:1px solid var(--rsh-line-2); border-radius:9px; background:var(--rsh-raise); font-size:13px; }
.review-shell .is-disabled { opacity:.4; cursor:default; pointer-events:none; }
.review-shell .plan { border:1px solid var(--rsh-line-2); border-radius:var(--rsh-r); background:#fff; padding:11px 13px; margin-bottom:14px; }
.review-shell .plan-h { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--rsh-text-3); margin-bottom:8px; }
.review-shell .plan li { list-style:none; display:flex; gap:8px; font-size:12.5px; color:var(--rsh-text-2); padding:3px 0; }
.review-shell .plan li.done { color:var(--rsh-text-3); text-decoration:line-through; }
.review-shell .plan li .c { color:var(--rsh-ok); }
.review-shell .plan li.cur { color:var(--rsh-text); font-weight:500; }
.review-shell .plan ul { margin:0; padding:0; }
.review-shell .msg { font-size:13px; line-height:1.55; margin-bottom:12px; }
.review-shell .msg .who { font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--rsh-text-3); margin-bottom:4px; }
.review-shell .msg.user .b { background:#fff; border:1px solid var(--rsh-line-2); border-radius:12px; padding:9px 12px; }
.review-shell .msg.bot .b { color:var(--rsh-text); }
.review-shell .find { background:#fff; border:1px solid var(--rsh-accent-line); border-radius:var(--rsh-r); padding:11px 12px; margin-bottom:12px; }
.review-shell .find .t { font-size:12.5px; color:var(--rsh-text); display:flex; align-items:center; gap:7px; }
.review-shell .find .t .d { width:7px; height:7px; border-radius:50%; background:var(--rsh-accent); }
.review-shell .find ul { margin:8px 0 10px; padding:0; }
.review-shell .find li { list-style:none; font-size:12px; color:var(--rsh-text-2); padding:2px 0; display:flex; gap:7px; }
.review-shell .find li .sev { font-family:var(--rsh-mono); font-size:10px; color:var(--rsh-accent-2); }
.review-shell .fixbtn { font-family:var(--rsh-ui); font-size:12px; font-weight:600; background:var(--rsh-accent); color:#fff; border:0; border-radius:8px; padding:7px 12px; cursor:pointer; }
.review-shell .chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.review-shell .chip { font-size:12px; color:var(--rsh-text-2); border:1px solid var(--rsh-line-2); background:#fff; border-radius:var(--rsh-pill); padding:5px 11px; cursor:pointer; }
.review-shell .chip:hover { border-color:var(--rsh-accent-line); color:var(--rsh-accent-2); }

/* composer */
.review-shell .composer { border-top:1px solid var(--rsh-line); padding:12px; background:var(--rsh-rail); }
.review-shell .cbox { background:#fff; border:1px solid var(--rsh-line-2); border-radius:12px; padding:11px 12px; box-shadow:0 1px 2px rgba(0,0,0,.02); }
.review-shell .cbox .ph { color:var(--rsh-text-3); font-size:13px; min-height:34px; }
.review-shell .cbox-foot { display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.review-shell .model { font-size:11.5px; color:var(--rsh-text-3); display:flex; align-items:center; gap:5px; }
.review-shell .send { background:var(--rsh-accent); color:#fff; border:0; border-radius:9px; font-family:var(--rsh-ui); font-weight:600; font-size:12.5px; padding:7px 13px; cursor:pointer; display:inline-flex; gap:6px; align-items:center; }

/* edit panel */
.review-shell .ep-row { display:flex; align-items:center; justify-content:space-between; border:1px solid var(--rsh-line-2); background:#fff; border-radius:9px; padding:10px 12px; margin-bottom:9px; }
.review-shell .ep-row label { font-size:13px; }
.review-shell .ep-row .v { font-family:var(--rsh-mono); font-size:12px; color:var(--rsh-text-2); display:flex; align-items:center; gap:7px; }
.review-shell .swatch { width:16px; height:16px; border-radius:4px; border:1px solid var(--rsh-line-3); }
.review-shell .ep-sec { font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--rsh-text-3); margin:4px 0 10px; }

/* ── InspectStylePanel inside the Edit rail (review shell) ──────────────────────
   The shared InspectStylePanel (flow-late.jsx) is authored against the OUTER-APP
   design system: inline styles using global tokens (--paper/--ink-3/--rule/...)
   plus the global .btn/.btn-primary/.btn-ghost/.eyebrow/.input classes. Inside
   the 312px shell rail that renders as huge landing-page pills and warm-paper
   colors that clash with the shell. We can't override inline styles with CSS, so
   instead we REMAP the global custom properties onto the --rsh-* shell palette
   for the `.inspect-rail` subtree — the inline `var(--paper)` etc. then resolve
   to shell colors — and re-skin the global button/input/eyebrow classes. All of
   this is scoped to `.review-shell .inspect-rail` (a shell-only wrapper), so the
   flag-off GeneratedProjectScreen, which renders the same component with the
   global styling, is completely unaffected. */
.review-shell .inspect-rail {
  --paper: var(--rsh-raise);          /* panel card bg → white card on rail */
  --paper-2: var(--rsh-rail);         /* nested cards (notice / empty) */
  --rule: var(--rsh-line-2);          /* borders */
  --rule-2: var(--rsh-line-2);
  --radius: var(--rsh-r);             /* corner radius */
  --ink: var(--rsh-text);
  --ink-3: var(--rsh-text-2);         /* labels / secondary text */
  --ink-4: var(--rsh-text-3);         /* mono values / element id */
  --accent: var(--rsh-accent-2);      /* ancestor-notice badge fg */
  --accent-soft: var(--rsh-accent-soft); /* ancestor-notice badge bg */
  --font-mono: var(--rsh-mono);
}
/* Buttons: shrink the global landing-page pills to rail scale + shell colors. */
.review-shell .inspect-rail .btn { padding:7px 13px; border-radius:9px; font-family:var(--rsh-ui); font-size:12.5px; font-weight:600; gap:6px; letter-spacing:0; }
.review-shell .inspect-rail .btn-primary { background:var(--rsh-accent); color:#fff; box-shadow:none; }
.review-shell .inspect-rail .btn-primary:hover { background:var(--rsh-accent-2); transform:none; }
.review-shell .inspect-rail .btn-ghost { background:#fff; color:var(--rsh-text); border:1px solid var(--rsh-line-2); }
.review-shell .inspect-rail .btn-ghost:hover { background:var(--rsh-rail); border-color:var(--rsh-accent-line); }
/* Eyebrow + form controls re-scoped to the rail look. */
.review-shell .inspect-rail .eyebrow { font-family:var(--rsh-mono); color:var(--rsh-text-3); font-size:10.5px; letter-spacing:.08em; }
.review-shell .inspect-rail .input { padding:6px 9px; border:1px solid var(--rsh-line-2); border-radius:8px; background:var(--rsh-raise); color:var(--rsh-text); font-family:var(--rsh-ui); font-size:12.5px; }
.review-shell .inspect-rail .input:focus { border-color:var(--rsh-accent-line); background:#fff; }
.review-shell .inspect-rail input[type=range] { width:100%; accent-color:var(--rsh-accent); }
.review-shell .inspect-rail input[type=color] { border:1px solid var(--rsh-line-2); border-radius:6px; background:#fff; padding:1px; cursor:pointer; }
/* Empty state: a centered, intentional hint instead of a tiny warm-paper card
   floating in a tall blank column. */
.review-shell .inspect-rail .inspect-empty { border:0; background:transparent; padding:52px 18px 0; text-align:center; }
.review-shell .inspect-rail .inspect-empty .eyebrow { display:none; }
.review-shell .inspect-rail .inspect-empty p { color:var(--rsh-text-3); font-size:13px; line-height:1.6; max-width:220px; margin:0 auto; }

/* comments panel */
.review-shell .empty { color:var(--rsh-text-3); font-size:13px; text-align:center; padding:30px 16px; line-height:1.6; }

/* ===== canvas ===== */
.review-shell .canvas { flex:1; background:var(--rsh-canvas); overflow:auto; display:flex; align-items:flex-start; justify-content:flex-start; padding:20px; position:relative; }
.review-shell .artifact { width:100%; max-width:none; background:#f6f4ee; border-radius:14px; border:1px solid var(--rsh-line-3); box-shadow:0 30px 80px rgba(60,50,40,.10); overflow:hidden; font-family:var(--rsh-serif); color:#23211c; }

/* selection + markup */
.review-shell .selbox { position:absolute; border:2px solid var(--rsh-accent); border-radius:8px; box-shadow:0 0 0 4px rgba(204,111,78,.13); pointer-events:none; }
.review-shell .popover { position:absolute; background:#fff; border:1px solid var(--rsh-line-2); border-radius:12px; box-shadow:0 20px 50px rgba(50,40,30,.18); width:330px; padding:14px; z-index:30; }
.review-shell .popover h4 { margin:0 0 10px; font-size:13px; font-weight:600; display:flex; justify-content:space-between; }
.review-shell .popover .x { color:var(--rsh-text-3); cursor:pointer; }
.review-shell .popover textarea { width:100%; border:1px solid var(--rsh-line-2); border-radius:9px; padding:10px; font-family:var(--rsh-ui); font-size:13px; color:var(--rsh-text); resize:none; height:74px; outline:none; }
.review-shell .popover textarea::placeholder { color:var(--rsh-text-3); }
.review-shell .pop-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.review-shell .btn-ghost { font-family:var(--rsh-ui); font-size:12.5px; border:1px solid var(--rsh-line-2); background:#fff; border-radius:8px; padding:7px 13px; cursor:pointer; color:var(--rsh-text); }
.review-shell .btn-accent { font-family:var(--rsh-ui); font-size:12.5px; font-weight:600; border:0; background:var(--rsh-accent); color:#fff; border-radius:8px; padding:7px 13px; cursor:pointer; }

/* present dropdown */
.review-shell .present-menu { position:absolute; top:46px; right:120px; background:#fff; border:1px solid var(--rsh-line-2); border-radius:11px; box-shadow:0 18px 44px rgba(50,40,30,.16); padding:6px; width:170px; z-index:30; }
.review-shell .present-menu div { display:flex; align-items:center; gap:9px; font-size:13px; padding:9px 10px; border-radius:8px; cursor:pointer; color:var(--rsh-text); }
.review-shell .present-menu div:hover { background:#f3f1ec; }

/* tweaks panel */
.review-shell .tweaks { position:absolute; right:20px; bottom:20px; width:268px; background:#fff; border:1px solid var(--rsh-line-2); border-radius:14px; box-shadow:0 20px 50px rgba(50,40,30,.14); padding:16px; z-index:25; }
.review-shell .tw-h { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.review-shell .tw-h b { font-size:13px; }
.review-shell .tw-h .x { color:var(--rsh-text-3); cursor:pointer; }
.review-shell .tw-l { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--rsh-text-3); margin:14px 0 7px; }
.review-shell .tw-l:first-of-type { margin-top:0; }
.review-shell .seg { display:flex; gap:5px; }
.review-shell .seg b { flex:1; text-align:center; font-weight:500; font-size:12px; border:1px solid var(--rsh-line-2); border-radius:8px; padding:7px 0; cursor:pointer; color:var(--rsh-text-2); }
.review-shell .seg b.on { background:var(--rsh-black); color:#fff; border-color:var(--rsh-black); }
.review-shell .tw-accent { display:flex; gap:7px; align-items:center; }
.review-shell .dotpick { width:22px; height:22px; border-radius:50%; border:1px solid var(--rsh-line-3); cursor:pointer; }
.review-shell .dotpick.on { outline:2px solid var(--rsh-accent); outline-offset:2px; }
.review-shell .toggle { width:38px; height:22px; border-radius:999px; background:#e2dfd8; position:relative; cursor:pointer; }
.review-shell .toggle i { position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:.15s; }
.review-shell .row-between { display:flex; align-items:center; justify-content:space-between; }

/* In-chat job progress bar (replaces per-tick progress messages) */
.review-shell .rsh-progress { padding:12px 16px; border-top:1px solid var(--rsh-line); }
.review-shell .rsh-progress-head { display:flex; justify-content:space-between; align-items:baseline; font-family:var(--rsh-ui); font-size:12.5px; color:var(--rsh-text-2); margin-bottom:7px; }
.review-shell .rsh-progress-pct { font-variant-numeric:tabular-nums; color:var(--rsh-text-3); }
.review-shell .rsh-progress-track { height:5px; border-radius:999px; background:var(--rsh-line-2); overflow:hidden; }
.review-shell .rsh-progress-fill { height:100%; border-radius:999px; background:var(--rsh-accent); transition:width .35s ease; }
.review-shell .rsh-progress-track.indeterminate .rsh-progress-fill { width:40%; animation:rsh-indeterminate 1.1s ease-in-out infinite; }
@keyframes rsh-indeterminate { 0% { margin-left:-40%; } 100% { margin-left:100%; } }
