/* =========================================================================
   IDEAS CREATOR — Direction C: Workshop Notebook
   Soft warm canvas. Shadows do the structural work. 12-14px radii everywhere.
   Source Serif Italic for thought-moments only (description, empty states,
   placeholders). Inter for everything else. Mono only for status + IDs.
   ========================================================================= */

:root {
  /* Surfaces */
  --canvas:        #F8F5F0;
  --canvas-deep:   #F1ECE3;
  --surface:       #FFFFFF;
  --surface-tint:  #FDFBF7;

  /* Ink */
  --ink:           #1F1B16;
  --ink-soft:      #5E564C;
  --ink-muted:     #7A7269;
  --ink-faint:     #B5ADA3;
  --ink-ghost:     #D6D0C6;

  /* Accent — warm cinnamon. Used 1-2x per page max. */
  --accent:        #C97A4F;
  --accent-deep:   #A85E3B;
  --accent-soft:   #F4E2D5;
  --accent-tint:   #FBF1E8;

  /* State accents — kept very muted */
  --good:          #5C7A4A;
  --good-soft:     #E8EFE1;
  --warn:          #B27A00;
  --warn-soft:     #F6ECD4;
  --err:           #9B4B3F;
  --err-soft:      #F2DED9;

  /* Type */
  --display: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif:   'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* Shadows (the structural device) */
  --shadow-soft:   0 1px 2px rgba(31, 27, 22, 0.04), 0 4px 12px rgba(31, 27, 22, 0.05);
  --shadow-lift:   0 2px 4px rgba(31, 27, 22, 0.05), 0 10px 24px rgba(31, 27, 22, 0.08);
  --shadow-press:  0 1px 1px rgba(31, 27, 22, 0.04), 0 2px 4px rgba(31, 27, 22, 0.04);
  --shadow-accent: 0 1px 2px rgba(201, 122, 79, 0.10), 0 6px 18px rgba(201, 122, 79, 0.14);

  /* Geometry */
  --rail-w: 256px;
  --top-h:  56px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 20px; line-height: 1.25; font-weight: 600; }
h3 { font-size: 12px; line-height: 1.3; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
h4 { font-size: 11px; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

p { margin: 0; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent-deep); }

code, .mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; }

/* Source Serif Italic — used ONLY for "thought" moments (description, empty, placeholder) */
.thought,
.empty-thought {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  color: var(--ink);
  border: none;
  padding: 9px 16px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.18s ease, transform 0.06s ease, background 0.18s;
}
.btn:hover:not(:disabled) { box-shadow: var(--shadow-lift); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: var(--shadow-press); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* The primary CTA — the one accent moment per view */
.btn-fire,
.btn-tape {
  background: var(--accent);
  color: #FFF8F1;
  box-shadow: var(--shadow-accent);
}
.btn-fire:hover:not(:disabled),
.btn-tape:hover:not(:disabled) {
  background: var(--accent-deep);
  box-shadow: 0 2px 4px rgba(201, 122, 79, 0.14), 0 12px 28px rgba(201, 122, 79, 0.20);
}

.btn-quiet {
  background: transparent;
  color: var(--ink-muted);
  box-shadow: none;
}
.btn-quiet:hover:not(:disabled) {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: transparent;
  color: var(--ink-muted);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-icon:hover { background: var(--canvas-deep); color: var(--ink); }

/* ===== Shell =====
   The `.shell` rules formerly here moved into `surface_shell.css` (Phase 6
   of the surface-architecture migration — spec §4.4 + §7 Phase 6). The
   `<div class="shell">` wrapper is now `<surface-shell>` in concepts.html.
   The responsive @media collapse for narrow viewports also moved into
   surface_shell.css. */


/* ===== Main column ===== */
.main {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow-y: auto;
  display: flex; flex-direction: column;
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  height: var(--top-h);
  flex-shrink: 0;
  background: transparent;
  position: sticky; top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.top-left { display: flex; align-items: center; gap: 12px; }
.top-right { display: flex; align-items: center; gap: 10px; }

.crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}
.crumb b { color: var(--ink); font-weight: 600; }
.crumb .sep { color: var(--ink-faint); margin: 0 2px; }
.crumb .pill-project {
  display: inline-flex; align-items: center;
  background: var(--canvas-deep);
  color: var(--ink-soft);
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--radius-pill);
}
.crumb-tail { display: inline-flex; align-items: center; gap: 8px; }
.crumb-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}
.crumb-link:hover {
  color: var(--accent-deep);
  background: rgba(201, 122, 79, 0.06);
}

.who {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* main body — tighter side gutters so the storyboard can breathe */
.body {
  padding: 20px 22px 60px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

/* ===== Concept detail view ===== */
.concept-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.concept-title-row h1 { flex: 1; }

/* Status pill — sits inline-ish with title. Single accent moment. */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--canvas-deep);
  color: var(--ink-muted);
  white-space: nowrap;
}
.status-pill.done {
  background: var(--good-soft);
  color: var(--good);
}
.status-pill.err {
  background: var(--err-soft);
  color: var(--err);
}
.status-pill.live {
  background: var(--accent-soft);
  color: var(--accent-deep);
  animation: breath 4s ease-in-out infinite;
}

/* THE SIGNATURE — ambient breath on the live status */
@keyframes breath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 122, 79, 0.18), 0 1px 2px rgba(201, 122, 79, 0.10); }
  50%      { box-shadow: 0 0 0 6px rgba(201, 122, 79, 0.00), 0 4px 14px rgba(201, 122, 79, 0.22); }
}

/* concept description — Source Serif Italic */
.concept-desc {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 10px;
  max-width: 760px;
}

/* ===== Section heading ===== */
.section {
  margin-top: 36px;
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.section-head .section-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* ===== Slot strip — rounded cards on canvas, shadow stack ===== */
.slot-strip {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
}
@media (max-width: 1300px) {
  .slot-strip { grid-template-columns: repeat(5, 1fr); }
}

.slot {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  position: relative;
}
.slot:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.slot-thumb {
  background: var(--canvas-deep);
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
}
.slot-thumb img,
.slot-thumb video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.slot-num {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}
.slot-swap {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-muted);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
}
.slot-swap:hover { color: var(--accent-deep); background: #fff; }
.slot-caption {
  padding: 10px 12px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
  min-height: 52px;
}

/* ===== Meta pills (replaces the old meta-table) ===== */
.meta-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 22px;
}
.meta-pill {
  background: var(--canvas);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: inline-flex; flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.meta-pill .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.meta-pill .value {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.meta-pill .value.mono { font-family: var(--mono); font-size: 12px; font-weight: 400; }

/* ===== Take it further — secondary action row ===== */
.take-further {
  margin-top: 28px;
  padding: 18px 0 0;
  border-top: 1px solid var(--ink-ghost);
}
.take-further h3 { margin-bottom: 12px; }
.take-further .row {
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* ===== Empty state ===== */
.empty {
  padding: 80px 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.empty .empty-icon {
  font-size: 32px;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.empty .empty-thought {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.empty .empty-sub {
  color: var(--ink-muted);
  font-size: 13px;
  margin-bottom: 22px;
}

/* ===== Forms (new + brainstorm) ===== */
.field {
  display: block;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

textarea,
input[type="text"]:not(.rail input),
input[type="number"],
select:not(.rail select) {
  width: 100%;
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  background: var(--canvas);
  border: none;
  border-radius: var(--radius);
  padding: 12px 14px;
  outline: none;
  box-shadow: var(--shadow-press);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  background: var(--surface);
  box-shadow: var(--shadow-soft), 0 0 0 3px var(--accent-soft);
}
textarea {
  min-height: 140px;
  line-height: 1.6;
  resize: vertical;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
}
textarea::placeholder {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
}

.field-row {
  display: flex; gap: 12px; align-items: flex-end;
}
.field-row .field { flex: 1; margin-bottom: 0; }

/* ===== Brainstorm angle cards ===== */
.angle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.angle-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  position: relative;
}
.angle-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}
.angle-card.selected {
  box-shadow: var(--shadow-soft), 0 0 0 2px var(--accent);
  background: var(--accent-tint);
}
.angle-card .title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.angle-card .desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ===== Sign-in landing ===== */
.signin {
  min-height: 100vh;
  background: var(--canvas);
  display: flex; flex-direction: column;
}
.signin .top {
  background: transparent;
  position: static;
  backdrop-filter: none;
  padding: 16px 28px;
  height: auto;
  border-radius: 0;
}
.signin-body {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.signin-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 44px 40px;
  max-width: 440px;
  width: 100%;
}
.signin-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.signin-h {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.signin-sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.5;
}
.signin-sub .ghost { color: var(--ink-faint); font-style: italic; }

/* ===== Utility ===== */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.w-full { width: 100%; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.faint { color: var(--ink-faint); }
.muted { color: var(--ink-muted); }
.ghost { color: var(--ink-faint); }

.tag {
  display: inline-flex; align-items: center;
  background: var(--canvas-deep);
  color: var(--ink-soft);
  padding: 3px 10px;
  font-size: 11px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.divider {
  height: 1px;
  background: var(--ink-ghost);
  margin: 18px 0;
}

/* ============== Real-markup classes (concept detail / new / brainstorm) ============== */

/* The concept detail card-wrapper */
.frame {
  /* not a card visually — main is already the card; frame is just spacing */
  display: flex; flex-direction: column;
  gap: 22px;
}

.title-block { display: flex; flex-direction: column; gap: 8px; }
.title-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
}
.title-meta .rec {
  background: var(--canvas-deep);
  color: var(--ink-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
}
.title-block h1 { font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }

/* Concept description — Source Serif Italic, the writerly thought moment */
.desc {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 2px 0 0;
}

/* Status pill (mark-pill on detail) — accent breath ONLY when live */
.mark-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 11px;
  background: var(--canvas-deep);
  color: var(--ink-muted);
  font-weight: 500;
  white-space: nowrap;
}
.mark-pill.good { background: var(--good-soft); color: var(--good); }
.mark-pill.err  { background: var(--err-soft);  color: var(--err); }
.mark-pill.live {
  background: var(--accent-soft);
  color: var(--accent-deep);
  animation: breath 3.6s ease-in-out infinite;
}
.mark-pill.ghost { background: transparent; color: var(--ink-faint); }

/* THE SIGNATURE — ambient breath on the live pill.
   Single definition lives above (near .status-pill.live, ~:275). Both
   .status-pill.live and .mark-pill.live reference it by name. The louder
   duplicate that previously sat here (0.20 spread / 7px / 18px shadow) was
   removed so the calmer intended pulse drives both pills. */

/* Section heading */
.section { margin-top: 6px; }
.section-rule {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.section-rule h3 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.section-rule .aside {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

/* Slot strip (.strip / .cell) */
.strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}
.strip.compact { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-width: 720px; }
@media (max-width: 1300px) {
  .strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.cell {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}
.cell:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.cell.live {
  box-shadow: var(--shadow-soft), 0 0 0 1.5px var(--accent-soft);
}
.cell-frame {
  position: relative;
  background: var(--canvas-deep);
  aspect-ratio: 9 / 16;
  overflow: hidden;
}
.cell-frame img,
.cell-frame video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.cell-num {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  letter-spacing: 0;
}
.swap {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-muted);
  width: 24px; height: 24px;
  border: none;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--body);
  transition: color 0.15s, background 0.15s;
}
.swap:hover:not(:disabled) { color: var(--accent-deep); background: #fff; }
.swap:disabled { opacity: 0.35; cursor: not-allowed; }
.cell-cap {
  padding: 10px 12px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
  /* Uniform vertical size across all storyboard cells: hard height + clamp. */
  height: 64px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

/* Meta strip (.meta-strip / .meta-cell) — soft pill row, not tabular */
.meta-strip {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.meta-cell {
  background: var(--canvas);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 110px;
}
.meta-cell .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.meta-cell .val {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

/* Live status leader (top of main when running). Spec A4: NOT brown/cinnamon.
   Plain shiny white surface with the Claude orange used sparingly as a left
   accent rule. Dark ink keeps AA contrast on the white background. */
.leader {
  background: var(--surface);
  color: var(--ink);
  padding: 11px 24px;
  font-family: var(--mono);
  font-size: 12px;
  display: flex; align-items: center; gap: 12px;
  position: relative;
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-soft);
}
.leader b { color: var(--ink); font-weight: 600; letter-spacing: 0.02em; }
.leader .faint { color: var(--ink-muted); }
.leader .leader-elapsed {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--canvas-deep);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}

/* Empty state */
.empty {
  padding: 60px 24px 80px;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}
.empty h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin: 6px 0 10px;
  letter-spacing: 0;
}
.empty p { color: var(--ink-muted); font-size: 14px; margin-bottom: 18px; }

/* signin eyebrow used as section eyebrow on /new and /brainstorm too */
.signin-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* /new — modes button group */
.modes { display: inline-flex; gap: 4px; background: var(--canvas); padding: 4px; border-radius: var(--radius); }
.modes button {
  background: transparent;
  border: none;
  padding: 7px 14px;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.modes button:hover { color: var(--ink); }
.modes button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.field-lbl {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

/* /new — tape (live feed) */
.tape {
  background: var(--canvas);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.row-t { display: flex; align-items: baseline; gap: 12px; }
.row-t .t { color: var(--ink-faint); min-width: 36px; font-size: 11px; }

/* /brainstorm — angles wall */
.angles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.angle {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
  position: relative;
}
.angle:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}
.angle.picked {
  background: var(--accent-tint);
  box-shadow: var(--shadow-soft), 0 0 0 2px var(--accent);
}
.ang-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.ang-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.ang-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* User avatar dot in top-right */
.who-mark {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFF8F1;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
}
.who span:not(.who-mark) {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Utility — gaps + alignment helpers */
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.between { justify-content: space-between; }
.items-baseline { align-items: baseline; }
.items-center { align-items: center; }
.justify-end { justify-content: flex-end; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }

/* ===== Storyboard section — outlined box, full-width, adaptive sizing ===== */
.storyboard-section {
  background: var(--canvas);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-top: 4px;
  box-shadow: inset 0 0 0 1px var(--ink-ghost);
}
.storyboard-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.storyboard-header h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.storyboard-header .aside {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}
/* Strip layout: flex row with consistent gap. Each cell stays at its natural
   max-width (so 5 slots don't stretch to fill the page) and shrinks only when
   the row would overflow. Per Martin's spec: consistent ~50px gap (we use
   the existing --gap-2 scale), thumbs cap at their max size, smaller-when-many.
   Flex with min-width:0 + flex-basis lets the cells shrink proportionally. */
/* Phase 2 migration: `.storyboard-strip` rules DELETED. The Detail-page
   slot strip is now <slot-grid data-mode="detail">; sizing + flex rules
   live in slot_grid.css. Per spec §7 Phase 2. */

/* ===== Detail grid below storyboard — 2 columns: concept (left, wide) + info/actions (right) ===== */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.detail-grid.detail-grid-single {
  /* Single-column variant - used now that the giant italic description blob is gone */
  grid-template-columns: minmax(280px, 480px);
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid.detail-grid-single { grid-template-columns: 1fr; }
}

/* Per-page breadcrumb chrome lives in surface_header.css (Phase 5). The
   historic .detail-breadcrumb / .detail-bc-* rules are dropped. */

.detail-left, .detail-right {
  display: flex; flex-direction: column;
  gap: 14px;
}

/* Concept description in the bottom-left slot.
   Clean prose, not the giant italic monolith the previous version had.
   Smaller serif, readable paragraph width, soft warm card behind it. */
.concept-desc-box {
  background: var(--canvas);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: inset 0 0 0 1px var(--ink-ghost);
  display: flex; flex-direction: column;
  gap: 10px;
}
.concept-desc-box .panel-h { margin-bottom: 2px; }
/* HIGH #4 — Custom Instructions box on Detail. The <textarea> inside inherits
   the global field treatment (styles.css form rules); only layout lives here. */
.concept-ci-box { margin-top: 14px; }
.concept-ci-box .panel-h { margin-bottom: 8px; }
.concept-ci-box textarea { min-height: 96px; }
.ci-hint { margin-top: 6px; font-size: 10.5px; color: var(--ink-faint); }
.concept-desc-body {
  font-family: var(--display);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 64ch;
  margin: 0;
}
.concept-desc-body p {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
}
.concept-desc-body p:last-child { margin-bottom: 0; }
.concept-desc-body h1, .concept-desc-body h2, .concept-desc-body h3, .concept-desc-body h4 {
  font-family: var(--display);
  font-style: normal;
  margin: 14px 0 6px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.concept-desc-body h1 { font-size: 18px; font-weight: 600; }
.concept-desc-body h2 { font-size: 16px; font-weight: 600; }
.concept-desc-body h3 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.concept-desc-body h4 { font-size: 13px; font-weight: 600; }
.concept-desc-body h1:first-child, .concept-desc-body h2:first-child,
.concept-desc-body h3:first-child, .concept-desc-body h4:first-child { margin-top: 0; }
.concept-desc-body ul {
  margin: 6px 0 12px;
  padding-left: 18px;
  list-style: none;
}
.concept-desc-body ul li {
  position: relative;
  padding: 2px 0 2px 4px;
  font-family: var(--display);
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}
.concept-desc-body ul li::before {
  content: '';
  position: absolute;
  left: -10px; top: 13px;
  width: 4px; height: 4px;
  background: var(--accent-deep);
  border-radius: 50%;
}
.concept-desc-body strong {
  font-weight: 600;
  color: var(--ink);
}
.concept-desc-body em {
  font-style: italic;
  color: var(--ink-soft);
}
.concept-desc-body code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--canvas-deep);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--accent-deep);
}
.concept-desc-empty { opacity: 0.7; }

.panel-h {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.info-box {
  background: var(--canvas);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 0 1px var(--ink-ghost);
}
.info-box .panel-h { margin-bottom: 6px; }
.info-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}
.info-row .lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.info-row .val {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}
.info-row .val.mono { font-family: var(--mono); font-size: 12px; font-weight: 400; }
/* D1 — editable single-selects sitting in the Quick info rows. The global
   `select` rule makes them full-width with big padding; inside an .info-row
   that breaks the label/value layout. Constrain to the right-hand value slot:
   compact, right-aligned, max ~60% so the .lbl keeps its column. */
.info-row .val.info-select {
  width: auto;
  max-width: 60%;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 8px;
  text-align: right;
  cursor: pointer;
}

/* Action buttons stacked inside the actions info-box */
.info-action {
  display: flex; justify-content: center;
  width: 100%;
  margin-top: 2px;
}

/* ===== Summary view (group click) — stack of concept rows ===== */
.summary-frame {
  display: flex; flex-direction: column;
  gap: 22px;
}
.summary-header {
  display: flex; flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}
.summary-header h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Phase 3 migration: `.summary-concept`, `.summary-concept-head`,
   `.summary-concept-title` rules DELETED — Summary page per-concept row is
   now <concept-card data-mode="summary">, owned by concept_card.css. Spec
   §7 Phase 3. The cream chrome + cinnamon left rule, the head flex layout,
   and the clickable-title hover treatment all moved verbatim to the
   primitive's own file. */

/* Phase 2 migration: `.summary-strip .cell` rules DELETED — Summary
   page slot strip is now <slot-grid data-mode="summary">. Spec §7 Phase 2. */

/* Hover-scrub bar — scoped under .cell-frame (legacy Detail-page non-slot-tile
   contexts: candidate cells in the swap modal, etc). The canonical hover-scrub
   rules for <slot-tile> live in slot_tile.css. canvas.css owns a separate
   scoped copy for `.cv-slot-thumb` / `.cv-video-thumb` mini-thumb previews.
   Per surface_architecture.md §5.1: no unscoped .hover-scrub* selectors. */
.cell-frame .hover-scrub {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28px;
  background: transparent;
  z-index: 3;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.cell-frame .hover-scrub::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: rgba(255, 255, 255, 0.72);
  transition: height 0.12s ease, background 0.12s ease;
  pointer-events: none;
}
.cell-frame:hover .hover-scrub { opacity: 1; }
.cell-frame .hover-scrub:hover::before,
.cell-frame .hover-scrub.is-active::before {
  height: 13px;
  background: rgba(255, 255, 255, 0.92);
}
.cell-frame .hover-scrub.is-active { opacity: 1 !important; }
.cell-frame .hover-scrub-fill {
  position: absolute;
  left: 0; bottom: 0;
  height: 8px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #D33B2C;
  transition: height 0.12s ease;
  pointer-events: none;
  will-change: transform;
}
.cell-frame .hover-scrub:hover .hover-scrub-fill,
.cell-frame .hover-scrub.is-active .hover-scrub-fill {
  height: 13px;
}
.cell-frame .hover-scrub-knob {
  position: absolute;
  bottom: 6.5px;
  left: 0;
  transform: translate(-50%, 50%);
  width: 20px; height: 20px;
  background: #D33B2C;
  border: 2.5px solid #FFF;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.12s, transform 0.12s, bottom 0.12s;
  pointer-events: none;
}
.cell-frame .hover-scrub:hover .hover-scrub-knob,
.cell-frame .hover-scrub.is-active .hover-scrub-knob {
  opacity: 1;
  pointer-events: auto;
  bottom: 4.5px;
}
.cell-frame .hover-scrub-knob:hover { transform: translate(-50%, 50%) scale(1.2); }

/* Editable caption (inline-edit pattern with autosave-look choreography).
   Default: ordinary cell-cap. Hover: faint cinnamon underline. Focused: cinnamon ring.
   Saving: faint pulsing tag. Saved: green tick fades in then out. */
.cell-cap.editable {
  cursor: text;
  border-radius: 4px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  outline: none;
}
.cell-cap.editable:hover { background: rgba(201, 122, 79, 0.06); }
.cell-cap.editable.is-editing {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--accent);
  color: var(--ink);
}
.cell-cap.editable.is-saving::after,
.cell-cap.editable.is-saved::after {
  content: attr(data-status);
  position: absolute;
  top: 4px; right: 6px;
  font-size: 9.5px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
}
.cell-cap.editable.is-saving::after {
  content: 'saving…';
  background: rgba(201, 122, 79, 0.18);
  color: var(--accent-deep);
}
.cell-cap.editable.is-saved::after {
  content: '✓ saved';
  background: rgba(76, 145, 80, 0.16);
  color: #3F7A43;
  animation: cap-saved-fade 1.4s ease forwards;
}
.cell-cap.editable.is-error::after {
  content: '⚠ save failed';
  position: absolute;
  top: 4px; right: 6px;
  font-size: 9.5px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(192, 57, 43, 0.18);
  color: #A33;
  pointer-events: none;
}
@keyframes cap-saved-fade {
  0% { opacity: 0; transform: translateY(-2px); }
  15% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 1400px) {
  .summary-strip .cell { max-width: 170px; }
}
@media (max-width: 1100px) {
  .summary-strip { grid-template-columns: repeat(var(--slot-count, 5), minmax(0, 1fr)); }
  .summary-strip .cell { max-width: none; }
}

/* Hide kbd shortcut on small viewports.
   The .shell + .rail collapse rules moved into surface_shell.css under
   the surface-shell:not(.surface-shell--canvas) @media block. We keep
   .main { border-radius: 0 } here because .main is still owned by
   styles.css (it's not a primitive — it's the inner container that
   surface-shell's content slot wraps). */
@media (max-width: 900px) {
  .main { border-radius: 0; }
}
