:root {
  color-scheme: light;
  font-family: 'Trebuchet MS', system-ui, sans-serif;
  color: #30213d;
  background: #fff5e5;
  --ink: #30213d;
  --muted: #604b63;
  --cream: #fff5e5;
  --white: #fffdf6;
  --peach: #ffad87;
  --lilac: #e6d6ff;
  --sun: #ffdb76;
  --rose: #f7d6e4;
  --mint: #dfeccb;
  --display: Georgia, 'Bookman Old Style', serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: 1rem; line-height: 1.58; }
::selection { background: var(--sun); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.6rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.36rem; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #7234a1; outline-offset: 5px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, canvas, svg { display: block; max-width: 100%; }

.shell { width: min(100% - 2.8rem, 72rem); margin-inline: auto; }
body > .shell { display: flex; flex: 1; flex-direction: column; }
.main { flex: 1; padding-block: clamp(2.05rem, 5.2vw, 4.7rem); }
.main > .alert { margin-bottom: 1.15rem; }
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1.3rem;
  flex-wrap: wrap;
  min-height: 4.7rem;
  padding-block: .65rem;
}
.site-header { border-bottom: 2px dashed #cdb4ca; }
.site-footer { border-top: 2px dashed #cdb4ca; color: var(--muted); font-size: .88rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font: 900 clamp(1.44rem, 3.35vw, 1.95rem)/1 var(--display);
  letter-spacing: -.07em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  position: relative;
  display: grid;
  flex: none;
  width: 2.31rem;
  height: 2.08rem;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50% 54% 49% 36%;
  background: var(--sun);
  box-shadow: 2px 2px var(--ink);
  transform: rotate(-10deg);
}
.brand-mark::before { content: '✳'; font: 1.38rem/1 system-ui, sans-serif; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .9rem; font-weight: 800; }
.nav form { display: contents; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.hero { display: grid; align-items: center; gap: clamp(2.15rem, 6vw, 5rem); }
.hero-copy { display: grid; justify-items: start; gap: clamp(1rem, 2vw, 1.55rem); min-width: 0; }
.hero h1 { font-size: clamp(2.16rem, 11.65vw, 5.35rem); line-height: .99; letter-spacing: -.069em; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { color: #a23d58; font-weight: 700; }
.eyebrow {
  width: fit-content;
  max-width: 100%;
  padding: .28rem .73rem;
  border: 1.5px solid var(--ink);
  border-radius: 4rem;
  background: var(--rose);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.hero .eyebrow { background: var(--sun); transform: rotate(-3deg); }
.lede { max-width: 44ch; color: var(--muted); font-size: clamp(1.04rem, 2.3vw, 1.23rem); }
.hero-demo { display: grid; gap: 1rem; margin: 0 .31rem .5rem 0; min-width: 0; }
.hero-art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 14% 9% 13% 9% / 11% 12% 11% 12%;
  background: var(--lilac);
  box-shadow: 6px 7px var(--ink);
}
.hero-example { justify-self: end; }

.actions, .qr-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .68rem .85rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .46rem;
  min-height: 2.85rem;
  padding: .62rem 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 100vw;
  background: var(--peach);
  box-shadow: 3px 3px var(--ink);
  color: var(--ink);
  font-size: .96rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.hero-copy .button { min-height: 3.35rem; padding-inline: 1.45rem; }
.button:hover { background: var(--sun); text-decoration: none; }
.button:active { box-shadow: 1px 1px var(--ink); }
.button--secondary { background: var(--white); }
.button--secondary:hover { background: var(--lilac); }
.button--quiet { background: transparent; border-color: transparent; box-shadow: none; text-decoration: underline; }
.button--danger { background: var(--rose); }
.button:disabled { cursor: default; opacity: .61; box-shadow: none; }

.steps, .use-cases { display: grid; gap: 1.2rem; margin-top: clamp(3.15rem, 7vw, 5.8rem); }
.use-cases + .steps { margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.step-grid { display: grid; gap: 1rem; }
.step, .card {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: .9rem;
  padding: clamp(1.2rem, 3.25vw, 1.85rem);
  border: 2px solid var(--ink);
  border-radius: 1.55rem 1.1rem 1.45rem 1.2rem;
  background: var(--white);
  box-shadow: 4px 4px var(--ink);
}
.step { gap: .55rem; background: var(--sun); }
.step:nth-child(2) { background: var(--rose); }
.step:nth-child(3) { background: var(--mint); }
.step p, .card > p { color: var(--muted); }
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.use-case {
  display: grid;
  align-content: start;
  gap: .35rem;
  min-width: 0;
  padding: .85rem clamp(.75rem, 3vw, 1.35rem);
  border: 2px solid var(--ink);
  border-radius: 1.2rem .9rem 1.15rem 1rem;
  background: var(--sun);
  box-shadow: 3px 3px var(--ink);
  text-align: start;
  text-decoration: none;
}
.use-case:nth-child(2) { background: var(--rose); }
.use-case:nth-child(3) { background: var(--mint); }
.use-case:nth-child(4) { background: var(--lilac); }
.use-case:hover { box-shadow: 5px 5px var(--ink); }
.use-case strong { font: 700 clamp(1.13rem, 3.25vw, 1.47rem)/1.23 var(--display); }
.use-case > span { color: var(--muted); font-size: .94rem; line-height: 1.38; }
.demo-tabs { display: flex; flex-wrap: wrap; gap: .52rem; }
.demo-tabs .button { min-height: 2.55rem; padding: .48rem .8rem; box-shadow: 2px 2px var(--ink); }
.demo-tabs [aria-pressed='true'], .demo-tabs [aria-current='true'], .demo-tabs [aria-current='page'] { background: var(--sun); }
.profile-safety, #family-help {
  padding-inline-start: .8rem;
  border-inline-start: 3px solid #925574;
  color: var(--ink);
  font-size: .93rem;
}
.page-heading, .stack { display: grid; align-content: start; gap: .82rem; min-width: 0; }
.page-heading { margin-bottom: 1.65rem; }
.dashboard-grid { display: grid; align-items: start; gap: 1.4rem; }
.dashboard-grid > .card:nth-child(2) { background: var(--mint); }
.dashboard-grid > .card:nth-child(3) { background: var(--sun); }
.dashboard-grid > .card:nth-child(4) { background: var(--rose); }
.form-card { width: min(100%, 33rem); margin-inline: auto; background: var(--lilac); }
.qr-card { justify-items: start; background: var(--lilac); }
.print-label {
  display: grid;
  justify-items: center;
  width: min(100%, 17rem);
  gap: .28rem;
  padding: .85rem;
  border: 1px dashed var(--ink);
  border-radius: .85rem;
  background: #fff;
  color: var(--ink);
  text-align: center;
  line-height: 1.33;
}
.qr-area { width: min(100%, 12rem); aspect-ratio: 1; display: grid; place-items: center; }
.qr-area svg, .qr-area canvas, .qr-area img { width: 100%; height: auto; }
.inbox { margin-top: 1.45rem; scroll-margin-top: 1rem; }
#inbox-messages { display: grid; gap: .65rem; }
.message { display: grid; gap: .28rem; padding: 1rem; border-radius: .8rem; background: var(--cream); overflow-wrap: anywhere; }
.hint, .meta { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.field { display: grid; gap: .3rem; }
label { font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.86rem;
  padding: .58rem .76rem;
  border: 1.5px solid #694e70;
  border-radius: .73rem;
  background: var(--white);
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #69586e; }
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: .57rem; }
.check input { flex: none; width: 1.13rem; height: 1.13rem; min-height: auto; margin: .25rem 0 0; accent-color: #6f357e; }
.alert { width: 100%; padding: .74rem .9rem; border: 1.5px solid var(--ink); border-radius: .8rem; background: var(--mint); overflow-wrap: anywhere; }
.alert--error { background: var(--rose); }
.sr-only, .trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.profile-wrap { display: grid; gap: 1.25rem; width: min(100%, 35rem); margin-inline: auto; }
.profile-card { justify-items: start; background: var(--lilac); }
.profile-card h1 { font-size: clamp(2.55rem, 7vw, 3.9rem); }
.profile-avatar {
  display: grid;
  place-items: center;
  width: 3.8rem;
  height: 3.5rem;
  border: 2px solid var(--ink);
  border-radius: 46% 56% 42% 48%;
  background: var(--sun);
  box-shadow: 2px 2px var(--ink);
  transform: rotate(-8deg);
  font: 800 1.6rem/1 system-ui, sans-serif;
}
.profile-form { scroll-margin-top: 1rem; }

@media (min-width: 43rem) {
  .step-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .use-case-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 53rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero h1 { font-size: clamp(3.65rem, 6.6vw, 5.65rem); }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
@media print {
  @page { margin: 15mm; }
  body:has(.print-label), body:has(.print-label) :has(.print-label) {
    display: block !important;
    width: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  body:has(.print-label) :not(.print-label, .print-label *, :has(.print-label)) { display: none !important; }
  .print-label { width: 61mm; padding: 4mm; border: 1px dashed #555; border-radius: 0; break-inside: avoid; color: #000; }
  .print-label .qr-area { width: 42mm; }
}
