/* WeInviteYou platform design system.
   Warm, restrained and functional. One UI sans (Manrope) + one editorial serif (Instrument Serif)
   used sparingly for names and display moments. Radii 6/8/10. Gold is an accent, never a surface. */

:root {
  --canvas: #fbf8f3;
  --paper: #ffffff;
  --ivory: #f5efe6;
  --sand: #ebe2d4;
  --line: #e6ddcf;
  --line-strong: #d4c6b2;
  --ink: #1f1a17;
  --ink-2: #463e38;
  --muted: #776c62;
  --faint: #a2978c;
  --primary: #3b1f24;
  --primary-hover: #2a1519;
  --primary-ink: #fff9f2;
  --maroon: #8a3b45;
  --maroon-soft: #f4e6e5;
  --terracotta: #b5573a;
  --sage: #6f7f68;
  --sage-soft: #e8ede3;
  --gold: #a8834a;
  --gold-soft: #f3eadb;
  --midnight: #1c2230;
  --success: #3f7a55;
  --success-soft: #e5f0e8;
  --warning: #a86b17;
  --warning-soft: #f8ecd8;
  --danger: #b3362f;
  --danger-soft: #f9e6e4;
  --info: #3c6386;
  --info-soft: #e4edf5;

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --r-sm: 6px;
  --r: 8px;
  --r-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(40, 28, 20, .06);
  --shadow: 0 1px 2px rgba(40, 28, 20, .05), 0 8px 24px -12px rgba(40, 28, 20, .14);
  --shadow-lg: 0 30px 80px -30px rgba(40, 28, 20, .35);
  --ring: 0 0 0 3px rgba(138, 59, 69, .22);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --sidebar: 15.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, h5, p, ul, ol, figure, dl { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
::selection { background: #efd9d2; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { flex: none; }

/* ------------------------------------------------ typography */
.t-display { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 6.5vw, 4.75rem); line-height: 1.02; letter-spacing: -.01em; }
.t-h1 { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.t-h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
.t-h3 { font-size: 1.0625rem; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
.t-names { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; line-height: 1.05; }
.t-body { font-size: 15px; }
.t-lead { font-size: 1.0625rem; color: var(--muted); line-height: 1.6; }
.t-label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.t-caption { font-size: .8125rem; color: var(--muted); }
.t-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); }
.t-muted { color: var(--muted); }
.t-faint { color: var(--faint); }
.t-center { text-align: center; }
.t-mono { font-variant-numeric: tabular-nums; }
.t-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.link { color: var(--maroon); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.link:hover { color: var(--primary); }

/* ------------------------------------------------ layout helpers */
.container { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.container-sm { width: min(100% - 2.5rem, 44rem); margin-inline: auto; }
.row { display: flex; align-items: center; gap: .75rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.stack-sm { --gap: .5rem; }
.stack-lg { --gap: 1.75rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; }
.grid-3 { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; } .mt-12 { margin-top: 3rem; }
@media (max-width: 47.99rem) { .hide-mobile { display: none !important; } }
@media (min-width: 48rem) { .hide-desktop { display: none !important; } }
.divider { height: 1px; background: var(--line); border: 0; margin: 1.25rem 0; }

/* ------------------------------------------------ buttons */
.btn { --h: 2.5rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: var(--h); padding: 0 1rem; border-radius: var(--r); border: 1px solid transparent; font-size: .875rem; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s var(--ease); user-select: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--paper); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--ivory); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--ivory); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #962b25; }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-accent { background: var(--maroon); color: #fff; }
.btn-accent:hover { background: #742f38; }
.btn-sm { --h: 2rem; padding: 0 .7rem; font-size: .8125rem; border-radius: var(--r-sm); }
.btn-lg { --h: 3rem; padding: 0 1.4rem; font-size: .9375rem; }
.btn-xl { --h: 3.5rem; padding: 0 1.75rem; font-size: 1rem; border-radius: var(--r-lg); }
.btn-icon { width: var(--h); padding: 0; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid currentColor; border-color: var(--primary-ink) var(--primary-ink) transparent transparent; animation: spin .7s linear infinite; }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ forms */
.field { display: grid; gap: .4rem; }
.field + .field { margin-top: 1rem; }
.label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: .5rem; }
.label .opt { font-weight: 500; color: var(--faint); }
.input, .select, .textarea { width: 100%; height: 2.625rem; padding: 0 .8rem; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--paper); font-size: .9375rem; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #c4b49d; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--maroon); box-shadow: var(--ring); }
.textarea { height: auto; min-height: 6rem; padding: .65rem .8rem; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23776c62' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; }
.input-lg { height: 3.25rem; font-size: 1.0625rem; padding: 0 1rem; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--maroon); box-shadow: var(--ring); }
.input-group .input { border: 0; box-shadow: none !important; border-radius: 0; }
.input-group__addon { display: flex; align-items: center; padding: 0 .8rem; background: var(--ivory); color: var(--muted); font-size: .875rem; white-space: nowrap; border-left: 1px solid var(--line); }
.input-group__addon:first-child { border-left: 0; border-right: 1px solid var(--line); }
.help { font-size: .8125rem; color: var(--muted); }
.error { font-size: .8125rem; color: var(--danger); display: flex; gap: .35rem; align-items: center; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea, .field.has-error .input-group { border-color: var(--danger); }
.field.is-valid .input-group, .field.is-valid .input { border-color: var(--success); }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 2.75rem; }
.password-wrap button { position: absolute; right: .35rem; top: 50%; translate: 0 -50%; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: var(--r-sm); }
.password-wrap button:hover { color: var(--ink); background: var(--ivory); }

.check { display: inline-flex; align-items: center; gap: .55rem; font-size: .875rem; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .875rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 2.25rem; height: 1.3rem; border-radius: 999px; background: var(--line-strong); position: relative; transition: background-color .2s; flex: none; }
.switch__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: calc(1.3rem - 4px); height: calc(1.3rem - 4px); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(.95rem); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

.segmented { display: inline-flex; padding: 3px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r); gap: 2px; }
.segmented button, .segmented a { height: 1.9rem; padding: 0 .7rem; border: 0; border-radius: 6px; background: transparent; font-size: .8125rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.segmented button:hover, .segmented a:hover { color: var(--ink); }
.segmented .is-active, .segmented [aria-pressed='true'], .segmented [aria-selected='true'] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------ surfaces */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-pad { padding: 1.25rem; }
@media (min-width: 48rem) { .card-pad { padding: 1.5rem; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.card-body { padding: 1.25rem; }
.panel-soft { background: var(--ivory); border-radius: var(--r-lg); }
.badge { display: inline-flex; align-items: center; gap: .35rem; height: 1.45rem; padding: 0 .5rem; border-radius: 5px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; background: var(--ivory); color: var(--ink-2); border: 1px solid var(--line); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-gold { background: var(--gold-soft); color: #7d5f2e; border-color: transparent; }
.badge-dark { background: var(--primary); color: var(--primary-ink); border-color: transparent; }

.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--r); font-size: .875rem; border: 1px solid; }
.alert .icon { margin-top: .1rem; }
.alert-info { background: var(--info-soft); border-color: #cfdeeb; color: #2c4b67; }
.alert-warning { background: var(--warning-soft); border-color: #efd9b3; color: #6f4910; }
.alert-danger { background: var(--danger-soft); border-color: #efc9c5; color: #862720; }
.alert-success { background: var(--success-soft); border-color: #cae0d0; color: #2d5c3f; }

.avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--ink-2); font-size: .78rem; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: .7rem .8rem; font-size: .875rem; font-weight: 600; color: var(--muted); white-space: nowrap; border: 0; background: none; display: inline-flex; gap: .4rem; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.is-active, .tab[aria-selected='true'] { color: var(--ink); }
.tab.is-active::after, .tab[aria-selected='true']::after { content: ''; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px; }
.tab .count { font-size: .72rem; padding: 0 .35rem; border-radius: 4px; background: var(--ivory); color: var(--muted); }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .7rem 1rem; background: #fdfbf8; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: #fdfaf6; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; justify-content: flex-end; gap: .25rem; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; font-size: .8125rem; color: var(--muted); }

/* ------------------------------------------------ dialogs & drawers */
dialog.dialog { border: 0; padding: 0; border-radius: 12px; width: min(100% - 2rem, 30rem); max-height: calc(100svh - 2rem); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; }
dialog.dialog-lg { width: min(100% - 2rem, 44rem); }
dialog.dialog::backdrop { background: rgba(31, 22, 18, .42); backdrop-filter: blur(2px); }
dialog.dialog[open] { animation: dialog-in .22s var(--ease); }
dialog.dialog[open]::backdrop { animation: fade-in .22s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.25rem .25rem; }
.dialog-body { padding: .75rem 1.25rem 1.25rem; }
.dialog-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: #fdfbf8; }
dialog.drawer { margin: 0 0 0 auto; height: 100svh; max-height: 100svh; width: min(100%, 28rem); border-radius: 0; border: 0; padding: 0; background: var(--paper); box-shadow: var(--shadow-lg); }
dialog.drawer::backdrop { background: rgba(31, 22, 18, .35); }
dialog.drawer[open] { animation: drawer-in .28s var(--ease); display: flex; flex-direction: column; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@media (max-width: 47.99rem) {
  dialog.drawer { margin: auto 0 0; width: 100%; max-width: 100%; height: auto; max-height: 90svh; border-radius: 14px 14px 0 0; }
  dialog.drawer[open] { animation: sheet-in .3s var(--ease); }
  dialog.dialog { margin-bottom: 0; width: 100%; max-width: 100%; border-radius: 14px 14px 0 0; }
  dialog.dialog[open] { animation: sheet-in .3s var(--ease); }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; justify-content: flex-end; }

/* toast */
.toasts { position: fixed; z-index: 200; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; width: min(100% - 2rem, 23rem); pointer-events: none; }
@media (max-width: 47.99rem) { .toasts { left: 1rem; right: 1rem; bottom: calc(4.75rem + env(safe-area-inset-bottom)); width: auto; } }
.toast { pointer-events: auto; display: flex; gap: .65rem; align-items: flex-start; padding: .8rem .9rem; border-radius: var(--r); background: var(--ink); color: #f8f2ea; box-shadow: var(--shadow-lg); font-size: .875rem; animation: toast-in .3s var(--ease); }
.toast.is-leaving { animation: toast-out .2s ease-in forwards; }
.toast .icon { margin-top: .1rem; }
.toast-success .icon { color: #8fd0a4; }
.toast-error .icon { color: #f2a39c; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* dropdown (details) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 60; min-width: 13rem; padding: .35rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: dialog-in .15s var(--ease); }
.dropdown-menu.left { right: auto; left: 0; }
.dropdown-menu.up { top: auto; bottom: calc(100% + .35rem); }
.menu-item { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--r-sm); font-size: .875rem; color: var(--ink-2); border: 0; background: none; text-align: left; }
.menu-item:hover { background: var(--ivory); color: var(--ink); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: .3rem 0; }

/* tooltip */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 0; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 600; padding: .3rem .5rem; border-radius: 5px; white-space: nowrap; pointer-events: none; z-index: 80; animation: fade-in .12s; }
[data-tip-pos='bottom']:hover::after { bottom: auto; top: calc(100% + 6px); }

/* progress */
.progress { height: 6px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--maroon), var(--terracotta)); border-radius: inherit; transition: width .6s var(--ease); }
.ring { --p: 0; width: 3rem; height: 3rem; border-radius: 50%; background: conic-gradient(var(--maroon) calc(var(--p) * 1%), var(--sand) 0); display: grid; place-items: center; }
.ring::before { content: attr(data-label); width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: .75rem; font-weight: 700; }

/* skeleton */
.skeleton { background: linear-gradient(90deg, var(--ivory) 0%, #fbf7f1 50%, var(--ivory) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty states */
.empty { display: grid; justify-items: center; text-align: center; gap: .75rem; padding: 3rem 1.5rem; }
.empty__art { width: 8rem; color: var(--gold); margin-bottom: .5rem; }
.empty__title { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; }
.empty__text { color: var(--muted); max-width: 26rem; }

/* checklist */
.checklist { display: grid; gap: .1rem; }
.check-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: var(--r-sm); font-size: .9rem; color: var(--ink-2); }
a.check-item:hover { background: var(--ivory); }
.check-item__mark { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; color: #fff; }
.check-item.is-done { color: var(--muted); }
.check-item.is-done .check-item__label { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.check-item.is-done .check-item__mark { background: var(--sage); border-color: var(--sage); }
.check-item__go { margin-left: auto; color: var(--faint); }

/* stat */
.stat { padding: 1rem 1.1rem; }
.stat__label { font-size: .78rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.stat__value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat__hint { font-size: .78rem; color: var(--faint); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* device frames */
.device-desktop { border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(40, 28, 20, .08), 0 40px 80px -40px rgba(40, 28, 20, .45); overflow: hidden; }
.device-desktop__bar { height: 1.9rem; display: flex; align-items: center; gap: .35rem; padding: 0 .75rem; background: #f3eee7; border-bottom: 1px solid var(--line); }
.device-desktop__bar i { width: 8px; height: 8px; border-radius: 50%; background: #ddd2c3; }
.device-desktop__url { margin-left: .75rem; flex: 1; max-width: 22rem; height: 1.2rem; border-radius: 5px; background: #fff; font-size: .68rem; color: var(--muted); display: flex; align-items: center; padding: 0 .55rem; overflow: hidden; white-space: nowrap; }
.device-phone { border-radius: 30px; padding: 8px; background: #1c1917; box-shadow: 0 40px 70px -35px rgba(20, 12, 8, .6); }
.device-phone__screen { border-radius: 23px; overflow: hidden; background: #fff; position: relative; }
.frame-scale { position: relative; overflow: hidden; }
.frame-scale iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }

/* ------------------------------------------------ app shell */
.app { min-height: 100svh; }
.app-sidebar { display: none; }
.app-main { padding: 1.25rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 1rem; background: rgba(251, 248, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
@media (min-width: 64rem) {
  .app { display: grid; grid-template-columns: var(--sidebar) 1fr; }
  .app-sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100svh; border-right: 1px solid var(--line); background: #f8f4ee; padding: 1rem .75rem; }
  .app-topbar { display: none; }
  .app-main { padding: 2rem clamp(1.5rem, 4vw, 3.5rem) 4rem; }
  .bottom-nav { display: none !important; }
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.02em; font-size: 1.02rem; color: var(--ink); }
.brand__mark { width: 1.75rem; height: 1.75rem; border-radius: 7px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; }
.brand__mark svg { width: 1.05rem; height: 1.05rem; }
.nav-list { display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: var(--r); font-size: .9rem; font-weight: 600; color: var(--ink-2); position: relative; }
.nav-link .icon { color: var(--muted); }
.nav-link:hover { background: rgba(235, 226, 212, .55); color: var(--ink); }
.nav-link.is-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.nav-link.is-active .icon { color: var(--maroon); }
.nav-link .nav-count { margin-left: auto; font-size: .7rem; font-weight: 700; background: var(--maroon); color: #fff; border-radius: 999px; min-width: 1.2rem; height: 1.2rem; display: grid; place-items: center; padding: 0 .3rem; }
.nav-section { margin-top: 1.25rem; padding: 0 .65rem .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.site-switch { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .6rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); text-align: left; }
.site-switch:hover { border-color: var(--line-strong); }
.bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255, 253, 249, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: .15rem; padding: .55rem 0 .5rem; font-size: .68rem; font-weight: 700; color: var(--muted); border: 0; background: none; min-height: 3.5rem; }
.bottom-nav .is-active { color: var(--primary); }
.bottom-nav .is-active .icon { color: var(--maroon); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head__text { display: grid; gap: .3rem; }
.page { max-width: 72rem; margin-inline: auto; }
.page-narrow { max-width: 48rem; margin-inline: auto; }

/* ------------------------------------------------ marketing */
.site-header { position: sticky; top: 0; z-index: 50; transition: background-color .25s, box-shadow .25s; }
.site-header.is-scrolled { background: rgba(251, 248, 243, .9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.site-header__inner { height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-nav { display: none; gap: 1.75rem; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }
@media (min-width: 56rem) { .site-nav { display: flex; } }
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; background: #f7f2eb; margin-top: auto; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); } }
.footer-col h4 { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.footer-col a { display: block; padding: .25rem 0; color: var(--ink-2); font-size: .9rem; }
.footer-col a:hover { color: var(--ink); }
.mobile-menu { position: fixed; inset: 4rem 0 auto 0; background: var(--canvas); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; display: grid; gap: .25rem; z-index: 49; box-shadow: var(--shadow-lg); }
.mobile-menu a { padding: .75rem .25rem; font-weight: 600; border-bottom: 1px solid var(--line); }

/* auth split */
.auth { min-height: 100svh; display: grid; }
@media (min-width: 60rem) { .auth { grid-template-columns: 1.05fr 1fr; } }
.auth__visual { display: none; position: relative; overflow: hidden; color: #fff; }
@media (min-width: 60rem) { .auth__visual { display: block; } }
.auth__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth__visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 12, 10, .15), rgba(20, 12, 10, .1) 40%, rgba(20, 12, 10, .72)); }
.auth__quote { position: absolute; left: 2.5rem; right: 2.5rem; bottom: 2.5rem; z-index: 1; }
.auth__panel { display: flex; flex-direction: column; padding: 1.25rem; }
.auth__form { width: min(100%, 24rem); margin: auto; padding: 2rem 0; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: .6rem; height: 2.75rem; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--paper); font-weight: 600; font-size: .9rem; }
.google-btn:hover { background: var(--ivory); }
.or { display: flex; align-items: center; gap: .75rem; color: var(--faint); font-size: .78rem; margin: 1.25rem 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* reveal (marketing) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* The header on the narrowest phones still in use (320px): the brand, the one action
   and the menu have to share 280px, so the wordmark gives up its letters before
   anything is pushed off the side of the page. */
@media (max-width: 26rem) {
  .site-header__inner { gap: .5rem; }
  .site-header__inner > a:first-child, .site-header__inner > .row { min-width: 0; }
  .site-header__inner > .row { flex-wrap: nowrap; }
  .brand { font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header__inner .btn { padding: 0 .7rem; }
}

/* The header stays at the top of the page, so a link to a section has to stop short of
   it — otherwise the heading somebody just asked for arrives underneath it. */
html { scroll-padding-top: 5rem; }

/* ---------------------------------------------------------------- design unlocked
   The one page in the workspace that is allowed to be a moment rather than a tool.
   It is reached only by a payment that actually went through. An ivory card hung with a
   toran, a pressed wax seal, the design itself in a gilt frame, and the way into the
   builder. Motion runs only under .ready--celebrate (the first view after paying); a
   refresh or a return visit renders the settled page. Scoped to .ready throughout. */
.ready { position: relative; max-width: 68rem; margin: clamp(.5rem, 3vw, 2rem) auto; display: grid; gap: 2rem;
  padding: clamp(2.25rem, 5vw, 3.75rem) clamp(1.25rem, 4.5vw, 3.5rem) clamp(1.75rem, 4vw, 3rem);
  background: radial-gradient(120% 70% at 50% 0%, #fffdf8 0%, var(--ivory) 70%, #f1e8da 100%);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); isolation: isolate; }
/* A double gilt hairline inset from the edge, the way an invitation card is bordered. */
.ready::before { content: ''; position: absolute; inset: .55rem; border: 1px solid rgba(168, 131, 74, .38);
  border-radius: 10px; pointer-events: none; z-index: -1; box-shadow: inset 0 0 0 3px var(--ivory), inset 0 0 0 4px rgba(168, 131, 74, .18); }
.ready__toran { position: absolute; top: .55rem; left: 8%; width: 84%; height: 1.4rem; color: var(--gold); opacity: .7; }

/* On a phone the card is one column read in the order that matters: the news, the design
   it is about, the way in, then the receipt details. The copy block dissolves into the
   card's grid (display: contents) so the design can sit between the words and the buttons. */
.ready { gap: 0; text-align: center; }
.ready__copy { display: contents; }
.ready__seal { order: 1; } .ready__eyebrow { order: 2; } .ready__title { order: 3; } .ready__lede { order: 4; }
.ready__stage { order: 5; }
.ready__actions { order: 6; } .ready__rule { order: 7; } .ready__facts { order: 8; } .ready__note { order: 9; }

.ready__seal { width: 5rem; height: 5rem; margin-inline: auto; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, #a54a54 0%, var(--maroon) 42%, #6e2c35 100%);
  box-shadow: 0 10px 28px -12px rgba(138, 59, 69, .6), inset 0 1px 1px rgba(255, 255, 255, .28);
  color: #fdf3ea; position: relative; }
.ready__seal::after { content: ''; position: absolute; inset: .4rem; border-radius: 50%; border: 1px dashed rgba(253, 243, 234, .45); }
.ready__seal svg { width: 2rem; height: 2rem; position: relative; }
.ready__halo { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; }

.ready__eyebrow { margin: 1.25rem 0 0; color: var(--success); }
.ready__title { font-size: clamp(2.3rem, 7.5vw, 3.6rem); margin: .4rem 0 0; color: var(--primary); text-wrap: balance; }
.ready__lede { margin: .85rem auto 0; max-width: 32rem; color: var(--ink-2); font-size: 1rem; text-wrap: pretty; }
.ready__lede strong { color: var(--ink); font-weight: 700; }

.ready__rule { display: flex; align-items: center; gap: .75rem; width: 100%; max-width: 18rem; margin: 1.5rem auto 0; color: var(--gold); }
.ready__rule::before, .ready__rule::after { content: ''; flex: 1; height: 1px; }
.ready__rule::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.ready__rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.ready__rule svg { width: 2rem; height: 1.15rem; }

.ready__facts { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.25rem; margin: 1.35rem auto 0; max-width: 26rem; text-align: left; }
.ready__facts div { min-width: 0; }
.ready__facts dt { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ready__facts dd { margin: .15rem 0 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ready__facts-wide { grid-column: 1 / -1; }
.ready__facts-note { font-weight: 400; color: var(--muted); font-size: .8125rem; }

.ready__actions { margin-top: 1.5rem; display: grid; gap: .65rem; }
.ready__actions form, .ready__actions .btn { width: 100%; }
.ready__go { box-shadow: 0 12px 26px -14px rgba(59, 31, 36, .75); }
.ready__note { margin-top: 1.1rem; color: var(--muted); font-size: .8125rem; line-height: 1.7; }
.ready__note .link { font-weight: 600; }

/* The stage: the desktop design in a quiet browser frame, its phone version leaning in. */
.ready__stage { position: relative; width: 100%; max-width: 32rem; margin: 2rem auto 0; min-width: 0; }
.ready__browser { background: var(--paper); border-radius: var(--r-lg); padding: .45rem; box-shadow: var(--shadow-lg);
  outline: 1px solid rgba(168, 131, 74, .45); outline-offset: 3px; }
.ready__bar { display: flex; gap: .3rem; padding: .15rem .25rem .45rem; }
.ready__bar i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--sand); }
.ready__shot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: var(--r-sm); background: var(--sand); }
.ready__phone { position: absolute; right: -.25rem; bottom: 2.25rem; width: 24%; min-width: 5.25rem; max-width: 9.5rem;
  padding: .3rem; background: var(--primary); border-radius: 1rem; box-shadow: 0 18px 40px -16px rgba(40, 28, 20, .55); }
.ready__phone img { display: block; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top;
  border-radius: .75rem; background: var(--sand); }
.ready__plate { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .35rem .75rem; margin-top: 1.1rem; }
.ready__name { font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; color: var(--primary); }

@media (min-width: 34rem) {
  .ready__actions { grid-template-columns: auto auto; justify-content: center; }
  .ready__actions form, .ready__actions .btn { width: auto; }
  .ready__actions .btn { min-width: 13rem; }
}
/* Side by side once there is room for the design to be seen properly next to the words. */
@media (min-width: 64rem) {
  .ready { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 3.5rem; text-align: left; }
  .ready__copy { display: flex; flex-direction: column; }
  .ready__copy > * { order: 0; }
  .ready__stage { margin: 0; max-width: none; }
  .ready__seal { margin-inline: 0; }
  .ready__lede, .ready__facts, .ready__rule { margin-left: 0; }
  .ready__rule::before { display: none; }
  .ready__actions { justify-content: start; }
  .ready__plate { justify-content: flex-start; }
  .ready__phone { right: -1.25rem; }
}

/* ---- the moment itself, first view only */
.ready--celebrate .ready__copy > *, .ready--celebrate .ready__stage { animation: ready-rise .5s var(--ease) both; animation-delay: var(--d, 0ms); }
.ready--celebrate .ready__seal { animation: ready-press .65s cubic-bezier(.34, 1.56, .64, 1) both; }
.ready--celebrate .ready__halo { animation: ready-halo 1.1s .32s var(--ease) both; }
.ready--celebrate .ready__tick { stroke-dasharray: 22; stroke-dashoffset: 22; animation: ready-tick .4s .42s var(--ease) forwards; }
.ready--celebrate .ready__phone { animation: ready-lean .7s .5s cubic-bezier(.34, 1.4, .64, 1) both; }

/* Petals, not confetti: slow, few, marigold and rose, gone in six seconds. Decorative
   only, so hidden from assistive tech and never in the way of a tap. */
.ready-petals { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.ready-petals i { position: absolute; top: -6vh; left: var(--x); width: .55rem; height: .8rem; border-radius: 60% 60% 55% 55% / 70% 70% 40% 40%;
  background: var(--c); opacity: 0; transform-origin: 50% 0;
  animation: ready-fall var(--dur) cubic-bezier(.35, .05, .55, 1) var(--delay) both; }

@keyframes ready-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ready-press {
  0% { opacity: 0; transform: scale(1.45) translateY(-14px); }
  55% { opacity: 1; transform: scale(.93) translateY(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes ready-halo { 0% { opacity: .85; transform: scale(1); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes ready-tick { to { stroke-dashoffset: 0; } }
@keyframes ready-lean { from { opacity: 0; transform: translate(14px, 18px) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes ready-fall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  12% { opacity: .9; }
  80% { opacity: .55; }
  100% { opacity: 0; transform: translateY(108vh) translateX(var(--drift)) rotate(var(--spin)); }
}
@media (prefers-reduced-motion: reduce) {
  .ready-petals { display: none; }
  .ready--celebrate .ready__tick { stroke-dashoffset: 0; }
}
