/* VZN Pocket on Gold Glass. Colours come only from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--c-bg); color: var(--c-text);
  font: 400 15px/22px var(--font-body); overflow-x: hidden;
  --glass: color-mix(in srgb, var(--c-surface) 72%, transparent);
  --glass-strong: color-mix(in srgb, var(--c-surface) 88%, transparent);
  --hair: color-mix(in srgb, var(--c-text) 10%, transparent);
  --gold-soft: color-mix(in srgb, var(--c-primary) 18%, transparent);
}
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--c-text); outline-offset: 2px; border-radius: 8px; }

/* backdrop glows */
.glow { position: fixed; width: 520px; height: 520px; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; z-index: 0; }
.glow.a { background: color-mix(in srgb, var(--c-primary) 45%, transparent); top: -220px; right: -180px; animation: drift 14s var(--ease) infinite alternate; }
.glow.b { background: color-mix(in srgb, var(--c-accent) 28%, transparent); bottom: -260px; left: -220px; animation: drift 18s var(--ease) infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-40px, 60px) scale(1.08); } }

/* shell */
#app { position: relative; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-3); padding: calc(env(safe-area-inset-top) + 10px) var(--space-4) 10px; background: color-mix(in srgb, var(--c-bg) 80%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.top-date { margin-left: auto; color: var(--c-text-soft); font-weight: 600; font-size: 13px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font: 800 19px/1 var(--font-display); font-stretch: 112%; letter-spacing: -.02em; }
.mark { width: 28px; height: 28px; }
.mark-bg { fill: var(--c-primary); }
.mark-fg { fill: var(--c-on-primary); }
.mark-fg.o7 { opacity: .7; } .mark-fg.o5 { opacity: .45; }
.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--glass-strong); border: 1px solid var(--hair); font: 700 13px/1 var(--font-body); text-decoration: none; }
.content { position: relative; z-index: 1; padding: var(--space-2) var(--space-4) calc(110px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
.tabbar { position: fixed; z-index: 6; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 26px; background: var(--glass-strong); border: 1px solid var(--hair); box-shadow: var(--shadow-2); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 20px; text-decoration: none; font-size: 11px; font-weight: 700; color: var(--c-text-soft); transition: background .2s var(--ease); }
.tabbar a.on { background: var(--c-text); color: var(--c-bg); }

/* type and headers */
.greet { margin: var(--space-3) 0 var(--space-4); }
.date { margin: 0; color: var(--c-text-soft); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .7px; }
.greet h1, .page-head h1 { font: 900 28px/32px var(--font-display); font-stretch: 118%; letter-spacing: -.02em; }
.page-head { display: flex; align-items: flex-start; gap: var(--space-3); margin: var(--space-3) 0 var(--space-4); }
.sub { margin: 4px 0 0; color: var(--c-text-soft); }
.eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--space-2); font: 800 12px/16px var(--font-body); letter-spacing: .7px; text-transform: uppercase; color: var(--c-text-soft); }
.section { margin: var(--space-5) 0 var(--space-2); font: 800 12px/16px var(--font-body); letter-spacing: .7px; text-transform: uppercase; color: var(--c-text-soft); display: flex; gap: 8px; align-items: center; }
.hint { margin: var(--space-2) 0 0; color: var(--c-text-soft); font-size: 13px; line-height: 18px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hint.center { justify-content: center; }
.mono { font: 400 12px/18px var(--font-mono); }

/* glass card */
.card { position: relative; background: var(--glass); border: 1px solid var(--hair); border-radius: var(--r-card); padding: var(--space-4); box-shadow: var(--shadow-1); backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2); }
.inset { background: var(--gold-soft); border-radius: calc(var(--r-card) - 8px); padding: var(--space-3) var(--space-4); }

/* hero */
.hero { background: var(--c-primary); color: var(--c-on-primary); border-radius: var(--r-card); padding: var(--space-4); box-shadow: var(--shadow-2); animation: rise .5s var(--ease); }
.hero h2 { font: 900 20px/25px var(--font-display); font-stretch: 112%; letter-spacing: -.01em; margin-bottom: var(--space-3); }
.hero.done h2 { margin: 0; }
.hero .eyebrow { color: var(--c-on-primary); opacity: .8; margin: 0; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: var(--space-2); flex-wrap: wrap; }
.streak { font: 700 12px/16px var(--font-mono); padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c-on-primary) 14%, transparent); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.check-row { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: 6px 10px; border-radius: 16px; background: color-mix(in srgb, var(--c-surface) 40%, transparent); cursor: pointer; position: relative; }
.check-row input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.check-row .box { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--c-on-primary); flex: none; }
.check-row .box .ic { opacity: 0; }
.check-row input:checked + .box { background: var(--c-on-primary); color: var(--c-primary); }
.check-row input:checked + .box .ic { opacity: 1; }
.check-row input:checked ~ .row-main strong { text-decoration: line-through; opacity: .65; }
.check-row input:focus-visible + .box { outline: 2px solid var(--c-on-primary); outline-offset: 2px; }
.check-row small { opacity: .75; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin: var(--space-3) 0; }
.tile { background: var(--gold-soft); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; }
.tile strong { font: 900 24px/28px var(--font-display); font-stretch: 112%; }
.tile span { font-size: 12px; color: var(--c-text-soft); line-height: 16px; }

/* modules */
.modules { display: grid; gap: var(--space-3); }
.module { animation: rise .45s var(--ease) both; }
.modules .module:nth-child(2) { animation-delay: .05s; } .modules .module:nth-child(3) { animation-delay: .1s; } .modules .module:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.mod-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-2); }
.mod-head h3 { font: 800 16px/22px var(--font-display); flex: 1; min-width: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 6px 0; border-top: 1px solid var(--hair); }
.row:first-child { border-top: 0; }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-main strong { font-weight: 650; overflow-wrap: anywhere; }
.row-main small { color: var(--c-text-soft); font-size: 13px; line-height: 18px; }
.time { font: 500 12px/16px var(--font-mono); color: var(--c-text-soft); width: 64px; flex: none; }
.due { font-size: 12px; font-weight: 700; color: var(--c-text-soft); }
.tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--c-line); flex: none; }
.pill-date { font: 600 12px/16px var(--font-body); padding: 6px 10px; border-radius: 999px; background: var(--c-surface-alt); white-space: nowrap; }
.pill-date.hot { background: var(--c-primary); color: var(--c-on-primary); }
.amount { font: 600 14px/20px var(--font-mono); }
.focus { margin: 0; font: 800 18px/24px var(--font-display); }
.brief { margin: 0; }
.stat { display: flex; align-items: baseline; gap: 10px; }
.stat strong { font: 900 32px/36px var(--font-display); font-stretch: 115%; }
.stat span { color: var(--c-text-soft); }
.bar { height: 10px; border-radius: 999px; background: var(--c-surface-alt); overflow: hidden; margin-top: var(--space-2); }
.bar i { display: block; height: 100%; background: var(--c-primary); border-radius: inherit; }
.quiet-line { display: flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; color: var(--c-warning); font-size: 13px; font-weight: 600; text-decoration: none; }
.quiet-line.static { min-height: 0; margin-top: var(--space-2); }

/* chips and badges */
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--hair); background: var(--glass-strong); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; transition: transform .15s var(--ease), background .2s; }
.chip:hover { background: var(--gold-soft); }
.chip:active { transform: scale(.97); }
.chip.tiny { min-height: 0; padding: 3px 9px; font-size: 11px; cursor: default; background: var(--c-surface-alt); border: 0; }
.cal-work { background: color-mix(in srgb, var(--c-accent) 18%, transparent) !important; }
.cal-family { background: var(--gold-soft) !important; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 700 11px/16px var(--font-body); white-space: nowrap; background: var(--c-surface-alt); color: var(--c-text-soft); vertical-align: middle; }
.badge.ok { background: color-mix(in srgb, var(--c-success) 16%, transparent); color: var(--c-success); }
.badge.gold, .badge.plus { background: var(--gold-soft); color: var(--c-accent); }
.badge.pro { background: var(--c-text); color: var(--c-bg); }
.badge.soft { background: var(--c-surface-alt); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--c-primary); color: var(--c-on-primary); box-shadow: 0 8px 22px -12px var(--c-primary); }
.btn.primary:hover { filter: brightness(.96); }
.btn.secondary { background: var(--glass-strong); border-color: var(--hair); }
.btn.secondary:hover { background: var(--gold-soft); }
.btn.ghost { background: transparent; border-color: var(--hair); }
.btn.danger { background: var(--c-warning); color: var(--c-bg); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 13px; }
.btn.wide { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hair); background: var(--glass-strong); cursor: pointer; flex: none; text-decoration: none; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.quiet { border: 0; background: transparent; color: var(--c-text-soft); }
.link-btn { background: none; border: 0; padding: 0 4px; min-height: 44px; text-decoration: underline; cursor: pointer; color: var(--c-text-soft); font-size: 13px; }
.add-row { margin-top: var(--space-4); }

/* lists */
.list { list-style: none; margin: 0; padding: 4px var(--space-4); }
.lib-row, .order-row, .toggle-row { display: flex; align-items: center; gap: var(--space-3); min-height: 60px; padding: 10px 0; border-top: 1px solid var(--hair); }
.list > li:first-child { border-top: 0; }
.lib-row > .ic { color: var(--c-accent); }
.empty { padding: var(--space-4) 0; color: var(--c-text-soft); }
.order-row .n { font: 600 12px/1 var(--font-mono); color: var(--c-text-soft); width: 18px; }
.order-row strong { flex: 1; min-width: 0; }
.order-btns { display: flex; gap: 4px; }

/* add module */
.builder-cta { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; margin-bottom: var(--space-4); border: 1px solid color-mix(in srgb, var(--c-primary) 55%, transparent); transition: transform .15s var(--ease); }
.builder-cta:hover { transform: translateY(-1px); }
.cta-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--c-primary); color: var(--c-on-primary); flex: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--c-surface-alt); margin-bottom: var(--space-3); }
.seg.narrow { max-width: 320px; }
.seg button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 13px; cursor: pointer; transition: background .2s var(--ease); }
.seg button[aria-selected="true"] { background: var(--c-text); color: var(--c-bg); }

/* builder */
.field { display: block; }
.field > span:first-child { display: block; font-weight: 700; margin-bottom: 6px; }
.input-wrap { position: relative; display: block; }
textarea { width: 100%; resize: vertical; min-height: 96px; padding: 14px 56px 14px 14px; border-radius: 18px; border: 1px solid var(--c-line); background: var(--glass-strong); line-height: 22px; }
textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--gold-soft); }
.mic { position: absolute; right: 8px; top: 8px; }
.consent-line { display: flex; gap: 6px; align-items: flex-start; color: var(--c-text-soft); font-size: 13px; line-height: 18px; margin: var(--space-3) 0 0; }
.preview { margin-top: var(--space-5); }
.trust { margin: var(--space-3) 0; font-size: 13px; line-height: 19px; }
.trust p { margin: 2px 0; }
.actions { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); }
.empty-state { text-align: center; padding: var(--space-6) var(--space-4); color: var(--c-text-soft); }
.empty-state .ic { width: 32px; height: 32px; color: var(--c-accent); }
.empty-state h3 { color: var(--c-text); margin: var(--space-2) 0 4px; font-size: 17px; }
.empty-state p { margin: 0; }

/* pricing */
.tiers { display: grid; gap: var(--space-3); }
.tier h2 { font: 900 20px/24px var(--font-display); font-stretch: 112%; }
.tier .price { margin: var(--space-2) 0 0; font: 900 30px/34px var(--font-display); }
.tier .price small { font: 600 14px/20px var(--font-body); color: var(--c-text-soft); }
.tier.featured { border: 2px solid var(--c-primary); }
.ticks { list-style: none; padding: 0; margin: var(--space-3) 0 var(--space-4); display: grid; gap: 6px; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; }
.ticks .ic { color: var(--c-success); margin-top: 3px; }
.cap-rule { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--space-4); }
.cap-rule p { margin: 0; font-size: 13px; line-height: 19px; }
.legal { color: var(--c-text-soft); font-size: 12px; line-height: 18px; margin-top: var(--space-3); }
.legal a { display: inline-block; min-height: 44px; line-height: 44px; }

/* connections, settings */
.sticky-cta { position: sticky; bottom: calc(88px + env(safe-area-inset-bottom)); margin-top: var(--space-4); z-index: 2; }
.plan-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.plan-card h2 { font: 900 20px/26px var(--font-display); }
.switch { position: relative; width: 52px; height: 44px; flex: none; display: grid; place-items: center; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { width: 48px; height: 28px; border-radius: 999px; background: var(--c-line); position: relative; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-surface); box-shadow: var(--shadow-1); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--c-primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--c-text); outline-offset: 2px; }
.danger-zone p { margin: 0 0 var(--space-3); color: var(--c-text-soft); }
.confirm { display: flex; gap: 10px; align-items: center; min-height: 44px; margin-bottom: var(--space-3); cursor: pointer; }
.confirm input { width: 22px; height: 22px; accent-color: var(--c-text); }
[data-reset] { margin-top: var(--space-4); }

/* toast */
.toast { position: fixed; z-index: 9; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--c-text); color: var(--c-bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-2); transition: opacity .25s, transform .25s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* desktop */
@media (min-width: 1024px) {
  .topbar, .tabbar { display: none; }
  .side { display: flex; flex-direction: column; position: fixed; z-index: 4; top: 16px; bottom: 16px; left: 16px; width: 232px; padding: var(--space-4); border-radius: 28px; background: var(--glass-strong); border: 1px solid var(--hair); box-shadow: var(--shadow-1); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
  .side nav { display: grid; gap: 4px; margin-top: var(--space-5); }
  .side nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 16px; text-decoration: none; font-weight: 650; color: var(--c-text-soft); }
  .side nav a:hover { background: var(--gold-soft); }
  .side nav a.on { background: var(--c-text); color: var(--c-bg); }
  .side-foot { margin-top: auto; display: flex; gap: 10px; align-items: center; }
  .side-foot span:last-child { display: flex; flex-direction: column; font-size: 13px; }
  .side-foot small { color: var(--c-text-soft); }
  .content { max-width: 1040px; margin: 0 0 0 264px; padding: var(--space-6) var(--space-6) var(--space-7); }
  .greet h1, .page-head h1 { font-size: 36px; line-height: 40px; }
  .today { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
  .today .greet, .today .add-row { grid-column: 1 / -1; }
  .today .hero { grid-column: 1; }
  .today .tiles { grid-column: 2; margin: 0; grid-template-columns: 1fr; align-content: start; }
  .today .tiles .tile { flex-direction: row; align-items: baseline; gap: 12px; padding: 18px 20px; }
  .today .tiles .tile span { font-size: 14px; }
  .today .modules { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
  .today .add-row { max-width: 360px; }
  .split { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-6); align-items: start; }
  .split aside .section:first-child { margin-top: 0; }
  .builder .preview { margin-top: 0; }
  .tiers { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .tier { display: flex; flex-direction: column; }
  .tier .ticks { flex: 1; }
  .tier > .badge { align-self: flex-start; }
  .sticky-cta { position: static; max-width: 360px; }
  .conn-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); }
  .toast { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
