/* PDFWorkbench — one stylesheet, no external font, no external image. */

:root {
  --bg: #f6f4ef;
  --bg-soft: #efece4;
  --panel: #fffdf9;
  --panel-2: #f9f7f2;
  --ink: #1b1d21;
  --ink-2: #40454e;
  --muted: #5f6672;
  --line: #ded9cf;
  --line-strong: #c9c2b4;
  --accent: #b8442a;
  --accent-soft: #f7e6e0;
  --accent-ink: #8d2f1a;
  --good: #1f7150;
  --good-soft: #e3f2ea;
  --warn: #8a5a12;
  --warn-soft: #fbeedd;
  --bad: #a3282f;
  --bad-soft: #f9e2e3;
  --run: #1b4b6b;
  --run-ink: #ffffff;
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Microsoft JhengHei", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0e1216;
  --bg-soft: #12181e;
  --panel: #151c23;
  --panel-2: #182129;
  --ink: #e8edf2;
  --ink-2: #c3ccd6;
  --muted: #9aa5b1;
  --line: #26313b;
  --line-strong: #35434f;
  --accent: #ff8a6b;
  --accent-soft: #33201b;
  --accent-ink: #ffb39d;
  --good: #6ee0b0;
  --good-soft: #14291f;
  --warn: #f0c07a;
  --warn-soft: #2c2416;
  --bad: #ff9a9f;
  --bad-soft: #2c1a1c;
  --run: #8fc7f0;
  --run-ink: #0b1a24;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  line-break: strict;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.28; margin: 0; letter-spacing: -0.01em;
  /* CJK headings break at phrases, not inside a word; a single over-long run
     still falls back to a character break so nothing overflows */
  word-break: keep-all; overflow-wrap: anywhere;
}
p { margin: 0 0 0.8em; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
b, strong { font-weight: 650; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--panel); color: var(--ink); padding: 10px 16px;
  border: 1px solid var(--line-strong); border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: flex; align-items: center; gap: 14px;
  min-height: 62px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); text-decoration: none; font-size: 17px; letter-spacing: -0.02em;
}
.brand .mark { display: inline-flex; color: var(--accent); }
.brand-name { font-weight: 500; white-space: nowrap; }
.brand-name b { font-weight: 750; }
.brand-sub {
  font-size: 10.5px; letter-spacing: 0.12em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
  text-transform: uppercase; white-space: nowrap;
}
.langs { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.langs a {
  font-size: 13.5px; padding: 5px 9px; border-radius: 999px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.langs a:hover { background: var(--bg-soft); color: var(--ink); }
.langs a[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 650;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.i-sun { display: none; }
html[data-theme="dark"] .i-sun { display: inline; }
html[data-theme="dark"] .i-moon { display: none; }

/* -------------------------------------------------------------------- hero */
.hero { padding: 44px 20px 8px; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 650; margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -0.025em;
  margin-bottom: 14px; max-width: 22ch;
}
.lede { font-size: 17px; color: var(--ink-2); max-width: 68ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 22px; }
.chip {
  font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
  background: var(--panel);
}
.answer-card {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--panel); border-radius: var(--radius-sm);
  padding: 14px 16px; margin: 0 0 18px; max-width: 78ch;
}
.answer-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 4px;
}
.answer { margin: 0; font-size: 15.5px; color: var(--ink); }
.basis-strip {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--line); padding: 12px 0 0;
}
.basis-strip b { color: var(--ink-2); font-weight: 650; }

/* ------------------------------------------------------------------ studio */
.studio { padding: 26px 20px 10px; }
.tool-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.tabs .tab {
  font: inherit; font-size: 14.5px; font-weight: 600;
  background: transparent; border: 1px solid transparent; border-bottom: none;
  color: var(--muted); padding: 9px 14px; border-radius: 10px 10px 0 0;
  cursor: pointer; margin-bottom: -3px;
}
.tabs .tab:hover { color: var(--ink); background: var(--bg-soft); }
.tabs .tab.is-active {
  color: var(--ink); background: var(--panel);
  border-color: var(--line); border-bottom: 1px solid var(--panel);
}
.tabs .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.studio-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.panel-head h3 { font-size: 15px; font-weight: 700; letter-spacing: 0.01em; }
.panel-actions { display: flex; align-items: center; gap: 8px; }
.count {
  font-size: 12px; font-family: var(--mono); color: var(--muted);
  background: var(--bg-soft); border-radius: 999px; padding: 2px 9px;
}

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--ink-2);
  padding: 26px 16px; margin-bottom: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink);
}
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dz-icon { color: var(--accent); display: inline-flex; }
.dz-strong { font-weight: 650; font-size: 15px; }
.dz-hint { font-size: 12.5px; color: var(--muted); max-width: 46ch; }

.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 8px 10px;
}
.file-row[draggable="true"] { cursor: grab; }
.file-idx {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  min-width: 18px; text-align: center;
}
.file-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.file-name {
  font-size: 13.5px; color: var(--ink); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-meta { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.file-tools { display: flex; gap: 4px; flex: 0 0 auto; }
.row-btn {
  width: 26px; height: 26px; border-radius: 7px; font-size: 13px; line-height: 1;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-2);
  cursor: pointer; padding: 0;
}
.row-btn:hover:not(:disabled) { border-color: var(--line-strong); color: var(--ink); }
.row-btn:disabled { opacity: 0.35; cursor: default; }
.row-btn.rm:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); }

.pageline { font-size: 12px; color: var(--muted); font-family: var(--mono); margin: 10px 0 0; }
.privacy-strip {
  margin: 12px 0 0; font-size: 11.5px; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: 8px;
}

.opts-panel h3 { font-size: 16px; }
.tool-opts { display: block; }
.opt-set { margin: 12px 0 0; }
.opt-set[hidden] { display: none; }
.note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.note-warn {
  font-size: 13px; color: var(--warn); background: var(--warn-soft);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.radios {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px 12px; margin: 0 0 12px; min-width: 0;
}
.radios legend {
  font-size: 12px; letter-spacing: 0.04em; color: var(--muted);
  padding: 0 6px; max-width: 100%;
}
.radio { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 3px 0; }
.radio input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }

.field { margin: 0 0 12px; }
.field[hidden] { display: none; }
.field label { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 4px; }
.field input[type="text"] {
  width: 100%; font: inherit; font-size: 14px; font-family: var(--mono);
  padding: 9px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--ink);
}
.field input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

.btn {
  font: inherit; font-size: 14.5px; font-weight: 650;
  background: var(--run); color: var(--run-ink);
  border: 1px solid transparent; border-radius: 10px;
  padding: 11px 18px; cursor: pointer; margin-top: 14px;
  width: 100%; text-decoration: none; display: inline-block; text-align: center;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.small { width: auto; font-size: 13.5px; padding: 9px 15px; margin: 0; }
.mini {
  font: inherit; font-size: 12.5px; font-weight: 600;
  background: var(--panel); color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 6px 11px; cursor: pointer;
}
.mini:hover { border-color: var(--accent); color: var(--accent-ink); }
.mini.quiet { border-color: var(--line); color: var(--muted); }
.status { font-size: 13px; margin: 10px 0 0; min-height: 1.2em; color: var(--muted); }
.status.is-ok { color: var(--good); }
.status.is-warn { color: var(--warn); }
.status.is-error { color: var(--bad); }

/* ----------------------------------------------------------------- results */
.result-panel { margin-top: 16px; }
.result-panel[hidden] { display: none; }
.sub-table { margin-top: 16px; }
.sub-table[hidden] { display: none; }
.sub-table h4 {
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px;
}
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
  vertical-align: top; overflow-wrap: anywhere;
}
table.data thead th {
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line-strong);
  background: var(--panel-2); white-space: nowrap;
}
table.data tbody th { font-weight: 600; color: var(--ink-2); }
table.data td.num { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
table.data td.strong { color: var(--ink); font-weight: 650; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: none; }
table.data.wide { min-width: 620px; }

.dl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.per-page-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.page-chip { font-family: var(--mono); font-size: 12px; }

/* ---------------------------------------------------------------- sections */
.sec { padding: 40px 20px 6px; }
.sec-head { margin-bottom: 18px; max-width: 70ch; }
.sec-eyebrow {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 650; margin: 0 0 8px;
}
.sec-head h2 { font-size: clamp(21px, 2.6vw, 28px); margin-bottom: 8px; }
.sec-sub { font-size: 15px; color: var(--muted); margin: 0; }

.features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.feature {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.badge-mini {
  display: inline-block; font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 999px; padding: 2px 9px; margin-bottom: 8px; font-weight: 700;
}
.feature h3 { font-size: 15.5px; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--ink-2); margin: 0; }

.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step {
  border-left: 2px solid var(--accent); padding: 2px 0 2px 14px;
}
.step-no { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }
.step h3 { font-size: 15px; margin: 3px 0 6px; }
.step p { font-size: 13.5px; color: var(--ink-2); margin: 0; }

.tbl-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.formula {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
}
.formula-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
}
.pipe-step {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 7px; padding: 3px 8px; white-space: nowrap;
}
.formula-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px;
  font-size: 12px; color: var(--muted);
}
.formula-legend b { color: var(--ink-2); }

.prose { max-width: 76ch; }
.prose p { font-size: 14.5px; color: var(--ink-2); }

.faq { display: grid; gap: 8px; max-width: 82ch; }
.faq details {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.faq summary {
  cursor: pointer; font-weight: 650; font-size: 14.5px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--accent); margin-right: 8px; font-weight: 700; }
.faq details[open] summary::before { content: "−"; }
.faq p { margin: 8px 0 0; font-size: 13.8px; color: var(--ink-2); }

.limits { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 16px; }
.limit { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.limit h3 { font-size: 14.5px; margin-bottom: 5px; }
.limit p { font-size: 13.2px; color: var(--muted); margin: 0; }
.basis-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.basis-box h3 { font-size: 14px; margin-bottom: 8px; }
.basis-box ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.basis-box li { margin-bottom: 4px; }

/* ------------------------------------------------------------ policy pages */
.page-wrap { padding: 34px 20px 10px; max-width: 800px; }
.page-wrap h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.page-wrap h2 { font-size: 17px; margin: 24px 0 8px; }
.page-wrap p { font-size: 14.5px; color: var(--ink-2); }
.updated { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.contact-card { margin: 22px 0 12px; }
.contact-card .btn { width: auto; margin: 0; }
.back { font-size: 13.5px; display: inline-block; margin-bottom: 10px; }
.not-found { text-align: left; padding-bottom: 40px; }
.nf-code {
  font-family: var(--mono); font-size: 42px; color: var(--accent);
  margin: 0 0 4px; line-height: 1;
}
.nf-langs { font-size: 14px; padding-left: 18px; }
.nf-langs li { margin-bottom: 4px; }

/* ------------------------------------------------------------------ footer */
.site-foot {
  margin-top: 46px; border-top: 1px solid var(--line);
  background: var(--bg-soft); padding: 24px 0 28px;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 18px 30px; justify-content: space-between; }
.foot-left { max-width: 42ch; }
.foot-brand { font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.opyeb {
  font-size: 10px; letter-spacing: 0.1em; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px;
  vertical-align: middle; margin-left: 6px;
}
.foot-note { font-size: 12.5px; color: var(--muted); margin: 0 0 4px; }
.operated { font-size: 11.5px; color: var(--muted); margin: 0; letter-spacing: 0.02em; }
.foot-right { font-size: 13px; }
.foot-links a { color: var(--ink-2); }
.foot-langs { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.foot-langs a { color: var(--muted); }
.foot-langs span { margin-right: 6px; }
.foot-legal { font-size: 11.5px; color: var(--muted); margin: 16px 0 0; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 30px; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 15px; }
  .hero, .studio, .sec { padding-left: 15px; padding-right: 15px; }
  .page-wrap { padding-left: 15px; padding-right: 15px; }
  .brand-sub { display: none; }
  .head-inner { gap: 8px; min-height: 56px; }
  .langs { order: 3; width: 100%; margin-left: 0; }
  .langs a { padding: 4px 8px; font-size: 13px; }
  .tabs .tab { padding: 8px 10px; font-size: 13.5px; }
  .panel { padding: 13px; }
  .dropzone { padding: 20px 12px; }
  .basis-strip { gap: 4px 14px; font-size: 12px; }
  .answer-card { padding: 12px 13px; }
  .sec { padding-top: 30px; }
}

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