/* Pikkola JSON: one design system for the tool, the landing copy and the legal pages.
   Dark by default (an IDE should not be white), light for daylight.
   Font weights stay at 400, 500, 600 and 700. */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/jetbrains-mono.woff2) format("woff2-variations");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/inter.woff2) format("woff2-variations");
}

:root {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1200px;
  --r: 12px;
}

/* The Korean face is injected by theme.js only when the page is Korean; an
   English or Japanese visitor never downloads a Hangul subset. */
html[lang="ko"] {
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
html[lang="ja"] {
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* Japanese wraps between characters; keep-all is a Korean rule. */
html[lang="ja"] body { word-break: normal; }

html[data-theme="dark"] {
  --bg: #0c0f14;
  --bg-2: #0f131a;
  --panel: #121721;
  --panel-2: #161c28;
  --panel-3: #1b2230;
  --line: #232b39;
  --line-soft: #1a212d;
  --ink: #e6eaf2;
  --ink-2: #c3cad8;
  --muted: #8d97a9;
  --faint: #677184;
  --accent: #7aa2ff;
  --accent-2: #9db9ff;
  --accent-ink: #0b1020;
  --accent-soft: rgba(122, 162, 255, 0.12);
  --ok: #57cf9e;
  --ok-soft: rgba(87, 207, 158, 0.12);
  --bad: #ff7b7b;
  --bad-soft: rgba(255, 123, 123, 0.1);
  --warn: #e7c268;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.3);
  --tok-key: #8fb4ff;
  --tok-str: #9fd39a;
  --tok-num: #e6b07a;
  --tok-bool: #c79cf0;
  --tok-com: #6b7789;
  --grid: rgba(255, 255, 255, 0.028);
}

html[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-2: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f6f8fb;
  --panel-3: #eef2f7;
  --line: #dfe4ec;
  --line-soft: #e9edf3;
  --ink: #151b26;
  --ink-2: #333d4d;
  --muted: #5f6b7e;
  --faint: #8a94a5;
  --accent: #2b5fd9;
  --accent-2: #1d4bbd;
  --accent-ink: #ffffff;
  --accent-soft: rgba(43, 95, 217, 0.08);
  --ok: #17845c;
  --ok-soft: rgba(23, 132, 92, 0.09);
  --bad: #c23a3a;
  --bad-soft: rgba(194, 58, 58, 0.07);
  --warn: #96701a;
  --shadow: 0 22px 50px rgba(20, 30, 50, 0.1);
  --shadow-sm: 0 6px 18px rgba(20, 30, 50, 0.08);
  --tok-key: #1f56c7;
  --tok-str: #24734a;
  --tok-num: #a2510d;
  --tok-bool: #7a3fb0;
  --tok-com: #8a94a5;
  --grid: rgba(20, 30, 50, 0.035);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}
[id] { scroll-margin-top: 74px; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; position: relative; z-index: 1; }
.mono { font-family: var(--mono); font-variant-ligatures: none; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 8px; z-index: 100;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.brand-mark { width: 22px; height: 22px; color: var(--accent); }
.brand-name { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.brand-tool {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.site-nav { display: flex; gap: 2px; margin-left: 10px; }
.site-nav a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
}
.site-nav a:hover { color: var(--ink); background: var(--panel-2); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-field { position: relative; display: inline-flex; align-items: center; }
.lang-globe { position: absolute; left: 9px; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.lang-field select {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 24px 6px 27px;
  font-size: 12px;
  color: var(--ink-2);
  font-family: var(--sans);
  cursor: pointer;
}
.icon-btn {
  width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  color: var(--muted);
}
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
html[data-theme="dark"] .ico-sun { display: none; }
html[data-theme="light"] .ico-moon { display: none; }

/* --------------------------------------------------------------- hero */

.hero { padding: 58px 0 30px; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 52px;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 17em;
}
.hero .lede { margin-top: 20px; font-size: 16px; line-height: 1.68; color: var(--muted); max-width: 45ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-facts {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: 10px 24px; margin: 28px 0 0; padding: 0;
  font-size: 12.5px; color: var(--muted);
}
.hero-facts li { display: inline-flex; align-items: baseline; gap: 6px; }
.hero-facts b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 17px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s, transform .14s;
  white-space: nowrap;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn-quiet { background: transparent; }
.btn.toggle.is-on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-2); }
html[data-theme="light"] .btn.toggle.is-on { color: var(--accent); }

/* mock window */
.hero-visual { position: relative; }
.mock {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10.5px;
  transform: perspective(1400px) rotateY(-3deg) rotateX(1.2deg);
  transform-origin: 50% 50%;
}
.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-2);
  font-size: 10.5px;
  color: var(--muted);
}
.tl { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tl:nth-child(1) { background: color-mix(in srgb, var(--bad) 65%, var(--line)); }
.tl:nth-child(2) { background: color-mix(in srgb, var(--warn) 65%, var(--line)); }
.tl:nth-child(3) { background: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.mock-name { margin-left: 8px; }
.mock-ok {
  margin-left: auto; color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line));
  border-radius: 4px; padding: 1px 5px; font-size: 9.5px;
}
.mock-body { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); }
.mock-lines { padding: 11px 8px 13px 4px; border-right: 1px solid var(--line); overflow: hidden; }
.ml { display: block; white-space: pre; line-height: 1.75; }
.ln { display: inline-block; width: 16px; margin-right: 10px; text-align: right; color: var(--faint); font-size: 10px; }
.ml .p { color: var(--muted); }
.ml .pk { color: var(--tok-key); }
.ml .ps { color: var(--tok-str); }
.ml .pn { color: var(--tok-num); }
.ml .pb { color: var(--tok-bool); }
.ml .pnul { color: var(--tok-bool); }
.mt-row { line-height: 1.9; }
.mock-caret { display: inline-block; width: 1px; height: 11px; background: var(--accent); align-self: center; animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { opacity: 0; } }
.mock-tree { padding: 11px 8px; font-size: 10.2px; overflow: hidden; }
.mt-row { display: flex; align-items: center; gap: 5px; line-height: 1.95; white-space: nowrap; }
.mt-c { width: 8px; color: var(--faint); font-size: 8px; }
.mt-k { color: var(--tok-key); }
.mt-k::after { content: ":"; color: var(--faint); }
.mt-t { color: var(--faint); font-size: 9.5px; }
.mt-v { color: var(--tok-str); }
.mt-v.num { color: var(--tok-num); }
.mt-v.bool { color: var(--tok-bool); }
.mt-in { padding-left: 13px; }
.mt-dim { opacity: .55; }
.mock-foot { display: flex; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--line-soft); background: var(--panel-2); }
.mock-chip {
  font-size: 9.5px; letter-spacing: .04em;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 6px; color: var(--muted);
}

/* ---------------------------------------------------------- workbench */

.workbench { padding: 34px 0 64px; }
.tool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.tool-head h2 { font-size: clamp(20px, 2.4vw, 26px); }
.tool-head .eyebrow { margin-bottom: 8px; }
.tool-hint { font-size: 11.5px; color: var(--faint); display: flex; align-items: center; gap: 5px; }
kbd {
  font-family: var(--mono); font-size: 10px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 2px 5px; background: var(--panel-2); color: var(--muted);
}
.bench {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.bench-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-2);
}
.bar-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.select-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.select-wrap select {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  border-radius: 6px;
  padding: 4px 22px 4px 8px;
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 52%, calc(100% - 8px) 52%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.bench-body { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); min-height: 480px; }
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pane-editor { border-right: 1px solid var(--line-soft); }
.pane-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: color-mix(in srgb, var(--panel-2) 60%, var(--panel));
}
.pane-name { color: var(--ink-2); }
.pane-meta { font-size: 10.5px; color: var(--faint); }
.editor-wrap {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 300px;
  background: var(--bg-2);
  overflow: hidden;
  transition: box-shadow .15s;
}
.editor-wrap.is-drop { box-shadow: inset 0 0 0 2px var(--accent); }
.gutter {
  margin: 0;
  padding: 12px 8px 40px 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--faint);
  text-align: right;
  background: color-mix(in srgb, var(--bg-2) 70%, var(--panel));
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
  user-select: none;
  white-space: pre;
  width: 3.4ch;
  flex: none;
}
#jsonInput {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  padding: 12px 14px 40px;
  tab-size: 2;
  caret-color: var(--accent);
  white-space: pre;
  overflow: auto;
}
#jsonInput::placeholder { color: var(--faint); }
.code, .error-snippet, .gutter, #jsonInput { word-break: normal; }
.status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--panel);
}
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status-pill.is-ok { color: var(--ok); }
.status-pill.is-ok .status-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-pill.is-bad { color: var(--bad); }
.status-pill.is-bad .status-dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.status-facts { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.error-card {
  border-top: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line));
  background: var(--bad-soft);
  padding: 10px 12px 12px;
}
.error-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.error-where { font-family: var(--mono); font-size: 11px; color: var(--bad); }
.error-msg { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; word-break: break-word; }
.error-snippet {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--bad) 20%, var(--line));
  border-radius: 6px;
  padding: 8px 10px;
  overflow: auto;
  max-height: 150px;
}

/* output pane */
.tabs {
  display: flex; align-items: flex-end; gap: 2px;
  padding: 6px 8px 0;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--panel-2) 60%, var(--panel));
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: transparent;
  padding: 7px 11px 8px;
  font-size: 12.5px;
  color: var(--muted);
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--ink); background: var(--panel-2); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--accent); background: var(--panel); }
.out-tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  min-height: 44px;
}
.out-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.out-right { margin-left: auto; display: flex; gap: 6px; }
.search { position: relative; display: inline-flex; align-items: center; }
.search svg { position: absolute; left: 8px; width: 13px; height: 13px; color: var(--faint); pointer-events: none; }
.search input {
  width: 200px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  border-radius: 6px;
  padding: 5px 9px 5px 26px;
  font-size: 12px;
  font-family: var(--sans);
}
.search input::placeholder { color: var(--faint); }
.mini-group { display: flex; gap: 4px; }
.mini-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  cursor: pointer;
}
.mini-btn:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); }
.mini-btn:disabled { opacity: .45; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg-btn { border: 0; background: transparent; padding: 4px 9px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.seg-btn.is-on { background: var(--accent-soft); color: var(--accent-2); }
html[data-theme="light"] .seg-btn.is-on { color: var(--accent); }
.root-name { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.root-name input {
  width: 120px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink);
  border-radius: 6px; padding: 4px 8px; font-family: var(--mono); font-size: 12px;
}
.out-body { flex: 1; min-height: 0; overflow: auto; background: var(--panel); position: relative; }
.tree { padding: 6px 0 18px; }
.trow {
  display: flex; align-items: center; gap: 5px;
  padding: 2px 10px 2px 0;
  font-family: var(--mono);
  font-size: 12.2px;
  line-height: 1.75;
  min-height: 27px;
  position: relative;
  border-radius: 4px;
  white-space: nowrap;
}
.trow:hover { background: var(--panel-2); }
.trow.is-more { padding-left: 34px !important; }
.more-btn {
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--sans);
}
.more-btn:hover { color: var(--ink); border-color: var(--accent); }
.tw {
  width: 16px; height: 16px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; background: transparent; color: var(--faint);
  cursor: pointer; padding: 0; border-radius: 3px;
}
.tw:hover { color: var(--ink); background: var(--panel-3); }
.tw svg { width: 9px; height: 9px; transition: transform .12s; }
.tw[aria-expanded="true"] svg { transform: rotate(90deg); }
.tw-sp { width: 16px; flex: none; }
.tkey { color: var(--tok-key); }
.tkey.is-index { color: var(--faint); }
.tkey.is-root { color: var(--muted); }
.tcolon { color: var(--faint); margin-left: -2px; }
.tval { color: var(--ink-2); }
.tval.tstring { color: var(--tok-str); }
.tval.tnumber { color: var(--tok-num); }
.tval.tboolean, .tval.tnull { color: var(--tok-bool); }
.tval.tbracket { color: var(--faint); }
.tcount { color: var(--faint); font-size: 10.5px; }
.ttype { color: var(--faint); font-size: 9.5px; letter-spacing: .03em; opacity: 0; margin-left: 2px; }
.trow:hover .ttype { opacity: .8; }
.tacts { margin-left: auto; display: inline-flex; gap: 3px; opacity: 0; }
.trow:hover .tacts, .trow:focus-within .tacts { opacity: 1; }
.tact {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.5;
}
.tact:hover { color: var(--accent-2); border-color: var(--accent); }
.tree-nomatch { padding: 26px 18px; color: var(--muted); font-size: 13px; }
.code {
  margin: 0;
  padding: 14px 16px 24px;
  font-family: var(--mono);
  font-size: 12.4px;
  line-height: 1.62;
  white-space: pre;
  tab-size: 2;
  color: var(--ink-2);
}
.code.small { font-size: 11.2px; line-height: 1.6; padding: 12px 14px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line-soft); overflow: auto; margin-top: 12px; }
.c-kw { color: var(--tok-bool); }
.c-str { color: var(--tok-str); }
.c-num { color: var(--tok-num); }
.c-com { color: var(--tok-com); font-style: italic; }
.c-key { color: var(--tok-key); }
.c-ty { color: var(--accent-2); }
html[data-theme="light"] .c-ty { color: var(--accent); }
.out-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 24px; color: var(--muted); text-align: center; }
.out-empty svg { width: 38px; height: 38px; color: var(--faint); }
.out-empty p { font-size: 13px; max-width: 26em; }
.bench-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 13px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--faint);
  background: var(--panel-2);
}

/* ------------------------------------------------------------- sections */

.section { padding: 72px 0; position: relative; }
.section-alt { background: color-mix(in srgb, var(--panel) 55%, transparent); border-block: 1px solid var(--line-soft); }
.section-head { max-width: 700px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(23px, 3vw, 32px); line-height: 1.22; }
.section-lede { margin-top: 14px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 20px 20px 22px;
  position: relative;
}
.card-num { font-family: var(--mono); font-size: 10.5px; color: var(--accent-2); letter-spacing: .08em; }
html[data-theme="light"] .card-num { color: var(--accent); }
.card h3 { font-size: 15.5px; margin-top: 10px; letter-spacing: -0.01em; }
.card p { margin-top: 9px; font-size: 13.5px; line-height: 1.68; color: var(--muted); }

.convert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.convert-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 18px;
  min-width: 0;
}
.convert-card header { display: flex; align-items: center; gap: 9px; }
.convert-card h3 { font-size: 14.5px; font-weight: 600; }
.lang-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
}
html[data-theme="light"] .lang-tag { color: var(--accent); }
.convert-card p { margin-top: 10px; font-size: 12.8px; line-height: 1.65; color: var(--muted); }
.convert-note {
  margin-top: 22px; padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.7;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; counter-reset: step; }
.steps li { padding-top: 16px; border-top: 1px solid var(--line); }
.step-n {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  margin-bottom: 12px;
}
html[data-theme="light"] .step-n { color: var(--accent); }
.steps h3 { font-size: 15px; }
.steps p { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }

.faq { border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 15px 28px 15px 0;
  font-size: 14.5px;
  font-weight: 500;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 4px; top: 22px;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 25px; }
.faq details p { padding: 0 30px 18px 0; font-size: 14px; line-height: 1.72; color: var(--muted); }

.shelf-strip { border-top: 1px solid var(--line); padding: 34px 0; }
.shelf-strip h2 { font-size: 12px; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 14px; }
.shelf-links { display: flex; flex-wrap: wrap; gap: 8px; }
.shelf-links a {
  display: inline-flex; align-items: baseline; gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--panel);
}
.shelf-links a span { font-size: 11px; color: var(--faint); }
.shelf-links a:hover { border-color: var(--accent); color: var(--accent-2); }
html[data-theme="light"] .shelf-links a:hover { color: var(--accent); }

/* --------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px 40px; align-items: start; }
.footer-brand .brand-name { font-size: 15px; font-weight: 600; }
.footer-brand p { margin-top: 7px; font-size: 12.5px; color: var(--muted); max-width: 34ch; line-height: 1.6; }
.footer-links { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); justify-items: start; }
.footer-links a:hover { color: var(--ink); }
.footer-fine {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--faint);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  background: var(--panel-3);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 80;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ----------------------------------------------------------- legal pages */

.narrow { max-width: 820px; }
.doc { padding: 52px 0 30px; }
.doc h1 { font-size: clamp(26px, 3.4vw, 34px); }
.doc .updated { font-size: 12px; color: var(--faint); margin-top: 8px; font-family: var(--mono); }
.doc .lede-doc { font-size: 15.5px; color: var(--ink-2); margin-top: 18px; line-height: 1.7; }
.doc h2 { font-size: 17px; margin: 34px 0 10px; }
.doc p, .doc li { font-size: 14px; color: var(--muted); line-height: 1.75; }
.doc p + p { margin-top: 10px; }
.doc ul, .doc ol { margin: 10px 0 0; padding-left: 20px; }
.doc li + li { margin-top: 5px; }
.doc a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
html[data-theme="light"] .doc a { color: var(--accent); }
.doc code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-soft); }
.doc .lang-block[hidden] { display: none; }

/* --------------------------------------------------------------- media */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .hero .lede { max-width: 60ch; }
  .hero-visual { max-width: 560px; }
  .mock { transform: none; }
  .bench-body { grid-template-columns: 1fr; }
  .pane-editor { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .editor-wrap { min-height: 260px; }
  .out-body { min-height: 380px; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .section { padding: 56px 0; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--wrap), 100% - 28px); }
  .hero { padding: 36px 0 18px; }
  .hero h1 { font-size: clamp(27px, 8vw, 34px); }
  .hero .lede { font-size: 14.5px; }
  .hero-visual { display: none; }
  .hero-facts { gap: 8px 16px; }
  .workbench { padding-bottom: 44px; }
  .bench-bar { padding: 8px; }
  .bar-group { gap: 5px; }
  .btn-sm { padding: 5px 9px; font-size: 12px; }
  .select-wrap span { display: none; }
  .bench-body { min-height: 0; }
  .editor-wrap { min-height: 200px; max-height: 34vh; }
  .tabs { padding-left: 4px; }
  .tab { padding: 7px 9px 8px; font-size: 12px; }
  .out-tools { padding: 7px 9px; }
  .search input { width: 100%; }
  .out-left { flex: 1 1 100%; }
  .out-right { margin-left: 0; }
  .trow { font-size: 11.5px; }
  .tacts { opacity: 1; }
  .ttype { display: none; }
  .section-head { margin-bottom: 26px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-fine { flex-direction: column; gap: 4px; }
  .doc { padding-top: 34px; }
}

@media (hover: none) {
  .tacts { opacity: 1; }
}

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