/* Account pages: sign up, login and the dashboards. Same palette and type as the website. */
:root {
  --ground: #ffffff;
  --surface: #f5f4f2;
  --surface-2: #ecebe8;
  --ink: #1f1f1e;
  --muted: #555553;
  --line: #dcdad5;
  --charcoal: #373736;
  --terra: #a95d3f;
  --orange: #d16d39;
  --sky: #80b9c9;
  --sky-deep: #2f6f80;
  --olive: #636d34;
  --olive-soft: #e7ead9;
  --sky-soft: #e3f0f4;
  --terra-soft: #f4e6df;
  --danger: #a3361f;
  --ok: #4f5a24;
  --wa: #25d366;
  --wa-ink: #05301a;
  --focus: #1f1f1e;
  --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
:root[data-theme="dark"] {
  --ground: #121211; --surface: #1c1c1b; --surface-2: #262625; --ink: #f3f2ee; --muted: #b0afab; --line: #3a3a38;
  --charcoal: #2a2a29; --sky-deep: #80b9c9; --olive-soft: #262a1a; --sky-soft: #172a30; --terra-soft: #2e1f19;
  --danger: #f08a70; --ok: #b9c77c; --focus: #80b9c9; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .92; letter-spacing: 0; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 999px; z-index: 50; }
.skip:focus { top: 12px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.wordmark { font: 400 28px/1 var(--display); text-transform: uppercase; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; margin-right: auto; }
.lang-switch { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 4px; }
.lang-switch button { border: 0; background: none; min-width: 40px; min-height: 36px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--surface); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.pill.help { background: var(--terra); color: #fff; }
.pill svg { width: 18px; height: 18px; }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--ink); color: var(--ground); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), opacity .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.link-btn { border: 0; background: none; padding: 6px 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--ground); font-size: 16px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 45%, transparent); }
.field small { color: var(--muted); font-size: 13px; }
.field.bad input, .field.bad select { border-color: var(--danger); }
.row2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); }
.form-err { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 1em; }
.note { background: var(--sky-soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; }

/* Auth page */
.auth { max-width: 1240px; margin: 0 auto; padding: 8px 16px 48px; display: grid; gap: 16px; }
@media (min-width: 960px) { .auth { grid-template-columns: 1fr 1.05fr; align-items: start; padding-top: 16px; } }
.auth-pic { position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface); min-height: 260px; }
.auth-pic img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.auth-pic .cap { position: absolute; left: 16px; right: 16px; bottom: 16px; background: var(--ground); color: var(--ink); border-radius: 18px; padding: 16px 18px; }
.auth-pic .cap h1 { font-size: clamp(34px, 4.4vw, 60px); }
.auth-pic .cap p { margin-top: 8px; color: var(--muted); font-size: 15px; }
@media (min-width: 960px) { .auth-pic { position: sticky; top: 76px; min-height: calc(100vh - 100px); } }
.auth-card { background: var(--surface); border-radius: var(--r); padding: clamp(20px, 3vw, 40px); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--ground); border-radius: 999px; padding: 5px; margin-bottom: 26px; }
.tabs button { border: 0; background: none; min-height: 46px; border-radius: 999px; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--ground); }
.auth-card h2 { font-size: clamp(30px, 3vw, 42px); }
.auth-card form { display: grid; gap: 16px; margin-top: 18px; }
.roles { display: grid; gap: 12px; }
@media (min-width: 560px) { .roles { grid-template-columns: 1fr 1fr; } }
.role { position: relative; display: grid; gap: 8px; padding: 20px; border-radius: 18px; background: var(--ground); border: 2px solid transparent; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.role:hover { transform: translateY(-2px); }
.role input { position: absolute; opacity: 0; pointer-events: none; }
.role .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--olive-soft); color: var(--olive); }
.role.mentor .ico { background: var(--sky-soft); color: var(--sky-deep); }
.role .ico svg { width: 26px; height: 26px; }
.role b { font-size: 18px; }
.role span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.role:has(input:checked) { border-color: var(--ink); }
.role:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.role .tick { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--ground); display: none; place-items: center; }
.role:has(input:checked) .tick { display: grid; }
.role .tick svg { width: 16px; height: 16px; }
.step-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.step-head i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); font-style: normal; overflow: hidden; }
.step-head i::after { content: ""; display: block; height: 100%; width: var(--p, 50%); background: var(--ink); border-radius: 4px; transition: width .4s var(--ease); }
.minor-box { display: grid; gap: 14px; background: var(--terra-soft); border-radius: 16px; padding: 16px; }
.sub { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.done-card { text-align: left; display: grid; gap: 14px; }

/* Dashboard */
.dash { max-width: 1240px; margin: 0 auto; padding: 8px 16px 64px; }
.hello { display: grid; gap: 16px; background: var(--charcoal); color: #fff; border-radius: var(--r); padding: clamp(20px, 3vw, 36px); position: relative; overflow: hidden; }
@media (min-width: 900px) { .hello { grid-template-columns: 1.1fr 1fr; align-items: end; } }
.hello h1 { font-size: clamp(40px, 6vw, 84px); }
.hello .role-tag { display: inline-flex; align-self: start; background: var(--sky); color: #1f1f1e; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.hello p.lead { color: #d9d8d4; margin-top: 12px; max-width: 46ch; }
.next { background: #ffffff; color: #1f1f1e; border-radius: 18px; padding: 18px 20px; display: grid; gap: 6px; }
.next .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #555553; }
.next b { font-size: 20px; line-height: 1.25; }
.next .when { color: #2f6f80; font-weight: 600; }
.grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border-radius: var(--r); padding: 22px; display: grid; gap: 14px; align-content: start; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.card .btn.ghost, .auth-card .btn.ghost { background: var(--ground); }
.card.wide { grid-column: 1 / -1; }
@media (min-width: 1100px) { .card.two { grid-column: span 2; } }
.card-h { display: flex; align-items: center; gap: 12px; }
.card-h .dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--c, var(--sky-soft)); color: var(--k, var(--sky-deep)); }
.card-h .dot svg { width: 22px; height: 22px; }
.card-h h2 { font-size: 19px; font-weight: 700; line-height: 1.2; }
.card-h .count { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.empty { color: var(--muted); font-size: 15px; background: var(--ground); border-radius: 14px; padding: 14px 16px; }
.people { display: grid; gap: 10px; }
.person { display: flex; gap: 12px; align-items: center; background: var(--ground); border-radius: 16px; padding: 12px 14px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: var(--a, var(--olive-soft)); color: var(--ak, var(--olive)); }
.person .who { min-width: 0; flex: 1; }
.person .who b { display: block; }
.person .who small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.tag.ok { background: var(--olive-soft); color: var(--ok); }
.tag.warn { background: var(--terra-soft); color: var(--terra); }
.tag.info { background: var(--sky-soft); color: var(--sky-deep); }
:root[data-theme="dark"] .tag.warn { color: #f0a88c; }
.list { display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: flex-start; background: var(--ground); border-radius: 14px; padding: 12px 14px; }
.item { flex-wrap: wrap; }
.item .t { flex: 1 1 160px; min-width: 0; }
.item .t b { display: block; font-weight: 600; }
.item .t small { display: block; color: var(--muted); font-size: 13px; }
.goal { cursor: pointer; align-items: center; }
.goal input { width: 22px; height: 22px; accent-color: var(--olive); flex: none; margin: 0; }
.goal.done .t b { text-decoration: line-through; color: var(--muted); }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; width: 100%; min-width: 0; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--ground); }
.journey { display: grid; gap: 0; }
.journey li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding-bottom: 14px; }
.journey li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.journey li:last-child::before { display: none; }
.journey .mk { width: 28px; height: 28px; border-radius: 50%; background: var(--ground); border: 2px solid var(--line); display: grid; place-items: center; }
.journey .mk svg { width: 14px; height: 14px; }
.journey li.on .mk { background: var(--olive); border-color: var(--olive); color: #fff; }
.journey li.on::before { background: var(--olive); }
.journey span { padding-top: 3px; font-size: 15px; }
.scale { display: grid; gap: 10px; }
.scale fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.scale legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.faces label { display: grid; place-items: center; min-height: 46px; border-radius: 12px; background: var(--ground); cursor: pointer; font-weight: 700; border: 2px solid transparent; }
.faces input { position: absolute; opacity: 0; }
.faces label:has(input:checked) { border-color: var(--ink); background: var(--sky-soft); }
.faces label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.faces-key { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--ground); border-radius: 14px; padding: 14px; }
.stat b { display: block; font: 400 40px/1 var(--display); }
.stat small { color: var(--muted); font-size: 13px; }
.meter { height: 10px; border-radius: 10px; background: var(--ground); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--p); background: var(--olive); border-radius: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: var(--ground); font-size: 14px; }
.chip.on { background: var(--olive-soft); color: var(--ok); font-weight: 600; }
.safety { background: var(--terra-soft); }
.safety .card-h .dot { --c: var(--terra); --k: #fff; }
.rules li { padding-left: 18px; position: relative; font-size: 15px; }
.rules li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--terra); }
.rules { display: grid; gap: 8px; }
details.more summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.setup { max-width: 640px; margin: 16px auto; background: var(--terra-soft); border-radius: var(--r); padding: 20px 22px; }
.setup b { display: block; font-size: 18px; margin-bottom: 6px; }

/* Theme switch, bottom-left like the website */
.theme-switch { position: fixed; left: 16px; bottom: 16px; z-index: 30; width: 64px; height: 36px; border-radius: 999px; border: 0; background: var(--surface-2); cursor: pointer; padding: 0; box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.theme-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease); }
.theme-switch[aria-checked="true"]::after { transform: translateX(28px); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--ground); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s var(--ease); z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 0; border-radius: var(--r); padding: 0; background: var(--ground); color: var(--ink); width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(20, 20, 19, .55); }
dialog form { padding: 24px; display: grid; gap: 14px; }
dialog h2 { font-size: 22px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media (max-width: 480px) {
  .bar-in { gap: 6px; padding: 8px 16px; }
  .wordmark { font-size: 24px; }
  .bar .pill { padding: 0 12px; font-size: 13px; }
  .lang-switch button { min-width: 34px; }
}

.item .btn.ghost { background: var(--surface); }

/* Continue with Google (Google's light and dark button styles) */
.g-wrap { display: grid; gap: 14px; margin: 14px 0; }
.g-wrap .form-err:empty { display: none; }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 500; }
.btn-google .g-logo { width: 20px; height: 20px; }
:root[data-theme="dark"] .btn-google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
.g-switch { justify-self: start; min-height: 32px; padding: 4px 0; font-size: 13px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Password rules checklist */
.pass-rules { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.pass-rules li { display: inline-flex; align-items: center; gap: 6px; }
.pass-rules li > span:first-child { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); display: inline-grid; place-items: center; transition: background .2s, border-color .2s; }
.pass-rules li.ok { color: var(--ok); font-weight: 600; }
.pass-rules li.ok > span:first-child { background: var(--ok); border-color: var(--ok); }
.pass-rules li.ok > span:first-child::after { content: ""; width: 4px; height: 8px; border: solid var(--ground); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

/* Confirm password: tick draws in when they match, the field shakes when they don't */
.pass-block { display: grid; gap: 14px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 52px; }
.pw-icon { position: absolute; right: 14px; top: 50%; width: 26px; height: 26px; margin-top: -13px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .45s var(--ease); }
.pw-ring { stroke: currentColor; stroke-dasharray: 63; stroke-dashoffset: 63; transition: stroke-dashoffset .5s var(--ease); }
.pw-tick, .pw-x { stroke: currentColor; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .35s var(--ease) .2s; }
.pw-x { stroke-dasharray: 20; stroke-dashoffset: 20; }
.pw-wrap input { color: var(--ink); }
.pw-confirm .pw-msg { color: inherit; min-height: 1.3em; font-weight: 600; transition: color .2s; }
.pw-confirm[data-match="yes"] .pw-icon, .pw-confirm[data-match="no"] .pw-icon { opacity: 1; transform: scale(1); }
.pw-confirm[data-match="yes"] { color: var(--ok); }
.pw-confirm[data-match="yes"] > span:first-child { color: var(--ink); }
.pw-confirm[data-match="yes"] input { border-color: var(--ok); box-shadow: 0 0 0 4px var(--olive-soft); }
.pw-confirm[data-match="yes"] .pw-ring, .pw-confirm[data-match="yes"] .pw-tick { stroke-dashoffset: 0; }
.pw-confirm[data-match="yes"] .pw-icon { animation: pw-pop .5s var(--ease); }
.pw-confirm[data-match="no"] { color: var(--danger); }
.pw-confirm[data-match="no"] > span:first-child { color: var(--ink); }
.pw-confirm[data-match="no"] input { border-color: var(--danger); box-shadow: 0 0 0 4px var(--terra-soft); }
.pw-confirm[data-match="no"] .pw-ring, .pw-confirm[data-match="no"] .pw-x { stroke-dashoffset: 0; }
.pw-confirm.shake .pw-wrap { animation: pw-shake .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes pw-pop { 0% { transform: scale(.4) rotate(-20deg); } 60% { transform: scale(1.18) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes pw-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .pw-confirm.shake .pw-wrap, .pw-confirm[data-match="yes"] .pw-icon { animation: none; }
  .pw-icon, .pw-ring, .pw-tick, .pw-x { transition: none; }
}
