/* md-to-pdf-word — warm, editorial and quiet: ivory paper, charcoal ink, one clay accent, serif headlines.
   System fonts only (nothing loaded from elsewhere). */
:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-2: #f0eee6;
  --text: #1f1e1d;
  --text-2: #5e5d59;
  --text-3: #6e6d67;
  --line: rgba(31, 30, 29, .10);
  --line-2: rgba(31, 30, 29, .18);
  --accent: #c15f3c;          /* fills: bars, dots, focus */
  --accent-ink: #a84b2a;      /* text and links (≥ 4.8:1 on every surface) */
  --accent-soft: rgba(193, 95, 60, .10);
  --primary-bg: #1f1e1d;
  --primary-fg: #faf9f5;
  --ok: #2f7d4a;
  --warn: #9a5b00;
  --warn-soft: rgba(204, 140, 40, .14);
  --danger: #b3261e;
  --danger-soft: rgba(179, 38, 30, .07);
  --shadow: 0 1px 2px rgba(31, 30, 29, .05), 0 10px 32px rgba(31, 30, 29, .06);
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Charter, Georgia, "Songti SC", "STSong", "Noto Serif SC",
    "Source Han Serif SC", "SimSun", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262624;
    --surface: #30302e;
    --surface-2: #3a3a37;
    --text: #faf9f5;
    --text-2: #b7b5a9;
    --text-3: #9c9a92;
    --line: rgba(250, 249, 245, .10);
    --line-2: rgba(250, 249, 245, .18);
    --accent: #e08a63;
    --accent-ink: #e08a63;
    --accent-soft: rgba(224, 138, 99, .14);
    --primary-bg: #faf9f5;
    --primary-fg: #1f1e1d;
    --ok: #6cc28a;
    --warn: #f0b45a;
    --warn-soft: rgba(240, 180, 90, .12);
    --danger: #f2827a;
    --danger-soft: rgba(242, 130, 122, .10);
    --shadow: 0 0 0 1px rgba(250, 249, 245, .06), 0 12px 36px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:lang(ja) { --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --serif: ui-serif, "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
:lang(ja) :is(h1, h2, h3, p, li) { word-break: auto-phrase; }

/* ---------------------------------------------------------------- navigation */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1120px; margin: 0 auto; height: 56px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links > * { white-space: nowrap; }
.link { background: none; border: 0; padding: 0; color: var(--text-2); text-decoration: none; font-size: inherit; transition: color .2s; }
.link:hover { color: var(--text); }
.link.muted { color: var(--text-3); }
.link.danger { color: var(--danger); }
.link.small { font-size: 13px; }
.lang { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); cursor: pointer; }
.lang svg { width: 15px; height: 15px; flex: none; }
.lang select { appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 2px 0; font-size: 14px; color: inherit; cursor: pointer; }
.lang:hover { color: var(--text); }
.lang-hint { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 9px 16px; background: var(--surface-2);
  font-size: 14px; color: var(--text); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lang-hint .btn { padding: 4px 12px; font-size: 13px; background: var(--primary-bg); color: var(--primary-fg); text-decoration: none; }
.lang-hint .close { width: 26px; height: 26px; }

main { padding: 0 20px; }

/* ---------------------------------------------------------------- hero */
.hero { max-width: 900px; margin: 0 auto; padding: 84px 0 40px; text-align: center; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 6.4vw, 64px); line-height: 1.08; letter-spacing: -.02em; }
.hero.sub { padding: 40px 0 32px; }
.hero.sub h1 { font-size: clamp(32px, 5vw, 50px); }
.lede { margin: 20px auto 0; max-width: 640px; font-size: clamp(17px, 2.1vw, 20px); line-height: 1.55; color: var(--text-2); text-wrap: balance; }
.lede.small { font-size: 17px; margin-top: 12px; }
.crumbs { max-width: 1120px; margin: 22px auto 0; font-size: 13px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

/* ---------------------------------------------------------------- converter card */
.tool { max-width: 740px; margin: 0 auto; }
.card { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.svc { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--text); font-size: 14px; text-align: center; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 11px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 8px; font-size: 14px; color: var(--text-2);
  transition: background .2s var(--ease), color .2s; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(31, 30, 29, .12); font-weight: 500; }
@media (prefers-color-scheme: dark) { .seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: #4a4a46; } }
.seg.small button { padding: 5px 12px; font-size: 13px; }
.card > .seg { display: flex; width: max-content; max-width: 100%; margin: 0 auto 20px; }
@media (max-width: 480px) { .card > .seg { width: 100%; } .card > .seg button { flex: 1; padding: 7px 8px; } }

.drop { border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 40px 20px 32px; text-align: center; transition: border-color .2s, background .2s; outline: none; cursor: pointer; }
.drop:hover, .drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { width: 44px; height: 44px; color: var(--text-3); }
.drop-title { margin: 12px 0 4px; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.drop-hint { margin: 0; color: var(--text-2); font-size: 13.5px; }
.drop-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

.btn { border: 0; border-radius: 980px; padding: 9px 18px; font-size: 14px; font-weight: 500; line-height: 1.2;
  transition: transform .15s var(--ease), background .2s, opacity .2s; display: inline-flex; align-items: center; gap: 8px; justify-content: center; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.ghost:hover { background: color-mix(in srgb, var(--surface-2) 82%, var(--text) 8%); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.primary { width: 100%; padding: 15px; font-size: 16px; font-weight: 600; background: var(--primary-bg); color: var(--primary-fg); }
.btn.primary:disabled { opacity: .25; cursor: not-allowed; transform: none; }
.btn.primary kbd { font: 12px var(--font); opacity: .55; font-weight: 400; }
.btn.small-cta { width: auto; padding: 11px 22px; font-size: 15px; }

.file-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); min-height: 52px; }
.file-list li:first-child { border-top: 0; }
.file-list li.main { background: var(--surface-2); }
.ficon { flex: none; width: 30px; height: 36px; border-radius: 6px; display: grid; place-items: center; font-size: 9px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.ficon[data-k="md"] { background: #1f1e1d; } .ficon[data-k="docx"] { background: #2b5cd6; } .ficon[data-k="pdf"] { background: #c4382e; }
.ficon[data-k="tex"] { background: #138a72; } .ficon[data-k="zip"] { background: #87867f; } .ficon[data-k="img"] { background: #8a5cc2; }
.ficon[data-k="bib"], .ficon[data-k="other"] { background: #a8a69d; }
@media (prefers-color-scheme: dark) { .ficon[data-k="md"] { background: #5e5d59; } }
.fname { flex: 1; min-width: 0; }
.fname b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname small { color: var(--text-2); font-size: 12px; }
.tag { font-size: 11.5px; padding: 2px 9px; border-radius: 980px; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.mk { font-size: 12.5px; color: var(--accent-ink); background: none; border: 0; padding: 4px 0; white-space: nowrap; }
.rm { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--text-3); font-size: 15px; line-height: 1; }
.rm:hover { background: var(--surface-2); color: var(--text); }
.more-files { color: var(--text-2); font-size: 13px; justify-content: center; }
.more-files button { background: none; border: 0; color: var(--accent-ink); font-size: 13px; }
.missing { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--text); font-size: 13.5px; }
.missing b { color: var(--warn); font-weight: 600; }
.missing code { font: 12px var(--mono); background: rgba(127, 127, 127, .12); padding: 1px 6px; border-radius: 5px; margin: 2px 4px 2px 0; display: inline-block; word-break: break-all; }
.files-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13.5px; }
.files-foot .link:first-child { color: var(--accent-ink); }

textarea { width: 100%; min-height: 280px; resize: vertical; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2);
  font: 13.5px/1.65 var(--mono); outline: none; transition: border-color .2s, background .2s; }
textarea:focus { border-color: var(--accent); background: var(--surface); }
.text-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }

.url-label { display: block; font-size: 13.5px; color: var(--text-2); margin: 4px 0 8px; }
.url-input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2);
  font: 14px/1.4 var(--mono); outline: none; transition: border-color .2s, background .2s; }
.url-input:focus { border-color: var(--accent); background: var(--surface); }
.url-note { margin: 10px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.tpl { flex: 1; min-width: 0; }
.tpl-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 32px; }
.tpl-name { font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 6px; }
.tpl-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.opts { margin-top: 24px; display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 16px; }
.row.top { align-items: flex-start; }
.row-label { flex: none; width: var(--label-w, 40px); font-size: 13.5px; color: var(--text-2); line-height: 32px; white-space: nowrap; }
.themes-wrap { flex: 1; min-width: 0; }
.themes { display: flex; flex-wrap: wrap; gap: 8px; }
.theme { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: none; border-radius: 980px; padding: 6px 13px 6px 10px; font-size: 13.5px; color: var(--text); transition: border-color .2s, background .2s; }
.theme:hover { background: var(--surface-2); }
.theme i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .3); }
.theme[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.theme-desc { margin: 8px 0 0; font-size: 13px; color: var(--text-2); min-height: 20px; }
.more { border-top: 1px solid var(--line); padding-top: 12px; }
.more summary { cursor: pointer; font-size: 13.5px; color: var(--text-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.more[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 20px; margin-top: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.field { display: grid; gap: 4px; font-size: 12.5px; color: var(--text-2); }
select { appearance: none; -webkit-appearance: none; padding: 7px 30px 7px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2387867f' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: 14px; color: var(--text); }

.action { margin-top: 24px; }
.hint { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: var(--text-3); min-height: 18px; }
.progress { margin-top: 24px; }
.bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); border-radius: 6px; transition: width .25s var(--ease); }
.bar.indef i { width: 35% !important; animation: slide 1.3s var(--ease) infinite; }
@keyframes slide { from { left: -35%; } to { left: 100%; } }
.progress-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 14px; }

.result, .error { margin-top: 24px; animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.result-head { display: flex; align-items: center; gap: 12px; }
.result-head .ok { width: 30px; height: 30px; flex: none; fill: var(--ok); stroke: #fff; }
.result-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 21px; }
.result-head .muted { margin: 0; font-size: 13px; }
.out-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.out-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--surface-2); }
.out-list .acts { display: flex; gap: 6px; flex: none; }
.out-list .btn.ghost { background: var(--surface); }
.btn.dl { background: var(--primary-bg); color: var(--primary-fg); }
.warn { margin-top: 14px; font-size: 13.5px; }
.warn summary { cursor: pointer; color: var(--warn); }
.warn ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); }
.warn li { margin: 4px 0; word-break: break-word; }
.rate { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; color: var(--text-2); }
.rate-btn { border: 1px solid var(--line-2); background: none; border-radius: 980px; padding: 3px 12px; font-size: 15px; transition: background .2s; }
.rate-btn:hover { background: var(--surface-2); }
.result-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 13.5px; }
.fine { margin: 12px 0 0; font-size: 12.5px; color: var(--text-3); }
.error { padding: 16px; border-radius: 16px; background: var(--danger-soft); }
.error-title { margin: 0 0 8px; font-weight: 600; color: var(--danger); }
.error pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.65 var(--font); color: var(--text); max-height: 260px; overflow: auto; }
.dragcover { position: absolute; inset: 0; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border: 2px dashed var(--accent);
  display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .15s; }
.dragcover p { font-family: var(--serif); font-size: 22px; color: var(--accent-ink); }
body.dragging .dragcover { opacity: 1; }

/* ---------------------------------------------------------------- page sections */
.facts { max-width: 1000px; margin: 96px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; }
.facts h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: -.01em; }
.facts p { margin: 0; color: var(--text-2); font-size: 15px; }
.steps { max-width: 1000px; margin: 96px auto 0; }
.steps h2, .related h2, .faq h2, .mcp h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -.015em; margin: 0 0 28px; text-align: center; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 22px 22px 24px; }
.steps .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.steps h3 { margin: 14px 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.related { max-width: 1000px; margin: 96px auto 0; }
.tile-grid, .guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.guide-list { max-width: 900px; margin: 0 auto; }
.tile-link { display: grid; gap: 4px; padding: 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .2s var(--ease); }
.tile-link:hover { transform: translateY(-2px); }
.tile-link b { font-weight: 600; font-size: 16px; }
.tile-link b::after { content: " →"; color: var(--accent-ink); }
.tile-link span { color: var(--text-2); font-size: 14px; }
.faq { max-width: 760px; margin: 96px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; font-weight: 500; font-size: 16.5px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 11px; font-size: 22px; color: var(--text-3); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; color: var(--text-2); font-size: 15px; }
.mcp { max-width: 740px; margin: 104px auto 0; text-align: center; }
.mcp.first { margin-top: 8px; }
.url-box { display: flex; align-items: center; gap: 10px; margin: 26px auto 20px; padding: 8px 8px 8px 18px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); max-width: 600px; }
.url-box code { flex: 1; text-align: left; font: 14px var(--mono); overflow-x: auto; white-space: nowrap; }
.tabs { margin-bottom: 12px; }
.snippet { position: relative; text-align: left; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); }
.snippet pre { margin: 0; padding: 18px 20px; padding-right: 84px; white-space: pre-wrap; word-break: break-all; font: 13px/1.65 var(--mono); }
.snippet .btn { position: absolute; top: 12px; right: 12px; }
.mcp .fine { margin-top: 16px; }

/* ---------------------------------------------------------------- reading pages (syntax, guides, policies) */
.doc { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 80px; font-size: 13.5px; }
.toc h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 0 0 10px; font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); }
.prose { font-size: 16px; line-height: 1.75; min-width: 0; }
.prose.narrow, .prose.article { max-width: 720px; margin: 0 auto; }
.prose.article h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.15; letter-spacing: -.015em; margin: 32px 0 10px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -.01em; margin: 44px 0 12px; line-height: 1.25; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose .meta { color: var(--text-3); font-size: 13.5px; margin: 0 0 28px; }
.prose code { font: .86em var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.prose pre { background: var(--surface); box-shadow: var(--shadow); padding: 14px 16px; border-radius: 14px; overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: 13px; }
.prose table { border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; margin: 14px 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { color: var(--text-2); font-weight: 500; }
.prose > :first-child { margin-top: 0; }
.cta { margin: 48px 0 0; padding: 24px; border-radius: 18px; background: var(--surface-2); text-align: center; }
.cta p { margin: 0 0 14px; font-family: var(--serif); font-size: 20px; }
.langs-404 { margin-top: 18px; font-size: 15px; }

/* ---------------------------------------------------------------- footer */
.foot { margin: 120px 0 0; padding: 48px 20px 40px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 45%, var(--bg)); }
.foot-cols { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot h2 { font-size: 13px; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a, .foot .link { color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.foot a:hover, .foot .link:hover { color: var(--text); }
.foot-line { max-width: 1120px; margin: 36px auto 0; font-size: 12.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- dialogs */
.sheet { width: min(780px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .28); }
.sheet.small { width: min(520px, calc(100vw - 24px)); }
.sheet::backdrop { background: rgba(31, 30, 29, .36); backdrop-filter: blur(4px); }
.sheet[open] { animation: rise .3s var(--ease); display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px 12px 26px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 21px; flex: 1; }
.close { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); font-size: 13px; flex: none; }
.sheet .prose { padding: 8px 26px 30px; overflow-y: auto; font-size: 15px; }
.sheet .prose h2 { font-size: 21px; margin: 30px 0 8px; }
.fb { display: flex; flex-direction: column; min-height: 0; }
.fb-body { padding: 16px 26px 22px; display: grid; gap: 12px; overflow-y: auto; }
.fb-body > p:first-child { margin: 0; font-size: 14.5px; }
.fb textarea { min-height: 140px; font: 15px/1.6 var(--font); }
.fb input[type=email] { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); outline: none; }
.fb input[type=email]:focus { border-color: var(--accent); background: var(--surface); }
.fb .btn.primary { padding: 13px; }
.fb-status { margin: 0; min-height: 20px; font-size: 14px; color: var(--text-2); text-align: center; }
.fb .fine { margin: 0; }
.fb-alt { text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--primary-bg); color: var(--primary-fg); padding: 10px 18px; border-radius: 980px; font-size: 14px; box-shadow: var(--shadow); z-index: 50; animation: rise .25s var(--ease); max-width: calc(100vw - 32px); }
.noscript { text-align: center; padding: 20px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 8px; }
  .toc { position: static; background: var(--surface); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
  .foot-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero { padding: 52px 0 28px; }
  .hero h1 { font-size: 32px; }
  .hero.sub { padding: 28px 0 24px; }
  .card { padding: 16px; border-radius: 20px; }
  .drop { padding: 30px 14px 24px; }
  .facts, .steps, .related, .faq { margin-top: 64px; }
  .nav-links { gap: 14px; }
  .nav-links a.link, .nav-links [data-open=guide] { display: none; }
  .row { gap: 10px; }
  .out-list li { flex-wrap: wrap; }
  .out-list .acts { width: 100%; justify-content: flex-end; }
  .mcp { margin-top: 76px; }
  #kbd { display: none; }
  .drop-hint .opt { display: none; }
  .snippet pre { padding: 16px; padding-bottom: 52px; font-size: 12.5px; }
  .snippet .btn { top: auto; bottom: 10px; }
  .foot { margin-top: 80px; }
}
@media (hover: none) { #pick-folder { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
