:root {
  --ink: #e9f4ff;
  --muted: #9db8cf;
  --faint: rgba(157, 184, 207, 0.22);
  --bg0: #06101f;
  --bg1: #08182d;
  --bg2: #0c2340;
  --panel: rgba(8, 25, 48, 0.94);
  --panel2: rgba(11, 35, 64, 0.86);
  --line: rgba(145, 188, 226, 0.42);
  --line2: rgba(86, 139, 190, 0.62);
  --accent: #80d8ff;
  --accent2: #3ba1ff;
  --gold: #d4b46a;
  --warn: #ffcf66;
  --danger: #ff7d88;
  --ok: #82f0b8;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 16% 0%, rgba(59, 161, 255, 0.22), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(128, 216, 255, 0.12), transparent 34rem),
    linear-gradient(160deg, var(--bg0), var(--bg1) 45%, #04111f);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.95), transparent 82%);
}

.site-shell {
  width: min(1480px, calc(100% - 28px));
  margin: 24px auto 80px;
  position: relative;
  z-index: 1;
}

.border-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.03);
  background: linear-gradient(180deg, rgba(13, 38, 69, 0.94), rgba(5, 15, 29, 0.92));
  overflow: hidden;
}

.sn-hero {
  padding: 26px 28px 18px;
  margin-bottom: 20px;
  position: relative;
}

.sn-hero::after, .section-block::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(128, 216, 255, 0.09);
  border-radius: calc(var(--radius) - 8px);
  pointer-events: none;
}

.hero-kicker, .eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  font-weight: 750;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: center;
}

h1, h2, h3 { margin: 0; line-height: 1.08; }
h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 5.25rem);
  letter-spacing: -.05em;
  margin: 8px 0 14px;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2.45rem);
  letter-spacing: -.03em;
}
h3 {
  font-size: 1rem;
  color: #d4edff;
  margin-bottom: 10px;
}
.lead {
  color: #c9ddee;
  max-width: 980px;
  font-size: 1.08rem;
  line-height: 1.62;
  margin: 0;
}
.status-card {
  border: 1px solid var(--line2);
  border-radius: 18px;
  padding: 14px;
  background: rgba(3, 13, 26, 0.46);
}
.status-line, .field-pair {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(157, 184, 207, .13);
  padding: 10px 0;
  color: var(--muted);
}
.status-line:last-child, .field-pair:last-child { border-bottom: 0; }
.status-line strong, .field-pair strong { color: var(--ink); font-size: .95rem; text-align: right; }

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(157, 184, 207, 0.18);
}
.tool-nav a, .btn, .layer-btn {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid rgba(128, 216, 255, 0.22);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(8, 31, 58, 0.64);
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  font-size: .9rem;
}
.tool-nav a:hover, .btn:hover, .layer-btn:hover { transform: translateY(-1px); border-color: rgba(128,216,255,.65); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; font-family: var(--sans); }
.btn.primary { background: linear-gradient(135deg, #256ec4, #0a9bd8); border-color: rgba(128,216,255,.7); }
.btn.secondary { background: rgba(43, 103, 159, 0.72); border-color: rgba(128,216,255,.45); }
.btn.ghost { background: rgba(6, 16, 31, 0.38); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.layer-btn.active { background: linear-gradient(135deg, rgba(212,180,106,.34), rgba(59,161,255,.32)); border-color: rgba(212,180,106,.78); color: #fff2c9; }

.section-block {
  position: relative;
  padding: 24px;
  margin: 18px 0;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(157, 184, 207, .16);
  padding-bottom: 16px;
}
.section-heading p {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.55;
  margin: 0;
}

.record-grid, .workspace-grid, .surface-grid, .pxrf-grid, .comments-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 18px;
}
.upload-panel, .side-panel, .canvas-card, .metadata-grid > label, .pxrf-grid > label, .comments-grid > div, .surface-grid > div {
  border: 1px solid rgba(128,216,255,.18);
  background: rgba(3, 14, 27, .36);
  border-radius: 18px;
  padding: 16px;
}
.dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  border: 1px dashed rgba(128,216,255,.55);
  border-radius: 18px;
  padding: 34px 18px;
  min-height: 168px;
  background: rgba(128,216,255,.06);
  cursor: pointer;
}
.dropzone input { display: none; }
.drop-title { font-size: 1.25rem; font-weight: 800; }
.drop-hint { color: var(--muted); }
.micro-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.metadata-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metadata-grid label:nth-last-child(1), .metadata-grid label:nth-last-child(2), .check-row { grid-column: 1 / -1; }
label { color: #cfe7fa; font-weight: 700; display: grid; gap: 7px; }
input, select, textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(1, 8, 16, .72);
  border: 1px solid rgba(128,216,255,.22);
  border-radius: 12px;
  padding: 10px 11px;
  font: inherit;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(128,216,255,.1); }
textarea { resize: vertical; }
.inline-inputs { display: grid; grid-template-columns: 1fr 92px auto; gap: 8px; }
.check-row { display: flex; flex-wrap: wrap; gap: 18px; border: 1px solid rgba(128,216,255,.18); background: rgba(3,14,27,.36); border-radius: 18px; padding: 14px; }
.check-row label { display: flex; align-items: center; gap: 10px; }
.check-row input { width: auto; }

.progress-wrap { margin-top: 16px; }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin-bottom: 7px; }
.progress-bar { height: 12px; border-radius: 999px; background: rgba(0,0,0,.36); border: 1px solid rgba(128,216,255,.2); overflow: hidden; }
#progressFill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent2), var(--accent), var(--gold)); transition: width .25s ease; }

.toolbar-row, .layer-tools, .report-actions, .pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}
.workspace-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.canvas-card { min-width: 0; }
.canvas-title { font-weight: 850; color: #d8f1ff; margin-bottom: 10px; }
.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(128,216,255,.25);
  background: #020811;
}
#imageCanvas, #overlaySvg { position: absolute; inset: 0; width: 100%; height: 100%; }
#overlaySvg { cursor: crosshair; }
.hint-line, .small-text { color: var(--muted); font-size: .9rem; line-height: 1.45; margin-top: 10px; }
.side-panel label { margin-top: 12px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  border: 1px solid rgba(128,216,255,.18);
  background: rgba(3, 14, 27, .38);
  border-radius: 18px;
  padding: 16px;
  min-height: 104px;
}
.metric span { color: var(--muted); display: block; margin-bottom: 12px; }
.metric strong { font-size: 1.2rem; line-height: 1.2; }
.warning-box {
  margin-top: 15px;
  border: 1px solid rgba(255,207,102,.34);
  color: #ffe8ae;
  background: rgba(103, 69, 0, .18);
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.55;
}
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.swatch {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(128,216,255,.15);
  border-radius: 14px;
  padding: 9px;
  background: rgba(0,0,0,.18);
}
.swatch-color { height: 46px; border-radius: 10px; border: 1px solid rgba(255,255,255,.28); }
.annotation-list { display: grid; gap: 8px; }
.annotation-item {
  border: 1px solid rgba(128,216,255,.15);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0,0,0,.18);
  color: #d8ebfa;
}
.annotation-item small { color: var(--muted); display: block; margin-top: 4px; }
.empty-state { color: var(--muted); font-style: italic; }
.report-status { color: var(--muted); align-self: center; }
.report-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pdf-viewer {
  border: 1px solid rgba(128,216,255,.2);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0,0,0,.28);
  min-height: 620px;
}
.pdf-viewer object, .pdf-viewer iframe { width: 100%; min-height: 620px; border: 0; display: block; }

svg .contour-path { fill: rgba(128,216,255,.08); stroke: #80d8ff; stroke-width: 2; vector-effect: non-scaling-stroke; }
svg .rim-path { fill: none; stroke: #d4b46a; stroke-width: 3; stroke-dasharray: 7 5; vector-effect: non-scaling-stroke; }
svg .rim-circle { fill: none; stroke: rgba(212,180,106,.75); stroke-width: 2; stroke-dasharray: 10 8; vector-effect: non-scaling-stroke; }
svg .point { stroke: #001525; stroke-width: 1.6; vector-effect: non-scaling-stroke; cursor: grab; }
svg .point-contour { fill: #80d8ff; }
svg .point-rim { fill: #d4b46a; }
svg .point-scale { fill: #82f0b8; }
svg .point-color { fill: #fff; }
svg .ann-decoration { fill: #ffcf66; }
svg .ann-surface { fill: #9ae6ff; }
svg .ann-abrasion { fill: #ffae7d; }
svg .ann-residue { fill: #c8a2ff; }
svg .ann-pxrf { fill: #82f0b8; }
svg text { font-family: var(--sans); font-size: 13px; fill: #f0fbff; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 3px; }

@media (max-width: 1050px) {
  .hero-grid, .record-grid, .workspace-grid, .surface-grid, .pxrf-grid, .comments-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metadata-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 8px; }
}
@media (max-width: 640px) {
  .site-shell { width: min(100% - 16px, 1480px); margin-top: 8px; }
  .sn-hero, .section-block { padding: 18px; }
  .metric-grid { grid-template-columns: 1fr; }
  .inline-inputs { grid-template-columns: 1fr; }
}

/* Shell alignment with stellanovaeducation.com/al/here/index.html */
.research-topbar {
  min-height: 58px;
  margin-bottom: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(6, 22, 43, .96), rgba(4, 14, 27, .92));
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e9f4ff;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: .01em;
}
.sn-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(212,180,106,.78);
  border-radius: 12px;
  background: rgba(212,180,106,.11);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 900;
}
.shell-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
}
.shell-nav a {
  color: #cfe7fa;
  text-decoration: none;
  font-weight: 750;
  font-size: .94rem;
  opacity: .92;
}
.shell-nav a:hover { color: #fff2c9; }
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .75fr);
  gap: 16px;
  margin-top: 22px;
}
.intro-panel {
  border: 1px solid rgba(128,216,255,.18);
  border-radius: 18px;
  background: rgba(3, 14, 27, .34);
  padding: 18px;
}
.intro-panel h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.9rem);
  margin-bottom: 10px;
}
.intro-panel p {
  color: #c9ddee;
  line-height: 1.58;
  margin: 0;
}
.scope-panel {
  background: linear-gradient(180deg, rgba(11, 35, 64, .62), rgba(3, 14, 27, .34));
}
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.feature-pills span {
  color: #d4edff;
  border: 1px solid rgba(128,216,255,.22);
  border-radius: 999px;
  background: rgba(8,31,58,.58);
  padding: 7px 10px;
  font-size: .86rem;
  font-weight: 750;
}
.sn-footer {
  color: #89a9c5;
  text-align: center;
  margin: 28px 0 0;
  font-size: .92rem;
}

@media (max-width: 860px) {
  .research-topbar, .shell-nav { justify-content: flex-start; }
  .research-topbar { align-items: flex-start; flex-direction: column; }
  .intro-grid { grid-template-columns: 1fr; }
}

.research-topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:12px 18px;
  margin-bottom:16px;
}
.brand-lockup { display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink); font-weight:800; }
.sn-mark {
  width:42px; height:42px; border-radius:50%; display:grid; place-items:center;
  background:linear-gradient(135deg,#1e5ea2,#0aa0d8); border:1px solid rgba(128,216,255,.5); color:white; font-weight:900;
}
.shell-nav { display:flex; flex-wrap:wrap; gap:10px; }
.shell-nav a { color:var(--muted); text-decoration:none; font-weight:700; }
.shell-nav a:hover { color:var(--ink); }

.intro-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }
.intro-panel {
  border:1px solid rgba(128,216,255,.16); background:rgba(3,14,27,.36); border-radius:18px; padding:18px;
}
.feature-pills { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.feature-pills span, .workflow-step {
  border:1px solid rgba(128,216,255,.18); background:rgba(8,31,58,.45); border-radius:999px; padding:8px 12px;
}
.workflow-strip {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:18px;
}
.workflow-step { border-radius:18px; padding:14px; display:grid; gap:4px; }
.workflow-step span {
  width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:rgba(212,180,106,.18); color:#fff2c9; font-weight:800;
}
.workflow-step small { color:var(--muted); }
.instruction-box {
  border:1px solid rgba(212,180,106,.28); background:rgba(57,45,10,.12); border-radius:18px; padding:16px 18px; margin-bottom:18px;
}
.instruction-box h3 { color:#ffe7af; margin-bottom:8px; }
.instruction-box ol { margin:0; padding-left:18px; color:#d9e8f4; line-height:1.7; }
.status-banner {
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; border:1px solid rgba(128,216,255,.18); border-radius:18px; padding:14px 16px; background:rgba(3,14,27,.38); margin-bottom:16px;
}
.preview-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.preview-card {
  border:1px solid rgba(128,216,255,.18); background:rgba(3,14,27,.36); border-radius:18px; padding:14px;
}
.preview-card canvas { width:100%; height:auto; aspect-ratio:13/9; display:block; border-radius:14px; background:#02101d; border:1px solid rgba(128,216,255,.16); }
.report-status { color:#d8f1ff; font-weight:700; }
.report-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.sn-footer { color:var(--muted); text-align:center; padding:18px 0 0; }

.empty-state { color:var(--muted); border:1px dashed rgba(128,216,255,.18); border-radius:14px; padding:16px; }
.swatch-grid, .annotation-list { display:grid; gap:10px; }
.swatch { display:flex; align-items:center; gap:12px; padding:10px; border:1px solid rgba(128,216,255,.14); border-radius:12px; background:rgba(3,14,27,.28); }
.swatch-color { width:40px; height:40px; border-radius:10px; border:1px solid rgba(255,255,255,.2); }
.annotation-item { padding:12px; border:1px solid rgba(128,216,255,.14); border-radius:12px; background:rgba(3,14,27,.28); }
.annotation-item small { display:block; color:var(--muted); margin:4px 0 6px; }
.pdf-viewer { border:1px solid rgba(128,216,255,.18); border-radius:18px; overflow:hidden; min-height:640px; }
.pdf-viewer object, .pdf-viewer iframe { display:block; width:100%; min-height:640px; border:0; }

.point { stroke:#001525; stroke-width:1.6; }
.point-contour { fill:#80d8ff; }
.point-rim { fill:#d4b46a; }
.point-scale { fill:#82f0b8; }
.point-color { fill:#ffffff; }
.ann-decoration { fill:#ffcf66; }
.ann-surface { fill:#9ae6ff; }
.ann-abrasion { fill:#ffae7d; }
.ann-residue { fill:#c8a2ff; }
.ann-pxrf { fill:#82f0b8; }
.contour-path { fill: rgba(128,216,255,.08); stroke: #80d8ff; stroke-width: 2; }
.rim-path { fill:none; stroke:#d4b46a; stroke-width:3; stroke-dasharray:7 5; }
.rim-circle { fill:none; stroke:#d4b46a; stroke-width:2; stroke-dasharray:10 8; }
#overlaySvg text { font-family: Arial,sans-serif; font-size:13px; fill:#f0fbff; paint-order:stroke; stroke:rgba(0,0,0,.75); stroke-width:3px; }

@media (max-width: 1100px) {
  .hero-grid, .record-grid, .workspace-grid, .surface-grid, .pxrf-grid, .comments-grid, .preview-grid, .intro-grid { grid-template-columns:1fr; }
  .workflow-strip { grid-template-columns:1fr 1fr; }
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .site-shell { width:min(100% - 16px, 1480px); margin:12px auto 60px; }
  .section-block, .sn-hero { padding:18px 14px; }
  .metadata-grid { grid-template-columns:1fr; }
  .inline-inputs { grid-template-columns:1fr; }
  .workflow-strip, .metric-grid { grid-template-columns:1fr; }
  .research-topbar { padding:10px 12px; }
  .shell-nav { display:none; }
}

.gate-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin:18px 0 24px}
.gate-card{border:1px solid rgba(128,216,255,.18);border-radius:16px;padding:14px 16px;background:rgba(8,26,44,.72);box-shadow:0 14px 28px rgba(0,0,0,.18)}
.gate-card span{display:block;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:#9db8cf;margin-bottom:6px}
.gate-card strong{display:block;font-size:1.08rem;color:#f0fbff}
.gate-card small{display:block;color:#9db8cf;margin-top:8px}
.gate-card.gate-ready,.gate-card:has(.gate-ready){border-color:rgba(130,240,184,.4)}
.guide-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;margin-top:18px}
.guide-card.block{padding:18px}
.process-log{display:flex;flex-direction:column;gap:10px;max-height:260px;overflow:auto}
.log-item{display:flex;gap:12px;align-items:flex-start;padding:10px 12px;border:1px solid rgba(128,216,255,.12);border-radius:12px;background:rgba(1,9,18,.36)}
.log-item strong{min-width:72px;color:#d4b46a;font-size:.85rem}
.log-item span{color:#d6ebf7;font-size:.93rem}
.log-item.warn{border-color:rgba(255,207,102,.35)}
.guide-ellipse{fill:none;stroke:#d4b46a;stroke-width:2.4;stroke-dasharray:11 7}
.guide-line{stroke:#d4b46a;stroke-width:2.3;stroke-dasharray:10 5}
.guide-centerline{stroke:#80d8ff;stroke-width:2;stroke-dasharray:9 6}
.point-guide{fill:#ffcf66}
.modal-shell{position:fixed;inset:0;background:rgba(2,8,17,.7);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}
.modal-card{width:min(540px,92vw);padding:22px 24px}
.progress-wrap{margin-top:16px}
.progress-label{display:flex;justify-content:space-between;color:#cfe7fa;font-size:.95rem;margin-bottom:8px}
.progress-bar{height:14px;border-radius:999px;background:rgba(255,255,255,.09);overflow:hidden;border:1px solid rgba(128,216,255,.16)}
.progress-bar div{height:100%;width:0;background:linear-gradient(90deg,#80d8ff,#d4b46a);transition:width .2s ease}
body.modal-open{overflow:hidden}
@media (max-width: 920px){.guide-grid{grid-template-columns:1fr}}

.guide-edit-box{margin-top:12px;border:1px solid rgba(128,216,255,.18);background:rgba(3,14,27,.32);border-radius:16px;padding:14px}
.nudge-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.nudge-grid .nudge-up,.nudge-grid .nudge-down{grid-column:1/-1}
.point-guide.active-guide{fill:#82f0b8;stroke:#fff2c9;stroke-width:2.3}
.side-panel .toolbar-row{margin-top:10px}

/* v1.3.2 hotfix: browser hidden attribute must override modal display. */
.modal-shell[hidden]{display:none!important;}
[hidden]{display:none!important;}

/* v1.3.3 safety: modal and hidden UI must not block page rendering. */
.modal-shell[hidden],[hidden]{display:none!important;}

/* v1.4.0 analytical hardening */
.advanced-box{margin:12px 0;border:1px solid rgba(128,216,255,.18);background:rgba(3,14,27,.32);border-radius:14px;padding:12px}
.advanced-box summary{cursor:pointer;color:#ffe7af;font-weight:800;margin-bottom:8px}
.advanced-box[open] summary{margin-bottom:12px}
button:disabled{opacity:.48;cursor:not-allowed}
.modal-card-wide{width:min(760px,94vw)}
.checklist-list{color:#d9e8f4;line-height:1.7;margin:12px 0 16px;padding-left:22px}
.metric span{font-size:.78rem;letter-spacing:.06em;text-transform:uppercase;color:#9db8cf}


/* v1.4.2 diagnostics panel */
.diagnostics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:18px}.diagnostics-log-grid{margin-top:16px}.diagnostic-card{background:rgba(5,17,30,.62);border:1px solid rgba(128,216,255,.18);border-radius:14px;padding:16px}.diagnostic-card h3{margin:0 0 12px;color:#d4b46a;font-size:1.02rem}.diagnostic-fact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.diag-fact{background:rgba(2,11,22,.55);border:1px solid rgba(128,216,255,.12);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}.diag-fact span{font-size:.8rem;color:#9db8cf}.diag-fact strong{font-size:.95rem;color:#f0fbff;word-break:break-word}.diag-span-all{grid-column:1/-1}.diagnostic-json-preview{margin:0;max-height:420px;overflow:auto;background:rgba(2,11,22,.7);border:1px solid rgba(128,216,255,.16);border-radius:10px;padding:12px;color:#cfe7fa;font-size:.83rem;line-height:1.35;white-space:pre-wrap;word-break:break-word}.diag-badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:.78rem;font-weight:700}.diag-ok{background:rgba(130,240,184,.16);color:#82f0b8}.diag-bad{background:rgba(255,124,124,.18);color:#ffb0b0}.diag-warn{background:rgba(255,207,102,.16);color:#ffe8ae}
