:root {
  --a: #e05437;      /* orange: accents, buttons, pins. Never body text. */
  --c: #efe5ce;      /* beige */
  --d: #3a291c;      /* dark brown: text */
  --soft: #6a5647;   /* muted brown, 6:1+ on light backgrounds */
  --paper: #fffaf0;
  --line: rgba(58, 41, 28, .16);
  --green-bg: #dcebd3;  --green: #1f4d1a;
  --amber-bg: #f6e2b0;  --amber: #5c3d00;
  --red-bg: #f6d5cc;    --red: #7a1f0e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--d);
  font-family: 'Josefin Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px; /* room for the floating buttons */
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; line-height: 1.15; }
h1 { font-size: 30px; }
h2 { font-size: 27px; }
h3 { font-size: 19px; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--d); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* 1. Hero */
.hero { background: var(--d); color: var(--c); padding: 28px 0 26px; position: relative; }
.hero-logo { display: block; width: 110px; height: auto; margin-bottom: 18px; }
.hero h1 { max-width: 14em; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Josefin Sans', system-ui, sans-serif;
  font-size: 13.5px; font-weight: 700; line-height: 1;
  padding: 7px 11px 5px; border-radius: 999px;
  border: 1.5px solid transparent; white-space: nowrap;
  vertical-align: middle;
}
.chip-hero { border-color: var(--c); color: var(--c); }
.chip-soft { background: var(--c); color: var(--d); }
.chip-green { background: var(--green-bg); color: var(--green); }
.chip-amber { background: var(--amber-bg); color: var(--amber); }
.chip-red { background: var(--red-bg); color: var(--red); }
.chip-we { background: var(--d); color: var(--c); margin-right: 4px; }
.chip-john { background: var(--paper); color: var(--d); border-color: var(--a); }
.chip-btn { background: var(--paper); border-color: var(--d); color: var(--d); min-height: 40px; padding: 9px 14px 7px; font-size: 14.5px; }
.chip-btn[aria-pressed="true"] { background: var(--d); color: var(--c); }
.chips-tabs { margin: 0 0 12px; }

/* Sticky nav */
.nav { position: sticky; top: 0; z-index: 30; background: var(--c); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav-chip {
  flex: none; text-decoration: none; font-weight: 700; font-size: 14.5px; line-height: 1;
  padding: 11px 14px 9px; border-radius: 999px; border: 1.5px solid var(--d); background: var(--paper);
}
.nav-chip.is-on { background: var(--d); color: var(--c); }

/* Sections */
.sec { padding: 36px 0 40px; position: relative; scroll-margin-top: 62px; }
.sec-alt { background: #f7f0de; }
.lead { font-size: 17px; margin: 8px 0 18px; max-width: 36em; }
.lead-small { font-size: 15px; color: var(--soft); margin-bottom: 12px; }
.sub { margin: 30px 0 12px; font-size: 21px; scroll-margin-top: 70px; }
.gap-top { margin-top: 14px; }

/* Segmented control (mobile Before | After) */
.seg { display: flex; background: var(--c); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.seg-btn { flex: 1; border: 0; background: transparent; border-radius: 9px; min-height: 44px; font-weight: 700; font-size: 16px; padding-top: 3px; }
.seg-btn[aria-pressed="true"] { background: var(--d); color: var(--c); }

/* Before vs After */
.ba { display: grid; gap: 28px; }
.ba-col { min-width: 0; }
.ba[data-show="before"] .ba-after, .ba[data-show="after"] .ba-before { display: none; }
.ba-tag { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 22px; margin-bottom: 10px; }
.ba-tag span { font-family: 'Josefin Sans', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--soft); margin-left: 6px; }
.cap { margin-top: 12px; font-size: 15.5px; max-width: 406px; }

/* Phone frame: 390 wide, scrolls inside */
.phone {
  width: 100%; max-width: 406px;
  border: 8px solid var(--d); border-radius: 30px; background: var(--d);
  overflow: hidden;
}
.phone-screen {
  position: relative; background: #fff; border-radius: 22px; overflow: hidden;
  width: 100%; height: 640px;
}
.phone-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.phone-scroll img { display: block; width: 100%; height: auto; }
.phone-screen iframe {
  display: block; border: 0; width: 390px; height: 640px;
  transform-origin: 0 0; /* scaled by review.js when the frame is narrower than 390 */
}

/* Details */
.more { margin-top: 10px; font-size: 15px; }
.more summary {
  cursor: pointer; font-weight: 700; list-style: none;
  display: flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 4px 0; border-top: 1px solid var(--line);
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: ""; margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2px solid var(--d); border-bottom: 2px solid var(--d);
  transform: rotate(45deg); margin-right: 4px;
}
.more[open] summary::after { transform: rotate(-135deg); margin-top: 6px; }
.more > p, .more > ul { padding: 2px 0 8px; }
.more > p + p { padding-top: 4px; }
.more-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; margin-top: 12px; }
.more-card summary { border-top: 0; }
.dot { flex: none; width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-green { background: #3f8a35; }
.dot-amber { background: #d39a12; }
.dot-red { background: #c8442b; }

/* Variants */
.var { display: grid; gap: 22px; }
.var-phone { min-width: 0; }
.var-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px; max-width: 406px; }
.var-cards { display: grid; gap: 12px; align-content: start; }
.switch { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; font-weight: 700; font-size: 15px; min-height: 44px; }
.switch-track { width: 44px; height: 26px; border-radius: 999px; background: #b9aa93; position: relative; transition: background .15s; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] .switch-track { background: var(--d); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(18px); }
.text-link { background: none; border: 0; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; display: inline-flex; align-items: center; }
.text-link-del { color: var(--red); }

/* Cards and grids */
.grid { display: grid; gap: 12px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; position: relative; min-width: 0;
}
.sec:not(.sec-alt) .card { background: #fff; }
.card h3 { margin-bottom: 6px; }
.card > p { font-size: 15.5px; }
.card > .chip { margin-bottom: 10px; }
.card > h3 + .chip, .card > p + .chip, .card > ul + .chip { margin: 10px 0 0; }
.card .mini { color: var(--soft); }
.ticks li { position: relative; padding: 3px 0 3px 22px; font-size: 15.5px; }
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: 8px; width: 10px; height: 6px;
  border-left: 2.5px solid var(--a); border-bottom: 2.5px solid var(--a); transform: rotate(-45deg);
}
.plain li { position: relative; padding: 3px 0 3px 16px; }
.plain li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--a); }
.src { font-size: 13.5px; color: var(--soft); margin-top: 10px; }
.src a { text-decoration: underline; text-underline-offset: 2px; }

/* Upsell */
.offer-imgs { display: grid; gap: 6px; margin-bottom: 12px; }
.offer-imgs-2 { grid-template-columns: 1fr 1fr; }
.offer-imgs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--c); }
.offer-imgs:not(.offer-imgs-2) img { aspect-ratio: 2 / 1; }
.price { font-weight: 700; font-size: 18px !important; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.price > span:not(.chip) { font-size: 14px; font-weight: 600; color: var(--soft); }
.card-yes { border: 2px solid #3f8a35; }
.card-no { border: 2px solid #c8442b; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 12px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--c); font-size: 13.5px; white-space: nowrap; }
tbody th { font-weight: 700; min-width: 150px; }
tbody th .chip { margin-top: 5px; font-size: 12.5px; padding: 5px 8px 3px; display: flex; width: max-content; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td { white-space: nowrap; }
td:last-child { white-space: normal; min-width: 110px; }
.row-ctx th, .row-ctx td { color: var(--soft); font-weight: 400; }

/* Best practices */
.bp { padding-top: 18px; }
.bp-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--c);
  font-weight: 700; font-size: 14px; padding-top: 2px; margin-bottom: 8px;
}
.we { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); line-height: 1.6; }

/* Feasibility */
.feas h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.feas-green { background: var(--green-bg) !important; border-color: transparent; color: var(--green); }
.feas-amber { background: var(--amber-bg) !important; border-color: transparent; color: var(--amber); }
.feas-red { background: var(--red-bg) !important; border-color: transparent; color: var(--red); }
.feas-list li { padding: 7px 0 5px; border-top: 1px solid rgba(58, 41, 28, .14); font-size: 15.5px; font-weight: 600; }
.feas .more summary { border-top-color: rgba(58, 41, 28, .14); }
.feas .more summary::after { border-color: currentColor; }

/* Go-live */
.steps { display: grid; gap: 10px; max-width: 760px; }
.step { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px 11px; }
.step-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--d); color: var(--c);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14.5px; padding-top: 2px;
}
.step-t { font-weight: 700; font-size: 16.5px; line-height: 1.7; }
.step-t .chip { margin-left: 4px; font-size: 12.5px; padding: 5px 9px 3px; }
.step-d { font-size: 15px; color: var(--soft); }

/* Footer */
.foot { padding: 26px 0; text-align: center; font-size: 15px; color: var(--soft); position: relative; }

/* Comment mode */
.fab { position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; gap: 8px; align-items: center; }
.fab-btn {
  border: 0; border-radius: 999px; min-height: 52px; padding: 4px 18px 0;
  font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(58, 41, 28, .3);
}
.fab-notes { background: var(--paper); color: var(--d); border: 1.5px solid var(--d); font-size: 15.5px; gap: 0; }
.fab-comment { background: var(--a); color: #fff; font-size: 19px; }
.fab-comment svg { margin-top: -3px; }
.fab-comment[aria-pressed="true"] { background: var(--d); color: var(--c); }
.c-hint {
  position: fixed; left: 14px; right: 14px; bottom: 78px; z-index: 50;
  background: var(--d); color: var(--c); border-radius: 12px; padding: 11px 14px 9px;
  font-weight: 600; font-size: 15px; text-align: center; max-width: 420px; margin: 0 auto;
}
.commenting, .commenting * { cursor: crosshair !important; }
.commenting .c-ui, .commenting .c-ui * { cursor: auto !important; }
.commenting .c-ui button, .commenting .pin { cursor: pointer !important; }
.commenting iframe { pointer-events: none; }
.pin {
  position: absolute; z-index: 20; width: 30px; height: 30px; margin: -30px 0 0 -4px;
  border-radius: 50% 50% 50% 4px; background: var(--d); color: var(--c);
  border: 2.5px solid var(--a);
  font-weight: 700; font-size: 14px; line-height: 1; padding-top: 2px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(58, 41, 28, .35);
}

/* Sheets */
.sheet {
  border: 0; padding: 20px 16px 18px; background: var(--paper); color: var(--d);
  width: 100%; max-width: 480px; margin: auto auto 0; border-radius: 20px 20px 0 0;
  max-height: 86vh; overflow-y: auto;
}
.sheet::backdrop { background: rgba(58, 41, 28, .5); }
.sheet h2 { font-size: 22px; }
.sheet-where { font-size: 14px; color: var(--soft); margin: 4px 0 12px; }
.sheet textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1.5px solid var(--d); border-radius: 12px; padding: 12px; resize: vertical; min-height: 110px;
}
.sheet-actions { display: grid; gap: 8px; margin-top: 12px; justify-items: stretch; }
.sheet-actions .text-link { justify-content: center; }
.btn { border-radius: 12px; min-height: 50px; font-weight: 700; font-size: 16.5px; padding: 4px 16px 0; border: 1.5px solid var(--d); }
.btn-dark { background: var(--d); color: var(--c); }
.btn-outline { background: transparent; }
.btn-auto { min-height: 40px; font-size: 14.5px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.drawer-empty { font-size: 15.5px; padding: 8px 0; }
.drawer-list { display: grid; gap: 8px; }
.drawer-list li { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 8px; }
.drawer-list .n {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--d); color: var(--c);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; padding-top: 2px;
}
.drawer-list .body { flex: 1; min-width: 0; }
.drawer-list .where { font-size: 13px; font-weight: 700; color: var(--soft); }
.drawer-list .text { font-size: 15.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.drawer-list .go { flex: none; }
.drawer-fine { font-size: 13.5px; color: var(--soft); margin-top: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 2147483647;
  background: var(--d); color: var(--c); border-radius: 12px; padding: 11px 16px 9px;
  font-weight: 700; font-size: 15px; max-width: calc(100% - 28px); text-align: center;
}

/* Wider screens */
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .var-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  .wrap { padding: 0 28px; }
  .hero { padding: 44px 0 40px; }
  .sec { padding: 52px 0 56px; }
  .seg-ba { display: none; }
  .ba { grid-template-columns: 1fr 1fr; justify-items: center; }
  .ba[data-show] .ba-before, .ba[data-show] .ba-after { display: block; }
  .ba-col { width: 100%; max-width: 406px; }
  .var { grid-template-columns: 406px 1fr; gap: 36px; }
  .var-cards { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) and (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
