/* Sevenfifty. Printout paper and ledger green: the tables are banded like the tractor-feed paper these files were
   once printed on. System fonts, a serif for headings, monospace for anything that came out of a record. */

:root {
  --bg: #f7f6f1;
  --surface: #ffffff;
  --ink: #17211c;
  --ink-2: #39463f;
  --ink-3: #59665f;
  --line: #dcdfd6;
  --line-2: #c3c9bf;
  --band: #ecf3ee;
  --accent: #1e5b41;
  --accent-2: #164632;
  --accent-ink: #ffffff;
  --accent-soft: #e2eee6;
  --hole: #e4e6df;
  --ok: #1b6942;
  --ok-soft: #e1f0e6;
  --warn: #7a4d00;
  --warn-soft: #fbf0d6;
  --warn-line: #e7cf8f;
  --bad: #a1271c;
  --bad-soft: #fbe8e5;
  --bad-line: #eebdb5;
  --none: #4f5a54;
  --none-soft: #eceee9;
  --focus: #1e5b41;
  --shadow: 0 1px 2px rgba(23, 33, 28, 0.06), 0 12px 32px -18px rgba(23, 33, 28, 0.35);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1411;
    --surface: #141c18;
    --ink: #e3ebe6;
    --ink-2: #bcc8c1;
    --ink-3: #93a19a;
    --line: #26322c;
    --line-2: #36453d;
    --band: #18231e;
    --accent: #84c9a4;
    --accent-2: #a3d8bb;
    --accent-ink: #0b1510;
    --accent-soft: #1b2c24;
    --hole: #0e1411;
    --ok: #84c9a4;
    --ok-soft: #16271e;
    --warn: #f0c46b;
    --warn-soft: #2b2414;
    --warn-line: #574a26;
    --bad: #f2a194;
    --bad-soft: #2e1916;
    --bad-line: #5c3029;
    --none: #b2bdb7;
    --none-soft: #1d2622;
    --focus: #a3d8bb;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 36px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  overflow-wrap: break-word;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
h3, h4 { line-height: 1.3; }
code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
.small { font-size: 14px; color: var(--ink-3); }
.sub { display: block; font-size: 13px; color: var(--ink-3); }
.strong { font-weight: 600; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 10; border-radius: 4px; }
.skip:focus { top: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
@media (min-width: 768px) { :root { --gutter: 28px; } }

/* header and footer */
header.site { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 18px; min-height: 44px; }
.brand:hover { color: var(--ink); }
.mark { width: 28px; height: 28px; flex: none; }
.m-sheet { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.m-bar { fill: var(--accent-soft); }
.m-hole { fill: var(--accent); }
nav.top { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -10px; }
nav.top a { color: var(--ink-2); text-decoration: none; padding: 10px; min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; }
nav.top a:hover, nav.top a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
footer.site { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 40px; color: var(--ink-3); font-size: 14px; }
footer.site p { max-width: 640px; }
.foot-legal { font-size: 13px; }

/* hero */
.hero { padding: 40px 0 8px; }
.kicker { margin: 0 0 14px; }
.kicker span { display: inline-block; font-size: 14px; font-weight: 600; color: var(--bad); background: var(--bad-soft); border: 1px solid var(--bad-line); padding: 4px 10px; border-radius: 4px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); margin: 0 0 16px; max-width: 18em; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 44em; margin: 0 0 10px; }
.lede-note { color: var(--ink-3); margin: 0; }

/* the converter */
.convert { padding: 26px 0 8px; }
.tool {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 22px 30px;
}
/* tractor-feed holes down both edges */
.tool::before, .tool::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 8px;
  background: radial-gradient(circle at 4px 4px, var(--hole) 3px, transparent 3.5px) 0 0 / 8px 22px repeat-y;
}
.tool::before { left: 9px; }
.tool::after { right: 9px; }
.tool.dragging { outline: 3px dashed var(--accent); outline-offset: -8px; }
@media (max-width: 600px) { .tool { padding: 18px 20px; } .tool::before { left: 5px; } .tool::after { right: 5px; } }

.drop { text-align: center; padding: 28px 8px; }
.drop-title { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0 0 8px; }
.drop-text { color: var(--ink-2); max-width: 36em; margin: 0 auto 18px; }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; }
.load-error { color: var(--bad); background: var(--bad-soft); border: 1px solid var(--bad-line); border-radius: 4px; padding: 10px 12px; text-align: left; max-width: 40em; margin: 12px auto 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 9px 18px;
  font: 600 15px/1.2 var(--sans);
  color: var(--accent-ink); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 4px;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn.quiet { background: transparent; color: var(--accent); }
.btn.quiet:hover { background: var(--accent-soft); color: var(--accent-2); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn:disabled, .btn:disabled:hover { cursor: not-allowed; background: var(--none-soft); border-color: var(--line-2); color: var(--ink-3); }
.file-btn { position: relative; }
.file-input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.linkish:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }
td.name .linkish { color: var(--ink); text-decoration: none; min-height: 32px; }
td.name .linkish:hover { color: var(--accent); text-decoration: underline; }

.filebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.filebar h3 { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.file-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 14px; flex: 1 1 320px; }
.file-name { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.tag { font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 3px; padding: 1px 6px; }
.filebar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; min-height: 36px; cursor: pointer; }
.toggle input, .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.summary-line { font-size: 17px; margin: 14px 0 6px; }
.c-warn { color: var(--warn); }
.c-bad { color: var(--bad); }
.check-ok { color: var(--ok); margin: 6px 0; }

.panel { margin-top: 26px; }
.panel > h3, .panel h3:first-child { font-size: 17px; margin: 0 0 10px; }
.issues { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.issues li { padding: 6px 0 6px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.lvl { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 3px; }
.lvl-error .lvl { color: var(--bad); background: var(--bad-soft); }
.lvl-warning .lvl { color: var(--warn); background: var(--warn-soft); }
.lvl-info .lvl { color: var(--ink-3); background: var(--none-soft); }

/* tables: banded like printout paper */
/* relative, so the visually hidden header text is clipped with the table instead of widening the page */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--line-2); background: var(--surface); white-space: nowrap; }
.grid td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--line); }
.grid tbody tr:nth-child(6n+1), .grid tbody tr:nth-child(6n+2), .grid tbody tr:nth-child(6n+3) { background: var(--band); }
.grid .num { text-align: right; }
.returns tbody tr { cursor: pointer; }
.returns tbody tr:hover td { background: var(--accent-soft); }
.returns td.amounts { min-width: 180px; }
.returns td.name { min-width: 200px; }
.grid td.empty { text-align: center; color: var(--ink-3); padding: 18px; cursor: default; }

.pill { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; border: 1px solid transparent; }
.pill-ok { color: var(--ok); background: var(--ok-soft); }
.pill-warning { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.pill-error { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.pill-none { color: var(--none); background: var(--none-soft); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.chip { min-height: 36px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); color: var(--ink-2); font: 600 14px/1 var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-n { font-weight: 400; opacity: 0.85; }
select, input[type="text"], input[type="search"], input[type="password"] {
  font: 15px/1.3 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; min-height: 40px; max-width: 100%;
}
input[type="search"] { flex: 1 1 240px; min-width: 0; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 10px 0; font-size: 14px; color: var(--ink-3); }

/* export */
.export { border-top: 2px solid var(--accent); padding-top: 18px; }
.export-grid { display: grid; gap: 20px 32px; }
@media (min-width: 900px) { .export-grid { grid-template-columns: 1fr 1fr; } }
.field { margin: 0 0 14px; }
.field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.field.check > label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.field.check input { margin-top: 2px; flex: none; }
.help { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.templates-box { background: var(--band); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; font-size: 14px; }
.templates-box h4 { margin: 0 0 6px; font-size: 15px; }
.templates { list-style: none; padding: 0; margin: 10px 0 0; }
.templates li { padding: 8px 0; border-top: 1px solid var(--line); }
.templates li .btn { margin-top: 6px; }
.export-actions { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.export-actions .buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.export-actions p { max-width: 46em; }
.closed { margin: 6px 0; }
.status { display: inline-block; font-size: 13px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 3px; padding: 2px 8px; }

.signup-box { margin-top: 22px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: 4px; }
.signup-box h3 { margin: 0 0 10px; font-size: 18px; }
form.signup label[for="email"] { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
form.signup .row { display: flex; flex-wrap: wrap; gap: 8px; }
form.signup input[type="email"] {
  flex: 1 1 240px; min-width: 0; font: 15px/1.3 var(--sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; min-height: 44px;
}
form.signup.done .row, form.signup.done label[for="email"] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 10px 0 0; font-weight: 600; min-height: 1.4em; }
.msg.bad { color: var(--bad); }

/* the record dialogs */
dialog.sheet {
  width: min(1080px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  padding: 0; border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
dialog.sheet::backdrop { background: rgba(14, 20, 17, 0.55); }
.dialog-head { position: sticky; top: 0; z-index: 1; background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 20px; padding-right: 100px; }
.dialog-head h2 { margin: 0; font-size: 22px; }
.dialog-head .close { position: absolute; right: 14px; top: 12px; }
.dialog-body { padding: 14px 20px 20px; }
.dialog-cols { display: grid; gap: 20px 28px; }
@media (min-width: 900px) { .dialog-cols { grid-template-columns: 1.1fr 1fr; } }
.dialog-cols h3 { font-size: 15px; margin: 6px 0 10px; }
.issue-group { border-left: 4px solid var(--line-2); padding: 4px 0 4px 12px; margin-bottom: 12px; }
.issue-group h3 { font-size: 14px; margin: 0 0 4px; }
.issue-group ul { margin: 0; padding-left: 18px; font-size: 14px; }
.issue-group.lvl-error { border-color: var(--bad); }
.issue-group.lvl-error h3 { color: var(--bad); }
.issue-group.lvl-warning { border-color: var(--warn); }
.issue-group.lvl-warning h3 { color: var(--warn); }
form.edit fieldset { border: 1px solid var(--line); border-radius: 4px; margin: 0 0 14px; padding: 10px 14px 4px; display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
form.edit legend { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); padding: 0 6px; }
form.edit .field { margin-bottom: 10px; min-width: 0; }
form.edit .field label { font-weight: 500; font-size: 13px; color: var(--ink-2); }
form.edit input, form.edit select { width: 100%; font-family: var(--mono); font-size: 14px; }
.field.has-error input, .field.has-error select { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.field-err { margin: 4px 0 0; font-size: 12px; color: var(--bad); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
table.fire { width: 100%; border-collapse: collapse; font-size: 13px; }
.fire th { text-align: left; color: var(--ink-3); font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--line-2); }
.fire td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fire tbody tr:nth-child(6n+1), .fire tbody tr:nth-child(6n+2), .fire tbody tr:nth-child(6n+3) { background: var(--band); }
.pre { white-space: pre-wrap; }
details.raw { margin-top: 12px; font-size: 13px; }
details.raw summary { cursor: pointer; color: var(--accent); min-height: 32px; }
details.raw pre { overflow-x: auto; background: var(--band); border: 1px solid var(--line); padding: 10px; font-size: 12px; line-height: 1.5; }

/* the reading sections */
.prose-section { padding: 36px 0 8px; }
.prose-section.alt { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-top: 28px; }
.prose-section h2 { font-size: 28px; margin: 0 0 12px; }
.prose-section h2 + p { margin-top: 0; }
.prose-section h3 { font-size: 18px; margin: 28px 0 8px; }
.prose-section p, .prose-section li { color: var(--ink-2); }
.prose-section ul { padding-left: 20px; }
.prose-section li { margin-bottom: 8px; }
.prose-section p + h2 { margin-top: 36px; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); border-bottom-color: var(--line-2); }
.compare tbody th { font-weight: 600; color: var(--ink); min-width: 120px; }
.compare tbody tr:nth-child(odd) { background: var(--band); }
.page-head { padding: 40px 0 0; }
.page-head h1 { font-size: clamp(30px, 5vw, 40px); margin: 0 0 6px; }
.meta { color: var(--ink-3); font-size: 14px; }
pre.csp { white-space: pre-wrap; background: var(--band); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; font-size: 13px; }
pre.csp .k { color: var(--accent); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  header.site, footer.site, .hero, .prose-section, .export, .toolbar, .pager { display: none; }
  .tool { box-shadow: none; border: 0; padding: 0; }
  .tool::before, .tool::after { display: none; }
}
