
:root {
  --shell: #0d0e0c;
  --shell-soft: #181a16;
  --brand: #ffd400;
  --paper: #f2f3f1;
  --surface: #ffffff;
  --surface-soft: #f7f8f6;
  --ink: #171916;
  --muted: #5e645d;
  --line: #d3d7d0;
  --accent: #8a6800;
  --accent-soft: #fff5bf;
  --focus: #005fcc;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.45; }
body.view-cast { --accent: #2f6f4d; --accent-soft: #e5f3eb; }
body.view-locations { --accent: #2c628f; --accent-soft: #e5eff8; }
body.view-props { --accent: #8a4528; --accent-soft: #f8e9e1; }
body.view-vehicles { --accent: #486776; --accent-soft: #e7eff3; }
body.view-print { --accent: #4f554f; --accent-soft: #eceeeb; }

a { color: var(--accent); }
button, input, select { font: inherit; }
button, select, input, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; left: 12px; top: 8px; z-index: 30; min-height: 44px; padding: 10px 14px; background: #fff; color: #000; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 20; background: var(--shell); color: #fff; border-bottom: 3px solid var(--brand); padding-top: env(safe-area-inset-top, 0); }
.header-row { max-width: 1380px; margin: 0 auto; min-height: 64px; padding: 10px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-link { display: inline-flex; align-items: baseline; gap: 8px; color: #fff; text-decoration: none; min-height: 44px; }
.brand-link strong { color: var(--brand); font-size: 24px; line-height: 1.1; }
.brand-link span { color: #fff; font-size: 15px; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.updated-label { color: #d6d8d3; font-size: 12px; font-variant-numeric: tabular-nums; }
.print-view-button { min-height: 44px; border: 1px solid #696d66; border-radius: 6px; background: #fff; color: #111; padding: 8px 12px; font-weight: 800; cursor: pointer; }

.primary-nav { max-width: 1380px; margin: 0 auto; padding: 0 18px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.primary-nav a { min-height: 44px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 8px 12px; border-bottom: 4px solid transparent; color: #e6e8e2; text-decoration: none; font-size: 14px; font-weight: 800; }
.primary-nav a:hover { background: var(--shell-soft); color: #fff; }
.primary-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brand); }

.page-main { max-width: 1380px; margin: 0 auto; padding: 30px 22px 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; max-width: 800px; font-size: 36px; line-height: 1.08; text-wrap: balance; }
.page-heading p { max-width: 760px; margin: 8px 0 0; color: var(--muted); text-wrap: pretty; }
.page-count { flex: 0 0 auto; color: var(--muted); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.section-heading { margin: 38px 0 14px; display: flex; align-items: end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.section-heading h2 { margin: 0; font-size: 25px; line-height: 1.15; text-wrap: balance; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }

.button, .button-secondary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; padding: 9px 14px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.button-secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.button:hover, .button-secondary:hover { text-decoration: underline; }

.next-shoot-card { border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.next-shoot-top { padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.next-shoot-top h2 { margin: 0; font-size: 28px; line-height: 1.15; text-wrap: balance; }
.next-shoot-top p { margin: 8px 0 0; color: var(--muted); }
.day-badge { min-width: 112px; border: 2px solid var(--ink); padding: 7px 9px; text-align: center; background: #fff; font-weight: 900; line-height: 1.15; }
.day-badge span, .day-badge small { display: block; }
.day-badge small { margin-top: 3px; font-size: 12px; }
.filming-intent { margin: 0 20px 18px; padding: 14px 16px; background: var(--accent-soft); border-left: 5px solid var(--accent); }
.filming-intent b { display: block; margin-bottom: 4px; font-size: 12px; text-transform: uppercase; }
.filming-intent p { margin: 0; font-size: 18px; font-weight: 700; text-wrap: pretty; }
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.fact-grid > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.fact-grid > div:last-child { border-right: 0; }
.fact-grid dt, .detail-grid dt, .version-grid dt { margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.fact-grid dd, .detail-grid dd, .version-grid dd { margin: 0; font-weight: 700; }
.next-scene-preview { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.next-scene-preview h3 { margin: 0 0 10px; font-size: 17px; }
.next-scene-preview .button-secondary { margin-top: 12px; }

.search-panel, .filter-panel { margin: 28px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; box-shadow: var(--shadow); }
.search-panel label, .filter-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 900; }
.search-panel input, .filter-field input, .filter-field select, .print-picker select { width: 100%; min-height: 44px; border: 1px solid #8f958d; border-radius: 5px; background: #fff; color: var(--ink); padding: 9px 11px; }
.search-results { margin-top: 12px; }
.search-result-group + .search-result-group { margin-top: 18px; }
.search-result-group h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; }
.search-result { min-height: 44px; display: block; padding: 11px 12px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.search-result:hover { background: var(--surface-soft); }
.search-result b, .search-result span, .search-result small { display: block; }
.search-result small { color: var(--muted); }
.empty-state { padding: 16px; border: 1px dashed #90958f; background: var(--surface-soft); color: var(--muted); }

.launcher-grid, .packet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.launcher-card, .packet-card { display: block; min-height: 154px; padding: 18px; border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.launcher-card:hover, .packet-card:hover { border-color: var(--accent); }
.launcher-card h3, .packet-card h3 { margin: 0 0 6px; font-size: 19px; }
.launcher-card p, .packet-card p { margin: 0; color: var(--muted); text-wrap: pretty; }
.launcher-card small, .packet-card small { display: block; margin-top: 14px; color: var(--accent); font-weight: 900; }
.packet-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.packet-links a { min-height: 44px; display: inline-flex; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; }

.shoot-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.shoot-strip a { min-height: 80px; padding: 10px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; background: #fff; color: var(--ink); text-decoration: none; }
.shoot-strip b, .shoot-strip span, .shoot-strip small { display: block; }
.shoot-strip span { margin-top: 3px; font-size: 12px; font-weight: 800; }
.shoot-strip small { margin-top: 5px; color: var(--muted); }

.version-panel, .data-panel, .group-section, .full-section { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.version-panel > summary, .data-panel > summary, .group-section > summary, .full-section > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; padding: 11px 15px; font-weight: 900; }
.version-panel > summary::marker, .data-panel > summary::marker, .group-section > summary::marker, .full-section > summary::marker { color: var(--accent); }
.version-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.version-grid > div, .detail-grid > div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.version-grid > div:nth-child(2n), .detail-grid > div:nth-child(2n) { border-right: 0; }

.calendar-shell { margin-top: 18px; }
.calendar-month { margin: 0 0 10px; font-size: 22px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: #fff; }
.weekday { padding: 9px 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--shell); color: #fff; text-align: center; font-size: 12px; font-weight: 900; }
.calendar-day { min-height: 128px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.calendar-day.outside { background: #f5f6f4; color: #92968f; }
.calendar-day.off { background: #f3f3f3; }
.calendar-date { font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.calendar-day b, .calendar-day span, .calendar-day small { display: block; }
.calendar-day b { margin-top: 8px; color: var(--accent); }
.calendar-day span { margin-top: 3px; font-size: 12px; font-weight: 800; }
.calendar-day small { margin-top: 7px; color: var(--muted); }
.calendar-day a { color: inherit; text-decoration: none; }
.agenda-list { display: none; margin: 0; padding: 0; list-style: none; }
.agenda-list li { border-bottom: 1px solid var(--line); background: #fff; }
.agenda-list a, .agenda-list .agenda-off { min-height: 66px; display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.agenda-list time { font-weight: 900; }
.agenda-list b, .agenda-list span { display: block; }
.agenda-list span { color: var(--muted); font-size: 13px; }

.schedule-list { display: grid; gap: 14px; }
.schedule-card { border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); scroll-margin-top: 128px; }
.schedule-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 16px; align-items: start; }
.schedule-card h3 { margin: 0; font-size: 23px; line-height: 1.15; text-wrap: balance; }
.schedule-card-head p { margin: 5px 0 0; color: var(--muted); }
.schedule-card .filming-intent { margin: 0 16px 16px; }
.card-reveal { border-top: 1px solid var(--line); }
.card-reveal > summary { min-height: 48px; display: flex; align-items: center; padding: 10px 16px; cursor: pointer; color: var(--accent); font-weight: 900; }
.card-reveal-content { padding: 0 16px 16px; }
.scene-summary-list { margin: 0; padding: 0; list-style: none; }
.scene-summary-list li { padding: 9px 0; border-top: 1px solid var(--line); }
.scene-summary-list li:first-child { border-top: 0; }
.scene-summary-list a { font-weight: 900; }
.scene-summary-list span { display: block; font-weight: 800; }
.scene-summary-list p { margin: 2px 0 0; color: var(--muted); }
.reference-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.reference-chip { min-height: 44px; display: inline-flex; flex-direction: column; justify-content: center; padding: 5px 9px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 5px; background: #fff; color: var(--ink); font-weight: 900; text-decoration: none; }
.reference-chip small { color: var(--muted); font-size: 10px; }

.filter-panel { display: grid; grid-template-columns: 2fr repeat(3, minmax(170px, 1fr)) auto; align-items: end; gap: 10px; position: sticky; top: 113px; z-index: 10; }
.filter-panel.asset-filters { grid-template-columns: 2fr minmax(190px, 1fr) minmax(190px, 1fr) auto; }
.filter-clear { min-height: 44px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); padding: 8px 12px; font-weight: 900; cursor: pointer; }
.result-status { margin: -14px 0 14px; color: var(--muted); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }

.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scene-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); scroll-margin-top: 182px; }
.scene-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 15px 10px; }
.scene-number { margin: 0; font-size: 25px; line-height: 1; }
.scene-number small { font-size: 12px; }
.scene-heading { margin: 0; padding: 0 15px 10px; font-size: 18px; line-height: 1.2; text-wrap: balance; }
.scene-summary { flex: 1; margin: 0; padding: 12px 15px; border-top: 1px solid var(--line); background: var(--surface-soft); text-wrap: pretty; }
.scene-summary b { display: block; margin-bottom: 3px; color: var(--accent); font-size: 11px; text-transform: uppercase; }
.scene-actions { padding: 9px 15px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.copy-link { min-height: 44px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); padding: 7px 10px; font-weight: 800; cursor: pointer; }
.copy-status { min-height: 18px; margin: 0 15px 8px; color: var(--muted); font-size: 12px; }

.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.asset-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); scroll-margin-top: 182px; }
.asset-card img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #e7e8e5; }
.cast-card img { aspect-ratio: 3 / 2; object-position: center 24%; }
.location-card img { aspect-ratio: 16 / 9; }
.asset-body { display: flex; flex: 1; flex-direction: column; padding: 14px; }
.asset-kicker { color: var(--accent); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.asset-card h3 { margin: 3px 0 7px; font-size: 21px; line-height: 1.15; text-wrap: balance; }
.asset-card p { margin: 0; text-wrap: pretty; }
.asset-card .card-reveal { margin: 14px -14px -14px; margin-top: auto; }
.asset-card .card-reveal-content { padding-top: 4px; }
.asset-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 10px; border: 1px solid var(--line); }
.asset-facts > div { padding: 7px 9px; border-right: 1px solid var(--line); }
.asset-facts > div:last-child { border-right: 0; }
.asset-facts dt { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.asset-facts dd { margin: 1px 0 0; font-weight: 900; }
.group-section { margin-top: 14px; }
.group-section > summary { justify-content: space-between; border-left: 6px solid var(--accent); }
.group-section > summary span { color: var(--muted); font-size: 12px; }
.group-section .asset-grid { padding: 14px; border-top: 1px solid var(--line); }

.print-picker { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.print-picker label { display: block; margin-bottom: 6px; font-weight: 900; }
.data-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px; border-top: 1px solid var(--line); }
.data-links a { min-height: 44px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; }

.full-section > summary { font-size: 20px; }
.full-section-content { padding: 14px; border-top: 1px solid var(--line); }
.muted { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); }
.site-footer > div { max-width: 1380px; margin: 0 auto; padding: 18px 22px calc(18px + env(safe-area-inset-bottom, 0)); display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }

@media (max-width: 1100px) {
  .calendar-grid { display: none; }
  .agenda-list { display: block; border: 1px solid var(--line); }
  .launcher-grid, .packet-grid, .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shoot-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-panel, .filter-panel.asset-filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-clear { align-self: stretch; }
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-grid > div:nth-child(2) { border-right: 0; }
  .fact-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .header-row { padding: 8px 12px; }
  .brand-link { display: block; padding-top: 5px; }
  .brand-link strong, .brand-link span { display: block; }
  .brand-link strong { font-size: 20px; }
  .updated-label { display: none; }
  .primary-nav { padding: 0 8px; }
  .page-main { padding: 22px 12px 48px; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 30px; }
  .page-count { margin-top: 9px; }
  .next-shoot-top, .schedule-card-head { grid-template-columns: 1fr; }
  .day-badge { justify-self: start; }
  .launcher-grid, .packet-grid, .asset-grid, .scene-grid, .data-links { grid-template-columns: 1fr; }
  .shoot-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-panel, .filter-panel.asset-filters, .print-picker { grid-template-columns: 1fr; }
  .fact-grid, .version-grid, .detail-grid { grid-template-columns: 1fr; }
  .fact-grid > div, .version-grid > div, .detail-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .scene-card-head { grid-template-columns: 1fr; }
  .agenda-list a, .agenda-list .agenda-off { grid-template-columns: 100px minmax(0, 1fr); }
  .site-footer > div { display: block; }
}

@media print {
  @page { size: Letter; margin: .45in; }
  :root { --paper: #fff; --surface: #fff; --surface-soft: #fff; --ink: #000; --muted: #333; --line: #777; --accent: #000; --accent-soft: #fff; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .site-header, .site-footer, .skip-link, .print-view-button, .filter-panel, .search-panel, .scene-actions, .copy-status, .no-print { display: none !important; }
  .page-main { max-width: none; padding: 0; }
  .page-heading { margin-bottom: 14pt; }
  .page-heading h1 { font-size: 22pt; }
  .launcher-grid, .packet-grid, .asset-grid, .scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7pt; }
  .calendar-grid { display: grid; }
  .agenda-list { display: none; }
  .next-shoot-card, .schedule-card, .scene-card, .asset-card, .launcher-card, .packet-card, .version-panel, .data-panel, .group-section, .full-section { box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  .asset-card img { filter: grayscale(1); }
  .group-section[open], .full-section[open], details[open] { break-inside: auto; }
  a { color: #000; text-decoration: none; }
}
