/* ============================================
   Sean Makes Stuff - Global Styles
   ============================================ */

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-accent: #007aff;
  --color-accent-hover: #0056cc;
  --color-border: #e5e5e7;
  --color-badge-ios: #007aff;
  --color-badge-macos: #34c759;
  --color-badge-chrome: #fbbc04;
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 960px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main {
  flex: 1;
}

/* ============================================
   Navigation
   ============================================ */

.site-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__brand {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__brand:hover {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.site-nav__links a {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s;
}

.site-nav__links a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__pdf {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.site-nav__pdf:hover {
  color: var(--color-text);
  border-color: var(--color-text);
  background: rgba(0, 0, 0, 0.02);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero__image {
  max-width: 560px;
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.hero__title {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ============================================
   Section
   ============================================ */

.section {
  padding: 60px 0;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  text-align: center;
}

/* ============================================
   Project Cards
   ============================================ */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.project-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--color-border);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  overflow: hidden;
}

.project-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.project-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--ios {
  background: rgba(0, 122, 255, 0.1);
  color: var(--color-badge-ios);
}

.badge--macos {
  background: rgba(52, 199, 89, 0.1);
  color: var(--color-badge-macos);
}

.badge--chrome {
  background: rgba(251, 188, 4, 0.15);
  color: #9a7400;
}

.badge--gpt {
  background: rgba(16, 163, 127, 0.1);
  color: #0d8c6d;
}

.badge--ai {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.project-card__top-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-card__samples {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}

.project-card__samples img {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  border-radius: 6px;
  display: block;
  object-fit: cover;
}

.project-card__samples > * {
  min-width: 0;
}

.project-card__link {
  font-size: 0.9375rem;
  font-weight: 500;
}

.project-card--coming-soon {
  opacity: 0.55;
  pointer-events: none;
}

.project-card--coming-soon .project-card__icon {
  background: var(--color-border);
}

/* ============================================
   Rockstar (Tip Jar)
   ============================================ */

.rockstar {
  text-align: center;
  padding: 60px 0;
}

.rockstar__tagline {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.rockstar__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.rockstar__buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.rockstar__art-img {
  width: 160px;
  height: auto;
  border-radius: var(--radius);
}

.rockstar__qr-img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
}

.rockstar__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-text);
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.rockstar__btn:hover {
  background: #333;
  color: #fff;
  text-decoration: none;
  transform: scale(1.03);
}

.rockstar__btn--deal {
  background: var(--color-accent);
}

.rockstar__btn--deal:hover {
  background: var(--color-accent-hover);
}

/* ============================================
   Project Detail Page
   ============================================ */

.project-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.project-hero__icon {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  background: var(--color-border);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.project-hero__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
}

.project-hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-hero__tagline {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
}

.project-description {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  text-align: center;
  padding-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-item__icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.feature-item__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-item__desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px 0;
}

.gallery__item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshots {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px 0;
}

.screenshot-placeholder {
  width: 200px;
  height: 430px;
  border-radius: var(--radius);
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  text-align: center;
  padding: 16px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 40px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: scale(1.03);
}

.btn--primary {
  background: var(--color-text);
  color: #fff;
}

.btn--primary:hover {
  background: #333;
  color: #fff;
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

/* ============================================
   Support Page
   ============================================ */

.support-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--color-border);
  border-radius: 100px;
  padding: 3px;
  display: inline-flex;
  margin-left: auto;
  margin-right: auto;
}

.support-tabs-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.support-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: none;
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-stack);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: background 0.2s, color 0.2s;
}

.support-tab:hover {
  color: var(--color-text);
}

.support-tab.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.support-tab__icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
}

.support-tab__label {
  white-space: nowrap;
}

.support-panel {
  display: none;
}

.support-panel.active {
  display: block;
}

.support-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.faq {
  max-width: 640px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__question {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-stack);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.faq__question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  transition: transform 0.2s;
}

.faq__item.active .faq__question::after {
  content: "\2212";
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq__answer__inner {
  padding: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.faq__item.active .faq__answer {
  max-height: 300px;
}

/* ============================================
   Privacy / Legal Page
   ============================================ */

.legal {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.legal h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.legal p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal ul {
  margin: 8px 0 16px 24px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer__copy {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.site-footer__links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.site-footer__links a {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.site-footer__links a:hover {
  color: var(--color-text);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1.0625rem;
  }

  .section__title {
    font-size: 1.5rem;
  }

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

  .site-nav__links {
    gap: 16px;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }

  .screenshots {
    flex-direction: column;
    align-items: center;
  }

  .screenshot-placeholder {
    width: 100%;
    max-width: 240px;
  }
}

/* ============================================
   Sign-off (signature + tip jar)
   ============================================ */

.signoff {
  padding: 36px 0 44px;
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
}

.signoff__inner {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  text-align: center;
}

.signoff__sig img {
  display: block;
  height: 96px;
  width: auto;
  opacity: 0.9;
}

.signoff__copy {
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}

.signoff__copy a {
  color: var(--color-accent);
  font-weight: 500;
}

.signoff__jar {
  display: inline-block;
  line-height: 0;
}

.signoff__jar img {
  display: block;
  height: 200px;
  width: auto;
}

@media (max-width: 600px) {
  .signoff__inner { gap: 20px; }
  .signoff__sig img { height: 72px; }
  .signoff__jar img { height: 160px; }
}

/* ============================================
   Print (Save as PDF)
   ============================================ */

@media print {
  @page { margin: 0.5in; }

  html, body {
    background: #fff !important;
    color: #000;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .site-nav,
  .site-footer {
    display: none !important;
  }

  a { color: inherit; text-decoration: none; }
  img { max-width: 100% !important; height: auto !important; }

  /* ── Cap card-image heights so card + body has a fighting chance
        of fitting on a single page. ── */
  .feature__art img,
  .disaster__art img,
  .standout__art img,
  .report-hero__art img {
    max-height: 3.5in !important;
    object-fit: contain !important;
  }

  /* ── Stack grid layouts as single columns in print so cards never
        get torn apart by grid auto-flow at the page boundary. ── */
  .standouts,
  .verdict {
    display: block !important;
  }
  .standouts > *,
  .verdict > * {
    margin: 0 auto 18px !important;
    max-width: 740px !important;
  }

  /* ── Keep image stuck to whatever follows it (kicker/title/body). ── */
  .feature__art,
  .disaster__art,
  .standout__art {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* ── Headings stay with their following content, never split mid-line. ── */
  h1, h2, h3, h4,
  .section-h,
  .feature__title, .disaster__title, .standout__title,
  .section-h__title, .section-h__kicker, .section-h__dek,
  .verdict-card__title, .verdict-card__head {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    orphans: 3;
    widows: 3;
  }

  /* ── Body text: no 1-2 word widows/orphans across pages. ── */
  p, li {
    orphans: 3;
    widows: 3;
  }

  /* ── Cards that fit on a page (or are small enough to lay flat)
        must not split. Tall cards (feature, disaster) intentionally
        omitted — forcing avoid on them just makes things worse. ── */
  .quotes,
  .prompt-card,
  .verdict-card,
  .standout,
  .aside-stat,
  .leak-row,
  .matrix-key,
  figure {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ── Tables: header repeats on every page, never split a row. ── */
  table {
    page-break-inside: auto;
    break-inside: auto;
  }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ── Sign-off on its own page (clean branded close). ── */
  .signoff {
    page-break-before: always;
    break-before: page;
    page-break-inside: avoid;
    break-inside: avoid;
    border-top: 1px solid #ccc;
  }
  .signoff__sig img { height: 110px !important; }
  .signoff__jar img { height: 220px !important; }
  .signoff__copy { color: #333 !important; }
}

/* ============================================
   Scriptorium-specific components
   ============================================ */

:root {
  --paper: #f7f1e3;
  --paper-border: #e8dec5;
  --ink: #2a2620;
  --ink-soft: #6b5f4a;
  --accent-rust: #b85c38;
  --accent-moss: #6e7f3d;
  --accent-indigo: #3a4c6b;
  --accent-gold: #c9a44a;
}

/* Parchment-card baseline for any quoted, lifted, or hand-pulled content */
.parchment {
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  padding: 20px 24px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
}

/* Named-element pill — used everywhere a named subplot / event / factor / motif is referenced */
.named {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 0.92rem;
  font-style: italic;
  margin: 2px 4px 2px 0;
}
.named--arc      { background: #efe2c9; border-color: #d8c79b; }
.named--subplot  { background: #e5e7d6; border-color: #c1c8a1; }
.named--event    { background: #f1d9cc; border-color: #d9a98c; }
.named--factor   { background: #d8e0e8; border-color: #aebcc9; }
.named--character{ background: #f0e2e7; border-color: #d3a8b3; }
.named--style    { background: #ebe1d0; border-color: #c4b489; }

/* Project landing — story cards on the root index */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.story-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.story-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.story-card__art {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f3ede0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.story-card__art img { width: 100%; height: 100%; object-fit: contain; }
.story-card__body { padding: 18px 20px; }
.story-card__kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.story-card__title {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.45rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.story-card__desc { color: var(--color-text-secondary); font-size: 0.95rem; line-height: 1.5; }
.story-card__meta {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Arc card — used in <slug>/arcs/index.html */
.arc-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.arc-card__head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.arc-card__name {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.65rem;
  color: var(--ink);
}
.arc-card__shape {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.arc-card__score {
  font-size: 0.85rem;
  background: var(--accent-gold);
  color: #2a2620;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 600;
}
.arc-card__pitch {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 16px;
}
.arc-card__elements { margin-top: 14px; }
.arc-card__elements h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 12px;
  margin-bottom: 6px;
}

/* Gantt chart — horizontal bars per arc row, x axis = chapter numbers */
.gantt {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 12px;
  align-items: center;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  margin: 16px 0;
}
.gantt__label {
  font-size: 0.95rem;
  color: var(--ink);
  text-align: right;
  padding-right: 4px;
}
.gantt__track {
  position: relative;
  height: 22px;
  background: rgba(0,0,0,0.03);
  border-radius: 11px;
}
.gantt__bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #fff;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
}
.gantt__bar--main    { background: var(--accent-rust); }
.gantt__bar--subplot { background: var(--accent-moss); }
.gantt__bar--char    { background: var(--accent-indigo); }
.gantt__marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: var(--accent-gold);
  border-radius: 1px;
}
.gantt__axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding: 4px 0 0;
}

/* Style swatch grid — used in <slug>/styles/index.html */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.style-swatch {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.style-swatch__images { display: grid; grid-template-columns: 1fr 1fr; }
.style-swatch__images img { width: 100%; height: 180px; object-fit: contain; background: #f3ede0; }
.style-swatch__body { padding: 16px 18px; }
.style-swatch__name {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.style-swatch__provider {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.style-swatch__desc { font-size: 0.9rem; color: var(--color-text-secondary); }
.style-swatch--chosen { outline: 3px solid var(--accent-gold); }

/* Storyboard grid — cover thumbnails for arc candidates */
.storyboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.storyboard-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}
.storyboard-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f3ede0;
}
.storyboard-card__name {
  padding: 12px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink);
}

/* Character / locale card grid */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.cast-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cast-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #f3ede0;
}
.cast-card__body { padding: 14px 16px; }
.cast-card__name {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.cast-card__role {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.cast-card__one_line { font-size: 0.92rem; color: var(--color-text-secondary); }

/* Final novel.html chapter section */
.chapter-section {
  margin: 64px 0;
  padding-top: 24px;
  border-top: 1px solid var(--paper-border);
}
.chapter-section__kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.chapter-section__title {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 2.1rem;
  color: var(--ink);
  margin-bottom: 24px;
}
.chapter-section__art {
  width: 100%;
  margin: 16px 0 28px;
  background: #f3ede0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}
.chapter-section__art img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}
.chapter-section__body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--ink);
}
.chapter-section__body p { margin-bottom: 1em; }
