/* Alberta NDP records page (data request tool).
   Colours and type follow brand/README.md: NDP orange for accents (never as text on white), purple for
   headings and buttons, ink for body text, Arial throughout. Always light: the page does not follow a
   device's dark mode (Frank, 2026-11-16). */

:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #1b1f24;
  --muted: #5b6470;
  --border: #d8dce2;
  --field-border: #8a93a0;
  --heading: #5d3577;
  --link: #5d3577;
  --button: #5d3577;
  --button-text: #ffffff;
  --brand: #ff6900;
  --track: #e9ebef;
  --danger: #b3261e;
  --danger-text: #b3261e;
  --focus: #5d3577;
  color-scheme: only light;  /* keeps form fields and scrollbars light on dark-mode devices too */
}

/* ---------- page and card ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 24px 16px 48px; background: var(--bg); color: var(--text);
       font: 16px/1.5 Arial, Helvetica, sans-serif; }
@media (min-height: 760px) { body { padding-top: 6vh; } }
.card { max-width: 440px; margin: 0 auto; padding: 24px 28px 28px; background: var(--panel);
        border: 1px solid var(--border); border-top: 4px solid var(--brand); border-radius: 6px;
        box-shadow: 0 1px 2px rgba(27, 31, 36, .06); }
.card.wide { max-width: 760px; }
@media (max-width: 480px) { .card { padding: 20px 18px 24px; } }
.brand { margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.logo { display: block; height: 40px; width: auto; }

/* ---------- text ---------- */
h1 { margin: 0 0 .6rem; font-size: 1.5rem; line-height: 1.25; color: var(--heading); }
h2 { margin: 0 0 .5rem; font-size: 1.05rem; line-height: 1.3; }
p { margin: 0 0 .75rem; }
a { color: var(--link); }
.lead { margin: 0 0 1.25rem; }
.answer { margin: 0 0 .5rem; font-size: 1.1rem; }
.note { margin: .75rem 0 0; color: var(--muted); font-size: .9rem; }
.note.asof { margin-top: 1.5rem; }
.error { margin: 0 0 1rem; padding: .1rem 0 .1rem .75rem; border-left: 4px solid var(--danger);
         color: var(--danger-text); font-weight: 700; }
section { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
ul.plain { margin: .25rem 0 0; padding-left: 1.2rem; }
ul.plain li + li { margin-top: .35rem; }

/* ---------- forms and buttons ---------- */
.field { margin-bottom: 1rem; }
label { display: block; margin-bottom: .35rem; font-size: .95rem; font-weight: 700; }
input { width: 100%; padding: .7rem .8rem; font: inherit; color: var(--text); background: var(--panel);
        border: 1px solid var(--field-border); border-radius: 4px; }
button, a.button { display: block; width: 100%; margin: 0; padding: .8rem 1rem; font: inherit; font-weight: 700;
                   text-align: center; text-decoration: none; color: var(--button-text); background: var(--button);
                   border: 1px solid var(--button); border-radius: 4px; cursor: pointer; }
button:hover, a.button:hover { filter: brightness(1.1); }
button:disabled { opacity: .5; cursor: default; filter: none; }
button.secondary { font-weight: 400; color: var(--text); background: transparent; border-color: var(--field-border); }
form button { margin-top: .5rem; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- result page ---------- */
.warning { margin: 1rem 0 0; padding: .9rem 1.1rem; background: var(--danger); color: #ffffff; border-radius: 4px;
           font-size: 1.05rem; line-height: 1.4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.warning strong { display: block; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .55rem .6rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { padding-left: 0; white-space: nowrap; }  /* a date stays on one line */
th:last-child, td:last-child { padding-right: 0; }
thead th { color: var(--muted); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
           border-bottom-width: 2px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot th, tfoot td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: 0; }

/* Tax credit and contribution room: one bar from $0 to $5,000. Markers at $200, $1,100 and $2,300 sit at
   4%, 22% and 46%, each with its label to the right; the $5,000 label is pinned to the right end. */
.room { position: relative; margin: .75rem 0 2.25rem; }
.room progress { display: block; width: 100%; height: 1.5rem; overflow: hidden; background: var(--track);
                 border: 1px solid var(--border); border-radius: 4px; -webkit-appearance: none; appearance: none;
                 -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.room progress::-webkit-progress-bar { background: var(--track); }
.room progress::-webkit-progress-value { background: var(--brand); }
.room progress::-moz-progress-bar { background: var(--brand); }
.room .marks { position: absolute; inset: 0; pointer-events: none; }
.room .mark { position: absolute; top: 0; height: 1.5rem; padding: 1.8rem 0 0 .3rem; border-left: 2px solid var(--text);
              font-size: .8rem; font-weight: 700; line-height: 1; white-space: nowrap; }
.room .mark-200 { left: 4%; }
.room .mark-1100 { left: 22%; }
.room .mark-2300 { left: 46%; }
.room .mark-5000 { right: 0; padding-left: 0; border-left: 0; }

/* Donate nudge, shown to anyone with room left this year. */
.give { margin: 1.1rem 0 0; padding: .9rem 1rem; background: var(--bg); border-left: 4px solid var(--brand); border-radius: 4px; }
.give p { margin: 0 0 .75rem; }
.give a.button { display: inline-block; width: auto; padding: .7rem 1.6rem; }

.actions { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
#print { width: auto; padding: .7rem 1.4rem; }
.confirm { margin-top: 1rem; padding: 1rem; border: 2px solid var(--danger); border-radius: 4px; }
.confirm p { margin: 0 0 .9rem; font-weight: 700; }
.confirm button + button { margin-top: .6rem; }
.printonly { display: none; }

/* ---------- staging only ---------- */
.staging { margin: 0 0 1rem; padding: .4rem .6rem; border: 1px dashed var(--field-border); color: var(--muted); font-size: .85rem; }
.preview { margin-top: 1.25rem; padding: .75rem; border: 1px dashed var(--field-border); border-radius: 4px; }
.preview pre { margin: .5rem 0; font: inherit; font-size: .9rem; white-space: pre-wrap; word-break: break-word; }

/* ---------- print: black on white, no chrome ---------- */
@media print {
  :root { --bg: #ffffff; --panel: #ffffff; --text: #000000; --muted: #444444; --border: #bbbbbb; --heading: #000000;
          --link: #000000; --track: #eeeeee; }
  @page { margin: 12mm 14mm; }
  html { font-size: 12.5px; }  /* every size here is in rem, so this scales the whole page for paper */
  body { padding: 0; font-size: 1rem; line-height: 1.4; }
  th, td { padding-top: .4rem; padding-bottom: .4rem; }
  .note.asof { margin-top: .8rem; }
  .card, .card.wide { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .brand { margin-bottom: 12px; padding-bottom: 10px; }
  .logo { height: 32px; }
  section { margin-top: 1.1rem; padding-top: .8rem; }
  .noprint, .staging { display: none !important; }
  .printonly { display: block; margin-top: 1.1rem; padding-top: .6rem; border-top: 1px solid var(--border); font-size: .85rem; }
  .warning, .room, tr, h2, li { break-inside: avoid; }  /* a short record fits one page; a long gift table may run on */
  h2 { break-after: avoid; }
  a { text-decoration: none; }
}
