:root {
  color-scheme: light;
  --navy: #17273a;
  --ink: #1c3041;
  --muted: #4c6273;
  --line: #cfdce2;
  --accent: #145c60;
  --wash: #e8f3f2;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #f5f8fa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; line-height: 1.5; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); }
a:focus-visible, input:focus-visible { outline: 3px solid #117971; outline-offset: 4px; }
.skip { position: absolute; inset: .8rem auto auto .8rem; transform: translateY(-200%); background: white; padding: .65rem; z-index: 1; }
.skip:focus { transform: none; }
.shell { width: min(100% - 2.5rem, 74rem); margin: auto; }
.header, .footer { background: var(--navy); color: white; }
.nav, .footer .shell { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav nav { display: flex; gap: clamp(.75rem, 4vw, 1.75rem); }
.nav a, .footer a { color: #fff; text-decoration: none; font-weight: 650; }
.nav a:hover, .footer a:hover { text-decoration: underline; }
.nav a:focus-visible, .footer a:focus-visible { outline-color: #86ded6; }
.brand img { display: block; width: 120px; height: auto; }
.hero { padding: clamp(2.7rem, 7vw, 5.8rem) 0; background: var(--wash); border-bottom: 1px solid #d2e7e4; }
h1 { margin: 0; max-width: 26ch; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.1; letter-spacing: -.045em; }
.hero p { margin: 1rem 0 0; max-width: 56ch; color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.2rem); }
.catalog, .detail { padding-top: 2rem; padding-bottom: 4rem; }
.toolbar, .filters { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.toolbar { justify-content: space-between; }
.filters a { border: 1px solid var(--line); background: white; text-decoration: none; padding: .5rem .85rem; border-radius: 999px; font-weight: 650; }
.filters a[aria-current], .filters a:hover { background: var(--accent); border-color: var(--accent); color: white; }
.search { width: min(100%, 22rem); }
.search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.search input { width: 100%; padding: .65rem .9rem; font: inherit; border: 1px solid var(--line); border-radius: .55rem; background: white; color: var(--ink); }
.result-count { margin: 1.1rem 0 .8rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.2rem; }
.card { min-width: 0; border-radius: .85rem; background: white; border: 1px solid var(--line); box-shadow: 0 4px 14px #17273a0a; }
.card-link { border-radius: inherit; display: block; height: 100%; text-decoration: none; color: inherit; }
.card-link:hover h2 { color: var(--accent); text-decoration: underline; }
.poster { overflow: hidden; background: #203247; aspect-ratio: 16 / 9; border-radius: .8rem .8rem 0 0; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-copy { padding: 1rem; }
.labels { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 650; }
.demo { border-radius: .3rem; padding: .12rem .4rem; background: var(--wash); color: var(--accent); }
.card h2 { font-size: 1.1rem; margin: .4rem 0 .3rem; overflow-wrap: anywhere; }
.card p { margin: 0; font-size: .92rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.back { display: inline-block; margin-bottom: 1.25rem; }
.detail h1 { margin-bottom: 1.5rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.detail-media { border-radius: .85rem; overflow: hidden; background: var(--navy); }
.detail-media img, .detail-media video { max-height: min(68vh, 45rem); width: 100%; display: block; object-fit: contain; aspect-ratio: 16 / 9; }
.detail-copy { background: white; border: 1px solid var(--line); border-radius: .85rem; padding: 1.25rem; }
.detail-copy p { margin: 0; color: var(--muted); }
.detail-copy dl { margin-bottom: 0; }
.detail-copy dl div { border-top: 1px solid var(--line); padding: .55rem 0; }
.detail-copy dt { font-weight: 650; }
.detail-copy dd { margin: .1rem 0 0; color: var(--muted); }
.footer { color: #c7d8df; font-size: .95rem; }
@media (max-width: 42rem) {
  .shell { width: min(100% - 1.5rem, 74rem); }
  .detail-grid { grid-template-columns: 1fr; }
  .card-copy, .detail-copy { padding: .9rem; }
  .toolbar { align-items: stretch; }
}
