/* Shared chrome for the public site: warm paper/ink palette plus header, nav, card and grid styles. */

:root {
  --paper: #faf6ef;
  --ink: #2a2320;
  --muted: #6b5d4f;
  --muted-2: #8a7a68;
  --line: #e4d8c2;
  --line-strong: #d8c9ab;
  --accent-border: #a9957c;
  --card-bg: #fff;
  --tag-invented: #7a4a3a;
  --tag-invented-bg: #f3e3da;
  --accent: #7a2e2a;
}

* { box-sizing: border-box; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a { color: inherit; }

.site-header {
  border-bottom: 2px solid var(--line-strong);
  background: var(--paper);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.brand { text-decoration: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand-name { font-size: 1.5em; font-weight: bold; letter-spacing: 0.02em; }
.brand-tagline { color: var(--muted); font-style: italic; font-size: 0.95em; }

.primary-nav { display: flex; gap: 18px; font-size: 0.95em; }
.primary-nav a { text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { border-bottom-color: var(--accent-border); }

main { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }

.site-footer {
  border-top: 2px solid var(--line-strong);
  color: var(--muted-2);
  font-size: 0.9em;
  text-align: center;
  padding: 20px 16px 40px;
}
.site-footer a { text-decoration: underline; }

h1 { font-size: 1.8em; margin: 0 0 6px; }
h2 { border-bottom: 2px solid var(--line-strong); padding-bottom: 4px; }
.ref { color: var(--muted); font-style: italic; margin: 2px 0 18px; }
.muted { color: var(--muted-2); font-style: italic; }
code { background: var(--line); padding: 1px 4px; border-radius: 3px; font-size: 0.9em; }

/* Homepage: the latest strip, large, plus a recent-strips row beneath it. */
.hero-eyebrow { color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8em;
                margin: 0; }
.recent-row { margin-top: 44px; }
.strip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-top: 14px; }
.strip-card { text-decoration: none; display: block; border: 1px solid var(--line); border-radius: 6px;
              background: var(--card-bg); overflow: hidden; }
.strip-card:hover { border-color: var(--accent-border); }
.strip-card img { display: block; width: 100%; aspect-ratio: 3/1; object-fit: cover; }
.strip-card .strip-card-body { padding: 10px 12px; }
.strip-card .strip-card-title { font-weight: bold; display: block; }
.strip-card .strip-card-ref { color: var(--muted); font-style: italic; font-size: 0.85em; }

/* Strip detail page: eyebrow/controls/framed image/actions/transcript/story-card, ported from
   new_design/strip-detail-mockup.html (owner-approved direction). h1 is scoped to this page only
   (.strip-h1), not the shared h1 rule every other page also uses. */
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8em; margin: 0 0 8px; }
.strip-h1 { font-size: clamp(1.9em, 4.4vw, 2.8em); font-weight: normal; line-height: 1.1; margin: 0; }
.strip-ref { margin: 8px 0 0; font-size: 1.1em; }

.controls, .footnav { display: flex; align-items: center; gap: 8px; margin: 18px 0; }
.footnav .pos { flex: 1; text-align: center; color: var(--muted); }
.nav-btn { flex: none; min-width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none;
           border: 1px solid var(--accent-border); border-radius: 4px; background: var(--card-bg);
           font-weight: bold; font-size: 1.1em; }
.nav-btn:hover { background: var(--line); }
.nav-btn.disabled { color: #bbb; border-color: #ddd; background: #f5f5f5; pointer-events: none; }
.select-wrap { flex: 1; position: relative; min-width: 0; }
.select-wrap::after { content: '\25BE'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
                       color: var(--muted); pointer-events: none; }
.select { width: 100%; min-width: 0; height: 44px; padding: 0 40px 0 16px; border: 1px solid var(--accent-border);
          border-radius: 4px; background: var(--card-bg); color: var(--ink); font: inherit; appearance: none; }

.frame { background: var(--card-bg); border: 1px solid var(--line-strong); padding: 8px;
         box-shadow: 0 8px 24px rgba(42, 35, 32, 0.12); }
.frame img { display: block; width: 100%; height: auto; }
.strip-img { max-width: 100%; }
.scroll-stack { display: none; flex-direction: column; gap: 8px; }
.scroll-stack img { aspect-ratio: 3 / 2; object-fit: cover; }
.frame.scroll .strip-img { display: none; }
.frame.scroll .scroll-stack { display: flex; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
       border: 1px solid var(--accent-border); border-radius: 4px; background: var(--card-bg); color: var(--ink);
       font: inherit; font-weight: bold; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--line); }
.btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #5e221f; }
.btn.disabled { opacity: 0.5; pointer-events: none; }

.transcript { display: none; margin: 18px 0 0; padding: 4px 20px 16px; border: 1px solid var(--line);
              border-radius: 6px; background: var(--card-bg); }
.transcript.open { display: block; }
.transcript h3 { margin: 16px 0 6px; font-size: 1em; text-transform: uppercase; letter-spacing: 0.06em;
                 color: var(--muted-2); }
.dialogue { padding-left: 1.2em; margin: 6px 0; line-height: 1.55; }
.dialogue .note { color: var(--muted); font-style: italic; list-style: none; margin-left: -1.2em; }
.speaker { font-weight: bold; }

.section { border-top: 2px solid var(--line-strong); margin-top: 36px; padding-top: 24px; }
.section h2 { margin: 0 0 8px; font-size: 1.3em; border: 0; }
.section p { margin: 0; line-height: 1.6; max-width: 720px; }

.story-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px;
              margin-top: 36px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 6px;
              background: var(--card-bg); text-decoration: none; color: inherit; }
.story-card:hover { border-color: var(--accent-border); }
.story-card .t { font-weight: bold; display: block; }
.story-card .s { color: var(--muted); font-style: italic; font-size: 0.9em; }
.story-card .go { color: var(--accent); font-weight: bold; }

@media (max-width: 600px) {
  .controls .skip { display: none; }
  .btn { padding: 0 14px; }
}

/* Archive: season groupings. */
.season-block { margin-bottom: 40px; }
.season-title { margin-bottom: 2px; }
.season-desc { color: var(--muted); margin-top: 0 0 14px; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-row { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
               padding: 8px 0; border-bottom: 1px solid var(--line); }
.archive-row:hover { background: var(--line); }
.archive-thumb { height: 56px; width: 168px; object-fit: cover; border: 1px solid #ccc; flex-shrink: 0; }
.archive-num { color: var(--muted-2); }
.archive-row-ref { color: var(--muted); font-style: italic; }

/* Cast page: cards with a portrait (or a reserved empty slot, per brief decision 3, for anyone not
   rendered yet). Portrait art is a wide 3:2 source image; object-fit: cover crops it to the same
   circle the empty slot uses, so a card's layout never shifts once a portrait is added. */
.cast-filters { margin: 4px 0 20px; color: var(--muted); }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.cast-card { border: 1px solid var(--line); border-radius: 6px; background: var(--card-bg); padding: 14px 16px;
             display: flex; gap: 12px; }
.cast-portrait-slot, .cast-portrait { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.cast-portrait-slot { background: var(--line); display: flex; align-items: center; justify-content: center;
                      color: var(--muted-2); font-size: 0.75em; text-align: center; }
.cast-portrait { object-fit: cover; }
.cast-name { font-weight: bold; margin: 0; }
.invented-tag { display: inline-block; font-size: 0.7em; font-weight: bold; color: var(--tag-invented);
                background: var(--tag-invented-bg); border-radius: 3px; padding: 1px 6px; margin-left: 6px;
                vertical-align: middle; text-transform: uppercase; letter-spacing: 0.03em; }
.cast-desc { margin: 4px 0 0; font-size: 0.95em; }

/* About page: plain prose, narrower measure for readability. */
.prose { max-width: 720px; }
.prose p { line-height: 1.6; }
.prose h2 { margin-top: 36px; }

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
}
