:root {
  --bg: #fbf8f1;          /* warm cream */
  --surface: #ffffff;
  --ink: #241c15;         /* espresso near-black */
  --muted: #6f6657;
  --line: #ece3d4;
  --honey: #e0a12b;       /* primary gold */
  --honey-deep: #a86f12;  /* readable gold for text/links */
  --honey-50: #fdf4e2;
  --espresso: #2a2018;
  --shadow-sm: 0 1px 2px rgba(42,32,24,.06);
  --shadow: 0 6px 24px -8px rgba(42,32,24,.18);
  --max: 800px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--honey-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }

/* Header */
header.site { position: sticky; top: 0; z-index: 20; background: #fff;
  border-bottom: 1px solid var(--line); padding: 10px 22px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
header.site .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
header.site .brand .mascot { width: 46px; height: 46px; display: block; }
header.site .brand .wm { display: flex; flex-direction: column; line-height: 1; }
header.site .brand .wm .l1 { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.015em; }
header.site .brand .wm .l1 .h { color: var(--honey-deep); }
header.site .brand .wm .l1 .d { color: var(--ink); }
header.site .brand .wm .l2 { font-family: var(--body); font-weight: 700; font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--honey-deep); margin-top: 3px; }
header.site nav { display: flex; gap: 17px; flex-wrap: wrap; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
header.site nav a:hover { color: var(--honey-deep); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 30px 22px 72px; }
h1 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 10px; }
h2 { font-size: 23px; margin: 38px 0 12px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 18px; max-width: 60ch; }
.sub strong { color: var(--ink); }

/* Trust row */
.trust { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 26px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink);
  background: var(--honey-50); border: 1px solid #f4e2bf; border-radius: 999px; padding: 5px 12px; }
.trust span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--honey); }

/* Calculator form + results */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 18px 0; box-shadow: var(--shadow-sm); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr 1fr; } }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .03em; }
input[type="number"] { width: 100%; padding: 11px 13px; font-size: 16px; font-family: var(--body); color: var(--ink);
  border: 1px solid #ddd2c0; border-radius: 9px; background: #fff; transition: border-color .15s, box-shadow .15s; }
input[type="number"]:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(224,161,43,.18); }

.result { position: relative; background: linear-gradient(180deg, var(--honey-50), #fff); border: 1px solid #f1ddb6;
  border-radius: 14px; padding: 26px 24px; margin: 18px 0; text-align: center; overflow: hidden; }
.result::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--honey); }
.result .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.result .big { font-family: var(--display); font-size: 44px; font-weight: 600; color: var(--ink); line-height: 1.05; margin-top: 4px; letter-spacing: -0.02em; }

.rows { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 17px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.rk { color: var(--muted); font-size: 14px; }
.rv { font-weight: 600; text-align: right; }
.rv .hint { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Hub cards */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
@media (max-width: 540px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.calc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #e7d3a8; }
.cc-name { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--ink); }
.cc-tag { color: var(--muted); font-size: 14px; margin-top: 5px; line-height: 1.45; }

/* JRIQ house ad */
.house-ad { display: flex; align-items: center; gap: 16px; margin: 26px 0; padding: 18px 20px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--honey); border-radius: 14px; color: var(--ink); box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
.house-ad:hover { box-shadow: var(--shadow); }
.house-ad .ha-icon { flex: none; width: 46px; height: 46px; border-radius: 11px; background: var(--espresso); display: flex; align-items: center; justify-content: center; }
.house-ad .ha-title { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); line-height: 1.25; }
.house-ad .ha-text { font-size: 13px; color: var(--muted); margin-top: 3px; }
.house-ad .ha-cta { flex: none; align-self: center; font-weight: 600; font-size: 14px; color: #fff; background: var(--espresso); padding: 10px 16px; border-radius: 9px; white-space: nowrap; }
@media (max-width: 540px) { .house-ad { flex-wrap: wrap; } .house-ad .ha-cta { width: 100%; text-align: center; } }

/* Live AdSense unit (only rendered when configured) */
.ad-live { margin: 24px 0; }

/* Related links */
.related { columns: 2; column-gap: 28px; font-size: 15px; }
@media (max-width: 540px) { .related { columns: 1; } }
.related a { display: block; margin: 5px 0; text-decoration: none; color: var(--honey-deep); }
.related a:hover { text-decoration: underline; }

/* Header cart link + badge */
header.site .cart-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--body); font-size: 14px; font-weight: 600;
  color: var(--ink); text-decoration: none; background: var(--honey-50); border: 1px solid #f0dcb4; padding: 6px 12px; border-radius: 999px; }
header.site .cart-link:hover { border-color: var(--honey); }
header.site .cart-badge { display: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--espresso);
  color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Add-to-list button */
.add-row { display: flex; align-items: center; gap: 14px; margin: 16px 0 4px; flex-wrap: wrap; }
.btn-add { font-family: var(--body); font-weight: 600; font-size: 15px; color: #fff; background: var(--espresso); border: 0;
  padding: 12px 20px; border-radius: 10px; cursor: pointer; transition: transform .12s, background .15s; }
.btn-add:hover { background: #1c150f; transform: translateY(-1px); }
.btn-add:active { transform: none; }
.add-note { font-size: 14px; font-weight: 600; color: var(--good); }

/* Project callout on home */
.project-callout { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between;
  background: var(--honey-50); border: 1px solid #f1ddb6; border-radius: 14px; padding: 18px 20px; margin: 22px 0; }
.project-callout .pc-text { font-size: 15px; color: var(--ink); }
.project-callout .pc-text strong { font-family: var(--display); font-weight: 600; }
.project-callout a { flex: none; font-weight: 600; font-size: 14px; color: #fff; background: var(--espresso); padding: 10px 16px; border-radius: 9px; text-decoration: none; }

/* Materials list page */
.list-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 22px; }
.btn-primary, .btn-secondary, .btn-link { font-family: var(--body); font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 9px; padding: 11px 18px; border: 1px solid transparent; }
.btn-primary { background: var(--honey); color: var(--espresso); }
.btn-primary:hover { background: #d0941f; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--honey); }
.btn-link { background: none; color: var(--muted); padding: 11px 8px; }
.btn-link:hover { color: var(--brand-700, #9a3412); color: var(--honey-deep); }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center; }
.li-group { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 14px 0; box-shadow: var(--shadow-sm); }
.li-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.li-title { font-family: var(--display); font-weight: 600; font-size: 17px; }
.li-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.li-rm { flex: none; background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 2px 0; }
.li-rm:hover { color: #b3261e; }
.li-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid #f4eee2; }
.li-row:last-of-type { border-bottom: 0; }
.li-name { color: var(--ink); }
.li-qty { color: var(--muted); font-size: 14px; white-space: nowrap; }
.li-cost { font-weight: 600; text-align: right; min-width: 64px; }
.li-subtotal { text-align: right; font-size: 14px; color: var(--muted); padding-top: 8px; }
.li-grand { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px;
  font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink); background: var(--honey-50);
  border: 1px solid #f1ddb6; border-radius: 12px; padding: 16px 18px; margin-top: 16px; }
.li-grand .li-disclaim { font-family: var(--body); font-size: 12px; font-weight: 400; color: var(--muted); }
.list-foot { font-size: 13px; color: var(--muted); margin-top: 24px; }

/* Long-form content pages (about / privacy / contact) */
.prose { max-width: 68ch; }
.prose h2 { font-size: 21px; margin: 30px 0 8px; }
.prose p { margin: 0 0 14px; color: #38302a; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; color: #38302a; }
.prose a { color: var(--honey-deep); }
.prose .legal-note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 24px; }

/* Footer meta links */
footer.site .fmeta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0 16px; }
footer.site .fmeta a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
footer.site .fmeta a:hover { color: var(--honey); }

/* Print: just the materials list */
@media print {
  header.site, footer.site, .list-actions, .list-foot, .house-ad, .ad-live, .sub { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .li-group, .li-grand { box-shadow: none; break-inside: avoid; }
  h1 { font-size: 24px; }
}

/* Footer */
footer.site { background: var(--espresso); color: #cdbfa9; margin-top: 40px; }
footer.site .fwrap { max-width: var(--max); margin: 0 auto; padding: 34px 22px; }
footer.site .fbrand { font-family: var(--display); font-weight: 600; font-size: 20px; color: #fff; }
footer.site .ftag { margin: 6px 0 18px; font-size: 14px; max-width: 52ch; }
footer.site .fcols { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 18px; }
footer.site .fcols a { color: #e3d6c0; text-decoration: none; font-size: 14px; }
footer.site .fcols a:hover { color: #fff; }
footer.site .fine { font-size: 12.5px; color: #9a8c77; border-top: 1px solid #3d3024; padding-top: 16px; line-height: 1.6; }
