.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(245, 245, 247, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
}

.topbar-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: conic-gradient(from 220deg, var(--blue), var(--cyan), var(--violet), var(--blue));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  opacity: 0.95;
}

.brand-mark::before {
  top: 8px;
  left: 8px;
  width: 12px;
}

.brand-mark::after {
  top: 15px;
  left: 10px;
  width: 8px;
}

.top-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.hero {
  padding: 80px 0 82px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 70px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
  font-size: 14px;
  font-weight: 650;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(0, 113, 227, 0.12);
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
  letter-spacing: -0.012em;
}

h1 {
  max-width: 1020px;
  margin: 26px 0 18px;
  font-size: 72px;
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -0.032em;
}

h2 {
  margin: 14px 0 26px;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.14;
  letter-spacing: -0.022em;
}

h3 {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 1.38;
}

h4 {
  margin: 34px 0 14px;
  font-size: 19px;
  line-height: 1.5;
}

.hero h1 .gradient {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #0071e3 0%, #5e5ce6 48%, #bf5af2 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.lede,
.hero .lede {
  max-width: 860px;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.62;
  letter-spacing: 0.008em;
}

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

.chip {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #3a3a3c;
  background: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 600;
}

.hero-visual {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 16px;
  border-radius: 44px;
  background: linear-gradient(145deg, #18181a, #343438);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.28);
}

.tab-wrap {
  position: sticky;
  top: 58px;
  z-index: 90;
  padding: 18px 0;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 7px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.055);
  backdrop-filter: blur(18px);
}

.tab {
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.tab:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.tab:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.28);
  outline-offset: 2px;
}

.tab[aria-selected="true"] {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.panel {
  display: block;
  padding: 36px 0 150px;
}

.case-v2 .panel {
  padding-bottom: 0;
}

html:not(.v2-tabs-enhanced) .panel[hidden] {
  display: block !important;
}

html.v2-tabs-enhanced .panel[hidden] {
  display: none !important;
}

.panel.is-entering {
  animation: v2-panel-enter 0.36s ease;
}

@keyframes v2-panel-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section-head {
  max-width: 920px;
  margin: 88px 0 78px;
}

.section-head p {
  max-width: 840px;
  margin: 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.75;
}

.section-head .single-line-title {
  max-width: none;
  white-space: nowrap;
  text-wrap: nowrap;
}

.kicker {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.card {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.055);
}

.story-act {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 68px;
  margin: 0;
  padding: 78px 0 80px;
  border-top: 1px solid rgba(0, 0, 0, 0.09);
}

.story-act:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}

.act-label {
  position: sticky;
  top: 164px;
  align-self: start;
}

.act-num {
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.act-title {
  margin: 10px 0 8px;
  font-size: 23px;
  font-weight: 720;
  line-height: 1.35;
}

.act-time {
  color: var(--muted);
  font-size: 13px;
}

.story-card.card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.story-card.card > :last-child {
  margin-bottom: 0;
}

.story-card > p,
.story-card > .quote,
.story-card > .decision,
.story-card > .evidence-note,
.story-card > .role-boundary {
  max-width: var(--reading);
}

.story-card > h3,
.story-card > h4 {
  max-width: 820px;
}

/* Shared content primitives used by the redesigned case pages. */
.case-v2 {
  --case-tech-radius: 26px;
  --case-figure-margin: 42px 0 18px;
  --case-figure-radius: 24px;
  --case-figure-border: 1px solid rgba(0, 0, 0, 0.07);
  --case-figure-shadow: 0 18px 54px rgba(0, 0, 0, 0.08);
  --case-caption-max-width: 900px;
  --case-caption-margin: 14px auto 0;
  --case-caption-size: 12px;
  --case-caption-align: center;
  --case-component-padding: 24px;
  --case-component-radius: 22px;
}

:where(.case-v2) .tech-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  margin: 34px 0 44px;
}

:where(.case-v2) .tech-stack {
  padding: 32px;
  border-radius: var(--case-tech-radius);
  color: #fff;
  background: #111214;
}

:where(.case-v2) .tech-stack h4 {
  color: #fff;
}

:where(.case-v2) .tech-stack p {
  margin: 6px 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

:where(.case-v2) .stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

:where(.case-v2) .stack-pills span {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 12px;
}

:where(.case-v2) .case-figure {
  margin: var(--case-figure-margin);
}

:where(.case-v2) .case-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--case-figure-border);
  border-radius: var(--case-figure-radius);
  background: #fff;
  box-shadow: var(--case-figure-shadow);
}

:where(.case-v2) .case-figure figcaption {
  max-width: var(--case-caption-max-width);
  margin: var(--case-caption-margin);
  color: var(--muted);
  font-size: var(--case-caption-size);
  line-height: 1.65;
  text-align: var(--case-caption-align);
}

:where(.case-v2) .case-figure:is(.contained, .contained-figure) img {
  padding: 18px;
  object-fit: contain;
}

:where(.case-v2) .case-component-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

:where(.case-v2) .case-component-card {
  padding: var(--case-component-padding);
  border: 1px solid var(--soft-line);
  border-radius: var(--case-component-radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.045);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 36px;
}

.mini {
  padding: 22px;
}

.mini p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 13px;
  color: var(--blue);
  background: linear-gradient(145deg, rgba(0, 113, 227, 0.12), rgba(142, 125, 255, 0.15));
  font-weight: 800;
}

.quote {
  max-width: var(--reading);
  margin: 38px 0;
  padding: 28px 30px;
  border-left: 3px solid var(--blue);
  border-radius: 0 16px 16px 0;
  background: #f5faff;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.72;
}

.note {
  color: var(--muted);
  font-size: 12px;
}

.decision {
  max-width: var(--reading);
  margin: 38px 0;
  padding: 34px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(145deg, #111214, #26262a);
}

.decision .tag {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #c7e7ff;
  font-size: 12px;
}

.decision p {
  color: rgba(255, 255, 255, 0.72);
}

.launch {
  margin-top: 36px;
  padding: 36px;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(145deg, #fefefe, #eef7ff);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.result {
  padding: 19px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.result b {
  display: block;
  color: var(--blue);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.result span {
  color: var(--muted);
  font-size: 13px;
}

.evidence-note {
  max-width: var(--reading);
  margin: 26px 0 40px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 159, 10, 0.2);
  border-radius: 16px;
  background: #fff9e9;
  font-size: 13px;
  line-height: 1.75;
}

.plain-list {
  margin: 0;
  padding-left: 20px;
}

.plain-list li {
  margin-bottom: 8px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.principle {
  padding: 26px;
  border-radius: 22px;
  color: #fff;
  background: #171719;
}

.principle span {
  color: #9edaff;
  font-size: 12px;
  font-weight: 700;
}

.principle p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.footer {
  padding: 82px 0 92px;
  border-top: 1px solid var(--line);
}

.case-v2 .footer {
  border-top: 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.case-v2 .footer-inner {
  color: #62616f;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  font-size: 12px;
  font-weight: 450;
  line-height: 20px;
  letter-spacing: 0;
}

.case-v2 .footer-inner span {
  font-weight: 450;
}

.v2-case-pager {
  padding: 0 0 120px;
}

.v2-case-pager-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-top: 34px;
}

.v2-case-pager a,
.v2-case-pager .is-disabled {
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
}

.v2-case-pager a::before,
.v2-case-pager .is-disabled::before {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.v2-case-pager-prev {
  justify-self: start;
}

.v2-case-pager-prev::before {
  content: "← 上一案例";
}

.v2-case-pager-list {
  justify-self: center;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 650;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.v2-case-pager-next {
  justify-self: end;
  text-align: right;
}

.v2-case-pager-next::before {
  content: "下一案例 →";
}

.v2-case-pager a:not(.v2-case-pager-list) {
  transition: color 0.2s ease;
}

.v2-case-pager a:hover {
  color: var(--blue);
}

.v2-case-pager-list:hover {
  color: var(--ink) !important;
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.v2-case-pager .is-disabled {
  color: var(--muted);
  opacity: 0.42;
  cursor: default;
}

.v2-case-pager a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.top-meta,
.chip,
.tab,
.kicker,
.act-num,
.act-time,
.note {
  letter-spacing: 0.035em;
}

@media (max-width: 980px) {
  .story-act {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 64px 0 76px;
  }

  .act-label {
    position: static;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :where(.case-v2) .case-component-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .top-meta {
    display: none;
  }

  .hero {
    padding: 64px 0 56px;
  }

  h1,
  .hero h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 38px;
  }

  h3 {
    font-size: 26px;
  }

  .lede,
  .hero .lede {
    font-size: 21px;
  }

  .hero-visual {
    padding: 10px;
    border-radius: 26px;
  }

  .tab {
    padding: 10px 13px;
    font-size: 13px;
  }

  .panel {
    padding-bottom: 100px;
  }

  .v2-case-pager {
    padding-bottom: 120px;
  }

  .v2-case-pager-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: 28px;
  }

  .v2-case-pager-prev,
  .v2-case-pager-list,
  .v2-case-pager-next {
    justify-self: start;
    text-align: left;
  }

  .v2-case-pager-list {
    grid-row: 3;
  }

  .section-head {
    margin: 62px 0 48px;
  }

  .section-head p {
    font-size: 18px;
  }

  .section-head .single-line-title {
    white-space: normal;
    text-wrap: balance;
  }

  .result-grid,
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  :where(.case-v2) .case-component-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quote {
    padding: 22px;
    font-size: 19px;
  }

  .decision {
    padding: 26px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 4px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .tab-wrap {
    display: none !important;
  }

  .panel,
  html.v2-tabs-enhanced .panel[hidden] {
    display: block !important;
    padding: 0 0 36px;
    break-after: page;
  }

  .hero-visual,
  .card,
  .story-card {
    box-shadow: none;
  }

  .story-act {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}
