/* Pikkola HAR: ink on warm paper, one indigo accent, and a waterfall where the
   colour of a segment is the phase of the request. Weights stay at 400 to 700. */

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

:root {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1180px;
  --r: 14px;
  --r-sm: 8px;
}
html[lang="ko"] {
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}
html[lang="ko"] body { font-weight: 500; }
html[lang="ko"] h1,
html[lang="ko"] h2,
html[lang="ko"] h3 { font-weight: 700; }
html[lang="ja"] {
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  word-break: normal;
}
html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3,
html[lang="ja"] p,
html[lang="ja"] li,
html[lang="ja"] summary { line-break: strict; overflow-wrap: break-word; word-break: auto-phrase; }
html[lang="ja"] .hero h1 { max-width: 16ch; font-size: clamp(1.95rem, 3.9vw, 3.05rem); }

html[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-2: #eae7dd;
  --surface: #fdfcf8;
  --surface-2: #f4f1e8;
  --ink: #17191c;
  --ink-2: #4c5158;
  --ink-3: #777c83;
  --line: #dcd7c9;
  --line-2: #c5bfae;
  --accent: #2c3f86;
  --accent-ink: #f6f7ff;
  --accent-soft: #e3e7f5;
  --hot: #a23a2b;
  --hot-soft: #f7e1da;
  --ok: #2d6a4b;
  --ok-soft: #e0eee5;
  --warn: #8a5a12;
  --warn-soft: #f6ead3;
  --paper: #ffffff;
  --shadow: 0 24px 60px -32px rgba(31, 27, 18, 0.32);
  --shadow-sm: 0 10px 24px -18px rgba(31, 27, 18, 0.38);
  --header: rgba(243, 241, 234, 0.88);
  --ph-q: #9aa1a7;
  --ph-dns: #7a5ea8;
  --ph-tcp: #2f7c8b;
  --ph-tls: #3f6aa8;
  --ph-send: #8f7a3c;
  --ph-wait: #c07a2c;
  --ph-recv: #3f7a4f;
  --grid: rgba(44, 63, 134, 0.055);
}
html[data-theme="dark"] {
  --bg: #14161a;
  --bg-2: #1b1e23;
  --surface: #1d2026;
  --surface-2: #23272e;
  --ink: #ecebe5;
  --ink-2: #bcc0c5;
  --ink-3: #8b9097;
  --line: #2b2f36;
  --line-2: #3f454e;
  --accent: #a3b4f2;
  --accent-ink: #101527;
  --accent-soft: #232a44;
  --hot: #e59a87;
  --hot-soft: #3b2520;
  --ok: #93d2ac;
  --ok-soft: #1e3027;
  --warn: #e2bb7a;
  --warn-soft: #322718;
  --paper: #f7f8fb;
  --shadow: 0 28px 70px -30px rgba(0, 0, 0, 0.84);
  --shadow-sm: 0 12px 28px -18px rgba(0, 0, 0, 0.82);
  --header: rgba(20, 22, 26, 0.9);
  --ph-q: #7d858c;
  --ph-dns: #b49ae0;
  --ph-tcp: #6cc0cd;
  --ph-tls: #8ab2ea;
  --ph-send: #cbb173;
  --ph-wait: #e9ac62;
  --ph-recv: #85c79a;
  --grid: rgba(163, 180, 242, 0.07);
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(740px 470px at 88% -8%, rgba(44, 63, 134, 0.10), transparent 70%),
    radial-gradient(540px 380px at 2% 8%, rgba(192, 122, 44, 0.07), transparent 72%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.visually-hidden {
  position: absolute; 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: 16px; top: -60px; z-index: 40;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; font-size: 14px;
}
.skip-link:focus { top: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 66px; }
.brand { display: inline-flex; align-items: baseline; gap: 7px; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark { width: 27px; height: 27px; color: var(--accent); align-self: center; }
.brand-name { font-size: 17px; }
.brand-tool {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); border-left: 1px solid var(--line-2); padding-left: 8px;
}
.site-nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink-3); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.lang-field { position: relative; display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.lang-globe { width: 16px; height: 16px; margin-left: 6px; pointer-events: none; position: absolute; left: 0; }
.lang-field select {
  appearance: none; background: transparent; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); font-size: 12.5px; padding: 6px 10px 6px 26px; cursor: pointer;
}
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn svg { width: 17px; height: 17px; }
html[data-theme="light"] .ico-sun { display: none; }
html[data-theme="dark"] .ico-moon { display: none; }

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

.hero {
  display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
  gap: 48px; align-items: center;
  padding-top: 70px; padding-bottom: 58px;
}
.eyebrow {
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.15rem, 4.3vw, 3.5rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 16ch; }
.hero-lede { margin-top: 22px; font-size: 17px; color: var(--ink-2); max-width: 56ch; }
.facts { display: flex; gap: 34px; margin: 34px 0 0; padding: 0; flex-wrap: wrap; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-family: var(--mono); font-size: 19px; font-weight: 500; color: var(--ink); }
.facts dd { margin: 0; font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }

.hero-art { position: relative; display: grid; place-items: center; min-height: 360px; padding-bottom: 26px; }
.aw-card {
  width: min(452px, 100%); padding: 20px 20px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow); transform: rotate(-0.7deg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
}
.aw-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.aw-tag { font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }
.aw-file { font-size: 13px; color: var(--accent); }
.aw-scale { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 5px; margin-bottom: 8px; }
.aw-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-areas: "m path" "track track"; gap: 3px 8px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.aw-row:last-of-type { border-bottom: 0; }
.aw-m { grid-area: m; font-family: var(--mono); font-size: 8px; align-self: center; text-align: center; padding: 2px 0; border-radius: 3px; letter-spacing: 0.02em; }
.m-get { background: var(--accent-soft); color: var(--accent); }
.m-post { background: var(--ok-soft); color: var(--ok); }
.m-put, .m-patch { background: var(--warn-soft); color: var(--warn); }
.m-delete { background: var(--hot-soft); color: var(--hot); }
.m-other { background: var(--surface-2); color: var(--ink-2); }
.aw-path { grid-area: path; font-size: 10px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-track { grid-area: track; display: flex; height: 7px; background: color-mix(in srgb, var(--line) 62%, transparent); border-radius: 3px; overflow: hidden; }
.aw-track .sg { display: block; height: 100%; }
.sg.q { background: var(--ph-q); }
.sg.dns { background: var(--ph-dns); }
.sg.tcp { background: var(--ph-tcp); }
.sg.tls { background: var(--ph-tls); }
.sg.send { background: var(--ph-send); }
.sg.wait { background: var(--ph-wait); }
.sg.recv { background: var(--ph-recv); }
.w2 { width: 2%; } .w3 { width: 3%; } .w4 { width: 4%; } .w5 { width: 5%; } .w6 { width: 6%; }
.w12 { width: 12%; } .w18 { width: 18%; } .w44 { width: 44%; } .w48 { width: 44%; }
.w86 { width: 80%; } .w88 { width: 82%; }
.aw-ms { display: none; }
.aw-row.is-bad .aw-track { outline: 1px solid color-mix(in srgb, var(--hot) 34%, transparent); outline-offset: 1px; }
.aw-foot {
  display: flex; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line); margin-top: 8px; padding-top: 9px;
  font-size: 10px; color: var(--ink-3);
}
.art-caption {
  position: absolute; bottom: 0; right: 4px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}

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

.section { padding-top: 54px; padding-bottom: 10px; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px;
  margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.03em; }
.section-lede { max-width: 47ch; font-size: 14.5px; color: var(--ink-2); }
.eyebrow + h2 { margin-top: 0; }

/* ---------- the loader ---------- */

.loader {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px; margin-bottom: 16px;
}
.dropzone {
  display: grid; place-items: center; text-align: center; gap: 4px;
  min-height: 176px; padding: 22px;
  border: 1.5px dashed var(--line-2); border-radius: var(--r);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--surface); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { width: 38px; height: 38px; color: var(--accent); margin-bottom: 4px; }
.drop-title { font-weight: 600; font-size: 16.5px; }
.drop-sub { font-size: 12.5px; color: var(--ink-3); max-width: 40ch; }
.load-side {
  display: flex; flex-direction: column; gap: 12px; justify-content: center;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.load-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sample-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.sample-row .mini-label { margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 5px 11px 5px 8px; font-size: 12.5px; cursor: pointer;
}
.chip .n { font-size: 9px; color: var(--ink-3); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.file-meta {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 10px;
}
.file-name { font-size: 12.5px; color: var(--accent); }
.file-facts { font-size: 12px; color: var(--ink-3); }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px;
}
.file-meta .link-btn { margin-left: auto; white-space: nowrap; }
.note { font-size: 12px; color: var(--ink-3); line-height: 1.55; }
.note.is-bad { color: var(--hot); }
.note.center { text-align: center; margin-top: 14px; }
.note.quiet { opacity: .85; }

/* ---------- tool shell and tabs ---------- */

.tool-shell { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.tabbar { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; }
.tabbar button {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 13px 20px; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.tabbar button:hover { color: var(--ink); }
.tabbar button.is-on { color: var(--ink); border-bottom-color: var(--accent); background: var(--surface); }
.t-num { font-size: 9.5px; color: var(--ink-3); }
.tabpanel { padding: 24px 24px 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; }
.panel-head h2 { font-size: 1.24rem; letter-spacing: -0.025em; }
.panel-head p { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); max-width: 66ch; }
.state-pill {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px;
  font-size: 10.5px; color: var(--ink-2); background: var(--surface-2);
}
.state-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.state-pill.is-bad { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 40%, var(--line)); }
.state-pill.is-bad .dot { background: var(--hot); }
.state-pill.is-paused .dot { background: var(--ink-3); }

.subpanel { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px 18px; }
.subpanel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.subpanel-head b { font-size: 13.5px; font-weight: 600; }
.subpanel-head .mono { font-size: 11px; color: var(--ink-3); }
.subpanel-lede { font-size: 12.5px; color: var(--ink-3); margin: -4px 0 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  border-radius: 8px; padding: 9px 16px; font-size: 13.5px; font-weight: 500; cursor: pointer;
  text-decoration: none;
}
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--ink); border-color: var(--ink-3); opacity: 1; }
.btn.small { padding: 7px 13px; font-size: 12.5px; }
.btn.tiny { padding: 5px 10px; font-size: 11.5px; border-radius: 6px; }

/* ---------- overview ---------- */

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi {
  display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: var(--surface);
  min-width: 0;
}
.kpi-label { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.kpi-value { font-size: 21px; font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi:first-child { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
.kpi:first-child .kpi-value { color: var(--accent); }
.kpi.is-bad .kpi-value { color: var(--hot); }

.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; align-items: start; }
.slow-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 10px; align-items: center; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; margin-bottom: 3px; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar-val { flex-shrink: 0; color: var(--ink-3); font-family: var(--mono); font-size: 10px; }
.bar-track { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar-fill.alt { background: var(--ph-wait); }
.bar-n { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); text-align: right; align-self: end; padding-bottom: 2px; }
.more-btn { margin-top: 9px; }

.slow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.slow-item { border-top: 1px solid var(--line); padding: 10px 0 9px; }
.slow-item:first-child { border-top: 0; padding-top: 0; }
.slow-btn { display: block; width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.slow-btn:hover .slow-url { color: var(--accent); }
.slow-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.slow-rank { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.slow-url { font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slow-url .method { font-size: 8.5px; margin-right: 5px; }
.slow-ms { font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.slow-item.is-bad .slow-ms { color: var(--hot); }
.slow-diag { font-size: 11.5px; color: var(--ink-2); margin: 3px 0 0 30px; }
.slow-bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin: 5px 0 0 30px; overflow: hidden; display: flex; }
.slow-bar b { display: block; height: 100%; }

.signal-list { display: flex; flex-direction: column; gap: 8px; }
.signal { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.signal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.signal.is-warn .signal-dot { background: var(--warn); }
.signal.is-bad .signal-dot { background: var(--hot); }
.signal.is-ok .signal-dot { background: var(--ok); }

.error-list { display: flex; flex-direction: column; }
.error-row {
  display: grid; grid-template-columns: 46px 54px minmax(0, 1fr) auto auto;
  gap: 10px; align-items: center; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 8px 0;
  text-align: left; cursor: pointer; font: inherit;
}
.error-row:first-child { border-top: 0; }
.error-row:hover .error-url { color: var(--accent); }
.error-url { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.error-ms { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.error-open { font-size: 11px; color: var(--accent); }

/* ---------- waterfall ---------- */

.wf-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.search-field {
  display: flex; align-items: center; gap: 7px; flex: 1 1 230px; min-width: 170px;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; background: var(--surface);
}
.search-field svg { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }
.search-field input { border: 0; background: transparent; outline: 0; width: 100%; font-size: 12.5px; color: var(--ink); }
.select-field { display: flex; flex-direction: column; gap: 3px; }
.select-field > span:first-child { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface);
  color: var(--ink-2); font-size: 12px; padding: 6px 24px 6px 9px; cursor: pointer; max-width: 150px;
}
.select-wrap::after {
  content: ""; position: absolute; right: 9px; top: 50%; width: 5px; height: 5px;
  border-right: 1.4px solid var(--ink-3); border-bottom: 1.4px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.wf-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: var(--ink-3); margin-bottom: 10px; }
.wf-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.sw.q { background: var(--ph-q); } .sw.dns { background: var(--ph-dns); } .sw.tcp { background: var(--ph-tcp); }
.sw.tls { background: var(--ph-tls); } .sw.send { background: var(--ph-send); } .sw.wait { background: var(--ph-wait); }
.sw.recv { background: var(--ph-recv); }

.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 14px; align-items: start; }
.wf-main { min-width: 0; }
.wf-head, .wf-row, .wf-scale {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) 52px 44px 62px 58px minmax(140px, 1.7fr);
  gap: 6px; align-items: center;
}
.wf-head {
  font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 7px 6px; border-bottom: 1px solid var(--line);
}
.wf-scale { padding: 0 7px; height: 16px; }
.wf-scale-track { position: relative; height: 100%; border-left: 1px solid var(--line-2); }
.wf-scale-track i {
  position: absolute; top: 0; bottom: 0; border-left: 1px dotted var(--line-2);
  font-style: normal; font-family: var(--mono); font-size: 8px; color: var(--ink-3); padding-left: 2px;
}
.wf-scale-track i.end { transform: translateX(-100%); padding-left: 0; padding-right: 2px; border-left: 0; border-right: 1px solid var(--line-2); }
.wf-body {
  max-height: 620px; overflow: auto; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface);
}
.wf-row {
  width: 100%; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  background: none; text-align: left; padding: 5px 7px; cursor: pointer; font: inherit; color: var(--ink);
}
.wf-row:hover { background: var(--surface-2); }
.wf-row.is-on { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.wf-req { display: flex; align-items: center; gap: 6px; min-width: 0; }
.method {
  font-family: var(--mono); font-size: 8.5px; font-weight: 500; letter-spacing: 0.02em;
  padding: 1px 4px; border-radius: 3px; flex-shrink: 0;
}
.wf-url { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.wf-host { font-size: 9.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-path { font-family: var(--mono); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 3px; justify-self: start; }
.s-2 { background: var(--ok-soft); color: var(--ok); }
.s-3 { background: var(--accent-soft); color: var(--accent); }
.s-4 { background: var(--warn-soft); color: var(--warn); }
.s-5 { background: var(--hot-soft); color: var(--hot); }
.s-0, .s-n { background: var(--surface-2); color: var(--ink-3); }
.wf-type { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); }
.wf-size, .wf-time { font-family: var(--mono); font-size: 9.5px; color: var(--ink-2); text-align: right; }
.wf-time { color: var(--ink); }
.wf-track { position: relative; height: 12px; background: color-mix(in srgb, var(--line) 38%, transparent); border-radius: 3px; overflow: hidden; }
.wf-fill { position: absolute; top: 2px; bottom: 2px; display: flex; border-radius: 2px; overflow: hidden; min-width: 2px; }
.wf-fill b { display: block; height: 100%; }
.wf-fill .b { background: var(--ph-q); } .wf-fill .d { background: var(--ph-dns); }
.wf-fill .t { background: var(--ph-tcp); } .wf-fill .l { background: var(--ph-tls); }
.wf-fill .s { background: var(--ph-send); } .wf-fill .w { background: var(--ph-wait); }
.wf-fill .r { background: var(--ph-recv); }
.wf-empty { padding: 30px 16px; text-align: center; font-size: 13px; color: var(--ink-3); }

.wf-detail { position: sticky; top: 78px; max-height: calc(100vh - 100px); overflow: auto; }
.dt-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.dt-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dt-title code { font-family: var(--mono); font-size: 11px; color: var(--ink); overflow-wrap: anywhere; }
.dt-url { font-size: 11px; color: var(--ink-2); overflow-wrap: anywhere; margin-top: 5px; line-height: 1.5; }
.dt-meta { display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); margin-top: 6px; }
.dt-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.dt-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; overflow-x: auto; }
.dt-tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 8px;
  font-size: 11px; color: var(--ink-3); cursor: pointer; white-space: nowrap;
}
.dt-tabs button.is-on { color: var(--ink); border-bottom-color: var(--accent); }
.dt-section { margin-bottom: 12px; }
.dt-section h4 { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 5px; }
.dt-empty { font-size: 11.5px; color: var(--ink-3); padding: 4px 0 8px; }
.hdr-table { display: flex; flex-direction: column; font-size: 10.5px; }
.hdr-row { display: grid; grid-template-columns: minmax(78px, 0.8fr) minmax(0, 1.7fr); gap: 6px; padding: 3px 0; border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.hdr-row:first-child { border-top: 0; }
.hdr-name { font-family: var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }
.hdr-value { font-family: var(--mono); color: var(--ink); overflow-wrap: anywhere; word-break: break-word; }
.dt-cookies { display: flex; flex-wrap: wrap; gap: 5px; }
.dt-cookie { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: var(--ink-2); overflow-wrap: anywhere; }
.dt-cookie b { color: var(--ink); font-weight: 500; }
.code-wrap { border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.code-out {
  margin: 0; padding: 10px 12px; font-family: var(--mono); font-size: 10.5px; line-height: 1.62;
  color: var(--ink); overflow: auto; max-height: 300px; white-space: pre-wrap; word-break: break-word;
}
.code-out.tall { max-height: 420px; }
.code-out.nowrap { white-space: pre; word-break: normal; }
.code-out.is-empty { color: var(--ink-3); font-family: var(--sans); font-size: 12px; }
.dt-timing { display: flex; flex-direction: column; gap: 0; }
.tm-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) 62px; gap: 8px; align-items: center; padding: 3px 0; font-size: 10.5px; }
.tm-label { color: var(--ink-2); }
.tm-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.tm-bar b { display: block; height: 100%; }
.tm-ms { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); text-align: right; }
.tm-total { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 6px; font-family: var(--mono); font-size: 11px; display: flex; justify-content: space-between; }
.tm-note { font-size: 10px; color: var(--ink-3); margin-top: 6px; }
.dt-payload .code-out { max-height: 220px; }
.dt-note { font-size: 10px; color: var(--ink-3); margin-top: 5px; }

/* ---------- share ---------- */

.share-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.check {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 0;
  border-top: 1px solid var(--line); cursor: pointer;
}
.check:first-of-type { border-top: 0; }
.check input { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; }
.check-body { display: flex; flex-direction: column; gap: 1px; }
.check-title { font-size: 12.5px; font-weight: 500; }
.check-desc { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.mask-rule { font-size: 10px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; display: inline-block; margin: 10px 0 12px; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mask-list { display: flex; flex-direction: column; margin-bottom: 10px; max-height: 180px; overflow: auto; }
.mask-item { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 5px 0; font-size: 10.5px; }
.mask-item:first-child { border-top: 0; }
.mask-item .mono { color: var(--ink-3); font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mask-item b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); flex-shrink: 0; }
.mask-empty { font-size: 11.5px; color: var(--ink-3); padding: 8px 0; }

/* ---------- presets ---------- */

.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.preset-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: 20px 20px 18px; overflow: hidden;
}
.preset-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.preset-num { font-size: 11px; color: var(--accent); }
.preset-tag { font-size: 9.5px; color: var(--ink-3); }
.preset-card h3 { font-size: 1.15rem; margin-bottom: 7px; }
.preset-card p { font-size: 13px; color: var(--ink-2); }
.preset-point { margin-top: 10px; font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 1px; }
.mini-label { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.preset-actions { margin-top: 12px; }

/* ---------- rules ---------- */

.rule-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.rule-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px 18px 16px; }
.rule-num { font-size: 10px; color: var(--accent); margin-bottom: 8px; }
.rule-card h3 { font-size: 15px; margin-bottom: 7px; }
.rule-card p { font-size: 12.5px; color: var(--ink-2); line-height: 1.62; }

.format-table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.format-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.format-table caption {
  text-align: left; padding: 12px 16px; font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line);
}
.format-table th, .format-table td { text-align: left; padding: 8px 16px; border-top: 1px solid var(--line); }
.format-table thead th { border-top: 0; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.format-table td:first-child { width: 150px; white-space: nowrap; }
.format-table tbody td { color: var(--ink-2); }
.legend-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.legend-swatch.is-q { background: var(--ph-q); } .legend-swatch.is-dns { background: var(--ph-dns); }
.legend-swatch.is-tcp { background: var(--ph-tcp); } .legend-swatch.is-tls { background: var(--ph-tls); }
.legend-swatch.is-send { background: var(--ph-send); } .legend-swatch.is-wait { background: var(--ph-wait); }
.legend-swatch.is-recv { background: var(--ph-recv); }

/* ---------- faq ---------- */

.faq-section { padding-top: 44px; }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.faq details { border-top: 1px solid var(--line); padding: 11px 0; }
.faq summary { cursor: pointer; font-size: 13.5px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--ink-3); font-size: 14px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { font-size: 12.5px; color: var(--ink-2); margin-top: 7px; line-height: 1.62; }

/* ---------- funnel ---------- */

.funnel { margin-top: 46px; padding: 34px 0 10px; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.funnel-head { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.funnel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.funnel-card {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px;
  border-radius: var(--r); text-decoration: none; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); transition: transform .15s, box-shadow .15s;
}
.funnel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.funnel-card-watch { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.funnel-card-watch .funnel-kicker, .funnel-card-watch .funnel-sub { color: color-mix(in srgb, var(--accent-ink) 72%, transparent); }
.funnel-kicker { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.funnel-title { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.funnel-sub { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); max-width: 54ch; }
.funnel-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; }
.funnel-price { font-family: var(--mono); font-size: 15px; }
.funnel-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.funnel-arrow { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.funnel-card:hover .funnel-arrow { transform: translateX(3px); }

/* ---------- related ---------- */

.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rel-card {
  display: flex; flex-direction: column; gap: 5px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.rel-card:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.rel-kicker { font-size: 9.5px; color: var(--accent); }
.rel-card h3 { font-size: 14px; }
.rel-card p { font-size: 12px; color: var(--ink-2); }
.rel-open { font-size: 11px; color: var(--accent); margin-top: 3px; }

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

.site-footer { border-top: 1px solid var(--line); margin-top: 44px; padding: 30px 0 34px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px 40px; align-items: start; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand .brand-name { font-weight: 600; }
.footer-tagline { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.footer-note { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; font-size: 10.5px; color: var(--ink-3); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
  background: var(--ink); color: var(--bg); border-radius: 8px; padding: 9px 16px;
  font-size: 12.5px; z-index: 60; opacity: 0; transition: opacity .18s, transform .18s;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.copy-probe { position: fixed; top: -1000px; left: 0; opacity: 0; }

/* ---------- document pages ---------- */

.doc { max-width: 760px; padding: 48px 0 10px; }
.doc .eyebrow { margin-bottom: 10px; }
.doc h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -0.035em; margin-bottom: 10px; }
.doc .updated { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); margin-bottom: 16px; }
.doc-lede { font-size: 16px; color: var(--ink-2); margin-bottom: 22px; }
.doc h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.doc p { font-size: 14px; color: var(--ink-2); margin: 8px 0; line-height: 1.72; }
.doc ul { margin: 8px 0; padding-left: 20px; }
.doc li { font-size: 14px; color: var(--ink-2); margin: 4px 0; }
.doc code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.doc a { color: var(--accent); }
.doc .doc-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wf-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .wf-head, .wf-row, .wf-scale { grid-template-columns: minmax(0, 1.6fr) 48px 40px 54px 52px minmax(110px, 1.4fr); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 48px; }
  .hero-art { min-height: 300px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .loader { grid-template-columns: 1fr; }
  .wf-layout { grid-template-columns: 1fr; }
  .wf-detail { position: static; max-height: none; }
  .share-grid { grid-template-columns: 1fr; }
  .slow-grid { grid-template-columns: 1fr; }
  .rule-cards { grid-template-columns: 1fr; }
  .preset-grid { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .funnel-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-inner { height: 58px; gap: 12px; }
  .site-nav { display: none; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.7rem); }
  .hero-lede { font-size: 15.5px; }
  .facts { gap: 22px; }
  .tabpanel { padding: 16px 12px 20px; }
  .panel-head { flex-direction: column; gap: 8px; }
  .state-pill { align-self: flex-start; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ov-grid { grid-template-columns: 1fr; }
  .wf-tools { gap: 6px; }
  .search-field { flex-basis: 100%; }
  .select-field { flex: 1 1 42%; }
  .select-wrap select { max-width: none; width: 100%; }
  .wf-head { display: none; }
  .wf-scale { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .wf-scale > span:not(.wf-scale-track) { display: none; }
  .wf-row {
    grid-template-columns: minmax(0, 1fr) 46px 42px;
    grid-template-areas: "req status time" "track track track" "size type type";
    row-gap: 4px; padding: 7px 8px;
  }
  .wf-req { grid-area: req; }
  .wf-row .status { grid-area: status; }
  .wf-row .wf-type { grid-area: type; justify-self: end; }
  .wf-row .wf-size { grid-area: size; text-align: left; }
  .wf-row .wf-time { grid-area: time; }
  .wf-row .wf-track { grid-area: track; }
  .wf-body { max-height: 520px; }
  .aw-card { transform: none; }
  .format-table td:first-child { width: 110px; }
  .error-row { grid-template-columns: 42px 46px minmax(0, 1fr) auto; }
  .error-open { display: none; }
  .toast { bottom: 14px; }
}

@media (max-width: 420px) {
  .facts dt { font-size: 16px; }
  .tabbar button { padding: 11px 12px; font-size: 12.5px; }
  .t-num { display: none; }
  .error-row { grid-template-columns: 40px 44px minmax(0, 1fr); }
  .error-ms { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
