:root {
  color-scheme: light;
  --canvas: #f6f7f9;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --text: #17202a;
  --muted: #5e6b78;
  --quiet: #65727f;
  --line: #dce2e8;
  --line-strong: #c7d0d9;
  --accent: #1266e3;
  --accent-hover: #0d55bf;
  --accent-soft: #edf4ff;
  --success: #147a4b;
  --success-soft: #eaf7f0;
  --warning: #946200;
  --warning-soft: #fff6dc;
  --danger: #b32929;
  --danger-soft: #fff0f0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 42, .04), 0 8px 30px rgba(22, 32, 42, .06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--canvas); }
body { margin: 0; color: var(--text); background: var(--canvas); }
button, input, select, code { font: inherit; }
a { color: var(--accent); }
button, select, input { min-width: 0; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 10px 14px; border-radius: 6px; color: white; background: var(--text); }
.skip:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 64px; padding: 8px max(24px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.wordmark { display: inline-flex; width: fit-content; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.wordmark img { width: 32px; height: 32px; object-fit: contain; }
.wordmark span { display: grid; }
.wordmark strong { font-size: 14px; line-height: 1.1; letter-spacing: .02em; }
.wordmark small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.1; }
.site-header nav, footer nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a, footer nav a { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible, footer nav a:hover { color: var(--text); }
.install-control { justify-self: end; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 650; cursor: pointer; }

.intro { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(380px,.7fr); gap: 72px; max-width: 1240px; margin: 0 auto; padding: 70px 24px 54px; }
.product-version, .section-label { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
h1 { max-width: 750px; margin: 0; font-size: clamp(40px,5vw,68px); line-height: 1.02; letter-spacing: -.045em; }
.intro > div > p:last-child { max-width: 740px; margin: 24px 0 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.runtime-summary { display: grid; grid-template-columns: 1fr 1fr; align-self: end; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.runtime-summary div { min-height: 92px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.runtime-summary div:nth-child(2n) { border-right: 0; }
.runtime-summary div:nth-last-child(-n+2) { border-bottom: 0; }
.runtime-summary dt { color: var(--quiet); font-size: 11px; font-weight: 650; }
.runtime-summary dd { margin: 9px 0 0; font-size: 13px; font-weight: 650; line-height: 1.35; }

.pcm-section, .workspace, .reference-section, .resources-section { max-width: 1240px; margin: 0 auto 28px; padding: 0 24px; }
.workspace-header, .section-header { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 20px; }
h2 { margin: 0; font-size: clamp(29px,3.4vw,42px); line-height: 1.1; letter-spacing: -.035em; }
.workspace-header > p, .section-header > p { max-width: 540px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.quick-run { display: grid; grid-template-columns: 1fr minmax(260px,340px) auto; gap: 18px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--surface); }
.quick-run-copy, .panel-heading, .timing-copy { display: flex; align-items: flex-start; gap: 13px; }
.quick-run-copy > div { display: grid; gap: 4px; }
.quick-run-copy strong { font-size: 14px; }
.quick-run-copy small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.step-number { display: grid; flex: 0 0 26px; width: 26px; height: 26px; place-items: center; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 750; }
.demo-choice { display: grid; gap: 6px; }
.demo-choice span { color: var(--muted); font-size: 11px; font-weight: 650; }
select, .digest-input input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: var(--surface); font-size: 13px; }

button { border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 650; cursor: pointer; }
button:hover:not(:disabled) { border-color: #aeb9c4; background: var(--surface-subtle); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(18,102,227,.24); outline-offset: 2px; }
button.primary { border-color: var(--accent); color: white; background: var(--accent); }
button.primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
button:disabled { opacity: .42; cursor: not-allowed; }
.decision-badge.pass { color: var(--success); background: var(--success-soft); }

.pcm-section { padding-top: 18px; }
.pcm-card { display: grid; grid-template-columns: .8fr 1.2fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.pcm-input, .pcm-result { min-width: 0; padding: 26px; }
.pcm-input { border-right: 1px solid var(--line); }
.pcm-input label { display: grid; gap: 12px; }
.pcm-input label span { font-size: 13px; font-weight: 700; }
.pcm-input label small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.pcm-input input { width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); font-size: 11px; }
.pcm-result { background: var(--surface-subtle); }
.pcm-result header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pcm-result header > div { display: grid; gap: 5px; }
.pcm-result header strong { font-size: 14px; }
.pcm-result header span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.pcm-checks { display: grid; gap: 8px; margin: 18px 0 4px; padding: 0; list-style: none; }
.pcm-checks li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 50px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pcm-checks li > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--text); background: #edf0f3; font-size: 10px; font-weight: 800; }
.pcm-checks li > div { display: grid; gap: 2px; min-width: 0; }
.pcm-checks strong { font-size: 11px; }
.pcm-checks small { overflow: hidden; color: var(--quiet); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pcm-checks li > b { color: var(--quiet); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.pcm-checks li[data-state="checking"] { border-color: var(--accent); }
.pcm-checks li[data-state="pass"] > span, .pcm-checks li[data-state="pass"] > b { color: var(--success); background: var(--success-soft); }
.pcm-checks li[data-state="block"] > span, .pcm-checks li[data-state="block"] > b { color: var(--danger); background: var(--danger-soft); }
.pcm-result dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 18px; }
.pcm-result dl div { min-width: 0; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
.pcm-result dl div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.pcm-result dt { color: var(--quiet); font-size: 10px; }
.pcm-result dd { overflow: hidden; margin: 7px 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pcm-result > button { min-height: 44px; padding: 9px 13px; }
.quick-run > button { min-height: 42px; padding: 10px 20px; }

.application-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(380px,.92fr); border: 1px solid var(--line); border-top: 0; background: var(--surface); box-shadow: var(--shadow); }
.file-workspace, .result-panel { min-width: 0; padding: 26px; }
.file-workspace { border-right: 1px solid var(--line); }
.panel-heading h3, .timing-panel h3 { margin: 1px 0 5px; font-size: 16px; }
.panel-heading p, .timing-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.file-grid label { display: grid; min-height: 112px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.file-grid label > span, .digest-input > span { font-size: 12px; font-weight: 700; }
.file-grid input { width: 100%; margin: 15px 0 10px; color: var(--muted); font-size: 11px; }
.file-grid small, .digest-input small { overflow: hidden; color: var(--quiet); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.digest-input { display: grid; gap: 7px; margin-top: 12px; }
.digest-input input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.workflow-actions, .run-actions, .export-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.workflow-actions button, .run-actions button, .export-actions button { min-height: 40px; padding: 9px 12px; }
.run-actions { padding-top: 18px; border-top: 1px solid var(--line); }
.run-actions .primary { min-width: 150px; }

.result-panel { background: var(--surface-subtle); }
.result-heading { position: relative; padding-right: 82px; }
.result-heading > div { min-width: 0; }
.decision-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 5px 9px; border-radius: 99px; color: var(--muted); background: #edf0f3; font-size: 10px; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }
.result-heading .decision-badge { position: absolute; top: 0; right: 0; }
.decision-badge.block, #gate-decision.block { color: var(--danger); background: var(--danger-soft); }
.decision-badge.inconclusive, #gate-decision.inconclusive { color: var(--warning); background: var(--warning-soft); }
.progress { height: 4px; margin: 22px 0; overflow: hidden; border-radius: 99px; background: #e5e9ed; }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .16s linear; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.metric-grid div { min-height: 78px; padding: 15px 12px 12px 0; border-bottom: 1px solid var(--line); }
.metric-grid div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.metric-grid .wide { grid-column: 1 / -1; border-left: 0 !important; }
.metric-grid dt, .timing-result dt, .candidate-result dt { color: var(--quiet); font-size: 11px; }
.metric-grid dd, .timing-result dd { margin: 8px 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-weight: 650; }
.check-list { min-height: 38px; margin: 16px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.check-list li b.pass { color: var(--success); }
.check-list li b.fail { color: var(--danger); }
.check-list li b.not-evaluated { color: var(--warning); }
.runtime-note { color: var(--quiet); font-size: 10px; }
.export-actions { margin-top: 14px; }

.timing-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; padding: 24px 26px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }
.timing-result { padding-left: 28px; border-left: 1px solid var(--line); }
.timing-result header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.timing-result header > span { color: var(--muted); font-size: 12px; }
.timing-result dl { display: grid; grid-template-columns: repeat(4,1fr); margin: 18px 0 0; }
.timing-result dl div { padding: 10px; border-left: 1px solid var(--line); }
.timing-result dl div:first-child { border-left: 0; padding-left: 0; }

.reference-section, .resources-section { padding-top: 72px; }
.reference-browser { display: grid; grid-template-columns: 290px minmax(0,1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.candidate-list { display: grid; align-content: start; border-right: 1px solid var(--line); background: var(--surface-subtle); }
.candidate-list button { display: flex; justify-content: space-between; gap: 14px; padding: 15px 17px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--muted); background: transparent; text-align: left; }
.candidate-list button b { font-size: 12px; }
.candidate-list button span { color: var(--quiet); font-size: 10px; }
.candidate-list button.active { color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.candidate-list button.active span { color: var(--accent); }
.candidate-result { padding: 30px; }
.candidate-result header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.candidate-result header > div { display: grid; gap: 4px; }
.candidate-result header span { color: var(--quiet); font-size: 10px; }
.candidate-result header strong { font-size: 14px; }
.candidate-result header > b { color: var(--success); font-size: 11px; }
.candidate-result dl { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; }
.candidate-result dl div { min-height: 92px; padding: 18px 14px 14px 0; border-bottom: 1px solid var(--line); }
.candidate-result dd { margin: 9px 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.4; }
.candidate-result p { margin: 20px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.candidate-result a { font-size: 12px; font-weight: 650; }

.resources-section { padding-bottom: 90px; }
.command-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.command-card > div { display: grid; gap: 12px; min-width: 0; }
.command-card strong { font-size: 13px; }
.command-card code, .details-grid code { display: block; overflow: auto; padding: 12px; border-radius: 6px; color: #173453; background: #f0f3f6; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.command-card button, .details-grid button { min-height: 38px; padding: 8px 13px; }
.technical-details { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.technical-details summary { padding: 18px 22px; font-size: 13px; font-weight: 650; cursor: pointer; }
.technical-details:not([open]) > :not(summary) { display: none; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 4px 22px 24px; border-top: 1px solid var(--line); }
.details-grid h3 { margin: 20px 0 10px; font-size: 13px; }
.details-grid button { margin-top: 10px; }
.details-grid ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px max(24px, calc((100vw - 1240px) / 2)); border-top: 1px solid var(--line); color: var(--muted); background: var(--surface); }
footer p { font-size: 11px; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .intro { grid-template-columns: 1fr; gap: 30px; padding-top: 48px; }
  .runtime-summary { max-width: 620px; }
  .application-grid { grid-template-columns: 1fr; }
  .pcm-card { grid-template-columns: 1fr; }
  .pcm-input { border-right: 0; border-bottom: 1px solid var(--line); }
  .file-workspace { border-right: 0; border-bottom: 1px solid var(--line); }
  .timing-panel { grid-template-columns: 1fr; }
  .timing-result { padding: 20px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 680px) {
  .site-header { min-height: 58px; padding: 7px 16px; }
  .install-control { padding: 8px 10px; }
  .intro { padding: 38px 16px 36px; }
  h1 { font-size: clamp(36px,11vw,50px); }
  .intro > div > p:last-child { font-size: 15px; }
  .runtime-summary div { min-height: 78px; padding: 14px; }
  .pcm-section, .workspace, .reference-section, .resources-section { padding-right: 16px; padding-left: 16px; }
  .workspace-header, .section-header { display: grid; gap: 12px; }
  .quick-run { grid-template-columns: 1fr; }
  .quick-run > button { width: 100%; min-height: 48px; }
  .demo-choice select { min-height: 48px; }
  .file-workspace, .result-panel { padding: 20px 16px; }
  .pcm-input, .pcm-result { padding: 20px 16px; }
  .pcm-result dl { grid-template-columns: 1fr; }
  .pcm-result dl div:nth-child(even) { padding-left: 0; border-left: 0; }
  .file-grid { grid-template-columns: 1fr; }
  .file-grid label { min-height: 102px; }
  .workflow-actions button, .export-actions button { flex: 1 1 calc(50% - 8px); min-height: 44px; }
  .run-actions button { flex: 1; min-height: 46px; }
  .timing-panel { padding: 20px 16px; }
  .timing-result dl { grid-template-columns: 1fr 1fr; }
  .timing-result dl div { border-bottom: 1px solid var(--line); }
  .timing-result dl div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .reference-section, .resources-section { padding-top: 58px; }
  .reference-browser { grid-template-columns: 1fr; }
  .candidate-list { grid-template-columns: 1fr 1fr; border-right: 0; border-bottom: 1px solid var(--line); }
  .candidate-list button { display: grid; gap: 5px; min-height: 64px; }
  .candidate-list button.active { box-shadow: inset 0 3px var(--accent); }
  .candidate-result { padding: 22px 16px; }
  .candidate-result dl { grid-template-columns: 1fr 1fr; }
  .candidate-result dl div { min-height: 88px; }
  .command-card { grid-template-columns: 1fr; }
  .command-card button { justify-self: start; }
  .details-grid { grid-template-columns: 1fr; gap: 4px; }
  footer { align-items: flex-start; flex-direction: column; padding: 24px 16px; }
  footer nav { flex-wrap: wrap; gap: 18px; }
}

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