/* ═══════════════════════════════════════════════════════════════
   Tool Schema Rendering Atlas — Warm Editorial Theme
   ═══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;

  /* ── Surface palette ──────────────────────────────────────── */
  --ink:     #1a1d21;
  --muted:   #6b7280;
  --paper:   #faf8f5;
  --panel:   #ffffff;
  --surface: #f5f2ed;
  --line:    #e2dfd8;
  --soft:    #edeae4;

  /* ── Dialect accent colors (rich & saturated for light) ──── */
  --typescript:     #3b5fc0;
  --xml:            #0a7558;
  --json:           #a67612;
  --custom-channel: #c43730;
  --message-json:   #7c4dba;
  --builtin:        #2d6f91;
  --other:          #6b7280;

  /* ── Tinted backgrounds for active states ─────────────────── */
  --tint-ts:   rgba(59, 95, 192, 0.07);
  --tint-xml:  rgba(10, 117, 88, 0.07);
  --tint-json: rgba(166, 118, 18, 0.07);
  --tint-cc:   rgba(196, 55, 48, 0.07);
  --tint-mj:   rgba(124, 77, 186, 0.07);

  --shadow: 0 12px 40px rgba(26, 29, 33, 0.06), 0 2px 8px rgba(26, 29, 33, 0.04);
  --shadow-sm: 0 4px 14px rgba(26, 29, 33, 0.05);
  --shadow-up: 0 -2px 12px rgba(26, 29, 33, 0.04);

  --mono: "Fira Code", "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Georgia", serif;

  font-family: var(--sans);
  font-optical-sizing: auto;
}

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fine grain texture for a printed/paper feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

button, select { font: inherit; }
code, pre { font-family: var(--mono); }

/* ── Shell Layout ───────────────────────────────────────────── */

.app-shell {
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  min-height: 100svh;
}

/* ── Sidebar Rail ───────────────────────────────────────────── */

.model-rail {
  background:
    linear-gradient(180deg, #fdfcfa 0%, var(--paper) 100%);
  border-right: 1px solid var(--line);
  height: 100svh;
  overflow: auto;
  padding: 22px 20px;
  position: sticky;
  top: 0;
}

.rail-head { margin-bottom: 12px; }

/* ── Overview Link Button ───────────────────────────────────── */

.overview-link {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  min-height: 60px;
  padding: 12px 14px;
  text-align: left;
  transition: box-shadow 200ms ease, transform 200ms ease;
  width: 100%;
}

.overview-link:hover {
  box-shadow: 0 8px 24px rgba(26, 29, 33, 0.18);
  transform: translateY(-1px);
}

.overview-link:not(.active) {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.overview-link:not(.active):hover {
  border-color: #c8c4bc;
  box-shadow: var(--shadow-sm);
}

.overview-link strong {
  font-size: 14px;
  line-height: 1.25;
}

.overview-link span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
}

.overview-link:not(.active) span { color: var(--muted); }

/* ── Shared Text Styles ─────────────────────────────────────── */

.summary-text,
.muted {
  color: var(--muted);
  line-height: 1.52;
}

.eyebrow {
  color: #8c8a84;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

/* ── Dialect Filter Legend ───────────────────────────────────── */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}

.legend button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 650;
  gap: 5px;
  min-height: 27px;
  padding: 0 10px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.legend button:hover {
  border-color: #c8c4bc;
  color: var(--ink);
}

.legend button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 29, 33, 0.15);
}

/* ── Dialect Dots ───────────────────────────────────────────── */

.dot {
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.dot.typescript,     .model-card.typescript::before { background: var(--typescript); }
.dot.xml,            .model-card.xml::before        { background: var(--xml); }
.dot.json,           .model-card.json::before        { background: var(--json); }
.dot.custom-channel, .model-card.custom-channel::before { background: var(--custom-channel); }
.dot.message-json,   .model-card.message-json::before   { background: var(--message-json); }

/* ── Model Card List ────────────────────────────────────────── */

.model-list {
  display: grid;
  gap: 6px;
}

.model-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 3px;
  overflow: hidden;
  min-height: 52px;
  padding: 10px 12px 10px 17px;
  position: relative;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.model-card::before {
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.model-list:has(.model-card.active) .model-card:not(.active) { opacity: 0.55; }
.model-list:has(.model-card.active) .model-card:not(.active):hover { opacity: 1; }

.model-card:hover {
  border-color: #c8c4bc;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ── Per-dialect active glow tints ──────────────────────────── */

.model-card.active {
  background: var(--tint-xml);
  border-color: var(--xml);
  box-shadow: 0 0 0 3px rgba(10, 117, 88, 0.08), var(--shadow-sm);
}

.model-card.typescript.active {
  background: var(--tint-ts);
  border-color: var(--typescript);
  box-shadow: 0 0 0 3px rgba(59, 95, 192, 0.08), var(--shadow-sm);
}

.model-card.json.active {
  background: var(--tint-json);
  border-color: var(--json);
  box-shadow: 0 0 0 3px rgba(166, 118, 18, 0.08), var(--shadow-sm);
}

.model-card.custom-channel.active {
  background: var(--tint-cc);
  border-color: var(--custom-channel);
  box-shadow: 0 0 0 3px rgba(196, 55, 48, 0.08), var(--shadow-sm);
}

.model-card.message-json.active {
  background: var(--tint-mj);
  border-color: var(--message-json);
  box-shadow: 0 0 0 3px rgba(124, 77, 186, 0.08), var(--shadow-sm);
}

.model-card strong {
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
}

.model-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

/* ── Summary Bar ────────────────────────────────────────────── */

.summary-text {
  background: var(--surface);
  border-left: 4px solid var(--custom-channel);
  border-radius: 6px;
  color: #4a4f57;
  display: -webkit-box;
  font-size: 14px;
  font-weight: 560;
  height: 72px;
  line-clamp: 3;
  line-height: 1.48;
  margin: 0;
  max-width: 780px;
  overflow: hidden;
  padding: 11px 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* ── Workspace ──────────────────────────────────────────────── */

.model-workspace {
  min-width: 0;
  padding: 28px clamp(24px, 4vw, 48px) 58px;
}

.workspace-head {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 0.72fr);
  margin-bottom: 24px;
}

/* ── Overview Panel ─────────────────────────────────────────── */

.overview-panel { display: grid; gap: 24px; }
.overview-panel[hidden] { display: none; }

.overview-hero {
  border-bottom: 1px solid var(--line);
  padding: 26px 0 30px;
}

.overview-hero h2 { max-width: 880px; }

.overview-hero p:not(.eyebrow) {
  color: #4a4f57;
  font-size: 19px;
  font-weight: 480;
  line-height: 1.52;
  margin: 0;
  max-width: 860px;
}

/* ── Method Diagram ─────────────────────────────────────────── */

.method-diagram {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
}

.method-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 9px;
  min-height: 190px;
  padding: 18px;
  position: relative;
}

.method-step::before {
  background: var(--xml);
  border-radius: 10px 0 0 10px;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.method-step span {
  align-items: center;
  background: var(--xml);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.method-step strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.method-step p,
.method-notes p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.method-arrow {
  align-self: center;
  color: #c0bdb5;
  font-size: 24px;
  font-weight: 850;
  justify-self: center;
}

.method-notes {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-notes section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.method-notes h3 {
  margin-bottom: 10px;
  max-width: 560px;
}

/* ── Headings ───────────────────────────────────────────────── */

h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.96;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}

h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 650;
  margin: 0;
}

/* ── Snapshot Cards ─────────────────────────────────────────── */

.snapshot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.snapshot div {
  min-width: 0;
  padding: 14px 16px;
}

.snapshot div + div {
  border-left: 1px solid var(--line);
}

.snapshot span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.snapshot strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.25;
  text-transform: capitalize;
}

/* ── Studio Layout ──────────────────────────────────────────── */

.studio {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.prompt-panel,
.inspector,
.evidence-packets {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  padding: 16px 18px;
}

/* ── Case Picker ────────────────────────────────────────────── */

.case-picker {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.case-picker > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── View Tabs ──────────────────────────────────────────────── */

.view-tabs {
  align-items: end;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 58px;
  padding: 10px 18px 0;
}

.view-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  min-height: 38px;
  padding: 0 13px;
  transition: color 120ms ease, background 120ms ease;
}

.view-tabs button:hover { color: var(--ink); }

.view-tabs button.active {
  background: var(--panel);
  border-color: var(--line);
  border-bottom-color: var(--panel);
  color: var(--ink);
}

.tab-tools {
  align-items: center;
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-height: 38px;
  padding-bottom: 8px;
}

/* ── Render Caveat Banner ───────────────────────────────────── */

.render-caveat {
  background: #fef9ee;
  border-bottom: 1px solid var(--line);
  color: #7d5a15;
  font-size: 11.5px;
  font-weight: 620;
  line-height: 1.5;
  margin: 0;
  padding: 7px 18px;
}

/* ── Empty Render State ─────────────────────────────────────── */

.empty-render {
  color: rgba(230, 240, 234, 0.65);
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  max-width: 600px;
}

.empty-render strong { color: #ffffff; }

/* ── Code Panes ─────────────────────────────────────────────── */

pre,
.code-pane {
  background: #111714;
  border-radius: 0;
  color: #d8ede0;
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0;
  max-height: 68svh;
  min-height: 520px;
  overflow: auto;
  padding: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.input-code {
  background: #17130f;
  color: #e8dcc8;
}

/* ── Token Highlights ───────────────────────────────────────── */

.tool-token {
  background: rgba(10, 117, 88, 0.25);
  border-radius: 3px;
  color: #ffffff;
  font-weight: 750;
  padding: 0 3px;
}

.schema-token-output {
  background: rgba(166, 118, 18, 0.2);
  border-radius: 3px;
  color: #ffe9b4;
  font-weight: 680;
  padding: 0 3px;
}

.boilerplate-token {
  color: rgba(216, 237, 224, 0.36);
}

.schema-token {
  color: #f0c75e;
  font-weight: 750;
}

/* ── Inspector Panel ────────────────────────────────────────── */

.inspector { overflow: hidden; }

.inspector-section { padding: 16px 18px; }

.inspector-section + .inspector-section {
  border-top: 1px solid var(--line);
}

/* ── Case Tabs ──────────────────────────────────────────────── */

.case-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.case-tabs button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  min-height: 28px;
  padding: 0 10px;
  text-align: left;
  text-transform: capitalize;
  transition: background 120ms ease, border-color 120ms ease;
}

.case-tabs button:hover {
  border-color: #c8c4bc;
}

.case-tabs button.active {
  background: rgba(10, 117, 88, 0.08);
  border-color: rgba(10, 117, 88, 0.35);
  color: #06614a;
  font-weight: 700;
}

.case-tabs button.unsupported {
  border-color: rgba(166, 118, 18, 0.35);
  color: #7d5a15;
}

.case-tabs button.unsupported::after {
  align-items: center;
  background: #fef3d6;
  border-radius: 50%;
  color: #a67612;
  content: "!";
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  height: 14px;
  justify-content: center;
  margin-left: 5px;
  width: 14px;
}

/* ── Feature / Special Lists ────────────────────────────────── */

.feature-list,
.special-list,
.claims {
  display: grid;
  gap: 6px;
}

/* ── Output Legend ───────────────────────────────────────────── */

.output-legend {
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 8px 18px;
}

.output-legend span {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 650;
  gap: 7px;
}

.swatch {
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 20px;
}

.swatch.tool        { background: rgba(10, 117, 88, 0.3); }
.swatch.schema      { background: rgba(166, 118, 18, 0.25); }
.swatch.boilerplate { background: rgba(26, 29, 33, 0.12); }

/* ── Feature / Special Rows ─────────────────────────────────── */

.feature-row,
.special-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  cursor: default;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(104px, 0.5fr) minmax(0, 1fr);
  padding: 8px 0;
  text-align: left;
  width: 100%;
}

.special-row { cursor: pointer; }
.special-row.note-row { cursor: default; }

.special-row small {
  color: var(--muted);
  font-size: 11px;
  grid-column: 1 / -1;
  line-height: 1.45;
}

.special-row .evidence-path {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.feature-row:last-child,
.special-row:last-child { border-bottom: 0; }

.feature-row strong,
.special-row strong {
  font-size: 12.5px;
  font-weight: 650;
  text-transform: capitalize;
}

/* ── Status Badges ──────────────────────────────────────────── */

.status {
  border-radius: 999px;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.25;
  min-height: 24px;
  padding: 4px 8px;
  overflow-wrap: anywhere;
}

.status.good {
  background: #e6f6ed;
  color: #0a7558;
}

.status.warn {
  background: #fef3d6;
  color: #7d5a15;
}

.status.na {
  background: var(--surface);
  color: #a3a09a;
}

/* ── Evidence Packets ───────────────────────────────────────── */

.evidence-packets { margin-top: 18px; }
.evidence-packets .panel-head { grid-template-columns: 1fr; }
.claims { padding: 18px; }

.packet-group { display: grid; gap: 8px; }

.packet-group + .packet-group {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 18px;
}

.packet-group h4 {
  font-size: 13px;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}

.claim {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  transition: border-color 120ms ease;
}

.claim:hover {
  border-color: #c8c4bc;
}

.claim summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 12px 14px;
  transition: background 120ms ease;
}

.claim summary:hover { background: var(--surface); }

.claim summary strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.claim p {
  line-height: 1.5;
  margin: 0;
}

.claim-body {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.evidence-item {
  background: #111714;
  border-radius: 6px;
  color: #d8ede0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Executive Summary Section ───────────────────────────────── */

.exec-summary {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.exec-summary:empty { display: none; }

.exec-summary h2 {
  font-size: 28px;
  margin: 28px 0 10px;
}

.exec-summary h3 {
  font-size: 18px;
  margin: 24px 0 8px;
}

.exec-summary h4 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  margin: 18px 0 6px;
}

.exec-summary p {
  color: #4a4f57;
  line-height: 1.6;
  margin: 0 0 8px;
  max-width: 860px;
}

.exec-summary .summary-date {
  color: var(--muted);
  font-style: italic;
}

.exec-summary code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.88em;
  padding: 1px 5px;
}

.exec-summary ul {
  color: #4a4f57;
  line-height: 1.6;
  margin: 0 0 12px;
  max-width: 860px;
  padding-left: 20px;
}

.exec-summary li { margin-bottom: 4px; }

.exec-summary .table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.exec-summary table {
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 700px;
  width: 100%;
}

.exec-summary th {
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}

.exec-summary td {
  border: 1px solid var(--line);
  padding: 7px 10px;
  vertical-align: top;
}

.exec-summary tbody tr:hover {
  background: rgba(10, 117, 88, 0.03);
}

/* ── Animations ─────────────────────────────────────────────── */

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.workspace-head,
.studio,
.evidence-packets,
.overview-hero,
.method-diagram,
.method-notes,
.exec-summary {
  animation: fadeSlideIn 400ms ease both;
}

.overview-hero       { animation-delay:  40ms; }
.method-diagram      { animation-delay: 140ms; }
.method-notes        { animation-delay: 240ms; }
.exec-summary        { animation-delay: 340ms; }
.workspace-head      { animation-delay:  40ms; }
.studio              { animation-delay: 100ms; }
.evidence-packets    { animation-delay: 180ms; }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 1120px) {
  .app-shell,
  .workspace-head,
  .studio,
  .method-diagram,
  .method-notes {
    grid-template-columns: 1fr;
  }

  .method-arrow { transform: rotate(90deg); }

  .model-rail {
    height: auto;
    position: relative;
  }

  .model-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  pre,
  .code-pane { max-height: none; }
}

@media (max-width: 680px) {
  .model-rail,
  .model-workspace { padding: 16px; }

  h2 { font-size: 32px; }

  .snapshot,
  .panel-head,
  .claim summary { grid-template-columns: 1fr; }

  .case-tabs { justify-content: flex-start; }
  .view-tabs { align-items: start; }

  .tab-tools {
    justify-content: flex-start;
    visibility: visible !important;
  }

  .snapshot div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
