:root {
  --green: #2f7d5b;
  --green-hi: #46ad80;
  --green-deep: #1b573d;
  --night: #0f2c20;
  --bg: #f6f7f4;
  --bg-alt: #ecefe8;
  --card: #ffffff;
  --ink: #15231c;
  --ink-soft: #4a5a51;
  --line: #d9dfd6;
  --accent: #2f7d5b;
  --accent-ink: #ffffff;
  --error: #b42318;
  --mark: #fff1a8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 8px 24px rgba(16, 40, 28, .06);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1713;
    --bg-alt: #13201a;
    --card: #17261f;
    --ink: #e7eee9;
    --ink-soft: #a8b8ae;
    --line: #2a3b32;
    --accent: #46ad80;
    --accent-ink: #06140d;
    --error: #ff8a7a;
    --mark: #5c4d00;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; height: auto; }
:lang(zh) body, body:lang(zh), :lang(zh) .hero-diagram text { font-family: ui-sans-serif, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
:lang(ja) body, body:lang(ja), :lang(ja) .hero-diagram text { font-family: ui-sans-serif, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", sans-serif; }
:lang(zh) h1, :lang(ja) h1, :lang(zh) h2, :lang(ja) h2 { letter-spacing: 0; line-break: strict; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
:lang(zh) .hero h1, :lang(ja) .h1-line { display: inline-block; }
.hero h1 { font-size: clamp(2.2rem, 1.2rem + 4vw, 3.9rem); line-height: 1.15; }
a { color: var(--accent); text-underline-offset: 3px; }
a[href^="mailto:"], a[href^="tel:"] { white-space: nowrap; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
p, li, figcaption, summary, legend, label { text-wrap: pretty; }
.eyebrow, .chips li, .trust, .lead, .lead-dark { text-wrap: balance; }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 820px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.4em; border-radius: 999px; border: 2px solid transparent; background: var(--green-hi); color: #06140d; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { background: #5cc495; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost-dark:hover { background: var(--bg-alt); }
.btn-small { min-height: 40px; padding: .4em 1.1em; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15, 44, 32, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand img { flex: none; }
.brand { min-width: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.main-nav { display: none; gap: 24px; margin-left: auto; }
.main-nav a { color: rgba(255, 255, 255, .85); text-decoration: none; font-size: .95rem; }
.main-nav a:hover { color: #fff; text-decoration: underline; }
.lang-menu { position: relative; margin-left: auto; }
@media (min-width: 960px) { .main-nav { display: flex; } .lang-menu { margin-left: 8px; } }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .9); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { background: rgba(255, 255, 255, .1); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .2); min-width: 160px; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-menu a:hover { background: var(--bg-alt); }
.lang-menu a[aria-current] { font-weight: 700; color: var(--accent); }
@media (max-width: 480px) {
  .header-row { gap: 6px; }
  .site-header .btn-small { padding: .3em .8em; font-size: .85rem; min-height: 38px; }
  .site-header .brand { gap: 8px; font-size: .98rem; }
  .site-header .brand img { width: 28px; height: 28px; }
  .lang-menu summary { padding: 0 6px; }
}

/* Hero */
.hero { color: #fff; background: radial-gradient(1000px 600px at 75% 40%, #23704f 0%, transparent 60%), linear-gradient(160deg, #123726 0%, #0f2c20 60%, #0b2219 100%); padding: 56px 0 72px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } .hero { padding: 88px 0 104px; } }
.eyebrow { color: #9fe0bf; font-weight: 600; font-size: .95rem; letter-spacing: .02em; }
.hero h1 { font-size: clamp(2.6rem, 1.4rem + 5.2vw, 4.6rem); font-weight: 850; letter-spacing: -0.03em; line-height: 1.02; margin-bottom: .4em; }
.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: #cfe7da; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chips li { border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: #e3f1e9; }
.trust { display: flex; align-items: flex-start; line-height: 1.45; gap: 8px; margin: 22px 0 0; color: #9fe0bf; font-size: .95rem; font-weight: 600; }
.trust svg { flex: none; margin-top: 2px; }
.hero-art { max-width: 560px; justify-self: center; width: 100%; }
.hero-diagram text { font-family: var(--font); fill: #fff; }
.pill-out { font-size: 15px; font-weight: 700; opacity: .85; letter-spacing: .04em; }
.pill-lang { font-size: 26px; font-weight: 800; }
.in-label { font-size: 16px; font-weight: 700; letter-spacing: .06em; fill: #cfe7da !important; }
.flow { stroke-dasharray: 6 10; animation: flow 1.6s linear infinite; }
.d2 { animation-delay: .35s; } .d3 { animation-delay: .7s; } .d4 { animation-delay: 1.05s; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.bar { transform-origin: 119.5px 212px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scaleY(.6); } }

/* Sections */
.section { padding: 72px 0; }
@media (min-width: 960px) { .section { padding: 104px 0; } }
.section.alt { background: var(--bg-alt); }
.kicker { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 800; color: var(--accent); margin-bottom: .8em; }
.h2-wide { max-width: 22em; }
.lead-dark { font-size: 1.15rem; color: var(--ink-soft); max-width: 40em; }

.cards { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .cards-2, .cards-3, .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.cards p { color: var(--ink-soft); margin: 0; }
.cards.compact li { padding: 20px; }
.ico { width: 36px; height: 36px; margin-bottom: 14px; padding: 6px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.features li:nth-child(4n+1) .ico { stroke: #2f6fd6; background: rgba(47, 111, 214, .12); }
.features li:nth-child(4n+2) .ico { stroke: #c2541f; background: rgba(194, 84, 31, .12); }
.features li:nth-child(4n+3) .ico { stroke: #8a4fc7; background: rgba(138, 79, 199, .12); }
.features li:nth-child(4n+4) .ico { stroke: #128a8a; background: rgba(18, 138, 138, .12); }
.limits li { border-left: 4px solid #d08a2e; }

/* Signal chain */
.chain { display: grid; gap: 8px; margin: 40px 0; justify-items: center; }
.chain .node { display: grid; justify-items: center; text-align: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; width: 100%; max-width: 320px; box-shadow: var(--shadow); }
.chain .node span { font-size: .88rem; color: var(--ink-soft); }
.chain .node-app { border: 2px solid var(--accent); }
.chain .arrow { width: 2px; height: 22px; background: var(--ink-soft); position: relative; opacity: .6; }
.chain .arrow::after { content: ""; position: absolute; left: -5px; bottom: -2px; border: 6px solid transparent; border-top-color: var(--ink-soft); border-bottom: 0; }
.outs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; max-width: 420px; }
.outs .c1 { background: #2f6fd6; } .outs .c2 { background: #c2541f; } .outs .c3 { background: #8a4fc7; } .outs .c4 { background: #128a8a; }
.outs span { color: #fff; border-radius: 999px; padding: 8px 12px; font-size: .88rem; font-weight: 700; text-align: center; }
@media (min-width: 1040px) {
  .chain { grid-template-columns: 1fr 36px 1fr 36px 1fr 36px 1.1fr 36px 1fr; align-items: center; }
  .chain .arrow { width: 100%; height: 2px; }
  .chain .arrow::after { left: auto; right: -2px; bottom: -5px; border: 6px solid transparent; border-left-color: var(--ink-soft); border-right: 0; }
  .outs { grid-template-columns: 1fr; }
}
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; padding: 24px 24px 24px 72px; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 24px; top: 22px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.steps p { color: var(--ink-soft); margin: 0; }

/* Dark details section */
.section.dark { background: linear-gradient(170deg, #0f2c20, #0b2219); color: #e7eee9; }
.dark .kicker { color: #9fe0bf; }
.details-grid { display: grid; gap: 32px; margin-top: 32px; }
@media (min-width: 960px) { .details-grid { grid-template-columns: 1.15fr 1fr; gap: 48px; } }
.detail-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.detail-list h3 { color: #fff; font-size: 1.2rem; }
.detail-list p { color: #b9cfc2; margin: 0; }
.detail-list li { padding-left: 20px; border-left: 3px solid var(--green-hi); }
.details-side { display: grid; gap: 24px; align-content: start; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); padding: 18px; }
.mode { margin: 0; }
.mode svg { display: block; width: 100%; background: rgba(0, 0, 0, .2); border-radius: 10px; }
.mode figcaption { font-size: .88rem; color: #b9cfc2; margin-top: 8px; }
.mode figcaption strong { display: block; color: #fff; font-size: 1rem; }
.m-trans { fill: #46ad80; }
.m-orig { fill: none; stroke: #f0a46e; stroke-width: 3; stroke-linejoin: round; }
.m-off { stroke-dasharray: 4 6; opacity: .5; }
.m-axis { stroke: rgba(255, 255, 255, .2); }
.modes-key { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: #b9cfc2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modes-key span { display: inline-block; width: 18px; height: 8px; border-radius: 3px; }
.k-trans { background: #46ad80; }
.k-orig { background: #f0a46e; margin-left: 10px; }
.params { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); padding: 20px 22px; }
.params h3 { color: #fff; }
.params ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr; gap: 6px 18px; color: #cfe0d6; font-size: .95rem; }
@media (min-width: 500px) { .params ul { grid-template-columns: 1fr 1fr; } }
.params li::before { content: "›"; color: var(--green-hi); margin-right: 8px; font-weight: 800; }
.shot { margin: 48px 0 0; }
.shot img { display: block; margin: 0 auto; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); max-width: 880px; width: 100%; }
.shot figcaption { text-align: center; color: #b9cfc2; font-size: .92rem; margin: 14px auto 0; max-width: 40em; }

/* FAQ */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); padding-right: 40px; }

/* Contact */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; } }
.nospam { font-size: .95rem; color: var(--ink-soft); border-left: 3px solid var(--accent); padding-left: 14px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .form-card { padding: 36px; } }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-switch legend { grid-column: 1 / -1; }
.type-switch label { position: relative; }
.type-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.type-switch span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px; border: 2px solid var(--line); border-radius: 12px; font-weight: 600; }
.type-switch input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); }
.type-switch input:focus-visible + span { outline: 3px solid #f0b429; outline-offset: 2px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--ink-soft); font-size: .9em; }
input[type=text], input[type=email], select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; min-height: 48px; }
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 0; }
[aria-invalid=true] { border-color: var(--error) !important; }
.hint { font-size: .88rem; color: var(--ink-soft); margin: 6px 0 0; }
.err { color: var(--error); font-size: .9rem; font-weight: 600; margin: 6px 0 0; }
.err:empty { display: none; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 4px 12px; align-items: start; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--accent); }
.check label { font-weight: 400; font-size: .95rem; }
.check .err { grid-column: 2; }
.form-summary { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.form-success { text-align: center; padding: 24px 8px; }
.form-success h3 { font-size: 1.4rem; margin-top: 16px; }
.form-success p { color: var(--ink-soft); }
.form-success:focus { outline: none; }

/* Legal pages */
.legal { padding: 56px 0 88px; }
.legal h1 { font-size: clamp(1.5rem, 1rem + 3vw, 2.8rem); }
.legal h2 { font-size: 1.25rem; margin-top: 1.8em; }
.todo-note { background: var(--mark); color: var(--ink); padding: 12px 16px; border-radius: 10px; font-weight: 600; }
mark.todo { background: var(--mark); color: var(--ink); padding: 0 4px; border-radius: 4px; }

/* Footer */
.site-footer { background: #0b2219; color: #b9cfc2; padding: 40px 0 28px; font-size: .95rem; }
.site-footer .brand { color: #fff; margin-bottom: 8px; }
.footer-row { display: grid; gap: 20px; }
@media (min-width: 800px) { .footer-row { grid-template-columns: 1.4fr 1fr 1.4fr; align-items: start; } }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: #dbe9e1; }
.site-footer a[aria-current] { font-weight: 700; color: #9fe0bf; }
.fine { margin-top: 24px; font-size: .85rem; opacity: .75; }

/* Very narrow phones: logo only in the header (the link keeps its accessible name). */
.cta-short { display: none; }
@media (max-width: 560px) { .cta-long { display: none; } .cta-short { display: inline; } }
@media (max-width: 400px) { .lang-code { display: none; } }
@media (max-width: 359px) { .site-header .brand span { display: none; } }
.footer-trust { font-size: .9rem; opacity: .85; }
