/* 24ft-aluminum-winter-fishing-boat-bom.css */

/* ---- Page / Typography ---- */
:root {
  --page-max: 9.0in;   /* Letter landscape printable width: 11in - 2in margins = 9in */
  --text: #111;
  --muted: #555;
  --line: #d0d0d0;
  --shade: #f4f4f4;
  --shade2: #fafafa;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.35;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.5rem 0.75rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0.25rem 0 0.2rem;
}
h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
h3 {
  font-size: 1.05rem;
  margin: 1rem 0 0.5rem;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem 0.9rem;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.callouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
}
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: var(--shade2);
}
.callout h3 {
  margin-top: 0;
}
.callout p, .callout ul {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.callout ul {
  padding-left: 1.1rem;
}

/* ---- Table ---- */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

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

col.c-item { width: 25%; }
col.c-qty { width: 6%; }
col.c-unit { width: 7%; }
col.c-unitprice { width: 9%; }
col.c-ext { width: 9%; }
col.c-src { width: 22%; }
col.c-notes { width: 22%; }

thead th {
  background: var(--shade);
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.5rem;
  text-align: left;
  font-size: 0.92rem;
}

tbody td {
  border-top: 1px solid var(--line);
  padding: 0.4rem 0.5rem;
  vertical-align: top;
  font-size: 0.92rem;
}

td.qty, td.unit, td.price, td.ext {
  white-space: nowrap;
}

td.price, td.ext {
  text-align: right;
}

td.src a {
  word-break: break-word;
  overflow-wrap: anywhere;
  text-decoration: underline;
}

tr.section td {
  background: #e9e9e9;
  font-weight: 700;
  border-top: 2px solid #bdbdbd;
}

tr.subtotal td {
  background: var(--shade2);
  font-weight: 700;
}

tr.grandtotal td {
  background: #e2e2e2;
  font-weight: 800;
  border-top: 2px solid #9c9c9c;
}

.notes, .notescol {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.fineprint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* ---- Print ---- */
@page {
  size: Letter landscape;
  margin: 1in;
}

@media print {
  body {
    font-size: 10pt;
  }
  .page {
    max-width: 9in;
    padding: 0;
  }
  .table-wrap {
    overflow: visible;
    border: none;
  }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  a {
    color: inherit;
  }
  /* Keep section headers with the rows that follow where possible */
  tr.section { break-after: avoid; page-break-after: avoid; }
  tr.subtotal, tr.grandtotal { break-inside: avoid; page-break-inside: avoid; }
  .callouts { break-inside: avoid; page-break-inside: avoid; }
}
