/* Kumo website */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #16202e;
  --muted: #5a6779;
  --border: #e2e7ef;
  --accent: #2563eb;
  --accent-soft: #e8f0fe;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --ok: #15803d;
  --warn-bg: #fff7e6;
  --warn-border: #f5c26b;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2b;
    --text: #e6ebf3;
    --muted: #9aa7ba;
    --border: #22304a;
    --accent: #60a5fa;
    --accent-soft: #15233d;
    --code-bg: #060b16;
    --warn-bg: #2a2110;
    --warn-border: #8a6a2a;
    --ok: #4ade80;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.65; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

/* Show only the active language. Default (no JS) = Vietnamese. */
html[data-lang="vi"] [data-l]:not([data-l="vi"]),
html[data-lang="en"] [data-l]:not([data-l="en"]),
html[data-lang="ja"] [data-l]:not([data-l="ja"]) { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
header.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
nav.links { display: flex; gap: 18px; margin-left: auto; align-items: center; }
nav.links a { color: var(--muted); font-weight: 500; }
nav.links a:hover, nav.links a.active { color: var(--text); text-decoration: none; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch button { background: none; border: 0; color: var(--muted); padding: 5px 9px; cursor: pointer; font: inherit; font-size: 13px; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* Hero */
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 720px; margin: 0 auto 32px; }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 9px; font-weight: 600; border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }

/* Code */
pre, code { font-family: var(--mono); font-size: 14px; }
:not(pre) > code { background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.code { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: 10px; margin: 14px 0; text-align: left; }
.code pre { margin: 0; padding: 16px 64px 16px 18px; overflow-x: auto; white-space: pre; }
.code .copy { position: absolute; top: 8px; right: 8px; background: #1e293b; color: #cbd5e1; border: 1px solid #334155; border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer; font-family: var(--font); }
.code .copy.done { color: #4ade80; border-color: #166534; }
.hero .code { max-width: 760px; margin: 0 auto; }
.prompt { color: #64748b; user-select: none; }

/* Sections */
section.block { padding: 48px 0; border-top: 1px solid var(--border); }
section.block h2 { font-size: 28px; margin: 0 0 8px; }
section.block p.sub { color: var(--muted); margin: 0 0 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { font-size: 22px; margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--accent-soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
td.yes { color: var(--ok); font-weight: 600; }

.note { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.note.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* Docs layout */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; padding: 36px 0 64px; }
.toc { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--muted); }
.toc li a:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
article.doc h1 { font-size: 34px; margin: 0 0 8px; }
article.doc h2 { font-size: 24px; margin: 44px 0 10px; padding-top: 12px; border-top: 1px solid var(--border); scroll-margin-top: 76px; }
article.doc h3 { font-size: 18px; margin: 26px 0 6px; scroll-margin-top: 76px; }
article.doc li { margin: 4px 0; }
article.doc ol.steps > li { margin: 10px 0; }

footer.bottom { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
code.sha { font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .docs { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; max-height: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: var(--surface); }
  nav.links a.hide-sm { display: none; }
  .hero { padding-top: 48px; }
}
