/* hunsdoc website — static, no external fonts or scripts. Same system as the SSem TouchOTP site,
   teal brand so the product reads as its own. */
:root {
  --brand: #00796b;
  --brand-2: #14a593;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #edf3f2;
  --text: #0e1a1c;
  --muted: #52615f;
  --border: #dbe4e2;
  --warn-bg: #fff6e5;
  --warn-border: #f2c26b;
  --warn-text: #6b4a00;
  --ok: #14925a;
  --link: #00695c;
  --focus: #00695c;
  --chart-bar: #00897b;          /* validated: dataviz validate_palette.js, light, surface #ffffff */
  --chart-grid: #dbe4e2;
  --chart-ref: #52615f;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 26, 28, 0.06), 0 8px 24px rgba(14, 26, 28, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "D2Coding", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4fd1bd;
    --bg: #0a0e10;
    --surface: #121a1c;
    --surface-2: #192426;
    --text: #e7efee;
    --muted: #98aaa7;
    --border: #243234;
    --warn-bg: #2a2110;
    --warn-border: #7a5a1c;
    --warn-text: #f3d596;
    --ok: #3cc98a;
    --link: #5fd4c2;
    --focus: #5fd4c2;
    --chart-bar: #1fa391;        /* validated: dark, surface #131822 band */
    --chart-grid: #2a393b;
    --chart-ref: #98aaa7;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

img { max-width: 100%; height: auto; }
code, kbd, .mono { font-family: var(--mono); font-size: 0.9em; }
code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand .accent { color: var(--brand); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
}
.button.primary {
  color: #fff;
  background: linear-gradient(135deg, #00796b, #005b50);
  box-shadow: 0 6px 18px rgba(0, 121, 107, 0.28);
}
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { color: var(--text); background: var(--surface); border-color: var(--border); }
.button.secondary:hover { border-color: var(--brand); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--link);
  background: color-mix(in srgb, var(--brand) 13%, transparent);
  padding: 4px 12px;
  border-radius: 999px;
}
h1 { font-size: clamp(34px, 5.2vw, 54px); line-height: 1.15; letter-spacing: -0.02em; margin: 18px 0 16px; }
h1 .grad {
  background: linear-gradient(135deg, #0a8f7f, #005b50);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: dark) {
  h1 .grad { background: linear-gradient(135deg, #5fe0cc, #1fa391); -webkit-background-clip: text; background-clip: text; }
}
.lead { font-size: 19px; color: var(--muted); margin: 0; max-width: 34em; }
.lead strong { color: var(--text); }
.meta { font-size: 14px; color: var(--muted); margin: 0; }

/* Terminal card — always dark, like a real terminal */
.term {
  margin: 0;
  border-radius: 14px;
  background: #0d1416;
  color: #dfe9e7;
  box-shadow: var(--shadow);
  border: 1px solid #1f2c2e;
  overflow: hidden;
  min-width: 0;
}
.term-bar { display: flex; gap: 7px; align-items: center; padding: 11px 14px; background: #152022; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a4a4c; display: block; }
.term-bar span { margin-left: 8px; font-size: 12.5px; color: #8fa3a0; font-family: var(--mono); }
.term pre {
  margin: 0;
  padding: 16px 18px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  border-radius: 0;
  color: inherit;
}
.term .prompt { color: #7ee2d2; }
.term .dim { color: #8fa3a0; }

/* Sections */
section { padding: 52px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-size: 20px; line-height: 1.35; margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 46em; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}
section.alt .card { background: var(--bg); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card p + p { margin-top: 8px; }
.card .icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 12px;
  font-size: 22px;
  background: color-mix(in srgb, var(--brand) 13%, transparent);
}

/* Stat tiles (KPI row) */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
section.alt .stat { background: var(--bg); }
.stat .label { display: block; font-size: 14px; color: var(--muted); }
.stat .value { display: block; font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 4px 0 6px; }
.stat .value small { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat .note { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Hero figure (single headline number) */
.figure-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
.figure-hero .big { font-size: clamp(48px, 7vw, 72px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
.figure-hero .big small { font-size: 0.45em; color: var(--muted); font-weight: 600; }
.figure-hero .caption { color: var(--muted); margin: 8px 0 0; font-size: 15.5px; }

/* Demo — real conversion */
.demo { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.demo figure { margin: 0; min-width: 0; }
.demo figure img {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
}
.demo figcaption, .chart-note { font-size: 14px; color: var(--muted); margin-top: 10px; }
.steps-cmd { display: grid; gap: 14px; min-width: 0; }
.step-label { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }

/* Chart */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; min-width: 0; }
section.alt .chart-card { background: var(--bg); }
.chart-card h3 { margin-bottom: 2px; }
.chart-card .sub { color: var(--muted); font-size: 14.5px; margin: 0 0 12px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .ref-line { stroke: var(--chart-ref); stroke-width: 1; }
.chart .bar { fill: var(--chart-bar); }
.chart .bar:hover { filter: brightness(1.12); }
.chart text { fill: var(--muted); font-family: var(--font); font-size: 13px; }
.chart .cat { fill: var(--text); font-weight: 600; font-size: 14px; }
.chart .val {
  fill: var(--text); font-weight: 700; font-size: 14px;
  paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round;
}
section.alt .chart .val { stroke: var(--bg); }
.chart .ref-label { fill: var(--muted); font-size: 12.5px; }
.perf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.callout {
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}
.callout strong { color: inherit; }
.callout p { margin: 0.4em 0; }
.callout.info {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
  color: var(--text);
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: var(--ok);
  margin-top: 3px;
}
.limits { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.limits li { position: relative; padding-left: 30px; }
.limits li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--warn-text);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  margin-top: 3px;
}

/* Supported formats */
.grid.formats { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card .fmt { font-size: 15px; font-weight: 600; color: var(--link); margin: 0 0 12px; }
.checklist.small { gap: 6px; font-size: 15px; }
.checklist.small li { padding-left: 26px; }
.checklist.small li::before { width: 18px; height: 18px; font-size: 11px; margin-top: 4px; }
.card .mt-sm { margin-top: 12px; }

/* Platform download buttons */
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.platform {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.platform strong { font-size: 17px; }
.platform span { font-size: 14px; color: var(--muted); }
.platform:hover { border-color: var(--brand); }
section.alt .platform { background: var(--bg); }
.platform:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
table.downloads td { vertical-align: middle; }
table.downloads a { font-weight: 700; }
.hash {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-all;
  margin-top: 4px;
}

/* Download panel */
.download { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
pre {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0;
}
pre .c { color: var(--muted); }
ol.steps { padding-left: 1.3em; margin: 0; }
ol.steps li { margin: 0.35em 0; }

/* Documents (guide, support) */
.doc { padding: 48px 0 64px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 42px); margin-top: 0; }
.doc h2 { font-size: 25px; margin-top: 2.2em; padding-top: 0.4em; scroll-margin-top: 80px; }
.doc h3 { margin-top: 1.6em; scroll-margin-top: 80px; }
.doc p, .doc li { color: var(--text); }
.doc .updated { color: var(--muted); font-size: 15px; }
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2 220px; column-gap: 32px; }
.toc li { break-inside: avoid; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 10px 0;
}
details[open] { padding-bottom: 18px; }
summary { cursor: pointer; font-weight: 700; }
details > :not(summary) { margin-top: 10px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer .legal { flex-basis: 100%; margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero .container, .download, .demo, .perf, .figure-hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .button { width: 100%; }
  .site-nav { gap: 2px 14px; font-size: 14px; }
  .stat .value { font-size: 34px; }
  .platforms { grid-template-columns: 1fr; }
  .term pre { font-size: 12px; }
}
@media print {
  .site-header, .site-footer, .buttons { display: none; }
  body { background: #fff; color: #000; }
}

.mt { margin-top: 20px; }
