@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  color-scheme: light;
  --paper: #fcf7fa;
  --surface: #fff;
  --ink: #211323;
  --muted: #624c60;
  --accent: #a12166;
  --border: #eadce7;
  --rose: #faeaf3;
  --green: #245845;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 Inter, system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #7040a0; outline-offset: 3px; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
.container { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 25%; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 8px; font-weight: 600; }
.nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); background: var(--rose); border-radius: 8px; }
.hero { padding-block: clamp(28px, 4vw, 50px) 12px; }
.hero-home { position: relative; isolation: isolate; }
.hero-home::before {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0 0 0 53%;
  background: url('../images/dti/runway-background.webp') center 53% / cover no-repeat;
  mask-image: linear-gradient(to right, transparent, black 37%),
              linear-gradient(to bottom, transparent, black 18%, black 73%, transparent);
  mask-composite: intersect;
}
.hero-home .lead { max-width: min(64ch, 53%); }
h1, h2 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.12; margin: 0 0 12px; }
h1 { font-size: clamp(3rem, 7vw, 5.8rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.03em; }
h3 { margin: 0 0 8px; line-height: 1.35; }
.lead { color: var(--muted); max-width: 64ch; font-size: 1.1rem; }
.updated { font-size: .9rem; color: var(--muted); }
.updated time { font-weight: 700; color: var(--ink); margin-left: 4px; }
.section { margin-block: 38px; }
.hero + .section { margin-top: 12px; }
.section > p, .section > details p { max-width: 77ch; }
.active-panel, .callout { padding: clamp(16px, 3vw, 32px); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.callout { background: var(--rose); }
.panel-heading, .filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel-heading p { color: var(--muted); }
.filter-bar { margin: 18px 0 12px; }
.search { flex: 1; max-width: 420px; font-size: .85rem; font-weight: 600; }
.search input { display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 1px solid #b49db1; border-radius: 8px; padding: 8px 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; }
.count { color: var(--green); font-weight: 700; margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: #851a53; }
.copy, .outline { color: var(--accent); background: var(--rose); border-color: var(--border); }
.copy:hover, .outline:hover { background: #f4d8e9; }
.copy { min-width: 82px; }
.code-grid { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.code-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.code-card > div, .record-list li > div { min-width: 0; }
code { font: 700 .95em ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.code-card p, .record-list p { color: var(--muted); font-size: .9rem; }
.record-list { margin: 0 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.record-list li { padding: 11px 4px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-status { text-align: end; color: #793b51; font-size: .85rem; }
.history-status time { white-space: nowrap; }
details { border-top: 1px solid var(--border); padding-inline: 4px; }
details:last-child { border-bottom: 1px solid var(--border); }
details p { padding-bottom: 10px; }
summary { cursor: pointer; padding: 10px 0; min-height: 44px; font-weight: 700; }
.archive { margin-bottom: 12px; }
.step-list { padding-inline-start: 24px; }
.step-list li { padding: 3px 0 10px 4px; }
.step-list li::marker { color: var(--accent); font-weight: 700; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.code-grid ~ h3, .guide-grid + h3 { margin-top: 24px; }
.guide-media { margin: 0; min-width: 0; }
.video-frame { display: grid; place-items: center; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; background: var(--rose); }
.video-frame > * { grid-area: 1 / 1; }
.video-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
figcaption { margin-top: 8px; color: var(--muted); font-size: .88rem; }
figcaption p { margin-bottom: 8px; }
.site-footer { background: var(--ink); color: #f1e2ee; padding-block: 16px; margin-top: 40px; }
.site-footer a { color: white; }
.site-footer .nav a:hover { color: var(--ink); }
.site-footer p { font-size: .9rem; margin-top: 8px; }
.skip { position: absolute; z-index: 1; background: white; padding: 8px; transform: translateY(-120%); }
.skip:focus { transform: translateY(0); }
.screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .header-inner, .footer-inner, .panel-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .nav { gap: 0 4px; }
  .nav a { padding-inline: 5px; font-size: .8rem; }
  .hero { padding-top: 24px; }
  .hero .lead { font-size: 1rem; margin-bottom: 10px; }
  .hero-home .lead { max-width: 64ch; }
  .hero-home::before {
    inset: 0 0 auto 58%;
    height: 100px;
    opacity: .7;
  }
  .hero .updated { margin-bottom: 0; }
  .panel-heading p { font-size: .9rem; }
  .code-grid, .guide-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-wrap: wrap; gap: 6px 12px; }
  .search { flex-basis: 100%; max-width: none; }
}
