/* ============================================================================
   BioDwell sample-report pages — shared "forest + paper luxe" styling.
   Every concept renders the SAME five pages from pages.js; each page is a
   FIXED-SIZE 460 x 600 card so it looks pixel-identical across concepts.
   Concepts scale the whole page with transform: scale() to fit their layout.
   All selectors are scoped under .bdr so they never leak into a host page.
   ============================================================================ */

.bdr {
  --green: #33CC66;
  --green-bright: #3ED878;
  --forest: #0F2E1B;
  --forest-2: #143A24;
  --forest-3: #0B2415;
  --paper: #FBFAF5;
  --paper-2: #F6F4EC;
  --white: #FFFFFF;
  --ink: #16221B;
  --ink-soft: #33403A;
  --muted: #5C6B62;
  --muted-2: #7C8A80;
  --hair: #E5E8E2;
  --hair-soft: #EDEFE9;
  --sage-1: #E8F6ED;
  --sage-2: #D7EFDF;
  --sage-3: #C4E7CF;
  --good-deep: #1F7E45;
  --amber-deep: #9A6A14;
  --amber-bg: #FBF2DE;
  --amber-line: #EAD3A0;
  --alert: #BB3B2C;
  --alert-bg: #FBEAE6;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

.bdr, .bdr * { box-sizing: border-box; }

/* ---- the page card (fixed intrinsic size) ---- */
.bdr-page {
  position: relative;
  width: 460px;
  height: 600px;
  flex: 0 0 auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bdr-page__pad { padding: 34px 36px; flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* shared type helpers */
.bdr .eyebrow {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 0;
}
.bdr .serif { font-family: var(--serif); font-weight: 400; }
.bdr .num-tab { font-variant-numeric: tabular-nums; }

.bdr-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.bdr-sec-head h2 {
  font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.05;
  letter-spacing: -.012em; margin: 0; color: var(--forest);
}
.bdr-sec-head .ix {
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.bdr-sec-head .ix b { color: var(--forest); font-weight: 600; }
.bdr-rule { height: 1px; background: var(--hair); border: 0; margin: 16px 0; }

/* ======================= COVER ======================= */
.bdr-page--cover {
  background:
    radial-gradient(680px 400px at 88% -60px, rgba(62,216,120,.20) 0%, transparent 62%),
    linear-gradient(158deg, var(--forest-2) 0%, var(--forest) 54%, var(--forest-3) 100%);
  color: #EAF4EC;
}
.bdr-page--cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(118deg, rgba(255,255,255,.022) 0 1px, transparent 1px 46px);
  pointer-events: none;
}
.bdr-cover-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }
.bdr-cover-top .logo { width: 132px; color: #fff; }
.bdr-cover-top .logo svg { width: 100%; height: auto; display: block; }
.bdr-sample-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 8px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: #C5EBD1; border: 1px solid rgba(197,235,209,.34); border-radius: 999px; padding: 5px 11px; white-space: nowrap;
}
.bdr-sample-tag .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 0 3px rgba(62,216,120,.2); }
.bdr-cover-eyebrow { margin-top: 40px; color: #9AD0AB; letter-spacing: .26em; position: relative; z-index: 1; }
.bdr-cover-title {
  font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.04; letter-spacing: -.018em;
  margin: 14px 0 0; color: #fff; position: relative; z-index: 1; max-width: 15ch;
}
.bdr-cover-title em { font-style: italic; color: var(--green-bright); }
.bdr-cover-sub { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: #CBE4D2; max-width: 40ch; position: relative; z-index: 1; }
.bdr-cover-client { margin-top: auto; padding-top: 26px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; }
.bdr-cover-client .label { font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: #83BC95; margin-bottom: 5px; }
.bdr-cover-client .value { font-size: 16px; color: #fff; font-weight: 500; }
.bdr-cover-client .value.addr { font-weight: 400; color: #DBEDE0; font-size: 13.5px; }
.bdr-meta { margin-top: 20px; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.16); }
.bdr-meta .cell { padding: 12px 12px 10px 0; border-right: 1px solid rgba(255,255,255,.09); }
.bdr-meta .cell:nth-child(3n) { border-right: 0; }
.bdr-meta .k { font-family: var(--mono); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: #7CB48E; }
.bdr-meta .v { font-family: var(--mono); font-size: 11px; color: #EAF4EC; margin-top: 5px; font-weight: 500; }

/* ======================= AT A GLANCE ======================= */
.bdr-glance-lede {
  font-size: 16px; line-height: 1.45; color: var(--ink); margin: 18px 0 0; letter-spacing: -.005em;
}
.bdr-glance-lede .erminum { font-family: var(--serif); font-style: normal; }
.bdr-glance-lede .hi-high { color: var(--amber-deep); font-weight: 600; }
.bdr-byline { margin-top: 12px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .03em; color: var(--muted); }
.bdr-byline b { color: var(--forest); font-weight: 600; }

.bdr-gauge-card {
  margin-top: 16px; border: 1px solid var(--hair); border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, var(--paper-2) 100%); padding: 14px 16px 12px;
}
.bdr-gauge-card .cap {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 2px;
}
.bdr-gauge-svg { width: 262px; max-width: 100%; height: auto; display: block; margin: 2px auto 0; }
.bdr-gauge-readout { text-align: center; margin-top: -2px; }
.bdr-gauge-num { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--forest); }
.bdr-gauge-band {
  display: inline-block; margin-top: 6px; font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--amber-deep);
  background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 999px; padding: 4px 12px;
}
.bdr-hertsmi-inline {
  margin-top: 14px; display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--sage-3); border-radius: 12px; background: linear-gradient(180deg, var(--sage-1), #fff); padding: 12px 15px;
}
.bdr-hertsmi-inline .badge { font-family: var(--serif); font-size: 28px; color: var(--good-deep); line-height: 1; min-width: 34px; text-align: center; }
.bdr-hertsmi-inline .l { font-family: var(--mono); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bdr-hertsmi-inline .d { font-size: 12px; color: var(--ink-soft); margin-top: 3px; line-height: 1.35; }
.bdr-hertsmi-inline .d b { color: var(--good-deep); font-weight: 600; }
.bdr-hertsmi-chip {
  margin-left: auto; font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--good-deep); background: #fff; border: 1px solid var(--sage-3); border-radius: 999px; padding: 5px 11px; white-space: nowrap;
}

/* ======================= RESULTS ======================= */
.bdr-results-intro { color: var(--muted); font-size: 11.5px; line-height: 1.55; margin: 12px 0 0; }
.bdr-grp-label { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--forest); display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.bdr-grp-label .gix { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px; background: var(--forest); color: #fff; font-size: 10px; font-weight: 600; }
.bdr-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.bdr-table thead th {
  font-family: var(--mono); font-size: 8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 0 8px 6px; border-bottom: 1.5px solid var(--forest); white-space: nowrap;
}
.bdr-table thead th.num, .bdr-table thead th.q { text-align: right; }
.bdr-table thead th.bar { width: 30%; }
.bdr-table tbody td { padding: 5px 8px; border-bottom: 1px solid var(--hair-soft); vertical-align: middle; }
.bdr-table tbody tr:nth-child(even) { background: rgba(232,246,237,.4); }
.bdr-table td.sp { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--ink); line-height: 1.15; }
.bdr-table td.val { font-family: var(--mono); font-size: 11px; text-align: right; white-space: nowrap; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.bdr-table td.val.nd { color: var(--muted-2); font-weight: 400; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.bdr-ubar { position: relative; height: 5px; border-radius: 3px; background: var(--hair-soft); overflow: hidden; }
.bdr-ubar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; display: block; }
.bdr-ubar.nd { background: repeating-linear-gradient(90deg, var(--hair-soft) 0 4px, transparent 4px 8px); }
.bdr-b1 { background: #A9BCB0; } .bdr-b2 { background: #79AAB7; } .bdr-b3 { background: #D49A33; } .bdr-b4 { background: #2E9E5B; }
.bdr-q { display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; font-weight: 600; width: 26px; height: 18px; border-radius: 4px; border: 1px solid transparent; }
.bdr-table td.qcell { text-align: right; }
.bdr-q.q1 { color: #52685B; background: #EEF1EC; border-color: #E0E5DD; }
.bdr-q.q2 { color: #4E8A98; background: #E8F1F3; border-color: #D4E5E8; }
.bdr-q.q3 { color: var(--amber-deep); background: var(--amber-bg); border-color: var(--amber-line); }
.bdr-q.q4 { color: #0F2E1B; background: var(--sage-2); border-color: var(--sage-3); font-weight: 700; }
.bdr-hertsmi-strip {
  margin-top: 16px; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--hair); border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, var(--sage-1), #fff); padding: 12px 16px;
}
.bdr-hertsmi-strip .e { font-family: var(--mono); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--good-deep); font-weight: 600; }
.bdr-hertsmi-strip .t { font-family: var(--serif); font-size: 17px; color: var(--forest); margin-top: 2px; }
.bdr-hertsmi-strip .score { margin-left: auto; text-align: right; }
.bdr-hertsmi-strip .score .n { font-family: var(--serif); font-size: 34px; color: var(--good-deep); line-height: .9; }
.bdr-hertsmi-strip .score .b { font-family: var(--mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: var(--good-deep); }

/* ======================= RECOMMENDED NEXT STEPS (highlight) ======================= */
.bdr-page--recs { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.bdr-recs-lede { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin: 16px 0 0; }
.bdr-recs-lede .species { font-family: var(--serif); font-style: italic; }
.bdr-recs-lede .hi { font-weight: 600; color: var(--forest); }
.bdr-recs { margin-top: 8px; }
.bdr-rec { display: flex; gap: 16px; padding: 15px 0; border-top: 1px solid var(--hair); }
.bdr-rec:last-child { border-bottom: 1px solid var(--hair); }
.bdr-rec .n { flex: 0 0 auto; font-family: var(--serif); font-size: 22px; color: var(--green); line-height: 1; width: 30px; letter-spacing: -.02em; }
.bdr-rec .body h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.bdr-rec .body p { margin: 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.5; }
.bdr-rec .body p .species { font-family: var(--serif); font-style: italic; }

/* ======================= SIGN-OFF ======================= */
.bdr-signoff-lede { font-family: var(--serif); font-size: 22px; line-height: 1.2; color: var(--forest); letter-spacing: -.01em; margin: 18px 0 0; }
.bdr-signoff-lede em { font-style: italic; color: var(--good-deep); }
.bdr-callout {
  margin-top: 18px; display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper-2); border: 1px solid var(--hair); border-left: 3px solid var(--green);
  border-radius: 0 10px 10px 0; padding: 13px 16px;
}
.bdr-callout .ic { flex: 0 0 auto; font-family: var(--mono); font-size: 7.5px; letter-spacing: .12em; color: var(--forest); background: var(--sage-2); border-radius: 6px; padding: 6px 8px; text-transform: uppercase; font-weight: 600; }
.bdr-callout p { margin: 0; font-size: 11.5px; color: var(--ink-soft); line-height: 1.55; }
.bdr-callout p b { color: var(--forest); font-weight: 600; }
.bdr-accred-row { margin-top: 18px; display: flex; gap: 7px; flex-wrap: wrap; }
.bdr-accred { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--hair); border-radius: 999px; padding: 6px 11px; background: var(--paper-2); }
.bdr-accred b { color: var(--forest); font-weight: 600; }
.bdr-sig { margin-top: auto; padding-top: 22px; }
.bdr-sig .line { height: 1.5px; background: var(--forest); margin-bottom: 9px; max-width: 220px; }
.bdr-sig .name { font-family: var(--serif); font-size: 18px; color: var(--forest); }
.bdr-sig .role { font-size: 11px; color: var(--muted); margin-top: 3px; }
.bdr-sig .role b { color: var(--ink-soft); font-weight: 600; }

/* footer band shared by sign-off */
.bdr-foot {
  background: var(--forest); color: #CBE4D2; padding: 14px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 8.5px; line-height: 1.7; letter-spacing: .02em;
}
.bdr-foot .logo { width: 92px; color: #fff; }
.bdr-foot .logo svg { width: 100%; height: auto; display: block; }
.bdr-foot .ident { text-align: right; }
.bdr-foot .ident b { color: #fff; font-weight: 600; }
