*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #000;
  --white: #fff;
  --muted: #5c5c5c;
  --danger: #d92d20;
  --mono: 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --col: 996px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- Header ---------- */
.case-head {
  background: var(--black);
  color: var(--white);
  padding: 36px 24px 128px;
  text-align: center;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  width: min(1140px, 100%);
  margin: 0 auto;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.back-link { color: rgba(255,255,255,0.7); font-size: 13px; transition: color .15s ease; }
.back-link:hover { color: var(--white); }
.lang { display: flex; gap: 8px; color: rgba(255,255,255,0.7); }
.lang a { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.lang a:hover { color: var(--white); }
.lang a.active { color: var(--white); border-bottom-color: var(--white); }

.case-meta { width: min(900px, 100%); margin: 72px auto 0; }
.case-meta .eyebrow { font-size: 18px; color: rgba(255,255,255,0.75); }
.case-meta h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(24px, 3.6vw, 44px);
  line-height: 1.25;
  margin: 14px 0 22px;
}
.case-meta .skills { font-size: 16px; color: rgba(255,255,255,0.75); }

/* ---------- Body ---------- */
.wrap {
  width: min(calc(var(--col) + 48px), 100%);
  margin: 0 auto;
  padding: 0 24px 104px;
}
.case-hero-media {
  position: relative;
  margin: -64px 0 104px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0,0,0,0.14);
}
.case-hero-media img { width: 100%; }

section { padding-bottom: 96px; }
.section-label {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  margin-bottom: 48px;
}
.section-label.sub { margin: 64px 0 32px; }

section > p:not(.section-label) {
  max-width: 720px;
  margin: 0 auto 18px;
  font-size: 17px;
  line-height: 1.75;
}
section > p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

.line-list { display: flex; flex-direction: column; gap: 6px; max-width: 720px; margin: 0 auto; }
.line-list p { font-size: 17px; line-height: 1.75; }

.impact-list, .stats { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; }
.impact-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; line-height: 1.5; }
.impact-list .emoji { flex-shrink: 0; }
.stats { gap: 8px; margin-top: 28px; }
.stats li { font-family: var(--mono); font-size: 15px; }

.heuristics { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin: 20px auto 32px; }
.heuristics li { display: flex; gap: 12px; align-items: center; font-size: 17px; }
.heuristics .x { color: var(--danger); flex-shrink: 0; }

/* ---------- Media ---------- */
.media-block { margin: 40px 0; }
.media-block.center { display: flex; justify-content: center; }
.media-block.center img {
  max-width: 320px;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.media-block.wide img {
  width: 100%;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
}
.post-link { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.post-link a, section a[target] { text-decoration: underline; text-underline-offset: 3px; }
.post-link a:hover, section a[target]:hover { color: var(--muted); }

/* ---------- Tabs ---------- */
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 40px; }
.tabs span { display: none; }
.tab-btn { font-family: var(--mono); font-size: 16px; font-weight: 300; line-height: 1.6; }
.tab-btn:hover:not(.active) { font-weight: 400; }
.tab-btn.active { font-weight: 700; }
.tab-btn.active::before { content: '→ '; }

/* ---------- Card ---------- */
.guideline-intro { text-align: center; }
.card {
  border: 1px solid var(--black);
  border-radius: 12px;
  padding: 40px;
  margin-top: 8px;
}
.card h3 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--black);
}
.card p { font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
.card ul { list-style: disc; margin: 0 0 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.card li { font-size: 16px; line-height: 1.6; }

/* ---------- Accessibility CTA ---------- */
.a11y-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 720px; margin: 0 auto; }
.a11y-cta p { font-size: 17px; line-height: 1.75; }
.a11y-arrow {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

/* ---------- Accordion ---------- */
.accordion { border-top: 1px solid var(--black); }
.accordion-item { border-bottom: 1px solid var(--black); }
.accordion-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  cursor: pointer; list-style: none;
  padding: 24px 0;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item .chevron {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: transform .2s ease;
}
.accordion-item[open] .chevron { transform: rotate(180deg); }
.accordion-body { padding: 0 0 32px; }
.accordion-body h4 { font-family: var(--mono); font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.accordion-body p { font-size: 16px; line-height: 1.7; margin-bottom: 16px; max-width: 720px; }
.accordion-placeholder-note { font-style: italic; color: var(--muted); font-size: 14px; padding: 0 0 28px; }

/* ---------- Carousel ---------- */
.carousel { max-width: 600px; margin: 0 auto; }
.carousel-viewport {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
  padding: 24px;
  display: flex; align-items: center; justify-content: center;
}
.carousel-slide { display: none; width: 100%; }
.carousel-slide.active { display: flex; flex-direction: column; align-items: center; gap: 20px; }
img.carousel-slide.active { display: block; max-height: 480px; object-fit: contain; }
.carousel-slide img { width: 100%; max-height: 420px; object-fit: contain; }
.carousel-caption { width: 100%; text-align: left; }
.carousel-caption h5 { font-family: var(--mono); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.carousel-caption p { font-size: 14px; line-height: 1.65; margin: 0; }
.carousel-caption p + p { margin-top: 12px; }
.carousel-caption ul { list-style: disc; margin: 8px 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
.carousel-caption li { font-size: 14px; line-height: 1.6; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dots .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #cfcfcf;
  transition: width .2s ease, background .2s ease;
}
.carousel-dots .dot.active { background: var(--black); width: 22px; border-radius: 4px; }

/* ---------- Metrics ---------- */
.metrics-card {
  display: flex;
  background: var(--black);
  color: var(--white);
  border-radius: 10px;
  overflow: hidden;
}
.metric { flex: 1; position: relative; padding: 32px; border-left: 1px solid rgba(255,255,255,0.3); }
.metric:first-child { border-left: 0; }
.metric-badge {
  position: absolute; top: 16px; right: 20px;
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 20px;
}
.metric-value { font-family: var(--mono); font-size: 30px; font-weight: 700; margin-bottom: 4px; }
.metric-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.metric-desc { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.7); }

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 110px 24px 80px;
}
.thanks { font-family: var(--mono); font-weight: 700; font-size: min(60px, 6.2vw); line-height: 1.2; }
.touch { margin-top: 40px; font-family: var(--mono); font-weight: 700; font-size: 18px; line-height: 1.4; }
.footer address { margin-top: 10px; font-style: normal; font-size: 15px; line-height: 25px; }
.footer address a { display: block; }
.footer address a:hover { text-decoration: underline; }
.footer .caption { margin: 56px auto 0; max-width: 560px; font-size: 13px; color: rgba(255,255,255,0.6); }
.footer .year { margin-top: 24px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .case-head { padding: 24px 24px 96px; }
  .nav { flex-direction: column; align-items: flex-start; gap: 14px; }
  .case-meta { margin-top: 48px; }
  .case-hero-media { margin: -48px 0 64px; border-radius: 16px; }
  section { padding-bottom: 64px; }
  .section-label { margin-bottom: 32px; }
  .section-label.sub { margin: 48px 0 24px; }
  section > p:not(.section-label), .line-list p, .impact-list li, .heuristics li, .a11y-cta p { font-size: 16px; }
  .card { padding: 24px; }
  .a11y-cta { flex-direction: column; align-items: flex-start; }
  .accordion-item summary { font-size: 16px; }
  .metrics-card { flex-direction: column; }
  .metric { border-left: 0; border-top: 1px solid rgba(255,255,255,0.3); }
  .metric:first-child { border-top: 0; }
  .footer { padding: 80px 24px 56px; }
  .touch { margin-top: 28px; }
}
