/* Treasurer's Cash Book: large type, strong contrast, one column of numbered steps. */

* {
  box-sizing: border-box;
}

html {
  font-size: 20px;
}

body {
  margin: 0;
  padding: 0 16px 48px;
  background: #f4f4f1;
  color: #111111;
  font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

header,
main,
footer {
  max-width: 1100px;
  margin: 0 auto;
}

h1 {
  margin: 28px 0 8px;
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
  line-height: 1.25;
}

h3 {
  margin: 24px 0 8px;
  font-size: 1.15rem;
}

p,
ul {
  margin: 0 0 14px;
}

a {
  color: #0b3d91;
  text-decoration: underline;
}

.lead {
  font-size: 1.1rem;
  max-width: 46em;
}

.card,
.notice {
  margin: 0 0 24px;
  padding: 22px 24px;
  background: #ffffff;
  border: 2px solid #33333a;
  border-radius: 8px;
}

.notice {
  background: #fff8d6;
  border-color: #6b5200;
}

.notice p:last-child,
.card p:last-child {
  margin-bottom: 0;
}

.paid-card {
  border-color: #0b3d91;
  border-width: 3px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 24px;
  margin-bottom: 14px;
}

.field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

label,
legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-weight: bold;
}

input[type="text"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  background: #ffffff;
  color: #111111;
  border: 2px solid #33333a;
  border-radius: 6px;
  font: inherit;
}

textarea {
  max-width: 28em;
  margin-bottom: 14px;
}

label.radio {
  display: inline-block;
  margin: 0 22px 6px 0;
  padding: 8px 0;
  font-weight: normal;
}

input[type="radio"],
input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 0 6px 0 0;
  vertical-align: -4px;
}

button {
  min-height: 52px;
  margin: 0 10px 10px 0;
  padding: 10px 22px;
  background: #ffffff;
  color: #0b3d91;
  border: 2px solid #0b3d91;
  border-radius: 6px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

button.primary {
  background: #0b3d91;
  color: #ffffff;
}

button.danger {
  background: #ffffff;
  color: #8f1010;
  border-color: #8f1010;
}

button.small {
  min-height: 44px;
  margin: 2px 6px 2px 0;
  padding: 6px 14px;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
summary:focus {
  outline: 4px solid #d97800;
  outline-offset: 2px;
}

.buttons {
  margin-bottom: 4px;
}

.hint {
  color: #33333a;
}

.message,
.warning,
.errors {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 8px solid #0b3d91;
  background: #e9f0fb;
  font-weight: bold;
}

.warning,
.errors,
.message.bad {
  border-left-color: #8f1010;
  background: #fdeaea;
  color: #5c0808;
}

.message.good {
  border-left-color: #14602a;
  background: #e6f4ea;
  color: #0c3d1a;
}

.errors {
  padding-left: 40px;
}

[hidden] {
  display: none !important;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption {
  padding-bottom: 8px;
  text-align: left;
  color: #33333a;
}

th,
td {
  padding: 10px 12px;
  border: 1px solid #77777f;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: #e4e4de;
}

.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#entries-table td.actions {
  white-space: nowrap;
}

#entries-table tr.editing td {
  background: #fff8d6;
}

.totals {
  max-width: 34em;
}

.totals.balances {
  max-width: none;
}

.totals tfoot th,
.totals tfoot td,
.totals tr.strong th,
.totals tr.strong td {
  background: #e4e4de;
  font-weight: bold;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 32px;
}

.check {
  padding-left: 0;
  list-style: none;
}

.check li {
  margin-bottom: 8px;
  padding: 10px 14px;
  border-left: 8px solid #14602a;
  background: #e6f4ea;
}

.check li.bad {
  border-left-color: #8f1010;
  background: #fdeaea;
}

summary {
  margin-bottom: 14px;
  color: #0b3d91;
  font-weight: bold;
  cursor: pointer;
}

.page-foot {
  padding-top: 8px;
  color: #33333a;
}

/* ---------- the guide pages: plain reading pages that share this file ---------- */

.site-name {
  margin: 20px 0 0;
  font-weight: bold;
}

.guide p,
.guide li {
  max-width: 46em;
}

.guide li {
  margin-bottom: 8px;
}

.guide ol {
  margin: 0 0 14px;
}

.guide table {
  margin-bottom: 8px;
}

.guide-links {
  padding-left: 1.2em;
}

.guide-links li {
  margin-bottom: 8px;
}

.button-link {
  display: inline-block;
  margin: 0 10px 10px 0;
  padding: 12px 22px;
  background: #0b3d91;
  color: #ffffff;
  border: 2px solid #0b3d91;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
}

/* ---------- the report: hidden on screen until unlocked, the only thing printed ---------- */

.report {
  display: none;
  margin: 0 0 24px;
  padding: 32px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #33333a;
  font-family: Georgia, "Times New Roman", serif;
}

body.unlocked .report {
  display: block;
}

.report h1 {
  margin: 0 0 4px;
  font-size: 1.6rem;
  text-align: center;
}

.report h2 {
  margin: 0;
  font-size: 1.25rem;
  text-align: center;
}

.report .report-period {
  margin-bottom: 20px;
  text-align: center;
}

.report h3 {
  margin: 20px 0 6px;
  font-size: 1.05rem;
}

.report table {
  margin-bottom: 8px;
}

.report th,
.report td {
  padding: 5px 8px;
  border: 1px solid #000000;
}

.report thead th,
.report tr.strong th,
.report tr.strong td {
  background: #eeeeee;
  font-weight: bold;
}

.report .entries-list {
  font-size: 0.75rem;
}

.report .sign-block {
  margin-top: 22px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.report .sign-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 26px;
}

.report .sign-item {
  display: flex;
  flex: 1 1 180px;
  align-items: flex-end;
  gap: 8px;
}

.report .sign-line {
  flex: 1 1 auto;
  min-width: 90px;
  height: 1.6em;
  border-bottom: 1px solid #000000;
}

.report .report-notes {
  margin-top: 20px;
  font-size: 0.85rem;
}

.report .report-foot {
  margin-top: 20px;
  padding-top: 8px;
  border-top: 1px solid #000000;
  font-size: 0.8rem;
}

.report .report-foot p {
  margin-bottom: 4px;
}

.report .page-break {
  break-before: page;
  page-break-before: always;
}

@page {
  margin: 18mm;
}

@page a4 {
  size: A4;
  margin: 18mm;
}

@page letter {
  size: letter;
  margin: 0.75in;
}

@media print {
  html {
    font-size: 11pt;
  }

  body {
    padding: 0;
    background: #ffffff;
  }

  .screen-only {
    display: none !important;
  }

  .report {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .report.paper-a4 {
    page: a4;
  }

  .report.paper-letter {
    page: letter;
  }

  .report tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .report thead {
    display: table-header-group;
  }

  .report thead th,
  .report tr.strong th,
  .report tr.strong td {
    background: #ffffff;
  }
}
