/* RULE: --accent (#1f7a3a) is fill/rule/tick ink only. Green TEXT always uses
   --accent-ink (#17632e). Amber (--accent-2) never fills a button and is never
   text on cream — text uses --accent-2-ink. Keeps AA and keeps green=act /
   amber=insight semantics intact. */

/* RULE: one paper moment per page. Textured "document" surfaces (manila
   .insight wash, dashed .callout, double-rule .closing) are budgeted — do not
   add new ones without removing one. The document metaphor is a signature,
   not wallpaper. */

@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/bitter-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/bitter-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Bitter";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/bitter-latin-600italic.woff2") format("woff2");
}

:root {
   --bg: #f5f1e8;
   --card: #fdfbf5;
   --text: #26231c;
   --muted: #6b6455;
   --accent: #1f7a3a;
   --accent-soft: rgba(31, 122, 58, 0.12);
   --accent-2: #b3791f;
   --accent-2-soft: #f7efdd;
   --accent-ink: #17632e;
   --accent-2-ink: #8a5d13;
   --line: #cbc2ae;
   --line-strong: #3a352a;
   --dash: #b7ab8e;
   --footer-muted: #857b68;
      }

        * {
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
            margin: 0;
            background: var(--bg);
            color: var(--text);
        }

p {
    font-size: 17px;
    line-height: 1.7;
    max-width: 700px;
    margin-bottom: 18px;
}

/* Mono money — dollar figures and percentages sitewide, set in the
   greenbar sheet's own face. */
.num {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95em;
    font-variant-numeric: tabular-nums;
}

        .container {
            max-width: 1080px;
            margin: 0 auto;
            padding: 28px 20px 60px;
        }

        .topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            border-bottom: 3px double var(--line-strong);
            padding-bottom: 14px;
            margin-bottom: 26px;
            color: var(--muted);
        }

        .brand {
            display: inline-block;
            font-family: "Bitter", Georgia, "Iowan Old Style", "Times New Roman", serif;
            font-weight: 700;
            font-size: 17px;
            color: var(--text);
            text-decoration: none;
        }

        .brand:hover {
            color: var(--accent-ink);
        }

        .topbar-note {
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--footer-muted);
            margin-top: 4px;
        }

        .topbar-nav {
            display: flex;
            align-items: center;
            gap: 18px;
            flex-shrink: 0;
        }

        .topbar-nav a {
            color: var(--text);
            text-decoration: none;
            font-size: 14px;
        }

        .topbar-nav a:hover {
            color: var(--text);
            text-decoration: underline;
            text-decoration-thickness: 2px;
            text-decoration-color: var(--accent);
            text-underline-offset: 4px;
        }

        .hero {
            background: none;
            border: none;
            border-radius: 0;
            padding: 40px 0 8px;
            margin-bottom: 56px;
        }

        .eyebrow,
        .section-kicker {
            display: block;
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
            font-size: 12px;
            font-weight: 400;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--muted);
            margin-bottom: 14px;
        }

        /* The green tick — a drawn check-off mark, not a pill badge. */
        .eyebrow::before,
        .section-kicker::before {
            content: '';
            display: inline-block;
            width: 22px;
            height: 2px;
            background: var(--accent);
            margin-right: 10px;
            vertical-align: middle;
        }

        h1 {
            font-family: "Bitter", Georgia, "Iowan Old Style", "Times New Roman", serif;
            font-weight: 700;
            font-size: clamp(32px, 5vw, 48px);
            line-height: 1.15;
            margin: 0 0 18px;
            max-width: 900px;
        }

        .hero-copy {
            font-size: clamp(17px, 2.3vw, 21px);
            line-height: 1.65;
            color: var(--muted);
            max-width: 700px;
            margin-bottom: 26px;
        }

        .hero-copy strong {
            color: var(--text);
            font-weight: 600;
        }

        .cta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 16px;
        }

        /* The button press — the one piece of motion on the site. Things
           press; nothing floats, glows, or lifts. */
        .button {
            display: inline-block;
            padding: 13px 20px;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 600;
            transition: background-color 0.15s ease, border-color 0.15s ease;
        }

        .button.primary {
            background: var(--accent);
            color: #fff;
            border: 1px solid var(--accent-ink);
            box-shadow: 0 2px 0 var(--accent-ink);
        }

        .button.primary:hover {
            background: var(--accent-ink);
        }

        .button.primary:active {
            transform: translateY(2px);
            box-shadow: 0 0 0 var(--accent-ink);
        }

        .button.secondary {
            background: var(--card);
            color: var(--text);
            border: 1px solid var(--line-strong);
            box-shadow: 0 2px 0 rgba(38, 35, 28, 0.18);
        }

        .button.secondary:hover {
            background: #efe9dc;
            border-color: var(--line-strong);
        }

        .button.secondary:active {
            transform: translateY(2px);
            box-shadow: 0 0 0 rgba(38, 35, 28, 0.18);
        }

        .hero-note {
            font-size: 14px;
            color: var(--muted);
            max-width: 700px;
        }

        .hero-note a,
        .callout a,
        .note a {
            color: var(--accent-ink);
            font-weight: 600;
            text-decoration: underline;
            text-decoration-thickness: 1px;
            text-decoration-color: var(--line);
            text-underline-offset: 3px;
        }

        .hero-note a:hover,
        .callout a:hover,
        .note a:hover {
            text-decoration-color: var(--accent-ink);
        }

        .hero-note + .hero-note {
            margin-top: 10px;
        }

        .section {
            margin-top: 54px;
        }

        .section-header {
            margin-bottom: 18px;
        }

        h2 {
            font-family: "Bitter", Georgia, "Iowan Old Style", "Times New Roman", serif;
            font-weight: 600;
            font-size: 26px;
            margin: 0 0 10px;
        }

        .section-copy {
            color: var(--muted);
            font-size: 17px;
            line-height: 1.65;
            max-width: 700px;
            margin: 0;
        }

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

        .card-link {
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .card {
            background: var(--card);
            border: 1px solid var(--line);
            border-radius: 3px;
            padding: 22px;
            height: 100%;
            transition: border-color 0.15s ease;
        }

        .card-link:hover .card {
            border-color: var(--line-strong);
        }

        .card-link:hover .card h3,
        .card-link:hover .method-card h3 {
            text-decoration: underline;
            text-decoration-thickness: 1.5px;
            text-decoration-color: var(--accent);
            text-underline-offset: 3px;
        }

        .card h3 {
            font-family: "Bitter", Georgia, "Iowan Old Style", "Times New Roman", serif;
            font-weight: 600;
            margin: 0 0 10px;
            font-size: 18px;
        }

        .card p {
            margin: 0;
            color: var(--muted);
            font-size: 15px;
            line-height: 1.6;
        }

        .card-meta {
            display: inline-block;
            margin-top: 14px;
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--accent-ink);
        }

        .method-card {
            background: var(--card);
            border: 1px solid var(--line);
            border-top: 3px solid var(--accent);
            border-radius: 3px;
            padding: 22px;
        }

        .method-number {
            display: inline-block;
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
            font-size: 12px;
            font-weight: 400;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--accent-ink);
            margin-bottom: 8px;
        }

        .method-card h3 {
            font-family: "Bitter", Georgia, "Iowan Old Style", "Times New Roman", serif;
            font-weight: 600;
            margin: 0 0 10px;
            font-size: 18px;
        }

        .method-card p {
            margin: 0;
            color: var(--muted);
            font-size: 15px;
            line-height: 1.6;
        }

        /* The totals row — the thesis sits between double rules, the
           bookkeeper's mark for "totaled and verified". */
        .closing {
            margin-top: 56px;
            padding: 28px 4px;
            background: none;
            border: none;
            border-radius: 0;
            border-top: 3px double var(--line-strong);
            border-bottom: 3px double var(--line-strong);
        }

        .closing p {
            margin: 0;
            max-width: 700px;
            color: var(--muted);
            font-size: 17px;
            line-height: 1.7;
        }

        .closing strong {
            color: var(--text);
            font-weight: 600;
        }

        .divider {
            height: 0;
            background: none;
            border-top: 3px double var(--line-strong);
            margin: 52px 0 24px;
        }

        footer {
            color: var(--footer-muted);
            font-size: 13px;
            text-align: center;
        }

        footer a {
            color: var(--footer-muted);
            text-decoration: underline;
            text-decoration-thickness: 1px;
            text-underline-offset: 3px;
        }

        footer a:hover {
            color: var(--text);
        }

        @media (max-width: 700px) {
            .container {
                padding: 22px 16px 42px;
            }

            .topbar {
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
                margin-bottom: 20px;
            }

            .cta {
                flex-direction: column;
                align-items: stretch;
            }

            .button {
                text-align: center;
            }

            h2 {
                font-size: 24px;
            }

            .closing {
                padding: 22px 4px;
            }
        }

.pagination {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 70px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.pagination > div:last-child {
    text-align: right;
}

.nav-block {
    max-width: none;
}

.nav-block a + a {
    margin-left: 12px;
}

.nav-cta .nav-label {
    text-align: right;
}

.nav-label {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 6px;
}

.nav-block a {
    display: inline-block;
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--text);
    text-decoration: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 3px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.nav-block a:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: #f1ecdf;
}

/* Article subheads — the 22px section titles inside the method/problem pages. */
.subhead {
    font-family: "Bitter", Georgia, "Iowan Old Style", "Times New Roman", serif;
    font-weight: 600;
    font-size: 21px;
    margin: 32px 0 16px;
    color: var(--text);
}

/* Reusable bordered note box — dashed tear-line, rhyming with the greenbar
   sheet's dashed rules: dashed = supporting detail. */
.callout {
    margin-top: 40px;
    padding: 22px;
    background: #faf7ef;
    border: 1px dashed var(--dash);
    border-radius: 3px;
}

.callout p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.callout p + p {
    margin-top: 10px;
}

.callout strong {
    color: var(--text);
}

/* Small muted annotation line (e.g. "Typical pattern: …"). */
.note {
    margin-top: 30px;
    font-size: 15px;
    color: var(--muted);
}

/* Insight callouts — the site's "aha" moments. A manila folder pulled from
   the file: flat amber wash, printed, doesn't flinch on hover. */
.insight {
  position: relative;
  margin: 48px 0;
  padding: 28px 30px;
  background: var(--accent-2-soft);
  border: 1px solid #e3d5b3;
  border-left: 4px solid var(--accent-2);
  border-radius: 3px;
}

.insight-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2-ink);
  margin-bottom: 14px;
}

.insight-label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.insight h3 {
  font-family: "Bitter", Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 600;
  font-style: italic;
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.35;
  color: var(--text);
}

.insight p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: none;
}

.insight p:last-of-type {
  margin-bottom: 0;
}

.insight-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-2-ink);
  text-decoration: none;
  transition: gap 0.15s ease, opacity 0.15s ease;
}

.insight-link:hover {
  gap: 10px;
  opacity: 0.85;
}

/* Dual-CTA variant, used where an insight ends in a choice (e.g. Aggregate) */
.insight-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.insight-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.insight-actions a.primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent-ink);
  box-shadow: 0 2px 0 var(--accent-ink);
}

.insight-actions a.primary:hover {
  background: var(--accent-ink);
}

.insight-actions a.primary:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--accent-ink);
}

.insight-actions a.secondary {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: 0 2px 0 rgba(38, 35, 28, 0.18);
}

.insight-actions a.secondary:hover {
  background: #efe9dc;
}

.insight-actions a.secondary:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 rgba(38, 35, 28, 0.18);
}

@media (max-width: 700px) {
  .insight {
    padding: 22px 20px;
  }

  .insight-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .insight-actions a {
    justify-content: center;
  }
}

/* ---------------------------------------------------------------------
   Invoice Leakage Checker — upload form
   ------------------------------------------------------------------- */

.upload-form {
    margin-top: 24px;
    max-width: 640px;
}

.form-row {
    margin-bottom: 22px;
}

.form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row input[type="file"],
.form-row select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--dash);
    border-radius: 3px;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 15px;
    color: var(--muted);
    cursor: pointer;
}

.contract-prices {
    background: #faf7ef;
    border: 1px dashed var(--dash);
    border-radius: 3px;
    padding: 18px;
}

.price-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.price-row:first-of-type {
    margin-top: 14px;
}

.form-error {
    margin-top: 6px;
    font-size: 13px;
    color: #a02c2c;
}

button.button.primary {
    border: none;
    cursor: pointer;
    font-size: 15px;
}

/* ---------------------------------------------------------------------
   Invoice Leakage Checker — green-bar report
   ------------------------------------------------------------------- */

.greenbar {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 32px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #cbc2ae;
    box-shadow: 0 10px 24px rgba(60, 50, 30, 0.15);
}

.greenbar-rail {
    flex: 0 0 22px;
    background-color: #0c1320;
    background-image: radial-gradient(circle, #2c3a52 2px, transparent 2.5px);
    background-size: 22px 22px;
    background-position: center;
}

.greenbar-sheet {
    flex: 1;
    min-width: 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #1c2b18;
    padding: 24px;
    background-color: #eef5e6;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(34, 94, 49, 0.05) 0px,
        rgba(34, 94, 49, 0.05) 28px,
        transparent 28px,
        transparent 56px
    );
}

.greenbar-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5d44;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #b9c9ad;
}

.greenbar-verdict {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-left: 4px solid #4b5d44;
    background: rgba(255,255,255,0.4);
    border-radius: 4px;
}

.greenbar-verdict-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4b5d44;
}

.greenbar-verdict-value {
    font-size: 22px;
    font-weight: 700;
    margin: 2px 0 10px;
}

.greenbar-verdict.verdict-yes { border-left-color: #1f7a3a; }
.greenbar-verdict.verdict-yes .greenbar-verdict-value { color: #1f7a3a; }

.greenbar-verdict.verdict-maybe { border-left-color: #b3791f; }
.greenbar-verdict.verdict-maybe .greenbar-verdict-value { color: #b3791f; }

.greenbar-verdict.verdict-low { border-left-color: #6b7280; }
.greenbar-verdict.verdict-low .greenbar-verdict-value { color: #4b5563; }

.greenbar-verdict.verdict-no { border-left-color: #6b7280; }
.greenbar-verdict.verdict-no .greenbar-verdict-value { color: #4b5563; }

.greenbar-bluf {
    margin: 0 0 6px;
    font-size: 14px;
    max-width: none;
    color: #1c2b18;
}

.greenbar-meaning {
    margin: 0;
    font-size: 13px;
    font-style: italic;
    color: #4b5d44;
    max-width: none;
}

.greenbar-dollars {
    display: flex;
    gap: 28px;
    margin-top: 14px;
}

.greenbar-dollar-amount {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.greenbar-dollar-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5d44;
}

.greenbar-flags {
    margin-bottom: 18px;
}

.greenbar-flag {
    padding: 12px 0;
    border-bottom: 1px dashed #b9c9ad;
}

.greenbar-flag:first-child {
    border-top: 1px dashed #b9c9ad;
}

.greenbar-flag-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    font-weight: 700;
}

.greenbar-flag-conf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
}

.greenbar-flag-conf.conf-h { background: #1f7a3a; }
.greenbar-flag-conf.conf-m { background: #b3791f; }
.greenbar-flag-conf.conf-l { background: #6b7280; }

.greenbar-flag-lever {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5d44;
}

.greenbar-flag-evidence {
    font-size: 13px;
    color: #4b5d44;
    margin-bottom: 4px;
}

.greenbar-flag-numbers {
    font-size: 13px;
    margin-bottom: 4px;
}

.greenbar-flag-caveat {
    font-size: 12px;
    font-style: italic;
    color: #a15c00;
    margin-bottom: 4px;
}

.greenbar-flag-ask {
    font-size: 13px;
}

.greenbar-locked {
    margin-top: 14px;
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: #4b5d44;
    border: 1px dashed #b9c9ad;
    border-radius: 6px;
    background: rgba(255,255,255,0.35);
}

.greenbar-section {
    margin-bottom: 18px;
    font-size: 13px;
}

.greenbar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5d44;
    margin-bottom: 6px;
}

.greenbar-section ul {
    margin: 0;
    padding-left: 20px;
}

.greenbar-footer {
    font-size: 12px;
    color: #4b5d44;
    padding-top: 14px;
    border-top: 1px dashed #b9c9ad;
}

@media (max-width: 700px) {
    .greenbar-rail {
        flex: 0 0 10px;
        background-size: 10px 16px;
    }

    .greenbar-sheet {
        padding: 16px;
        font-size: 13px;
    }

    .greenbar-dollars {
        flex-direction: column;
        gap: 10px;
    }

    .price-row {
        grid-template-columns: 1fr;
    }
}
