/* Touchstone Life Care: self-service app (demo) */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-text="1"] { font-size: 112.5%; }
html[data-text="2"] { font-size: 125%; }
body {
  margin: 0; min-height: 100dvh; background: var(--stone-50); color: var(--slate);
  font: 400 1.125rem/1.55 var(--font-body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); color: var(--forest); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem); font-weight: 600; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--teal); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 8px; }
.muted { color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--slate); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; }
.grow { flex: 1; }
@media (prefers-reduced-motion: no-preference) {
  .view { animation: rise .35s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- Demo strip ---------- */
.demo-strip {
  background: var(--forest-900); color: #cfe3df; font-size: .8rem; text-align: center;
  padding: .35rem 1rem; letter-spacing: .01em;
}
.demo-strip b { color: #fff; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: var(--tap); padding: .75rem 1.5rem; border-radius: var(--r-pill); border: 2px solid transparent;
  font: 600 1.1rem/1.2 var(--font-head); text-decoration: none; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: 0 6px 16px -6px rgba(6,77,69,.6); }
.btn-primary:hover { background: var(--forest-700); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line); }
.btn-ghost:hover { background: var(--teal-50); }
.btn-clay { background: var(--clay); color: #fff; }
.btn-link { background: none; border: 0; color: var(--teal); font: 500 1.05rem var(--font-body); min-height: 48px; padding: .5rem .75rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: var(--forest);
  display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--teal-50); }

/* ---------- Form ---------- */
.field { display: block; }
.field > span { display: block; font-weight: 500; color: var(--forest); margin-bottom: .4rem; }
.input {
  width: 100%; min-height: var(--tap); padding: .8rem 1rem; border: 2px solid var(--line); border-radius: var(--r);
  background: #fff; font-size: 1.15rem; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-100); }
.input-wrap { position: relative; }
.input-wrap .icon-btn { position: absolute; right: 4px; top: 4px; }
.hint { font-size: .95rem; color: var(--muted); margin-top: .4rem; display: flex; gap: .4rem; align-items: center; }
.error { color: var(--danger); }
.ok { color: var(--ok); }

/* ---------- Auth / onboarding split ---------- */
.split { min-height: calc(100dvh - 28px); display: grid; }
.split-art { display: none; }
.split-main { display: flex; flex-direction: column; padding: 1.25rem 1.25rem 2rem; max-width: 560px; width: 100%; margin: 0 auto; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(380px, 46%) 1fr; }
  .split-art {
    display: flex; flex-direction: column; justify-content: space-between; background: var(--forest); color: #d6e8e4;
    padding: 3rem; position: relative; overflow: hidden;
  }
  .split-art h2 { color: #fff; font-size: 2rem; max-width: 14ch; }
  .split-art .art-logo { width: 190px; }
  .split-art .art-photo { width: min(420px, 90%); align-self: center; margin: 2rem 0; }
  .split-main { justify-content: center; padding: 3rem; }
}
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin-bottom: .5rem; }
.logo { height: 44px; width: auto; }

/* ---------- Intro carousel ---------- */
.intro { text-align: center; display: flex; flex-direction: column; flex: 1; }
.slide-visual { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: .5rem auto 1.5rem; }
.stone-mask {
  width: 100%; height: 100%; object-fit: cover; background: var(--mist);
  border-radius: 46% 54% 52% 48% / 58% 50% 50% 42%;
  box-shadow: var(--shadow);
}
.slide-badge {
  position: absolute; right: -2px; bottom: 8%; width: 84px; height: 84px; border-radius: 50%;
  background: var(--clay); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); border: 5px solid #fff;
}
.slide-badge .ic { width: 38px; height: 38px; }
.slide-chip {
  position: absolute; left: -6px; top: 12%; background: #fff; border-radius: var(--r-pill); padding: .5rem .9rem;
  font-size: .9rem; font-weight: 500; color: var(--forest); box-shadow: var(--shadow); display: flex; gap: .4rem; align-items: center;
}
.slide-chip .ic { color: var(--ok); }
.intro h1 { margin-bottom: .5rem; }
.intro p { color: var(--muted); font-size: 1.15rem; max-width: 26ch; margin: 0 auto 1.5rem; }
.dots { display: flex; gap: .5rem; justify-content: center; margin: auto 0 1.25rem; padding-top: 1rem; }
.dots button { width: 12px; height: 12px; border-radius: 99px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
.dots button[aria-current="true"] { width: 32px; background: var(--forest); }

/* ---------- Trust logos ---------- */
.trust { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); text-align: center; }
.trust small { display: block; color: var(--muted); font-size: .85rem; margin-bottom: .75rem; letter-spacing: .02em; }
.trust-logos { display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.trust-logos .logo-card { background: #fff; border-radius: var(--r-sm); padding: .5rem .75rem; box-shadow: var(--shadow-sm); display: grid; place-items: center; height: 72px; }
.trust-logos img { max-height: 54px; width: auto; }

/* ---------- Steps header (onboarding) ---------- */
.steps { display: flex; gap: .4rem; margin: .25rem 0 1.5rem; }
.steps span { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.steps span.done { background: var(--teal); }
.steps span.now { background: var(--forest); }
.step-icon {
  width: 72px; height: 72px; border-radius: 22px; background: var(--teal-50); color: var(--forest);
  display: grid; place-items: center; margin-bottom: 1rem;
}
.step-icon .ic { width: 36px; height: 36px; }
.footer-actions { margin-top: auto; padding-top: 1.5rem; display: grid; gap: .5rem; }

/* State tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 560px) { .tiles.four { grid-template-columns: repeat(4, 1fr); } }
.tile {
  border: 2px solid var(--line); background: #fff; border-radius: var(--r); padding: 1rem .75rem; text-align: center; cursor: pointer;
  min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; transition: border-color .15s, background .15s;
}
.tile b { font: 700 1.5rem var(--font-head); color: var(--forest); }
.tile small { font-size: .85rem; color: var(--muted); line-height: 1.2; }
.tile[aria-pressed="true"] { border-color: var(--forest); background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--forest); }

.form-chip {
  display: flex; gap: .75rem; align-items: center; background: var(--clay-100); border-radius: var(--r); padding: .9rem 1rem; margin-top: 1rem; color: #6d4a31;
}

/* Verify card */
.verify-card { background: #fff; border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.verify-logo { height: 64px; width: auto; margin-bottom: 1rem; }
.success {
  display: flex; gap: .9rem; align-items: center; background: #e7f4ec; color: var(--ok); border-radius: var(--r); padding: 1rem; font-weight: 500;
}
.success .ic { width: 32px; height: 32px; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.choice-cards { display: grid; gap: .75rem; }

/* ---------- App shell ---------- */
.shell { min-height: calc(100dvh - 28px); }
.app-header {
  position: sticky; top: 0; z-index: 20; background: rgba(247,245,243,.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-bottom: 1px solid var(--line);
}
.app-header .logo { height: 38px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--clay); color: #fff; display: grid; place-items: center;
  font: 600 1rem var(--font-head); border: 0; cursor: pointer; flex: none;
}
.avatar.sm { width: 40px; height: 40px; font-size: .95rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.text-size { border: 2px solid var(--line); background: #fff; border-radius: var(--r-pill); min-height: 44px; padding: 0 .9rem; font: 600 1rem var(--font-head); color: var(--forest); cursor: pointer; }
.main { padding: 1.25rem 1rem 7rem; max-width: 820px; margin: 0 auto; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(6,77,69,.06);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: .15rem; min-height: 60px; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 500; border-radius: 14px;
}
.bottom-nav a .ic { width: 26px; height: 26px; }
.bottom-nav a[aria-current="page"] { color: var(--forest); }
.bottom-nav a[aria-current="page"] .ic { background: var(--teal-100); border-radius: 99px; padding: 3px 14px; width: 54px; box-sizing: content-box; height: 22px; }

.sidebar { display: none; }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 272px 1fr; }
  .bottom-nav { display: none; }
  .app-header .logo, .app-header .home-mark { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: .25rem; position: sticky; top: 0; height: calc(100dvh - 28px); padding: 1.5rem 1rem;
    background: #fff; border-right: 1px solid var(--line);
  }
  .sidebar .logo { height: 54px; margin: 0 .5rem 1.5rem; align-self: flex-start; }
  .sidebar a {
    display: flex; gap: .85rem; align-items: center; min-height: 52px; padding: 0 1rem; border-radius: 14px; color: var(--slate);
    text-decoration: none; font-weight: 500;
  }
  .sidebar a:hover { background: var(--stone-50); }
  .sidebar a[aria-current="page"] { background: var(--teal-50); color: var(--forest); }
  .sidebar hr { border: 0; border-top: 1px solid var(--line); margin: .75rem .5rem; width: auto; }
  .sidebar .side-foot { margin-top: auto; font-size: .8rem; color: var(--muted); padding: 0 1rem; }
  .main { padding: 2rem 2.5rem 4rem; }
}

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 1rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 2rem 0 .75rem; }
.section-title h2 { margin: 0; font-size: 1.3rem; }

/* Hero / progress */
.hello { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.hello h1 { margin: 0; font-size: 1.8rem; }
.hero-card {
  background: linear-gradient(135deg, var(--forest) 0%, #0b5f55 60%, var(--teal) 130%); color: #dcefeb; border-radius: var(--r-lg);
  padding: 1.5rem; display: flex; gap: 1.25rem; align-items: center; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 200px; height: 220px; background: url(../assets/img/logos/tlc-mark.png) center/contain no-repeat;
  opacity: .07; filter: brightness(10);
}
.hero-card h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.35rem; }
.hero-card p { margin: 0 0 .9rem; }
.hero-card .btn { background: #fff; color: var(--forest); min-height: 50px; padding: .6rem 1.2rem; font-size: 1rem; }
.ring { --p: 0; width: 104px; height: 104px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--clay) calc(var(--p) * 1%), rgba(255,255,255,.18) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--forest); }
.ring span { position: relative; font: 700 1.6rem var(--font-head); color: #fff; }
.ring span small { font-size: .9rem; font-weight: 500; }
.ring.light::before { background: #fff; }
.ring.light { background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--teal-100) 0); width: 64px; height: 64px; }
.ring.light::before { inset: 7px; }
.ring.light span { color: var(--forest); font-size: 1rem; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 500; padding: .3rem .7rem; border-radius: var(--r-pill); background: var(--stone); color: var(--slate); }
.pill .ic { width: 16px; height: 16px; }
.pill.ok { background: #e3f2e8; color: var(--ok); }
.pill.warn { background: var(--warn-100); color: var(--warn); }
.pill.teal { background: var(--teal-50); color: var(--forest); }
.pill.private { background: var(--clay-100); color: #7a5235; }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick a {
  background: #fff; border-radius: var(--r); padding: 1rem; text-decoration: none; color: var(--forest); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .6rem; min-height: 112px; font-weight: 500; font-family: var(--font-head);
}
.quick a .ic { width: 30px; height: 30px; color: var(--teal); }
.quick a small { color: var(--muted); font-family: var(--font-body); font-weight: 400; font-size: .85rem; margin-top: -.4rem; }

/* Module list */
.modules { display: grid; gap: .75rem; }
@media (min-width: 700px) { .modules { grid-template-columns: 1fr 1fr; } }
.module {
  display: flex; gap: 1rem; align-items: center; background: #fff; border-radius: var(--r); padding: 1rem; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); border: 2px solid transparent; min-height: 92px; transition: border-color .15s, transform .15s;
}
.module:hover { border-color: var(--teal-100); }
.m-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.m-icon .ic { width: 28px; height: 28px; }
.module h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.module .meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.bar { height: 8px; border-radius: 8px; background: var(--stone); overflow: hidden; margin-top: .5rem; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 8px; transition: width .4s; }
.module .chev { color: var(--line); margin-left: auto; }

/* Module colour themes */
.t-heart { background: #fbe9e4; color: #b24f37; }
.t-sudden { background: #fdf0dc; color: #a8641c; }
.t-treat { background: var(--teal-50); color: var(--forest); }
.t-comfort { background: #eaf3e3; color: #4c7a2e; }
.t-voice { background: #e7eef8; color: #2f5b8f; }
.t-funeral { background: #f3e8f1; color: #8a4a7c; }
.t-legacy { background: var(--clay-100); color: #8a5a39; }
.t-docs { background: var(--stone); color: var(--slate); }

/* ---------- Question flow ---------- */
.q-wrap { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100dvh - 200px); }
.q-top { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.q-progress { flex: 1; height: 10px; border-radius: 10px; background: var(--stone); overflow: hidden; }
.q-progress i { display: block; height: 100%; background: var(--forest); border-radius: 10px; transition: width .35s; }
.q-count { font-size: .9rem; color: var(--muted); min-width: 3.5rem; text-align: right; }
.q-kicker { display: flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .95rem; margin-bottom: .5rem; }
.q-title { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2rem); margin-bottom: .4rem; }
.q-help { color: var(--muted); margin-bottom: 1.25rem; }
.options { display: grid; gap: .75rem; }
.options.cols { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: .9rem; text-align: left; width: 100%; min-height: 68px; padding: .9rem 1rem;
  background: #fff; border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s;
  font-size: 1.1rem; line-height: 1.3;
}
.opt:hover { border-color: var(--teal); }
.opt .o-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--stone-50); display: grid; place-items: center; flex: none; color: var(--forest); }
.opt .o-ic .ic { width: 24px; height: 24px; }
.opt .o-txt { flex: 1; }
.opt .o-txt small { display: block; color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.opt .o-check {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: transparent;
}
.opt.multi .o-check { border-radius: 9px; }
.opt[aria-pressed="true"] { border-color: var(--forest); background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--forest); }
.opt[aria-pressed="true"] .o-check { background: var(--forest); border-color: var(--forest); color: #fff; }
.opt[aria-pressed="true"] .o-ic { background: #fff; }
.opt.dnr[aria-pressed="true"] { border-color: var(--clay); background: var(--clay-100); box-shadow: inset 0 0 0 1px var(--clay); }
.opt.dnr[aria-pressed="true"] .o-check { background: var(--clay); border-color: var(--clay); }
.opt .o-ic .ic { stroke-width: 1.8; }
.options.cols .opt { flex-direction: column; text-align: center; justify-content: center; gap: .5rem; min-height: 120px; position: relative; }
.options.cols .opt .o-check { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; }
.options.cols .opt .o-check .ic { width: 14px; height: 14px; }

.gp-flag {
  display: flex; gap: .75rem; align-items: flex-start; background: var(--mist); border: 1px dashed var(--teal); border-radius: var(--r);
  padding: .9rem 1rem; margin-top: 1rem; font-size: .98rem;
}
.gp-flag .ic { color: var(--teal); margin-top: 2px; }
.q-nav { display: flex; gap: .75rem; margin-top: auto; padding-top: 1.5rem; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--stone-50) 30%); padding-bottom: 1rem; }
.q-nav .btn-primary { flex: 1; }
@media (max-width: 959px) { .q-mode .bottom-nav { display: none; } .q-mode .main { padding-bottom: 1rem; } }

/* Module intro */
.m-hero { text-align: center; padding: 1rem 0; }
.m-hero .m-icon { width: 104px; height: 104px; border-radius: 32px; margin: 0 auto 1.25rem; }
.m-hero .m-icon .ic { width: 52px; height: 52px; }
.m-hero p { color: var(--muted); max-width: 32ch; margin: 0 auto 1rem; }
.who-sees { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0 2rem; }
.facepile { display: flex; }
.facepile .avatar { border: 3px solid #fff; margin-left: -10px; width: 40px; height: 40px; font-size: .85rem; }
.facepile .avatar:first-child { margin-left: 0; }

/* Summary */
.summary { display: grid; gap: .5rem; }
.summary-item { display: flex; gap: 1rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.summary-item:last-child { border-bottom: 0; }
.summary-item .q { font-size: .9rem; color: var(--muted); }
.summary-item .a { font-weight: 500; color: var(--forest); }
.summary-item button { margin-left: auto; }

/* ---------- People & sharing ---------- */
.people { display: flex; gap: .75rem; overflow-x: auto; padding: .25rem .25rem 1rem; scroll-snap-type: x mandatory; }
.person-chip {
  scroll-snap-align: start; flex: none; display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 104px; padding: .9rem .5rem;
  background: #fff; border: 2px solid transparent; border-radius: var(--r); cursor: pointer; box-shadow: var(--shadow-sm); text-align: center;
}
.person-chip[aria-pressed="true"] { border-color: var(--forest); background: var(--teal-50); }
.person-chip b { font-size: .95rem; font-weight: 500; color: var(--forest); line-height: 1.2; }
.person-chip small { font-size: .78rem; color: var(--muted); }
.person-chip.add { border: 2px dashed var(--line); background: transparent; box-shadow: none; color: var(--teal); }
.person-chip.add .avatar { background: var(--teal-50); color: var(--teal); }
.role-qr { background: var(--forest) !important; }

.share-list { display: grid; gap: .5rem; }
.share-row { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: var(--r); padding: .75rem 1rem; min-height: 72px; box-shadow: var(--shadow-sm); }
.share-row .m-icon { width: 44px; height: 44px; border-radius: 14px; }
.share-row .m-icon .ic { width: 22px; height: 22px; }
.share-row .grow b { display: block; color: var(--forest); font-weight: 500; }
.share-row .grow small { color: var(--muted); font-size: .85rem; }
.switch { position: relative; width: 64px; height: 38px; flex: none; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--teal); }
.switch[aria-checked="true"]::after { transform: translateX(26px); }
.vis-label { font-size: .8rem; min-width: 64px; text-align: right; display: flex; gap: .3rem; align-items: center; justify-content: flex-end; }
.vis-label .ic { width: 16px; height: 16px; }

.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.matrix th, .matrix td { padding: .7rem .6rem; text-align: center; border-bottom: 1px solid var(--stone); }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 1rem; }
.matrix thead th { font: 500 .85rem var(--font-head); color: var(--forest); background: var(--stone-50); }
.matrix td .ic { width: 22px; height: 22px; }
.dot-yes { color: var(--teal); }
.dot-no { color: #c9d0d4; }

/* Sheet / modal */
.sheet-bg { position: fixed; inset: 0; background: rgba(3,42,38,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--stone-50); width: 100%; max-width: 640px; max-height: 92dvh; overflow: auto; border-radius: 28px 28px 0 0; padding: 1rem 1.25rem 2rem; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 28px; } }
.sheet-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.sheet-head h2 { margin: 0; flex: 1; font-size: 1.35rem; }
.grab { width: 48px; height: 5px; background: var(--line); border-radius: 5px; margin: 0 auto .75rem; }
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 560px) { .role-grid { grid-template-columns: repeat(3, 1fr); } }
.role-grid .tile { min-height: 96px; }
.role-grid .tile .ic { width: 28px; height: 28px; color: var(--teal); }
.role-grid .tile b { font-size: 1rem; font-weight: 500; }

.preview-banner { background: var(--forest); color: #fff; border-radius: var(--r); padding: 1rem; display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.locked { display: flex; gap: .75rem; align-items: center; color: var(--muted); background: repeating-linear-gradient(45deg, #fff, #fff 10px, var(--stone-50) 10px, var(--stone-50) 20px); border: 1px dashed var(--line); border-radius: var(--r); padding: 1rem; }

/* ---------- Review timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1.5rem 4.25rem; min-height: 64px; }
.timeline li::before { content: ""; position: absolute; left: 26px; top: 52px; bottom: 0; width: 3px; background: var(--line); border-radius: 3px; }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--teal); }
.t-dot { position: absolute; left: 0; top: 0; width: 55px; height: 55px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--line); color: var(--muted); }
.t-dot .ic { width: 24px; height: 24px; }
.timeline li.done .t-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.timeline li.now .t-dot { background: var(--forest); border-color: var(--forest); color: #fff; box-shadow: 0 0 0 6px var(--teal-100); }
.timeline h3 { margin: .7rem 0 .2rem; font-size: 1.1rem; }
.timeline li:not(.done):not(.now) h3 { color: var(--muted); font-weight: 500; }
.t-body { margin-top: .75rem; background: #fff; border-radius: var(--r); padding: 1rem; box-shadow: var(--shadow-sm); }
.gp-note { display: flex; gap: .9rem; align-items: flex-start; }
.gp-note blockquote { margin: 0; font-family: var(--font-slab); font-size: 1.02rem; color: var(--slate); }
.gp-note .who { font-weight: 500; color: var(--forest); font-size: .95rem; margin-bottom: .3rem; }

/* ---------- Emergency card ---------- */
.ecard {
  max-width: 420px; margin: 0 auto; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, var(--forest) 0%, #0b5f55 100%); color: #fff;
}
.ecard-top { padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.ecard-top img { height: 40px; }
.ecard-top .pill { background: rgba(255,255,255,.14); color: #fff; }
.ecard-body { background: #fff; color: var(--slate); margin: 0 .75rem .75rem; border-radius: 20px; padding: 1.25rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.ecard-body .qr { width: 150px; height: 150px; }
.ecard-body .qr svg, .ecard-body .qr img { width: 100%; height: 100%; }
.ecard-name { font: 600 1.35rem var(--font-head); color: var(--forest); }
.pin { font: 700 1.7rem var(--font-head); letter-spacing: .25em; color: var(--forest); }
.ecard-foot { padding: .25rem 1.5rem 1.25rem; font-size: .9rem; color: #cfe3df; display: flex; gap: .5rem; align-items: center; }
@media (max-width: 420px) { .ecard-body { grid-template-columns: 1fr; text-align: center; } .ecard-body .qr { margin: 0 auto; } }

/* Docs */
.doc { display: flex; gap: .9rem; align-items: center; background: #fff; border-radius: var(--r); padding: .9rem 1rem; box-shadow: var(--shadow-sm); }
.doc + .doc { margin-top: .6rem; }
.doc .m-icon { width: 48px; height: 48px; border-radius: 14px; }
.drop { border: 2px dashed var(--teal); border-radius: var(--r-lg); padding: 1.5rem; text-align: center; background: var(--mist); cursor: pointer; display: block; }
.drop .ic { width: 40px; height: 40px; color: var(--teal); margin: 0 auto .5rem; display: block; }

/* Activity */
.log { list-style: none; padding: 0; margin: 0; }
.log li { display: flex; gap: .9rem; padding: .8rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.log li .ic { color: var(--teal); margin-top: 3px; }
.log time { display: block; font-size: .85rem; color: var(--muted); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; background: var(--forest-900); color: #fff; padding: .85rem 1.25rem; border-radius: var(--r-pill); display: flex; gap: .6rem; align-items: center; box-shadow: var(--shadow); animation: up .25s; font-weight: 500; max-width: calc(100vw - 2rem); }
@media (min-width: 960px) { .toast { bottom: 32px; } }

/* Celebrate */
.celebrate { text-align: center; }
.celebrate .big-tick { width: 120px; height: 120px; border-radius: 50%; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; margin: 1rem auto 1.5rem; }
.celebrate .big-tick .ic { width: 60px; height: 60px; }
.next-steps { display: grid; gap: .75rem; margin: 1.5rem 0; text-align: left; }
.next-steps div { display: flex; gap: 1rem; align-items: center; background: #fff; border-radius: var(--r); padding: 1rem; box-shadow: var(--shadow-sm); font-weight: 500; color: var(--forest); }
.next-steps .num { width: 40px; height: 40px; border-radius: 50%; background: var(--clay-100); color: #7a5235; display: grid; place-items: center; font-family: var(--font-head); flex: none; }

@media print {
  .demo-strip, .app-header, .bottom-nav, .sidebar, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}

/* ---------- Refinements after device review ---------- */
h1[tabindex="-1"]:focus { outline: none; }
.hint { display: block; }
.hint .ic { vertical-align: -.22em; margin-right: .3rem; width: 1.1em; height: 1.1em; }
.toast { width: max-content; }
.trust-logos .logo-card { height: 92px; padding: .5rem 1rem; }
.trust-logos img { max-height: 74px; }
.verify-logo { height: 84px; }
.share-row .grow small.on { color: var(--teal); }
@media (max-width: 599px) { .vis-label { display: none; } }
.install { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.install .ic { color: var(--teal); width: 28px; height: 28px; }
.install b { flex: 1; color: var(--forest); font-weight: 500; }
.t-body ul { padding-left: 1.2rem; margin: .25rem 0 1rem; }
.t-body li { padding: 0; min-height: 0; }
.t-body li::before { display: none; }
.wrap-any { overflow-wrap: anywhere; }
.service-logo { height: 56px; width: auto; }
@media (min-width: 960px) {
  .main { max-width: 1000px; }
  .home-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; align-items: start; }
  .home-grid .quick { grid-template-columns: 1fr 1fr; }
  .home-grid .section-title:first-child { margin-top: 0; }
}
@media (min-width: 960px) { .home-grid .modules { grid-template-columns: 1fr; } }

/* ---------- Round 2 refinements ---------- */
/* Desktop side panel: brand panel, no repeated photography */
.split-art .art-body { display: flex; flex-direction: column; gap: 1.5rem; margin: auto 0; max-width: 420px; }
.split-art .art-stone {
  width: 168px; height: 168px; display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 46% 54% 52% 48% / 58% 50% 50% 42%;
}
.split-art .art-stone .ic { width: 72px; height: 72px; stroke-width: 1.5; }
.split-art h2 { max-width: 18ch; margin: 0; }
.art-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.art-list li { display: flex; gap: .85rem; align-items: center; padding: .7rem .9rem; border-radius: 14px; color: #b9d5cf; transition: background .2s, color .2s; }
.art-list li .ic { width: 24px; height: 24px; color: var(--clay); }
.art-list li.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 500; }
.split-art .art-foot { margin: 0; font-size: .9rem; color: #9cbfb8; }
.split-art::after {
  content: ""; position: absolute; right: -90px; bottom: -110px; width: 360px; height: 420px;
  background: url(../assets/img/logos/tlc-mark.png) center/contain no-repeat; opacity: .06; filter: brightness(10); pointer-events: none;
}
/* Government lockups (matching divider) */
.trust-logos.lockups { flex-direction: column; gap: .6rem; }
.trust-logos.lockups img { width: min(300px, 100%); height: auto; max-height: none; background: #fff; border-radius: var(--r-sm); padding: .5rem .75rem; box-shadow: var(--shadow-sm); }
.verify-logo { height: auto; width: min(320px, 100%); }
.service-logo { height: 52px; width: auto; max-width: 60%; }
/* Hidden scrollbars on sideways-scrolling rows */
.people, .matrix-wrap { scrollbar-width: none; }
.people::-webkit-scrollbar, .matrix-wrap::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }
@media (min-width: 960px) { .split-main .topbar .logo { display: none; } }

/* ---------- Install sheet & reminders ---------- */
.install-hero { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: var(--r-lg); padding: 1rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.install-hero .app-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 16px -6px rgba(6,77,69,.45); }
.install-hero b { display: block; font: 600 1.25rem var(--font-head); color: var(--forest); }
.install-hero span { color: var(--muted); }
.install-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.install-points li { display: flex; gap: .85rem; align-items: center; font-weight: 500; color: var(--forest); }
.install-points li .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--teal-50); color: var(--teal); box-sizing: border-box; flex: none; }
.install-steps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; counter-reset: s; }
.install-steps li { display: flex; align-items: center; gap: .85rem; background: #fff; border-radius: var(--r); padding: .8rem 1rem; box-shadow: var(--shadow-sm); }
.install-steps li > span:nth-child(2) { flex: 1; }
.is-n { width: 34px; height: 34px; border-radius: 50%; background: var(--clay-100); color: #7a5235; display: grid; place-items: center; font: 600 1rem var(--font-head); flex: none; }
.is-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--stone-50); display: grid; place-items: center; color: #1a73e8; flex: none; }
.is-ic img { width: 32px; height: 32px; border-radius: 8px; }
.bell-hero { width: 96px; height: 96px; border-radius: 50%; background: var(--warn-100); color: var(--warn); display: grid; place-items: center; margin: 0 auto 1rem; }
.bell-hero .ic { width: 46px; height: 46px; }
@media (prefers-reduced-motion: no-preference) { .bell-hero .ic { animation: ring 1.6s ease .3s 2; transform-origin: 50% 10%; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }
.bell-hero.sm { width: 64px; height: 64px; margin: 0; flex: none; }
.bell-hero.sm .ic { width: 30px; height: 30px; }
.reminder-status { display: flex; gap: 1rem; align-items: center; }
.reminder-status.is-on .bell-hero { background: #e3f2e8; color: var(--ok); }
.switch[disabled] { opacity: .45; cursor: not-allowed; }
.avatar { text-decoration: none; }
body:has(#sheet) .toast { bottom: auto; top: calc(16px + env(safe-area-inset-top, 0px)); }

/* ---------- Documents, versions & sync ---------- */
.cta-card { display: flex; gap: 1.1rem; align-items: flex-start; background: linear-gradient(135deg, var(--forest) 0%, #0b5f55 60%, var(--teal) 130%); color: #dcefeb; border-radius: var(--r-lg); padding: 1.4rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.cta-card h2 { color: #fff; font-size: 1.3rem; margin-bottom: .35rem; }
.cta-card p { margin: 0 0 1rem; }
.cta-card .btn { background: #fff; color: var(--forest); min-height: 50px; padding: .6rem 1.2rem; font-size: 1rem; }
.cta-ic { width: 56px; height: 56px; border-radius: 18px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; color: #fff; }
.cta-ic .ic { width: 28px; height: 28px; }
.btn-link.light { color: #fff; }
.dir-card { display: flex; gap: 1rem; align-items: center; background: #fff; border-radius: var(--r-lg); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); border: 2px solid var(--teal-100); text-decoration: none; color: inherit; }
.dir-card:hover { border-color: var(--teal); }
.dir-card.static { margin: 1rem 0; }
.dir-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--teal-50); color: var(--forest); display: grid; place-items: center; flex: none; }
.dir-ic .ic { width: 28px; height: 28px; }
.dir-card small { display: block; color: var(--muted); font-size: .85rem; }
.dir-card b { display: block; font: 600 1.15rem var(--font-head); color: var(--forest); }
.dir-meta { display: block; color: var(--muted); font-size: .9rem; margin-top: .1rem; }
.synced { display: inline-flex; gap: .35rem; align-items: center; color: var(--ok); font-size: .9rem; font-weight: 500; margin-top: .35rem; }
.synced .ic { width: 18px; height: 18px; }
.dir-card .chev, .saved-to > .ic:last-child { color: var(--line); }
.progress-card { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.progress-card h2 { font-size: 1.15rem; margin: 0; }
.progress-card p { margin: 0; }
.progress-card .btn { min-height: 48px; padding: .5rem 1.1rem; font-size: 1rem; }
.modules.one { grid-template-columns: 1fr; }
.doc-sub { display: block; font-size: .88rem; margin-bottom: .35rem; }
.doc-row .meta { margin-top: .1rem; }
.doc-head { display: flex; gap: 1rem; align-items: center; }
.doc-head .m-icon { width: 64px; height: 64px; border-radius: 20px; }
.doc-head .m-icon .ic { width: 30px; height: 30px; }
.doc-head h1 { margin: 0 0 .2rem; font-size: 1.6rem; }
.notice-warn { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; background: var(--warn-100); color: #7a4a14; border-radius: var(--r); padding: .9rem 1rem; margin: 0 0 1rem; }
.notice-warn .btn { min-height: 44px; padding: .4rem 1rem; }
.sync-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.sync-head .ic { color: var(--teal); }
.sync-head b { color: var(--forest); }
.sync-head .muted { font-size: .9rem; margin-left: auto; }
.dest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.dest-list li { display: flex; gap: .85rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--stone); }
.dest-list li:last-child { border-bottom: 0; }
.dest-list b { display: block; color: var(--forest); font-weight: 500; }
.dest-list small { color: var(--muted); font-size: .85rem; }
.dest-list.sync { background: #fff; border-radius: var(--r-lg); padding: .5rem 1.1rem; box-shadow: var(--shadow-sm); margin-top: 1rem; }
.dest-list.sync li { opacity: .55; transition: opacity .3s; }
.dest-list.sync li.done { opacity: 1; }
.v-ok { display: inline-flex; gap: .3rem; align-items: center; color: var(--ok); font-weight: 600; font-size: .9rem; background: #e3f2e8; border-radius: 99px; padding: .25rem .65rem; }
.v-ok .ic { width: 16px; height: 16px; }
.spinner.dark { border-color: var(--teal-100); border-top-color: var(--teal); }
.role-mhr { background: #2f5b8f !important; }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.who-chip { display: flex; gap: .65rem; align-items: center; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: var(--r); padding: .6rem .7rem; cursor: pointer; min-height: 64px; }
.who-chip b { display: block; color: var(--forest); font-weight: 500; font-size: .98rem; }
.who-chip small { color: var(--muted); font-size: .8rem; }
.who-chip > span:nth-child(2) { flex: 1; min-width: 0; }
.who-chip .o-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.who-chip .o-check .ic { width: 14px; height: 14px; }
.who-chip[aria-pressed="true"] { border-color: var(--forest); background: var(--teal-50); }
.who-chip[aria-pressed="true"] .o-check { background: var(--forest); border-color: var(--forest); color: #fff; }
.who-chip.add { border-style: dashed; color: var(--teal); justify-content: center; }
.versions { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.versions li { display: flex; gap: .85rem; align-items: center; background: #fff; border-radius: var(--r); padding: .75rem 1rem; box-shadow: var(--shadow-sm); }
.versions li:not(.cur) { opacity: .7; }
.versions li:not(.cur) b { text-decoration: line-through; text-decoration-color: var(--muted); }
.versions .vn { width: 44px; height: 44px; border-radius: 12px; background: var(--stone); display: grid; place-items: center; font: 700 1rem var(--font-head); color: var(--slate); flex: none; }
.versions li.cur .vn { background: var(--forest); color: #fff; }
.versions b { display: block; color: var(--forest); font-weight: 500; }
.versions small { color: var(--muted); font-size: .85rem; }
.replace-note { display: flex; gap: .75rem; align-items: flex-start; background: var(--mist); border: 1px dashed var(--teal); border-radius: var(--r); padding: 1rem; margin-top: 1rem; }
.replace-note .ic { color: var(--teal); margin-top: 2px; }
.drop.big { padding: 2.25rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.drop.big .ic { width: 52px; height: 52px; }
.drop.big b { color: var(--forest); font-size: 1.15rem; }
.tile.sm { min-height: 56px; padding: .5rem; }
.tile.sm b { font-size: 1.1rem; }
.start-opt { text-decoration: none; color: inherit; }
.start-opt b { display: block; color: var(--forest); font-family: var(--font-head); font-size: 1.1rem; }
.start-opt > .ic { color: var(--line); }
.saved-to { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: inherit; margin-top: 1rem; border: 2px solid var(--teal-100); }
.saved-to small { display: block; color: var(--muted); font-size: .85rem; }
.saved-to b { display: block; color: var(--forest); font: 600 1.05rem var(--font-head); }
.tel { display: inline-flex; gap: .3rem; align-items: center; margin-left: .5rem; font-size: .9rem; font-weight: 500; color: var(--teal); }
.tel .ic { width: 16px; height: 16px; }
.sync-orb { width: 104px; height: 104px; border-radius: 50%; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; margin: 1rem auto 1.25rem; }
.sync-orb .ic { width: 50px; height: 50px; }
@media (prefers-reduced-motion: no-preference) { .sync-orb:not(.done) .ic { animation: spin 1.4s linear infinite; } }
.sync-orb.done { background: #e3f2e8; color: var(--ok); }
.paper { background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 12px 30px -12px rgba(6,77,69,.25); padding: 1.5rem 1.4rem; font-size: .95rem; }
.paper-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--forest); padding-bottom: .6rem; margin-bottom: 1rem; font-size: .8rem; color: var(--muted); }
.paper-top img { height: 30px; }
.paper h3 { margin-bottom: .1rem; }
.paper h4 { font: 600 .95rem var(--font-head); color: var(--forest); margin: 1rem 0 .4rem; border-bottom: 1px solid var(--stone); padding-bottom: .25rem; }
.paper p { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0 0 .35rem; }
.paper p span { color: var(--muted); }
.paper-lines { display: grid; gap: .6rem; margin: 1rem 0 1.5rem; }
.paper-lines i { display: block; height: 9px; background: var(--stone); border-radius: 4px; }
.paper-sign { display: flex; gap: 1rem; }
.paper-sign span { flex: 1; border-top: 1px solid var(--slate); padding-top: .3rem; font-size: .8rem; color: var(--muted); }
a.share-row { text-decoration: none; color: inherit; }
.notice-warn .grow { flex: 1 1 14rem; }
.progress-card .grow { flex: 1 1 10rem; }
@media (max-width: 600px) { .progress-card .btn { flex: 1 1 100%; } .notice-warn .btn { flex: 1 1 100%; } }
