:root {
  --ink: #1c2730;
  --ink-soft: #4a5862;
  --paper: #f6f4ef;
  --card: #ffffff;
  --line: #dcd8cf;
  --hivis: #f2b705;
  --hivis-dark: #c99600;
  --ok: #1f7a4d;
  --warn: #9a3412;
  --radius: 10px;
  --max: 1080px;
  font-size: 17px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--ink); text-decoration-color: var(--hivis-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: #e9eef1; text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--hivis); }

/* Hazard stripe */
.stripe { height: 6px; background: repeating-linear-gradient(-45deg, var(--hivis) 0 14px, var(--ink) 14px 28px); }

/* Hero */
.hero { padding-top: 56px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.02em; max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; margin: 0 0 24px; }

.btn { display: inline-block; background: var(--hivis); color: var(--ink); font-weight: 700; padding: 13px 22px; border-radius: 8px; text-decoration: none; border: 2px solid var(--hivis); cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn:hover { background: var(--hivis-dark); border-color: var(--hivis-dark); }
.btn.secondary { background: transparent; border-color: var(--ink); }
.btn.secondary:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
section { padding: 36px 0; }
section h2 { font-size: 1.6rem; margin: 0 0 12px; letter-spacing: -0.01em; }
.muted { color: var(--ink-soft); }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--ink-soft); }

.band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px; }
.band h2 { color: #fff; }
.band p { color: #d5dde2; max-width: 62ch; }
.band .btn.secondary { border-color: #fff; color: #fff; }
.band .btn.secondary:hover { background: #fff; color: var(--ink); }

/* Prose pages */
.prose { max-width: 760px; padding-top: 40px; padding-bottom: 40px; }
.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: 760px; }
.prose h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.15; margin: 0 0 12px; }
.prose h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.prose h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.95rem; background: var(--card); }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: #efece4; }
.prose td.num, .prose th.num { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.meta { color: var(--ink-soft); font-size: 0.95rem; }
.note { background: #fff8db; border-left: 4px solid var(--hivis); padding: 12px 14px; border-radius: 6px; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0 16px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--hivis-dark); font-weight: 800; }
details[open] summary::before { content: "\2212"; }
details > div { padding-bottom: 14px; }

/* Forms (invoice maker) */
.maker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 0 48px; }
@media (min-width: 980px) { .maker { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; } .summary-col { position: sticky; top: 16px; } }
fieldset { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 16px 18px 18px; margin: 0 0 16px; min-width: 0; }
legend { font-weight: 800; padding: 0 6px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin: 10px 0 4px; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
input[type=text], input[type=email], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 10px 11px; border: 1px solid #bfbab0; border-radius: 7px; font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(242, 183, 5, 0.45); border-color: var(--hivis-dark); }
.radio-group label, .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 8px 0; }
.radio-group input, .check input { margin-top: 4px; }

.lines { width: 100%; border-collapse: collapse; }
.line-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: #fbfaf7; }
.line-item .row { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 560px) { .line-item .row { grid-template-columns: 1fr; } }
.line-actions { text-align: right; }
.link-btn { background: none; border: none; color: var(--warn); cursor: pointer; font: inherit; font-size: 0.9rem; text-decoration: underline; padding: 4px 0; }

.totals { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.totals td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.totals td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.totals tr.grand td { font-weight: 800; font-size: 1.1rem; border-bottom: none; padding-top: 10px; }
.flag { font-size: 0.9rem; padding: 10px 12px; border-radius: 6px; margin: 10px 0 0; }
.flag.info { background: #eef4f8; }
.flag.alert { background: #fdecea; color: #7a1d12; }

/* Footer */
.site-footer { background: var(--ink); color: #c8d1d7; font-size: 0.9rem; margin-top: 40px; }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: grid; gap: 14px; }
.site-footer a { color: #fff; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 24px; }
.footer-cols h4 { color: #fff; margin: 0 0 8px; font-size: 0.95rem; }
.footer-cols a { display: block; margin: 5px 0; }
.legal-line { color: #9fadb6; font-size: 0.85rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media print { .site-header, .site-footer, .stripe { display: none; } }

/* Forms */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.file-btn { cursor: pointer; display: inline-block; margin-top: 4px; }
.file-list { list-style: none; padding: 0; margin: 8px 0 0; }
.file-list li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.robot-check { margin: 4px 0 12px; min-height: 65px; }
#check-form fieldset, #contact-form fieldset { max-width: 760px; }

/* Statement chaser */
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 14px; margin-top: 6px; }
.check.month { margin: 4px 0; font-size: 0.92rem; }
.request { margin: 14px 0; }
.request-text { white-space: pre-wrap; font-family: inherit; font-size: 0.93rem; background: #fbfaf7; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0 12px; overflow-wrap: anywhere; }
#chaser-form fieldset { max-width: 760px; }
.months[hidden] { display: none; }
.line-item.contractor .row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Prices */
.card .price, .price { font-size: 1.8rem; font-weight: 800; color: var(--ink); margin: 6px 0 8px; }
.price span { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
ul.plain { padding-left: 18px; margin: 10px 0 0; color: var(--ink-soft); }
ul.plain li { margin: 4px 0; }

/* Certification badge */
.badge-row { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
.badge-row img { width: 96px; height: 96px; flex: none; display: block; }
.badge-row p { margin: 0; }

/* Anything marked hidden stays hidden, whatever its layout style */
[hidden] { display: none !important; }

/* Numbered steps */
ol.steps { padding-left: 22px; margin: 6px 0 8px; }
ol.steps li { margin: 4px 0; }

/* Home: two doors */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.door { display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; color: var(--ink); }
.door:hover { border-color: var(--hivis); }
.door h2 { margin: 6px 0 10px; font-size: 1.6rem; }
.door p { color: var(--ink-soft); margin: 0 0 18px; flex: 1; }
.door h2 a { color: inherit; text-decoration: none; }
.door h2 a:hover { text-decoration: underline; }
.door-tag { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hivis-dark); }

/* Tool cards */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card.tool { display: flex; flex-direction: column; }
.card.tool > p:not(.tool-link) { flex: 1; }
.card .tool-link { margin-top: 14px; }

/* Sections already add their own spacing */
section > .wrap.prose { padding-bottom: 0; }
section > .wrap.prose > h2:first-child { margin-top: 0; }

/* Menu button for the paid service */
.nav { align-items: center; }
.nav a.nav-cta { background: var(--hivis); color: var(--ink); font-weight: 700; padding: 7px 12px; border-radius: 7px; }
.nav a.nav-cta:hover, .nav a.nav-cta[aria-current="page"] { background: var(--hivis-dark); color: var(--ink); }

/* BuddhaBooks link next to the CIS Ready name */
.brand-wrap { display: flex; align-items: center; gap: 14px; }
.by { display: inline-flex; align-items: center; gap: 6px; color: #c8d1d7; font-size: .8rem; text-decoration: none; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); }
.by img { height: 22px; width: auto; display: block; opacity: .85; }
.by:hover img { opacity: 1; }
.by-home { color: #e9eef1; text-decoration: none; font-size: .95rem; }
.by-home:hover { color: var(--hivis); }

/* You are here trail */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 18px; font-size: .9rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink); font-weight: 600; }
.crumbs .sep { color: var(--hivis-dark); }
.crumbs + main .hero, .crumbs + main > .hero, .crumbs + main .prose { padding-top: 24px; }

/* Dropdowns for the two doors */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: inherit; font-size: 0.95rem; color: #e9eef1; cursor: pointer; }
.dd-btn:hover, .dd-btn[aria-current="page"], .dd.open .dd-btn { color: var(--hivis); }
.chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.dd.open .chev { transform: rotate(-135deg) translateY(-1px); }
.dd-menu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 18px 40px -18px rgba(28,39,48,.45); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .dd:hover .dd-menu { opacity: 1; visibility: visible; transform: none; } .dd:hover .chev { transform: rotate(-135deg) translateY(-1px); } }
.dd-menu::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.site-header .dd-menu a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink); font-size: .93rem; text-decoration: none; }
.site-header .dd-menu a:hover { background: #fff8db; color: var(--ink); }
@media (max-width: 560px) {
  .nav { gap: 12px; }
  .nav a, .dd-btn { font-size: 0.88rem; }
  .dd { position: static; }
  .dd-menu { position: fixed; left: 12px; right: 12px; top: var(--dd-top, 110px); min-width: 0; }
}
