:root {
  --paper: #f7f1e7;
  --ink: #2e2924;
  --muted: #6c7587;
  --line: #dfe4ec;
  --surface: #fff;
  --workspace: #f3f5f8;
  --primary: #625df2;
  --primary-hover: #4f46df;
  --primary-light: #efefff;
  --success: #0b8f65;
  --danger: #d74242;
  --warning: #b96c0a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(35, 42, 60, .09);
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--workspace); font-family: var(--sans); line-height: 1.65; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; color: white; background: var(--ink); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.tool-site-header { min-height: 66px; padding: 0 max(18px, calc((100vw - 1240px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 22px; color: #fffaf2; background: #132033; }
.tool-brand { display: inline-flex; gap: 9px; align-items: center; text-decoration: none; font-weight: 800; }
.tool-brand-mark { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink); background: #ef9c6c; border-radius: 50%; font-family: Georgia, serif; font-style: italic; }
.tool-site-links { display: flex; gap: 20px; }
.tool-site-links a { color: #c8d2e0; text-decoration: none; font-size: .82rem; }
.tool-site-links a:hover { color: white; }
.tool-nav-wrap { position: sticky; top: 0; z-index: 30; padding: 12px max(12px, calc((100vw - 1240px) / 2)); background: rgba(243,245,248,.93); backdrop-filter: blur(14px); }
.tool-nav { display: flex; gap: 6px; overflow-x: auto; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 24px rgba(35,42,60,.06); scrollbar-width: none; }
.tool-nav::-webkit-scrollbar { display: none; }
.tool-nav a { flex: 0 0 auto; padding: 9px 16px; color: var(--muted); border-radius: 999px; text-decoration: none; font-size: .82rem; font-weight: 650; }
.tool-nav a:hover { color: var(--primary); background: var(--primary-light); }
.tool-nav a[aria-current="page"] { color: white; background: var(--primary); box-shadow: 0 3px 12px rgba(98,93,242,.28); }
.tool-page { width: min(1240px, calc(100% - 28px)); margin: 0 auto; }
.tool-hero { padding: 52px 10px 28px; }
.tool-hero .kicker { margin: 0 0 8px; color: var(--primary); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tool-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.08; letter-spacing: -.045em; }
.tool-hero > p:last-child { max-width: 760px; margin: 16px 0 0; color: var(--muted); }
.privacy-note, .risk-note { margin: 0 0 18px; padding: 13px 16px; border-radius: 12px; font-size: .82rem; }
.privacy-note { color: #146344; background: #e6f6ef; border: 1px solid #b7e4d1; }
.risk-note { color: #744008; background: #fff2d8; border: 1px solid #f2d49a; }
.tool-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tool-workspace.single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.tool-panel { min-width: 0; padding: 24px; background: #fafbfc; border: 1px solid var(--line); border-radius: 14px; }
.tool-panel h2 { margin: 0 0 16px; font-size: 1.05rem; }
.tool-panel h3 { margin: 24px 0 10px; font-size: .95rem; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label, .field-label { font-size: .8rem; font-weight: 700; }
input, textarea, select { width: 100%; padding: 12px 14px; color: var(--ink); background: white; border: 1.5px solid var(--line); border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 220px; resize: vertical; line-height: 1.55; font-family: var(--mono); font-size: .82rem; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(98,93,242,.13); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.action { min-height: 44px; padding: 10px 18px; color: white; background: var(--primary); border: 0; border-radius: 10px; cursor: pointer; font-weight: 750; transition: transform .15s, background .15s; }
.action:hover { background: var(--primary-hover); transform: translateY(-1px); }
.action:disabled { opacity: .58; cursor: progress; transform: none; }
.action.secondary { color: var(--primary); background: white; border: 1px solid var(--line); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.result-card { position: relative; margin-bottom: 14px; padding: 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: 11px; }
.result-card h3 { margin: 0 0 12px; }
.result-card pre { min-height: 48px; margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #233047; font: .8rem/1.7 var(--mono); }
.copy-button { position: absolute; right: 10px; top: 10px; padding: 6px 10px; color: var(--primary); background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: .72rem; font-weight: 750; }
.inline-error { margin: 10px 0 0; color: var(--danger); font-size: .82rem; }
.inline-success { margin: 10px 0 0; color: var(--success); font-size: .82rem; }
.json-tree { min-height: 260px; overflow: auto; color: #243147; font: .8rem/1.7 var(--mono); }
.json-line { white-space: nowrap; }
.json-children { margin-left: 22px; }
.json-children.collapsed { display: none; }
.json-toggle { display: inline-block; width: 17px; color: #7b8797; cursor: pointer; }
.json-toggle.expanded::before { content: "−"; }
.json-toggle.collapsed::before { content: "+"; }
.json-toggle.leaf::before { content: ""; }
.json-key { color: #1769c2; }
.json-string { color: #15834f; }
.json-number { color: #a65305; }
.json-boolean { color: #7a3db8; }
.json-null { color: #c43c4b; }
.json-item-count { margin-left: 8px; color: #8a94a3; font-style: italic; }
.json-punctuation { color: #425066; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; padding: 60px 0 84px; }
.info-card { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.info-card h2 { margin-top: 0; font-size: 1.15rem; }
.info-card p, .info-card li { color: var(--muted); font-size: .9rem; }
.info-card code { padding: 2px 5px; color: var(--primary-hover); background: var(--primary-light); border-radius: 5px; }
.faq { margin: 0; }
.faq dt { margin-top: 14px; font-weight: 750; }
.faq dd { margin: 4px 0 0; color: var(--muted); }
.tool-footer { padding: 28px max(18px, calc((100vw - 1240px) / 2)); display: flex; justify-content: space-between; gap: 20px; color: #aeb9c8; background: #132033; font-size: .76rem; }
.tool-footer a { color: inherit; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { padding: 11px 15px; color: white; background: #182337; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.2); transition: opacity .35s, transform .35s; }
.toast-error { background: var(--danger); }
.toast-out { opacity: 0; transform: translateY(8px); }
.status-line { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { padding: 14px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.metric span { display: block; color: var(--muted); font-size: .73rem; }
.metric strong { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: .94rem; }
.tool-output { min-height: 220px; }
.compact-output { min-height: 84px; }
.helper { margin: -7px 0 13px; color: var(--muted); font-size: .76rem; }
.segmented { display: flex; gap: 6px; padding: 5px; background: #eef1f6; border-radius: 10px; }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px; border-radius: 7px; text-align: center; cursor: pointer; font-size: .8rem; font-weight: 700; }
.segmented input:checked + span { color: var(--primary); background: white; box-shadow: 0 2px 7px rgba(35,42,60,.08); }
.claim-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.claim-table th, .claim-table td { padding: 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.claim-table th { width: 28%; color: var(--muted); }
.hidden { display: none !important; }
.badge { padding: 4px 9px; border-radius: 999px; color: white; background: var(--muted); font-size: .72rem; font-weight: 750; }
.badge.valid { background: var(--success); }
.badge.invalid { background: var(--danger); }
.badge.pending { background: var(--warning); }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 80px; }
.hub-card { min-height: 190px; padding: 24px; display: flex; flex-direction: column; color: inherit; background: white; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; transition: transform .18s, border-color .18s; }
.hub-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.hub-icon { width: 44px; height: 44px; display: grid; place-items: center; color: white; background: var(--primary); border-radius: 12px; font: 800 .9rem var(--mono); }
.hub-card h2 { margin: 24px 0 7px; font-size: 1.1rem; }
.hub-card p { margin: 0; color: var(--muted); font-size: .86rem; }
.hub-card span:last-child { margin-top: auto; padding-top: 16px; color: var(--primary); font-size: .8rem; font-weight: 750; }

@media (max-width: 860px) {
  .tool-workspace, .info-grid { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .tool-site-links { display: none; }
}
@media (max-width: 560px) {
  .tool-page { width: min(100% - 20px, 1240px); }
  .tool-hero { padding-top: 34px; }
  .tool-workspace { padding: 10px; gap: 10px; }
  .tool-panel { padding: 16px; }
  .row { align-items: stretch; flex-direction: column; }
  .hub-grid { grid-template-columns: 1fr; }
  .tool-footer { flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #ef9c6c; outline-offset: 3px; }
