/* =========================================================
   Hockley Mint CAD Validation Studio — Premium Slate-Navy Style
   ========================================================= */

:root {
  --green:      #2563EB;      /* Accent Blue */
  --green-dark: #0F172A;      /* Primary Navy Slate */
  --ivory:      #F8FAFC;      /* Light BG */
  --white:      #ffffff;      /* Surface */
  --ink:        #0F172A;      /* Dark Text */
  --muted:      #64748B;      /* Muted Text */
  --line:       #E2E8F0;      /* Standard Border */
  --line-light: #F1F5F9;      /* Light border / Neutral fill */
  --radius:     4px;          /* Subtle roundness */
}

/* ── Reset ───────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  font-size: 13px; /* Align with design.md body copy */
  line-height: 1.5;
  color: var(--ink);
  background: var(--ivory);
}

/* ── Page shell ──────────────────────────────────────────── */
.page-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto 40px;
  padding-top: 24px;
}

/* ─────────────────────────────────────────────────────────
   HERO BAR — Elevated High-End Header
   ───────────────────────────────────────────────────────── */
.hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 32px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 6px solid var(--green); /* Thick brand accent */
  border-bottom: none;
  margin-bottom: 24px;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
}

.hero-bar-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
}

.hero-bar-logo {
  height: 48px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.hero-bar-titles {
  display: flex;
  flex-direction: column;
}

.eyebrow,
.section-tag,
.overlay-kicker,
.ip-label,
.tb-label {
  margin: 0 0 4px;
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.hero-bar h1 {
  margin: 0 0 4px;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.hero-copy {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 65ch;
}

.hero-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

#api-health-pill { display: none; }

#current-job-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  font-family: "Outfit", sans-serif;
}

/* ─────────────────────────────────────────────────────────
   WORKSPACE WRAPPER — single bordered surface
   ───────────────────────────────────────────────────────── */
.workspace-wrapper {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────
   TOP BAR — Premium horizontal widgets
   ───────────────────────────────────────────────────────── */
.top-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.top-bar-status,
.top-bar-quote {
  padding: 20px 24px;
}

.top-bar-status {
  border-right: 1px solid var(--line);
}

/* ── Status cells — Individual Card Grid ── */
.status-cells {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 0;
  border: none;
}

.status-cells > div {
  flex: 1;
  padding: 10px 14px;
  background: var(--line-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.status-cells > div:hover {
  background: var(--white);
  border-color: var(--muted);
  box-shadow: 0 4px 6px -2px rgba(15, 23, 42, 0.03);
}

.status-cells dt {
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.status-cells dd {
  margin: 3px 0 0;
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.status-message {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Quote controls ── */
.quote-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quote-form-inline {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.material-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  min-inline-size: 0;
}

.material-fieldset legend {
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
  padding: 0;
}

.material-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.material-option { margin: 0; }

.material-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 150ms ease;
  min-width: 58px;
  background: var(--white);
}

.material-option label:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.material-option label:has(input:checked) {
  border-color: var(--green);
  border-width: 2px;
  background: var(--line-light);
  box-shadow: 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

.material-option input[type="radio"] { display: none; }

.material-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.color-sample {
  --swatch-base: #d8dde3;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(20, 28, 36, 0.12);
  display: block;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: var(--swatch-base);
}

.color-sample::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 4px;
  pointer-events: none;
}

.material-fieldset legend .color-sample {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: text-bottom;
  margin-right: 6px;
  border-radius: 4px;
}

.material-meta {
  text-align: center;
}

.material-meta > span {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
}

.material-meta small  { display: none; }
.material-density     { display: none; }
.material-placeholder { font-size: 12px; color: var(--muted); }

/* Quantity field */
.qty-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.qty-field > span {
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.qty-field input {
  width: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  border-radius: var(--radius);
  transition: border-color 150ms;
  height: 36px;
}

.qty-field input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

/* Quote summary */
.quote-summary {
  padding: 10px 14px;
  background: #DCFCE7; /* Soft Green instead of off-emerald */
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quote-placeholder {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}

.quote-total strong {
  font-family: "Outfit", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

.quote-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}

.quote-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-light);
}

.quote-list li:last-child { border-bottom: none; padding-bottom: 0; }

/* ─────────────────────────────────────────────────────────
   TWO-PANEL WORKSPACE
   ───────────────────────────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: stretch;
}

/* ─────────────────────────────────────────────────────────
   LEFT PANEL — viewer + upload + compare
   ───────────────────────────────────────────────────────── */
.viewer-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-light);
  flex-shrink: 0;
}

.viewer-header h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
}

/* Upload strip */
.upload-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-light);
  flex-shrink: 0;
}

.upload-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

#file-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#upload-status { font-size: 11.5px; color: var(--muted); }

/* 3D canvas */
.viewer-surface {
  flex: 1;
  position: relative;
  min-height: 380px;
  background: var(--line-light);
  overflow: hidden;
}

.rhinoartisan-panel {
  flex-shrink: 0;
  border-top: 1px solid var(--line-light);
}

.rhinoartisan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-light);
}

.rhinoartisan-header h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
}

.rhinoartisan-status {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 40ch;
  text-align: right;
}

.rhinoartisan-surface {
  position: relative;
  height: clamp(420px, 62vh, 720px);
  background: var(--line-light);
  overflow: hidden;
}

.rhinoartisan-web3d {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.viewer-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  z-index: 2;
  pointer-events: none;
}

.viewer-overlay .overlay-kicker {
  color: var(--green-dark);
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.viewer-overlay p:not(.overlay-kicker) {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.upload-overlay {
  background: rgba(15, 23, 42, 0.9);
  color: var(--white);
  font-size: 14px;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
}

.hidden { display: none !important; }

/* Before/After */
.compare-inner {
  flex-shrink: 0;
  border-top: 1px solid var(--line-light);
}

.compare-inner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-light);
}

.compare-inner-header h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
}

.compare-status {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 40ch;
  text-align: right;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.compare-view { display: flex; flex-direction: column; }

.compare-view:first-child {
  border-right: 1px solid var(--line-light);
}

.compare-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-light);
  background: var(--line-light);
}

.compare-heading span {
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.compare-heading strong {
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.compare-surface {
  position: relative;
  min-height: 200px;
  background: var(--line-light);
  overflow: hidden;
  flex: 1;
}

.compare-overlay { padding: 16px; }

/* ── Viewer controls ── */
.viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.viewer-setting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Outfit", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.viewer-setting select {
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius);
  transition: border-color 150ms;
}

.viewer-setting select:hover  { border-color: var(--green); }
.viewer-setting select:focus  { outline: 2px solid var(--green); outline-offset: 1px; }

.viewer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  transition: border-color 150ms;
}

.viewer-toggle:hover { border-color: var(--green); }

.viewer-toggle input {
  width: 13px;
  height: 13px;
  accent-color: var(--green);
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────
   RIGHT PANEL — info panel
   ───────────────────────────────────────────────────────── */
.info-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ip-section {
  padding: 16px;
  border-bottom: 1px solid var(--line-light);
}

.ip-last { border-bottom: none; }

.ip-title {
  margin: 0 0 10px;
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
}

/* Two-column split */
.ip-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line-light);
}

.ip-half { padding: 16px; }
.ip-half:first-child { border-right: 1px solid var(--line-light); }

/* ─────────────────────────────────────────────────────────
   BUTTONS & STATES
   ───────────────────────────────────────────────────────── */
.upload-button,
.primary-button,
.secondary-button,
.ghost-button {
  border: none;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 150ms ease;
  height: 36px;
}

.upload-button,
.primary-button {
  padding: 0 16px;
  font-size: 13px;
  background: var(--green-dark);
  color: var(--white);
  border: 1.5px solid var(--green-dark);
}

.upload-button:hover,
.primary-button:hover { background: #334155; border-color: #334155; }

.secondary-button {
  padding: 0 16px;
  font-size: 13px;
  background: var(--white);
  color: var(--green-dark);
  border: 1.5px solid var(--line);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
  background: var(--line-light);
}

.ghost-button {
  padding: 0 12px;
  font-size: 12px;
  background: var(--white);
  color: var(--green-dark);
  border: 1.5px solid var(--line);
}

.ghost-button:hover:not(:disabled) { border-color: var(--green); color: var(--green); background: var(--line-light); }

.upload-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.upload-button:disabled,
.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled { cursor: not-allowed; opacity: 0.40; background: var(--line-light); color: var(--muted); border-color: var(--line); }

.button-stack { display: grid; gap: 8px; }

.helper-text,
.artifact-placeholder {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   MESH SNAPSHOT & TABLES
   ───────────────────────────────────────────────────────── */
.snapshot-table { display: grid; }

.snapshot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-light);
}

.snapshot-row:last-child { border-bottom: none; }
.snapshot-row span { font-size: 12px; color: var(--muted); }
.snapshot-row strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────────────
   CHIP & DIAG LISTS — Sleek Hover Translations
   ───────────────────────────────────────────────────────── */
.chip-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip-list li {
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--line-light);
  border: 1px solid var(--line);
  color: var(--green-dark);
  border-radius: var(--radius);
}

.diag-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 340px;
  overflow-y: auto;
}

.diag-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}

.diag-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  align-items: flex-start;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.diag-card:hover {
  transform: translateX(4px); /* Premium hover slide! */
  border-color: var(--muted);
  box-shadow: 0 4px 10px -4px rgba(15, 23, 42, 0.06);
}

.diag-card--error {
  border-left: 3px solid var(--err);
  background: var(--err-bg);
}
.diag-card--warning {
  border-left: 3px solid var(--warn);
  background: var(--warn-bg);
}
.diag-card--repair {
  border-left: 3px solid var(--ok);
  background: var(--ok-bg);
}

.diag-body {
  flex: 1 1 auto;
  min-width: 0;
}

.diag-title {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.3;
}

.diag-text {
  margin: 0 0 6px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.diag-badge {
  display: inline-block;
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge--error   { background: var(--err-bg); color: var(--err); }
.badge--warning { background: var(--warn-bg); color: var(--warn); }
.badge--minor   { background: var(--ok-bg); color: var(--ok); }

/* ─────────────────────────────────────────────────────────
   ARTIFACT DOWNLOADS
   ───────────────────────────────────────────────────────── */
.artifact-list { display: grid; gap: 5px; }

.artifact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 150ms ease;
}

.artifact-link:hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.artifact-link:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ─────────────────────────────────────────────────────────
   DEBUG SECTION — IDE Dark Response Deck
   ───────────────────────────────────────────────────────── */
.debug-section {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.debug-title {
  margin: 0 0 6px;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
}

.debug-copy {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.raw-json-output {
  margin: 0;
  min-height: 120px;
  max-height: 300px;
  overflow: auto;
  padding: 12px 14px;
  background: #0F172A; /* Clean dark slate navy instead of forest green */
  color: #E2E8F0;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: var(--radius);
}

canvas { display: block; }

/* ─────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr 300px;
  }
}

@media (max-width: 860px) {
  .top-bar {
    grid-template-columns: 1fr;
  }

  .top-bar-status {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

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

  .viewer-panel {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .viewer-surface {
    min-height: 320px;
    flex: none;
  }

  .compare-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ip-split {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: calc(100vw - 16px);
    margin-bottom: 20px;
  }

  .hero-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 12px;
    border-left: none;
    border-top: 4px solid var(--green);
  }

  .hero-bar-logo { height: 36px; }
  .hero-bar h1  { font-size: 1.25rem; }
  .hero-copy    { display: none; }

  .hero-status {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .status-cells { flex-direction: column; }
  .status-cells > div { border-right: none; border-bottom: 1px solid var(--line-light); }
  .status-cells > div:last-child { border-bottom: none; }

  .compare-grid,
  .ip-split { grid-template-columns: 1fr; }

  .compare-view:first-child,
  .ip-half:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line-light);
  }

  .rhinoartisan-header {
    flex-direction: column;
    gap: 6px;
  }

  .rhinoartisan-status {
    max-width: none;
    text-align: left;
  }

  .rhinoartisan-surface {
    height: clamp(360px, 55vh, 540px);
  }

  .viewer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .viewer-setting { justify-content: space-between; width: 100%; }
  .viewer-setting select,
  .viewer-toggle,
  .viewer-actions .ghost-button { width: 100%; }

  .upload-button { width: 100%; justify-content: center; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =========================================================
   Standalone Converter Bodies
   ========================================================= */
.converter-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.converter-shell {
  width: min(860px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08);
}

.converter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px;
  background: var(--green-dark);
  border-left: 6px solid var(--green);
  border-bottom: none;
  color: var(--white);
}

.converter-logo {
  height: 42px;
  width: auto;
  margin-bottom: 18px;
}

.converter-header h1 {
  margin: 0 0 8px;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.08;
  color: var(--white);
}

.converter-header p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 13px;
}

.converter-back-link {
  flex-shrink: 0;
  color: var(--white);
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 150ms ease;
  background: var(--green-dark);
}

.converter-back-link:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--line-light);
}

.converter-header > .converter-back-link,
.converter-nav {
  order: 2;
}

.converter-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.converter-panel {
  padding: 28px;
}

.converter-form {
  display: grid;
  gap: 18px;
}

.converter-dropzone {
  min-height: 230px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  border: 2px dashed var(--line);
  background: var(--white);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 150ms ease;
}

.converter-dropzone:hover,
.converter-dropzone.is-dragging {
  border-color: var(--green);
  background: var(--line-light);
}

.converter-dropzone.is-disabled {
  cursor: wait;
  opacity: 0.72;
}

.converter-dropzone-title,
.converter-dropzone-copy {
  display: block;
}

.converter-dropzone-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
}

.converter-dropzone-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.converter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.converter-download {
  text-decoration: none;
}

.converter-status {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--ok-bg);
  border: 1px solid var(--line);
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  .converter-header {
    flex-direction: column;
    padding: 22px;
    border-left: none;
    border-top: 4px solid var(--green);
  }

  .converter-back-link {
    order: 0;
  }

  .converter-nav {
    order: 0;
    justify-content: flex-start;
  }

  .converter-panel {
    padding: 20px;
  }

  .converter-actions .primary-button,
  .converter-actions .secondary-button {
    width: 100%;
  }
}
