@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans-latin-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans-latin-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #eef1f5;
  --paper: #ffffff;
  --ink: #142037;
  --muted: #4a5466;
  --rule: #cdd3dd;
  --rule-strong: #8b96a8;
  --accent: #1d43b5;
  --accent-hover: #15348f;
  --accent-ink: #ffffff;
  --accent-soft: #e2e8fa;
  --mark: #fff0bd;
  --mark-ink: #4d3a00;
  --good: #19603a;
  --bad: #a32a1e;
  --code: #e6eaf0;
  --focus: #c98a00;
  --shadow: 0 1px 0 rgba(20, 32, 55, 0.06);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: "Public Sans", var(--sans);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1220;
    --paper: #131b2c;
    --ink: #e3e8f2;
    --muted: #a3adbf;
    --rule: #28334b;
    --rule-strong: #56637f;
    --accent: #a3b8ff;
    --accent-hover: #c2d0ff;
    --accent-ink: #0c1220;
    --accent-soft: #1b2643;
    --mark: #4a3d0e;
    --mark-ink: #ffe9a3;
    --good: #86d6a6;
    --bad: #ffa395;
    --code: #1a2336;
    --focus: #ffcf4d;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1220; --paper: #131b2c; --ink: #e3e8f2; --muted: #a3adbf; --rule: #28334b; --rule-strong: #56637f;
  --accent: #a3b8ff; --accent-hover: #c2d0ff; --accent-ink: #0c1220; --accent-soft: #1b2643; --mark: #4a3d0e; --mark-ink: #ffe9a3;
  --good: #86d6a6; --bad: #ffa395; --code: #1a2336; --focus: #ffcf4d; --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  border-top: 4px solid var(--accent);
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.45rem); margin: 0 0 0.6rem; font-weight: 700; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; font-weight: 600; }
p { margin: 0 0 0.9rem; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code); padding: 0.05em 0.35em; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--code); padding: 0.8rem 1rem; border-radius: 4px; overflow-x: auto; font-size: 0.85rem; line-height: 1.45; }
pre code { background: none; padding: 0; }
.small { font-size: 0.875rem; color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* header and footer */
header.site { border-bottom: 1px solid var(--rule); background: var(--paper); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 1.2rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
nav.top { display: flex; gap: 4px; flex-wrap: wrap; }
nav.top a, .menu nav a { color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 4px; font-size: 0.95rem; }
nav.top a:hover, .menu nav a:hover { background: var(--accent-soft); }
nav.top a[aria-current="page"], .menu nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 4px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 14px; height: 14px; }
.menu nav { position: absolute; right: 0; top: calc(100% + 6px); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 6px; display: flex; flex-direction: column; min-width: 220px; z-index: 5; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.menu nav a { padding: 12px; }
@media (max-width: 760px) {
  nav.top { display: none; }
  .menu { display: block; }
}
footer.site { margin-top: 4rem; border-top: 1px solid var(--rule); background: var(--paper); padding: 1.6rem 0 2rem; font-size: 0.9rem; color: var(--muted); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 1rem; }
footer.site nav a { color: var(--ink); padding: 6px 0; }

/* page furniture */
main { display: block; }
.page { padding-top: 2.2rem; }
.lede { font-size: 1.13rem; max-width: 46rem; color: var(--ink); }
.prose { max-width: 46rem; }
.prose li { margin-bottom: 0.4rem; }
.label { font-family: var(--head); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.35rem; }
.sheet { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 1.2rem 1.25rem; box-shadow: var(--shadow); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); margin: 1.4rem 0; }
.facts > div { padding: 0.9rem 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts p { margin: 0; }
.facts .label { margin-bottom: 0.2rem; }
table.plain { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin: 1rem 0; background: var(--paper); }
table.plain th, table.plain td { border: 1px solid var(--rule); padding: 6px 9px; text-align: left; vertical-align: top; }
table.plain th { background: var(--code); font-weight: 600; }
.scroll-x { overflow-x: auto; max-width: 100%; }
ol.steps { padding-left: 1.3rem; }
ol.steps li { margin-bottom: 0.6rem; }
.cite { font-size: 0.875rem; color: var(--muted); border-left: 3px solid var(--rule-strong); padding-left: 0.8rem; margin: 0.6rem 0 1rem; }
blockquote { margin: 0.8rem 0 1rem; padding: 0.4rem 0 0.4rem 1rem; border-left: 3px solid var(--accent); }
blockquote p { margin: 0 0 0.3rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 4px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: 600 0.98rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.quiet { background: transparent; color: var(--accent); }
.btn.quiet:hover { background: var(--accent-soft); color: var(--accent); }
.btn[aria-disabled="true"], .btn:disabled { background: var(--code); border-color: var(--rule-strong); color: var(--muted); cursor: not-allowed; }
button.link { background: none; border: 0; padding: 4px 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; min-height: 32px; text-align: left; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status { min-height: 1.5em; margin: 0.6rem 0; }
.status.error { color: var(--bad); }
.status.good { color: var(--good); }

/* forms */
label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0.6rem 0 0.25rem; }
input[type=text], input[type=email], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 4px;
  padding: 9px 10px; min-height: 44px; width: 100%; max-width: 30rem;
}
textarea { min-height: 5rem; font-family: var(--mono); font-size: 0.85rem; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0.35rem 0; min-height: 32px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
form.inline { max-width: 30rem; }
form.inline .btn { margin-top: 0.8rem; }

/* the converter */
.intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; align-items: start; padding-top: 2.2rem; }
.intro .facts { margin: 0.2rem 0 0; grid-template-columns: 1fr; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; gap: 0.8rem; } }
.drop {
  margin-top: 1.6rem; background: var(--paper); border: 2px dashed var(--rule-strong); border-radius: 8px;
  padding: 1.6rem 1.4rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem 1.4rem; align-items: center;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .tray { width: 76px; height: 76px; color: var(--accent); }
.drop-title { font-family: var(--head); font-weight: 700; font-size: 1.25rem; margin: 0 0 0.2rem; }
.drop .row { margin-top: 0.7rem; }
.drop .private { margin: 0.7rem 0 0; font-size: 0.875rem; color: var(--muted); }
@media (max-width: 560px) { .drop { grid-template-columns: 1fr; } .drop .tray { width: 56px; height: 56px; } .drop .row .btn { flex: 1 1 100%; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#workspace { margin-top: 1.4rem; }
.summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tcard { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 4px; padding: 0.8rem 0.95rem; min-width: 0; }
.tcard.warn { border-left-color: var(--focus); }
.tcard p { margin: 0 0 0.25rem; overflow-wrap: anywhere; }
.tcard select { margin-top: 0.2rem; }
.tname { font-weight: 700; font-family: var(--head); }
.tcard summary { cursor: pointer; font-weight: 600; min-height: 32px; }
ul.skipped { max-height: 14rem; overflow: auto; padding-left: 1.1rem; margin: 0.4rem 0 0; }
.ws-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 1.4rem; border-bottom: 1px solid var(--rule-strong); }
[role=tablist] { display: flex; gap: 2px; flex-wrap: wrap; }
[role=tab] {
  font: 600 0.98rem/1.2 var(--sans); color: var(--ink); background: transparent; border: 1px solid transparent; border-bottom: 0;
  padding: 12px 16px; border-radius: 4px 4px 0 0; cursor: pointer; min-height: 44px; margin-bottom: -1px;
}
[role=tab][aria-selected="true"] { background: var(--paper); border-color: var(--rule-strong); border-bottom: 1px solid var(--paper); }
[role=tabpanel] { background: var(--paper); border: 1px solid var(--rule-strong); border-top: 0; padding: 1.1rem; border-radius: 0 0 6px 6px; }
.forms-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.2rem; }
@media (max-width: 860px) { .forms-grid { grid-template-columns: 1fr; } }
.form-list { list-style: none; margin: 0.5rem 0 0; padding: 0; max-height: 34rem; overflow: auto; border: 1px solid var(--rule); border-radius: 4px; }
.form-list li { border-bottom: 1px solid var(--rule); }
.form-list li:last-child { border-bottom: 0; }
.form-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 11px; cursor: pointer; color: var(--ink); font: inherit; min-height: 44px; }
.form-list button:hover { background: var(--accent-soft); }
.form-list button[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.form-list .fname { display: block; font-family: var(--mono); font-size: 0.86rem; overflow-wrap: anywhere; }
.form-list .more { padding: 9px 11px; }
.viewer { min-width: 0; }
.viewer h3 { margin-top: 0; overflow-wrap: anywhere; font-family: var(--mono); font-weight: 600; font-size: 0.95rem; }
.paper-frame { background: #fff; border: 1px solid var(--rule-strong); border-radius: 2px; overflow: auto; }
.paper-frame iframe { display: block; width: 100%; min-height: 300px; border: 0; background: #fff; }
.fields-wrap { overflow: auto; max-height: 36rem; border: 1px solid var(--rule); border-radius: 4px; margin-top: 0.8rem; }
.fields-wrap table { border-collapse: collapse; font-size: 0.83rem; }
.fields-wrap th, .fields-wrap td { border: 1px solid var(--rule); padding: 5px 8px; text-align: left; vertical-align: top; white-space: nowrap; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }
.fields-wrap th { position: sticky; top: 0; background: var(--code); font-family: var(--mono); font-weight: 600; z-index: 1; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.4rem 1.6rem; }
.options fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.options legend { font-weight: 700; font-family: var(--head); padding: 0; margin-bottom: 0.3rem; }
.limit { background: var(--mark); color: var(--mark-ink); padding: 0.6rem 0.8rem; border-radius: 4px; margin: 1rem 0; }
.limit a { color: inherit; font-weight: 600; }
progress { width: 100%; max-width: 34rem; height: 14px; accent-color: var(--accent); }
.help { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem 2rem; margin-top: 1rem; }
.help h2 { margin-top: 1.4rem; font-size: 1.15rem; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin: 1.4rem 0; }
.plan { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 1.2rem 1.25rem; }
.plan.paid { border: 2px solid var(--accent); }
.plan h2 { margin-top: 0; }
.plan ul { padding-left: 1.15rem; }
.price { font-family: var(--head); font-size: 2rem; font-weight: 700; margin: 0.2rem 0 0.6rem; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.disclosure { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.2rem; margin: 1.2rem 0; }
.disclosure dl { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr); gap: 0.35rem 1rem; margin: 0; }
.disclosure dt { font-weight: 600; }
.disclosure dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .disclosure dl { grid-template-columns: 1fr; } .disclosure dd { margin-bottom: 0.5rem; } }

.notfound { padding: 4rem 0 2rem; }

/* the archive box in the header */
.brand .b-body { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.brand .b-lid { fill: var(--accent); stroke: var(--ink); stroke-width: 1.6; }
.brand .b-slot { fill: var(--ink); }
.brand .b-card { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.disclosure h2 { margin-top: 0; }
