/* ============================================================
   Google I/O 2026 総まとめ — Design tokens & base
   ============================================================ */
:root {
  --ink: #0b1020;
  --text: #1f2937;
  --text-soft: #334155;
  --muted: #5b6b80;
  --subtle: #8493a8;

  --line: #e3e8f0;
  --line-strong: #cdd5e1;
  --bg-soft: #f6f8fc;
  --bg-tint: #eef2f9;
  --surface: #ffffff;

  --google-blue: #1a73e8;
  --google-blue-deep: #1558b8;
  --google-green: #1e8e3e;
  --google-yellow: #f9ab00;
  --google-red: #d93025;
  --google-purple: #6f3ed4;
  --google-cyan: #00838f;

  --cat-gemini: var(--google-blue);
  --cat-create: var(--google-red);
  --cat-develop: var(--google-green);
  --cat-commerce: var(--google-yellow);
  --cat-workspace: var(--google-purple);
  --cat-chrome: var(--google-cyan);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 16, 32, 0.05), 0 1px 1px rgba(11, 16, 32, 0.03);
  --shadow-md: 0 8px 24px rgba(11, 16, 32, 0.07), 0 2px 6px rgba(11, 16, 32, 0.04);
  --shadow-lg: 0 30px 80px rgba(11, 16, 32, 0.14);
  --focus: 0 0 0 3px rgba(26, 115, 232, 0.35);

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text);
  font-family: "Inter", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--google-blue-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
video {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.18;
  font-weight: 800;
}

h1 {
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 850;
  letter-spacing: -0.02em;
  word-break: keep-all;
  line-break: strict;
}

h2 {
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(18px, 1.7vw, 24px);
}

h4 {
  font-size: 15px;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding-left: 1.2em;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.site-header[data-elevated="true"] {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(11, 16, 32, 0.02);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: conic-gradient(
    from 220deg,
    #4285f4 0deg,
    #34a853 110deg,
    #fbbc04 215deg,
    #ea4335 305deg,
    #4285f4 360deg
  );
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.25), inset 0 0 0 3px white;
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  color: inherit;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--google-blue);
  text-decoration: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(86vh, 760px);
  padding: clamp(64px, 10vh, 110px) var(--gutter) clamp(72px, 12vh, 130px);
  overflow: hidden;
  background: radial-gradient(140% 100% at 0% 0%, #142046 0%, #0a0f23 60%, #060a18 100%);
  color: #f6f8fc;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  opacity: 0.32;
  z-index: -2;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05) brightness(0.95);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 15% 50%, rgba(8, 12, 28, 0.6) 0%, rgba(8, 12, 28, 0) 70%),
    linear-gradient(90deg, rgba(6, 10, 24, 0.85) 0%, rgba(6, 10, 24, 0.55) 45%, rgba(6, 10, 24, 0.15) 90%);
  z-index: -1;
}

.hero-copy {
  position: relative;
  max-width: 880px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbe4f5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.hero-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--google-blue);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.22);
}

.hero h1 {
  color: white;
  max-width: 880px;
  font-size: clamp(38px, 5.2vw, 68px);
  letter-spacing: -0.025em;
}

.hero h1 .accent {
  background: linear-gradient(120deg, #8ab4f8 10%, #f6c545 50%, #f28b82 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 720px;
  margin-top: 26px;
  color: #d6deec;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #0b1020;
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  background: #f3f6fb;
}

.btn-secondary {
  color: white;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.85);
}

/* ============================================================
   Stat strip
   ============================================================ */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border-bottom: 1px solid var(--line);
}

.summary-strip div {
  padding: 28px var(--gutter);
  border-right: 1px solid var(--line);
}

.summary-strip div:last-child {
  border-right: none;
}

.summary-strip strong {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.summary-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: clamp(64px, 9vw, 110px) var(--gutter);
}

.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 44px;
  text-align: left;
}

.section-heading.with-tools {
  max-width: var(--maxw);
  margin: 0 auto 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.kicker {
  display: inline-block;
  margin: 0 0 14px;
  color: var(--google-blue-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading p:not(.kicker) {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}

/* Compat with legacy meta-line on pages */
.meta-line {
  margin: 0 0 12px;
  color: var(--google-blue-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .meta-line {
  color: #aebcd7;
}

/* ============================================================
   Overview section (infographic)
   ============================================================ */
.overview-section {
  background: white;
}

.overview-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.infographic {
  margin: 0;
  position: relative;
}

.infographic img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--bg-tint);
}

.infographic figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.overview-points {
  display: grid;
  gap: 16px;
}

.overview-point {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
}

.overview-point h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  color: var(--ink);
}

.overview-point h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--google-blue);
  flex: none;
}

.overview-point:nth-child(2) h3::before { background: var(--google-red); }
.overview-point:nth-child(3) h3::before { background: var(--google-yellow); }
.overview-point:nth-child(4) h3::before { background: var(--google-green); }

.overview-point p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ============================================================
   Categories section
   ============================================================ */
.categories-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.category-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.category-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.category-card header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.category-card h3 {
  font-size: 18px;
  color: var(--ink);
}

.category-card .count {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.category-card p.intro {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.category-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.category-card li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.12s ease, color 0.12s ease;
}

.category-card li a:hover {
  background: var(--bg-tint);
  color: var(--google-blue-deep);
  text-decoration: none;
}

.category-card li a::after {
  content: "→";
  color: var(--subtle);
  font-weight: 800;
  transition: transform 0.12s ease, color 0.12s ease;
}

.category-card li a:hover::after {
  color: var(--google-blue);
  transform: translateX(2px);
}

.category-pill {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.category-pill[data-cat="Gemini"] { background: var(--cat-gemini); }
.category-pill[data-cat="Create"] { background: var(--cat-create); }
.category-pill[data-cat="Develop"] { background: var(--cat-develop); }
.category-pill[data-cat="Search & Commerce"] { background: var(--cat-commerce); }
.category-pill[data-cat="Workspace"] { background: var(--cat-workspace); }
.category-pill[data-cat="Chrome"] { background: var(--cat-chrome); }

/* ============================================================
   Article (editorial readout)
   ============================================================ */
.article-section {
  background: white;
}

.story {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.story section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.story section:first-child {
  border-top: none;
  padding-top: 0;
}

.story h3 {
  color: var(--ink);
  font-size: clamp(20px, 1.9vw, 26px);
  margin-bottom: 8px;
}

.story p {
  margin-top: 14px;
  max-width: 820px;
  color: var(--text-soft);
  font-size: 16.5px;
  line-height: 1.85;
}

/* ============================================================
   Videos section
   ============================================================ */
.video-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.filter-chip.is-active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.video-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.video-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.video-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.video-shell {
  background: #050816;
  position: relative;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050816;
}

.video-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
}

.category-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cat-gemini);
}

.category-dot[data-category="Create"]::before { background: var(--cat-create); }
.category-dot[data-category="Develop"]::before { background: var(--cat-develop); }
.category-dot[data-category="Search & Commerce"]::before { background: var(--cat-commerce); }
.category-dot[data-category="Workspace"]::before { background: var(--cat-workspace); }
.category-dot[data-category="Chrome"]::before { background: var(--cat-chrome); }

.video-body h3 {
  font-size: 20px;
  line-height: 1.32;
  color: var(--ink);
}

.short-summary {
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.card-links,
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--google-blue-deep);
  background: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.text-link:hover {
  background: var(--bg-tint);
  border-color: var(--line-strong);
  text-decoration: none;
}

.text-link.primary {
  background: var(--google-blue);
  color: white;
  border-color: var(--google-blue);
}

.text-link.primary:hover {
  background: var(--google-blue-deep);
  border-color: var(--google-blue-deep);
}

.analysis {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 2px;
}

.analysis summary {
  cursor: pointer;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  padding: 6px 0;
}

.analysis summary::-webkit-details-marker {
  display: none;
}

.analysis summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: var(--google-blue);
  transition: transform 0.15s ease;
}

.analysis[open] summary::before {
  transform: rotate(90deg);
}

.analysis-content {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.analysis-content h4 {
  margin: 16px 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.analysis-content p {
  margin: 6px 0;
}

.analysis-content ul {
  margin: 6px 0 12px;
  padding-left: 20px;
}

/* ============================================================
   Sources section
   ============================================================ */
.source-section {
  background: white;
  border-top: 1px solid var(--line);
}

.source-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.source-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.source-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.source-card h3 {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink);
}

.source-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.source-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--google-blue-deep);
  font-size: 14px;
  font-weight: 700;
}

.source-card a::after {
  content: "↗";
  font-size: 13px;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 36px var(--gutter);
  color: #a3afc4;
  background: #0b1020;
  font-size: 13px;
}

.footer p {
  max-width: var(--maxw);
  margin: 0 auto;
}

/* ============================================================
   Detail page (pages/*.html)
   ============================================================ */
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(56px, 7vw, 80px);
  background: white;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
  color: var(--google-blue-deep);
  font-size: 14px;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: none;
  color: var(--google-blue);
}

.detail-hero h1 {
  margin-top: 8px;
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(32px, 4.2vw, 52px);
}

.detail-hero .lead {
  color: var(--text-soft);
  margin-top: 20px;
}

.detail-hero .hero-actions {
  margin-top: 26px;
}

.detail-media {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-md);
}

.detail-media video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050816;
}

.detail-media-stack {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.detail-infographic {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--bg-tint);
}

.detail-media-stack .detail-infographic,
.detail-media-stack video {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: white;
}

.detail-media-stack video {
  background: #050816;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) var(--gutter);
}

/* ============================================================
   Image lightbox
   ============================================================ */
.zoomable-image {
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.zoomable-image:hover {
  filter: saturate(1.03) contrast(1.02);
  transform: translateY(-2px);
}

.zoomable-image:focus-visible {
  outline: 3px solid var(--google-blue);
  outline-offset: 5px;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
}

.image-lightbox.is-open {
  display: grid;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 12, 28, 0.82);
  cursor: zoom-out;
}

.image-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1440px);
  max-height: 92vh;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.image-lightbox__image {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-lg);
}

.image-lightbox__caption {
  max-width: min(92vw, 980px);
  color: white;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.image-lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.image-lightbox__close:hover {
  background: white;
}

.image-lightbox__close:focus-visible {
  outline: 3px solid var(--google-blue);
  outline-offset: 3px;
}

.detail-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.detail-block {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
}

.detail-block h2 {
  margin-bottom: 14px;
  font-size: clamp(20px, 2vw, 26px);
  color: var(--ink);
}

.detail-block h3 {
  margin: 18px 0 6px;
  font-size: 15.5px;
  color: var(--ink);
  font-weight: 800;
}

.detail-block p,
.detail-block li {
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.78;
}

.detail-block p + p {
  margin-top: 12px;
}

.detail-block ul {
  margin: 10px 0;
  padding-left: 22px;
}

.detail-block ul li {
  margin: 4px 0;
}

.detail-block .related-videos {
  display: grid;
  gap: 18px;
}

.detail-block .related-videos > div {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

.detail-block .related-videos video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #050816;
}

.detail-block .related-videos p {
  margin-top: 10px;
  font-size: 13.5px;
}

.detail-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
}

.sidebar-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feature-list {
  display: grid;
  gap: 6px;
}

.feature-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.12s ease, color 0.12s ease;
}

.feature-list a:hover {
  background: var(--bg-tint);
  color: var(--google-blue-deep);
  text-decoration: none;
}

.feature-list a span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero-media {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-strip div:nth-child(2) {
    border-right: none;
  }

  .summary-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .overview-grid,
  .video-grid,
  .source-grid,
  .detail-hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .section-heading.with-tools {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.65;
  }

  .site-header {
    padding: 0 16px;
    min-height: 56px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    min-height: 78vh;
    padding: 60px 20px 56px;
  }

  .hero-media {
    grid-template-columns: 1fr;
  }

  .hero-media video:nth-child(n + 2) {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .summary-strip div {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 22px 20px;
  }

  .summary-strip div:last-child {
    border-bottom: none;
  }

  .section {
    padding: 56px 20px;
  }

  .video-grid {
    gap: 18px;
  }

  .video-body {
    padding: 18px;
  }

  .detail-hero,
  .detail-layout {
    padding: 44px 20px;
  }

  .text-link {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
