/* =====================================================================
   Kemp & Co — stylesheet (clean, single copy of every rule)
   Palette + type live in :root. Change those to reskin the whole site.
   ===================================================================== */

:root {
  --paper: #FAF7F2; --ink: #23160F; --brown: #7C5C46;
  --sand: #ECE2D6; --sand-2: #E2D4C3; --orange: #C1551B; --rust: #93370F;
  --display: "Bricolage Grotesque", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", ui-monospace, "Courier New", monospace;
  --edge: clamp(1.25rem, 5vw, 6rem); --maxw: 1180px;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.02; }
p { margin: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2.5px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

.eyebrow, .index { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brown); }
.index { display: inline-block; margin-bottom: 1.5rem; color: var(--orange); }
.index--light { color: #E7B896; }

/* ---------------- NAV ---------------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem var(--edge); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--sand-2); }
.nav__brand { display: inline-flex; align-items: baseline; gap: 0.06em; font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.015em; color: var(--ink); transition: transform 0.4s var(--bounce); }
.nav__brand:hover { transform: scale(1.04); }
.nav__brand span { color: var(--orange); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.nav__links a { font-size: 0.95rem; color: var(--brown); transition: color 0.18s ease; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__cta { color: var(--paper) !important; background: var(--ink); padding: 0.5rem 1rem; border-radius: 100px; transition: background 0.2s ease; }
.nav__cta:hover { background: var(--rust); }
.nav__cta--active { background: var(--orange); }
.nav__burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav__burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav--open .nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------- BUTTONS ---------------- */
.btn { display: inline-block; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.03em; padding: 0.85rem 1.6rem; border-radius: 100px; border: 1.5px solid transparent; cursor: pointer; transition: transform 0.45s var(--bounce), background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.btn--solid { background: var(--orange); color: var(--paper); }
.btn--solid:hover { background: var(--rust); transform: translateY(-4px) scale(1.03); }
.btn--solid:active { transform: translateY(-1px) scale(0.98); }
.btn--ghost { border-color: var(--sand-2); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-4px) scale(1.03); }
.btn--ghostlight { border: 1.5px solid #4A3526; color: var(--paper); background: transparent; }
.btn--ghostlight:hover { border-color: var(--paper); transform: translateY(-4px) scale(1.03); }
.linkbtn { background: none; border: none; cursor: pointer; font-family: var(--mono); font-size: 0.8rem; color: var(--brown); padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--orange); }

/* ---------------- HERO + character ---------------- */
.hero { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 12vw, 8.5rem) var(--edge) clamp(2.5rem, 7vw, 5rem); }
.hero > .eyebrow, .hero > .hero__title, .hero > .hero__lede, .hero > .hero__actions { opacity: 0; animation: rise 0.85s var(--bounce) forwards; }
.hero .eyebrow { display: block; margin-bottom: 1.75rem; animation-delay: 0.05s; }
.hero__title { font-size: clamp(2.6rem, 8vw, 6rem); letter-spacing: -0.025em; max-width: 15ch; animation-delay: 0.15s; }
.hero__lede { margin-top: 2rem; max-width: 48ch; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--brown); animation-delay: 0.28s; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.5rem; animation-delay: 0.4s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.hero__underlined { position: relative; color: var(--orange); }
.hero__underlined::after { content: ""; position: absolute; left: 0; bottom: 0.06em; height: 0.09em; width: 100%; background: var(--orange); transform: scaleX(0); transform-origin: left; animation: draw 0.9s var(--smooth) 0.9s forwards; }
@keyframes draw { to { transform: scaleX(1); } }

.seal { position: absolute; width: 128px; height: 128px; top: clamp(1rem, 4vw, 3rem); right: var(--edge); }
.seal svg { width: 100%; height: 100%; animation: spin 22s linear infinite; }
.seal text { font-family: var(--mono); font-size: 8.4px; letter-spacing: 2.2px; fill: var(--ink); text-transform: uppercase; }
.seal__center { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 0.72rem; text-align: center; line-height: 1.05; color: var(--orange); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) { .seal { display: none; } }

.accent { position: absolute; pointer-events: none; z-index: 0; opacity: 0.85; }
.accent--ring { width: 90px; height: 90px; border: 3px solid var(--orange); border-radius: 50%; }
.accent--dot { width: 16px; height: 16px; background: var(--orange); border-radius: 50%; }
.float { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.marquee { overflow: hidden; white-space: nowrap; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); background: var(--orange); color: var(--paper); padding: 0.6rem 0; }
.marquee__track { display: inline-block; animation: scrollx 26s linear infinite; }
.marquee__track span { font-family: var(--display); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.02em; text-transform: uppercase; padding: 0 1.25rem; }
.marquee__track span::after { content: "✳"; margin-left: 2.5rem; opacity: 0.7; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------------- SECTIONS ---------------- */
.section { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 10vw, 7rem) var(--edge); }
.section .index { position: relative; z-index: 1; }
.section[data-num]::before { content: attr(data-num); position: absolute; top: -0.35em; right: var(--edge); font-family: var(--display); font-weight: 800; font-size: clamp(6rem, 18vw, 13rem); line-height: 0.8; color: var(--sand-2); opacity: 0.5; z-index: 0; pointer-events: none; letter-spacing: -0.04em; }
@media (max-width: 620px) { .section[data-num]::before { display: none; } }
.section__title { font-size: clamp(1.9rem, 4.5vw, 3.1rem); letter-spacing: -0.02em; max-width: 20ch; }

.about { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); }
.about__body { display: flex; flex-direction: column; gap: 1.25rem; color: var(--brown); }
.about__body p { max-width: 52ch; }
.about__stats { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.about__stats li { display: flex; flex-direction: column; gap: 0.2rem; padding-top: 0.9rem; border-top: 2px solid var(--orange); }
.about__stats strong { font-family: var(--display); font-size: 1.15rem; color: var(--ink); }
.about__stats span { font-family: var(--mono); font-size: 0.72rem; color: var(--brown); }

.services { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2rem); }
.service { padding: 1.75rem; background: var(--sand); border-radius: 14px; transition: transform 0.5s var(--bounce), background 0.25s ease; }
.service:hover { transform: translateY(-6px); background: var(--sand-2); }
.service h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.service p { color: var(--brown); font-size: 0.98rem; }

.tstmn { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--edge); position: relative; }
.tstmn__title { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -0.02em; margin-bottom: 2rem; }
.tstmn__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.tcard { padding: 1.75rem; border: 1px solid var(--sand-2); border-radius: 18px; background: var(--paper); transition: transform 0.5s var(--bounce), box-shadow 0.3s ease; }
.tcard:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: 0 20px 40px -26px rgba(35, 22, 15, 0.45); }
.tcard__mark { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 0.6; color: var(--orange); }
.tcard__quote { margin: 0.5rem 0 1.25rem; font-size: 1.02rem; }
.tcard__who strong { font-family: var(--display); display: block; }
.tcard__who span { font-family: var(--mono); font-size: 0.72rem; color: var(--brown); }

/* ---------------- CONTACT / FOOTERS ---------------- */
.contact { background: var(--band); color: var(--band-ink); padding: clamp(4rem, 11vw, 7.5rem) var(--edge) clamp(2rem, 5vw, 3rem); text-align: center; }
.contact__title { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.02em; }
.contact__lede { margin: 1.25rem auto 0; color: var(--band-mute); max-width: 46ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; margin-top: 2.25rem; }
.contact__foot, .foot { margin-top: clamp(3rem, 8vw, 5rem); padding-top: 1.5rem; border-top: 1px solid #4A3526; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-family: var(--mono); font-size: 0.75rem; color: #A88A72; }
.foot { border-top: 1px solid var(--sand-2); color: var(--brown); max-width: var(--maxw); margin: 0 auto; padding: 2rem var(--edge); }

/* ---------------- SUB-PAGE SHELL ---------------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) var(--edge) clamp(4rem, 9vw, 6rem); }
.page--narrow { max-width: 620px; }
.page__head { margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.page__head .eyebrow { display: block; margin-bottom: 1rem; }
.page__title { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.025em; max-width: 18ch; }
.page__lede { margin-top: 1.25rem; max-width: 56ch; color: var(--brown); font-size: clamp(1rem, 2vw, 1.2rem); }

/* ---------------- FORMS / CHIPS ---------------- */
.cform__status { min-height: 1.2em; margin-top: 1rem; font-family: var(--mono); font-size: 0.85rem; }
.cform__status.is-ok { color: #3f7f33; }
.cform__status.is-error { color: var(--rust); }
.cform__honey { position: absolute; left: -9999px; opacity: 0; }
.inquiry { display: flex; flex-direction: column; gap: 1.75rem; }
.fs { border: 1px solid var(--sand-2); border-radius: 16px; padding: 1.5rem; margin: 0; background: color-mix(in srgb, var(--sand) 35%, var(--paper)); }
.fs legend { font-family: var(--display); font-weight: 700; font-size: 1.2rem; padding: 0 0.5rem; }
.fs__hint { font-family: var(--mono); font-size: 0.72rem; color: var(--brown); margin: 0.25rem 0 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: block; margin-bottom: 0.25rem; }
.field span { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown); margin-bottom: 0.5rem; }
.field input, .field textarea { width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--sand-2); border-radius: 12px; padding: 0.8rem 1rem; transition: border-color 0.25s ease, transform 0.4s var(--bounce); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); transform: translateY(-2px); }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { position: relative; cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 0.55rem 1rem; border: 1.5px solid var(--sand-2); border-radius: 100px; font-size: 0.9rem; background: var(--paper); transition: transform 0.4s var(--bounce), background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.chip:hover span { border-color: var(--brown); transform: translateY(-2px); }
.chip input:checked + span, .chip.is-on span { background: var(--orange); border-color: var(--orange); color: var(--paper); transform: scale(1.06); }
.inquiry__submit { align-self: flex-start; border: none; }

/* ---------------- PRICING ---------------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 1.5rem); align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 2rem 1.75rem; border: 1px solid var(--sand-2); border-radius: 18px; background: var(--paper); transition: transform 0.5s var(--bounce), box-shadow 0.3s ease; }
.plan:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -24px rgba(35, 22, 15, 0.4); }
.plan--feature { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 6%, var(--paper)); }
.plan__tag, .careplan__tag { display: inline-block; align-self: flex-start; font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper); background: var(--orange); padding: 0.25rem 0.6rem; border-radius: 100px; margin-bottom: 0.75rem; }
.plan__name, .careplan__name { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brown); }
.plan__price { font-family: var(--display); font-weight: 800; font-size: 2.8rem; line-height: 1; margin: 0.5rem 0 0.25rem; letter-spacing: -0.02em; }
.plan__price span { font-size: 1.3rem; color: var(--orange); }
.plan__for { color: var(--brown); font-size: 0.95rem; min-height: 2.8em; }
.plan__list, .careplan__list { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; }
.plan__list li, .careplan__list li { position: relative; padding-left: 1.5rem; font-size: 0.95rem; }
.plan__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); }
.careplan__list li::before { content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.plan__cta, .careplan__cta { margin-top: auto; text-align: center; }
.care-section { margin-top: clamp(3rem, 8vw, 5rem); }
.careplans { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 1.5rem); align-items: stretch; }
.care__lede { color: var(--brown); margin: 0.5rem 0 1.5rem; max-width: 56ch; }
.careplan { display: flex; flex-direction: column; padding: 1.75rem 1.5rem; border: 1px solid var(--sand-2); border-radius: 18px; background: var(--paper); transition: transform 0.5s var(--bounce), box-shadow 0.3s ease; }
.careplan:hover { transform: translateY(-6px); box-shadow: 0 18px 36px -24px rgba(35, 22, 15, 0.4); }
.careplan--feature { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 6%, var(--paper)); }
.careplan__price { font-family: var(--display); font-weight: 800; font-size: 2.3rem; line-height: 1; margin: 0.4rem 0 0.3rem; letter-spacing: -0.02em; }
.careplan__price span { font-size: 1rem; color: var(--orange); }
.careplan__blurb { color: var(--brown); font-size: 0.92rem; min-height: 2.6em; }
.addons { margin-top: clamp(3rem, 8vw, 5rem); }
.addons .section__title { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1.5rem; }
.addons__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.addon { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem; background: var(--sand); border-radius: 12px; }
.addon strong { font-family: var(--display); font-size: 1.05rem; }
.addon span { font-family: var(--mono); font-size: 0.8rem; color: var(--orange); }
.addons__note { margin-top: 1.5rem; color: var(--brown); }
.addons__note a { color: var(--orange); border-bottom: 1.5px solid var(--orange); }

/* ---------------- AUTH ---------------- */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.tab { font-family: var(--mono); font-size: 0.85rem; padding: 0.6rem 1.25rem; border: 1.5px solid var(--sand-2); border-radius: 100px; background: var(--paper); color: var(--brown); cursor: pointer; transition: transform 0.4s var(--bounce), background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.tab:hover { transform: translateY(-2px); }
.tab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.authform { display: flex; flex-direction: column; gap: 1rem; }
.authform__submit { border: none; margin-top: 0.25rem; }
.authform__msg { min-height: 1.2em; font-family: var(--mono); font-size: 0.82rem; }
.authform__msg.is-error { color: var(--rust); }
.authform__msg.is-ok { color: #3f7f33; }
.authhelp { margin: 0.75rem 0 0; }
.admindot { position: fixed; right: 14px; bottom: 14px; width: 16px; height: 16px; border-radius: 50%; border: none; cursor: pointer; background: var(--sand-2); opacity: 0.25; z-index: 40; transition: opacity 0.2s ease, transform 0.4s var(--bounce); }
.admindot:hover { opacity: 0.9; transform: scale(1.2); }

/* ---------------- DASHBOARD (client + admin share these) ---------------- */
.dashboard { display: grid; grid-template-columns: 250px 1fr; gap: clamp(1rem, 3vw, 2.25rem); max-width: 1240px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--edge) 5rem; align-items: start; }
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1.25rem; padding: 1.25rem; background: color-mix(in srgb, var(--sand) 45%, var(--paper)); border: 1px solid var(--sand-2); border-radius: 18px; }
.side__id { display: flex; align-items: center; gap: 0.75rem; }
.side__name { font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.1; }
.side__plan { font-family: var(--mono); font-size: 0.68rem; color: var(--orange); margin-top: 0.15rem; }
.side__badges { margin-top: 0.4rem; }
.side__nav { display: flex; flex-direction: column; gap: 0.25rem; }
.snav { display: flex; align-items: center; gap: 0.65rem; text-align: left; width: 100%; padding: 0.6rem 0.75rem; border: none; background: transparent; cursor: pointer; border-radius: 10px; font-family: var(--body); font-size: 0.92rem; color: var(--brown); transition: background 0.2s ease, color 0.2s ease, transform 0.35s var(--bounce); }
.snav i { font-style: normal; font-size: 0.95rem; width: 1.1rem; text-align: center; color: var(--orange); }
.snav:hover { background: var(--paper); transform: translateX(3px); }
.snav.is-active { background: var(--ink); color: var(--paper); }
.snav.is-active i { color: var(--paper); }
.snav .dot { width: 8px; height: 8px; border-radius: 50%; background: #d33; margin-left: auto; }
.side__logout { width: 100%; text-align: center; margin-top: 0.25rem; }
.dashmain { min-width: 0; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.topbar .eyebrow { display: block; }
.dash__h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin-top: 0.35rem; }
.panel { display: none; }
.panel.is-active { display: block; animation: rise 0.5s var(--bounce); }
.block { padding: 1.5rem; border: 1px solid var(--sand-2); border-radius: 16px; background: color-mix(in srgb, var(--sand) 35%, var(--paper)); }
.block__title { font-family: var(--display); font-weight: 700; font-size: 1.25rem; margin-bottom: 1rem; }
.twocol { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; }

/* avatars + badges */
.avatar { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--paper); font-family: var(--display); font-weight: 800; font-size: 1rem; background-size: cover; background-position: center; overflow: hidden; }
.avatar--sm { width: 34px; height: 34px; font-size: 0.8rem; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar--owner { background: var(--ink); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; vertical-align: middle; }
.badge { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 100px; background: var(--sand); color: var(--brown); white-space: nowrap; }
.badge--employee { background: var(--ink); color: #fff; }
.badge--vip { background: #b8860b; color: #fff; }
.badge--partner { background: #2f6b4f; color: #fff; }
.badge--foundingclient { background: var(--orange); color: #fff; }
.badge--verified { background: #2b5f8a; color: #fff; }
.badge--betatester { background: #6b4a8a; color: #fff; }

/* stat cards */
.cards { display: grid; gap: 1rem; margin-bottom: 1.75rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.statcard { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 0.3rem; padding: 1.25rem; border: 1px solid var(--sand-2); border-radius: 16px; background: var(--paper); transition: transform 0.45s var(--bounce), border-color 0.2s ease, box-shadow 0.3s ease; }
.statcard:hover { transform: translateY(-5px); border-color: var(--orange); box-shadow: 0 16px 30px -22px rgba(35, 22, 15, 0.45); }
.statcard--static { cursor: default; }
.statcard--static:hover { transform: none; border-color: var(--sand-2); box-shadow: none; }
.statcard__k { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brown); }
.statcard__v { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.05; }
.statcard__sub { font-size: 0.8rem; color: var(--brown); }

/* progress ring */
.overview-top { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; margin-bottom: 1.75rem; align-items: stretch; }
.ring-card { position: relative; display: grid; place-items: center; border: 1px solid var(--sand-2); border-radius: 16px; background: color-mix(in srgb, var(--sand) 35%, var(--paper)); padding: 1rem; }
.ring { width: 140px; height: 140px; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: var(--sand-2); stroke-width: 10; }
.ring__fill { fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s var(--smooth); }
.ring__label { position: absolute; text-align: center; }
.ring__label strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em; }
.ring__label span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brown); }

/* feed + quick actions */
.feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.feed li { display: flex; gap: 0.75rem; align-items: flex-start; }
.feed__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); margin-top: 0.45rem; flex: none; }
.feed time { font-family: var(--mono); font-size: 0.68rem; color: var(--brown); }
.feed p { font-size: 0.92rem; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.quickbtn { display: flex; flex-direction: column; gap: 0.15rem; text-align: left; cursor: pointer; padding: 0.9rem 1rem; border: 1px solid var(--sand-2); border-radius: 12px; background: var(--paper); transition: transform 0.4s var(--bounce), border-color 0.2s ease; }
.quickbtn:hover { transform: translateY(-3px); border-color: var(--orange); }
.quickbtn strong { font-family: var(--display); font-size: 0.98rem; }
.quickbtn span { font-size: 0.78rem; color: var(--brown); }

/* status card + progress track */
.statuscard { border: 1px solid var(--sand-2); border-radius: 18px; padding: clamp(1.5rem, 4vw, 2.25rem); background: color-mix(in srgb, var(--sand) 40%, var(--paper)); }
.statuscard__label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brown); margin-bottom: 0.5rem; }
.statuscard__headline { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.02em; }
.statuscard__body { color: var(--brown); margin: 0.75rem 0 1.5rem; max-width: 46ch; }
.statuscard__details { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--sand-2); }
.progress { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.progress__step { display: flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.75rem; color: var(--brown); flex: 1 1 auto; }
.progress__step span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--sand-2); background: var(--paper); transition: transform 0.4s var(--bounce), background 0.25s ease, border-color 0.25s ease; flex: none; }
.progress__step.is-done span { background: var(--orange); border-color: var(--orange); }
.progress__step.is-done { color: var(--ink); }
.progress__step.is-current span { transform: scale(1.4); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 25%, transparent); }
.drow { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; font-size: 0.92rem; }
.drow span { color: var(--brown); font-family: var(--mono); font-size: 0.78rem; }
.drow strong { text-align: right; }

/* analytics chart */
.chart { display: flex; align-items: flex-end; gap: 0.6rem; height: 160px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.4rem; height: 100%; }
.bar span { width: 100%; height: var(--h); min-height: 6px; background: linear-gradient(180deg, var(--orange), var(--rust)); border-radius: 7px 7px 0 0; transition: height 0.8s var(--bounce); }
.bar small { font-family: var(--mono); font-size: 0.68rem; color: var(--brown); }

/* invoices + pills */
.invoices, .orderlist, .tickets { display: flex; flex-direction: column; gap: 0.75rem; }
.invoice, .order, .ticket { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--sand-2); border-radius: 12px; background: var(--paper); }
.invoice strong, .order strong, .ticket strong { font-family: var(--display); display: block; }
.invoice span, .order span, .ticket span { font-family: var(--mono); font-size: 0.72rem; color: var(--brown); }
.invoice__right { display: flex; align-items: center; gap: 0.9rem; }
.invoice__amt { font-family: var(--display); font-weight: 700; color: var(--ink) !important; font-size: 1.05rem; }
.pill { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.28rem 0.6rem; border-radius: 100px; }
.pill--paid, .pill--fulfilled { background: #E4F0DE; color: #3f7f33; }
.pill--due { background: color-mix(in srgb, var(--orange) 18%, var(--paper)); color: var(--rust); }
.pill--upcoming, .pill--new, .pill--open { background: var(--sand); color: var(--brown); }

/* files + documents */
.files { display: flex; flex-direction: column; gap: 0.75rem; }
.file { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--sand-2); border-radius: 12px; background: var(--paper); }
.file__ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--sand); color: var(--orange); }
.file__meta { flex: 1; min-width: 0; }
.file__meta strong { font-family: var(--display); display: block; }
.file__meta span { font-family: var(--mono); font-size: 0.72rem; color: var(--brown); }

/* messages */
.thread { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; max-height: 420px; overflow-y: auto; }
.msg { padding: 0.85rem 1.1rem; border-radius: 14px; max-width: 82%; }
.msg__who { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.msg p { margin: 0.25rem 0; font-size: 0.95rem; }
.msg time { font-family: var(--mono); font-size: 0.64rem; opacity: 0.6; }
.msg--brayden { background: var(--sand); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg--client { background: var(--ink); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.msgform, .ticketform, .blogpost-form { display: flex; flex-direction: column; gap: 0.85rem; }
.msgform textarea, .blogpost-form textarea, .blogpost-form input { width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--sand-2); border-radius: 12px; padding: 0.85rem 1rem; resize: vertical; }
.msgform textarea:focus { outline: none; border-color: var(--orange); }
.msgform .btn, .ticketform .btn, .blogpost-form .btn { align-self: flex-start; border: none; }

/* blog */
.bloglist { display: flex; flex-direction: column; gap: 1rem; }
.blogpost-form { margin-bottom: 1.5rem; padding: 1.25rem; border: 1px solid var(--sand-2); border-radius: 16px; background: color-mix(in srgb, var(--sand) 30%, var(--paper)); }
.post { padding: 1.5rem; border: 1px solid var(--sand-2); border-radius: 16px; background: color-mix(in srgb, var(--sand) 30%, var(--paper)); }
.post__author { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.post__author .avatar { width: 36px; height: 36px; font-size: 0.8rem; }
.post__by { font-family: var(--display); font-weight: 700; line-height: 1.1; }
.post__date { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.4rem; }
.post__title { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; }
.post__body { color: var(--brown); margin-top: 0.6rem; line-height: 1.65; }
.post__foot { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.post__like { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; border: 1.5px solid var(--sand-2); background: var(--paper); border-radius: 100px; padding: 0.35rem 0.85rem; font-family: var(--mono); font-size: 0.78rem; transition: transform 0.35s var(--bounce), border-color 0.2s ease, color 0.2s ease; }
.post__like:hover { transform: translateY(-2px); border-color: var(--orange); }
.post__like.is-liked { background: var(--orange); color: #fff; border-color: var(--orange); }
.post__del { font-family: var(--mono); font-size: 0.72rem; color: var(--brown); background: none; border: none; cursor: pointer; text-decoration: underline; }

/* add-on shop */
.addonshop { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.addonbuy { padding: 1.25rem; border: 1px solid var(--sand-2); border-radius: 14px; background: var(--paper); display: flex; flex-direction: column; gap: 0.4rem; transition: transform 0.45s var(--bounce), border-color 0.2s ease; }
.addonbuy:hover { transform: translateY(-4px); border-color: var(--orange); }
.addonbuy strong { font-family: var(--display); font-size: 1.1rem; }
.addonbuy .price { font-family: var(--mono); color: var(--orange); font-size: 0.85rem; }
.addonbuy p { color: var(--brown); font-size: 0.88rem; flex: 1; }
.addonbuy .btn { border: none; text-align: center; }

/* referral + misc */
.refcode { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.refcode code { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; letter-spacing: 0.05em; background: var(--sand); color: var(--ink); padding: 0.6rem 1.1rem; border-radius: 10px; }
.empty { padding: 1.5rem; border: 1px dashed var(--sand-2); border-radius: 12px; color: var(--brown); font-size: 0.92rem; text-align: center; }
.demo-note { margin-top: 2rem; font-family: var(--mono); font-size: 0.72rem; color: var(--brown); text-align: center; opacity: 0.8; }
.avatarupload { display: flex; align-items: center; gap: 1rem; }
.cd-upload { display: inline-block; cursor: pointer; font-family: var(--mono); font-size: 0.8rem; color: var(--paper); background: var(--orange); padding: 0.6rem 1.1rem; border-radius: 100px; transition: background 0.2s ease, transform 0.4s var(--bounce); }
.cd-upload:hover { background: var(--rust); transform: translateY(-2px); }

/* quotes */
.quotelist { display: flex; flex-direction: column; gap: 0.85rem; }
.quotecard { padding: 1.25rem; border: 1px solid var(--sand-2); border-radius: 14px; background: var(--paper); }
.quotecard--accepted { border-color: #9ec99a; background: color-mix(in srgb, #e4f0de 40%, var(--paper)); }
.quotecard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.quotecard__top strong { font-family: var(--display); font-size: 1.15rem; }
.quotecard__amt { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--ink); letter-spacing: -0.01em; }
.quotecard__desc { color: var(--brown); margin-top: 0.5rem; font-size: 0.94rem; }
.quotecard__foot { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.quotecard__date { font-family: var(--mono); font-size: 0.68rem; color: var(--brown); }

/* ---------------- ADMIN ---------------- */
.addclient { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.5rem; margin-bottom: 1rem; }
.clients-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1.25rem; align-items: start; }
.clientlist { display: flex; flex-direction: column; gap: 0.5rem; }
.clientrow { display: flex; align-items: center; gap: 0.6rem; text-align: left; cursor: pointer; padding: 0.7rem 0.85rem; border: 1px solid var(--sand-2); border-radius: 12px; background: var(--paper); transition: transform 0.35s var(--bounce), border-color 0.2s ease; }
.clientrow:hover { transform: translateX(3px); border-color: var(--orange); }
.clientrow.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.clientrow .avatar { width: 34px; height: 34px; font-size: 0.78rem; }
.clientrow strong { font-family: var(--display); display: block; }
.clientrow small { font-family: var(--mono); font-size: 0.68rem; opacity: 0.75; }
.cd-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; }
.cd-name { font-family: var(--display); font-weight: 700; font-size: 1.4rem; }
.cd-email { font-family: var(--mono); font-size: 0.75rem; color: var(--brown); }
.cd-block { padding: 1.1rem 0; border-top: 1px solid var(--sand-2); }
.cd-danger { border-top-color: color-mix(in srgb, var(--rust) 40%, var(--sand-2)); }
.cd-delete { border: 1.5px solid color-mix(in srgb, var(--rust) 45%, var(--sand-2)); color: var(--rust); }
.cd-delete:hover { background: var(--rust); color: var(--paper); border-color: var(--rust); }
.cd-row { display: flex; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; }
.cd-row .btn { border: none; flex: none; }
.cd-grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.6rem; margin-top: 0.6rem; }
.cd-input, .cd-select { flex: 1; min-width: 0; font-family: var(--body); font-size: 0.95rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--sand-2); border-radius: 10px; padding: 0.6rem 0.8rem; }
.cd-input:focus, .cd-select:focus { outline: none; border-color: var(--orange); }
.cd-thread { max-height: 260px; margin-bottom: 0.6rem; }
.chip--btn span { padding: 0.4rem 0.8rem; }
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.kcol { background: color-mix(in srgb, var(--sand) 40%, var(--paper)); border: 1px solid var(--sand-2); border-radius: 14px; padding: 0.9rem; min-height: 120px; }
.kcol__h { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown); margin-bottom: 0.75rem; display: flex; justify-content: space-between; }
.kcol__h span { color: var(--orange); }
.kcard { display: block; width: 100%; text-align: left; cursor: pointer; margin-bottom: 0.5rem; padding: 0.7rem 0.8rem; background: var(--paper); border: 1px solid var(--sand-2); border-radius: 10px; transition: transform 0.35s var(--bounce), border-color 0.2s ease; }
.kcard:hover { transform: translateY(-3px); border-color: var(--orange); }
.kcard strong { font-family: var(--display); display: block; font-size: 0.95rem; }
.kcard small { font-family: var(--mono); font-size: 0.66rem; color: var(--brown); }
.kempty { color: var(--sand-2); text-align: center; padding: 0.5rem 0; }
.pricingform { display: flex; flex-direction: column; gap: 1.5rem; max-width: 720px; }
.pricing-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.pricing-actions .btn { border: none; }
.pricing-actions .btn--ghost { border: 1.5px solid var(--sand-2); }

/* ---------------- HELP BOT ---------------- */
#kcbot { position: fixed; left: 16px; bottom: 16px; z-index: 60; font-family: var(--body); }
.kcbot__fab { border: none; cursor: pointer; border-radius: 100px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.03em; padding: 0.7rem 1.15rem; box-shadow: 0 10px 25px -12px rgba(35, 22, 15, 0.6); transition: transform 0.4s var(--bounce), background 0.2s ease; }
.kcbot__fab:hover { transform: translateY(-3px); background: var(--orange); }
.kcbot__panel { position: absolute; left: 0; bottom: 56px; width: min(340px, 86vw); background: var(--paper); border: 1px solid var(--sand-2); border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(35, 22, 15, 0.5); overflow: hidden; display: flex; flex-direction: column; }
.kcbot__head { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1rem; background: var(--ink); color: var(--paper); }
.kcbot__head strong { font-family: var(--display); }
.kcbot__head button { background: none; border: none; color: var(--paper); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.kcbot__log { padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; max-height: 320px; overflow-y: auto; }
.kcbot__msg { padding: 0.6rem 0.85rem; border-radius: 12px; font-size: 0.9rem; max-width: 88%; }
.kcbot__msg--bot { background: var(--sand); align-self: flex-start; border-bottom-left-radius: 3px; }
.kcbot__msg--me { background: var(--orange); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.kcbot__msg a { text-decoration: underline; color: inherit; }
.kcbot__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.75rem; }
.kcbot__chips button { cursor: pointer; border: 1.5px solid var(--sand-2); background: var(--paper); border-radius: 100px; padding: 0.35rem 0.7rem; font-family: var(--mono); font-size: 0.7rem; transition: border-color 0.2s ease; }
.kcbot__chips button:hover { border-color: var(--orange); }
.kcbot__form { display: flex; gap: 0.4rem; padding: 0.75rem 1rem 1rem; border-top: 1px solid var(--sand-2); }
.kcbot__form input { flex: 1; min-width: 0; border: 1.5px solid var(--sand-2); border-radius: 100px; padding: 0.55rem 0.9rem; font-family: var(--body); }
.kcbot__form input:focus { outline: none; border-color: var(--orange); }
.kcbot__form button { border: none; background: var(--ink); color: var(--paper); border-radius: 100px; padding: 0.55rem 1rem; cursor: pointer; font-family: var(--mono); font-size: 0.78rem; }

/* ---------------- GRAIN + REVEAL ---------------- */
.grain { position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.045; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.reveal { }
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s var(--smooth), transform 0.8s var(--bounce); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- RESPONSIVE ---------------- */
/* ---------------- MOBILE SAFEGUARDS (apply everywhere) ---------------- */
html { overflow-x: clip; }
body { overflow-x: clip; }
body { max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }
.clientrow small, .cd-email, .side__name, .msg, .post__body, .quotecard__desc, .refcode code { overflow-wrap: anywhere; word-break: break-word; }
.side__nav { scrollbar-width: none; }
.side__nav::-webkit-scrollbar { display: none; }

@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; padding-top: 1.25rem; }
  .side { position: static; }
  .side__nav { flex-direction: row; overflow-x: auto; gap: 0.35rem; padding-bottom: 0.4rem; -webkit-overflow-scrolling: touch; }
  .snav { flex: none; white-space: nowrap; }
  .snav:hover { transform: none; }
  .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .twocol { grid-template-columns: 1fr; }
  .overview-top { grid-template-columns: 1fr; }
  .clients-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .about, .services, .plans, .careplans { grid-template-columns: 1fr; }
  .addons__grid, .kanban { grid-template-columns: repeat(2, 1fr); }
  .addclient, .cd-grid3, .addonshop { grid-template-columns: 1fr; }
  .nav__burger { display: flex; }
  .nav__links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--sand-2); padding: 0.25rem var(--edge) 1rem; display: none; box-shadow: 0 20px 30px -20px rgba(35, 22, 15, 0.35); }
  .nav--open .nav__links { display: flex; }
  .nav__links a { display: block !important; padding: 0.85rem 0; border-bottom: 1px solid var(--sand); }
  .nav__links a.nav__cta { text-align: center; margin-top: 0.75rem; border-bottom: none; }
  #kcbot { left: 12px; bottom: 12px; }
}
@media (max-width: 640px) {
  :root { --edge: 1.15rem; }
  body { font-size: 1rem; }
  .cards--3, .cards--4, .quick, .kanban, .addons__grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr; }
  .contact__foot, .foot { flex-direction: column; align-items: center; text-align: center; }
  .topbar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .topbar .btn { text-align: center; }
  /* rows that pair text + action: let them wrap instead of squishing */
  .invoice, .order, .ticket, .file { flex-wrap: wrap; }
  .invoice__right { width: 100%; justify-content: space-between; }
  .quotecard__foot { flex-wrap: wrap; }
  .quotecard__foot .btn { margin-left: 0 !important; width: 100%; text-align: center; }
  .refcode { flex-direction: column; align-items: stretch; }
  .refcode .btn { width: 100%; text-align: center; }
  .cd-row { flex-direction: column; }
  .cd-row .btn, .cd-row .cd-input, .cd-row .cd-select { width: 100%; }
  .hero .accent { display: none; }
  .plan, .careplan { padding: 1.5rem 1.25rem; }
  .kcbot__panel { width: min(320px, 92vw); }
  .avatarupload { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  .dash__h1 { font-size: 1.6rem; }
  .nav { padding: 0.9rem var(--edge); }
  .btn { padding: 0.8rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero > * { opacity: 1 !important; }
  .hero__underlined::after { transform: scaleX(1); }
}


/* ---------- onboarding checklist + gating ---------- */
.checklist { border: 2px solid var(--orange); background: var(--tint); padding: 1.4rem 1.5rem; margin-bottom: 1.75rem; border-radius: 4px; }
.checklist__head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .4rem; }
.checklist__head h3 { margin: 0; font-size: 1.05rem; }
.checklist__pct { margin-left: auto; font-family: var(--mono, monospace); font-size: .78rem; color: var(--ink-soft, #6b5b4e); }
.checklist__lede { margin: 0 0 1rem; font-size: .92rem; color: var(--ink-soft, #6b5b4e); }
.checklist__bar { height: 6px; background: #eadfd3; border-radius: 3px; overflow: hidden; margin-bottom: 1.1rem; }
.checklist__fill { height: 100%; background: var(--orange); transition: width .5s ease; }
.checkitem { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; border-top: 1px solid #eadfd3; }
.checkitem__ic { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .72rem; border: 2px solid var(--orange); color: var(--orange); }
.checkitem.is-done .checkitem__ic { background: var(--orange); color: #fff; border-color: var(--orange); }
.checkitem__txt { flex: 1; }
.checkitem__txt strong { display: block; font-size: .93rem; }
.checkitem__txt span { font-size: .8rem; color: var(--ink-soft, #6b5b4e); }
.checklist__done { border-color: #2f7d4f; background: color-mix(in srgb, #2f7d4f 10%, var(--paper)); }
.checklist__done .checkitem__ic { border-color: #2f7d4f; color: #2f7d4f; }
.checklist__done .checkitem.is-done .checkitem__ic { background: #2f7d4f; }
.checklist__done .checklist__fill { background: #2f7d4f; }

.snav.is-locked { opacity: .45; }
.snav .lockic { margin-left: auto; font-size: .8rem; }
.lockedpanel { text-align: center; padding: 3rem 1.5rem; border: 2px dashed #e3d5c6; border-radius: 4px; }
.lockedpanel h3 { margin: .6rem 0 .5rem; }
.lockedpanel p { color: var(--ink-soft, #6b5b4e); max-width: 46ch; margin: 0 auto 1.2rem; font-size: .93rem; }

/* ---------- contracts ---------- */
.contract { border: 1px solid var(--sand-2, #e3d5c6); padding: 1.1rem 1.2rem; margin-bottom: .9rem; border-radius: 3px; }
.contract__top { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.contract__top strong { font-size: .98rem; }
.contract__body { max-height: 300px; overflow-y: auto; border: 1px solid var(--sand, #f0e6da); background: var(--surface); padding: 1rem; margin: .9rem 0; font-size: .84rem; line-height: 1.6; white-space: pre-wrap; font-family: var(--mono, monospace); }
.contract__sign { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.contract__sign .field { margin: 0; flex: 1; min-width: 200px; }
.sigline { font-family: "Brush Script MT", cursive; font-size: 1.25rem; }
.req { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 2px; background: var(--orange); color: #fff; }
.req--opt { background: #8a8378; }


/* ---------- onboarding checklist / gating ---------- */
.checklist { border: 2px solid var(--orange); background: var(--tint); padding: 1.4rem 1.5rem; margin-bottom: 1.6rem; border-radius: 4px; }
.checklist__head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .4rem; }
.checklist__head h3 { margin: 0; font-size: 1.05rem; }
.checklist__pct { margin-left: auto; font-family: var(--mono, monospace); font-size: .78rem; color: var(--muted); }
.checklist__lede { margin: 0 0 1rem; font-size: .92rem; color: var(--muted); }
.checklist__bar { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; margin-bottom: 1.1rem; }
.checklist__fill { height: 100%; background: var(--orange); transition: width .5s ease; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.checklist li { display: flex; align-items: center; gap: .7rem; font-size: .92rem; }
.checklist .tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; flex: none; border: 1.5px solid var(--orange); color: var(--orange); }
.checklist li.is-done .tick { background: var(--orange); color: #fff; }
.checklist li.is-done span { color: var(--muted); text-decoration: line-through; }
.checklist .btn { margin-left: auto; padding: .45rem 1rem; font-size: .78rem; }
.snav.is-locked { opacity: .45; }
.snav.is-locked::after { content: " 🔒"; font-size: .7rem; }
.locknote { border: 1px dashed var(--line, #e6ddd3); padding: 2rem 1.5rem; text-align: center; color: var(--muted); border-radius: 4px; }
.locknote strong { display: block; color: var(--ink); margin-bottom: .5rem; font-size: 1rem; }

/* ---------- contract / document signing ---------- */
.doccard { border: 1px solid var(--line, #e6ddd3); padding: 1.2rem; margin-bottom: .9rem; border-radius: 4px; }
.doccard--pending { border-color: var(--orange); }
.doccard__top { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.doccard__top strong { font-size: .98rem; }
.doccard__body { max-height: 260px; overflow-y: auto; border: 1px solid var(--line, #e6ddd3); background: var(--surface); padding: 1rem; font-size: .82rem; line-height: 1.55; white-space: pre-wrap; margin: .8rem 0; border-radius: 3px; }
.signrow { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.signrow input { flex: 1; min-width: 180px; }
.signed-badge { font-size: .78rem; color: #1c7a4a; }

/* admin file board */
.fileclient { border: 1px solid var(--line, #e6ddd3); padding: 1.1rem 1.2rem; margin-bottom: .9rem; border-radius: 4px; }
.fileclient__head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.fileclient__pct { margin-left: auto; font-family: var(--mono, monospace); font-size: .78rem; }
.fileclient__bar { height: 5px; background: var(--track); border-radius: 3px; overflow: hidden; margin: .7rem 0; }
.fileclient__fill { height: 100%; background: var(--orange); }
.fileclient__docs { display: grid; gap: .4rem; margin-top: .6rem; }
.fdoc { display: flex; align-items: center; gap: .6rem; font-size: .85rem; padding: .45rem .6rem; background: var(--surface); border-radius: 3px; }
.fdoc .pill { margin-left: auto; }
.pct-100 { color: #1c7a4a; }

/* invite / two-step login */
.invitenote { border: 1px solid var(--orange); background: var(--tint); color: var(--ink); padding: .85rem 1rem; border-radius: 4px; margin-bottom: 1rem; display: grid; gap: .25rem; }
.invitenote strong { font-size: .95rem; }
.invitenote span { font-size: .85rem; color: var(--muted); }
.teamrow { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; border: 1px solid var(--line, #e6ddd3); border-radius: 3px; margin-bottom: .4rem; font-size: .9rem; }
.teamrow button { margin-left: auto; }

/* =====================================================================
   POLISH & MOTION LAYER
   Refines contrast, depth, and interaction feel. Every animation is
   short, purposeful, and fully disabled under prefers-reduced-motion.
   ===================================================================== */

:root {
  /* softer text tone for long reading — less strain than full-strength ink */
  --ink-soft: #4A3A30;
  --ink-mute: #7A6656;
  --tint: #FFF8F2;      /* soft orange-tinted panel */
  --surface: #FFFDFA;   /* raised inner surface (readers, pads) */
  --track: #F0E2D5;     /* progress bar troughs */
  --band: #23160F;      /* dark contact/CTA band */
  --band-ink: #FAF7F2;  /* text on that band */
  --band-mute: #D9C4B2;
  /* warm, layered elevation (never grey/harsh) */
  --lift-1: 0 1px 2px rgba(35, 22, 15, .04), 0 2px 8px rgba(35, 22, 15, .04);
  --lift-2: 0 2px 6px rgba(35, 22, 15, .06), 0 12px 28px -8px rgba(35, 22, 15, .12);
  --lift-3: 0 4px 12px rgba(35, 22, 15, .08), 0 24px 48px -16px rgba(35, 22, 15, .18);
  --glow: 0 0 0 3px rgba(193, 85, 27, .16);
  --t-fast: .18s var(--smooth);
  --t-base: .32s var(--smooth);
  --t-slow: .6s var(--smooth);
}

/* ---------- reading comfort ---------- */
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
p { color: var(--ink-soft); }
.block__title, h1, h2, h3 { color: var(--ink); }
::selection { background: var(--orange); color: #fff; }

/* gentler scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--sand-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--sand-2); border-radius: 99px; border: 3px solid var(--paper); }
*::-webkit-scrollbar-thumb:hover { background: var(--brown); }

/* consistent, visible focus that isn't ugly */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 3px; }

/* ---------- page entrance ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 100% { background-position: 200% 0; } }
@keyframes drawTick { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }

.js body > header, .js .hero__inner > * { animation: fadeUp .7s var(--smooth) both; }
.js .hero__inner > *:nth-child(1) { animation-delay: .05s; }
.js .hero__inner > *:nth-child(2) { animation-delay: .14s; }
.js .hero__inner > *:nth-child(3) { animation-delay: .23s; }
.js .hero__inner > *:nth-child(4) { animation-delay: .32s; }

/* staggered scroll reveals (index set by JS) */
.js .reveal { transition-delay: calc(var(--i, 0) * 70ms); }

/* thin scroll progress bar */
.scrollbar-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--orange), var(--rust)); z-index: 999; transition: width .1s linear; }

/* ---------- buttons ---------- */
.btn { position: relative; overflow: hidden; transition: transform var(--t-fast), box-shadow var(--t-base), background var(--t-base), color var(--t-base), border-color var(--t-base); will-change: transform; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--lift-2); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: var(--lift-1); transition-duration: .08s; }
.btn--solid::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s var(--smooth);
}
.btn--solid:hover::after { transform: translateX(120%); }
.btn:disabled { transform: none !important; box-shadow: none !important; opacity: .55; }

/* ---------- links ---------- */
.nav__links a { position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: var(--orange); transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-base);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__links a.nav__cta::after { display: none; }

/* ---------- cards & surfaces ---------- */
.card, .block, .statuscard, .careplan, .plan, .addonbuy, .tcard, .post, .quotecard, .doccard, .fileclient, .card-lite {
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.card:hover, .addonbuy:hover, .tcard:hover, .careplan:hover, .quotecard:hover {
  transform: translateY(-3px); box-shadow: var(--lift-2); border-color: var(--sand-2);
}
.careplan--feature:hover { transform: translateY(-5px); box-shadow: var(--lift-3); }

/* ---------- forms ---------- */
.field input, .field textarea, .field select, .cd-input, .cd-select {
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field input:focus, .field textarea:focus, .field select:focus, .cd-input:focus, .cd-select:focus {
  border-color: var(--orange); box-shadow: var(--glow); outline: none;
}
.field input:hover, .cd-input:hover { border-color: var(--sand-2); }

/* status messages slide in */
.cform__status:not(:empty), .authform__msg:not(:empty) { animation: fadeUp .3s var(--smooth) both; }
.cform__status.is-ok::before, .authform__msg.is-ok::before { content: "✓ "; }

/* ---------- dashboard ---------- */
.panel.is-active { animation: fadeUp .38s var(--smooth) both; }
.snav { position: relative; transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.snav:hover { transform: translateX(2px); }
.snav.is-active::before {
  content: ""; position: absolute; left: 0; top: 12%; bottom: 12%; width: 2.5px;
  background: var(--orange); border-radius: 99px; animation: fadeIn .3s var(--smooth) both;
}
.snav.is-locked { pointer-events: auto; }
.snav.is-locked:hover { transform: none; }

/* animated progress fills */
.checklist__fill, .fileclient__fill, .bar span, .progress__step::before {
  transition: width var(--t-slow), height var(--t-slow), background var(--t-base);
}
.checklist { animation: scaleIn .45s var(--smooth) both; }
.checklist li.is-done .tick { animation: scaleIn .35s var(--bounce) both; }

/* ring + counters */
#ringFill { transition: stroke-dashoffset 1.1s var(--smooth); }
.statcard strong, .astat strong, .quick strong { font-variant-numeric: tabular-nums; }

/* skeleton shimmer for loading states */
.skeleton {
  background: linear-gradient(90deg, var(--sand) 25%, #F5EDE3 50%, var(--sand) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 4px; color: transparent !important;
}

/* ---------- lists & rows ---------- */
.clientrow, .invoice, .order, .ticket, .file, .msg, .teamrow, .fdoc {
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.clientrow:hover, .invoice:hover, .order:hover, .ticket:hover, .file:hover, .teamrow:hover, .fdoc:hover {
  background: rgba(236, 226, 214, .45); transform: translateX(2px);
}
.msg { animation: fadeUp .3s var(--smooth) both; }

/* chips / badges */
.chip, .badge, .pill { transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast); }
.chip:hover, .chip--btn:hover { transform: translateY(-1px); }

/* ---------- help bot ---------- */
#kcbot .kcbot__fab { transition: transform var(--t-base), box-shadow var(--t-base); box-shadow: var(--lift-2); }
#kcbot .kcbot__fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--lift-3); }
.kcbot__panel { animation: scaleIn .28s var(--smooth) both; transform-origin: bottom right; }
.kcbot__msg { animation: fadeUp .28s var(--smooth) both; }

/* ---------- misc motion ---------- */
.seal { animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.marquee__track { will-change: transform; }
.avatar { transition: transform var(--t-base), box-shadow var(--t-base); }
.avatar:hover { transform: scale(1.04); box-shadow: var(--lift-2); }
img { transition: opacity var(--t-base); }

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .card:hover, .clientrow:hover { transform: none !important; }
}

/* =====================================================================
   DENSITY PASS — keeps the airy feel but removes dead space, so the
   page reads about 75% content / 25% breathing room instead of half-empty.
   ===================================================================== */

/* sections: tighter vertical rhythm that still scales on big screens */
section, .block { padding-block: clamp(2.75rem, 5.5vw, 4.5rem); }
.hero { padding-block: clamp(3rem, 7vw, 6rem); }
.block__title { margin-bottom: 1.1rem; }
.block__title + p, .care__lede { margin-top: 0; margin-bottom: 1.6rem; }

/* content column: stop lines running edge-to-edge on wide screens */
.about__body p, .page__lede, .hero p, .care__lede { max-width: 62ch; }

/* card grids: closer together, so groups read as a set */
.cards, .cards--3, .cards--4, .services, .plans, .careplans, .addons__grid {
  gap: clamp(.9rem, 1.6vw, 1.4rem);
}
.card, .block { padding: clamp(1.25rem, 2.2vw, 1.9rem); }

/* marquee: continuous band, no dead stretch */
.marquee { padding: 0.55rem 0; }
.marquee__track span::after { margin-left: 2rem; }
.marquee__track span { padding: 0 1rem; }

/* dashboard: denser panels, less scrolling to find things */
.dashboard { gap: clamp(1.1rem, 2vw, 2rem); }
.panel { padding-block: 0; }
.statuscard, .card-lite, .doccard { padding: 1.1rem 1.25rem; }
.cards { margin-bottom: 1.25rem; }

/* forms: tighter fields, easier to scan top to bottom */
.field { margin-bottom: .9rem; }
.chips { gap: .45rem; }
.chip { padding: .5rem .85rem; }

/* footer sits closer to the content it follows */
.foot, .contact__foot { padding-block: clamp(2rem, 4vw, 3rem); }

/* very large screens: cap the column so it never feels stretched thin */
@media (min-width: 1500px) { :root { --maxw: 1240px; } }

/* ---------- testimonials: honest empty state + star ratings ---------- */
.tstmn--empty { display: grid; place-items: center; }
.tcard--soon { grid-column: 1 / -1; max-width: 520px; text-align: center; display: grid; justify-items: center; gap: .5rem; padding: clamp(1.8rem, 4vw, 2.6rem); border: 1px dashed var(--sand-2); background: transparent; }
.tcard__soon { font-family: var(--display); font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin: 0; color: var(--ink); }
.tcard__soonsub { margin: 0 0 .5rem; font-size: .92rem; color: var(--muted); max-width: 42ch; }
.tcard__stars { color: var(--orange); letter-spacing: .12em; font-size: .9rem; display: block; margin-bottom: .35rem; }

/* =====================================================================
   HOMEPAGE: process, why-me, FAQ, closing CTA
   ===================================================================== */

/* ---- process steps ---- */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.6rem); counter-reset: step; }
.step { position: relative; padding: 1.6rem 1.3rem 1.5rem; background: var(--paper); border: 1px solid var(--sand-2); border-radius: 4px; overflow: hidden; }
.step::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--orange); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--smooth); }
.step.is-visible::before { transform: scaleY(1); }
.step:nth-child(2)::before { transition-delay: .1s; } .step:nth-child(3)::before { transition-delay: .2s; } .step:nth-child(4)::before { transition-delay: .3s; }
.step__n { display: block; font-family: var(--mono, monospace); font-size: .72rem; letter-spacing: .16em; color: var(--orange); margin-bottom: .7rem; }
.step h3 { font-size: 1.02rem; margin: 0 0 .45rem; line-height: 1.25; }
.step p { margin: 0; font-size: .9rem; }
.step:hover { transform: translateY(-4px); box-shadow: var(--lift-2); }

/* ---- why-me cards ---- */
.why__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.9rem, 1.8vw, 1.5rem); margin-top: 2rem; }
.why__card { padding: 1.5rem 1.4rem; border: 1px solid var(--sand-2); border-radius: 4px; background: var(--paper); }
.why__ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--sand); color: var(--orange); font-size: 1rem; margin-bottom: .9rem; transition: transform .4s var(--bounce), background .3s; }
.why__card:hover .why__ic { transform: rotate(-8deg) scale(1.08); background: var(--orange); color: #fff; }
.why__card h3 { font-size: 1.02rem; margin: 0 0 .45rem; }
.why__card p { margin: 0; font-size: .92rem; }
.why__card:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }

/* ---- FAQ accordion ---- */
.faq { margin-top: 2rem; border-top: 1px solid var(--sand-2); }
.faq__item { border-bottom: 1px solid var(--sand-2); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--display); font-size: clamp(1rem, 1.8vw, 1.12rem); color: var(--ink);
  transition: color .2s var(--smooth); user-select: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--orange); }
.faq__x { position: absolute; right: .3rem; top: 50%; width: 14px; height: 14px; margin-top: -7px; }
.faq__x::before, .faq__x::after { content: ""; position: absolute; background: var(--orange); border-radius: 2px; transition: transform .3s var(--smooth), opacity .3s; }
.faq__x::before { left: 0; top: 6px; width: 14px; height: 2px; }
.faq__x::after { left: 6px; top: 0; width: 2px; height: 14px; }
.faq__item[open] .faq__x::after { transform: rotate(90deg); opacity: 0; }
.faq__item[open] summary { color: var(--orange); }
.faq__item p { margin: 0 0 1.25rem; font-size: .94rem; max-width: 68ch; animation: fadeUp .35s var(--smooth) both; }

/* ---- closing CTA ---- */
.cta { background: var(--band); color: var(--band-ink); text-align: center; padding-block: clamp(3.5rem, 8vw, 6rem); position: relative; overflow: hidden; }
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.cta::before { width: 340px; height: 340px; background: radial-gradient(circle, rgba(193,85,27,.30), transparent 70%); top: -140px; right: -90px; }
.cta::after { width: 300px; height: 300px; background: radial-gradient(circle, rgba(193,85,27,.20), transparent 70%); bottom: -150px; left: -80px; }
.cta__inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding-inline: var(--edge, 1.25rem); }
.cta .section__eyebrow { color: var(--orange); }
.cta__title { font-family: var(--display); font-size: clamp(1.7rem, 4.6vw, 2.9rem); line-height: 1.08; margin: .6rem 0 1rem; color: var(--band-ink); }
.cta__lede { color: rgba(250,247,242,.78); margin: 0 auto 1.9rem; max-width: 52ch; }
.cta__row { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.cta .btn--ghost { color: var(--paper); border-color: rgba(250,247,242,.4); }
.cta .btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta__note { margin: 1.6rem 0 0; font-size: .82rem; color: rgba(250,247,242,.5); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .steps, .why__grid { grid-template-columns: 1fr; }
  .cta__row .btn { width: 100%; }
}

/* ---------- referral card with anti-forgery ribbon ---------- */
.refcard { position: relative; border: 1px solid var(--sand-2); border-radius: 6px; padding: 1.5rem 1.4rem; background: var(--paper); overflow: hidden; text-align: center; }
.refcard__label { font-family: var(--mono, monospace); font-size: .65rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; }
.refcard .refcode { justify-content: center; }
.refcard code { font-size: clamp(1.1rem, 3vw, 1.5rem); letter-spacing: .1em; }
.refcard__timer { font-family: var(--mono, monospace); font-size: .72rem; color: var(--muted); margin: .9rem 0 0; }
.refcard__timer strong { color: var(--orange); }
.refcard__ribbon { position: absolute; left: 0; right: 0; height: 8px; overflow: hidden; background: var(--ink); }
.refcard__ribbon { top: 0; } .refcard__ribbon--b { top: auto; bottom: 0; }
.refcard__ribbon span {
  position: absolute; inset: 0; width: 200%;
  background: repeating-linear-gradient(45deg, var(--orange) 0 12px, var(--ink) 12px 24px);
  animation: ribbonslide 1.4s linear infinite;
}
.refcard__ribbon--b span { animation-direction: reverse; }
@keyframes ribbonslide { to { transform: translateX(-24px); } }

/* ---------- in-dashboard document viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 200; background: rgba(35,22,15,.62); backdrop-filter: blur(4px); display: grid; place-items: center; padding: clamp(.6rem, 2.5vw, 2rem); animation: fadeIn .22s var(--smooth) both; }
.viewer__inner { background: var(--paper); border-radius: 6px; width: min(920px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: var(--lift-3); animation: scaleIn .28s var(--smooth) both; }
.viewer__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .6rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--sand-2); background: var(--paper); }
.viewer__bar strong { font-size: .98rem; margin-right: auto; }
.viewer__bar .btn { padding: .5rem .9rem; font-size: .78rem; }
.viewer__frame { width: 100%; height: min(66vh, 620px); border: 0; display: block; background: var(--sand); }
.viewer__img { padding: 1rem; background: var(--sand); text-align: center; }
.viewer__img img { max-height: 66vh; width: auto; margin: 0 auto; border-radius: 3px; }
.viewer__pad { padding: 2rem 1.4rem; text-align: center; }
.viewer__sign { border-top: 2px solid var(--orange); background: var(--tint); padding: 1.2rem 1.3rem; }
.viewer__signnote { font-size: .86rem; color: var(--muted); margin: .2rem 0 .9rem; }

/* ---------- "needs signature" alert ---------- */
.docalert { display: flex; align-items: center; gap: .9rem; border: 1px solid var(--orange); background: var(--tint); border-radius: 5px; padding: 1rem 1.15rem; margin-bottom: 1.3rem; animation: fadeUp .4s var(--smooth) both; }
.docalert__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; flex: none; }
.docalert div { display: grid; gap: .15rem; }
.docalert strong { font-size: .95rem; }
.docalert span { font-size: .84rem; color: var(--muted); }
.docalert .btn { margin-left: auto; padding: .55rem 1rem; font-size: .8rem; white-space: nowrap; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); vertical-align: middle; margin-left: .3rem; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* ---------- page + view transitions ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes slideOutLeft { to { opacity: 0; transform: translateX(-24px); } }
.js .authwrap, .js #authView { animation: viewIn .45s var(--smooth) both; }
.authwrap.is-leaving, #authView.is-leaving { animation: slideOutLeft .32s var(--smooth) both; }
#dashView:not([hidden]), #adminPanel:not([hidden]) { animation: viewIn .5s var(--smooth) both; }
main { animation: fadeIn .35s var(--smooth) both; }

/* ---------- public blog ---------- */
.bloglayout { display: grid; grid-template-columns: 1fr 300px; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.blogside { position: sticky; top: 100px; }
.bloglist { display: grid; gap: 1rem; }
.blogcard { border: 1px solid var(--sand-2); border-radius: 5px; padding: 1.5rem 1.4rem; background: var(--paper); transition: transform var(--t-base), box-shadow var(--t-base); }
.blogcard:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }
.blogcard__date { font-family: var(--mono, monospace); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin: 0 0 .5rem; }
.blogcard__title { font-size: clamp(1.1rem, 2.2vw, 1.4rem); margin: 0 0 .6rem; }
.blogcard__body { margin: 0; font-size: .93rem; }
@media (max-width: 860px) { .bloglayout { grid-template-columns: 1fr; } .blogside { position: static; } }

/* ---------- signature pad ---------- */
.viewer__inner { width: min(1040px, 100%); }
.viewer__frame { height: min(70vh, 700px); }
.sigmode { margin: .4rem 0 1rem; }
.sigpad { position: relative; height: 170px; border: 1px solid var(--sand-2); border-radius: 5px; background: var(--surface); overflow: hidden; touch-action: none; cursor: crosshair; }
.sigpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sigpad__line { position: absolute; left: 8%; right: 8%; bottom: 42px; border-bottom: 1px dashed var(--sand-2); pointer-events: none; }
.sigpad__hint { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-size: .78rem; color: var(--muted); pointer-events: none; transition: opacity .25s; }
.sigpad.has-ink .sigpad__hint, .sigpad.has-ink .sigpad__line { opacity: 0; }
.sigpreview { min-height: 2.4rem; margin: .3rem 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-style: italic; color: var(--ink); border-bottom: 1px solid var(--sand-2); padding-bottom: .3rem; }
.sigpreview:empty { border-bottom-color: transparent; }
.sigmeta { border: 1px solid var(--sand-2); border-radius: 5px; padding: .8rem 1rem; margin: 1rem 0; background: var(--paper); }
.sigconsent { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--ink-soft); margin-bottom: 1rem; cursor: pointer; }
.sigconsent input { margin-top: .25rem; flex: none; width: 17px; height: 17px; accent-color: var(--orange); }
#viewerSign:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- admin: send document + signature records ---------- */
.senddoc { border: 1px solid var(--sand-2); border-radius: 6px; padding: 1.3rem; background: var(--paper); }
.adoc { border: 1px solid var(--sand-2); border-left-width: 3px; border-radius: 5px; padding: 1.1rem 1.2rem; margin-bottom: .8rem; background: var(--paper); transition: transform var(--t-base), box-shadow var(--t-base); }
.adoc:hover { transform: translateY(-2px); box-shadow: var(--lift-2); }
.adoc--await { border-left-color: var(--orange); }
.adoc--signed { border-left-color: #1c7a4a; }
.adoc__top { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .3rem; }
.adoc__top strong { font-size: .98rem; margin-right: auto; }
.adoc__sig { border-top: 1px solid var(--sand-2); margin-top: .8rem; padding-top: .8rem; }
.adoc__sigimg { max-width: 260px; max-height: 90px; border-bottom: 1px solid var(--ink); margin: .3rem 0 .7rem; }
.adoc__typed { font-family: Georgia, serif; font-style: italic; font-size: 1.5rem; border-bottom: 1px solid var(--ink); display: inline-block; margin: .3rem 0 .7rem; padding-bottom: .2rem; }
@media (max-width: 600px) { .sigpad { height: 150px; } .viewer__frame { height: 58vh; } }

/* =====================================================================
   THEMES — Kemp (default warm), Light (clean white), Dark (low-light)
   Everything is driven by the same variables, so all three stay coherent.
   ===================================================================== */

/* ---- LIGHT: crisp white, minimal warmth ---- */
html[data-theme="light"] {
  --paper: #FFFFFF; --ink: #16130F; --brown: #6B6560;
  --sand: #F3F2F0; --sand-2: #E4E2DE; --orange: #B8501C; --rust: #8E3A10;
  --ink-soft: #3D3A36; --ink-mute: #6E6862;
  --lift-1: 0 1px 2px rgba(20,18,15,.05), 0 2px 8px rgba(20,18,15,.04);
  --lift-2: 0 2px 6px rgba(20,18,15,.07), 0 12px 28px -8px rgba(20,18,15,.10);
  --lift-3: 0 4px 12px rgba(20,18,15,.09), 0 24px 48px -16px rgba(20,18,15,.16);
  --glow: 0 0 0 3px rgba(184,80,28,.15);
  --tint: #FBF4EF; --surface: #FAFAF9; --track: #E8E6E2;
  --band: #16130F; --band-ink: #FFFFFF; --band-mute: #C9C4BE;
}

/* ---- DARK: warm charcoal, easy at night ---- */
html[data-theme="dark"] {
  --paper: #17130F; --ink: #F2EBE3; --brown: #B9A896;
  --sand: #221C17; --sand-2: #33291F; --orange: #E4762F; --rust: #C1551B;
  --ink-soft: #D6CBBE; --ink-mute: #A2917F;
  --lift-1: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  --lift-2: 0 2px 6px rgba(0,0,0,.45), 0 12px 28px -8px rgba(0,0,0,.5);
  --lift-3: 0 4px 12px rgba(0,0,0,.5), 0 24px 48px -16px rgba(0,0,0,.6);
  --glow: 0 0 0 3px rgba(228,118,47,.25);
  --tint: #241A12; --surface: #1E1810; --track: #33291F;
  --band: #0F0C09; --band-ink: #F2EBE3; --band-mute: #A2917F;
}

/* ---- dark mode: correct the places that assume a light background ---- */
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"] .hdr { background: rgba(23,19,15,.88); }
html[data-theme="dark"] .table tr:hover td { background: var(--surface); }
html[data-theme="dark"] .clientrow:hover,
html[data-theme="dark"] .invoice:hover,
html[data-theme="dark"] .order:hover,
html[data-theme="dark"] .ticket:hover,
html[data-theme="dark"] .file:hover,
html[data-theme="dark"] .teamrow:hover { background: rgba(51,41,31,.5); }
html[data-theme="dark"] .ph { background: repeating-linear-gradient(45deg,#221c17,#221c17 12px,#2a231c 12px,#2a231c 24px); }
html[data-theme="dark"] .viewer { background: rgba(0,0,0,.72); }
html[data-theme="dark"] img:not([src^="data:"]) { filter: brightness(.94); }
html[data-theme="dark"] .grain { opacity: .25; }

/* ---- the flip tab ---- */
.themetab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 150; display: flex; align-items: center; }
.themetab__grip {
  background: var(--ink); color: var(--paper); border: 0; border-radius: 6px 0 0 6px;
  padding: .85rem .5rem; writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: var(--lift-2); transition: background var(--t-base), padding var(--t-base);
}
.themetab__grip:hover { background: var(--orange); padding-inline: .65rem; }
.themetab__panel {
  background: var(--paper); border: 1px solid var(--sand-2); border-right: 0; border-radius: 6px 0 0 6px;
  box-shadow: var(--lift-3); padding: .9rem; width: 0; opacity: 0; overflow: hidden; visibility: hidden;
  transition: width var(--t-base), opacity var(--t-base), padding var(--t-base);
}
.themetab.is-open .themetab__panel { width: 186px; opacity: 1; visibility: visible; }
.themetab.is-open .themetab__grip { background: var(--orange); }
.themetab__title { font-family: var(--mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 .6rem; white-space: nowrap; }
.themeopt {
  display: flex; align-items: center; gap: .6rem; width: 100%; background: none;
  border: 1px solid var(--sand-2); border-radius: 4px; padding: .55rem .6rem; margin-bottom: .4rem;
  font-size: .82rem; color: var(--ink); white-space: nowrap; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.themeopt:hover { border-color: var(--orange); transform: translateX(-2px); }
.themeopt.is-on { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 10%, transparent); }
.themeopt__sw { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.15); }
.sw--kemp { background: linear-gradient(135deg,#FAF7F2 50%, #C1551B 50%); }
.sw--light { background: linear-gradient(135deg,#FFFFFF 50%, #B8501C 50%); }
.sw--dark { background: linear-gradient(135deg,#17130F 50%, #E4762F 50%); }
.themeopt.is-on .themeopt__sw { box-shadow: 0 0 0 2px var(--orange); }
@media (max-width: 600px) { .themetab { top: auto; bottom: 92px; } .themetab.is-open .themetab__panel { width: 168px; } }

/* ---------- confirmation modal (theme-aware) ---------- */
.kcmodal { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 1.2rem;
  background: rgba(35,22,15,.55); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: .25s var(--smooth); }
.kcmodal.is-on { opacity: 1; visibility: visible; }
.kcmodal__card { background: var(--paper); color: var(--ink); border: 1px solid var(--sand-2); border-top: 3px solid var(--orange);
  border-radius: 8px; box-shadow: var(--lift-3); max-width: 430px; width: 100%; padding: 2rem 1.7rem; text-align: center; animation: scaleIn .3s var(--smooth) both; }
.kcmodal__ic { width: 48px; height: 48px; margin: 0 auto .9rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--tint); color: var(--orange); font-size: 1.3rem; border: 1px solid var(--orange); }
.kcmodal__card h2 { margin: 0 0 .5rem; font-size: 1.35rem; }
.kcmodal__card p { margin: 0 0 .9rem; font-size: .92rem; color: var(--ink-soft); }
.kcmodal__wait { display: flex; align-items: center; justify-content: center; gap: .55rem; font-family: var(--mono, monospace);
  font-size: .78rem; color: var(--orange) !important; background: var(--tint); border-radius: 4px; padding: .65rem; }
.kcmodal__spin { width: 13px; height: 13px; border: 2px solid var(--orange); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.kcmodal__small { font-size: .78rem !important; color: var(--ink-mute) !important; }
.kcmodal__row { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; }
.kcmodal__row .btn { flex: 1; padding: .6rem .8rem; font-size: .8rem; }
html[data-theme="dark"] .kcmodal { background: rgba(0,0,0,.7); }

/* ---------- top nav typeface ---------- */
.nav__links a { font-family: var(--mono, ui-monospace, monospace); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.nav__links a.nav__cta { font-family: var(--body); letter-spacing: .04em; text-transform: none; font-weight: 600; font-size: .88rem; }
@media (max-width: 820px) { .nav__links a { font-size: .82rem; letter-spacing: .06em; } }

/* =====================================================================
   RESPONSIVE PASS — phone, tablet, desktop
   Goal: no sideways scrolling at any width, comfortable tap targets,
   and nothing clipped or squashed.
   ===================================================================== */

/* --- nothing may exceed the viewport, ever --- */
*, *::before, *::after { min-width: 0; }
img, svg, video, canvas, iframe, table, pre { max-width: 100%; }
/* long unbroken strings (emails, codes, URLs, SQL) wrap instead of pushing wide */
p, li, td, th, dd, dt, h1, h2, h3, h4, code, pre, blockquote, .cd-email, .drow,
.statuscard__body, .doccard__body, .contract__body, .msg, .blogcard__body,
.adoc__top strong, .fileclient__head, .teamrow, .kcmodal__card p {
  overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
}
pre, .contract__body, .doccard__body { white-space: pre-wrap; }
/* any wide block scrolls inside itself rather than stretching the page */
.tablewrap, .table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- TABLET (iPad portrait and similar) --- */
@media (max-width: 1024px) {
  .dashboard { grid-template-columns: 1fr; }
  .clients-layout, .overview-top, .bloglayout { grid-template-columns: 1fr; }
  .blogside { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- LARGE PHONE / SMALL TABLET --- */
@media (max-width: 820px) {
  :root { --edge: 1.15rem; }
  .hero__title, .contact__title { font-size: clamp(2rem, 9vw, 3rem); }
  .cta__title { font-size: clamp(1.5rem, 7vw, 2.2rem); }
  .seal { display: none; }
  /* sidebar becomes a swipeable tab strip */
  .side { position: static; }
  .side__nav { display: flex; flex-direction: row; overflow-x: auto; gap: .35rem; padding-bottom: .45rem; scrollbar-width: none; }
  .side__nav::-webkit-scrollbar { display: none; }
  .snav { flex: none; white-space: nowrap; }
  .snav:hover { transform: none; }
  .snav.is-active::before { inset: auto 0 0 0; width: auto; height: 2.5px; }
}

/* --- PHONE --- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .steps, .why__grid, .cards, .cards--3, .cards--4, .services, .plans,
  .careplans, .addons__grid, .grid2, .cd-grid3, .about__stats, .quick, .kanban { grid-template-columns: 1fr !important; }

  /* rows that pair text with a button stack instead of squashing */
  .invoice, .order, .ticket, .file, .fdoc, .teamrow, .adoc__top,
  .quotecard__foot, .docalert, .refcode, .cd-row, .signrow, .arow { flex-wrap: wrap; }
  .invoice__right, .docalert .btn, .quotecard__foot .btn { width: 100%; margin-left: 0 !important; }
  .cd-row > *, .signrow > *, .cd-row .btn, .signrow .btn { width: 100%; min-width: 0; }
  .contract__sign .field, .signrow input { min-width: 0; }

  /* comfortable touch targets */
  .btn, .snav, .filters button, .chip, .themeopt, .abtn { min-height: 44px; }
  .btn { padding: .8rem 1.2rem; }
  .iconbtn, .qty button { min-width: 40px; min-height: 40px; }

  /* readable headings, no giant type */
  h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .page__title, .dash__h1 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .ring { width: 116px; height: 116px; }
  .refcard code { font-size: 1.05rem; }

  /* full-width sheets and viewers on a small screen */
  .viewer { padding: 0; }
  .viewer__inner { max-height: 100vh; height: 100%; border-radius: 0; }
  .viewer__frame { height: 52vh; }
  .sheet { width: 100%; }
  .kcmodal__card { padding: 1.6rem 1.2rem; }
  .kcmodal__row { flex-direction: column; }

  /* the two floating controls must not collide or cover content */
  #kcbot { left: 12px; bottom: 12px; }
  .kcbot__panel { width: min(310px, calc(100vw - 24px)); }
  .themetab { top: auto; bottom: 76px; }
  .themetab__grip { writing-mode: horizontal-tb; border-radius: 6px 0 0 6px; padding: .7rem .8rem; }
  .themetab.is-open .themetab__panel { width: min(180px, calc(100vw - 90px)); }

  /* footer + contact tidy up */
  .contact__actions { flex-direction: column; }
  .contact__actions .btn { width: 100%; }
  .contact__foot, .foot { flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
  .cta__row .btn { width: 100%; }

  /* forms */
  .field input, .field textarea, .field select, .cd-input, .cd-select { font-size: 16px; } /* stops iOS zooming on focus */
  .subrow { flex-direction: column; }
  .subrow input, .subrow button { width: 100%; }
  .subrow input { border-right: 1px solid var(--ink); }
}

/* --- SMALL PHONE --- */
@media (max-width: 380px) {
  :root { --edge: .9rem; }
  .brand, .nav__brand { font-size: 1.05rem; }
  .btn { font-size: .82rem; padding: .75rem 1rem; }
  .refcard code { font-size: .95rem; letter-spacing: .02em; }
  .sigpad { height: 130px; }
}

/* --- landscape phones: don't let tall blocks eat the screen --- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: auto; padding-block: 2.5rem; }
  .viewer__frame { height: 68vh; }
}

/* ---------- first-login password screen ---------- */
.firstrun { max-width: 420px; margin: 0 auto; text-align: center; border: 1px solid var(--sand-2); border-top: 3px solid var(--orange);
  border-radius: 8px; padding: 2rem 1.7rem; background: var(--paper); box-shadow: var(--lift-2); animation: scaleIn .35s var(--smooth) both; }
.firstrun__ic { width: 50px; height: 50px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--tint); border: 1px solid var(--orange); font-size: 1.3rem; }
.firstrun h2 { margin: 0 0 .5rem; font-size: 1.35rem; }
.firstrun p { margin: 0 0 1.3rem; font-size: .92rem; color: var(--ink-soft); }
.firstrun .field { text-align: left; }
.firstrun .btn { width: 100%; margin-top: .3rem; }
#addClientStatus { display: block; margin-top: .7rem; line-height: 1.5; }

/* ---------- branded welcome after first-time setup ---------- */
.welcomeover { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; text-align: center;
  background: var(--band); color: var(--band-ink); opacity: 0; transition: opacity .45s var(--smooth); padding: 2rem 1.2rem; }
.welcomeover.is-on { opacity: 1; }
.welcomeover__inner { animation: fadeUp .7s var(--smooth) .12s both; }
.welcomeover__eyebrow { font-family: var(--mono, monospace); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); margin: 0 0 1rem; }
/* same display face as the wordmark in the header */
.welcomeover__brand { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 8vw, 4.2rem);
  line-height: 1.02; letter-spacing: -.03em; margin: 0; color: var(--band-ink); }
.welcomeover__brand span { display: inline-block; margin-top: .1em; }
.welcomeover__brand em { font-style: normal; color: var(--orange); }
.welcomeover__sub { color: var(--band-mute); margin: 1rem 0 1.9rem; font-size: 1rem; }
.welcomeover .btn { min-width: 220px; }
