:root {
  --page: #f3f2ed;
  --ink: #151714;
  --muted: #666b64;
  --line: #d4d5cf;
  --accent: #173d2b;
  --header-height: 68px;
  --page-x: clamp(20px, 5vw, 80px);
}

* { box-sizing: border-box; }
html { min-width: 320px; color-scheme: light; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--page); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { color: #fff; background: var(--accent); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
button { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: var(--header-height); padding: 0 var(--page-x); border-bottom: 1px solid var(--line); background: rgba(243, 242, 237, 0.92); backdrop-filter: blur(16px); }
.brand { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 650; text-decoration: none; }
.brand img { border-radius: 8px; }
.language-switch { width: 42px; height: 32px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 11px; font-weight: 650; }
.language-switch:hover { border-color: var(--ink); }

#case-open-source-main { min-height: 100vh; padding-top: var(--header-height); }
.step-nav { position: fixed; top: var(--header-height); right: 0; left: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); height: 58px; padding: 0 var(--page-x); border-bottom: 1px solid var(--line); background: rgba(243, 242, 237, 0.94); backdrop-filter: blur(16px); }
.step-nav button { display: flex; gap: 9px; align-items: center; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; text-align: left; }
.step-nav button span { font-size: 11px; font-variant-numeric: tabular-nums; }
.step-nav button b { font-size: 12px; font-weight: 520; }
.step-nav button:hover, .step-nav button.is-active { color: var(--ink); }
.step-nav button.is-complete { color: var(--accent); }
.step-nav > i { position: absolute; right: var(--page-x); bottom: -1px; left: var(--page-x); height: 2px; }
.step-nav > i span { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0.25); transform-origin: left; transition: transform 480ms cubic-bezier(0.16, 1, 0.3, 1); }

.step-stage { min-height: calc(100vh - var(--header-height)); }
.step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr); grid-template-rows: 1fr auto; gap: 44px clamp(54px, 8vw, 128px); min-height: calc(100svh - var(--header-height)); padding: clamp(150px, 19vh, 210px) var(--page-x) 34px; }
.js .step[hidden] { display: none; }
.js .step.is-active { animation: reveal 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.step-copy { align-self: center; }
.step h1, .step h2 { max-width: 12ch; margin: 0 0 26px; font-size: clamp(48px, 5.4vw, 78px); font-weight: 610; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; }
.step-copy > p { max-width: 38em; margin: 0; color: var(--muted); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.7; }

.current-release { display: grid; grid-template-columns: 1fr 1fr; max-width: 520px; margin: 44px 0 0; border-top: 1px solid var(--line); }
.current-release div { padding: 18px 0; }
.current-release dt, .model-rules dt { margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.current-release dd, .model-rules dd { margin: 0; font-size: 16px; font-weight: 630; }
.product-figure { align-self: center; display: grid; place-items: end center; height: min(61vh, 620px); margin: 0; overflow: hidden; border-radius: 14px; background: #e6e5df; }
.product-figure img { display: block; width: auto; height: 91%; filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.16)); transform: translateY(9%); }

.step-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 22px; border-top: 1px solid var(--line); }
.step-footer > span { color: var(--muted); font-size: 12px; }
.primary-action, .home-action { min-width: 148px; padding: 15px 24px; border: 0; border-radius: 10px; color: #fff; background: var(--ink); cursor: pointer; font-size: 13px; font-weight: 620; text-align: center; text-decoration: none; }
.primary-action:hover, .home-action:hover { background: var(--accent); }
.text-action { padding: 10px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 0.28em; }
.text-action:hover { color: var(--ink); }

.model-rules { align-self: center; display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.model-rules div { min-height: 120px; padding: 22px 12px 22px 0; border-bottom: 1px solid var(--line); }
.model-rules div:nth-child(odd) { border-right: 1px solid var(--line); }
.model-rules div:nth-child(even) { padding-left: 22px; }
.follow-line { grid-column: 1 / -1; margin: -8px 0 0; color: var(--muted); font-size: 13px; }

.step-license { grid-template-columns: 0.82fr 1.18fr; }
.license-lines { align-self: center; border-top: 1px solid var(--ink); }
.license-lines section { display: grid; grid-template-columns: minmax(110px, 0.35fr) 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.license-lines h3 { margin: 0; font-size: 13px; font-weight: 640; }
.license-lines p { max-width: 34em; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

.download-actions { align-self: center; display: grid; gap: 18px; }
.download-primary { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 0 26px; border-radius: 12px; color: #fff; background: var(--ink); font-size: 17px; font-weight: 620; text-decoration: none; }
.download-primary:hover { background: var(--accent); }
.download-primary svg { width: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.download-actions > a:last-child { justify-self: start; color: var(--muted); font-size: 13px; }
.download-actions > a:last-child:hover { color: var(--ink); }
.contribute-line { grid-column: 1 / -1; display: flex; gap: 40px; align-items: center; justify-content: space-between; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contribute-line p { max-width: 54em; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.contribute-line a { flex: 0 0 auto; color: var(--accent); font-size: 16px; font-weight: 620; }
.thanks { grid-column: 1 / -1; margin: -16px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; grid-template-rows: auto; gap: 42px; min-height: auto; padding-top: 112px; }
  .step h1, .step h2 { max-width: 13ch; }
  .product-figure { height: 520px; }
  .step-footer, .follow-line, .contribute-line, .thanks { grid-column: 1; }
}
@media (max-width: 560px) {
  :root { --header-height: 62px; --page-x: 18px; }
  .step-nav { height: 56px; padding: 0; }
  .step-nav button { justify-content: center; }
  .step-nav button span { display: none; }
  .step-nav button b { display: block; }
  .step-nav > i { right: 0; left: 0; }
  .step { padding-top: 96px; padding-bottom: 22px; }
  .step h1, .step h2 { font-size: clamp(41px, 12vw, 58px); }
  .step-copy > p { font-size: 16px; }
  .product-figure { height: 420px; }
  .current-release { margin-top: 30px; }
  .model-rules { grid-template-columns: 1fr; }
  .model-rules div:nth-child(odd) { border-right: 0; }
  .model-rules div:nth-child(even) { padding-left: 0; }
  .model-rules div { min-height: 94px; }
  .license-lines section { grid-template-columns: 1fr; gap: 10px; }
  .contribute-line { align-items: flex-start; flex-direction: column; gap: 16px; }
  .contribute-line a { overflow-wrap: anywhere; }
  .step-footer { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
