/* ServiceCRM design system.
   Subject: an operations CRM for home-service crews whose hook is AI renderings.
   Palette: deep pine primary, amber "lights" accent, warm-biased neutrals.
   Both themes are first-class; dark is the default working surface. */

:root {
  --pine: #1f7a58;
  --pine-deep: #145038;
  --amber: #e39a2d;
  --amber-soft: #f4c66a;
  --ink: #16130f;

  /* warm neutrals — greys biased slightly toward the amber accent */
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efeae2;
  --border: #e0d8cc;
  --text: #23201b;
  --muted: #6f685d;
  --accent: var(--pine);
  --accent-ink: #ffffff;

  --good: #2f8f5b;
  --warn: #c9871f;
  --crit: #c0492f;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20,16,10,.06), 0 6px 20px -8px rgba(20,16,10,.18);
  --font: "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
  --maxw: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1d1a16;
    --surface-2: #262019;
    --border: #332c23;
    --text: #ece6dc;
    --muted: #9c9284;
    --accent: #2f9d72;
    --accent-ink: #06130d;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="light"] {
  --bg: #f6f3ee; --surface: #fff; --surface-2: #efeae2; --border: #e0d8cc;
  --text: #23201b; --muted: #6f685d; --accent: var(--pine); --accent-ink: #fff;
  --shadow: 0 1px 2px rgba(20,16,10,.06), 0 6px 20px -8px rgba(20,16,10,.18);
}
:root[data-theme="dark"] {
  --bg: #14120f; --surface: #1d1a16; --surface-2: #262019; --border: #332c23;
  --text: #ece6dc; --muted: #9c9284; --accent: #2f9d72; --accent-ink: #06130d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
}

/* ---- brand marks (inline svg, see templates/brand_marks.html) ----
   Structure tones lift in dark so the glyphs keep contrast; the amber
   signal (lit window / mail flag / foreman's hat) is constant. */
:root { --m-s1: #145038; --m-s2: #1f7a58; }
@media (prefers-color-scheme: dark) { :root { --m-s1: #2f9d72; --m-s2: #23795a; } }
:root[data-theme="light"] { --m-s1: #145038; --m-s2: #1f7a58; }
:root[data-theme="dark"] { --m-s1: #2f9d72; --m-s2: #23795a; }
.mark { height: 1.75em; width: 1.75em; flex: none; }
.mark .s1 { fill: var(--m-s1); stroke: var(--m-s1); }
.mark .s2 { fill: var(--m-s2); }
.mark .sig { fill: var(--amber); }
.mark .gl { fill: var(--amber-soft); }
.mark .gnd { stroke: var(--m-s2); }
.brand-x { color: var(--amber); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; font-weight: 750; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 1em; }
small { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .85em; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .45em; cursor: pointer;
  font: inherit; font-weight: 600; padding: .55em 1em; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform .06s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.05); border-color: transparent; }
.btn-amber { background: var(--amber); color: #241a06; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .35em .7em; font-size: .85rem; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- forms ---- */
label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: .3em; }
input, select, textarea {
  width: 100%; font: inherit; padding: .6em .7em; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
/* Checkboxes/radios keep their intrinsic size — a full-width layout box
   crushes the sibling label text (iOS Safari renders it as a tiny square in
   a page-wide box). */
input[type=checkbox]:not(.form-check-input), input[type=radio]:not(.form-check-input) { width: auto; flex: none; padding: 0; }
textarea { resize: vertical; min-height: 74px; }
.field { margin-bottom: .9em; }
.row:has(> .field) { display: flex; gap: .8em; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; }

/* ---- pills / badges ---- */
.pill {
  display: inline-flex; align-items: center; gap: .35em; font-size: .72rem; font-weight: 650;
  padding: .2em .6em; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  letter-spacing: .02em; text-transform: capitalize; white-space: nowrap;
}
.pill-lead     { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.pill-photos   { background: color-mix(in srgb, #6a8fc4 25%, transparent); color: #6a8fc4; }
.pill-rendering{ background: color-mix(in srgb, var(--amber) 25%, transparent); color: var(--warn); }
.pill-shared   { background: color-mix(in srgb, #7b74d8 25%, transparent); color: #8a83e0; }
.pill-approved { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.pill-estimate { background: color-mix(in srgb, var(--amber) 25%, transparent); color: var(--warn); }
.pill-won      { background: var(--accent); color: var(--accent-ink); }
.pill-lost     { background: color-mix(in srgb, var(--crit) 20%, transparent); color: var(--crit); }

/* ---- app shell ---- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 1.1rem .8rem; display: flex; flex-direction: column; gap: .3rem; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.05rem; padding: .3rem .5rem 1rem; letter-spacing: -.02em; }
.brand .dot { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--pine), var(--amber)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); }
.nav a {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 550; font-size: .92rem;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.nav .ico { width: 17px; text-align: center; opacity: .85; }
.sidebar .spacer { flex: 1; }
/* Collapsible sidebar (desktop only): the fold button pins to the sidebar's
   edge; collapsed = a 64px icon rail (labels + userbox hidden, tooltips
   carry the names). Mobile keeps the slide-in drawer untouched. */
.sidefold {
  position: absolute; top: 1rem; right: -12px; z-index: 5; width: 24px; height: 24px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; line-height: 1; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.sidefold:hover { color: var(--text); background: var(--surface-2); }
.sidefold .fold-out { display: none; }
html[data-side="collapsed"] .sidefold .fold-in { display: none; }
html[data-side="collapsed"] .sidefold .fold-out { display: block; }
@media (min-width: 861px) {
  html[data-side="collapsed"] .shell { grid-template-columns: 64px 1fr; }
  html[data-side="collapsed"] .sidebar { padding: 1.1rem .5rem; }
  html[data-side="collapsed"] .sidebar .lbl, html[data-side="collapsed"] .userbox { display: none; }
  html[data-side="collapsed"] .nav a { justify-content: center; padding: .55rem .4rem; }
  html[data-side="collapsed"] .brand { justify-content: center; padding: .3rem 0 1rem; }
}
@media (max-width: 860px) { .sidefold { display: none; } }
.userbox { border-top: 1px solid var(--border); padding-top: .7rem; font-size: .85rem; }
.userbox .name { font-weight: 650; }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.4rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent);
  position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 5;
}
.content { padding: 1.5rem 1.4rem 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }

/* ---- cards / stats ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.1rem 1.2rem; }
.grid { display: grid; gap: 1rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat .k { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.stat .v { font-size: 1.9rem; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .v .cur { font-size: 1rem; color: var(--muted); font-weight: 600; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .5rem .7rem; border-bottom: 1px solid var(--border); }
.data td { padding: .7rem .7rem; border-bottom: 1px solid var(--border); }
.data tr:hover td { background: var(--surface-2); }

/* ---- kanban board ---- */
.board { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .8rem; }
.board .col { flex: 0 0 220px; background: var(--surface-2); border-radius: var(--radius); padding: .6rem; }
.board .col h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; justify-content: space-between; }
.board .col .count { color: var(--muted); }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .7rem; margin-bottom: .5rem; display: block; color: var(--text); }
.pcard:hover { text-decoration: none; border-color: var(--muted); }
.pcard .t { font-weight: 640; font-size: .9rem; }
.pcard .c { color: var(--muted); font-size: .8rem; }

/* ---- rendering gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
.tile { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tile img { width: 100%; aspect-ratio: 16/11; object-fit: cover; display: block; background: var(--surface-2); }
.tile .meta { padding: .55rem .7rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tile.chosen { outline: 3px solid var(--accent); }

/* ---- placement-mask editor ----
   iPad-first: sections panel left (vertical scroll; horizontal strips inside
   a section), drawing stage right and sticky. Phones stack: the photo pins to
   the top as a full-width hero and the sections use the rest below. */
.maskwrap { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 1rem; align-items: start; }
.mask-sections { display: flex; flex-direction: column; gap: .8rem; max-height: calc(100vh - 140px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mask-section h3 { margin-bottom: .5rem; }
.mask-items { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.mask-item {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45em; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; padding: .5em .8em;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  touch-action: manipulation;
}
.mask-item.active { border-color: var(--accent); outline: 2px solid var(--accent); }
.mask-item .swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mask-item .mi-badge { font-size: .68rem; color: var(--good); font-weight: 700; }
.mask-stage-wrap { min-width: 0; }
.mask-stage { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface-2); }
.mask-stage img { width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.mask-stage .mask-context { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; pointer-events: none; }
.mask-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; opacity: .65; cursor: crosshair; }
.mask-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
@media (max-width: 900px) {
  .maskwrap { grid-template-columns: 1fr; }
  /* Hero on top, pinned; sections scroll beneath it. */
  .mask-stage-wrap { position: sticky; top: 0; z-index: 30; order: -1; background: var(--bg); padding-bottom: .4rem; }
  .mask-tools { margin-top: .5rem; }
  .mask-sections { max-height: none; overflow: visible; }
}

/* ---- ordered service picker (add-job) ----
   Badge visibility is class-driven on purpose: .seq-num.hidden must win, so
   no display styles ever go inline on these elements. */
.seq-pill {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
  font: inherit; padding: .45rem .8rem; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.seq-pill.picked { border-color: var(--accent); }
.seq-num {
  min-width: 1.15em; height: 1.15em; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: inline-grid; place-items: center; font-size: .68rem; font-weight: 800;
}
.seq-num.hidden { display: none; }

/* ---- dashboard pipeline funnel: stage counts that WRAP, never scroll ---- */
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .5rem; }
.funnel .fstage { background: var(--surface-2); border-radius: var(--radius-sm); padding: .45rem .6rem; text-align: center; }
.funnel .fstage .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; white-space: nowrap; }
.funnel .fstage .v { font-size: 1.25rem; font-weight: 780; font-variant-numeric: tabular-nums; }

/* ---- timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: .7rem; padding: .5rem 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.timeline .when { color: var(--muted); font-size: .8rem; white-space: nowrap; min-width: 84px; }
.timeline .verb { font-weight: 650; }

/* ---- layout helpers ---- */
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; align-items: start; }
/* Grid/flex children default to min-width:auto, which lets wide content
   (reference carousels, tables) blow the column out past the viewport.
   Forcing min-width:0 keeps overflow INSIDE scrollable strips. */
.two-col > * { min-width: 0; }
.card { min-width: 0; }
.refstrip { max-width: 100%; }
.refitem { max-width: 100%; overflow: hidden; }
.flex { display: flex; gap: .6rem; align-items: center; }
.between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.mt { margin-top: 1.1rem; } .mb { margin-bottom: 1.1rem; }
.hidden { display: none; }
.notice { border: 1px solid color-mix(in srgb, var(--good) 45%, var(--border)); background: color-mix(in srgb, var(--good) 12%, transparent); border-radius: var(--radius-sm); padding: .7rem .9rem; margin-bottom: 1rem; }
.error { border: 1px solid color-mix(in srgb, var(--crit) 45%, var(--border)); background: color-mix(in srgb, var(--crit) 12%, transparent); border-radius: var(--radius-sm); padding: .7rem .9rem; margin-bottom: 1rem; }

/* ---- marketing ---- */
.mk-nav { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.4rem; }
.mk-links { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.mk-actions { display: flex; align-items: center; gap: .5rem; }
.mk-burger { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1.05rem; line-height: 1; padding: .4em .6em; cursor: pointer; }
/* Phones: one tidy row — brand, the primary CTA, and a hamburger. The links
   drop into a full-width menu under the bar (field report: the pill row
   wrapped into a three-line stack). */
@media (max-width: 640px) {
  .mk-nav { flex-wrap: wrap; padding: .75rem 1rem .6rem; }
  .mk-actions { margin-left: auto; }
  .mk-burger { display: inline-flex; }
  .mk-links { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch;
    gap: .3rem; margin: .6rem 0 0; padding-top: .5rem; border-top: 1px solid var(--border); }
  .mk-nav.open .mk-links { display: flex; }
  .mk-links .btn { justify-content: flex-start; text-align: left; padding: .6em .8em; }
}
.hero { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.4rem 2rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4vw + .9rem, 2.9rem); font-weight: 820; letter-spacing: -.03em; line-height: 1.15; }
.hero .pill { white-space: normal; line-height: 1.5; padding: calc(.2em + 5px) calc(.6em + 5px); }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 34ch; }
.hero-art { aspect-ratio: 4/3; border-radius: 16px; background:
  radial-gradient(120px 80px at 30% 30%, color-mix(in srgb, var(--amber) 55%, transparent), transparent),
  linear-gradient(160deg, var(--pine-deep), #0c2c1f);
  border: 1px solid var(--border); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-art .lights { position: absolute; inset: 0; }
.img-credit { font-size: .7rem; color: var(--muted); text-align: right; margin-top: .4rem; }
.img-credit a { color: inherit; }
.product-card { overflow: hidden; }
.product-card .cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--surface-2); }

/* ---- blog ---- */
.blog-card { display: block; color: var(--text); }
.blog-card:hover { text-decoration: none; border-color: var(--muted); }
.blog-card .blog-date { font-size: .8rem; color: var(--muted); }
.blog-card h3 { margin-top: .5rem; }
.article { max-width: 700px; margin: 0 auto; padding: 2.4rem 1.4rem 3.5rem; }
.article .byline { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.article .dek { font-size: 1.12rem; color: var(--muted); margin: 1.1rem 0 1.8rem; max-width: 60ch; }
.article h2 { margin-top: 2.1rem; font-size: 1.35rem; }
.article h3 { margin-top: 1.5rem; }
.article h3 a { color: var(--text); }
.article p, .article ul { max-width: 62ch; }
.article ul { padding-left: 1.2em; }
.article .cta-row { padding-top: 2rem; margin-top: 2.2rem; border-top: 1px solid var(--border); }

/* before/after reveal slider (drag anywhere; range input drives --pos) */
.ba { position: relative; aspect-ratio: 3/2; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); --pos: 50%; background: var(--surface-2); }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba .after { clip-path: inset(0 0 0 var(--pos)); }
.ba .ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.55); pointer-events: none; }
.ba .ba-knob { position: absolute; top: 50%; left: var(--pos); transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #1c2822; display: grid; place-items: center; font-size: .85rem; font-weight: 800; box-shadow: 0 2px 10px rgba(0,0,0,.4); pointer-events: none; }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; touch-action: pan-y; }
.ba input[type=range]:focus-visible ~ .ba-knob { outline: 3px solid var(--accent); outline-offset: 2px; }
.ba .tag { position: absolute; bottom: .6rem; padding: .22rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .03em; background: rgba(10,14,12,.62); color: #fff; pointer-events: none; }
.ba .tag-l { left: .6rem; } .ba .tag-r { right: .6rem; }

/* numbered workflow rows (media + copy, alternating) */
.step-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; align-items: center; margin-top: 2.4rem; }
.step-row .media > img { width: 100%; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); display: block; }
.step-row.rev .media { order: 2; }
.step-row .flex h3 { margin: 0; }
.step-row .media .between { flex-wrap: wrap; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }

/* paired render figures */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.duo figure { margin: 0; }
.duo img { width: 100%; border-radius: 14px; display: block; border: 1px solid var(--border); box-shadow: var(--shadow); }
.duo figcaption { font-size: .82rem; color: var(--muted); margin-top: .45rem; text-align: center; }

/* hand-drawn marker underline (SVG scribble beneath a key phrase) */
.scribble { position: relative; white-space: nowrap; }
.scribble svg { position: absolute; left: -2%; bottom: -.24em; width: 104%; height: .42em; overflow: visible; pointer-events: none; }
.scribble svg path { fill: none; stroke: var(--amber); stroke-width: 7; stroke-linecap: round; opacity: .8; }
@media (prefers-reduced-motion: no-preference) {
  .scribble svg path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: scribble-draw .9s .4s ease forwards; }
  .scribble svg path + path { animation-delay: .75s; }
}
@keyframes scribble-draw { to { stroke-dashoffset: 0; } }

/* motto band: grand-opening bunting over deep pine, whole band links to /about */
.motto-band {
  position: relative; display: block; overflow: hidden; text-align: center;
  max-width: var(--maxw); width: calc(100% - 2.8rem); margin: 2.5rem auto;
  border-radius: 20px; box-shadow: var(--shadow);
  background:
    radial-gradient(340px 200px at 82% 118%, color-mix(in srgb, var(--amber) 30%, transparent), transparent),
    linear-gradient(165deg, var(--pine-deep), #0c2c1f);
  color: #fff;
}
.motto-band:hover { text-decoration: none; }
.motto-band .bunting { display: block; width: 100%; height: auto; }
.motto-band .inner { padding: 1.6rem 2rem 3rem; }
.motto-eyebrow {
  font-size: .72rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber-soft); margin: 0 0 .9em;
}
.motto-band h2 { line-height: 1.25;
  color: #fff; font-size: clamp(1.55rem, 2.6vw + .9rem, 2.5rem); font-weight: 820;
  letter-spacing: -.02em; max-width: 22ch; margin: 0 auto .5em;
}
.motto-aside { color: rgba(255,255,255,.78); font-size: 1.02rem; max-width: 42ch; margin: 0 auto 1.4em; }
.motto-link { display: inline-flex; align-items: center; gap: .45em; font-weight: 700; color: #fff; }
.motto-link .arr { transition: transform .15s ease; }
.motto-band:hover .motto-link { text-decoration: underline; text-underline-offset: 3px; }
.motto-band:hover .motto-link .arr { transform: translateX(4px); }
@media (max-width: 860px) {
  .motto-band .inner { padding: .6rem 1.2rem 2.2rem; }
}

/* competitor comparison marks */
.cmp-yes { color: var(--good); font-weight: 700; }
.cmp-no { color: var(--muted); }
.cmp-na { color: var(--muted); opacity: .55; }

/* full-width photo CTA band */
.cta-band { position: relative; border-radius: 20px; overflow: hidden; max-width: var(--maxw); width: calc(100% - 2.8rem); margin: 2rem auto; }
.cta-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band .inner { position: relative; padding: 4rem 2rem; text-align: center; color: #fff; background: linear-gradient(rgba(6,18,13,.5), rgba(6,18,13,.78)); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); }

@media (max-width: 860px) {
  .step-row { grid-template-columns: 1fr; gap: 1rem; }
  .step-row.rev .media { order: 0; }
  .duo { grid-template-columns: 1fr; }
  .cta-band .inner { padding: 2.6rem 1.2rem; }
  .hero { padding: 2rem 1.4rem 1.2rem; gap: 1.4rem; }
  .section { padding: 1.8rem 1.4rem; }
}
.section { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.4rem; }
.feature-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature .ic { font-size: 1.4rem; }
.price-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plan { display: flex; flex-direction: column; }
.plan .amt { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.plan .amt small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: .8rem 0 1.2rem; font-size: .9rem; }
.plan li { padding: .28rem 0; border-bottom: 1px dashed var(--border); }
.plan.feat { outline: 2px solid var(--accent); }

/* ---- testimonials ---- */
.testimonial { display: flex; flex-direction: column; gap: .55rem; }
.testimonial .quote-mark { font-family: Georgia, "Times New Roman", serif; font-size: 3rem; line-height: 0; height: 1.2rem; color: var(--accent); }
.testimonial blockquote { margin: 0; font-size: 1.02rem; line-height: 1.5; }
.testimonial-by { display: flex; align-items: center; gap: .7rem; margin-top: auto; padding-top: .4rem; }
.testimonial-by .avatar { cursor: default; font-weight: 650; }

/* ---- FAQ (native <details>, no JS needed) ---- */
.faq { display: flex; flex-direction: column; gap: .7rem; max-width: 760px; margin-inline: auto; }
.faq details { cursor: pointer; }
.faq summary { list-style: none; font-weight: 650; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 700; font-size: 1.35rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0; }

/* ---- coming-soon badge (catalog + product pages; app.css tokens only, no Tabler) ---- */
.coming-badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .22em .62em; border-radius: 999px; background: color-mix(in srgb, var(--amber) 22%, transparent); color: var(--warn); white-space: nowrap; }

/* ---- seasonal launch offer (feature-flagged) ----
   Promo band over deep pine (same visual family as .motto-band): copy +
   checklist on the left, a light "buy card" on the right with compare-at
   strikethrough, one-time price, and a spots-left progress bar. */
.offer-band {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: center;
  padding: 1.8rem 2rem; border-radius: 16px; color: #fff;
  background:
    radial-gradient(320px 190px at 88% -30%, color-mix(in srgb, var(--amber) 45%, transparent), transparent),
    linear-gradient(160deg, var(--pine-deep), #0c2c1f);
  box-shadow: var(--shadow);
}
.offer-band h2 { color: #fff; font-size: clamp(1.35rem, 1.8vw + .8rem, 1.9rem); max-width: 24ch; }
.offer-band p { color: rgba(255,255,255,.82); max-width: 52ch; margin-bottom: .4em; }
.offer-badge {
  display: inline-flex; align-items: center; gap: .4em; font-size: .72rem; font-weight: 750;
  letter-spacing: .08em; text-transform: uppercase; padding: .3em .8em; border-radius: 999px;
  background: var(--amber); color: #241a06; margin-bottom: .8rem;
}
.offer-list { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .92rem; }
.offer-list li { padding: .22rem 0; }
.offer-list li::before { content: "✓"; color: var(--amber-soft); font-weight: 800; margin-right: .55em; }
.offer-buy { padding: 1.3rem 1.4rem; text-align: center; }
.offer-was { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.offer-amt { font-size: 2.6rem; font-weight: 820; letter-spacing: -.03em; }
.offer-amt small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.offer-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .8rem 0 .35rem; }
.offer-progress > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pine), var(--amber)); }
.offer-slots { font-size: .85rem; color: var(--muted); margin-bottom: .9rem; }
.offer-buy .btn { width: 100%; justify-content: center; }
/* Signup-card variant: compact amber callout. */
.offer-note {
  display: flex; flex-direction: column; gap: .18rem; margin-bottom: 1rem;
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--border));
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  border-radius: var(--radius-sm); padding: .8rem .9rem;
}
.offer-note .offer-badge { align-self: flex-start; margin-bottom: .25rem; }
@media (max-width: 860px) { .offer-band { grid-template-columns: 1fr; padding: 1.4rem 1.2rem; gap: 1.2rem; } }
.center { text-align: center; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.auth-card { width: 100%; max-width: 420px; }
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 1.4rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* --- marketing mega-footer (Tabler-style; app.css tokens, so it renders on every
   marketing page whether or not it loads Tabler, and adapts to light/dark) --- */
.mega-footer { background: var(--surface); }
.mega-inner { max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.4rem 1.6rem; }
.mega-cols { display: grid; grid-template-columns: repeat(3, 1fr) 1.6fr; gap: 2rem; }
@media (max-width: 900px) { .mega-cols { grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; } }
@media (max-width: 560px) { .mega-cols { grid-template-columns: 1fr; } }
.mega-col { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.mega-h { margin: 0 0 .35rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.mega-h.mega-h2 { margin-top: 1.7rem; }
.mega-col a { color: var(--text); text-decoration: none; font-size: .95rem; }
.mega-col a:hover { color: var(--accent); }
.mega-soon { font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--warn); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); border-radius: 999px; padding: .05em .4em; vertical-align: middle; }
.theme-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.theme-seg button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border: 0; background: transparent; color: var(--muted); border-radius: 999px; cursor: pointer; }
.theme-seg button:hover { color: var(--text); }
.theme-seg button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.mega-brand { gap: .8rem; align-items: center; min-width: 0; }
.mega-logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.mega-logo .mark { height: 1.85em; width: 1.85em; }
.mega-lede { color: var(--muted); font-size: .95rem; margin: 0; width: 100%; max-width: 34ch; text-align: justify; }
.mega-subscribe { display: flex; gap: .5rem; width: 100%; max-width: 420px; }
.mega-email { flex: 1; min-width: 0; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: .95rem; }
.mega-email:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }
.mega-btn { padding: .5rem 1rem; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 650; cursor: pointer; white-space: nowrap; }
.mega-btn:hover { filter: brightness(1.05); }
.mega-subnote { color: var(--accent); font-size: .95rem; margin: 0; }
.mega-contact { margin: 0; }
.mega-contact a { color: var(--muted); font-size: .88rem; text-decoration: none; }
.mega-contact a:hover { color: var(--accent); }
.mega-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.mega-bottom a { color: var(--muted); text-decoration: none; }
.mega-bottom a:hover { color: var(--accent); }
.mega-heart { color: #e5484d; }

/* iPad is the primary viewing target: portrait (~820px) collapses to one
   column so carousels get the full width; landscape (~1024+) keeps two
   columns. Touch scrolling on strips is momentum-smooth with a thin bar. */
@media (max-width: 1000px) {
  .two-col { grid-template-columns: 1fr; }
}
.refstrip, .board, .table-wrap, .mask-items {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  overscroll-behavior-x: contain;
}
/* Native scrollbar tracks paint WHITE in dark theme (field screenshot: a
   bright band under the reference strip that reads as an overlap) — theme
   them to the card instead. */
.refstrip::-webkit-scrollbar, .board::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .mask-items::-webkit-scrollbar { height: 8px; }
.refstrip::-webkit-scrollbar-track, .board::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, .mask-items::-webkit-scrollbar-track { background: transparent; }
.refstrip::-webkit-scrollbar-thumb, .board::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .mask-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.refthumb { touch-action: pan-x; }
@media (pointer: coarse) {
  /* bigger touch targets on tablets */
  .btn { padding: .7em 1.15em; }
  .refitem input[type=checkbox] { width: 20px; height: 20px; }
  .nav a { padding: .65rem .7rem; }
}

/* ---- mobile nav: hamburger + slide-in drawer ---- */
.mobilebar {
  display: none; position: sticky; top: 0; z-index: 55;
  align-items: center; gap: .7rem; padding: .6rem .9rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.hamburger {
  font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: .35rem .6rem;
}
.navbk { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 58; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .mobilebar { display: flex; }
  .topbar { display: none; }               /* mobilebar replaces it */
  /* Sidebar becomes a slide-in drawer. */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: 264px;
    z-index: 60; flex-direction: column; transform: translateX(-102%);
    transition: transform .18s ease; box-shadow: 4px 0 24px rgba(0,0,0,.35);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .navbk { display: block; }
  .sidebar .spacer { display: block; }
  .hero { grid-template-columns: 1fr; }
  .content { padding: 1rem .9rem 4rem; }
  .page-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- art logos: light/dark img pairs driven by the theme tokens ----
   The drawings replace the flat marks in headers (user direction). Fixed
   light/dark SVG pairs swap via these vars so the site toggle wins; the
   pinned-dark app sidebar forces its dark variant. */
:root { --art-l: inline; --art-d: none; }
@media (prefers-color-scheme: dark) { :root { --art-l: none; --art-d: inline; } }
:root[data-theme="light"] { --art-l: inline; --art-d: none; }
:root[data-theme="dark"] { --art-l: none; --art-d: inline; }
.art-l { display: var(--art-l); }
.art-d { display: var(--art-d); }
.brand-art { display: inline-flex; flex: none; }
.brand-art img { height: 40px; width: 40px; }
.mobilebar .brand-art img { height: 32px; width: 32px; }
.stamp-art img { width: 100%; height: auto; }
.mega-stamp { display: block; width: 172px; }
/* Seal on the hero photo: always the light stamp on a cream paper disc, so
   it reads on any photo in any theme. */
.hero-art { position: relative; }
.hero-seal {
  position: absolute; left: -24px; bottom: -20px; width: 156px; z-index: 2;
  transform: rotate(-8deg); background: #f6f3ee; border-radius: 50%;
  padding: 7px; box-shadow: 0 6px 22px rgba(20,16,10,.30);
}
