:root {
  --bg: #07111f;
  --panel: #0e1b2d;
  --panel-2: #11233a;
  --line: rgba(173, 205, 232, .16);
  --text: #f4f7fb;
  --muted: #9db0c6;
  --blue: #5da8ff;
  --cyan: #25d9d0;
  --green: #6be0a9;
  --shadow: 0 24px 70px rgba(0, 0, 0, .26);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

html[lang="ja"] { font-family: Inter, "Hiragino Sans", "Yu Gothic", Meiryo, ui-sans-serif, system-ui, sans-serif; }
html[lang="ja"] h1, html[lang="ja"] h2 { letter-spacing: -.025em; }

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% 2%, rgba(55, 130, 216, .17), transparent 32rem), var(--bg); }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

.topbar { height: 76px; width: min(1240px, calc(100% - 48px)); margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.brand small { display: block; color: var(--cyan); font-size: 8px; letter-spacing: .22em; margin-top: 3px; }
.brand-mark { width: 36px; height: 36px; color: var(--blue); }
.brand-mark svg { width: 100%; height: 100%; }
.topbar-meta { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 12px; }
.locale-switch { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 11px; white-space: nowrap; }
.locale-switch a { color: var(--cyan); }
.locale-switch span { color: var(--text); font-weight: 700; }
.live-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(37, 217, 208, .1); }

.hero { display: grid; grid-template-columns: 1.04fr .96fr; gap: 80px; align-items: center; padding-block: 94px 82px; }
.eyebrow { margin: 0 0 18px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .2em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 680px; margin-bottom: 23px; font-size: clamp(42px, 5vw, 70px); line-height: .98; letter-spacing: -.055em; }
.lede { max-width: 610px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 800; transition: transform .2s, border-color .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: #06111f; background: var(--cyan); box-shadow: 0 9px 26px rgba(37, 217, 208, .2); }
.button.primary:hover { background: #72e9dd; }
.button.quiet { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, .03); }
.hero-note { display: flex; align-items: center; gap: 8px; color: #8095ad; font-size: 11px; }
.shield { color: var(--green); font-size: 17px; }

.hero-art { position: relative; min-height: 390px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .46; }
.orb-a { width: 270px; height: 270px; background: radial-gradient(circle at 38% 28%, rgba(93, 168, 255, .44), transparent 62%); top: 7px; right: 10px; }
.orb-b { width: 180px; height: 180px; background: radial-gradient(circle at 48% 50%, rgba(37, 217, 208, .22), transparent 65%); bottom: 4px; left: 22px; }
.diagram-card { position: relative; width: min(100%, 500px); padding: 27px; border: 1px solid rgba(120, 181, 240, .28); border-radius: 24px; background: linear-gradient(145deg, rgba(22, 48, 78, .9), rgba(8, 20, 36, .91)); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.diagram-row { display: grid; grid-template-columns: 1fr 27px 1fr; gap: 13px; align-items: center; }
.arrow { color: var(--cyan); text-align: center; font-size: 24px; }
.node { min-height: 94px; padding: 15px 13px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .045); }
.node-icon { width: 27px; height: 27px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 8px; color: var(--cyan); background: rgba(37, 217, 208, .12); }
.node strong { font-size: 12px; }
.node small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.policy-node { border-color: rgba(37, 217, 208, .45); box-shadow: inset 0 0 24px rgba(37, 217, 208, .06); }
.relay-node { border-color: rgba(93, 168, 255, .38); }
.wire { display: flex; align-items: center; gap: 5px; height: 54px; margin-inline: 18px; border-left: 1px dashed rgba(37, 217, 208, .42); border-right: 1px dashed rgba(93, 168, 255, .42); }
.wire span { width: 5px; height: 5px; margin: auto; border-radius: 50%; background: var(--cyan); box-shadow: 21px 0 var(--blue), 42px 0 var(--cyan), 63px 0 var(--blue); opacity: .75; }
.diagram-caption { margin-top: 21px; padding-top: 16px; border-top: 1px solid var(--line); color: #c6d9ea; font-size: 11px; text-align: center; }
.lock { color: var(--green); margin-right: 5px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics > div { min-height: 130px; padding: 25px 27px; border-right: 1px solid var(--line); }
.metrics > div:last-child { border-right: 0; }
.metrics strong { display: block; margin-bottom: 12px; color: var(--blue); font-size: 12px; letter-spacing: .18em; }
.metrics span { display: block; margin-bottom: 8px; font-weight: 800; }
.metrics small { color: var(--muted); font-size: 11px; line-height: 1.5; }

.boundary { padding-block: 104px; }
.section-heading { max-width: 680px; }
h2 { margin-bottom: 18px; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -.045em; }
.section-heading > p:last-child, .agent-copy > p:last-child { color: var(--muted); font-size: 15px; line-height: 1.7; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 42px; }
.feature-card { min-height: 260px; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); }
.feature-card.accent { background: linear-gradient(150deg, rgba(37,217,208,.11), rgba(255,255,255,.025)); border-color: rgba(37,217,208,.36); }
.feature-number { display: grid; width: 30px; height: 30px; place-items: center; margin-bottom: 40px; border-radius: 50%; color: var(--cyan); background: rgba(37,217,208,.12); font-size: 12px; font-weight: 800; }
.feature-card h3 { margin-bottom: 10px; font-size: 18px; letter-spacing: -.02em; }
.feature-card p { min-height: 75px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.feature-card code { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }

.studio { padding: 42px 0 100px; }
.studio-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 35px; }
.studio-heading h2 { margin-bottom: 0; }
.mcp-status { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.mcp-status.ready { color: var(--green); border-color: rgba(107,224,169,.38); }
.mcp-status.fallback { color: #f2c878; border-color: rgba(242,200,120,.32); }
.studio-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 15px; }
.policy-form, .preview-panel { min-height: 535px; padding: 28px; border: 1px solid var(--line); border-radius: 19px; background: var(--panel); }
.form-intro, .preview-header > div { display: flex; align-items: center; gap: 13px; margin-bottom: 27px; }
.step { color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.form-intro strong, .preview-header strong { display: block; font-size: 13px; }
.form-intro small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.policy-form label { display: block; margin-bottom: 17px; color: #dbe6f2; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
select { display: block; width: 100%; height: 44px; margin-top: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--panel-2); outline: none; }
select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(37,217,208,.1); }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-label { display: flex !important; align-items: center; gap: 10px; margin-top: 3px; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--cyan); }
.full { width: 100%; margin-top: 12px; }
.form-footnote { margin-top: 17px; color: #70859d; font-size: 10px; line-height: 1.55; }
.preview-panel { position: relative; display: flex; flex-direction: column; background: #0a1728; }
.preview-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.preview-header > div { margin: 0; }
.preview-badge { padding: 5px 8px; border-radius: 5px; color: #7e92aa; background: rgba(255,255,255,.06); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.preview-badge.active { color: var(--green); background: rgba(107,224,169,.12); }
.preview-empty { flex: 1; display: grid; place-content: center; justify-items: center; padding: 40px; color: var(--muted); text-align: center; }
.empty-icon { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 15px; border: 1px solid rgba(37,217,208,.3); border-radius: 50%; color: var(--cyan); font-size: 27px; }
.preview-empty p { max-width: 220px; margin: 0; font-size: 12px; line-height: 1.6; }
.json-preview { flex: 1; overflow: auto; margin: 0; padding: 21px 0; color: #b8e9e0; font: 11px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.hidden { display: none; }
.preview-footer { padding-top: 16px; border-top: 1px solid var(--line); color: #70859d; font-size: 10px; }

.agent-surface { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; padding-block: 80px 100px; border-top: 1px solid var(--line); }
.tool-list { border-top: 1px solid var(--line); }
.tool-row { min-height: 72px; display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.tool-icon { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(37,217,208,.4); border-radius: 50%; color: var(--cyan); }
.tool-row strong { display: block; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.tool-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.tool-state { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 25px 40px; border-top: 1px solid var(--line); font-size: 11px; }
.brand-text { color: var(--text); font-weight: 800; letter-spacing: .12em; margin-right: 15px; }
.footer-muted { color: #70859d; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 25px; padding-block: 70px 60px; }
  .hero-art { min-height: 320px; }
  .boundary-grid, .studio-grid, .agent-surface { grid-template-columns: 1fr; }
  .agent-surface { gap: 40px; }
  .studio-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 560px) {
  .shell, .topbar { width: min(100% - 30px, 1160px); }
  .topbar-meta { display: none; }
  h1 { font-size: 42px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics > div:last-child { border-bottom: 0; }
  .diagram-card { padding: 16px; }
  .diagram-row { gap: 6px; }
  .node { padding: 11px 8px; }
  .node strong { font-size: 10px; }
  .node small { font-size: 8px; }
  .policy-form, .preview-panel { padding: 20px; }
  .footer { flex-direction: column; }
}
