/* TaxGen Filer in the petriumalpha.com look: Georgia headings, Helvetica body, #1F5C7A, white panels on a
   slate page. Same tokens as the Tie-Out Engine hub (tie-out-engine/style.css). */
:root {
  --brand: #1F5C7A;
  --brand-ink: #174A62;
  --link: #1F5C7A;
  --wash: rgba(31, 92, 122, .07);
  --page: #F8FAFC;
  --panel: #FFFFFF;
  --well: #F1F5F9;
  --ink: #0F172A;
  --muted: #475569;
  --line: #E2E8F0;
  --warn: #9A4A1C;
  --bad: #A3302B;
  --serif: Georgia, Times, "Times New Roman", serif;
  --sans: Helvetica, Verdana, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0A1220; --panel: #0F1A2C; --well: #15233A; --ink: #E2E8F0; --muted: #A3B1C4; --line: #22324A;
    --link: #8CC3DE; --wash: rgba(140, 195, 222, .09); --warn: #E0A26A; --bad: #EE8E86; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0A1220; --panel: #0F1A2C; --well: #15233A; --ink: #E2E8F0; --muted: #A3B1C4; --line: #22324A;
  --link: #8CC3DE; --wash: rgba(140, 195, 222, .09); --warn: #E0A26A; --bad: #EE8E86; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scrollbar-color: #94A3B8 transparent; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: #1F5C7A; color: #fff; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
svg { flex: none; }

/* -- header: white bar, serif wordmark, like petriumalpha.com's nav ---------- */

header { background: var(--panel); border-bottom: 1px solid var(--line); padding: 14px 24px; display: flex;
  align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.mark { display: flex; align-items: center; gap: 10px; font: 400 21px/1 var(--serif); color: var(--ink); text-decoration: none; }
.mark:hover { color: var(--ink); }
.tile { width: 30px; height: 30px; border-radius: 7px; background: var(--brand); color: #fff; display: grid; place-items: center; }
header .divider { width: 1px; height: 26px; background: var(--line); }
header h1 { margin: 0; font: 400 19px/1.2 var(--serif); color: var(--link); }
header .tagline { margin: 0; font-size: 13px; color: var(--muted); }
header .spacer { flex: 1; }
header .note { margin: 0; font-size: 12.5px; color: var(--muted); }
header .hub { font: 700 14px/1 var(--serif); color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor;
  padding-bottom: 3px; }

/* -- the three panes -------------------------------------------------------- */

main { display: grid; grid-template-columns: 300px minmax(0, 1fr) 380px; gap: 18px; padding: 22px 24px;
  align-items: start; max-width: 1640px; margin: 0 auto; }
@media (max-width: 1100px) { main { grid-template-columns: 1fr; } }

section { background: var(--panel); border-radius: 12px; padding: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12); }

h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 400 22px/1.2 var(--serif); color: var(--ink); }
h2 svg { color: var(--link); }
h3 { margin: 18px 0 8px; font: 400 17px/1.3 var(--serif); }

select, button, label { font: inherit; }
select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }

button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink);
  font: 700 14px/1.2 var(--serif); cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
button:hover { border-color: var(--link); color: var(--link); }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }

input[type="checkbox"] { accent-color: var(--brand); width: 15px; height: 15px; vertical-align: -2px; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.blurb { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }

/* -- taxpayer tabs ---------------------------------------------------------- */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.tabs button { font: 400 13px/1.2 var(--sans); padding: 5px 10px; }
.tabs button[aria-pressed='true'] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* -- the pile --------------------------------------------------------------- */

.pile { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.pile li { border-top: 1px solid var(--line); }
.pile li:first-child { border-top: 0; }
.pile button { width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 8px 6px; background: none;
  display: flex; gap: 8px; align-items: baseline; font: 400 14px/1.4 var(--sans); color: var(--ink); }
.pile button:hover { background: var(--wash); color: var(--ink); }
.pile .kind { font-weight: 700; font-size: 13px; }
.pile .issuer { color: var(--muted); font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pile li.taken { opacity: .5; }
/* A drawn check, not a glyph */
.pile li.taken .kind::before { content: ''; display: inline-block; width: 4px; height: 8px; margin: 0 8px 1px 2px;
  border: solid var(--link); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.flag { color: var(--warn); font-size: 11.5px; }

/* -- document pane ---------------------------------------------------------- */

.doc-image { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; margin-bottom: 14px; background: #fff; }

table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; font-size: 12px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.flagged td { color: var(--warn); }

/* What a document did: a tinted block led by a small solid icon */
.explain { position: relative; background: var(--wash); border-radius: 8px; padding: 12px 14px 12px 42px; margin: 14px 0; font-size: 14px; }
.explain::before { content: ''; position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; background: var(--link);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.6-4.2-4.2 1.7-1.7 2.5 2.5 5.3-5.3 1.7 1.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.6-4.2-4.2 1.7-1.7 2.5 2.5 5.3-5.3 1.7 1.7Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.explain.note { background: color-mix(in srgb, var(--warn) 11%, transparent); }
.explain.note::before { background: var(--warn);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1.2 15h-2.4v-2.4h2.4Zm0-4.4h-2.4V6.8h2.4Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1.2 15h-2.4v-2.4h2.4Zm0-4.4h-2.4V6.8h2.4Z'/%3E%3C/svg%3E"); }

/* -- assessment ------------------------------------------------------------- */

.hero { text-align: center; padding: 10px 0 16px; }
.hero .label { color: var(--muted); font-size: 13px; }
.hero .figure { font: 400 44px/1.1 var(--serif); font-variant-numeric: tabular-nums lining-nums; color: var(--link); margin: 4px 0 2px; }
.hero .figure.owing { color: var(--bad); }
.hero .delta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: center; }
.compare .figure { font-size: 28px; }
.compare .label { font-size: 12px; }

.household { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; display: flex; justify-content: space-between; }

details summary { cursor: pointer; color: var(--link); font: 700 14px/1.3 var(--serif); margin: 14px 0 6px; }

.log { list-style: none; margin: 0; padding: 0; font-size: 12.5px; max-height: 28vh; overflow-y: auto; }
.log li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.log .amount { font-variant-numeric: tabular-nums; }
.log .up { color: var(--link); }
.log .down { color: var(--bad); }

.dropzone { border: 1.5px dashed var(--line); border-radius: 8px; padding: 14px; text-align: center; color: var(--muted);
  font-size: 12.5px; margin-top: 12px; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.dropzone.over { border-color: var(--link); color: var(--link); background: var(--wash); }

.unverified { background: color-mix(in srgb, var(--warn) 11%, transparent); color: var(--warn); border-radius: 8px;
  padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px; }

/* -- footer ----------------------------------------------------------------- */

footer { max-width: 1640px; margin: 0 auto; padding: 8px 24px 32px; font-size: 13px; color: var(--muted); }
footer .by { margin: 0 0 8px; color: var(--ink); }
footer .by strong { font: 400 16px/1 var(--serif); }
.specimen { margin: 0; font-size: 11.5px; max-width: 90ch; }

@media (max-width: 600px) {
  header { padding: 12px 16px; }
  header .divider, header .tagline, header .spacer { display: none; }
  header .note { flex-basis: 100%; }
  main { padding: 14px 12px; gap: 14px; }
  section { padding: 16px; }
  footer { padding: 4px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* -- print: the assessment alone, which is what gets validated -------------- */

@media print {
  header, footer .by, .pile-pane, .doc-pane, .dropzone, button, .tabs, select { display: none !important; }
  body { background: #fff; }
  main { display: block; padding: 0; }
  section { box-shadow: none; padding: 0; }
  details { display: block; }
  details > summary { display: none; }
  .log { max-height: none; }
  .print-only { display: block !important; }
}

.print-only { display: none; }
