/* HAVII youth app — interactive prototype. Same palette and type as the public site. No inline styles (CSP). */
:root {
  --paper: #FAF6EF; --paper-raised: #FFFDF8; --sand: #F2EDE1; --sand-line: #E3D8C4; --card-line: #E9DFCC; --line-quiet: #DCCFB8;
  --ink: #14201F; --ink-raised: #1B2C2A; --ink-raised-line: #26403D; --ink-soft: #5B6663; --ink-faint: #646E6B; --ink-label: #716652;
  --teal: #0E7C74; --teal-deep: #0B635C; --teal-bright: #2ED9CE; --teal-text: #0B5F59; --teal-wash: #EAF7F5; --teal-wash-line: #C8E7E3;
  --teal-on-ink: #6FD6CB; --mint-on-ink: #B9CFCC; --mint-on-ink-soft: #A9C2BF;
  --clay: #7A2E1A; --clay-text: #7A3B14; --clay-strong: #B24A24; --clay-wash: #FDF0E8; --clay-wash-line: #F0CDB6;
  --display: 'Bricolage Grotesque', Georgia, serif; --body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  --demo-h: 44px;
}
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--ink); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
::selection { background: #A9EFE8; }
img { display: block; max-width: 100%; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 300; padding: 12px 18px; background: var(--ink); color: #F1EDE2; }
.skip:focus { left: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Demo bar */
.demo-bar { position: sticky; top: 0; z-index: 80; display: flex; align-items: center; gap: 12px; padding: 9px 18px; background: #F6E7B8; border-bottom: 1px solid #E6CF85; color: #4A3B0E; font-size: 13px; line-height: 1.4; }
.demo-bar__tag { flex-shrink: 0; padding: 3px 8px; border-radius: 6px; background: #4A3B0E; color: #F6E7B8; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.demo-bar__txt { flex: 1; }
.demo-bar__short { display: none; flex: 1; }
@media (max-width: 720px) { .demo-bar__txt { display: none; } .demo-bar__short { display: block; } .demo-bar { padding: 8px 12px; } }
.demo-bar__txt strong { font-weight: 700; }
.demo-bar__link { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 32px; font-weight: 700; color: #4A3B0E; text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__link:hover { color: #000; }

/* Shell */
.app { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - var(--demo-h)); }
.side { display: none; }
.col { display: flex; flex-direction: column; min-width: 0; }
.top { position: sticky; top: var(--demo-h); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: rgba(250,246,239,0.94); backdrop-filter: blur(10px); border-bottom: 1px solid #EDE3D2; }
.top__mark { width: 32px; height: 32px; border-radius: 10px; background: #000; flex-shrink: 0; }
.top__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top__eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-label); }
.top__title { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.help-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--teal-wash-line); background: var(--teal-wash); color: var(--teal-text); font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color .2s; }
.help-pill:hover { background: #DDF2EF; }
.help-pill .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--teal); }
.help-pill--block { width: 100%; justify-content: center; }
.top__av { width: 44px; height: 44px; flex-shrink: 0; border-radius: 99px; border: 1px solid var(--line-quiet); background: var(--sand); font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--ink); cursor: pointer; }
.view { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 22px 18px 120px; outline: none; }
.view.is-entering { animation: enter .45s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; gap: 2px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(250,246,239,0.96); backdrop-filter: blur(10px); border-top: 1px solid #EDE3D2; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px; border-radius: 14px; font-size: 11px; font-weight: 700; color: var(--ink-faint); transition: background-color .2s, color .2s; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { background: var(--sand); color: var(--ink); }
.tabbar a[aria-current="page"] svg { color: var(--teal); }

@media (min-width: 960px) {
  .app { grid-template-columns: 248px minmax(0, 1fr); }
  .side { position: sticky; top: var(--demo-h); height: calc(100vh - var(--demo-h)); display: flex; flex-direction: column; gap: 26px; padding: 22px 16px; background: var(--ink); color: var(--mint-on-ink); }
  .side__brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.2em; color: var(--teal-on-ink); }
  .side__brand img { border-radius: 10px; background: #000; }
  .side__nav { display: flex; flex-direction: column; gap: 3px; }
  .side__nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 13px; font-size: 15px; font-weight: 600; color: var(--mint-on-ink); transition: background-color .2s, color .2s; }
  .side__nav a:hover { background: var(--ink-raised); color: #F1EDE2; }
  .side__nav a svg { width: 21px; height: 21px; }
  .side__nav a[aria-current="page"] { background: var(--ink-raised); color: #F1EDE2; box-shadow: inset 0 0 0 1px var(--ink-raised-line); }
  .side__nav a[aria-current="page"] svg { color: var(--teal-bright); }
  .side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .side .help-pill { background: var(--ink-raised); border-color: var(--ink-raised-line); color: #F1EDE2; }
  .side .help-pill .dot { background: var(--teal-bright); }
  .acct { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--ink-raised-line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
  .acct:hover { background: var(--ink-raised); }
  .acct__av { width: 36px; height: 36px; border-radius: 99px; background: var(--teal-bright); color: #08201E; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; }
  .acct__t { display: flex; flex-direction: column; }
  .acct__t b { font-size: 14px; color: #F1EDE2; }
  .acct__t i { font-style: normal; font-size: 12px; color: var(--mint-on-ink-soft); }
  .tabbar, .top__mark, .top .help-pill, .top__av { display: none; }
  .top { padding: 16px 32px; }
  .view { padding: 30px 32px 64px; }
}

/* Type + common */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-label); }
.h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.02; letter-spacing: -0.035em; }
.lede { font-size: 16.5px; line-height: 1.6; color: #4A5654; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 26px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--ink-faint); font-size: 14px; line-height: 1.55; }
.page-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: none; font-size: 15px; font-weight: 700; cursor: pointer; transition: background-color .2s, transform .15s, border-color .2s, color .2s; text-align: center; }
.btn:active { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--teal-deep); color: #fff; }
.btn--ink { background: var(--ink); color: #F1EDE2; }
.btn--ink:hover:not(:disabled) { background: #0C1615; color: #F1EDE2; }
.btn--bright { background: var(--teal-bright); color: #08201E; }
.btn--bright:hover:not(:disabled) { background: #22C0B6; color: #08201E; }
.btn--quiet { background: transparent; color: var(--ink); border: 1px solid var(--line-quiet); font-weight: 600; }
.btn--quiet:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.btn--danger { background: transparent; color: var(--clay-strong); border: 1px solid var(--clay-wash-line); font-weight: 600; }
.btn--danger:hover { background: var(--clay-wash); color: var(--clay-text); }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn--ghost-ink { background: transparent; color: #F1EDE2; border: 1px solid #3A5652; font-weight: 600; }
.btn--ghost-ink:hover { border-color: var(--teal-on-ink); color: #F1EDE2; }
.btn--full { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; font-size: 14.5px; color: var(--teal); cursor: pointer; }
.link-btn:hover { color: var(--ink); }

.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 22px; background: var(--paper-raised); border: 1px solid var(--card-line); }
.card--sand { background: var(--sand); border-color: var(--sand-line); }
.card--ink { background: var(--ink); border-color: var(--ink); color: var(--mint-on-ink); }
.card--ink h2, .card--ink h3 { color: #F1EDE2; }
.card--ink .eyebrow { color: var(--teal-on-ink); }
.card--dash { background: transparent; border-style: dashed; border-color: var(--line-quiet); }
.card h2 { font-size: 21px; }
.card h3 { font-size: 18px; }
a.card, button.card { color: inherit; text-align: left; font: inherit; cursor: pointer; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
a.card:hover, button.card:hover { transform: translateY(-3px); border-color: var(--teal-wash-line); box-shadow: 0 18px 40px -26px rgba(20,32,31,0.4); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ic-tile { width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--teal-wash); color: var(--teal-text); }
.ic-tile svg { width: 22px; height: 22px; }
.card--ink .ic-tile { background: var(--ink-raised); color: var(--teal-bright); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sand); border: 1px solid var(--sand-line); color: #3C4745; }
.chip svg { width: 15px; height: 15px; color: var(--teal-text); }
.chip--teal { background: var(--teal-wash); border-color: var(--teal-wash-line); color: var(--teal-text); }
.chip--dash { background: transparent; border-style: dashed; color: var(--ink-label); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--paper); border: 1px dashed var(--line-quiet); color: var(--ink-label); white-space: nowrap; }
.card--ink .badge { background: transparent; border-color: #3A5652; color: var(--mint-on-ink-soft); }

/* Home */
.hello { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 26px 22px 24px; border-radius: 26px; background: var(--ink); color: var(--mint-on-ink); }
.hello__fly { position: absolute; right: -24px; top: -18px; width: 180px; height: 180px; opacity: 0.9; animation: float 9s ease-in-out infinite; pointer-events: none; }
.hello__ring { position: absolute; right: -60px; top: -54px; width: 250px; height: 250px; border-radius: 50%; border: 1px solid rgba(111,214,203,0.2); border-top-color: rgba(46,217,206,0.7); animation: spin 40s linear infinite; pointer-events: none; }
.hello .eyebrow { color: var(--teal-on-ink); position: relative; }
.hello h1 { position: relative; font-size: clamp(30px, 7vw, 44px); line-height: 1; letter-spacing: -0.04em; color: #F1EDE2; max-width: 12ch; }
.hello h1 span { display: block; }
.hello h1 span:last-child { color: var(--teal-bright); }
.hello__greet { position: relative; font-family: var(--display); font-size: 19px; color: #F1EDE2; }
.hello__line { position: relative; font-size: 14.5px; line-height: 1.55; max-width: 44ch; }
@keyframes float { 0%, 100% { transform: translateY(0) scaleX(1); } 50% { transform: translateY(-10px) scaleX(0.95); } }
@keyframes spin { to { transform: rotate(360deg); } }

.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.dash .span-2 { grid-column: auto; }
@media (min-width: 680px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash .span-2 { grid-column: span 2; } }
.checkin-cta { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 22px; background: var(--teal-wash); border: 1px solid var(--teal-wash-line); }
.checkin-cta h2 { font-size: 23px; }
.checkin-cta .emos-mini { display: flex; gap: 6px; }
.checkin-cta .emos-mini span { width: 34px; height: 34px; border-radius: 11px; background: var(--paper-raised); border: 1px solid var(--teal-wash-line); display: flex; align-items: center; justify-content: center; color: var(--teal-text); }
.checkin-cta .emos-mini svg { width: 18px; height: 18px; }
.mini-goal { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--card-line); }
.mini-goal:first-of-type { border-top: 0; }
.mini-goal b { font-size: 15px; display: block; }
.mini-goal span { font-size: 13px; color: var(--ink-faint); }

.ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring--lg { width: 88px; height: 88px; }
.ring__bg { fill: none; stroke: var(--sand-line); }
.ring__fg { fill: none; stroke: var(--teal); stroke-linecap: round; transition: stroke-dasharray .8s var(--ease); }
.ring-wrap { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.ring-wrap b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 20px; }

.miles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.mile { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; border: 1px solid var(--card-line); background: var(--paper); }
.mile__ic { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--sand); color: var(--ink-label); }
.mile__ic svg { width: 17px; height: 17px; }
.mile b { font-size: 13.5px; line-height: 1.3; }
.mile span { font-size: 12px; color: var(--ink-faint); }
.mile[data-done="true"] { background: var(--teal-wash); border-color: var(--teal-wash-line); }
.mile[data-done="true"] .mile__ic { background: var(--teal); color: #fff; }
.mile[data-new="true"] { animation: pop .7s var(--ease); }
@keyframes pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

.res-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--card-line); color: inherit; }
.res-row:first-of-type { border-top: 0; }
.res-row b { display: block; font-size: 15px; }
.res-row span { font-size: 13px; color: var(--ink-faint); }
.res-row .ch { margin-left: auto; color: var(--ink-label); }

/* Check-in */
.emos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .emos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.emo { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 12px 8px; border-radius: 18px; border: 1px solid var(--line-quiet); background: var(--paper-raised); cursor: pointer; font-size: 14px; font-weight: 600; color: #3C4745; transition: transform .2s var(--ease), border-color .2s, background-color .2s; }
.emo:hover { border-color: var(--teal); }
.emo svg { width: 28px; height: 28px; color: var(--ink-soft); transition: transform .3s var(--ease), color .2s; }
.emo[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #F1EDE2; }
.emo[aria-pressed="true"] svg { color: var(--teal-bright); transform: scale(1.1); }
.emo .tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 99px; background: var(--teal-bright); color: #08201E; font-size: 12px; font-weight: 800; display: none; align-items: center; justify-content: center; }
.emo[aria-pressed="true"] .tick { display: flex; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-label); }
.field__hint { font-size: 13px; line-height: 1.5; color: var(--ink-faint); }
.field__err { font-size: 13.5px; font-weight: 600; color: var(--clay-text); }
input[type="text"], input[type="search"], input[type="date"], textarea, select { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line-quiet); border-radius: 14px; background: var(--paper-raised); font-family: var(--body); font-size: 16px; color: var(--ink); }
textarea { line-height: 1.6; resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: 1px; }
[aria-invalid="true"] { border-color: var(--clay-strong) !important; }
.demo-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #FBF2D5; border: 1px solid #EBD89A; color: #4A3B0E; font-size: 13.5px; line-height: 1.5; }
.demo-warn::before { content: "!"; flex-shrink: 0; width: 20px; height: 20px; border-radius: 99px; background: #4A3B0E; color: #FBF2D5; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.ack { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 22px; background: var(--ink); color: var(--mint-on-ink); animation: enter .5s var(--ease); }
.ack h2 { color: #F1EDE2; font-size: 22px; }
.ack p { font-size: 15.5px; line-height: 1.6; }
.ack .hard { padding-top: 12px; border-top: 1px solid var(--ink-raised-line); font-size: 14.5px; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
.tl::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--sand-line); }
.tl:last-child::before { display: none; }
.tl__dot { width: 18px; height: 18px; margin-top: 2px; border-radius: 99px; border: 2px solid var(--teal); background: var(--paper); }
.tl__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--paper-raised); border: 1px solid var(--card-line); }
.tl__body p { font-size: 14.5px; line-height: 1.55; color: #3C4745; }
.tl[data-new="true"] .tl__body { animation: enter .5s var(--ease); border-color: var(--teal-wash-line); }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; }
.bar svg { width: 100%; height: 12px; }
.bar__bg { fill: var(--sand); }
.bar__fg { fill: var(--teal); }
.bar span:last-child { text-align: right; color: var(--ink-faint); }

/* Tabs */
.seg { align-self: flex-start; display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sand); border: 1px solid var(--sand-line); }
.seg button { min-height: 44px; padding: 0 16px; border-radius: 11px; border: 0; background: transparent; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--paper-raised); color: var(--ink); box-shadow: 0 1px 0 var(--sand-line), 0 0 0 1px var(--card-line); }

/* Journal */
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--ink-faint); pointer-events: none; }
.search input { padding-left: 42px; }
.entry { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 18px; background: var(--paper-raised); border: 1px solid var(--card-line); color: inherit; transition: border-color .2s, transform .2s var(--ease); }
.entry:hover { border-color: var(--teal-wash-line); transform: translateY(-2px); color: inherit; }
.entry b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.entry p { font-size: 14px; line-height: 1.5; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry mark { background: #CFF3EF; color: inherit; border-radius: 3px; }
.prompts { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.prompt { flex: 0 0 230px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; border: 1px solid var(--card-line); background: var(--paper-raised); text-align: left; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--ink); cursor: pointer; transition: border-color .2s; }
.prompt:hover { border-color: var(--teal); }
.prompt span { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.editor { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 22px; background: var(--paper-raised); border: 1px solid var(--card-line); }
.editor .title-in { border: 0; border-bottom: 1px solid var(--card-line); border-radius: 0; padding: 6px 0 10px; font-family: var(--display); font-size: 24px; font-weight: 600; background: transparent; }
.editor .title-in:focus { outline: none; border-bottom-color: var(--teal); }
.editor textarea { border: 0; padding: 4px 0; min-height: 260px; background: transparent; font-size: 17px; line-height: 1.7; }
.editor textarea:focus { outline: none; }
.editor__prompt { padding: 10px 12px; border-radius: 12px; background: var(--teal-wash); color: var(--teal-text); font-size: 14px; font-weight: 600; }
.editor__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--card-line); }
.editor__bar .muted { margin-right: auto; }
.reader { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 22px; background: var(--paper-raised); border: 1px solid var(--card-line); }
.reader h2 { font-size: 26px; }
.reader__body { font-size: 17px; line-height: 1.75; white-space: pre-wrap; color: #26302E; }

/* Goals */
.goal-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; }
.goal-card h3 { font-size: 19px; }
.goal-card .h1 { font-size: clamp(26px, 4.6vw, 36px); }
.cat { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-text); }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 14px; border-radius: 16px; border: 1px solid var(--card-line); background: var(--paper-raised); }
.step label { flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15.5px; line-height: 1.4; min-height: 40px; }
.step input { width: 24px; height: 24px; margin: 0; accent-color: var(--teal); flex-shrink: 0; }
.step[data-done="true"] { background: var(--teal-wash); border-color: var(--teal-wash-line); }
.step[data-done="true"] label span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--teal); }
.step[data-just="true"] { animation: pop .6s var(--ease); }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: 0; background: transparent; color: var(--ink-faint); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--sand); color: var(--clay-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.add-step { display: flex; gap: 8px; }
.add-step input { flex: 1; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cats label { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line-quiet); background: var(--paper-raised); font-size: 13.5px; font-weight: 600; line-height: 1.3; cursor: pointer; }
.cats label:has(input:checked) { border-color: var(--ink); background: var(--sand); box-shadow: inset 0 0 0 1px var(--ink); }
.cats input { accent-color: var(--teal); }
.done-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--ink); color: #F1EDE2; animation: enter .5s var(--ease); }
.done-banner img { width: 54px; height: 54px; animation: float 6s ease-in-out infinite; }

/* Explore */
.concept { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 16px; border: 2px dashed #D8B95A; background: #FBF2D5; color: #4A3B0E; }
.concept b { font-family: var(--display); font-size: 17px; }
.concept span { font-size: 14px; line-height: 1.5; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: f; }
.flow li { counter-increment: f; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 15px; line-height: 1.5; }
.flow li::before { content: counter(f); width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--teal-bright); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; }
.flow b { display: block; }
.mprof { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.mprof__av { width: 64px; height: 64px; border-radius: 20px; background: var(--sand); border: 1px dashed var(--line-quiet); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; color: var(--ink-label); }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--card-line); }
.chat__notice { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--sand); font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); }
.chat__msg { max-width: 82%; padding: 10px 13px; border-radius: 15px 15px 15px 5px; background: var(--sand); border: 1px solid var(--sand-line); font-size: 14px; line-height: 1.5; }
.chat__msg--me { align-self: flex-end; border-radius: 15px 15px 5px 15px; background: var(--ink); border-color: var(--ink); color: #F1EDE2; }
.chat__composer { display: flex; gap: 8px; }
.chat__composer input { flex: 1; }
.res-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 680px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.res-cat { display: flex; flex-direction: column; gap: 4px; }
.res-cat ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.res-cat li a { display: flex; flex-direction: column; gap: 2px; min-height: 52px; justify-content: center; padding: 8px 0; border-top: 1px solid var(--card-line); color: inherit; }
.res-cat li:first-child a { border-top: 0; }
.res-cat li a b { font-size: 15px; color: var(--teal-text); }
.res-cat li a:hover b { color: var(--ink); text-decoration: underline; }
.res-cat li a span { font-size: 13px; color: var(--ink-faint); }
.urgent { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 22px; background: var(--clay); color: #FBEFE8; }
.urgent h2 { color: #FBEFE8; font-size: 22px; }
.urgent .eyebrow { color: #F0BFA5; }
.urgent__acts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 560px) { .urgent__acts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.urgent__acts a { display: flex; flex-direction: column; gap: 2px; min-height: 64px; justify-content: center; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); color: #FBEFE8; }
.urgent__acts a:hover { background: rgba(255,255,255,0.18); color: #fff; }
.urgent__acts b { font-size: 16px; }
.urgent__acts span { font-size: 12.5px; color: #F7D9C9; }

/* Empty */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 20px; border-radius: 22px; border: 1px dashed var(--line-quiet); text-align: center; }
.empty img { width: 72px; height: 72px; opacity: 0.85; }
.empty h3 { font-size: 19px; }
.empty p { font-size: 14.5px; color: var(--ink-faint); max-width: 40ch; }

/* Skeleton */
.skel { display: flex; flex-direction: column; gap: 14px; }
.skel span { display: block; border-radius: 22px; background: #EFE8DA; }
.skel span:nth-child(1) { height: 200px; background: #E8E1D2; }
.skel span:nth-child(2) { height: 120px; }
.skel span:nth-child(3) { height: 160px; }

/* Sheet */
.sheet { width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0,0,0,0.5); }
.sheet::backdrop { background: rgba(20,32,31,0.55); backdrop-filter: blur(2px); }
.sheet[open] { animation: sheet .35s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 26px 26px 0 0; } }
.sheet__in { display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet__head h2 { font-size: 24px; }
.radio-cards { display: flex; flex-direction: column; gap: 8px; }
.radio-cards label { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-quiet); background: var(--paper-raised); cursor: pointer; }
.radio-cards label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--sand); }
.radio-cards input { width: 20px; height: 20px; accent-color: var(--teal); }
.radio-cards b { display: block; font-size: 15px; }
.radio-cards span span { font-size: 13px; color: var(--ink-faint); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line-quiet); background: var(--paper-raised); cursor: pointer; font-size: 15px; font-weight: 600; }
.switch input { width: 22px; height: 22px; accent-color: var(--teal); }

/* Toast + burst */
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 120; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #F1EDE2; font-size: 14.5px; font-weight: 600; box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.toast[data-on="true"] { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 28px; left: calc(50% + 124px); } }
.burst { position: fixed; inset: 0; z-index: 110; pointer-events: none; overflow: hidden; }
.burst i { position: absolute; width: 8px; height: 8px; border-radius: 99px; background: var(--teal-bright); animation: burst 1s var(--ease) forwards; }
.burst i:nth-child(3n) { background: var(--teal); width: 6px; height: 6px; }
.burst i:nth-child(4n) { background: #F6E7B8; }
@keyframes burst { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.4); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .burst { display: none; }
}
