/* Car Cost Files — brand: deep navy, condensed white display, one red rule. */
:root {
  --navy: #10182c;
  --navy-deep: #0b1120;
  --ink: #eef1f6;
  --ink-soft: #b7c0d0;
  --ink-mute: #7d889c;
  --red: #e3262b;
  --link: #9cc3ff;
  --link-hover: #ffffff;
  --rule: #263049;
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 72ch;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--navy); }
body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(156,195,255,.45); overflow-wrap: anywhere; }
a:hover { color: var(--link-hover); text-decoration-color: var(--red); }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.site-header, .site-footer, main { width: min(100% - 32px, 880px); margin-inline: auto; }
.site-header { display: flex; align-items: flex-end; justify-content: space-between; padding: 22px 0 14px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; flex-direction: column; line-height: .95; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.brand-top { font-size: 1.05rem; padding-bottom: 3px; border-bottom: 2px solid var(--red); }
.brand-bottom { font-size: 1.05rem; color: var(--red); padding-top: 3px; }
.site-header nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; padding-bottom: 4px; }
.site-header nav a:hover { color: var(--ink); border-bottom: 2px solid var(--red); }

main { padding: 36px 0 64px; }

/* Index hero: the brand lockup standing on the grid floor from the channel banner. */
.is-home main { padding-top: 0; }
.hero { position: relative; padding: 72px 0 120px; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; left: -40%; right: -40%; bottom: -8px; height: 30%;
  background-image:
    linear-gradient(to right, rgba(140,160,210,.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140,160,210,.11) 1px, transparent 1px);
  background-size: 56px 40px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 80%, transparent);
  pointer-events: none;
}
.lockup { position: relative; z-index: 1; color: #ffffff; margin: 0 0 28px; display: inline-flex; flex-direction: column; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: .92; letter-spacing: .01em; }
.lockup span { font-size: clamp(3.4rem, 11vw, 6.5rem); }
.lockup span:first-child { padding-bottom: .06em; border-bottom: .06em solid var(--red); text-shadow: 0 0 24px rgba(255,255,255,.18); }
.lockup-files { color: var(--red); padding-top: .08em; }
.hero h1 { position: relative; z-index: 1; margin: 0 0 14px; font-family: var(--body); font-weight: 500; font-size: 1.5rem; line-height: 1.3; color: var(--ink); max-width: 30ch; }
.hero .lead { position: relative; z-index: 1; }
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: var(--measure); margin: 0 0 8px; }

/* The drawer: episodes as rows in a file cabinet, newest on top. */
.drawer h2 { margin: 0 0 4px; }
h2 {
  font-family: var(--display); font-weight: 500; font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase;
  margin: 44px 0 14px; padding-bottom: 6px; display: inline-block; border-bottom: 3px solid var(--red);
}
ol.episodes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
ol.episodes li { border-bottom: 1px solid var(--rule); }
ol.episodes a { display: grid; grid-template-columns: 5.2rem 1fr; gap: 18px; padding: 20px 8px; text-decoration: none; color: inherit; }
ol.episodes a:hover { background: var(--navy-deep); }
ol.episodes a:hover .row-title { color: var(--link); }
.row-no { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--ink); letter-spacing: .02em; padding-top: 2px; }
.row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-title { font-weight: 600; font-size: 1.12rem; line-height: 1.3; }
.row-summary { color: var(--ink-mute); font-size: .95rem; max-width: var(--measure); }

/* Episode file head */
.file-head { padding-bottom: 8px; }
.file-title { margin: 0 0 18px; font-family: var(--display); font-weight: 500; line-height: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35em; text-transform: uppercase; letter-spacing: .02em; }
.file-series { font-size: 1.1rem; color: var(--ink-mute); flex-basis: 100%; margin-bottom: 6px; }
.file-no { font-size: clamp(3rem, 9vw, 4.6rem); font-weight: 700; color: var(--ink); padding-bottom: 4px; border-bottom: 4px solid var(--red); }
.file-kind { font-size: 1.25rem; color: var(--ink-soft); }
.file-head .lead { font-size: 1.15rem; color: var(--ink); }

/* Reference lists: hanging rows separated by hairlines, URL on its own breath. */
section p { max-width: var(--measure); margin: 8px 0; color: var(--ink-soft); }
ul.sources, ul.credits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
ul.sources li, ul.credits li { padding: 10px 0 10px 14px; border-bottom: 1px solid var(--rule); border-left: 2px solid transparent; }
ul.sources li:hover, ul.credits li:hover { border-left-color: var(--red); }
ul.sources li { font-size: 1rem; }
ul.sources a { font-size: .92rem; color: var(--link); }
ul.credits li { font-size: .95rem; color: var(--ink-soft); }
ul.credits a { color: var(--link); }

.site-footer { border-top: 1px solid var(--rule); padding: 18px 0 40px; color: var(--ink-mute); font-size: .92rem; }
.site-footer a { color: var(--ink-soft); }

@media (max-width: 600px) {
  .site-header { padding-top: 16px; }
  .hero { padding: 48px 0 64px; }
  ol.episodes a { grid-template-columns: 1fr; gap: 6px; padding: 16px 4px; }
  .row-no { font-size: 1.4rem; }
  ul.sources li, ul.credits li { padding-left: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
