:root {
 --bg: #efece4;
 --bg-soft: #f5f2ec;
 --sage: #cfd9c4;
 --sage-soft: #dde4d3;
 --ink: #2b2b2b;
 --ink-soft: #5a5a5a;
 --muted: #8a8a82;
 --line: #d8d4ca;
 --accent: #2b2b2b;
 --alert: #a64530;
 --alert-soft: #d99889;
 --radius: 6px;
 --radius-lg: 14px;
}

* {
 margin: 0;
 padding: 0;
 box-sizing: border-box;
}

html, body {
 height: 100%;
}

body {
 font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
 background: var(--bg);
 color: var(--ink);
 font-weight: 400;
 -webkit-font-smoothing: antialiased;
 text-rendering: optimizeLegibility;
 letter-spacing: -0.01em;
}

.app {
 width: 100%;
 min-height: 100vh;
 display: flex;
 flex-direction: column;
}

/* --- Announcement strip ---------------------------------------------------- */
.announce {
 background: var(--sage);
 color: var(--ink);
 text-align: center;
 padding: 10px 16px;
 font-size: 0.72rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 font-weight: 500;
}

/* --- Top bar --------------------------------------------------------------- */
.topbar {
 display: grid;
 grid-template-columns: 1fr auto 1fr;
 align-items: center;
 padding: 22px 36px;
 background: var(--bg-soft);
 border-bottom: 1px solid var(--line);
}

.wordmark {
 font-family: 'Plus Jakarta Sans', sans-serif;
 font-weight: 800;
 font-size: 2rem;
 letter-spacing: -0.04em;
 text-align: center;
 color: var(--ink);
 line-height: 1;
}

.nav {
 display: flex;
 gap: 28px;
 font-size: 0.72rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 font-weight: 600;
 color: var(--ink-soft);
}

.nav-right {
 justify-content: flex-end;
}

.nav-link {
 appearance: none;
 -webkit-appearance: none;
 background: none;
 border: none;
 border-radius: 0;
 padding: 0;
 margin: 0;
 font: inherit;
 letter-spacing: inherit;
 text-transform: inherit;
 color: inherit;
 cursor: pointer;
 transition: color 0.15s ease;
}

.nav-link:hover {
 color: var(--ink);
}

.nav-link:focus {
 outline: none;
}

.nav-link:focus-visible {
 outline: 2px solid var(--ink);
 outline-offset: 4px;
}

/* the wordmark in the topbar is a button now too */
button.wordmark {
 appearance: none;
 -webkit-appearance: none;
 background: none;
 border: none;
 border-radius: 0;
 padding: 0;
 cursor: pointer;
 text-transform: none;
 letter-spacing: -0.04em;
}

button.wordmark:focus {
 outline: none;
}

button.wordmark:focus-visible {
 outline: 2px solid var(--ink);
 outline-offset: 4px;
}

/* --- Screen plumbing ------------------------------------------------------- */
.screen {
 display: none;
 flex: 1;
 padding: 56px 36px;
}

.screen.active {
 display: block;
}

/* --- Hero (home screen) ---------------------------------------------------- */
.hero {
 display: grid;
 grid-template-columns: 1.1fr 1fr;
 gap: 64px;
 max-width: 1200px;
 margin: 0 auto;
 align-items: center;
}

.hero-media {
 aspect-ratio: 4 / 5;
 width: 100%;
 background: var(--sage-soft);
 border-radius: var(--radius);
 overflow: hidden;
 display: flex;
 align-items: center;
 justify-content: center;
}

.hero-media img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}

.hero-media img.is-fallback {
 width: 40%;
 height: auto;
 object-fit: contain;
 opacity: 0.75;
}

.hero-copy {
 padding: 16px 0;
}

.display {
 font-size: 4rem;
 font-weight: 700;
 line-height: 1.02;
 letter-spacing: -0.04em;
 margin-bottom: 24px;
 color: var(--ink);
}

.lede {
 font-size: 1.15rem;
 line-height: 1.5;
 color: var(--ink-soft);
 margin-bottom: 20px;
 max-width: 38ch;
}

.meta {
 font-size: 0.72rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 color: var(--muted);
 margin-bottom: 32px;
}

/* --- Camera screen --------------------------------------------------------- */
.camera-wrap {
 max-width: 720px;
 margin: 0 auto;
 width: 100%;
}

.camera-header {
 margin-bottom: 16px;
}

/* Onboarding stepper at the top of the camera screen */
.onboarding-steps {
 display: flex;
 gap: 8px;
 list-style: none;
 padding: 0;
 margin: 0 0 14px;
 flex-wrap: wrap;
}

.step {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 padding: 5px 14px 5px 5px;
 border-radius: 999px;
 border: 1px solid var(--line);
 background: transparent;
 color: var(--muted);
 font-size: 0.74rem;
 letter-spacing: 0.05em;
 font-weight: 500;
 transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.step-marker {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 22px;
 height: 22px;
 border-radius: 50%;
 background: var(--bg-soft);
 color: var(--muted);
 font-size: 0.66rem;
 font-weight: 700;
 letter-spacing: 0;
 transition: background 0.2s ease, color 0.2s ease;
}

.step.is-active {
 border-color: var(--ink);
 background: var(--ink);
 color: var(--bg);
}

.step.is-active .step-marker {
 background: var(--bg);
 color: var(--ink);
}

.step.is-done {
 border-color: var(--sage);
 background: var(--sage);
 color: var(--ink);
}

.step.is-done .step-marker {
 background: white;
 color: var(--ink);
}

/* Pulse highlight on whichever button is the next user action */
.is-next {
 animation: posh-next-pulse 1.8s ease-in-out infinite;
}

@keyframes posh-next-pulse {
 0%, 100% { box-shadow: 0 0 0 0 rgba(43, 43, 43, 0.22); }
 50% { box-shadow: 0 0 0 8px rgba(43, 43, 43, 0); }
}

@media (max-width: 520px) {
 .onboarding-steps {
  font-size: 0.68rem;
 }
 .step {
  padding: 4px 12px 4px 4px;
 }
 .step-marker {
  width: 20px;
  height: 20px;
 }
}

.eyebrow {
 font-size: 0.72rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 color: var(--muted);
 font-weight: 600;
}

.camera-box {
 position: relative;
 width: 100%;
 aspect-ratio: 4 / 3;
 background: var(--bg-soft);
 border: 1px solid var(--line);
 border-radius: var(--radius);
 overflow: hidden;
 margin-bottom: 24px;
}

video,
canvas {
 position: absolute;
 inset: 0;
 width: 100%;
 height: 100%;
 transform: scaleX(-1);
 object-fit: cover;
}

canvas {
 pointer-events: none;
}

#puppet {
 inset: auto;
 top: 14px;
 right: 14px;
 width: 110px;
 height: 140px;
 transform: none;
 object-fit: contain;
 z-index: 5;
 border-radius: 10px;
}

@media (max-width: 520px) {
 #puppet {
  width: 82px;
  height: 104px;
  top: 10px;
  right: 10px;
 }
}

.button-group {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 10px;
}

.button-group .btn-ghost {
 grid-column: 1 / -1;
}

.calibration-progress {
 width: 100%;
 height: 3px;
 background: var(--line);
 border-radius: 999px;
 overflow: hidden;
 margin-top: 12px;
}

.calibration-progress[hidden] { display: none; }

.calibration-progress-bar {
 width: 0;
 height: 100%;
 background: var(--ink);
 border-radius: 999px;
}

.status-msg {
 margin-top: 20px;
 font-size: 0.95rem;
 color: var(--ink);
 line-height: 1.5;
}

.hint {
 margin-top: 10px;
 font-size: 0.82rem;
 color: var(--muted);
 line-height: 1.5;
}

.camera-footer {
 margin-top: 44px;
 padding-top: 26px;
 font-size: 0.78rem;
 letter-spacing: 0.01em;
 color: var(--muted);
 text-align: center;
 position: relative;
}

.camera-footer::before {
 content: "";
 position: absolute;
 top: 0;
 left: 50%;
 transform: translateX(-50%);
 width: 36px;
 height: 1px;
 background: var(--line);
}

/* --- Buttons --------------------------------------------------------------- */
button {
 font-family: inherit;
 font-size: 0.78rem;
 letter-spacing: 0.12em;
 text-transform: uppercase;
 font-weight: 600;
 padding: 16px 22px;
 border: 1px solid transparent;
 border-radius: var(--radius);
 cursor: pointer;
 transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
 background: var(--ink);
 color: var(--bg);
 border-color: var(--ink);
}

.btn-primary:hover {
 background: #000;
}

.btn-outline {
 background: transparent;
 color: var(--ink);
 border-color: var(--ink);
}

.btn-outline:hover {
 background: var(--ink);
 color: var(--bg);
}

.btn-ghost {
 background: transparent;
 color: var(--ink-soft);
 border-color: var(--line);
}

.btn-ghost:hover {
 color: var(--ink);
 border-color: var(--ink-soft);
}

button:disabled {
 opacity: 0.4;
 cursor: not-allowed;
}

button:disabled:hover {
 background: transparent;
 color: var(--ink-soft);
 border-color: var(--line);
}

.btn-primary:disabled:hover {
 background: var(--ink);
 color: var(--bg);
}

/* --- Alert banner ---------------------------------------------------------- */
#alert-banner {
 display: none;
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 background: var(--alert);
 color: #fdf6f3;
 padding: 14px 24px;
 text-align: center;
 font-size: 0.85rem;
 font-weight: 600;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 z-index: 1000;
 box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
 animation: posh-pulse 1.6s ease-in-out infinite;
}

#alert-banner.active {
 display: flex;
 justify-content: center;
 align-items: center;
 gap: 18px;
}

#alert-banner button {
 padding: 8px 14px;
 font-size: 0.7rem;
 background: transparent;
 color: #fdf6f3;
 border: 1px solid rgba(253, 246, 243, 0.55);
}

#alert-banner button:hover {
 background: rgba(253, 246, 243, 0.12);
 border-color: #fdf6f3;
}

@keyframes posh-pulse {
 0%, 100% { background: var(--alert); }
 50% { background: #c45a4a; }
}

body.posh-alerting {
 animation: body-flash 1.6s ease-in-out infinite;
}

@keyframes body-flash {
 0%, 100% { background: var(--bg); }
 50% { background: #f3e1db; }
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 860px) {
 .topbar {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 12px;
  padding: 16px 20px;
 }

 .wordmark {
  font-size: 1.7rem;
 }

 .nav {
  font-size: 0.68rem;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
 }

 .nav-right {
  justify-content: center;
 }

 .nav-link {
  padding: 6px 0;
 }

 .screen {
  padding: 36px 20px;
 }

 .hero {
  grid-template-columns: 1fr;
  gap: 32px;
 }

 .display {
  font-size: 2.6rem;
 }

 .lede {
  font-size: 1rem;
 }

 .button-group {
  grid-template-columns: 1fr;
 }

 .button-group .btn-ghost {
  grid-column: auto;
 }
}

@media (max-width: 420px) {
 .announce {
  font-size: 0.66rem;
  padding: 8px 14px;
 }

 .wordmark {
  font-size: 1.55rem;
 }

 .nav {
  gap: 14px;
 }

 .screen {
  padding: 28px 16px;
 }

 .display {
  font-size: 2.1rem;
 }

 .meta {
  font-size: 0.66rem;
 }
}

/* --- About screen ---------------------------------------------------------- */
/* the about screen manages its own padding section-by-section */
#about-screen {
 padding: 0;
}

/* Full-bleed hero */
.about-hero {
 position: relative;
 width: 100%;
 height: calc(100vh - 130px); /* leaves room for announce + topbar */
 min-height: 480px;
 overflow: hidden;
 background: var(--sage-soft);
}

.about-hero-img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}

.about-hero.is-empty {
 background: linear-gradient(160deg, var(--sage-soft), var(--sage));
}

.about-hero-overlay {
 position: absolute;
 left: 0;
 right: 0;
 bottom: 0;
 padding: 36px 36px 56px;
 color: #f0ead6;
 background: linear-gradient(to top, rgba(20, 18, 12, 0.55), transparent 60%);
}

.about-hero.is-empty .about-hero-overlay {
 color: var(--ink);
 background: none;
}

.about-hero-overlay .display {
 color: #f0ead6;
 font-size: clamp(2.4rem, 5.5vw, 4.5rem);
 line-height: 1.02;
 letter-spacing: -0.04em;
 max-width: 14ch;
 text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

/* Marquee */
.marquee {
 background: var(--sage);
 border-top: 1px solid var(--line);
 border-bottom: 1px solid var(--line);
 overflow: hidden;
 padding: 18px 0;
}

.marquee-track {
 display: inline-flex;
 align-items: center;
 gap: 32px;
 white-space: nowrap;
 animation: marquee-scroll 32s linear infinite;
 will-change: transform;
}

.marquee:hover .marquee-track {
 animation-play-state: paused;
}

.marquee-track span {
 font-size: clamp(1.4rem, 2.6vw, 2rem);
 font-weight: 700;
 letter-spacing: -0.03em;
 color: var(--ink);
}

.marquee-track .marquee-dot {
 opacity: 0.5;
 font-weight: 500;
}

@keyframes marquee-scroll {
 from { transform: translateX(0); }
 to   { transform: translateX(-50%); }
}

/* Info section */
.about-info {
 padding: 96px 36px;
}

.about-info-inner {
 max-width: 760px;
 margin: 0 auto;
}

.about-info .eyebrow {
 margin-bottom: 18px;
}

.display-sm {
 font-size: clamp(1.8rem, 3.6vw, 2.6rem);
 font-weight: 700;
 letter-spacing: -0.03em;
 line-height: 1.1;
 margin-bottom: 24px;
}

.about-info p {
 font-size: 1.05rem;
 line-height: 1.6;
 color: var(--ink-soft);
 margin-bottom: 18px;
}

.about-info .lede {
 color: var(--ink);
}

/* Values */
.about-values {
 padding: 80px 36px 88px;
 border-top: 1px solid var(--line);
}

.about-values-inner {
 max-width: 1100px;
 margin: 0 auto;
}

.about-values .eyebrow {
 margin-bottom: 14px;
}

.about-values .display-sm {
 margin-bottom: 48px;
}

.values-list {
 list-style: none;
 padding: 0;
 margin: 0;
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 40px;
}

.value-item {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.value-number {
 font-size: 0.72rem;
 letter-spacing: 0.16em;
 font-weight: 600;
 color: var(--muted);
 text-transform: uppercase;
}

.value-title {
 font-size: 1.3rem;
 font-weight: 700;
 letter-spacing: -0.03em;
 line-height: 1.15;
 margin-bottom: 4px;
}

.value-item p {
 font-size: 0.95rem;
 line-height: 1.55;
 color: var(--ink-soft);
}

.value-item .value-lede {
 color: var(--ink);
 font-weight: 500;
}

/* Before / after compare (smaller, tighter) */
.about-compare {
 background: var(--bg-soft);
 padding: 56px 36px 72px;
 border-top: 1px solid var(--line);
}

.about-compare-inner {
 max-width: 720px;
 margin: 0 auto;
 text-align: center;
}

.about-compare .eyebrow {
 margin-bottom: 12px;
}

.about-compare .display-sm {
 margin-bottom: 28px;
 font-size: clamp(1.5rem, 2.6vw, 1.9rem);
}

.compare-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 18px;
}

.compare-card {
 margin: 0;
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.compare-card img {
 width: 100%;
 aspect-ratio: 3 / 4;
 object-fit: cover;
 border-radius: 14px;
 background: var(--sage-soft);
 display: block;
}

.compare-tagline {
 margin-top: 22px;
 text-align: center;
 font-size: 1.05rem;
 line-height: 1.4;
 color: var(--ink);
 font-weight: 500;
 letter-spacing: -0.01em;
}

/* Open source acknowledgements footer */
.about-footer {
 background: var(--bg);
 padding: 80px 36px 72px;
 border-top: 1px solid var(--line);
}

.about-footer-inner {
 max-width: 560px;
 margin: 0 auto;
 text-align: center;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 14px;
}

.about-footer-mark {
 font-family: 'Plus Jakarta Sans', sans-serif;
 font-weight: 800;
 font-size: 1.6rem;
 letter-spacing: -0.04em;
 color: var(--ink);
 line-height: 1;
 margin-bottom: 4px;
}

.about-footer .eyebrow {
 position: relative;
 padding-top: 22px;
}

.about-footer .eyebrow::before {
 content: "";
 position: absolute;
 top: 0;
 left: 50%;
 transform: translateX(-50%);
 width: 36px;
 height: 1px;
 background: var(--line);
}

.about-footer-credit {
 font-size: 0.95rem;
 line-height: 1.6;
 color: var(--ink);
 max-width: 42ch;
}

.about-footer-license {
 font-size: 0.78rem;
 letter-spacing: 0.04em;
 color: var(--muted);
}

@media (max-width: 860px) {
 .about-footer {
  padding: 56px 20px 56px;
 }
}

@media (max-width: 860px) {
 .about-hero {
  height: 80vh;
 }
 .about-info {
  padding: 64px 20px;
 }
 .about-values {
  padding: 56px 20px 64px;
 }
 .values-list {
  grid-template-columns: 1fr;
  gap: 32px;
 }
 .about-compare {
  padding: 48px 20px 64px;
 }
 .compare-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
 }
}

/* --- Login screen ---------------------------------------------------------- */
.login-layout {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 64px;
 max-width: 1100px;
 margin: 0 auto;
 align-items: center;
}

.login-media {
 margin: 0;
 aspect-ratio: 3 / 4;
 width: 100%;
 background: var(--sage-soft);
 border-radius: var(--radius);
 overflow: hidden;
}

.login-media img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}

.login-wrap {
 max-width: 460px;
 width: 100%;
}

.login-layout .login-wrap {
 max-width: 480px;
 margin: 0;
}

@media (max-width: 860px) {
 .login-layout {
  grid-template-columns: 1fr;
  gap: 32px;
 }
 .login-media {
  aspect-ratio: 16 / 9;
  max-height: 280px;
 }
 .login-layout .login-wrap {
  max-width: none;
 }
}

.login-wrap .eyebrow {
 margin-bottom: 12px;
}

.login-wrap .display-sm {
 margin-bottom: 18px;
}

.login-wrap .lede {
 color: var(--ink-soft);
 margin-bottom: 32px;
 font-size: 1.02rem;
 line-height: 1.55;
}

.login-link {
 appearance: none;
 -webkit-appearance: none;
 background: none;
 border: none;
 padding: 0;
 margin-top: 4px;
 align-self: flex-start;
 font-family: inherit;
 font-size: 0.86rem;
 color: var(--muted);
 cursor: pointer;
 text-decoration: underline;
 letter-spacing: 0;
 text-transform: none;
 font-weight: 500;
}

.login-link:hover { color: var(--ink); }

.login-link-inline {
 align-self: auto;
 margin-top: 0;
 margin-left: 4px;
 color: var(--ink);
 font-weight: 600;
}

.login-switch {
 margin-top: 20px;
 padding-top: 18px;
 border-top: 1px solid var(--line);
 font-size: 0.92rem;
 color: var(--ink-soft);
}

.login-hint-small {
 font-size: 0.78rem;
 color: var(--muted);
 line-height: 1.5;
}

.login-form {
 display: flex;
 flex-direction: column;
 gap: 14px;
 margin-bottom: 12px;
}

.login-row {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 10px;
}

.login-field {
 display: flex;
 flex-direction: column;
 gap: 6px;
}

@media (max-width: 480px) {
 .login-row { grid-template-columns: 1fr; }
}

.login-label {
 font-size: 0.7rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 color: var(--muted);
 font-weight: 600;
}

.login-form input {
 padding: 14px 16px;
 border: 1px solid var(--line);
 border-radius: var(--radius);
 background: var(--bg-soft);
 font-family: inherit;
 font-size: 1rem;
 color: var(--ink);
 transition: border-color 0.15s ease, background 0.15s ease;
}

.login-form input::placeholder {
 color: var(--muted);
}

.login-form input:focus {
 outline: none;
 border-color: var(--ink);
 background: white;
}

.login-form .btn-primary {
 margin-top: 4px;
}

.login-message {
 font-size: 0.9rem;
 color: var(--ink-soft);
 line-height: 1.5;
 min-height: 1.4em;
 margin-top: 4px;
}

.login-message.is-error { color: var(--alert); }
.login-message.is-success { color: #43662a; }

#login-signed-in-state .btn-outline {
 width: auto;
 padding: 12px 22px;
}

.login-footer {
 margin-top: 36px;
 padding-top: 22px;
 border-top: 1px solid var(--line);
}

.login-footer-note {
 font-size: 0.82rem;
 color: var(--muted);
 line-height: 1.5;
 margin-bottom: 6px;
}

.nav-user {
 color: var(--ink);
 cursor: default;
}

/* --- Settings screen ------------------------------------------------------- */
.settings-wrap {
 max-width: 560px;
 margin: 0 auto;
 width: 100%;
}

.settings-wrap .eyebrow {
 margin-bottom: 12px;
}

.settings-wrap .display-sm {
 margin-bottom: 12px;
}

.settings-wrap .lede {
 color: var(--ink-soft);
 margin-bottom: 40px;
}

.settings-section {
 padding: 24px 0;
 border-top: 1px solid var(--line);
}

.settings-section:last-of-type {
 border-bottom: 1px solid var(--line);
}

.settings-section-title {
 font-size: 0.74rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 font-weight: 600;
 color: var(--ink-soft);
 margin-bottom: 18px;
}

.settings-current {
 font-size: 0.92rem;
 color: var(--ink-soft);
 margin-bottom: 14px;
}

.settings-current strong {
 color: var(--ink);
 font-weight: 600;
}

/* --- Tracker screen -------------------------------------------------------- */
.tracker-wrap {
 max-width: 960px;
 margin: 0 auto;
 width: 100%;
}

.tracker-wrap .eyebrow {
 margin-bottom: 12px;
}

.tracker-wrap > .display-sm {
 margin-bottom: 32px;
}

.tracker-banner {
 margin: 0 0 24px;
 border-radius: 14px;
 overflow: hidden;
 border: 1px solid var(--line);
 background: var(--sage-soft);
 aspect-ratio: 16 / 7;
}

.tracker-banner img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}

.tracker-empty {
 background: var(--sage-soft);
 border: 1px solid var(--line);
 border-radius: 14px;
 padding: 24px 28px;
 margin-bottom: 24px;
}

.tracker-empty[hidden] { display: none; }

.tracker-empty-lede {
 font-size: 1.1rem;
 font-weight: 600;
 letter-spacing: -0.01em;
 color: var(--ink);
 margin-bottom: 6px;
}

.tracker-empty p:not(.tracker-empty-lede) {
 font-size: 0.92rem;
 color: var(--ink-soft);
 line-height: 1.55;
 margin-bottom: 16px;
}

.tracker-empty .btn-outline {
 width: auto;
 display: inline-block;
 padding: 10px 18px;
}

.tracker-stats {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 0;
 background: var(--bg-soft);
 border: 1px solid var(--line);
 border-radius: 14px;
 overflow: hidden;
 margin-bottom: 24px;
}

.stat {
 padding: 22px 24px;
 display: flex;
 flex-direction: column;
 gap: 6px;
 border-right: 1px solid var(--line);
}

.stat:last-child {
 border-right: none;
}

.stat-value {
 font-size: 1.8rem;
 font-weight: 700;
 letter-spacing: -0.03em;
 color: var(--ink);
 line-height: 1;
}

.stat-label {
 font-size: 0.7rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 color: var(--muted);
 font-weight: 600;
}

.tracker-card {
 background: var(--bg-soft);
 border: 1px solid var(--line);
 border-radius: 14px;
 padding: 22px 24px;
 overflow-x: auto;
}

.tracker-card-header {
 display: flex;
 justify-content: space-between;
 align-items: baseline;
 margin-bottom: 18px;
 gap: 16px;
 min-width: 600px;
}

.tracker-card-header .eyebrow {
 margin-bottom: 0;
}

.tracker-card-hint {
 font-size: 0.72rem;
 color: var(--muted);
}

.tracker-calendar {
 min-width: 760px;
}

.calendar-months {
 display: grid;
 gap: 3px;
 margin-bottom: 8px;
 height: 14px;
 font-size: 0.68rem;
 letter-spacing: 0.04em;
 color: var(--muted);
 font-weight: 600;
}

.month-label {
 white-space: nowrap;
 align-self: end;
}

.calendar-grid {
 display: grid;
 grid-auto-flow: column;
 grid-template-rows: repeat(7, 12px);
 gap: 3px;
 padding-bottom: 8px;
}

.day-cell {
 width: 12px;
 height: 12px;
 border-radius: 2px;
 background: #ecebe2;
 transition: background 0.15s ease, transform 0.1s ease;
 display: block;
 cursor: default;
}

.day-cell.l1 { background: #d3dec5; }
.day-cell.l2 { background: #a8c089; }
.day-cell.l3 { background: #6f9249; }
.day-cell.l4 { background: #43662a; }

.day-cell.future {
 background: transparent;
 border: 1px dashed var(--line);
}

.day-cell:hover {
 transform: scale(1.25);
}

.tracker-legend {
 display: flex;
 align-items: center;
 gap: 8px;
 margin-top: 16px;
 font-size: 0.7rem;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 color: var(--muted);
 font-weight: 600;
 justify-content: flex-end;
 min-width: 600px;
}

.legend-cells {
 display: flex;
 gap: 3px;
}

.tracker-note {
 margin-top: 20px;
 font-size: 0.82rem;
 color: var(--muted);
 text-align: center;
}

@media (max-width: 860px) {
 .tracker-stats {
  grid-template-columns: 1fr;
 }
 .stat {
  border-right: none;
  border-bottom: 1px solid var(--line);
 }
 .stat:last-child {
  border-bottom: none;
 }
}
