:root {
  --ink: #101619;
  --muted: #617077;
  --line: #d6dfe1;
  --paper: #f5f7f6;
  --white: #ffffff;
  --dark: #13242a;
  --dark-2: #1c343b;
  --cyan: #42bdc5;
  --lime: #d8ff38;
  --amber: #f2b84b;
  --red: #d85d51;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(66, 189, 197, .35); outline-offset: 2px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  min-height: 70px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.brand > span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--cyan); color: #167f87; font-weight: 900; }
.primary-nav { display: flex; justify-content: center; gap: 26px; color: #405158; font-size: 14px; font-weight: 700; }
.primary-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.language-switch { display: inline-flex; border: 1px solid var(--line); }
.language-switch button { min-width: 44px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.language-switch button.active { background: var(--dark); color: white; }
.text-action, .primary-action, .secondary-action { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 16px; font-size: 13px; font-weight: 800; }
.text-action { color: #33454c; }
.primary-action { background: var(--dark); color: white; }
.primary-action:hover { background: #1f3941; }
.secondary-action { border: 1px solid #708188; background: transparent; color: inherit; }

main { width: min(100%, 1560px); margin: 0 auto; }
.discovery-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); gap: 60px; align-items: end; padding: 70px 36px 52px; background: var(--white); }
.intro-copy { max-width: 760px; }
.eyebrow { display: block; margin-bottom: 12px; color: #17858c; font-size: 11px; font-weight: 900; letter-spacing: 1.2px; }
.discovery-intro h1 { max-width: 720px; margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 1.04; letter-spacing: 0; }
.discovery-intro p { max-width: 720px; margin: 22px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-search { display: grid; gap: 10px; }
.hero-search label { font-size: 13px; font-weight: 800; }
.hero-search > div { display: grid; grid-template-columns: 1fr max-content; border: 2px solid var(--dark); background: white; }
.hero-search input { width: 100%; min-width: 0; height: 58px; padding: 0 18px; border: 0; background: transparent; color: var(--ink); font-size: 16px; }
.hero-search button { border: 0; padding: 0 24px; background: var(--lime); color: var(--ink); font-weight: 900; cursor: pointer; }

.library-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.library-stats div { display: grid; gap: 5px; padding: 24px 36px; border-right: 1px solid var(--line); }
.library-stats div:last-child { border-right: 0; }
.library-stats strong { font-size: 28px; }
.library-stats span { color: var(--muted); font-size: 12px; }

.featured-section, .case-library, .biped-section { padding: 58px 36px 10px; }
.biped-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.biped-section { scroll-margin-top: 80px; }
.biped-status { color: var(--muted); }
.biped-status[hidden] { display: none; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 30px; }
.section-heading p { max-width: 580px; margin: 0; color: var(--muted); line-height: 1.6; }
.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.featured-card { position: relative; min-height: 360px; overflow: hidden; background: var(--dark); color: white; }
.featured-card-visual { position: relative; overflow: hidden; background: #0c1519; }
.featured-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0c1519; }
.featured-card-body { display: grid; gap: 8px; padding: 20px; }
.featured-card-body > span { color: #72d9d0; font-size: 11px; font-weight: 900; }
.featured-card-body strong { font-size: 20px; }
.featured-card-body p { min-height: 44px; margin: 0; color: #b8c8cd; font-size: 13px; line-height: 1.55; }
.featured-card-body a { justify-self: start; margin-top: 4px; color: var(--lime); font-size: 13px; font-weight: 900; }

.case-heading output { color: var(--muted); font-size: 14px; font-weight: 800; }
.category-filter { display: flex; gap: 8px; margin-bottom: 24px; padding-bottom: 12px; overflow-x: auto; }
.category-filter button { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border: 1px solid #bbc8cb; background: transparent; color: #405158; font-size: 12px; font-weight: 800; cursor: pointer; }
.category-filter button.active { border-color: var(--dark); background: var(--dark); color: white; }
.case-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.case-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; border: 1px solid var(--line); background: var(--white); }
.case-card-visual { position: relative; overflow: hidden; background: #e7ecec; }
.case-card-visual img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .22s ease; }
.case-card:hover .case-card-visual img { transform: scale(1.025); }
.case-card[data-case-id="creative-101"] .case-card-visual img,
.case-card[data-case-id="creative-102"] .case-card-visual img,
.case-card[data-case-id="creative-103"] .case-card-visual img { object-fit: contain; background: #e6eae9; }
.case-index { position: absolute; top: 10px; left: 10px; padding: 5px 8px; background: rgba(16,22,25,.84); color: white; font-size: 10px; font-weight: 900; }
.image-provenance { position: absolute; right: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 8px; border: 1px solid rgba(255,255,255,.38); background: rgba(16,22,25,.82); color: #fff; font-size: 9px; font-weight: 900; letter-spacing: 0; }
.image-unavailable::after { content: "Image unavailable"; display: grid; min-height: 180px; place-items: center; color: #596970; font-size: 12px; font-weight: 800; }
.case-card-body { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 10px; padding: 18px; }
.case-domain { color: #167f87; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.case-card h3 { margin: 0; font-size: 18px; }
.case-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.asset-strip { display: flex; flex-wrap: wrap; gap: 5px; }
.asset-strip span { padding: 4px 6px; border: 1px solid #cad5d7; color: #52646b; font-size: 9px; font-weight: 800; }
.case-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-facts div { display: grid; gap: 3px; padding: 9px 5px; border-right: 1px solid var(--line); }
.case-facts div:last-child { border-right: 0; }
.case-facts span { color: #7b888d; font-size: 9px; }
.case-facts strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.card-actions a, .card-actions button { display: inline-flex; min-width: 0; min-height: 38px; align-items: center; justify-content: center; border: 1px solid var(--dark); padding: 8px 10px; background: transparent; font-size: 11px; font-weight: 900; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.card-actions .create-case { grid-column: 1 / -1; background: var(--dark); color: white; }
.card-actions .open-case { color: #365159; }
.card-actions .hardware-case { color: #365159; }
.load-more-row { display: flex; justify-content: center; padding: 30px 0 50px; }
.load-more-row button { min-height: 46px; border: 1px solid var(--dark); padding: 0 28px; background: white; font-weight: 900; cursor: pointer; }
.load-more-row button[hidden] { display: none; }
.empty-library { grid-column: 1 / -1; padding: 70px 20px; border: 1px solid var(--line); background: white; color: var(--muted); text-align: center; }

.engineering-access { display: grid; grid-template-columns: 1fr max-content; gap: 40px; align-items: center; margin: 40px 36px 64px; padding: 38px; background: var(--dark); color: white; }
.engineering-access h2 { margin: 0; font-size: 30px; }
.engineering-access p { max-width: 760px; margin: 12px 0 0; color: #b8c8cd; line-height: 1.65; }
.engineering-access .eyebrow { color: #67d6cc; }
.access-actions { display: flex; gap: 10px; }
.engineering-access .primary-action { background: var(--lime); color: var(--ink); }
.engineering-access .secondary-action { border-color: #779098; color: white; }

footer { display: grid; grid-template-columns: max-content 1fr max-content; gap: 34px; align-items: center; padding: 34px 36px; border-top: 1px solid var(--line); background: white; }
footer p { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
footer nav { display: flex; gap: 18px; color: #41545b; font-size: 12px; font-weight: 800; }
.fatal-error { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; max-width: 440px; gap: 8px; padding: 18px; border-left: 4px solid var(--red); background: var(--dark); color: white; box-shadow: 0 14px 36px rgba(0,0,0,.22); }
.fatal-error[hidden] { display: none; }
.fatal-error span { color: #c6d0d4; font-size: 12px; }
.fatal-error button { justify-self: start; min-height: 36px; border: 0; padding: 0 14px; background: var(--lime); font-weight: 900; cursor: pointer; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr max-content; }
  .primary-nav { display: none; }
  .featured-grid, .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .biped-grid { grid-template-columns: 1fr; }
  .discovery-intro { grid-template-columns: 1fr; gap: 32px; }
  .engineering-access { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header { min-height: 62px; padding: 0 14px; }
  .brand strong { font-size: 14px; }
  .header-actions { gap: 4px; }
  .language-switch button { min-width: 38px; }
  .text-action { display: none; }
  .primary-action { min-height: 36px; padding: 0 10px; font-size: 11px; }
  .discovery-intro { padding: 42px 18px 32px; }
  .discovery-intro h1 { font-size: 40px; }
  .discovery-intro p { font-size: 15px; }
  .hero-search > div { grid-template-columns: 1fr; border: 1px solid var(--dark); }
  .hero-search button { min-height: 46px; }
  .library-stats { grid-template-columns: repeat(2, 1fr); }
  .library-stats div:nth-child(2) { border-right: 0; }
  .library-stats div { padding: 18px; border-bottom: 1px solid var(--line); }
  .featured-section, .case-library, .biped-section { padding: 40px 18px 8px; }
  .biped-dialog { padding: 18px; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .section-heading h2 { font-size: 26px; }
  .featured-grid, .case-grid { grid-template-columns: 1fr; }
  .featured-card { min-height: 0; }
  .case-card-body { padding: 16px; }
  .engineering-access { margin: 30px 18px 46px; padding: 24px 18px; }
  .engineering-access h2 { font-size: 25px; }
  .access-actions { align-items: stretch; flex-direction: column; }
  footer { padding: 28px 18px; }
  footer nav { flex-wrap: wrap; }
}

.reference-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.featured-card-body .reference-actions a{justify-self:stretch;text-align:center;padding:12px 6px;border:1px solid #72d9d0;text-decoration:none}.reference-actions .create-case{grid-column:1/-1}
