/* RouJet 路捷 入口站（X-459）｜品牌色照 docs/80 §12：終端墨 #142D24、指令綠 #287158、游標萊姆 #C9F56F（只用在深底）、反白 #FBF9FF */
@font-face { font-family: 'RJ Sans'; font-weight: 400; font-display: swap; src: url('fonts/rj-sans-tc-400.woff2?v=x478') format('woff2'); }
@font-face { font-family: 'RJ Sans'; font-weight: 700; font-display: swap; src: url('fonts/rj-sans-tc-700.woff2?v=x478') format('woff2'); }
@font-face { font-family: 'RJ Sans SC'; font-weight: 400; font-display: swap; src: url('fonts/rj-sans-sc-400.woff2?v=x478') format('woff2'); }
@font-face { font-family: 'RJ Sans SC'; font-weight: 700; font-display: swap; src: url('fonts/rj-sans-sc-700.woff2?v=x478') format('woff2'); }
@font-face { font-family: 'RJ Mono'; font-weight: 400; font-display: swap; src: url('fonts/rj-mono-400.woff2?v=x478') format('woff2'); }
@font-face { font-family: 'RJ Mono'; font-weight: 700; font-display: swap; src: url('fonts/rj-mono-700.woff2?v=x478') format('woff2'); }

:root {
  --ink: #142D24; --ink-2: #0E211A; --ink-3: #1C3A2F; --ink-line: #2A4A3E;
  --green: #287158; --green-d: #1F5A46; --lime: #C9F56F; --white: #FBF9FF;
  --paper: #F4F6F1; --card: #FFFFFF; --line: #DCE3DA; --text: #142D24; --muted: #4A5B53; --muted-d: #A9BDB3;
  --amber: #F2B45C;
  --sans: 'RJ Sans', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  --mono: 'RJ Mono', 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --r: 14px; --w: 1200px;
}
:lang(zh-CN) { --sans: 'RJ Sans SC', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; }
:lang(ja) { --sans: 'RJ Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--paper); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
.light :focus-visible { outline-color: var(--green); }

/* ── 選單 ── */
.top { position: sticky; top: 0; z-index: 30; background: rgba(20, 45, 36, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(201, 245, 111, .08); color: var(--white); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted-d); transition: color .15s; }
.nav a:hover { color: var(--white); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-sel { background: transparent; color: var(--muted-d); border: 1px solid var(--ink-line); border-radius: 8px; padding: 6px 8px; font: 14px var(--sans); }
.lang-sel option { color: var(--ink); }
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 8px; font: 700 16px var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn.lime { background: var(--lime); color: var(--ink); box-shadow: 0 0 0 0 rgba(201, 245, 111, .5); }
.btn.lime:hover { box-shadow: 0 6px 26px -6px rgba(201, 245, 111, .65); }
.btn.ghost { border-color: rgba(251, 249, 255, .28); color: var(--white); background: transparent; }
.btn.ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn.green { background: var(--green); color: var(--white); }
.btn.green:hover { background: var(--green-d); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.menu-btn { display: none; background: none; border: 1px solid var(--ink-line); color: var(--white); border-radius: 8px; width: 44px; height: 40px; font-size: 20px; }

/* ── 第一屏 ── */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; min-height: min(92vh, 860px); display: flex; align-items: center; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(20, 45, 36, .97) 0%, rgba(20, 45, 36, .86) 30%, rgba(20, 45, 36, .15) 58%, rgba(20, 45, 36, 0) 75%), linear-gradient(0deg, rgba(20, 45, 36, 1) 0%, rgba(20, 45, 36, 0) 22%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 72px; padding-bottom: 96px; }
.hero-copy { max-width: 600px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 14px var(--mono); color: var(--lime); letter-spacing: .04em; padding: 6px 12px; border: 1px solid rgba(201, 245, 111, .3); border-radius: 999px; background: rgba(201, 245, 111, .06); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.12; margin: 22px 0 18px; font-weight: 700; letter-spacing: -.01em; }
.hero h1 .hl { color: var(--lime); }
.hero .slogan { height: 30px; width: auto; margin: 0 0 18px; opacity: .95; }
.hero .lede { font-size: 19px; color: #CFE0D7; margin: 0 0 30px; max-width: 540px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; font: 13px var(--mono); color: var(--muted-d); }
.hero .chips span { padding: 5px 10px; border: 1px solid var(--ink-line); border-radius: 6px; background: rgba(14, 33, 26, .6); }
.scroll-hint { position: absolute; z-index: 2; left: 50%; bottom: 22px; transform: translateX(-50%); font: 12px var(--mono); color: var(--muted-d); letter-spacing: .2em; }

/* ── 區塊 ── */
section { padding: 88px 0; }
.sec-head { max-width: 760px; margin-bottom: 44px; }
.kicker { font: 700 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.dark .kicker { color: var(--lime); }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.25; margin: 10px 0 14px; }
.sec-head p { color: var(--muted); font-size: 18px; margin: 0; }
.dark { background: var(--ink); color: var(--white); }
.dark .sec-head p { color: #CFE0D7; }
.tag { display: inline-block; font: 700 12px var(--sans); padding: 3px 9px; border-radius: 999px; background: #DDF0E6; color: #0E4734; vertical-align: middle; margin-left: 6px; letter-spacing: .02em; }
.dark .tag { background: rgba(201, 245, 111, .14); color: var(--lime); }
.tag.plan { background: #EEF0EA; color: #5A6660; }
.dark .tag.plan { background: rgba(251, 249, 255, .08); color: var(--muted-d); }

/* 三個賣點 */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 28px; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.pillar:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -24px rgba(20, 45, 36, .45); }
.pillar .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; margin-bottom: 18px; }
.pillar .ico svg { width: 24px; height: 24px; stroke: var(--lime); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pillar h3 { font-size: 21px; margin: 0 0 10px; }
.pillar p { margin: 0; color: var(--muted); font-size: 16px; }

/* ── 互動路由動線 ── */
.router { background: var(--ink-2); color: var(--white); padding: 96px 0 104px; position: relative; overflow: hidden; }
.router .sec-head p { color: #CFE0D7; }
.scen { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.scen button { font: 500 15px var(--sans); color: #DDEBE4; background: rgba(251, 249, 255, .04); border: 1px solid var(--ink-line); border-radius: 999px; padding: 10px 18px; cursor: pointer; transition: all .15s; display: inline-flex; gap: 8px; align-items: center; }
.scen button:hover { border-color: rgba(201, 245, 111, .55); color: var(--white); }
.scen button[aria-pressed='true'] { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 700; }
.scen button .k { font: 12px var(--mono); opacity: .7; }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: stretch; }
.flow { position: relative; border-radius: 18px; border: 1px solid var(--ink-line); background: radial-gradient(1200px 600px at 30% 50%, rgba(40, 113, 88, .22), rgba(14, 33, 26, 0) 60%), var(--ink-2); min-height: 640px; overflow: hidden; }
.flow canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.why { border-radius: 18px; border: 1px solid var(--ink-line); background: var(--ink); padding: 26px 24px; display: flex; flex-direction: column; gap: 16px; }
.why .req { font: 15px var(--mono); color: var(--white); background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 10px; padding: 12px 14px; min-height: 64px; }
.why .req::before { content: '> '; color: var(--lime); }
.why h4 { margin: 0; font: 700 13px var(--mono); letter-spacing: .1em; color: var(--muted-d); text-transform: uppercase; }
.why .pick { font-size: 22px; font-weight: 700; color: var(--lime); }
.why ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.why li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15px; color: #D5E4DC; opacity: .35; transition: opacity .35s; }
.why li.on { opacity: 1; }
.why li b { font: 700 12px var(--mono); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ink-line); color: var(--muted-d); }
.why li.on b { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.why .note { margin-top: auto; font-size: 13px; color: var(--muted-d); border-top: 1px solid var(--ink-line); padding-top: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font: 13px var(--mono); color: var(--muted-d); }
.legend i { display: inline-block; width: 22px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }

/* auto 四步 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.step { padding: 30px 26px; border-right: 1px solid var(--line); position: relative; }
.step:last-child { border-right: 0; }
.step .n { font: 700 40px var(--mono); color: var(--green); line-height: 1; opacity: .9; }
.step h3 { margin: 16px 0 8px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* 程式範例 */
.code-sec { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.code-sec ul { padding: 0; margin: 22px 0 0; list-style: none; display: grid; gap: 14px; }
.code-sec li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--muted); }
.code-sec li::before { content: ''; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FBF9FF' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat; }
.term { background: var(--ink); color: var(--white); border-radius: 16px; overflow: hidden; border: 1px solid var(--ink-3); box-shadow: 0 30px 70px -40px rgba(20, 45, 36, .8); }
.term .bar { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--ink-line); background: var(--ink-2); }
.term .tabs button { font: 13px var(--mono); color: var(--muted-d); background: none; border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.term .tabs button[aria-selected='true'] { background: var(--ink-3); color: var(--lime); }
.term .copy { margin-left: auto; font: 13px var(--mono); color: var(--muted-d); background: none; border: 1px solid var(--ink-line); border-radius: 6px; padding: 5px 12px; cursor: pointer; }
.term .copy.ok { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.term pre { margin: 0; padding: 22px 24px; font: 14.5px/1.7 var(--mono); overflow-x: auto; min-height: 300px; white-space: pre; }
.term .c { color: #7E968B; } .term .s { color: var(--lime); } .term .k { color: #8FD3B6; }
.term .caret { display: inline-block; width: 8px; height: 18px; background: var(--lime); vertical-align: -3px; animation: blink 1s steps(2) infinite; }

/* 模型預覽 */
.models { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.models .scroll { overflow-x: auto; }
.models table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.models th, .models td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.models th { font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #F8FAF6; }
.models tr:last-child td { border-bottom: 0; }
.models td.m { font-family: var(--mono); font-size: 14px; }
.models tr.auto td { background: #F1F9E4; }
.models .empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.models .foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; gap: 10px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.reveal.in { opacity: 1; transform: none; }

/* 企業、算力夥伴、評測榜 */
.duo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-d { border: 1px solid var(--ink-line); border-radius: var(--r); padding: 30px 28px; background: linear-gradient(160deg, rgba(40, 113, 88, .18), rgba(20, 45, 36, 0) 60%), var(--ink-2); display: flex; flex-direction: column; gap: 12px; }
.card-d h3 { margin: 0; font-size: 22px; }
.card-d p { margin: 0; color: #CFE0D7; font-size: 16px; }
.card-d ul { margin: 4px 0 0; padding-left: 18px; color: #B9CCC2; font-size: 15px; display: grid; gap: 6px; }
.card-d .btn { margin-top: auto; align-self: flex-start; }

/* 收尾 */
.final { text-align: center; padding: 104px 0; background: radial-gradient(800px 380px at 50% 100%, rgba(201, 245, 111, .14), rgba(20, 45, 36, 0) 70%), var(--ink); color: var(--white); }
.final img.sym { width: 76px; height: 76px; margin: 0 auto 18px; }
.final h2 { margin-top: 0; }
.final p { color: #CFE0D7; margin: 0 auto 30px; max-width: 560px; font-size: 18px; }
.final .cta { justify-content: center; }
footer { background: var(--ink-2); color: var(--muted-d); font-size: 14px; padding: 40px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--white); }
footer .co { line-height: 1.7; }
footer .co b { color: var(--white); font-weight: 500; }

/* ── 窄螢幕 ── */
/* ═════ X-478 子頁：模型目錄、計費方式、評測榜、API 文件 ═════ */
.nav a[aria-current='page'] { color: var(--lime); }
.page-head { padding: 64px 0 32px; }
.page-head h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.2; margin: 10px 0 12px; }
.page-head p { color: var(--muted); font-size: 18px; max-width: 760px; margin: 0; }
.page-sec { padding: 0 0 96px; }
.page-sec h2 { font-size: 24px; margin: 44px 0 14px; }
.page-sec .wrap > h2:first-child { margin-top: 0; }
.note-s { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.models td small { display: block; color: var(--muted); font: 12px var(--mono); margin-top: 2px; }
.models td.m small { font-size: 12px; }
.models th.num, .models td.num { text-align: right; white-space: nowrap; }
.models tr.stale td { color: #8A9A92; }
.models tr.stale .sbar i { background: #C7D1CB; }
.models td.m .tag { font-family: var(--sans); }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 840px; }
.rules li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px 14px 44px; position: relative; }
.rules li::before { content: ''; position: absolute; left: 18px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn.line { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.line:hover { border-color: var(--green); color: var(--green); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cats button { font: 600 14px var(--sans); padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.cats button:hover { border-color: var(--green); }
.cats button[aria-pressed='true'] { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.sbar { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.sbar i { display: block; height: 8px; border-radius: 4px; background: var(--green); }
.sbar b { font: 700 14px var(--mono); }
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; align-items: start; }
.doc .toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.doc .toc a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.doc .toc a:hover { background: #E8EFE6; color: var(--text); }
.doc article { max-width: 880px; min-width: 0; }
.doc article h2 { font-size: 26px; margin: 52px 0 12px; scroll-margin-top: 84px; }
.doc article h2:first-child { margin-top: 0; }
.doc article h3 { font-size: 18px; margin: 26px 0 8px; }
.doc article p, .doc article li { line-height: 1.8; }
.doc code { font: 14px var(--mono); background: #E6EEE4; padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.doc pre { background: var(--ink); color: #DDEBE3; border-radius: 12px; padding: 18px 20px; overflow-x: auto; font: 13.5px/1.65 var(--mono); margin: 12px 0 18px; }
.doc pre code { background: none; padding: 0; color: inherit; font: inherit; overflow-wrap: normal; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc th { font: 700 12px var(--mono); letter-spacing: .06em; color: var(--muted); background: #F8FAF6; white-space: nowrap; }
.doc td:first-child { white-space: nowrap; }

@media (max-width: 1020px) {
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .doc .toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--ink); padding: 14px 24px 22px; gap: 14px; border-bottom: 1px solid var(--ink-line); }
  .menu-btn { display: inline-block; }
  .stage { grid-template-columns: 1fr; }
  .flow { min-height: 520px; }
  .pillars, .duo { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .code-sec { grid-template-columns: 1fr; gap: 32px; }
  .hero::after { background: linear-gradient(180deg, rgba(20, 45, 36, .55) 0%, rgba(20, 45, 36, .92) 55%, rgba(20, 45, 36, 1) 100%); }
}
@media (max-width: 600px) {
  .top .wrap { gap: 12px; } .top .right { gap: 6px; } .lang-sel { max-width: 70px; } .top .right .btn.sm { padding-left: 12px; padding-right: 12px; } .top .right .sr { position: absolute; } /* X-478：390 寬時右上角不再超出畫面 */
  body { font-size: 16px; }
  .top .right .hide-s { display: none; }
  section { padding: 64px 0; }
  .hero { min-height: auto; }
  .hero .wrap { padding-top: 48px; padding-bottom: 72px; }
  .hero .slogan { height: 24px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .flow { min-height: 460px; }
  .term pre { font-size: 13px; padding: 18px; min-height: 260px; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
