/* FairBidGuide theme.
   The look comes from a contractor's estimate pad: carbon-blue ink, ledger rules,
   a yellow highlighter over the line worth a question, and red margin notes. */

:root {
  --paper: #fbfcfa;
  --sheet: #ffffff;
  --ink: #1b2a41;
  --ink-soft: #4a5a72;
  --ledger: #c9d8e6;
  --ledger-faint: #e8eff5;
  --highlighter: #ffe066;
  --fair: #1f7a4d;
  --padded: #b4372a;
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --row: 2.5rem; /* height of one ledger line */
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

.wrap { max-width: 68rem; margin-inline: auto; padding-inline: 1.25rem; }

a { color: var(--ink); text-decoration-color: var(--ledger); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); letter-spacing: -0.015em; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.measure { max-width: var(--measure); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; }
.skip:focus { left: 0; z-index: 10; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 2px solid var(--ink); background: var(--sheet); }
.masthead-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: .9rem; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.masthead nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.masthead nav a { text-decoration: none; padding-block: .25rem; border-bottom: 3px solid transparent; }
.masthead nav a:hover { border-bottom-color: var(--ledger); }
.masthead nav a[aria-current="page"] { border-bottom-color: var(--highlighter); }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--ledger); }
.hero-grid { display: grid; gap: 3rem; align-items: center; padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero-copy > * + * { margin-top: 1.25rem; }
@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  padding: .8rem 1.3rem;
  border-radius: 3px;
  text-decoration: none;
}
.button:hover { background: #0f1b2e; }
.button:focus-visible { outline-color: var(--padded); }

/* The sample bid: the one loud thing on the page. */
.bid {
  margin: 0;
  background: var(--sheet);
  border: 1px solid var(--ledger);
  border-top: 10px solid var(--ink);
  box-shadow: 6px 7px 0 var(--ledger-faint);
  padding: 1rem 1.25rem 1.25rem;
  transform: rotate(-.6deg);
}
.bid figcaption { font-size: .82rem; color: var(--ink-soft); margin-bottom: .5rem; }
.bid table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bid th, .bid td { text-align: left; vertical-align: top; padding: .6rem 0; border-bottom: 1px solid var(--ledger); }
.bid thead th { font-family: var(--serif); font-size: 1.05rem; border-bottom: 2px solid var(--ink); }
.bid .amount { text-align: right; white-space: nowrap; padding-left: 1rem; }
.bid tfoot th, .bid tfoot td { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 700; font-size: 1.1rem; }
.bid mark { background: var(--highlighter); color: inherit; padding: .1em .25em; margin-inline: -.25em; }
.bid .ask {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  color: var(--padded);
  margin-top: .15rem;
}
@media (prefers-reduced-motion: no-preference) {
  .bid mark { background: linear-gradient(var(--highlighter), var(--highlighter)) no-repeat 0 0 / 0 100%; animation: swipe .7s .5s ease-out forwards; }
  @keyframes swipe { to { background-size: 100% 100%; } }
}

/* ---------- content blocks ---------- */
.block { padding-block: clamp(2.25rem, 5vw, 3.5rem); border-bottom: 1px solid var(--ledger); }
.block:last-child { border-bottom: 0; }
.block > h2 + * { margin-top: 1rem; }
.block > * + ul, .block > * + ol, .block > ul + p { margin-top: 1.5rem; }

/* The sum: three parts that add up to a range. The plus and equals signs are the structure. */
.sum { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem 0; }
.sum li { position: relative; padding: 0 1.5rem 0 2.75rem; }
.sum li::before {
  content: "+";
  position: absolute; left: 0; top: -.35rem;
  font-family: var(--serif); font-size: 2rem; color: var(--ink-soft);
  width: 2rem; text-align: center;
}
.sum li:first-child::before { content: ""; }
.sum li.sum-result::before { content: "="; color: var(--ink); }
.sum li.sum-result h3 { display: inline; background: var(--highlighter); padding: .05em .3em; margin-left: -.3em; }
.sum p { margin-top: .4rem; color: var(--ink-soft); }
@media (min-width: 56rem) {
  .sum { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sum li:first-child { padding-left: 0; }
}

/* Lists of pages, set like line items: name on the left, status on the right. */
.lines { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: 52rem; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--ledger); }
.lines a { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.lines .status { color: var(--ink-soft); font-size: .9rem; align-self: center; white-space: nowrap; }
.lines p { grid-column: 1 / -1; color: var(--ink-soft); max-width: var(--measure); }

.empty { color: var(--ink-soft); border-left: 4px solid var(--ledger); padding-left: 1rem; max-width: var(--measure); }

/* ---------- long-form pages ---------- */
.prose { padding-block: clamp(2.25rem, 6vw, 4rem); }
.prose > * { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1rem; }
.prose h1 { max-width: 22ch; }
.prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .4rem; }
.prose .lines { padding-left: 0; max-width: 52rem; }
.prose .lines li + li { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--ledger); vertical-align: top; }
.prose thead th { border-bottom: 2px solid var(--ink); }
.updated { color: var(--ink-soft); font-size: .9rem; }
.notice { font-size: .92rem; color: var(--ink-soft); border-left: 4px solid var(--ledger); padding-left: 1rem; }
.pending { background: var(--sheet); border: 1px solid var(--ledger); border-left: 6px solid var(--highlighter); padding: 1rem 1.25rem; }

/* ---------- colophon ---------- */
.colophon { border-top: 2px solid var(--ink); background: var(--sheet); padding-block: 2rem 2.5rem; font-size: .92rem; }
.colophon-notice { max-width: var(--measure); color: var(--ink-soft); }
.colophon-links { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 1.25rem 0; padding: 0; }
.colophon-small { color: var(--ink-soft); }

@media (max-width: 30rem) {
  .bid { transform: none; padding-inline: 1rem; }
  .lines li { grid-template-columns: 1fr; }
}
@media print {
  .masthead nav, .colophon-links, .button { display: none; }
  .bid { transform: none; box-shadow: none; }
}
