/* ==================================================================
   HolisticDash – Dashboard Stylesheet
   Sections: tokens · base · header · banner · sections · rails ·
             planning · Life Hub · footer · modals · wizard ·
             workspace · archive · habit focus · auth pages
   ================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --canvas: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #FBFBFC;
  --border: #E7E9EE;
  --ink: #22252A;
  --ink-soft: #6B7280;
  --ink-faint: #9CA3AF;
  --warm: #F2A93C;
  --warm-deep: #C97E12;
  --warm-wash: #FFF4E0;
  --warm-wash-2: #FFE9C7;
  --c-health: #EC5C79;
  --c-health-wash: #FDECF0;
  --c-family: #EF6B4C;
  --c-family-wash: #FEEEE8;
  --c-finance: #189B6C;
  --c-finance-wash: #E6F7EF;
  --c-business: #4F46E5;
  --c-business-wash: #EEF2FF;
  --c-dev: #8657E6;
  --c-dev-wash: #F2EDFD;
  --c-connect: #12A99B;
  --c-connect-wash: #E3F7F4;
  --c-misc: #6B7280;
  --c-misc-wash: #EEF0F2;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-mark:  'Leckerli One', cursive;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-data: 'Space Grotesk', sans-serif;
  --radius-card: 20px;
  --shadow-sm: 0 1px 2px rgba(20,20,30,.05), 0 1px 1px rgba(20,20,30,.03);
  --shadow-md: 0 10px 26px rgba(20,20,30,.07), 0 2px 6px rgba(20,20,30,.04);
  --neutral-wash: #EFEDEA;
  --neutral-deep: #837A6E;
  --health-wash: #E7F0EA;
  --page-bg: #f5f1eb;
}

/* ---------- Base reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

/* ==================================================================
   HEADER — matches landing page style (light, translucent, calm)
   ================================================================== */
.topbar {
  width: 100%;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, #F2F4F3 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #EADFCE;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  box-sizing: border-box;
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: none;
  margin-right: auto;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #C4673F;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mark);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  color: #2B2622;
  font-weight: 700;
  font-size: 15px;
}
.brand-tag {
  color: #C4673F;
  font-weight: 600;
  font-size: 10px;
}

/* ---------- Search bar (desktop) ---------- */
.search {
  flex: 1 1 220px;
  max-width: 380px;
  height: 36px;
  margin: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #EADFCE;
}
.search-icon {
  width: 16px;
  height: 16px;
  color: #7A6F65;
  flex: none;
}
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #2B2622;
  font-size: 14px;
  font-family: inherit;
}
.search input::placeholder { color: #A79C8F; }
.search .kbd {
  font-size: 11px;
  font-weight: 600;
  color: #7A6F65;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid #EADFCE;
  background: #FBF7F2;
  flex: none;
}

/* ---------- Nav: pill-shaped buttons with text + icon ---------- */
.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.nav-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #EADFCE;
  background: #FFFFFF;
  color: #2B2622;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.nav-icon:hover {
  background: #FFF4E0;
  border-color: #E7CFAE;
  color: #C4673F;
}
.nav-icon:active { transform: scale(0.97); }
.nav-icon svg { width: 18px; height: 18px; flex-shrink: 0; }
a.nav-icon { text-decoration: none; }
.nav-icon:focus-visible {
  outline: 2px solid #C4673F;
  outline-offset: 2px;
}

/* Primary "Create" pill — terracotta filled */
#globalAddBtn {
  background: #C4673F;
  color: #FFFFFF;
  border-color: #C4673F;
}
#globalAddBtn:hover {
  background: #A85632;
  border-color: #A85632;
  color: #FFFFFF;
}

/* Text label inside nav buttons */
.nav-icon-label {
  display: inline-block;
}

/* ==================================================================
   HEADER DROPDOWNS — unified system for +Create and Account
   ================================================================== */
.menu-wrap { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid rgba(234, 223, 206, 0.9);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(43, 36, 32, 0.04),
    0 12px 28px rgba(43, 36, 32, 0.10),
    0 28px 60px rgba(43, 36, 32, 0.08);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dropdown[hidden] { display: none; }
.dropdown:not([hidden]) {
  animation: dropdownIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.dropdown-caret {
  position: absolute;
  top: -7px;
  right: 22px;
  width: 14px;
  height: 14px;
  background: #FFFFFF;
  border-left: 1px solid rgba(234, 223, 206, 0.9);
  border-top: 1px solid rgba(234, 223, 206, 0.9);
  border-top-left-radius: 3px;
  transform: rotate(45deg);
}

.dropdown-section {
  padding: 10px 12px 4px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9A8F82;
  font-weight: 700;
}
.dropdown-divider { height: 1px; background: #F0E7D6; margin: 6px 10px; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  text-align: left;
  color: #2B2622;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.dropdown-item:hover { background: #FBF7F2; }
.dropdown-item:active { transform: scale(0.985); }

.dropdown-item-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #9A8F82;
  transition: color 0.15s ease;
}
.dropdown-item:hover .dropdown-item-icon { color: #C4673F; }

.dropdown-item-label { flex: 1; min-width: 0; }

.dropdown-item-danger { color: #A82828; }
.dropdown-item-danger:hover { background: #FBE9E9; }
.dropdown-item-danger:hover .dropdown-item-icon { color: #A82828; }

/* ---------- Account card (top of Account dropdown) ---------- */
.account-card { padding: 0; }
.account-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FBF7F2 0%, #FFF9F0 100%);
  border: 1px solid #F0E7D6;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
a.account-card-inner:hover {
  background: linear-gradient(135deg, #F8F1E8 0%, #FFF4E0 100%);
  border-color: #E7CFAE;
}
.account-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #C4673F 0%, #A85632 100%);
  box-shadow: 0 2px 6px rgba(196, 103, 63, 0.25);
}
.account-avatar--guest {
  background: linear-gradient(135deg, #B9B0A4 0%, #9A8F82 100%);
  box-shadow: 0 2px 6px rgba(122, 111, 101, 0.22);
}
.account-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.account-name {
  font-size: 14px;
  font-weight: 700;
  color: #2B2622;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-email {
  font-size: 12px;
  color: #7A6F65;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Header responsive ---------- */
.desk-only { display: flex; }
.search-ico { display: none; }

/* Medium and small screens: hide text labels, show icons only */
@media (max-width: 900px) {
  .nav-icon {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .nav-icon-label { display: none; }
}

/* Phone: hide search bar, show small search icon */
@media (max-width: 720px) {
  .topbar-inner { padding: 0 14px; gap: 8px; height: 60px; }
  .brand-tag { display: none; }
  .brand-name { font-weight: 700; font-size: 14px; }
  .desk-only { display: none; }
  .search-ico { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-icon { transition: none; }
}

/* ==================================================================
   BANNER — warm gradient card with summary chips + habit card
   ================================================================== */
.banner {
  max-width: 1120px;
  margin: 22px auto 0;
  padding: 26px 32px;
  border-radius: 24px;
  background: linear-gradient(120deg, #FFF1D9 0%, #FFF8EA 55%, #FFFCF5 100%);
  border: 1px solid #EBDAB8;
  box-shadow: 0 1px 2px rgba(120, 80, 20, 0.05), 0 10px 28px rgba(80, 55, 20, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* Left column */
.banner-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 320px;
  min-width: 0;
}
.banner-eyebrow {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9A5A0C;
  font-weight: 600;
  margin: 0;
}
.banner-heading {
  font-size: clamp(26px, 3.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}
.banner-sub {
  color: #5E5249;
  font-size: 16px;
  line-height: 1.45;
  max-width: 520px;
  margin: 0;
}
.banner-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.banner-chip {
  font-size: 13px;
  font-weight: 600;
  color: #8F5A0A;
  background: #FFE9BF;
  padding: 5px 11px;
  border-radius: 999px;
}
.banner-chip-soft {
  color: #5E5249;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #EBDAB8;
  padding: 4px 11px;
}

/* ==================================================================
   BANNER CHIPS — dynamic state (Overdue · Due today · Coming up)
   ================================================================== */
.banner-chip[hidden] { display: none; }

.banner-chip-danger {
  color: #A82828;
  background: #FBE1E1;
  border: 1px solid #F2C7C7;
}

/* ==================================================================
   HABIT FOCUS — clickable title + green "Start" button
   ================================================================== */

/* Clickable habit title (opens workspace) */
.focus-text.clickable {
  cursor: pointer;
  transition: color 0.15s ease;
}
.focus-text.clickable:hover {
  color: #C4673F;
}
.focus-text.clickable:focus-visible {
  outline: 2px solid #C4673F;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Green action button (full width, sits below the head row) */
.habit-start-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  background: #1F6B52;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(31, 107, 82, 0.22);
}
.habit-start-btn:hover {
  background: #185843;
  box-shadow: 0 4px 12px rgba(31, 107, 82, 0.28);
}
.habit-start-btn:active {
  transform: scale(0.985);
}
.habit-start-btn:focus-visible {
  outline: 2px solid #C4673F;
  outline-offset: 3px;
}

/* Already checked in today */
.habit-start-btn.done {
  background: #E5F1EB;
  color: #1F6B52;
  cursor: default;
  box-shadow: none;
}
.habit-start-btn.done:hover {
  background: #E5F1EB;
  box-shadow: none;
}
/* Right column — habit card */
.banner-focus {
  position: relative;
  flex: 0 1 360px;
  min-width: 260px;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid #F0E3C8;
  box-shadow: 0 1px 2px rgba(120, 80, 20, 0.05), 0 8px 22px rgba(120, 80, 20, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.banner-focus-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.banner-focus-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #DEF3EE;
  color: #146354;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.banner-focus-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.focus-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6F645A;
  font-weight: 600;
}
.focus-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================================================================
   SECTIONS — shared shell, headings, pre-reveal animation
   ================================================================== */
.section { max-width: 1120px; margin: 0 auto; padding: 52px 16px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  font-family: var(--font-data);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  font-weight: 600;
}
.section h2 { font-size: 24px; font-weight: 600; margin-top: 6px; letter-spacing: -.01em; }
.section-sub { color: var(--ink-soft); font-size: 13.5px; margin-top: 8px; max-width: 52ch; }
.pre-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.pre-reveal.in-view { opacity: 1; transform: translateY(0); }

/* ==================================================================
   RAILS — "Coming Up" card grid (tasks · events · checklists)
   ================================================================== */
.rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 2px 2px 4px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}
.rail-card {
  flex: 1 1 210px;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px 8px 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rail-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--tag);
}
.rail-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.rail-title {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.rail-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rail-time {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 0;
}
.rail-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 400px;
  color: var(--tag);
  background: var(--tag-wash);
  white-space: nowrap;
}
.rail-card.overdue { border-color: var(--c-health); background-color: var(--c-health-wash); }
.rail-card.overdue .rail-time { color: var(--c-health); font-weight: 700; }
.rail-card.today { border-color: var(--warm); background-color: var(--warm-wash); }
.rail-card.today .rail-time { color: var(--warm-deep); font-weight: 700; }
.rail-card.clickable { cursor: pointer; }

/* ==================================================================
   PLANNING — three cards (Goals · Projects · Plans)
   ================================================================== */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.pcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 10px 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.pcard-head { display: flex; align-items: center; gap: 12px; padding: 0 8px 4px; }
.pcard-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pcard-icon-goal    { background: var(--warm-wash);       color: var(--warm-deep); }
.pcard-icon-project { background: var(--c-connect-wash);  color: var(--c-connect); }
.pcard-icon-plan    { background: var(--c-business-wash); color: var(--c-business); }

.pcard-title-group { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pcard-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}
.pcard-sub { font-size: 12.5px; color: var(--ink-soft); line-height: 1.2; }

.pcard-count {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--warm-wash);
  color: var(--warm-deep);
  flex-shrink: 0;
}
.pcard:nth-child(2) .pcard-count { background: var(--c-connect-wash);  color: var(--c-connect); }
.pcard:nth-child(3) .pcard-count { background: var(--c-business-wash); color: var(--c-business); }

.pcard-list { display: flex; flex-direction: column; min-height: 60px; }
.prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.prow:hover { background: var(--surface-2); }

.prow-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.prow-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow-date { font-size: 12.5px; color: var(--ink-soft); line-height: 1.2; }
.prow-chev { color: var(--ink-faint); flex-shrink: 0; display: flex; align-items: center; }

.pcard-empty {
  font-size: 13px;
  color: var(--ink-faint);
  font-style: italic;
  padding: 12px 12px;
  margin: 0;
}
/* Expand / Collapse footer inside a planning card */
.pcard-expand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px 8px;
  margin-top: 4px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--warm-deep);
  cursor: pointer;
  transition: color .15s ease;
}
.pcard-expand:hover { color: #A85632; }
.pcard-expand[hidden] { display: none; }

.pcard-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--warm-wash);
  color: var(--warm-deep);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: background .15s ease, transform .2s ease;
}
.pcard-expand:hover .pcard-expand-icon { background: var(--warm-wash-2); }

/* ==================================================================
   LIFE HUB — dial cards + expandable breakdown
   ================================================================== */
.hub-section { padding-top: 60px; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 16px;
  margin-top: 6px;
}
.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dial-wrap { position: relative; width: 92px; height: 92px; margin: 0 auto 18px; }
.dial { position: absolute; inset: 0; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: var(--border); stroke-width: 7; }
.dial-progress {
  fill: none;
  stroke: var(--dial);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1);
}
.dial-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dial); }
.dial-value {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  font-family: var(--font-data);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--dial);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.misc-badge {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--c-misc-wash);
  color: var(--c-misc);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.hub-card h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.hub-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.4; }

.hub-breakdown {
  width: 100%;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: left;
  display: none;
}
.hub-card.expanded .hub-breakdown { display: block; }
.breakdown-section { margin-bottom: 14px; }
.breakdown-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
  margin: 0 0 6px;
  font-weight: 600;
}
.breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}
.breakdown-item .label { flex: 1; margin-right: 10px; }
.breakdown-item .progress-mini {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.breakdown-item .progress-mini span {
  display: block;
  height: 100%;
  background: var(--dial);
  border-radius: 3px;
}
.project-link { cursor: pointer; transition: color 0.15s; }
.project-link:hover { color: var(--warm-deep); text-decoration: underline; }

/* ==================================================================
   ABOUT / TIPS pages (full article)
   ================================================================== */
.about-intro { padding-top: 44px; }
.about-lede { font-size: 17px; line-height: 1.7; color: var(--ink); max-width: 68ch; }
.about-block { display: flex; gap: 22px; align-items: flex-start; }
.about-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--dial-wash);
  color: var(--dial);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-block h2 { font-size: 22px; font-weight: 600; margin-top: 6px; margin-bottom: 14px; letter-spacing: -.01em; max-width: 34ch; }
.about-body { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); max-width: 66ch; margin-bottom: 14px; }
.about-body:last-child { margin-bottom: 0; }
.tip-full { max-width: 70ch; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.tip-full h2 { font-size: 26px; font-weight: 600; margin-top: 8px; margin-bottom: 18px; letter-spacing: -.01em; }

/* ==================================================================
   DASHBOARD SLIM FOOTER — dark strip matching the header
   ================================================================== */
.footer-slim {
  width: 100%;
  margin-top: 64px;
  background: #183C34;
  border-top: 1px solid rgba(217, 182, 111, 0.15);
  box-shadow: 0 -4px 16px rgba(15, 42, 51, 0.10);
  box-sizing: border-box;
}

.footer-slim-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-slim-copy {
  font-size: 12.5px;
  color: rgba(169, 196, 190, 0.9);
  margin: 0;
  line-height: 1.5;
}

.footer-slim-note {
  font-size: 13px;
  font-weight: 600;
  color: #F2B24C;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  line-height: 1.5;
}
.footer-slim-note::before {
  content: '✦';
  font-size: 11px;
  opacity: 0.9;
}

@media (max-width: 640px) {
  .footer-slim { margin-top: 48px; }
  .footer-slim-inner {
    flex-direction: column;
    text-align: center;
    padding: 20px 18px;
  }
}

/* ==================================================================
   MODALS — compact form + type chooser
   ================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-faint);
}
.modal-close:hover { color: var(--ink); }
.modal h2 { font-size: 22px; margin-bottom: 1.5rem; }
.modal form { display: flex; flex-direction: column; gap: 1rem; }
.modal label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
}
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  outline: 2px solid var(--warm);
  outline-offset: 1px;
}
.modal button[type="submit"] {
  background: var(--ink);
  color: #fff;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.modal button[type="submit"]:hover { background: var(--warm-deep); }

.type-chooser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 1.5rem;
}
.type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all .15s ease;
}
.type-option:hover { border-color: var(--warm); background: var(--warm-wash); }
.type-option .type-icon { width: 28px; height: 28px; color: var(--ink-soft); }
.type-option span { font-size: 12px; font-weight: 600; color: var(--ink); }

/* ==================================================================
   WIZARD — full-screen immersive multi-step form
   ================================================================== */
.modal-overlay.immersive {
  background: #FDF8F3;
  align-items: stretch;
  justify-content: stretch;
}
.modal-overlay.immersive .modal {
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: none;
}
.modal-overlay.immersive .modal h2 {
  font-size: 1.8rem;
  margin: 1.5rem 1.5rem 1rem;
}
.modal-overlay.immersive .modal form {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.modal-overlay.immersive .immersive-nav {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding: 1rem 0;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.immersive-field { margin-bottom: 1.2rem; }
.immersive-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.immersive-field label.required::after { content: ' *'; color: var(--c-health); }
.immersive-field input,
.immersive-field textarea,
.immersive-field select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s;
}
.immersive-field input::placeholder,
.immersive-field textarea::placeholder {
  opacity: 0.5;
  font-style: italic;
  color: var(--ink-faint);
}
.immersive-field input:focus,
.immersive-field textarea:focus,
.immersive-field select:focus { outline: none; border-color: var(--warm); }
.dynamic-list { display: flex; flex-direction: column; gap: 8px; }
.dynamic-list-items { display: flex; flex-direction: column; gap: 8px; }
.dynamic-list-item { display: flex; gap: 8px; align-items: center; }
.dynamic-list-item input { flex: 1; }
.remove-item {
  background: none;
  border: none;
  color: var(--c-health);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}
.add-item {
  align-self: flex-start;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--warm-deep);
  font-weight: 600;
}
.immersive-nav { display: flex; justify-content: space-between; gap: 1rem; }
.primary-btn {
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.primary-btn:hover { background: var(--warm-deep); }
.secondary-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.secondary-btn:hover { background: var(--warm-wash); color: var(--warm-deep); }

/* ==================================================================
   WORKSPACE — modern calm layout (read-only / edit toggle)
   ================================================================== */
.workspace-eyebrow {
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 10px 10px 0 10px;
}
.ws-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 6px;
  position: relative;
}
.ws-header-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ws-header-title .title-text {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
  word-break: break-word;
}
.ws-edit-btn {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ws-edit-btn:hover {
  background: var(--warm-wash);
  color: var(--warm-deep);
  border-color: var(--warm-wash-2);
}

.heading-field { display: none; }
.ws-card.editing .heading-field { display: block; margin-top: 8px; }
.ws-card.editing .ws-header-title .title-text { display: none; }

.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}
.field-group .field.wide { grid-column: 1 / -1; }
.field { min-width: 0; }

.field-display { display: flex; flex-direction: column; gap: 4px; }
.field-display-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.field-display-value {
  font-size: 15.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}
.field-display-value.empty { color: var(--ink-faint); font-weight: 400; font-style: italic; }
.field-display-value.notes { font-size: 14.5px; font-weight: 400; color: var(--ink-soft); white-space: pre-wrap; }

.field-edit { display: none; }
.ws-card.editing .field-display { display: none; }
.ws-card.editing .field-edit { display: block; }
.field-edit label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.field-edit input,
.field-edit select,
.field-edit textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--ink);
  background: var(--page-bg);
  font-family: inherit;
}
.field-edit input:focus-visible,
.field-edit select:focus-visible,
.field-edit textarea:focus-visible {
  outline: 2px solid var(--warm-deep);
  outline-offset: 1px;
}

.ws-links .field-group { margin-top: 0; padding-top: 0; border-top: none; }

.ws-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.ws-action-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}
.ws-action-btn:hover { background: var(--warm-wash); color: var(--warm-deep); }
.ws-action-btn[data-action="delete"]:hover { background: var(--c-health-wash); color: var(--c-health); }

.ws-card .section-heading { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }

.task-list { list-style: none; margin: 0; padding: 0; }
.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.task-row:last-of-type { border-bottom: none; }
.task-check { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.task-check input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--warm-deep);
  cursor: pointer;
}
.task-text {
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  cursor: text;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-check input:checked ~ .task-text { color: var(--ink-faint); text-decoration: line-through; }
.task-row-actions { display: flex; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s ease; }
.task-row:hover .task-row-actions,
.task-row:focus-within .task-row-actions { opacity: 1; }
@media (hover: none) { .task-row-actions { opacity: 1; } }
.task-edit-btn,
.task-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-family: inherit;
}
.task-edit-btn:hover { background: var(--warm-wash); color: var(--warm-deep); }
.task-delete-btn:hover { background: var(--c-health-wash); color: var(--c-health); }
.add-task-row { display: flex; align-items: center; gap: 10px; padding: 13px 0 2px; margin-top: 2px; }
.add-task-icon {
  color: var(--ink-faint);
  font-size: 16px;
  width: 17px;
  text-align: center;
  flex-shrink: 0;
}
.add-task-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14.5px;
  color: var(--ink);
  font-family: inherit;
  padding: 4px 0;
}
.add-task-input::placeholder { color: var(--ink-faint); }
.add-task-input:focus { outline: none; }

.snaps-row { display: flex; gap: 32px; }
.snap { flex: 1; }
.snap-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--neutral-wash);
  overflow: hidden;
  margin-bottom: 10px;
}
.snap-bar-fill {
  height: 100%;
  background: var(--warm-deep);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.snap-label { font-size: 13px; color: var(--ink-soft); margin: 0; }
.snap-number { font-size: 26px; font-weight: 700; color: var(--ink); margin: 0 0 2px; line-height: 1; }

.completed-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--health-wash);
  border: 1px solid var(--health-wash);
  border-radius: 16px;
  padding: 18px 22px;
  margin-top: 20px;
}
.completed-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--c-health);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
}
.completed-title { margin: 0 0 2px; font-size: 16px; font-weight: 700; color: var(--ink); }
.completed-sub { margin: 0; font-size: 13px; color: var(--ink-soft); }

@media (max-width: 560px) {
  .ws-card { padding: 22px 20px; }
  .field-group { grid-template-columns: 1fr; gap: 20px; }
  .ws-header-title .title-text { font-size: 22px; }
}

/* Full-screen workspace overrides */
.modal-overlay.workspace { background: var(--page-bg); display: block; overflow-y: auto; }
.modal-overlay.workspace .modal {
  background: #f9f8f5;
  width: 80%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  padding: 0;
  margin: 20px auto;
  display: block;
  overflow-y: auto;
}
.modal-overlay.workspace .modal form {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}
.modal-overlay.workspace .modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
}

.task-check input:disabled,
.task-text[contenteditable="false"],
.task-edit-btn:disabled,
.task-delete-btn:disabled,
.add-task-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.task-text[contenteditable="false"] { cursor: default; }
/* ==================================================================
   ACCOUNT MODALS — Profile / Settings / Help
   ================================================================== */
.acc-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(43, 36, 32, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1100;
}
.acc-modal-bg[hidden] { display: none; }
.acc-modal-bg:not([hidden]) { animation: accFade 0.18s ease; }
@keyframes accFade { from { opacity: 0; } to { opacity: 1; } }

.acc-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 64px rgba(43, 36, 32, 0.24);
}
.acc-modal-wide { max-width: 560px; }

.acc-modal-bg:not([hidden]) .acc-modal {
  animation: accModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes accModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.acc-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  color: #9A8F82;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.acc-modal-close:hover { background: #FBF7F2; color: #2B2622; }

.acc-modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #2B2622;
  margin: 0 0 6px;
}
.acc-modal-sub {
  font-size: 13.5px;
  color: #7A6F65;
  line-height: 1.5;
  margin: 0 0 22px;
}

/* ---------- Form (profile) ---------- */
.acc-form { display: flex; flex-direction: column; gap: 14px; }
.acc-field { display: flex; flex-direction: column; gap: 6px; }
.acc-field span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9A8F82;
}
.acc-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #EADFCE;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: #2B2622;
  background: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.acc-field input:focus {
  outline: none;
  border-color: #C4673F;
  box-shadow: 0 0 0 3px rgba(196, 103, 63, 0.14);
}
.acc-field input:disabled {
  background: #FBF7F2;
  color: #9A8F82;
  cursor: not-allowed;
}

.acc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.acc-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.acc-btn-primary {
  background: #C4673F;
  color: #FFFFFF;
  border-color: #C4673F;
}
.acc-btn-primary:hover { background: #A85632; border-color: #A85632; }
.acc-btn-ghost {
  background: transparent;
  color: #7A6F65;
  border-color: #EADFCE;
}
.acc-btn-ghost:hover { background: #FBF7F2; color: #2B2622; }

/* ---------- Settings: dev notice ---------- */
.acc-dev-notice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #FFF9F0;
  border: 1px solid #F0E7D6;
  border-radius: 14px;
  padding: 16px;
}
.acc-dev-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C4673F;
  background: #FFF4E0;
  border-radius: 999px;
  padding: 3px 10px;
}
.acc-dev-notice p {
  font-size: 13.5px;
  line-height: 1.55;
  color: #7A6F65;
  margin: 0;
}

/* ---------- Help: two sections ---------- */
.acc-help-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.acc-help-section {
  background: #FBF7F2;
  border: 1px solid #F0E7D6;
  border-radius: 14px;
  padding: 18px;
}
.acc-help-section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.acc-help-section-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF4E0;
  color: #C4673F;
}
.acc-help-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #2B2622;
  margin: 0 0 2px;
}
.acc-help-section-sub {
  font-size: 13px;
  color: #7A6F65;
  line-height: 1.4;
  margin: 0;
}

/* Contact link inside "Need help?" */
.acc-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #EADFCE;
  color: #C4673F;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.acc-contact-link:hover {
  background: #FFF4E0;
  border-color: #E7CFAE;
}

/* FAQ inside "Having questions?" */
.acc-faq { display: flex; flex-direction: column; gap: 8px; }
.acc-faq details {
  background: #FFFFFF;
  border: 1px solid #F0E7D6;
  border-radius: 12px;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.acc-faq details[open] { border-color: #EADFCE; }
.acc-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #2B2622;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.acc-faq summary::-webkit-details-marker { display: none; }
.acc-faq summary::after {
  content: '+';
  font-size: 18px;
  line-height: 1;
  color: #9A8F82;
  transition: color 0.15s ease;
}
.acc-faq details[open] summary::after { content: '−'; color: #C4673F; }
.acc-faq details p {
  padding: 0 14px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #7A6F65;
  margin: 0;
}
.acc-faq details p strong { color: #2B2622; font-weight: 600; }

@media (max-width: 520px) {
  .acc-modal { padding: 22px 20px; border-radius: 18px; }
  .acc-modal-title { font-size: 20px; }
  .acc-modal-bg { padding: 16px; }
  .acc-help-section { padding: 16px; }
}
/* ==================================================================
   ARCHIVE — collapsible list of completed / removed items
   ================================================================== */
.archive-toggle-section { max-width: 1120px; margin: 30px auto 0; padding: 0 24px; }
.archive-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.archive-toggle:hover { color: var(--warm-deep); }
.archive-chevron { display: inline-block; transition: transform 0.2s ease; }
.archive-toggle.open .archive-chevron { transform: rotate(180deg); }
.archive-list {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.archive-item:last-child { border-bottom: none; }
.archive-item .archive-info { flex: 1; display: flex; align-items: center; gap: 10px; }
.archive-item .archive-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warm-wash);
  color: var(--warm-deep);
}
.archive-item .archive-actions { display: flex; gap: 8px; }
.archive-item .archive-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 2px 4px;
}
.archive-item .archive-actions button:hover { color: var(--c-health); }

/* ==================================================================
   HABIT FOCUS — three-dot menu inside banner habit card
   ================================================================== */
.habit-focus-actions-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  padding: 4px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.banner-focus:hover .habit-focus-actions-btn { opacity: 1; }
.habit-focus-actions-btn:hover { background: var(--warm-wash); color: var(--warm-deep); }
.habit-focus-actions-menu {
  position: absolute;
  top: 30px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  min-width: 120px;
  padding: 4px 0;
}
.habit-focus-actions-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s ease;
}
.habit-focus-actions-menu button:hover { background: var(--warm-wash); }

/* ==================================================================
   RESPONSIVE — dashboard (≤760px)
   ================================================================== */
@media (max-width: 760px) {
  .banner { padding: 22px 18px; border-radius: 22px; }
  .banner-focus { width: 100%; flex: 1 1 100%; }

  .section { padding: 40px 18px 0; }
  .hub-section { padding-top: 48px; }

  .planning-grid { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }

  .modal-overlay.immersive .modal { padding: 1.5rem 1rem; }
}

/* ==================================================================
   REDUCED MOTION
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .pre-reveal { opacity: 1; transform: none; }
}

/* ==================================================================
   AUTH PAGES (login / signup / forgot / reset)
   ================================================================== */
.auth-page {
  background: var(--page-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-shell { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.auth-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.auth-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}
.auth-sub { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0 0 24px; }

.auth-field { display: block; margin-bottom: 14px; }
.auth-field span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--warm-deep);
  box-shadow: 0 0 0 3px rgba(201, 126, 18, 0.12);
}
.auth-submit {
  width: 100%;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s ease;
}
.auth-submit:hover:not(:disabled) { background: var(--warm-deep); }
.auth-submit:disabled { opacity: 0.6; cursor: wait; }

.auth-error,
.auth-success {
  font-size: 13px;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.4;
}
.auth-error { background: var(--c-health-wash); color: var(--c-health); border: 1px solid var(--c-health-wash); }
.auth-success { background: var(--c-finance-wash); color: var(--c-finance); border: 1px solid var(--c-finance-wash); }

.auth-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  gap: 8px;
  justify-content: center;
}
.auth-footer a { color: var(--warm-deep); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

.auth-card--closable { position: relative; }
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-faint);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.auth-close:hover { background: rgba(0, 0, 0, 0.06); color: var(--ink); text-decoration: none; }

.auth-icon { font-size: 40px; text-align: center; margin-bottom: 12px; }
.auth-panel-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; text-align: center; margin: 0 0 12px; }
.auth-email-display {
  font-family: var(--font-data);
  font-size: 14px;
  text-align: center;
  color: var(--ink);
  background: var(--canvas);
  padding: 8px 12px;
  border-radius: 8px;
  margin: 0 0 16px;
  word-break: break-all;
}
.auth-links { text-align: center; font-size: 0.9em; margin: 12px 0 0; }
#confirmPanel .auth-submit { margin-top: 8px; }

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