

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {

  --accent:         #07934f;
  --accent-light:   #12b96a;
  --accent-dark:    #065f38;
  --blue:           #5B8DEF;
  --accent-glow:    rgba(7,147,79,.12);


  --green:  #22C55E;
  --red:    #EF4444;
  --orange: #F97316;
  --yellow: #EAB308;


  --bg:           #F5F7FB;
  --bg-card:      #FFFFFF;
  --bg-input:     #FFFFFF;
  --bg-sidebar:   #FBFCFE;
  --bg-hover:     #F8FAFC;
  --bg-stripe:    #F8FAFC;
  --border:       #E5E7EB;
  --border-input: #D0D5DD;
  --text:         #1F2937;
  --text-muted:   #667085;
  --text-subtle:  #98A2B3;
  --shadow:       0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md:    0 4px 10px rgba(16,24,40,.06), 0 2px 4px rgba(16,24,40,.04);
  --shadow-lg:    0 12px 24px rgba(16,24,40,.10), 0 2px 8px rgba(16,24,40,.06);
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    16px;


  --toggle-off: #C9CDD4;


  --sidebar-w:       240px;
  --topbar-h:        56px;
  --budget-thead-h:  37px;
}

[data-theme="dark"] {
  --toggle-off:   #484E62;
  --bg:           #0F1117;
  --bg-card:      #1A1D27;
  --bg-input:     #252836;
  --bg-sidebar:   #1A1D27;
  --bg-hover:     #252836;
  --bg-stripe:    #1E2130;
  --border:       #2E3347;
  --border-input: #3A4060;
  --text:         #F0F2F8;
  --text-muted:   #9CA3C0;
  --text-subtle:  #6B7280;
  --shadow:       0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 12px rgba(0,0,0,.5);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.6);
  --accent:       var(--green);
  --accent-dark:  #16a34a;
  --accent-light: #4ade80;
  --blue:         #7BA8F5;
  --accent-glow:  rgba(34,197,94,.18);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --toggle-off:   #484E62;
    --bg:           #0F1117;
    --bg-card:      #1A1D27;
    --bg-input:     #252836;
    --bg-sidebar:   #1A1D27;
    --bg-hover:     #252836;
    --bg-stripe:    #1E2130;
    --border:       #2E3347;
    --border-input: #3A4060;
    --text:         #F0F2F8;
    --text-muted:   #9CA3C0;
    --text-subtle:  #6B7280;
    --shadow:       0 1px 3px rgba(0,0,0,.4);
    --shadow-md:    0 4px 12px rgba(0,0,0,.5);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.6);
    --accent:       var(--green);
    --accent-dark:  #16a34a;
    --accent-light: #4ade80;
    --blue:         #7BA8F5;
    --accent-glow:  rgba(34,197,94,.18);
  }
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  transition: background .2s, color .2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn:hover, a.idx-btn-primary:hover, a.idx-btn-secondary:hover { text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea {
  font: inherit; color: inherit;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input[type="checkbox"]:focus {
  border-color: unset;
  box-shadow: none;
}


.date-input-wrap { position: relative; }
.date-input-label {
  display: block;
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
input[type="date"] {
  text-align: left;
  height: 2.75rem;
  -webkit-appearance: none;
  appearance: none;
}


.date-input-wrap::after {
  content: '';
  position: absolute;
  right: .65rem; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  pointer-events: none;
  background: var(--text-muted);
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='3' y='4' width='14' height='14' rx='2'/%3E%3Cpath d='M7 2v4M13 2v4M3 9h14'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='3' y='4' width='14' height='14' rx='2'/%3E%3Cpath d='M7 2v4M13 2v4M3 9h14'/%3E%3C/svg%3E");
  mask-size: contain; -webkit-mask-size: contain;
  mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
}


input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
}


input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--toggle-off);
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
  transition: background .22s ease;
  outline: none;
}
input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .22s ease;
}
input[type="checkbox"]:checked {
  background: var(--accent);
}
input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}
input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(34,197,94,.3);
}


.hidden { display: none !important; }
.flex   { display: flex; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: .8125rem; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.font-bold   { font-weight: 600; }
.income-val  { color: var(--green); }
.expense-val { color: var(--red); }
.transfer-val{ color: var(--blue); }
.positive    { color: var(--green); }
.negative    { color: var(--red); }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.w-full { width: 100%; }


.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.1rem; border-radius: 10px;
  font-size: .9rem; font-weight: 600;
  transition: background .15s, opacity .15s, transform .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97) translateY(0) !important; }
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  box-shadow: 0 2px 8px rgba(7,147,79,.22);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 4px 12px rgba(7,147,79,.32);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-card);
  border: 1.5px solid var(--border-input);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 2px 6px rgba(239,68,68,.2); }
.btn-danger:hover { background: #C03030; transform: translateY(-1px); }
.btn-secondary-red { color: var(--red); border-color: var(--red); }
.btn-secondary-red:hover { background: var(--bg-hover); border-color: var(--red); color: var(--red); transform: translateY(-1px); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); border-radius: 10px; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: .35rem .8rem; font-size: .8125rem; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); }
.btn-icon svg { width: 18px; height: 18px; }


.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 55% 45%;
  position: relative;
}


.auth-teaser {
  background: linear-gradient(160deg, #1A5C3A 0%, #2E7D52 55%, #1B5E37 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 3rem 3rem 3.5rem;
  min-height: 100dvh;
  overflow: hidden;
}
[data-theme="dark"] .auth-teaser {
  background: linear-gradient(160deg, #0D2618 0%, #163D27 55%, #0D2618 100%);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .auth-teaser {
    background: linear-gradient(160deg, #0D2618 0%, #163D27 55%, #0D2618 100%);
  }
}
.auth-teaser-inner { max-width: 480px; width: 100%; }

.auth-teaser-logo {
  display: flex; align-items: center; gap: .65rem;
  margin-bottom: 2.75rem;
}
.auth-teaser-logo span {
  font-size: 1.2rem; font-weight: 700;
  color: rgba(255,255,255,.9);
  letter-spacing: -.01em;
}

.auth-teaser-headline h1 {
  font-size: 1.875rem; font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .875rem;
  letter-spacing: -.025em;
}
.auth-teaser-headline p {
  font-size: .9375rem;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
}

.auth-teaser-features {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: flex; flex-direction: column; gap: .875rem;
}
.auth-teaser-features li {
  display: flex; align-items: center; gap: .75rem;
  color: rgba(255,255,255,.82);
  font-size: .875rem;
}
.auth-teaser-features li svg {
  width: 17px; height: 17px; flex-shrink: 0;
  opacity: .85;
}

.auth-teaser-screenshots {
  margin-top: 2.25rem;
  width: 100%;
}
.auth-carousel {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.auth-carousel-track {
  display: flex;
  -webkit-transition: -webkit-transform .4s cubic-bezier(.4,0,.2,1);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.auth-carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}
.auth-screenshot {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  display: block;
  transition: opacity .15s ease;
}
.auth-carousel:hover .auth-screenshot {
  opacity: .88;
}
.auth-carousel::after {
  content: '';
  position: absolute;
  top: .65rem;
  right: .65rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='1.75' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='5'/%3E%3Cpath d='M14 14l3 3'/%3E%3C/svg%3E") center/15px no-repeat;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.auth-carousel:hover::after {
  opacity: 1;
}
.auth-carousel-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: .65rem;
}
.auth-carousel-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  border: none;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  padding: 0;
  transition: background .25s ease, width .25s ease;
}
.auth-carousel-dot.active {
  background: rgba(255,255,255,.9);
  width: 18px;
}
.auth-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.auth-lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.auth-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
}
.auth-lightbox-content {
  position: relative;
  z-index: 1;
  width: 90vw;
  padding: 0 1rem;
  transform: scale(0.82);
  transition: transform .35s cubic-bezier(.34,1.9,.64,1);
}
.auth-lightbox.open .auth-lightbox-content {
  transform: scale(1);
}
.auth-lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  padding: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s ease;
}
.auth-lightbox-close:hover { color: #fff; }
.auth-lightbox-close svg { width: 26px; height: 26px; }
#auth-lightbox-img {
  width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  display: block;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
  object-fit: contain;
}

.auth-teaser-signup {
  display: block;
  width: fit-content;
  margin: 2.25rem auto 0;
  padding: .6rem 1.5rem;
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,.88);
  font-size: .875rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.auth-teaser-signup:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.85);
  color: #fff;
}

.auth-teaser-learnmore {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: 1rem;
  padding: .35rem .75rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  font-size: .8125rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none;
}
.auth-teaser-learnmore:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.55);
  color: #fff;
}
.auth-teaser-learnmore svg { width: 13px; height: 13px; transition: transform .15s ease; }
.auth-teaser-learnmore:hover svg { transform: translateX(2px); }


.teaser-lm {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.teaser-lm.open { opacity: 1; pointer-events: all; }
.teaser-lm-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.teaser-lm-card {
  position: relative; z-index: 1;
  background: linear-gradient(160deg, #173F28 0%, #245E3E 50%, #163B25 100%);
  border-radius: 16px;
  padding: 2.25rem 2.5rem 2.5rem;
  max-width: 620px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.07);
  transform: scale(.93) translateY(10px);
  transition: transform .3s cubic-bezier(.34,1.4,.64,1);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.teaser-lm.open .teaser-lm-card { transform: scale(1) translateY(0); }
.teaser-lm-card::-webkit-scrollbar { width: 5px; }
.teaser-lm-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.teaser-lm-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  background: rgba(255,255,255,.09); border: none;
  border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,.7);
  transition: background .15s ease, color .15s ease;
}
.teaser-lm-close:hover { background: rgba(255,255,255,.18); color: #fff; }
.teaser-lm-close svg { width: 16px; height: 16px; }
.teaser-lm-logo {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,.75); font-size: .875rem; font-weight: 600;
}
.teaser-lm-logo img { width: 26px; height: 26px; }
.teaser-lm-card h2 {
  font-size: 1.5rem; font-weight: 700;
  color: #fff; letter-spacing: -.03em; line-height: 1.2;
  margin-bottom: .625rem;
}
.teaser-lm-card .teaser-lm-intro {
  font-size: .9375rem; color: rgba(255,255,255,.68); line-height: 1.65;
  margin-bottom: 2rem;
}
.teaser-lm-section { margin-bottom: 1.75rem; }
.teaser-lm-section h3 {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: .875rem;
}
.teaser-lm-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .7rem;
}
.teaser-lm-features li {
  display: flex; align-items: flex-start; gap: .75rem;
  color: rgba(255,255,255,.82); font-size: .875rem; line-height: 1.55;
}
.teaser-lm-features li svg {
  width: 16px; height: 16px; flex-shrink: 0;
  margin-top: .15rem; opacity: .75;
}
.teaser-lm-features li strong { color: #fff; font-weight: 600; }
.teaser-lm-divider {
  border: none; border-top: 1px solid rgba(255,255,255,.1);
  margin: 1.75rem 0;
}
.teaser-lm-privacy {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem 1.125rem;
  background: rgba(255,255,255,.06); border-radius: 10px;
  border: 1px solid rgba(255,255,255,.09);
  margin-bottom: 2rem;
}
.teaser-lm-privacy svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem; opacity: .7; }
.teaser-lm-privacy p { font-size: .8125rem; color: rgba(255,255,255,.65); line-height: 1.6; margin: 0; }
.teaser-lm-cta {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.teaser-lm-cta-btn {
  padding: .65rem 1.75rem;
  background: rgba(255,255,255,.95); border: none; border-radius: var(--radius-sm);
  color: #1A5C3A; font-size: .9375rem; font-weight: 700;
  cursor: pointer; transition: background .15s ease, transform .15s ease;
  white-space: nowrap;
}
.teaser-lm-cta-btn:hover { background: #fff; transform: translateY(-1px); }
.teaser-lm-cta-note { font-size: .8125rem; color: rgba(255,255,255,.45); }
@media (max-width: 640px) {
  .teaser-lm-card { padding: 1.75rem 1.5rem 2rem; }
  .teaser-lm-card h2 { font-size: 1.25rem; }
}


.auth-panel {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100dvh;
  padding: calc(max(1rem,env(safe-area-inset-top)) + 3.5rem) 2rem max(2.5rem,env(safe-area-inset-bottom));
  background: linear-gradient(135deg, #EDF2FF 0%, #F7F8FC 60%, #EDF4FF 100%);
  position: relative;
}
[data-theme="dark"] .auth-panel {
  background: linear-gradient(135deg, #0F1117 0%, #1A1D27 60%, #12161F 100%);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .auth-panel {
    background: linear-gradient(135deg, #0F1117 0%, #1A1D27 60%, #12161F 100%);
  }
}

.auth-footer {
  position: absolute;
  bottom: max(.75rem, env(safe-area-inset-bottom));
  left: 55%; right: 0;
  text-align: center;
  font-size: .75rem;
  color: var(--text-subtle);
  pointer-events: auto;
}
@media (max-width: 768px) {
  .auth-footer {
    position: static;
    order: 2;
    padding: .875rem 1rem max(.875rem, env(safe-area-inset-bottom));
    background: linear-gradient(160deg, #1A5C3A 0%, #2E7D52 100%);
    color: rgba(255,255,255,.45);
  }
  .auth-footer a { color: rgba(255,255,255,.6) !important; }
}


@media (max-width: 768px) {
  .auth-screen {
    display: flex; flex-direction: column;
  }
  .auth-panel {
    order: -1;
    min-height: auto;
    padding: calc(max(1rem,env(safe-area-inset-top)) + 3rem) 1rem 2.5rem;
  }
  .auth-teaser {
    order: 1;
    min-height: auto;
    padding: 2.5rem 1.5rem max(3rem, env(safe-area-inset-bottom));
    border-radius: 2rem 2rem 0 0;
    margin-top: -1px;
    position: relative;
  }
  .auth-teaser::before {
    content: '';
    position: absolute;
    top: .75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem; height: 4px;
    background: rgba(255,255,255,.3);
    border-radius: 2px;
  }
  .auth-teaser-inner {
    align-items: center; text-align: center;
  }
  .auth-teaser-logo { margin-bottom: 1.5rem; justify-content: center; }
  .auth-teaser-headline h1 { font-size: 1.375rem; }
  .auth-teaser-features {
    margin-top: 1.5rem;
    width: fit-content; margin-left: auto; margin-right: auto;
    text-align: left;
  }
  .auth-screenshot { height: 150px; }
  .auth-teaser-signup { margin-top: 1.75rem; }
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 400px;
  border: 1px solid var(--border);
}
.auth-logo {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 2rem;
}
.auth-logo svg { width: 40px; height: 40px; }
.auth-logo span { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.auth-card h2 { font-size: 1.25rem; margin-bottom: 1.25rem; }
.auth-switch { margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); text-align: center; }
.auth-switch a { margin-left: .35rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; }
.form-error   { color: var(--red);   font-size: .875rem; padding: .5rem; background: rgba(239,68,68,.08);  border-radius: var(--radius-sm); margin-bottom: .75rem; }
.form-success { color: #166534;      font-size: .875rem; padding: .5rem; background: rgba(34,197,94,.10);  border-radius: var(--radius-sm); margin-bottom: .75rem; }


#app { display: flex; flex-direction: column; min-height: 100dvh; }


.app-topnav {
  position: sticky; top: 0; z-index: 200;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(16,24,40,.04);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem;
}
.app-topnav-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.app-topnav-logo img { display: block; }
.app-topnav-links {
  display: flex; align-items: center; gap: .25rem;
  flex: 1; margin-left: .75rem;
}
.app-topnav-link {
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  padding: 0 .65rem; height: var(--topbar-h);
  display: inline-flex; align-items: center;
  position: relative;
  transition: color .18s;
}
.app-topnav-link:hover { color: var(--accent); }
.app-topnav-link.active { color: var(--accent); font-weight: 650; }
.app-topnav-link.active::after {
  content: ""; position: absolute;
  left: .65rem; right: .65rem; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.app-topnav-actions {
  display: flex; align-items: center; gap: .5rem; flex-shrink: 0;
  margin-left: auto;
}
.app-topnav .lang-btn.active { color: var(--accent); border-color: var(--accent); }
.topnav-page-title {
  display: none; 
  flex: 1; min-width: 0;
  font-size: 1rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}


.app-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 0; border-radius: var(--radius-sm); transition: background .15s; flex-shrink: 0;
}
.app-hamburger:hover { background: var(--bg-hover); }
.app-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s; transform-origin: center;
}
.app-topnav.menu-open .app-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.app-topnav.menu-open .app-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.app-topnav.menu-open .app-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


.app-user-menu { position: relative; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .875rem; flex-shrink: 0;
  border: none; cursor: pointer;
  transition: opacity .15s;
}
.user-avatar:hover { opacity: .85; }
.avatar-notif-dot {
  position: absolute; top: 0; right: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg-card);
  pointer-events: none;
}


.settings-popup {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 220px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .3rem 0; z-index: 300;
}
.settings-popup-header {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem .85rem .5rem;
}
.settings-popup-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9375rem; flex-shrink: 0;
}
.settings-popup-info { overflow: hidden; min-width: 0; }
.settings-menu-item {
  display: flex; align-items: center; gap: .6rem;
  width: 100%; padding: .55rem .85rem;
  font-size: .875rem; color: var(--text); text-align: left;
  background: none; border: none; cursor: pointer;
  transition: background .12s;
  position: relative;
}
.notif-dot {
  position: absolute; top: 6px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); pointer-events: none;
}
.settings-menu-item:hover { background: var(--bg-hover); }
.settings-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); }
.settings-menu-danger { color: var(--red) !important; }
.settings-menu-danger svg { color: var(--red) !important; }
.settings-menu-divider { border-top: 1px solid var(--border); margin: .3rem 0; }
.user-name { display: block; font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.app-mobile-menu {
  display: none;
  position: fixed; top: var(--topbar-h); left: 1rem; z-index: 199;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.08);
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease, opacity .2s ease;
  opacity: 0;
}
.app-mobile-menu.open { max-height: 360px; opacity: 1; }
.app-mobile-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem 1rem;
  font-size: .9375rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; background: none; border: none; cursor: pointer;
  width: 100%; text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background .12s, color .12s;
}
.app-mobile-link:last-child { border-bottom: none; }
.app-mobile-link:hover { background: var(--bg-hover); color: var(--text); }
.app-mobile-link.active { color: var(--accent); font-weight: 600; }
.app-mobile-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.app-mobile-danger { color: var(--red) !important; }
.app-mobile-divider { border-top: 2px solid var(--border); margin: 0; }


.admin-mobile-chevron { width: 14px; height: 14px; margin-left: auto; flex-shrink: 0; transition: transform .2s; }
#nav-admin-mobile.submenu-open .admin-mobile-chevron { transform: rotate(90deg); }
.admin-mobile-submenu {
  display: none;
  position: fixed; top: var(--topbar-h); left: calc(1rem + 200px - 20px); z-index: 200;

  min-width: 175px;
  background: var(--bg-card);
  border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.08);
  flex-direction: column; overflow: hidden;
  max-height: 0; opacity: 0; pointer-events: none;
  transition: max-height .25s ease, opacity .2s ease;
}
.admin-mobile-submenu.open { max-height: 400px; overflow-y: auto; opacity: 1; pointer-events: auto; }
@media (max-width: 768px) {
  .admin-mobile-submenu { display: flex; }
}


.main-content {
  flex: 1;
  display: flex; flex-direction: column;
  min-width: 0;
}
@media (max-width: 768px) { .main-content { min-height: 100dvh; } }
.topbar-title { font-size: 1.1rem; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff;
  border-radius: 999px; font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; line-height: 1;
}
.notif-panel {
  position: fixed; top: calc(var(--topbar-h) + 8px); right: 8px;
  width: min(380px, calc(100vw - 16px)); height: calc(100dvh - var(--topbar-h) - 16px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  z-index: 300; transform: translateX(110%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  pointer-events: none;
}
.notif-panel.open { transform: translateX(0); pointer-events: auto; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h); flex-shrink: 0;
  padding: 0 1rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: .9375rem; font-weight: 600; color: var(--text);
}
.notif-panel-body { flex: 1; overflow-y: auto; }
.notif-panel-header .btn-icon { color: var(--accent); }
.notif-panel-header .btn-icon:hover { background: var(--accent-glow); color: var(--accent-dark); }


.notif-tabs { display: flex; gap: 1rem; height: 100%; align-items: center; min-width: 0; }
.notif-tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  height: calc(100% - 2px); padding: 0; margin: 0;
  font: inherit; font-size: .875rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .35rem;
  transition: color .15s, border-color .15s;
}
.notif-tab-btn:hover { color: var(--text); }
.notif-tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.notif-tab-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}


.changelog-item { padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); }
.changelog-item.unread { background: color-mix(in srgb, var(--accent) 5%, var(--bg-card)); border-left: 3px solid var(--accent); padding-left: calc(1.25rem - 3px); }
.changelog-item-meta { font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; }
.changelog-item-meta strong { color: var(--text); font-size: .875rem; }
.changelog-item ul { margin: 0; padding: 0; list-style: none; font-size: .8125rem; }
.changelog-item li { display: flex; gap: .5rem; align-items: baseline; margin-bottom: .35rem; }
.changelog-item li:last-child { margin-bottom: 0; }
.changelog-item li.changelog-announcement { background: color-mix(in srgb, var(--orange) 12%, transparent); border-radius: var(--radius-sm); padding: .4rem .6rem; font-weight: 600; }


.announcement-banner { display: flex; align-items: flex-start; gap: .6rem; padding: .875rem 1.25rem .875rem calc(1.25rem - 3px); margin: .75rem; background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--radius); font-weight: 600; font-size: .875rem; }
.announcement-banner .announcement-icon { font-weight: 700; line-height: 1.4; }
.announcement-banner .announcement-icon-wrap { display: flex; flex-direction: column; align-items: center; gap: .25rem; flex-shrink: 0; }
.announcement-banner.severity-info    { background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));  border-left-color: var(--accent); }
.announcement-banner.severity-warning { background: color-mix(in srgb, var(--orange) 8%, var(--bg-card)); border-left-color: var(--orange); }
.announcement-banner.severity-error   { background: color-mix(in srgb, var(--red) 8%, var(--bg-card));    border-left-color: var(--red); }
#ann-preview .announcement-banner { margin: 0; }
#notif-announcement:empty { display: none; }
#notif-announcement .announcement-banner { margin: .75rem .75rem 0; }
@media (max-width: 768px) {
  .notif-panel { height: calc(100dvh - var(--topbar-h) - 40px); }
}

.notif-swipe-wrap { position: relative; overflow: hidden; }
.notif-bg-read,
.notif-bg-delete {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: center; gap: .4rem;
  font-size: .8125rem; font-weight: 600; color: #fff;
  padding: 0 1.25rem; pointer-events: none;
}
.notif-bg-read   { inset: 0; background: var(--accent); justify-content: flex-start; opacity: 0; z-index: 0; }
.notif-bg-delete { inset: 0; background: var(--red);    justify-content: flex-end;   opacity: 0; z-index: 0; }
.notif-swipe-wrap.sw-read   .notif-bg-read   { opacity: 1; }
.notif-swipe-wrap.sw-delete .notif-bg-delete { opacity: 1; }

@media (hover: hover) {
  .notif-bg-read, .notif-bg-delete { display: none; }
}

.notif-item {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .875rem 1.25rem; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
  background: var(--bg-card); position: relative; width: 100%; z-index: 1;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: color-mix(in srgb, var(--accent) 5%, var(--bg-card)); border-left: 3px solid var(--accent); }


.notif-item-actions { display: none; gap: .15rem; align-items: center; flex-shrink: 0; margin-left: auto; }
.notif-item-actions .btn-icon { width: 30px; height: 30px; }
@media (hover: hover) {
  .notif-item-actions { display: flex; opacity: 0; transition: opacity .15s; }
  .notif-item:hover .notif-item-actions { opacity: 1; }
}
.notif-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: .35rem;
  opacity: 0;
}
.notif-item.unread .notif-item-dot { opacity: 1; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-size: .875rem; font-weight: 600; margin-bottom: .15rem; }
.notif-item-body  { font-size: .8125rem; color: var(--text-muted); line-height: 1.4; }
.notif-item-time  { font-size: .75rem; color: var(--text-subtle); margin-top: .2rem; }
.notif-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: .9375rem;
}
.lang-switcher { display: flex; gap: 2px; }
.lang-btn {
  font-size: .75rem; font-weight: 600; padding: .25rem .45rem;
  border-radius: var(--radius-sm); color: var(--text-muted);
  border: 1.5px solid transparent;
  transition: all .15s;
}
.lang-btn.active { color: var(--accent); border-color: var(--accent); }
.content-area { flex: 1; padding: 1.5rem; overflow-x: hidden; }
.app-footer {
  padding: .75rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .75rem;
  color: var(--text-subtle);
}


.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.stat-label { font-size: .8rem; color: var(--text-muted); margin-bottom: .25rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-sub   { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }


.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.budget-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.budget-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); transform: translateY(-2px); }
.budget-card--demo { background: #fff8f2; border-color: #f5a46a; }
.budget-card--demo:hover { border-color: #e07a30; }
[data-theme="dark"] .budget-card--demo { background: #2a1f14; border-color: #c2713a; }
[data-theme="dark"] .budget-card--demo:hover { border-color: #e07a30; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .budget-card--demo { background: #2a1f14; border-color: #c2713a; }
  [data-theme="system"] .budget-card--demo:hover { border-color: #e07a30; }
}
.budget-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.budget-card-name { font-size: 1.05rem; font-weight: 600; }
.budget-card-meta { font-size: .8rem; color: var(--text-muted); margin-top: .35rem; }
.budget-card-years { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .75rem; }
.budget-card-activity { font-size: .72rem; color: var(--text-subtle); margin-top: .5rem; }
.year-chip {
  font-size: .75rem; font-weight: 500;
  padding: .2rem .55rem;
  border-radius: 20px;
  background: rgba(7,147,79,.1); color: var(--accent);
  cursor: pointer;
  border: 1px solid rgba(7,147,79,.2);
  transition: background .15s;
}
.year-chip:hover { background: rgba(7,147,79,.2); }
.year-chip--closed { opacity: .65; border-style: dashed; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  padding: .15rem .5rem; border-radius: 20px;
}
.badge-template  { background: rgba(234,179,8,.15);  color: #A16207; }
.badge-subtotals      { background: rgba(20,184,166,.13);  color: #0F766E; }
.badge-reconciliation { background: rgba(34,197,94,.13);   color: #15803D; }
.badge-month-end-reminder { background: rgba(99,102,241,.13);  color: #4338CA; }
.badge-year-end-reminder  { background: rgba(168,85,247,.13);  color: #7E22CE; }
.badge-closed         { background: rgba(107,114,128,.13); color: var(--text-muted); }
.badge-shared         { background: rgba(7,147,79,.12);    color: var(--accent); }
.badge-plan           { background: rgba(14,165,233,.13);  color: #0369A1; }
.badge-danger         { background: rgba(239,68,68,.15);   color: #B91C1C; }
.badge-demo           { background: #f59e0b; color: #fff; font-size: .7rem; padding: .15rem .45rem; border-radius: .25rem; font-weight: 600; margin-left: .4rem; vertical-align: middle; }
.demo-warning-banner  { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; padding: .5rem 1rem; font-size: .82rem; text-align: center; border-radius: var(--radius-sm); margin-bottom: .75rem; }


.shares-list { display: flex; flex-direction: column; gap: .5rem; max-height: 260px; overflow-y: auto; }
.share-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  gap: .2rem .5rem; padding: .6rem .75rem;
  background: var(--bg-hover); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.share-item-main { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.share-item-main > div { min-width: 0; overflow: hidden; }
.share-item-name { font-weight: 600; font-size: .875rem; }
.share-item-email { font-size: .75rem; margin-left: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 100%; vertical-align: bottom; }
.share-item-meta  { grid-column: 1; display: flex; flex-wrap: wrap; gap: .35rem; }
.share-item-meta span { font-size: .72rem; color: var(--text-muted); }
.share-item-revoke {
  grid-column: 2; grid-row: 1 / 3; align-self: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-subtle); font-size: 1.1rem; line-height: 1;
  padding: .2rem .35rem; border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.share-item-revoke:hover { color: var(--red); background: rgba(239,68,68,.08); }
.share-search-found {
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; padding: .3rem .5rem;
  background: rgba(34,197,94,.08); border-radius: var(--radius-sm);
  color: var(--text);
}
.share-search-found svg { color: var(--green); flex-shrink: 0; }
.share-add-form,
.anon-link-form {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .5rem;
}
.share-row {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.share-row .date-input-wrap { width: 100%; }
.share-row button { align-self: flex-end; }


.admin-subnav {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.admin-subnav-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: .6rem 1.1rem; margin-bottom: -1px;
  font: inherit; font-size: .875rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.admin-subnav-btn:hover { color: var(--text); }
.admin-subnav-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.cm-row-actions { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
@media (max-width: 768px) {
  .cm-row { flex-wrap: wrap; }
  .cm-row-actions { width: 100%; justify-content: flex-end; padding-top: .35rem; border-top: 1px solid var(--border); margin-top: .35rem; }
}
.admin-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; margin-left: .3rem; vertical-align: middle; }
.admin-pagination { display: flex; gap: .35rem; margin-top: 1rem; flex-wrap: wrap; }
@media (max-width: 768px) {
  .admin-subnav { display: none; }
}


.admin-log-row { cursor: pointer; border-bottom: 1px solid var(--border); transition: background .12s; }
.admin-log-row:last-child { border-bottom: none; }
.admin-log-row:hover { background: var(--bg-hover); }

.admin-log-detail { display: flex; flex-direction: column; gap: 0; }
.admin-log-detail-section { display: flex; flex-direction: column; gap: .6rem; padding: .25rem 0; }
.admin-log-detail-divider { border-top: 1px solid var(--border); margin: .5rem 0 .75rem; }
.admin-log-detail-row { display: flex; gap: 1rem; align-items: baseline; }
.admin-log-detail-label {
  flex-shrink: 0; width: 130px;
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .02em;
}
.admin-log-detail-value { flex: 1; font-size: .9rem; line-height: 1.4; }

.admin-user-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-user-row:last-child { border-bottom: none; }
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name {
  font-size: .875rem; font-weight: 500;
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.admin-user-email {
  font-size: .8rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: .1rem;
}
.admin-user-meta {
  font-size: .72rem; color: var(--text-subtle); margin-top: .15rem;
}
.admin-user-actions { display: flex; gap: .3rem; flex-shrink: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { text-align: left; padding: .5rem .75rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.admin-user-name-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; font-weight: 500; font-size: .875rem;
  color: var(--text); cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: transparent;
  transition: text-decoration-color .15s, color .15s;
}
.admin-user-name-btn:hover { color: var(--accent); text-decoration-color: var(--accent); }


.user-stats-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
  margin-bottom: 1.25rem;
}
.user-stats-kpi {
  background: var(--bg-hover); border-radius: 8px;
  padding: .75rem; text-align: center;
}
.user-stats-kpi .kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.user-stats-kpi .kpi-label { font-size: .72rem; color: var(--text-subtle); margin-top: .25rem; }
.user-stats-login {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem;
  padding: .5rem .75rem; background: var(--bg-hover); border-radius: 6px;
}
.user-stats-login:last-child { margin-bottom: 0; }
@media (max-width: 480px) { .user-stats-kpis { grid-template-columns: 1fr 1fr; } }


.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.page-header h2 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-title-row { display: flex; align-items: center; gap: .5rem; }
.page-back-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; color: var(--text-muted); transition: background .15s, color .15s, border-color .15s; }
.page-back-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-input); }
.page-header-left { min-width: 0; }
.page-header-right { display: flex; align-items: center; gap: 1rem; }
.header-summary { display: flex; align-items: center; gap: .3rem; }
.hs-item { padding: .2rem .65rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.hs-label { font-size: .7rem; color: var(--text-muted); white-space: nowrap; margin-bottom: .1rem; }
.hs-value { font-size: .95rem; font-weight: 700; white-space: nowrap; }
@media (min-width: 901px) {
  .page-header > .header-summary { order: 2; }
  .page-header > .page-actions  { order: 3; }
}
@media (max-width: 900px) {
  .page-header { align-items: flex-start; }
  .page-header-left { flex: 1; order: 1; }
  .page-header > .page-actions { order: 1; align-self: flex-start; }
  .header-summary { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; gap: .2rem; order: 3; }
  .hs-item { padding: .15rem .25rem; text-align: center; }
  .hs-label { font-size: .58rem; white-space: normal; line-height: 1.2; }
  .hs-value { font-size: .72rem; }
}


.breadcrumb { display: flex; align-items: center; gap: .2rem; margin-bottom: .3rem; font-size: .75rem; min-width: 0; }
.breadcrumb .bc-link { color: var(--text-muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; transition: color .15s; }
.breadcrumb .bc-link:hover { color: var(--text); text-decoration: underline; }
.breadcrumb .bc-sep { color: var(--text-subtle); flex-shrink: 0; }
.breadcrumb .bc-current { color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
@media (max-width: 768px) {
  .breadcrumb .bc-link:not(.bc-parent),
  .breadcrumb .bc-sep,
  .breadcrumb .bc-current { display: none; }
  .breadcrumb .bc-parent { font-size: .825rem; color: var(--accent); max-width: none; }
  .breadcrumb .bc-parent::before { content: '‹ '; }
}


.action-menu { position: relative; display: inline-block; }
.action-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  z-index: 500;
  overflow: hidden;
}
.action-menu-item {
  display: block; width: 100%;
  padding: .6rem 1rem;
  font-size: .875rem; text-align: left;
  color: var(--text); white-space: nowrap;
  transition: background .12s;
}
.action-menu-item:hover { background: var(--bg-hover); }
.action-menu-item.danger { color: var(--red); }
.action-menu-divider { height: 1px; background: var(--border); margin: .25rem 0; }


.year-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.year-tab {
  padding: .45rem 1rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  transition: all .15s;
}
.year-tab:hover { border-color: var(--accent); color: var(--accent); }
.year-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.year-tab--closed { border-style: dashed; opacity: .75; }
.year-tab--closed.active { opacity: 1; }


.year-nav { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 1.25rem; }
.year-nav-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}
.year-nav-arrow svg { width: 16px; height: 16px; }
.year-nav-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.year-nav-arrow:disabled { opacity: .35; cursor: default; }
.year-nav-select {
  width: auto; height: 32px; padding: 0 .5rem;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: .875rem; font-weight: 700;
  color: var(--accent); background: var(--bg-card);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.year-nav-select:hover { border-color: var(--accent-dark); color: var(--accent-dark); }
.year-nav-select:focus { border-color: var(--accent-dark); outline: none; }
.year-nav-add { margin-left: .25rem; }
.year-nav-closed-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-left: .5rem; padding: .25rem .6rem;
  background: rgba(34,197,94,.1); border: 1.5px solid rgba(34,197,94,.4);
  border-radius: var(--radius-sm);
  color: #15803d; font-size: .75rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.year-nav-closed-badge svg { color: var(--text-muted); flex-shrink: 0; }
[data-theme="dark"] .year-nav-closed-badge { color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .year-nav-closed-badge { color: var(--green); }
}
.year-nav-closed-badge:hover { background: rgba(34,197,94,.18); }
.entry-closed { color: var(--text-muted); pointer-events: none; cursor: default; }
.year-notes {
  font-size: .825rem; color: var(--text-muted);
  margin: -.5rem 0 1rem;
  white-space: pre-wrap; line-height: 1.5;
}


.budget-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: max(180px, calc(100dvh - var(--topbar-h) - 215px));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-input) transparent;
}
.budget-table-wrap::-webkit-scrollbar { height: 8px; width: 6px; }
.budget-table-wrap::-webkit-scrollbar-track { background: transparent; }
.budget-table-wrap::-webkit-scrollbar-thumb { background: var(--border-input); border-radius: 4px; }
.budget-table-wrap::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.budget-table {
  width: 100%; border-collapse: collapse;
  font-size: .85rem; min-width: 900px;
}
.budget-table th {
  background: var(--bg-stripe);
  border-bottom: 2px solid var(--border-input);
  padding: .6rem .75rem;
  text-align: right; font-weight: 600;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; position: sticky; top: 0;
  z-index: 10;
}
.budget-table .month-col { min-width: 80px; border-left: 1px solid var(--border); }
.budget-table th:first-child {
  text-align: left;
  position: sticky; left: 0; z-index: 20;
  background: var(--bg-stripe);
}
.budget-table td {
  padding: .22rem .75rem;
  border-bottom: 1px solid var(--border-input);
  text-align: right;
  vertical-align: middle;
}
.budget-table td:first-child {
  text-align: left; max-width: 220px;
  position: sticky; left: 0; z-index: 1;
  background: var(--bg-card);
}
.budget-table tr:hover td { background: var(--bg-hover); }
.budget-table tr:hover td:first-child { background: var(--bg-hover); }

.budget-table tr.group-header td {
  background: var(--bg-stripe);
  font-weight: 600; font-size: .775rem;
  color: var(--text);
  text-transform: uppercase; letter-spacing: .07em;
  padding: .25rem .75rem .15rem;
  border-bottom: 1px solid var(--border-input);
  position: sticky;
  top: var(--budget-thead-h);
  z-index: 3;
}
.budget-table tbody + tbody tr.group-header td {
  border-top: 2px solid var(--border-input);
}

.budget-table tr.group-header td:first-child {
  white-space: nowrap;
  max-width: none;
  z-index: 4;
}

.budget-table tr.group-header td:nth-child(2) {
  position: sticky;
  top: var(--budget-thead-h);
  border-right: none;
}
.budget-table tr.subtotal-row td {
  font-weight: 600;
  font-size: .8rem;
  border-top: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  background: var(--bg-stripe);
}
.budget-table tr.subtotal-row td:first-child  { position: sticky; left: 0;                    z-index: 2; background: var(--bg-stripe) !important; }
.budget-table tr.subtotal-row td:nth-child(2) { position: sticky; left: var(--cat-col-w); z-index: 2; background: var(--bg-stripe) !important; border-right: 1px solid var(--border); }
.budget-table tr.subtotal-row.subtotal-income  td:first-child,
.budget-table tr.subtotal-row.subtotal-income  td:nth-child(2) { background: color-mix(in srgb, var(--green) 9%, var(--bg-card)) !important; }
.budget-table tr.subtotal-row.subtotal-expense td:first-child,
.budget-table tr.subtotal-row.subtotal-expense td:nth-child(2) { background: color-mix(in srgb, var(--red) 9%, var(--bg-card)) !important; }
.budget-table tr.subtotal-row.subtotal-transfer td:first-child,
.budget-table tr.subtotal-row.subtotal-transfer td:nth-child(2) { background: color-mix(in srgb, var(--blue) 9%, var(--bg-card)) !important; }
.budget-table tr.subtotal-row.subtotal-income td { background: rgba(34,197,94,.07); border-top-color: rgba(34,197,94,.35); }
.budget-table tr.subtotal-row.subtotal-expense td { background: rgba(239,68,68,.07); border-top-color: rgba(239,68,68,.35); }
.budget-table tr.total-row td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  background: var(--bg-stripe);
}
.budget-table tr.section-heading td {
  padding: .75rem .75rem .5rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--bg-stripe);
  border-top: 2px solid var(--border);
}
.budget-table tr.section-heading td:nth-child(2) {
  position: static;
  border-right: none;
}
.budget-table tr.total-row td:first-child    { background: var(--bg-stripe); }
.budget-table tr.balance-row td:first-child  { background: var(--bg-card); }
.budget-table tr.balance-row td:nth-child(2) { font-weight: 700; font-size: .95rem; }
.budget-table tr.subtotal-row.subtotal-transfer td { background: rgba(91,141,239,.07); border-top-color: rgba(91,141,239,.35); }

.cat-group-body.group-collapsed tr.cat-row { display: none; }
.budget-table tr.cat-row td { border-top: 1px solid var(--border-input); }
.collapse-chevron { transition: transform .15s ease; }
.cat-group-body.group-collapsed .collapse-chevron { transform: rotate(-90deg); }
.group-collapse-btn {
  margin-left: .45rem;
  opacity: .45;
  vertical-align: middle;
  transition: opacity .1s;
}
.budget-table tr.group-header:hover .group-collapse-btn { opacity: .75; }
.group-collapse-btn:hover { opacity: 1 !important; }


.drag-handle, .group-drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; padding: .45rem .1rem;
  color: var(--text-subtle); cursor: grab; user-select: none;
  font-size: .95rem; flex-shrink: 0; align-self: center;
  opacity: .45;
  transition: opacity .15s;
}
.drag-handle:hover, .group-drag-handle:hover { opacity: 1; }
.drag-handle:active, .group-drag-handle:active { cursor: grabbing; }


@media (hover: none) and (pointer: coarse) {
  .drag-handle, .group-drag-handle { min-width: 36px; opacity: .6; }
}
.cat-row.dragging, .cat-item.dragging { opacity: .35; }
.cat-item--inactive { opacity: .4; }
#categories-card:not(.show-inactive) .cat-item--inactive { display: none; }
.cat-row.drag-over td:first-child { border-top: 2px solid var(--accent); }
.cat-item.drag-over { border-top: 2px solid var(--accent); }


.group-wrap.dragging { opacity: .35; }
.group-wrap.drag-over { border-top: 2px solid var(--accent); }
.cat-group-body.dragging { opacity: .35; }
.cat-group-body.drag-over tr.group-header td:first-child { border-top: 2px solid var(--accent); }
.cat-group-body.drag-over tr.group-header td { background: rgba(7,147,79,.08); }
.cat-group-list.drag-over { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.cat-group-placeholder td { color: var(--text-subtle); font-size: .8rem; font-style: italic; text-align: left; border-bottom: 1px dashed var(--border); padding: .4rem .75rem; }
.cat-group-placeholder.drag-over td { background: rgba(7,147,79,.08); color: var(--accent); border-color: var(--accent); }


.budget-table tr.group-header:hover .group-add-cat-btn { opacity: .6; }
.budget-table tr.group-header .btn-icon { width: 24px; height: 24px; }


.budget-table { --cat-col-w: 160px; } 
.budget-table th:nth-child(2) {
  position: sticky; left: var(--cat-col-w); z-index: 15;
  background: var(--bg-stripe);
  border-right: 2px solid var(--border);
}
.budget-table td:nth-child(2) {
  position: sticky; left: var(--cat-col-w); z-index: 1;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
}
.budget-table tr:hover td:nth-child(2)       { background: var(--bg-hover); }
.budget-table tr.total-row td:nth-child(2)   { background: var(--bg-stripe); }
.budget-table tr.balance-row td:nth-child(2) { background: var(--bg-card); }

.entry-input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.entry-input {
  border: none; background: transparent;
  text-align: right; padding: .15rem .35rem;
  width: 100%;
  border-radius: var(--radius-sm);
  font-size: .8rem;
}
.entry-input:focus { background: var(--bg-card); border: 1.5px solid var(--accent); }
.entry-input:hover { background: var(--bg-hover); }
.entry-input::selection { background: rgba(7,147,79,.2); color: var(--text); }

.entry-input::-webkit-outer-spin-button,
.entry-input::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.cat-name-cell { display: flex; align-items: center; gap: .5rem; }
.cat-actions { display: none; gap: .2rem; }
tr:hover .cat-actions { display: flex; }


.month-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  background: var(--bg-stripe);
  border-bottom: 1px solid var(--border);
}
#month-nav-label {
  font-weight: 600;
  font-size: .9rem;
}


.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90dvh; display: flex; flex-direction: column;
  overflow: hidden;
}
.modal::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  flex-shrink: 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header .btn-icon { color: var(--accent); }
.modal-header .btn-icon:hover { background: var(--accent-glow); color: var(--accent-dark); }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: .5rem;
  flex-wrap: wrap;
}


.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-check { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: .75rem; }
.form-check input[type="checkbox"] { order: 2; flex-shrink: 0; }
.form-check label { order: 1; flex: 1; }
.form-check input:not([type="checkbox"]) { width: auto; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 7l3 3 3-3' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px; padding-right: 2rem; }


.pm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 900;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
@media (min-width: 640px) {
  .pm-overlay { align-items: center; padding: 1rem; }
}
.pm-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 720px;
  max-height: 92dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform .25s cubic-bezier(.34,1.4,.64,1);
}
.pm-overlay:not(.hidden) .pm-modal { transform: translateY(0); }
@media (min-width: 640px) {
  .pm-modal {
    border-radius: var(--radius-lg);
    max-height: 88dvh;
    transform: scale(.96);
    transition: transform .25s cubic-bezier(.34,1.4,.64,1);
  }
  .pm-overlay:not(.hidden) .pm-modal { transform: scale(1); }
}
.pm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pm-header h3 { font-size: 1rem; font-weight: 600; }
.pm-header .btn-icon { color: var(--accent); }
.pm-header .btn-icon:hover { background: var(--accent-glow); color: var(--accent-dark); }
.pm-body { padding: 0 1.5rem 2rem; overflow-y: auto; overflow-x: hidden; }
.pm-drag-handle {
  width: 2.5rem; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: .6rem auto 0;
  flex-shrink: 0;
}
@media (min-width: 640px) { .pm-drag-handle { display: none; } }


.policy-hero {
  background: linear-gradient(180deg, #eff8f3 0%, #f8fcfa 100%);
  border-bottom: 1px solid #dcebe4;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
[data-theme="dark"] .policy-hero { background: rgba(34,197,94,.04); border-color: rgba(34,197,94,.12); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .policy-hero { background: rgba(34,197,94,.04); border-color: rgba(34,197,94,.12); }
}
.policy-hero .idx-eyebrow { margin: 0 auto 1.1rem; }
.policy-hero h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .6rem; color: var(--text); }
.policy-hero p { color: var(--text-muted); font-size: .875rem; margin: 0; }
.policy-page { max-width: 700px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.policy-section a { color: var(--accent); }
.policy-page h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.policy-meta { font-size: .78rem; color: var(--text-subtle); margin-bottom: 1.75rem; }
.policy-section { margin-bottom: 2rem; }
.policy-section h3 {
  font-size: 1rem; font-weight: 600; color: var(--text);
  margin-bottom: .5rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.policy-section p, .policy-section li {
  font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin-bottom: .4rem;
}
.policy-section ul { padding-left: 1.25rem; }
.policy-section li { list-style: disc; }
.policy-badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  letter-spacing: .04em; padding: .2rem .6rem; border-radius: 99px;
  background: rgba(7,147,79,.1); color: var(--accent); margin-bottom: 1.25rem;
}
.policy-divider { border: none; border-top: 2px dashed var(--border); margin: 2rem 0; }
.policy-notice {
  background: rgba(7,147,79,.07); border: 1px solid rgba(7,147,79,.2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: .875rem 1rem;
  font-size: .8rem; color: var(--text-muted); line-height: 1.6;
}
.policy-notice strong { color: var(--text); }
.faq-q { font-weight: 600; color: var(--text); margin-bottom: .2rem; }
.faq-item { margin-bottom: 1.1rem; }


.faq-pwa-cta {
  display: flex; align-items: center; gap: .875rem;
  background: rgba(7,147,79,.06); border: 1px solid rgba(7,147,79,.18);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: .875rem 1.1rem; margin-bottom: 1.25rem;
  font-size: .875rem;
}
.faq-pwa-cta svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; align-self: flex-start; margin-top: .1rem; }
.faq-pwa-cta div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.faq-pwa-cta strong { font-weight: 600; color: var(--text); }
.faq-pwa-cta span { color: var(--text-muted); font-size: .825rem; }
.faq-pwa-cta a { color: var(--accent); text-decoration: none; font-size: .825rem; margin-top: .25rem; }
.faq-pwa-cta a:hover { text-decoration: underline; }
.faq-nav-section {
  background: linear-gradient(180deg, #eff8f3 0%, #f8fcfa 100%);
  border-top: 1px solid #dcebe4;
  border-bottom: 1px solid #dcebe4;
  padding: 2rem 0 2.5rem;
}
[data-theme="dark"] .faq-nav-section {
  background: rgba(34,197,94,.04);
  border-color: rgba(34,197,94,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .faq-nav-section {
    background: rgba(34,197,94,.04);
    border-color: rgba(34,197,94,.12);
  }
}
.faq-tiles-wrap {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}
.faq-nav-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
}
.faq-nav-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: .45rem; padding: 1.1rem .75rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.faq-nav-card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.faq-nav-card.active { border-color: var(--accent); background: rgba(7,147,79,.06); box-shadow: var(--shadow); }
.faq-nav-card.active .faq-nav-card-icon { background: rgba(7,147,79,.15); }
.faq-nav-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(7,147,79,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .15s;
}
.faq-nav-card-icon.green  { background: rgba(34,197,94,.12); color: var(--green); }
.faq-nav-card-icon.orange { background: rgba(249,115,22,.12); color: var(--orange); }
[data-theme="dark"] .faq-nav-card-icon.green { color: #4ade80; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .faq-nav-card-icon.green { color: #4ade80; }
}
.faq-nav-card-icon svg { width: 18px; height: 18px; }
.faq-nav-card-title { font-size: .78rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.faq-nav-card-count { font-size: .7rem; color: var(--text-muted); }
.faq-accordion { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.5rem; }
.faq-sec { display: none; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); overflow: hidden; scroll-margin-top: 80px; }
.faq-sec.faq-sec--visible { display: block; }
.faq-embed .faq-sec { display: block; }
.faq-sec--green  { border-left-color: var(--green); }
.faq-sec--orange { border-left-color: var(--orange); }
.faq-sec--blue   { border-left-color: var(--accent); }
.faq-sec-hdr {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 1.1rem; background: var(--bg-card); border: none; cursor: pointer;
  text-align: left; font-weight: 600; font-size: .875rem; color: var(--text);
  transition: background .15s;
}
.faq-sec-hdr:hover, .faq-sec-hdr.open { background: var(--bg-hover); }
.faq-sec-body { overflow: hidden; height: 0; transition: height .25s ease; }
.faq-sec-body-inner { padding: .15rem 0 .25rem; }
.faq-acc-item { border-top: 1px solid var(--border); }
.faq-q-btn {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .65rem 1.1rem; background: none; border: none; cursor: pointer;
  text-align: left; font-weight: 500; font-size: .85rem; color: var(--text);
  transition: background .15s; line-height: 1.45;
}
.faq-q-btn:hover { background: var(--bg-hover); }
.faq-a-body { overflow: hidden; height: 0; transition: height .2s ease; }
.faq-a-body-inner { padding: 0 1.1rem .8rem 1.1rem; }
.faq-a-body-inner p { font-size: .85rem; color: var(--text-muted); line-height: 1.65; margin-bottom: .4rem; }
.faq-a-body-inner p:last-child { margin-bottom: 0; }
.faq-a-body-inner a { color: var(--accent); }
.faq-chevron {
  flex-shrink: 0; margin-top: .1rem;
  transition: transform .2s ease; color: var(--text-muted);
}
.faq-sec-hdr.open .faq-chevron,
.faq-q-btn.open .faq-chevron { transform: rotate(90deg); }

.policy-footer { text-align: center; font-size: .75rem; color: var(--text-subtle); padding: 1.5rem 0 .5rem; }
.policy-topbar {
  position: sticky; top: 0; z-index: 100;
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.25rem;
}
.policy-topbar-title { font-size: 1.05rem; font-weight: 600; flex: 1; color: var(--text); }
@supports (padding: env(safe-area-inset-top)) {
  .policy-topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(56px + env(safe-area-inset-top));
  }
}
@media print { .policy-topbar { display: none !important; } }


.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
  z-index: 900;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .75rem 1.1rem;
  font-size: .875rem; font-weight: 500;
  max-width: 320px;
  display: flex; align-items: center; gap: .6rem;
  animation: slideIn .25s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red);   }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }


#sw-update-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--accent);
  color: #fff;
  padding: .5rem .75rem .5rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 9998;
  white-space: nowrap;
  animation: slideIn .25s ease;
}
#sw-update-banner button {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .875rem;
}
#sw-update-banner button:hover { background: rgba(255,255,255,.35); }


.settings-section { margin-bottom: 2rem; }
.settings-section h3 { font-size: .9rem; font-weight: 600; margin-bottom: .75rem; }


.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 2rem; color: var(--text-muted); text-align: center; gap: 1rem;
}
.empty-state svg { width: 56px; height: 56px; opacity: .35; }
.empty-state p { font-size: .95rem; max-width: 320px; }


.month-chip-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem;
}
.month-chip {
  padding: .35rem .2rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 500; text-align: center;
  border: 1.5px solid var(--border); color: var(--text-muted);
  background: var(--bg); cursor: pointer;
  transition: all .12s;
}
.month-chip.active {
  border-color: var(--accent); color: var(--accent);
  background: rgba(7,147,79,.08);
}
.month-chip:hover { border-color: var(--accent); }


.fill-unselected-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.seg-ctrl { display: flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.seg-btn {
  padding: .3rem .75rem; font-size: .8rem; font-weight: 500;
  color: var(--text-muted); background: var(--bg);
  border: none; cursor: pointer; transition: all .12s;
}
.seg-btn + .seg-btn { border-left: 1.5px solid var(--border); }
.seg-btn.active { background: var(--accent); color: #fff; }


.row-action-menu { display: inline-block; vertical-align: middle; margin-left: 0; }
.row-menu-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; color: var(--text-muted);
  transition: opacity .15s;
}
.cat-row:hover .row-menu-btn      { opacity: .6; }
.cat-item:hover .row-menu-btn     { opacity: .6; }
.group-wrap:hover .row-menu-btn   { opacity: .6; }
.budget-card:hover .row-menu-btn  { opacity: .6; }
.tpl-budget-row:hover .row-menu-btn { opacity: .6; }
.row-menu-btn:hover { opacity: 1 !important; color: var(--text); }
.row-menu-dropdown {
  right: 0; left: auto;
  min-width: 170px;
}
.action-menu-item { display: flex; align-items: center; }


@media (hover: none) and (pointer: coarse) {
  .row-menu-btn { opacity: .55 !important; }
}


.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px; z-index: 300;
  overflow: hidden;
}
.dropdown-item {
  display: flex; align-items: center; gap: .5rem;
  width: 100%; padding: .6rem 1rem;
  font-size: .875rem; color: var(--text);
  transition: background .15s;
}
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--red); }
.dropdown-divider { height: 1px; background: var(--border); }


.type-pill {
  display: inline-block; font-size: .7rem; font-weight: 600;
  padding: .1rem .45rem; border-radius: 20px; margin-left: .3rem;
}
.type-income   { background: #DCFCE7; color: #166534; }
.type-expense  { background: #FEE2E2; color: #B42318; }
.type-transfer { background: #DBEAFE; color: #1D4ED8; }


.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { display: flex; justify-content: center; padding: 3rem; }


@media (min-width: 769px) and (max-width: 1024px) {
  .content-area { padding: 1.25rem; }
  .budget-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .summary-bar { grid-template-columns: repeat(3, 1fr); }
}


@media (max-width: 768px) {
  .app-topnav { padding: 0 1rem; }
  .app-topnav-links { display: none; }
  .app-hamburger { display: flex; }
  .app-mobile-menu { display: flex; }
  .app-topnav-actions { margin-left: auto; }
  .app-topnav-actions .lang-switcher { display: none; }
  .content-area { padding: 1rem; }
  .budget-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: row; align-items: center; }
  .summary-bar { grid-template-columns: 1fr 1fr; gap: .5rem; padding: .75rem 1rem; }
  .summary-item .value { font-size: 1rem; }


  .month-nav { display: flex; position: sticky; top: var(--topbar-h); z-index: 50; }

  .sticky-scrollbar { display: none; }


  .budget-table-wrap { max-height: none; }

  .budget-table { min-width: 0; font-size: .8rem; table-layout: fixed; }

  .budget-table td,
  .budget-table th { padding: .4rem .3rem; }
  .month-col.active .entry-input,
  .month-col.active input.entry-input { width: 100%; min-width: 0; }


  .budget-table th:first-child,
  .budget-table td:first-child { width: 190px; max-width: 190px; overflow: hidden; white-space: normal; }


  .budget-table th:nth-child(2),
  .budget-table td:nth-child(2) { width: 65px; max-width: 65px; position: static; left: auto; border-right: none; font-size: .76rem; }


  .budget-table tr.group-header td:nth-child(2) { display: table-cell; background: var(--bg-stripe); }

  .budget-table tr.group-header td:first-child { white-space: nowrap; max-width: 52vw; overflow: hidden; }

  .budget-table tr.group-header td { padding: .25rem .3rem .15rem; }

  .month-col { display: none; }

  .month-col.active { display: table-cell; width: 100%; }

  @keyframes month-in-right {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  @keyframes month-in-left {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  .month-col.active.anim-next { animation: month-in-right .28s ease; }
  .month-col.active.anim-prev { animation: month-in-left  .28s ease; }
  #month-nav-label.anim-next  { animation: month-in-right .28s ease; }
  #month-nav-label.anim-prev  { animation: month-in-left  .28s ease; }

  .month-col.active .entry-input,
  .month-col.active input.entry-input { width: 100%; min-width: 0; }


  input, select, textarea { font-size: 16px; }
  .entry-input { font-size: 16px; min-width: 0; padding: .15rem .3rem; }


  .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
  .toast { max-width: none; }


  .year-tab { padding: .35rem .75rem; font-size: .8125rem; }
  .year-nav-select { font-size: .8125rem; }
  .year-nav-add { font-size: .8125rem; }


  .page-actions { flex-wrap: wrap; }

  .sticky-scrollbar { display: none; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .budget-table-wrap { max-height: none; }
}


@media (max-width: 480px) {
  .app-topnav { padding: 0 .75rem; gap: .5rem; }
  .topnav-page-title { font-size: 1rem; }
  .content-area { padding: .75rem; }
  .page-header { margin-bottom: 1rem; gap: .5rem; }
  .page-header h2 { font-size: 1.15rem; }

  .summary-bar { padding: .6rem .75rem; gap: .4rem; }
  .summary-item .label { font-size: .7rem; }
  .summary-item .value { font-size: .95rem; }

  .budget-table td:first-child { max-width: 190px; }
  .budget-table { font-size: .78rem; }

  .year-tab { padding: .3rem .6rem; font-size: .775rem; }
  .year-nav-select { font-size: .775rem; }
  .year-nav-arrow { width: 28px; height: 28px; }
  .year-nav-add { font-size: .775rem; }
  .btn-sm { padding: .3rem .65rem; font-size: .775rem; }
  .page-actions .btn { font-size: .775rem; padding: .3rem .65rem; }
  .modal-footer .btn { padding: .38rem .8rem; font-size: .825rem; }

  .auth-card { padding: 1.75rem 1.25rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-year-select { min-width: 0; flex: 1; }
  .stats-header > div { max-width: 60%; }

  .lang-switcher { gap: 1px; }
  .lang-btn { padding: .2rem .35rem; }
}


@media (max-height: 500px) {

  .content-area { padding-top: .5rem; padding-bottom: .5rem; }
  .page-header { margin-bottom: .5rem; }
  .year-tabs { margin-bottom: .5rem; }
  .year-nav  { margin-bottom: .5rem; }
  .summary-bar {
    grid-template-columns: repeat(3, 1fr);
    padding: .4rem .75rem; gap: .35rem;
    margin-bottom: 0;
  }
  .summary-item .label { font-size: .65rem; }
  .summary-item .value { font-size: .85rem; }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .app-topnav {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--topbar-h) + env(safe-area-inset-top));
    padding-left:  max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
  }
  .app-mobile-menu {
    top: calc(var(--topbar-h) + env(safe-area-inset-top));
  }
  .app-footer {
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
  }
  .content-area {
    padding-bottom: max(.25rem, env(safe-area-inset-bottom));
  }
  .toast-container {
    bottom: max(1.5rem, env(safe-area-inset-bottom));
    right:  max(1.5rem, env(safe-area-inset-right));
  }
  @media (max-width: 768px) {
    .app-topnav {
      padding-left:  max(1rem, env(safe-area-inset-left));
      padding-right: max(1rem, env(safe-area-inset-right));
    }
    .content-area {
      padding-left:   max(.75rem, env(safe-area-inset-left));
      padding-right:  max(.75rem, env(safe-area-inset-right));
      padding-bottom: max(1rem,   env(safe-area-inset-bottom));
    }
    .toast-container {
      left:   max(1rem, env(safe-area-inset-left));
      right:  max(1rem, env(safe-area-inset-right));
      bottom: max(1rem, env(safe-area-inset-bottom));
    }
  }
}


.budget-table th.reconcile-th {
  cursor: pointer;
  white-space: nowrap;
}
.budget-table th.reconcile-th:hover {
  background: var(--bg-hover);
}
.budget-table th.reconcile-th:hover .reconcile-th-icon {
  opacity: 1;
}
.reconcile-th-icon {
  display: inline-block;
  width: 15px; height: 15px;
  margin-right: 3px;
  vertical-align: middle;
  opacity: .45;
  position: relative; top: -1px;
  transition: color .15s, opacity .15s;
}
.budget-table th[data-rec-status="full"]    .reconcile-th-icon { opacity: 1; color: var(--green); }
.budget-table th[data-rec-status="partial"] .reconcile-th-icon { opacity: 1; color: #F97316; }
.budget-table th[data-rec-status="none"]    .reconcile-th-icon { opacity: .45; color: inherit; }


td.reconciled-cell {
  background: rgba(34,197,94,.10) !important;
}
.entry-input--reconciled {
  color: var(--text-muted);
  pointer-events: none;
  cursor: default;
}
.entry-input--formula {
  background: rgba(91,141,239,.06);
  border-color: transparent;
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}
.formula-badge {
  display: inline-flex;
  align-items: center;
  font-size: .6rem;
  font-weight: 700;
  background: rgba(91,141,239,.15);
  color: #1E40AF;
  border-radius: 3px;
  padding: 0 .3rem;
  margin-left: .3rem;
  vertical-align: middle;
  letter-spacing: .02em;
  line-height: 1.6;
}
.formula-badge--edit {
  cursor: pointer;
}
.formula-badge--edit:hover {
  background: rgba(91,141,239,.28);
}
.formula-add-tab {
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: border-color .12s, color .12s, background .12s;
}
.formula-add-tab.active {
  border-color: var(--accent);
  background: rgba(7,147,79,.1);
  color: var(--accent);
}
.formula-term-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
}
.formula-term-op { width: 3.2rem; flex-shrink: 0; }
.formula-term-name {
  flex: 1;
  font-size: .875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.formula-term-fixed-inp { flex: 1; min-width: 0; }
.formula-term-pct-grp {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}
.formula-pct-inp { width: 3.8rem; }
.formula-add-row {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}
.formula-add-cat-sel { flex: 1; min-width: 0; }

.formula-term-row input, .formula-term-row select,
.formula-add-row input, .formula-add-row select {
  padding: .28rem .45rem;
  font-size: .875rem;
}
.formula-term-row select, .formula-add-row select {
  padding-right: 1.6rem;
}
.formula-pct-inp::-webkit-inner-spin-button,
.formula-pct-inp::-webkit-outer-spin-button { appearance: none; }
.formula-pct-inp { -moz-appearance: textfield; }
@media (max-width: 480px) {
  .formula-pct-inp { width: 3.5rem; }
}
.formula-modal-preview {
  font-size: .82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: .3rem .5rem;
  background: var(--bg-stripe);
  border-radius: var(--radius-sm);
  margin-bottom: .6rem;
  word-break: break-word;
}
.formula-label {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: .1rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 13rem;
}
.reconcile-badge {
  position: absolute;
  top: 3px; right: 4px;
  font-size: 9px;
  color: var(--green);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}


.modal.reconcile-modal { max-width: 580px; }


.reconcile-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .55rem .75rem;
  background: var(--bg-stripe);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .85rem;
  font-size: .825rem;
}
.reconcile-summary-count { font-weight: 600; }
.reconcile-summary-count .rec-count { color: var(--green); }
.reconcile-summary-amounts { color: var(--text-muted); }
.reconcile-summary-amounts strong { color: var(--text); }


.reconcile-list {
  max-height: 55vh;
  overflow-y: auto;
}
.reconcile-list::-webkit-scrollbar { width: 5px; }
.reconcile-list::-webkit-scrollbar-thumb { background: var(--border-input); border-radius: 4px; }

.reconcile-group-header {
  font-size: .775rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em;
  padding: .55rem .75rem .3rem;
  background: var(--bg-stripe);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.reconcile-group-header:first-child { border-top: none; }


.reconcile-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .1rem;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.reconcile-item:last-child { border-bottom: none; }
.reconcile-item:hover { background: var(--bg-hover); }
.reconcile-item.is-reconciled .reconcile-name { color: var(--text-muted); }

.reconcile-check {
  flex-shrink: 0;
}
.reconcile-name {
  flex: 1;
  font-size: .875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.reconcile-amount-input {
  width: 96px !important;
  text-align: right;
  font-size: .8rem;
  padding: .2rem .4rem;
  flex-shrink: 0;
}
.reconcile-amount-input:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}


.help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg-stripe); border: 1px solid var(--border-input);
  color: var(--text-muted); font-size: 9px; font-weight: 700;
  cursor: pointer; margin-left: 4px; vertical-align: middle;
  line-height: 1; flex-shrink: 0; font-style: italic;
  transition: background .15s, color .15s;
}
.help-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.help-popover {
  position: fixed; z-index: 700;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: .6rem .85rem; font-size: .825rem; line-height: 1.55;
  color: var(--text); pointer-events: none;
}


.onboarding-card {
  background: linear-gradient(135deg, rgba(7,147,79,.07) 0%, rgba(7,147,79,.02) 100%);
  border: 1px solid rgba(7,147,79,.18);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem; position: relative;
}
.onboarding-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .6rem;
}
.onboarding-card-title {
  font-size: 1rem; font-weight: 700; color: var(--accent);
}
.onboarding-card-steps {
  display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .5rem;
}
.onboarding-card-step {
  display: flex; align-items: flex-start; gap: .5rem; flex: 1; min-width: 140px;
}
.onboarding-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  margin-top: 1px;
}
.onboarding-card-step span { font-size: .85rem; color: var(--text); line-height: 1.4; }
.onboarding-card-actions { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.onboarding-hide-btn {
  position: absolute; top: .75rem; right: .75rem;
  font-size: .75rem; color: var(--text-muted); cursor: pointer;
  background: none; border: none; padding: .15rem .3rem;
}
.onboarding-hide-btn:hover { color: var(--text); }

.wizard-body { text-align: center; padding: .5rem 0; }
.wizard-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.wizard-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .6rem; }
.wizard-desc { font-size: .9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }
.wizard-dots { display: flex; justify-content: center; gap: .4rem; margin-top: .75rem; }
.wizard-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-input); transition: background .2s;
}
.wizard-dot.active { background: var(--accent); }
.wizard-footer { display: flex; justify-content: space-between; align-items: center; width: 100%; }


.groups-cats-info {
  background: var(--bg-stripe); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .6rem .85rem;
  font-size: .825rem; color: var(--text-muted); line-height: 1.55;
  margin-bottom: .75rem;
}


.tpl-list {
  display: flex; flex-direction: column; gap: .3rem;
  margin-bottom: 1rem;
  max-height: 220px; overflow-y: auto;
}
.tpl-list::-webkit-scrollbar { width: 5px; }
.tpl-list::-webkit-scrollbar-thumb { background: var(--border-input); border-radius: 4px; }

.tpl-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tpl-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.tpl-item:has(input:checked) {
  border-color: var(--accent);
  background: rgba(7,147,79,.06);
}
.tpl-item input[type=radio] { flex-shrink: 0; width: auto; accent-color: var(--accent); }
.tpl-item-info {
  display: flex; flex-direction: column; min-width: 0;
}
.tpl-item-name {
  font-size: .875rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tpl-item-owner {
  font-size: .75rem; color: var(--text-muted);
}


.stats-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem;
}
.stats-year-select {
  width: auto; min-width: 200px; max-width: 100%;
  padding: .35rem .75rem; font-size: .875rem;
}
.stats-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem; margin-bottom: 1.25rem;
}
.stats-kpi-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .85rem 1rem;
  box-shadow: var(--shadow); min-width: 0;
}
.stats-kpi-label { font-size: .72rem; color: var(--text-muted); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .04em; }
.stats-kpi-value { font-size: 1.15rem; font-weight: 700; }
.stats-charts-row {
  display: grid; grid-template-columns: min(400px, 42%) 1fr;
  gap: 1rem; margin-bottom: 0;
}
.stats-charts-single { grid-template-columns: 1fr; }
.stats-chart-card { padding: 1rem 1.25rem; }
.stats-chart-title {
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: .85rem;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.donut-toggle { display: flex; gap: .2rem; }
.donut-toggle-btn {
  background: var(--bg-hover); border: 1px solid var(--border-input); border-radius: 4px;
  padding: .15rem .45rem; font-size: .68rem; font-weight: 600; cursor: pointer;
  color: var(--text-muted); text-transform: none; letter-spacing: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.donut-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.donut-toggle-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.stats-kpi-twin {
  display: flex; flex-direction: column; justify-content: center;
}
.stats-kpi-twin-label {
  font-size: .68rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: .45rem;
}
.stats-kpi-twin-vals {
  display: flex; align-items: center; gap: .2rem;
}
.stats-kpi-twin-arrow {
  color: var(--text-subtle); font-size: .7rem; flex-shrink: 0;
}
.stats-kpi-twin-val { min-width: 0; flex: 1; }
.stats-kpi-twin-val .kpi-value {
  font-size: 1.05rem; font-weight: 700; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stats-kpi-twin-val .kpi-sublabel {
  font-size: .65rem; color: var(--text-muted); margin-top: .1rem;
}
@media (max-width: 640px) {
  .stats-kpi-twin-val .kpi-value { font-size: .82rem; }
  .stats-kpi-twin-val .kpi-sublabel { font-size: .62rem; }
}
.stats-no-data { text-align: center; color: var(--text-muted); font-size: .875rem; padding: 2rem 1rem; }
.groups-layout { display: flex; gap: 1rem; align-items: center; }
.groups-chart-side { flex: 0 0 155px; width: 155px; }
.groups-list-side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.group-list-item { display: flex; align-items: center; gap: .35rem; font-size: .78rem; flex-wrap: wrap; }
.group-list-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.group-list-name { white-space: nowrap; }
.group-list-amount { font-weight: 600; white-space: nowrap; }
.group-list-pct { font-size: .68rem; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 640px) {
  .groups-chart-side { flex: 0 0 110px; width: 110px; }
}

@media (max-width: 900px) {
  .stats-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats-kpi { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .stats-kpi-value { font-size: 1rem; }
  .stats-kpi-item { padding: .75rem .9rem; }
}


.page-constrained { max-width: 860px; }


.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .85rem;
}
.section-header h2 { font-size: 1.35rem; font-weight: 700; }
.section-header h3 { font-size: 1rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }


.tpl-budget-list { display: flex; flex-direction: column; gap: .35rem; }
.tpl-budget-row {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .65rem 1rem;
  display: flex; align-items: flex-start; gap: .75rem;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.tpl-budget-row:hover { border-color: var(--accent); background: var(--bg-hover); }
.tpl-budget-icon    { font-size: 1.05rem; flex-shrink: 0; margin-top: .1rem; }
.tpl-budget-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.tpl-budget-name    { font-weight: 500; font-size: .9rem; word-break: break-word; }
.tpl-budget-badges  { display: flex; gap: .3rem; flex-wrap: wrap; }
.tpl-action-menu    { flex-shrink: 0; align-self: flex-start; }
.tpl-budget-owner   { font-size: .78rem; color: var(--text-muted); flex-shrink: 0; }
.tpl-budget-cta     { flex-shrink: 0; margin-left: .5rem; }
.tpl-empty {
  background: var(--bg-stripe); border: 1px dashed var(--border-input);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
  color: var(--text-muted); font-size: .875rem; line-height: 1.6;
}


.plan-form-section { border-top: 1px solid var(--border); padding-top: .875rem; margin-top: .875rem; }
.plan-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.plan-form-toggles { display: flex; gap: .5rem; border-top: 1px solid var(--border); padding-top: .875rem; margin-top: .875rem; }
.plan-form-toggle-item { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: .65rem; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.plan-form-toggle-item label { font-size: .875rem; font-weight: 500; cursor: pointer; flex: 1; }
.plan-form-modules { border-top: 1px solid var(--border); padding-top: .875rem; margin-top: .875rem; }
.plan-form-section-label { font-size: .72rem; font-weight: 700; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .07em; margin: 0 0 .5rem; }
.plan-mod-group + .plan-mod-group { margin-top: .875rem; }
.plan-mod-group-label { font-size: .8rem; font-weight: 600; color: var(--text); margin: 0 0 .4rem; }
.plan-mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .3rem; }
.plan-mod-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .65rem; border-radius: var(--radius-sm); background: var(--bg-hover); border: 1px solid var(--border); }
.plan-mod-label { flex: 1; font-size: .8rem; cursor: pointer; }


.landing-nav {
  position: sticky; top: 0; z-index: 100;
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(16,24,40,.04);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem;
}
.landing-nav-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.landing-nav-logo:hover { text-decoration: none; }
.landing-nav-logo img { display: block; }
.landing-nav-links {
  display: flex; align-items: center; justify-content: center; gap: .25rem;
  flex: 1;
}
.landing-nav-link {
  font-size: .875rem; font-weight: 500; color: #687386;
  text-decoration: none; padding: 0 .75rem;
  height: 60px; display: inline-flex; align-items: center;
  position: relative;
  transition: color .18s;
}
.landing-nav-link:hover { color: var(--accent); text-decoration: none; }
[data-theme="dark"] .landing-nav-link { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-nav-link { color: var(--text-muted); }
}
.landing-nav-link.active { color: var(--accent); font-weight: 650; }
.landing-nav-link.active::after {
  content: ""; position: absolute;
  left: .75rem; right: .75rem; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.landing-nav-actions {
  display: flex; align-items: center; gap: .5rem; flex-shrink: 0; margin-left: auto;
}
@supports (padding: env(safe-area-inset-top)) {
  .landing-nav {
    padding-top: env(safe-area-inset-top);
    height: calc(60px + env(safe-area-inset-top));
  }
  .landing-nav-link { height: calc(60px + env(safe-area-inset-top)); }
  .landing-mobile-menu {
    top: calc(60px + env(safe-area-inset-top));
  }
}
.landing-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 0; border-radius: var(--radius-sm);
  transition: background .15s;
}
.landing-hamburger:hover { background: var(--bg-hover); }
.landing-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s;
  transform-origin: center;
}
.landing-nav.menu-open .landing-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.landing-nav.menu-open .landing-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.landing-nav.menu-open .landing-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.landing-mobile-menu {
  display: none;
  position: fixed; top: 60px; left: 1rem; z-index: 98;
  width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.08);
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease, opacity .2s ease;
  opacity: 0;
}
.landing-mobile-menu.open { max-height: 260px; opacity: 1; }
.landing-mobile-link {
  display: block; padding: .75rem 1.1rem;
  font-size: .9375rem; font-weight: 500; color: #687386;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color .15s, background .15s;
}
[data-theme="dark"] .landing-mobile-link { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-mobile-link { color: var(--text-muted); }
}
.landing-mobile-link:last-child { border-bottom: none; }
.landing-mobile-link:hover { color: #07934f; background: rgba(7,147,79,.04); text-decoration: none; }
[data-theme="dark"] .landing-mobile-link:hover { color: var(--green); background: rgba(34,197,94,.06); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-mobile-link:hover { color: var(--green); background: rgba(34,197,94,.06); }
}
.landing-mobile-link.active { color: #07934f; font-weight: 650; }
[data-theme="dark"] .landing-mobile-link.active { color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-mobile-link.active { color: var(--green); }
}

@media (max-width: 768px) {
  .landing-nav { padding-left: 1rem; padding-right: 1rem; }
  .landing-nav-links { display: none; }
  .landing-hamburger { display: flex; }
  .landing-mobile-menu { display: flex; }
  .landing-nav.menu-open ~ .landing-mobile-menu { max-height: 320px; }
}
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width: 768px) {
    .landing-nav {
      padding-top: env(safe-area-inset-top);
      height: calc(60px + env(safe-area-inset-top));
    }
    .landing-mobile-menu {
      top: calc(60px + env(safe-area-inset-top));
    }
  }
}


.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; font-weight: 600; }

.lp-hero {
  padding: 2rem 1.5rem 0;
  background:
    radial-gradient(circle, rgba(0,0,0,.07) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(91,141,239,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(34,197,94,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
[data-theme="dark"] .lp-hero {
  background:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(91,141,239,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(34,197,94,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .lp-hero {
    background:
      radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
      radial-gradient(ellipse 90% 55% at 50% 0%, rgba(91,141,239,.13) 0%, transparent 65%),
      radial-gradient(ellipse 45% 35% at 75% 15%, rgba(34,197,94,.09) 0%, transparent 55%);
    background-size: 22px 22px, 100% 100%, 100% 100%;
  }
}
.lp-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.lp-hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.lp-hero-h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -.03em;
  margin: .75rem 0 1.25rem;
  background: linear-gradient(130deg, var(--accent) 0%, var(--green) 65%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-hero-sub {
  font-size: .9375rem; color: var(--text-muted);
  line-height: 1.65; margin: 0 0 1.25rem;
}
.lp-hero-explainer {
  max-width: 600px; margin: 0 auto 2rem;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.lp-hero-explainer p {
  font-size: .875rem; color: var(--text-muted); line-height: 1.7; margin: 0;
}
.lp-hero-explainer p + p { margin-top: .75rem; }
.lp-hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.lp-hero-trial { font-size: .8rem; color: var(--text-subtle); margin: 0; }
.lp-hero-device-hint {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: center;
  font-size: .8rem; color: var(--text-subtle); margin: 1.25rem 0 0;
}
.lp-hero-device-hint svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.lp-hero-device-hint a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.lp-hero-device-hint a:hover { text-decoration: underline; }


.lp-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.12), 0 3px 10px rgba(0,0,0,.06);
  border: 1px solid var(--border);
}
.lp-hero-img img { width: 100%; display: block; }


.lp-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.25rem 1.5rem .5rem;
}
.lp-trust-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.lp-trust-item svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

.lp-section { padding: 4.5rem 1.5rem; }
.lp-section--alt { background: rgba(34,197,94,.06); border-top: 1px solid rgba(34,197,94,.13); border-bottom: 1px solid rgba(34,197,94,.13); }
[data-theme="dark"] .lp-section--alt { background: rgba(34,197,94,.08); border-top-color: rgba(34,197,94,.16); border-bottom-color: rgba(34,197,94,.16); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .lp-section--alt { background: rgba(34,197,94,.08); border-top-color: rgba(34,197,94,.16); border-bottom-color: rgba(34,197,94,.16); }
}
.lp-section--cta {
  text-align: center;
  background: linear-gradient(160deg, #2C7A5C 0%, #1E6349 55%, #163F2D 100%);
  padding: 4rem 1.5rem;
}
.lp-section--cta h2 { font-size: 1.75rem; font-weight: 700; color: #fff; margin: 0 0 .6rem; }
.lp-section--cta p { font-size: 1rem; color: rgba(255,255,255,.75); margin: 0 0 2rem; }
.lp-section--cta .btn-primary { background: #fff; color: #1A6044; border-color: transparent; }
.lp-section--cta .btn-primary:hover { background: rgba(255,255,255,.9); color: #1A6044; }
.lp-section--cta .btn-secondary { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.lp-section--cta .btn-secondary:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.lp-section-inner { max-width: 900px; margin: 0 auto; }
.lp-section-title {
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  font-weight: 700; color: var(--text);
  text-align: center; margin: 0 0 .5rem;
}
.lp-section-sub { font-size: .95rem; color: var(--text-muted); text-align: center; margin: 0 0 2.5rem; }

.lp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.lp-feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.lp-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
}
[data-theme="dark"] .lp-feature-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .lp-feature-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
}
.lp-feature-icon {
  width: 40px; height: 40px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: var(--accent);
}
.lp-feature-icon svg { width: 20px; height: 20px; }
.lp-feature-card h3 { font-size: .9375rem; font-weight: 600; margin: 0 0 .5rem; color: var(--text); }
.lp-feature-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.lp-features > .lp-feature-card:nth-child(2) .lp-feature-icon,
.lp-features > .lp-feature-card:nth-child(5) .lp-feature-icon { background: rgba(34,197,94,.12); color: var(--green); }
.lp-features > .lp-feature-card:nth-child(3) .lp-feature-icon,
.lp-features > .lp-feature-card:nth-child(6) .lp-feature-icon { background: rgba(249,115,22,.12); color: var(--orange); }


.lp-steps {
  display: flex; align-items: flex-start; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap;
}
.lp-step { flex: 1 1 180px; text-align: center; }
.lp-step-icon {
  width: 52px; height: 52px;
  background: rgba(7,147,79,.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; color: var(--accent);
}
.lp-step-icon svg { width: 22px; height: 22px; }
.lp-step-icon--green { background: rgba(34,197,94,.12); color: var(--green); }
.lp-step-icon--orange { background: rgba(249,115,22,.12); color: var(--orange); }
.lp-step h3 { font-size: .9375rem; font-weight: 600; margin: 0 0 .4rem; color: var(--text); }
.lp-step p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.lp-step-arrow { font-size: 1.25rem; color: var(--text-subtle); padding-top: 1rem; flex-shrink: 0; align-self: flex-start; margin-top: 1rem; }


.lp-showcase {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
  max-width: 1000px; margin: 0 auto;
}
.lp-showcase--reverse .lp-showcase-img { order: 2; }
.lp-showcase--reverse .lp-showcase-text { order: 1; }
.lp-showcase-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); margin-bottom: .75rem; display: inline-block;
  background: rgba(7,147,79,.08); border: 1px solid rgba(7,147,79,.18);
  padding: .2rem .65rem; border-radius: 99px;
}
.lp-showcase-text h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700; line-height: 1.2;
  margin: .25rem 0 1rem; color: var(--text);
}
.lp-showcase-text > p { font-size: .9375rem; color: var(--text-muted); line-height: 1.7; margin: 0 0 1.25rem; }
.lp-check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.lp-check-list li { font-size: .875rem; color: var(--text-muted); padding-left: 1.5rem; position: relative; line-height: 1.4; }
.lp-check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.lp-screenshot { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); display: block; }


.lp-feature-card-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.lp-feature-card-header h3 { margin: 0; }
.lp-feature-plan-badge {
  font-size: .65rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(91,141,239,.12); color: var(--blue);
  border-radius: 99px; padding: .15rem .5rem; white-space: nowrap; flex-shrink: 0;
}
.lp-coming-badge {
  font-size: .65rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(249,115,22,.12); color: var(--orange, #f97316);
  border-radius: 99px; padding: .15rem .5rem; white-space: nowrap; flex-shrink: 0;
}


.lp-device-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.lp-device-panel {
  padding: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
.lp-device-panel--primary {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: 0 0 0 4px rgba(7,147,79,.08);
}
.lp-device-panel-head {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  margin-bottom: 1.25rem;
}
.lp-device-panel-icon {
  width: 44px; height: 44px;
  background: var(--bg-hover);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.lp-device-panel-icon svg { width: 22px; height: 22px; }
.lp-device-panel-head h3 { margin: 0 0 .2rem; font-size: 1rem; }
.lp-device-pwa-cta {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(7,147,79,.06);
  border: 1px solid rgba(7,147,79,.2);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}
.lp-device-pwa-icon {
  flex-shrink: 0;
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  padding-top: .1rem;
}
.lp-device-pwa-icon svg { width: 28px; height: 28px; }
.lp-device-pwa-cta strong { display: block; margin-bottom: .3rem; font-size: .9375rem; }
.lp-device-pwa-cta p { margin: 0; line-height: 1.5; }


.lp-features-inner { column-gap: 3rem; row-gap: 0; }

.lp-features-inner .policy-badge      { grid-column: 1; grid-row: 1; justify-self: start; align-self: start; }
.lp-features-inner .lp-features-copy  { grid-column: 1; grid-row: 2; align-self: start; }
.lp-features-inner .lp-hero-explainer { grid-column: 1; grid-row: 3; align-self: start; margin: 0 0 2.5rem; }
.lp-features-inner .faq-pwa-cta       { grid-column: 1; grid-row: 3; align-self: start; margin: 0; }
.lp-hero-inner > .guides-hero-img      { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.lp-hero-inner > .faq-pwa-cta         { grid-column: 1; grid-row: 2; align-self: start; }
.lp-hero-inner > .lp-hero-explainer   { grid-column: 1; grid-row: 2; align-self: start; margin: 0 0 2.5rem; }
.lp-features-inner .guides-hero-img   { grid-column: 2; grid-row: 1 / 4; align-self: start; }

@media (max-width: 768px) {
  .lp-hero { padding: 2rem 1.25rem 2rem; background: radial-gradient(ellipse 120% 50% at 50% 0%, rgba(91,141,239,.08) 0%, transparent 70%) !important; background-size: 100% 100% !important; }
  .lp-hero-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .lp-hero-text { align-items: center; text-align: center; }
  .lp-hero-img { border-radius: var(--radius); }

  .lp-features-inner { row-gap: 0; text-align: center; }
  .lp-features-inner .policy-badge      { grid-column: 1; grid-row: 1; justify-self: center; margin-bottom: .4rem; }
  .lp-features-inner .lp-features-copy  { grid-column: 1; grid-row: 2; }
  .lp-features-inner .guides-hero-img   { grid-column: 1; grid-row: 3; max-width: 280px; margin: 1rem auto 0; }
  .lp-features-inner .lp-hero-explainer { grid-column: 1; grid-row: 4; text-align: left; margin-top: 1rem; }
  .lp-features-inner .faq-pwa-cta       { grid-column: 1; grid-row: 4; margin-top: 1rem; }
  .lp-hero-inner > .guides-hero-img     { grid-column: 1; grid-row: 2; max-width: 280px; margin: 0 auto; }
  .lp-hero-inner > .faq-pwa-cta        { grid-column: 1; grid-row: 3; margin-top: 0; }
  .lp-hero-inner > .lp-hero-explainer  { grid-column: 1; grid-row: 3; margin: 0; }
  .lp-trust-strip { gap: 1rem .875rem; padding: .75rem 1rem; }
  .lp-trust-item { font-size: .75rem; }
  .lp-section { padding: 3rem 1.25rem; }
  .lp-features { grid-template-columns: 1fr; gap: 1rem; }
  .lp-steps { flex-direction: column; align-items: center; }
  .lp-step-arrow { transform: rotate(90deg); align-self: center; margin: 0; }
  .lp-showcase { grid-template-columns: 1fr; gap: 1.5rem; }
  .lp-showcase--reverse .lp-showcase-img { order: unset; }
  .lp-showcase--reverse .lp-showcase-text { order: unset; }
  .lp-device-split { grid-template-columns: 1fr; }
  .lp-device-panel--primary { box-shadow: none; }
}


.landing-login-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.landing-login-overlay.open { opacity: 1; pointer-events: all; }
.landing-login-card {
  position: relative;
  max-height: 90dvh; overflow-y: auto;
  animation: none;
}
.landing-login-card.auth-card { padding: 0; }
.lm-top-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.lm-body { padding: 2rem 2rem 1.75rem; }
@media (max-width: 480px) { .lm-body { padding: 1.5rem 1.25rem 1.5rem; } }
.landing-login-card .auth-logo { margin-bottom: 1.5rem; }
.landing-login-card h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.025em; margin: 0 0 .35rem; }
.landing-login-card .lm-sub { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 1.25rem; }
.landing-login-card .lm-info-msg { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; font-size: .875rem; margin-bottom: .75rem; }
.landing-login-card .idx-btn-primary { width: 100%; justify-content: center; }
.landing-login-card .auth-switch { font-size: .8125rem; margin-top: 1rem; }
.landing-login-card a { color: var(--accent); }
.landing-login-card .auth-switch a { text-decoration: none; margin-left: 0; }
.landing-login-card .auth-switch a:hover { text-decoration: underline; }
.lm-success-state { text-align: center; padding: .5rem 0; }
.lm-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(7,147,79,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.landing-login-close {
  position: absolute; top: .75rem; right: .75rem;
  width: 32px; height: 32px;
  color: var(--accent);
}
.landing-login-close:hover { background: var(--accent-glow); color: var(--accent-dark); }


.pwa-guide-card {
  position: relative;
  background: var(--bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90dvh; overflow-y: auto;
  padding: 2rem 1.75rem 1.75rem;
}
.pwa-guide-header {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.5rem;
}
.pwa-guide-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  color: var(--accent);
}
.pwa-guide-header h2 { font-size: 1.15rem; margin: 0 0 .3rem; }
.pwa-guide-header p { margin: 0; font-size: .875rem; }
.pwa-tabs {
  display: flex; gap: .5rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border); padding-bottom: .75rem;
}
.pwa-tab {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .75rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 500;
  background: none; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.pwa-tab svg { width: 14px; height: 14px; flex-shrink: 0; }
.pwa-tab:hover { background: var(--bg-hover); color: var(--text); }
.pwa-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .pwa-tab.active { color: #000; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .pwa-tab.active { color: #000; }
}
.pwa-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .75rem;
}
.pwa-steps li {
  display: flex; gap: .875rem; align-items: flex-start;
}
.pwa-step-num {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: .1rem;
}
[data-theme="dark"] .pwa-step-num { color: #000; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .pwa-step-num { color: #000; }
}
.pwa-steps li > div { flex: 1; }
.pwa-steps li strong { display: block; font-size: .9rem; margin-bottom: .2rem; }
.pwa-steps li p { margin: 0; font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.pwa-step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-top: .4rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.pwa-step-icon svg { width: 18px; height: 18px; color: var(--text-muted); }
@media (max-width: 560px) {
  .pwa-guide-card { padding: 1.5rem 1.25rem 1.25rem; }
  .pwa-tabs { gap: .35rem; }
  .pwa-tab { padding: .35rem .5rem; font-size: .75rem; }
}


.auth-screen--simple {
  display: flex; align-items: center; justify-content: center;
  grid-template-columns: unset;
  background: linear-gradient(160deg, #eef7f2 0%, #f7fcf9 60%, #edf6f1 100%);
}
[data-theme="dark"] .auth-screen--simple {
  background: linear-gradient(160deg, #0d1f14 0%, #111a14 60%, #0d1a12 100%);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .auth-screen--simple {
    background: linear-gradient(160deg, #0d1f14 0%, #111a14 60%, #0d1a12 100%);
  }
}
.auth-screen--simple .auth-panel {
  background: transparent;
  min-height: 100dvh;
  width: 100%;
  padding-top: 60px;
}
.auth-screen--simple .auth-card {
  border-top: 4px solid var(--accent);
  box-shadow: 0 8px 32px rgba(7,147,79,.13), 0 2px 8px rgba(0,0,0,.06);
}
[data-theme="dark"] .auth-screen--simple .auth-card {
  box-shadow: 0 8px 32px rgba(7,147,79,.18), 0 2px 8px rgba(0,0,0,.22);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .auth-screen--simple .auth-card {
    box-shadow: 0 8px 32px rgba(7,147,79,.18), 0 2px 8px rgba(0,0,0,.22);
  }
}
.auth-screen--simple .btn-primary {
  height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  font-size: .9375rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(7,147,79,.25);
  transition: box-shadow .15s, transform .15s;
}
.auth-screen--simple .btn-primary:hover {
  background: linear-gradient(135deg, #076e3c, #0fa35f);
  box-shadow: 0 12px 24px rgba(7,147,79,.35);
  transform: translateY(-1px);
}
.auth-screen--simple .btn-secondary {
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: .9375rem;
  font-weight: 600;
}
.auth-screen--simple .auth-footer {
  left: 0;
  background: none;
  color: var(--text-subtle);
}
.auth-screen--simple .auth-footer a { color: var(--accent) !important; }
.auth-screen--simple .auth-card a { color: var(--accent); }
.auth-screen--simple .auth-card a.btn-primary { color: #fff; text-decoration: none; }
.auth-screen--simple .auth-card a.btn-secondary { color: var(--text); text-decoration: none; }
.auth-screen--simple .auth-card a.btn-secondary:hover { color: var(--accent); }
.auth-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(16,24,40,.04);
  z-index: 2;
}
@supports (padding: env(safe-area-inset-top)) {
  .auth-topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(60px + env(safe-area-inset-top));
  }
}
.auth-topbar-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.auth-topbar-logo:hover { text-decoration: none; color: var(--text); opacity: .8; }
.auth-topbar-logo img { display: block; }
.auth-topbar-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
@media (max-width: 768px) {
  .auth-screen--simple .auth-footer {
    position: absolute;
    bottom: max(.75rem, env(safe-area-inset-bottom));
    left: 0; right: 0;
    background: none;
    color: var(--text-subtle);
  }
}


.gd-hero { padding-top: 48px; }
@media (max-width: 600px) { .gd-hero { padding-top: 40px; } }


.gd-articles-section {
  background: linear-gradient(180deg, #eff8f3 0%, #f8fcfa 100%);
  border-top: 1px solid #dcebe4;
  border-bottom: 1px solid #dcebe4;
}
[data-theme="dark"] .gd-articles-section {
  background: rgba(34,197,94,.04);
  border-color: rgba(34,197,94,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .gd-articles-section {
    background: rgba(34,197,94,.04);
    border-color: rgba(34,197,94,.12);
  }
}


.gd-quicklinks {
  margin-top: 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.125rem;
  max-width: 480px;
}
.gd-quicklinks-head { margin-bottom: .875rem; }
.gd-quicklinks-head strong { display: block; font-size: .875rem; font-weight: 700; color: var(--text); margin-bottom: .2rem; }
.gd-quicklinks-head span { font-size: .775rem; color: var(--text-muted); line-height: 1.4; }
.gd-quicklinks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.gd-quicklink {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .625rem .375rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
  text-decoration: none; color: var(--text-muted);
  font-size: .72rem; font-weight: 500; text-align: center; line-height: 1.3;
  transition: border-color .15s, color .15s, background .15s;
}
.gd-quicklink:hover { border-color: var(--accent); color: var(--accent); background: rgba(7,147,79,.05); text-decoration: none; }
.gd-quicklink-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(7,147,79,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .gd-quicklink-icon { background: rgba(34,197,94,.15); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .gd-quicklink-icon { background: rgba(34,197,94,.15); color: var(--green); }
}
.gd-quicklink-icon svg { width: 18px; height: 18px; }
@media (max-width: 768px) { .gd-quicklinks { display: none; } }


.guides-hero {
  padding: 2rem 1.5rem 1.5rem;
  background:
    radial-gradient(circle, rgba(0,0,0,.07) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(91,141,239,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(34,197,94,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
[data-theme="dark"] .guides-hero {
  background:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(91,141,239,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(34,197,94,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guides-hero {
    background:
      radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
      radial-gradient(ellipse 90% 55% at 50% 0%, rgba(91,141,239,.13) 0%, transparent 65%),
      radial-gradient(ellipse 45% 35% at 75% 15%, rgba(34,197,94,.09) 0%, transparent 55%);
    background-size: 22px 22px, 100% 100%, 100% 100%;
  }
}
.guides-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.guides-hero-text { display: flex; flex-direction: column; align-items: flex-start; grid-column: 1; grid-row: 1; }
.guides-hero-img  { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.guides-hero-inner > .guides-featured-card { grid-column: 1; grid-row: 2; }
.guides-hero-label {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: .2rem .65rem; border-radius: 99px;
  background: rgba(7,147,79,.1); color: var(--accent); margin-bottom: 1.25rem;
}
.guides-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.025em;
  margin: .75rem 0 1rem;
  background: linear-gradient(130deg, var(--accent) 0%, var(--green) 65%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.guides-hero-sub { font-size: .9375rem; color: var(--text-muted); line-height: 1.65; margin: 0 0 1.25rem; }
.guides-hero-img img { width: 100%; display: block; border-radius: var(--radius-lg); }


.guides-featured-card {
  display: flex; flex-direction: row; gap: .875rem; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem;
  text-decoration: none; color: inherit;
  transition: box-shadow .15s, border-color .15s;
}
.guides-featured-card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.guides-featured-card:hover * { text-decoration: none; }
.guides-featured-card-img {
  width: 110px; height: 82px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-hover);
  display: flex;
}
.guides-featured-card-img img { width: 110px; height: 82px; object-fit: cover; object-position: center; display: block; flex-shrink: 0; }
.guides-featured-card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.guides-featured-card-label { font-size: .7rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }
.guides-featured-card-title { font-size: .875rem; font-weight: 600; color: var(--text); line-height: 1.35; margin: 0; }
.guides-featured-card-read { font-size: .775rem; color: var(--text-muted); margin-top: .15rem; }


.guides-filter-bar {
  max-width: 1160px; margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}
.guides-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.guides-chip {
  padding: .375rem .875rem; border-radius: 99px;
  font-size: .8125rem; font-weight: 500;
  background: var(--bg-card); border: 1.5px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.guides-chip:hover { border-color: var(--accent); color: var(--accent); }
.guides-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }


.guides-grid-section { max-width: 1160px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.guides-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.guides-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.guides-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.guides-card.hidden { display: none; }
.guides-card-img { aspect-ratio: 16/10; overflow: hidden; background: rgba(34,197,94,.06); }
.guides-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guides-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(91,141,239,.1));
  display: flex; align-items: center; justify-content: center; min-height: 120px;
}
.guides-card-img-placeholder svg { width: 48px; height: 48px; color: var(--accent); opacity: .35; }
.guides-card-body {
  padding: 1.125rem 1.125rem 1.25rem;
  flex: 1; display: flex; flex-direction: column; gap: .45rem;
}
.guides-card-cat {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase;
}
.guides-card-title { font-size: .9375rem; font-weight: 700; line-height: 1.35; color: var(--text); margin: 0; }
.guides-card-teaser { font-size: .8125rem; color: var(--text-muted); line-height: 1.55; margin: 0; flex: 1; }
.guides-card-readtime {
  font-size: .75rem; color: var(--text-subtle);
  display: flex; align-items: center; gap: .3rem; margin-top: .25rem;
}
.guides-card-readtime svg { width: 12px; height: 12px; flex-shrink: 0; }


.guides-cta-section {
  background: rgba(34,197,94,.07); border-top: 1px solid rgba(34,197,94,.14);
  padding: 3rem 1.5rem;
}
[data-theme="dark"] .guides-cta-section { background: rgba(34,197,94,.05); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guides-cta-section { background: rgba(34,197,94,.05); }
}
.guides-cta-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
}
.guides-cta-icon {
  width: 64px; height: 64px; flex-shrink: 0;
  background: var(--accent); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.guides-cta-icon svg { width: 32px; height: 32px; }
.guides-cta-text { flex: 1; }
.guides-cta-text h2 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 0 0 .35rem; }
.guides-cta-text p { font-size: .875rem; color: var(--text-muted); margin: 0; line-height: 1.6; }


.guide-page-wrap {
  max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem;
}

.guide-meta-left { justify-content: flex-start; border-bottom: none; padding-bottom: 0; margin-top: .5rem; }
.guide-header { max-width: 760px; margin: 0 auto 2rem; text-align: center; }
.guide-label {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: .2rem .65rem; border-radius: 99px;
  background: #e2f5ea; color: var(--accent); margin-bottom: .75rem;
}
[data-theme="dark"] .guide-label { background: rgba(34,197,94,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guide-label { background: rgba(34,197,94,.15); }
}
.guide-h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.2; letter-spacing: -.025em;
  margin: 0 0 1rem; color: var(--text);
}
.guide-intro { font-size: 1.0625rem; color: var(--text-muted); line-height: 1.7; margin: 0 0 1.25rem; }
.guide-meta {
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  font-size: .8125rem; color: var(--text-muted);
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.guide-meta-item { display: flex; align-items: center; gap: .35rem; }
.guide-meta-item svg { width: 14px; height: 14px; flex-shrink: 0; }


.guide-hero-img {
  border-radius: var(--radius-lg); overflow: hidden; margin: 0 auto 2.5rem;
  background: rgba(34,197,94,.06); max-width: 560px;
}
.guide-hero-img img { width: 100%; display: block; height: auto; }
.guide-hero-placeholder {
  height: 320px; border-radius: var(--radius-lg); margin-bottom: 2.5rem;
  background: linear-gradient(135deg, rgba(34,197,94,.13), rgba(91,141,239,.08));
  display: flex; align-items: center; justify-content: center;
}
.guide-hero-placeholder svg { width: 80px; height: 80px; color: var(--accent); opacity: .3; }


.guide-benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.guide-benefit {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  display: flex; gap: .75rem; align-items: flex-start;
}
.guide-benefit-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(7,147,79,.1); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
[data-theme="dark"] .guide-benefit-icon { background: rgba(34,197,94,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guide-benefit-icon { background: rgba(34,197,94,.15); }
}
.guide-benefit-icon svg { width: 18px; height: 18px; }
.guide-benefit-text h4 { font-size: .8125rem; font-weight: 600; color: var(--text); margin: 0 0 .2rem; }
.guide-benefit-text p { font-size: .75rem; color: var(--text-muted); margin: 0; line-height: 1.5; }


.guide-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.guide-content h2 {
  font-size: 1.1875rem; font-weight: 700; color: var(--text);
  margin: 2rem 0 .75rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.guide-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.guide-content p { font-size: .9375rem; color: var(--text-muted); line-height: 1.75; margin: 0 0 1rem; }
.guide-content ul { margin: 0 0 1rem; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.guide-content ul li {
  font-size: .9375rem; color: var(--text-muted); line-height: 1.6;
  padding-left: 1.5rem; position: relative;
}
.guide-content ul li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.guide-content ol { margin: 0 0 1rem; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; counter-reset: guide-ol; }
.guide-content ol li { font-size: .9375rem; color: var(--text-muted); line-height: 1.6; padding-left: 1.5rem; position: relative; counter-increment: guide-ol; }
.guide-content ol li::before { content: counter(guide-ol) '.'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.guide-tip {
  background: rgba(7,147,79,.07); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.guide-tip p { margin: 0; font-size: .875rem; color: var(--text); line-height: 1.65; }
.guide-tip strong { color: var(--accent); }
.guide-article-cta {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center; margin-top: 2.5rem;
}
.guide-article-cta h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0 0 .5rem; }
.guide-article-cta p { font-size: .875rem; color: var(--text-muted); margin: 0 0 1rem; }


.guide-sidebar { position: sticky; top: calc(60px + 1rem); }
.guide-sidebar-cta {
  background: linear-gradient(160deg, #2C7A5C 0%, #1E6349 100%);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; text-align: center;
}
.guide-sidebar-cta h3 { font-size: 1rem; font-weight: 700; color: #fff; margin: 0 0 .5rem; }
.guide-sidebar-cta p { font-size: .8125rem; color: rgba(255,255,255,.75); margin: 0 0 1.25rem; line-height: 1.6; }
.guide-sidebar-cta .btn-primary {
  background: #fff; color: #1A6044; border-color: transparent;
  width: 100%; justify-content: center; display: flex;
}
.guide-sidebar-cta .btn-primary:hover { background: rgba(255,255,255,.9); }
.guide-related-title {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  color: var(--text-muted); text-transform: uppercase; margin: 0 0 .875rem;
}
.guide-related-list { display: flex; flex-direction: column; gap: .625rem; }
.guide-related-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; display: flex; gap: 0;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.guide-related-item:hover {
  border-color: var(--accent); text-decoration: none;
  box-shadow: 0 4px 14px rgba(7,147,79,.12);
  transform: translateY(-1px);
}
.guide-related-img { width: 76px; flex-shrink: 0; overflow: hidden; background: rgba(7,147,79,.07); }
.guide-related-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.guide-related-item:hover .guide-related-img img { transform: scale(1.07); }
.guide-related-img-placeholder {
  width: 100%; height: 100%; min-height: 58px;
  background: linear-gradient(135deg, rgba(7,147,79,.12), rgba(34,197,94,.06));
  display: flex; align-items: center; justify-content: center;
}
.guide-related-img-placeholder svg { width: 22px; height: 22px; color: var(--accent); opacity: .45; }
.guide-related-text { padding: .625rem .875rem .625rem .75rem; flex: 1; }
.guide-related-cat { font-size: .63rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: .2rem; }
.guide-related-name { font-size: .8125rem; font-weight: 600; color: var(--text); line-height: 1.3; }


@media (max-width: 1024px) {
  .guide-benefits { grid-template-columns: repeat(2, 1fr); }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
}
@media (max-width: 768px) {
  .guides-hero-inner { grid-template-columns: 1fr; gap: 1.25rem; text-align: center; }
  .guides-hero-text { align-items: center; grid-column: 1; grid-row: 1; }
  .guides-hero-img  { grid-column: 1; grid-row: 2; max-width: 280px; margin: 0 auto; }
  .guides-hero-inner > .guides-featured-card { grid-column: 1; grid-row: 3; text-align: left; }
  .guides-featured-card-img { width: 64px; height: 48px; }
  .faq-tiles-wrap { padding: 0 1rem; }
  .faq-nav-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .guides-chips { justify-content: center; }
  .guides-grid { grid-template-columns: 1fr; }
  .guides-cta-inner { flex-direction: column; text-align: center; }
  .guide-benefits { grid-template-columns: 1fr; }
  .guide-hero-placeholder { height: 200px; }
  .guide-article-cta { display: none; }
}

.landing-footer {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.landing-footer-links {
  display: flex; align-items: center; justify-content: center;
  gap: .4rem 1.5rem; flex-wrap: wrap; margin-bottom: .8rem;
}
.landing-footer-links a {
  font-size: .84rem; font-weight: 600; color: #66758a;
  text-decoration: none;
  transition: color .15s;
}
[data-theme="dark"] .landing-footer-links a { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-footer-links a { color: var(--text-muted); }
}
.landing-footer-links a:hover { color: var(--accent); text-decoration: none; }
.landing-footer-links a:hover svg { fill: var(--accent); }
.footer-social-link { display: inline-flex !important; align-items: center; }
.footer-social-link svg { width: 1rem; height: 1rem; fill: #66758a; display: block; transition: fill .15s; }
[data-theme="dark"] .footer-social-link svg { fill: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .footer-social-link svg { fill: var(--text-muted); }
}
.landing-footer-copy { font-size: .78rem; color: #91a0b4; margin: 0; }
[data-theme="dark"] .landing-footer-copy { color: var(--text-subtle); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-footer-copy { color: var(--text-subtle); }
}

.feat-hero-explainer {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-top: 1.25rem;
}
.feat-hero-explainer p { font-size: .875rem; color: var(--text-muted); line-height: 1.7; margin: 0; }
.feat-hero-explainer p + p { margin-top: .75rem; }
.feat-section-inner { max-width: 900px; margin: 0 auto; }


.abt-section { padding: 72px 1.5rem; }
.abt-section.alt {
  background: rgba(34,197,94,.06);
  border-top: 1px solid rgba(34,197,94,.13);
  border-bottom: 1px solid rgba(34,197,94,.13);
}
[data-theme="dark"] .abt-section.alt {
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.16);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .abt-section.alt {
    background: rgba(34,197,94,.08);
    border-color: rgba(34,197,94,.16);
  }
}
.abt-section-inner { max-width: 900px; margin: 0 auto; }
.abt-section-title {
  font-size: clamp(22px, 2.5vw, 32px); font-weight: 800;
  color: var(--text); margin: 0 0 1.25rem; letter-spacing: -.03em; line-height: 1.15;
}
.abt-section-sub { font-size: .9375rem; color: var(--text-muted); margin: 0 0 2rem; }
@media (max-width: 600px) { .abt-section { padding: 48px 1.25rem; } }
.about-hero-inner { max-width: 640px; margin: 0 auto; padding: 3.5rem 1.5rem 2.5rem; text-align: center; }
.about-hero-sub { font-size: 1.05rem; color: var(--text-muted); line-height: 1.75; margin: 0; }
.about-prose p { font-size: .95rem; color: var(--text-muted); line-height: 1.85; margin: 0 0 1rem; }
.about-prose p:last-child { margin-bottom: 0; }
.about-person { display: flex; gap: 1.5rem; align-items: flex-start; max-width: 520px; margin: 0 auto; }
.about-person-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.about-person-body { display: flex; flex-direction: column; }
.about-person-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.about-person-role { font-size: .82rem; color: var(--text-subtle); margin: .2rem 0 .65rem; }
.about-person-bio { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin: 0; }
.about-philosophy { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 2rem; }
.about-phil-block h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; }
.about-phil-block p { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin: 0 0 .75rem; }
.about-phil-block p:last-child { margin-bottom: 0; }
.about-not-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.about-not-list li { font-size: .875rem; color: var(--text-muted); padding-left: 1.5rem; position: relative; line-height: 1.4; }
.about-not-list li::before { content: '×'; position: absolute; left: 0; color: var(--red); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.about-contact { text-align: center; }
.about-embed-first { margin-top: 0; }
.about-embed-card { display: flex; flex-direction: column; gap: .75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 1.5rem 0; }
.about-hero-card { display: flex; flex-direction: column; gap: .75rem; width: 100%; background: rgba(7,147,79,.06); border: 1px solid rgba(7,147,79,.18); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1.25rem; }
.about-hero-card-person { display: flex; align-items: center; gap: .75rem; }
.about-hero-card-facts { display: flex; flex-direction: column; gap: .35rem; padding-top: .65rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-muted); }
.about-hero-card-facts a:not(.btn) { color: var(--accent); text-decoration: none; }
.about-hero-card-facts a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 768px) { .about-hero-card { grid-column: 1; } }
.about-email-link { display: inline-block; font-size: 1.05rem; font-weight: 600; color: var(--accent); text-decoration: none; padding: .6rem 1.4rem; border: 2px solid var(--accent); border-radius: var(--radius); transition: background .15s, color .15s; }
.about-email-link:hover { background: var(--accent); color: #fff; }
[data-theme="dark"] .about-email-link:hover { color: #000; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .about-email-link:hover { color: #000; }
}
.cm-consent-label { font-size: .8125rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1.25rem; }
.cm-consent-label a { color: var(--accent); text-decoration: underline; }
#cm-privacy-overlay { z-index: 810; }
.about-story p { margin: 0 0 .6rem; }
.about-story p:last-child { margin-bottom: 0; }
@media (max-width: 768px) {
  .about-hero-inner { padding: 2.5rem 1.25rem 2rem; }
  .about-philosophy { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-person { flex-direction: column; align-items: center; text-align: center; }
}


#tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 910;
  cursor: default;
}
#tour-backdrop.tour-backdrop--intro { background: rgba(0,0,0,.48); }
#tour-spotlight {
  position: fixed;
  z-index: 911;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.48);
  pointer-events: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}
#tour-intro {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 912;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.4rem;
  width: 400px;
  max-width: calc(100vw - 2rem);
  box-shadow: var(--shadow-lg);
}
#tour-intro .tour-close { position: absolute; top: 1rem; right: 1.1rem; }
.tour-intro-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: 20px;
  padding: .2rem .7rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}
.tour-intro-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  margin-top: .5rem;
}
#tour-tooltip {
  position: fixed;
  z-index: 912;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.1rem .9rem;
  width: 300px;
  max-width: calc(100vw - 1.5rem);
  box-shadow: var(--shadow-md);
  font-size: .9rem;
  color: var(--text);
}
#tour-tooltip::before {
  content: '';
  position: absolute;
  left: var(--tour-arrow-left, 50%);
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  pointer-events: none;
}
#tour-tooltip.tour-arrow-top::before {
  top: -6px;
  transform: translateX(-50%) rotate(45deg);
  border-right: none;
  border-bottom: none;
}
#tour-tooltip.tour-arrow-bottom::before {
  bottom: -6px;
  transform: translateX(-50%) rotate(-135deg);
  border-right: none;
  border-bottom: none;
}
#tour-tooltip.tour-centered::before { display: none; }
.tour-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
}
.tour-step-count {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tour-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  opacity: .6;
  transition: opacity .15s;
}
.tour-close:hover { opacity: 1; }
.tour-title {
  font-weight: 700;
  font-size: .975rem;
  margin-bottom: .3rem;
  color: var(--text);
  line-height: 1.3;
}
.tour-body {
  font-size: .855rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: .9rem;
}
.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
}
.tour-skip {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  color: var(--text-subtle);
  padding: .15rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tour-skip:hover { color: var(--text-muted); }
.tour-nav-btns { display: flex; gap: .4rem; align-items: center; }
@media (max-width: 480px) {
  #tour-tooltip, #tour-intro { width: calc(100vw - 1.5rem); }
}


.wizard-step-indicator {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}
.wizard-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem;
}
.wizard-options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.wizard-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--bg-input);
  user-select: none;
}
.wizard-option:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}
.wizard-option.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-input));
}
.wizard-option span {
  order: 1;
  flex: 1;
  font-size: .9rem;
  color: var(--text);
}
button.wizard-option {
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  border: 1.5px solid var(--border);
  color: var(--text);
  outline: none;
}
button.wizard-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wizard-option input[type=checkbox] {
  order: 2;
  flex-shrink: 0;
  cursor: pointer;
}
.wizard-preview-loading {
  color: var(--text-muted);
  font-size: .9rem;
  padding: .5rem 0;
}
.wizard-preview-groups {
  list-style: none;
  padding: 0;
  margin: 0 0 .5rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.wizard-preview-groups li {
  padding: .4rem .75rem;
  background: var(--bg-stripe);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
}
.wizard-preview-groups li::before {
  content: '·';
  margin-right: .5rem;
  color: var(--accent);
  font-weight: 700;
}
.wizard-preview-count {
  margin: .5rem 0 0;
}
@media (max-width: 480px) {
  .wizard-option { padding: .65rem .75rem; }
}


.my-plan-info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin-bottom: 1.25rem;
}
.my-plan-info-box .pricing-tier-name {
  font-size: .8rem;
  margin-bottom: .3rem;
}
.my-plan-info-box .pricing-annual {
  font-size: .75rem;
}


.my-plan-mods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .75rem;
}
.my-plan-mods .my-plan-mod-extra { display: none; }
.my-plan-mods.expanded .my-plan-mod-extra { display: flex; }
.my-plan-mod {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8125rem;
  line-height: 1.3;
}
.my-plan-mod-icon {
  flex-shrink: 0;
  width: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-plan-mod-on  { color: var(--text); }
.my-plan-mod-on .my-plan-mod-icon  { color: var(--green); font-size: .85rem; }
.my-plan-mod-off { color: var(--text-muted); }
.my-plan-mod-off .my-plan-mod-icon { color: var(--text-subtle, var(--text-muted)); }
@media (max-width: 480px) {
  .my-plan-mods { grid-template-columns: 1fr; }
}


.upg-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  align-items: start;
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.upg-pricing-grid .pricing-card { cursor: pointer; }
.upg-pricing-grid .pricing-card:hover { box-shadow: var(--shadow-md); }
.upg-pricing-grid .pricing-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 24px rgba(7,147,79,.1);
  border-top: 3px solid var(--accent);
}
.pricing-card-head { padding: 1.1rem 1rem .9rem; }
.pricing-tier-name {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
}
.pricing-price {
  line-height: 1; display: flex; align-items: baseline; gap: .25rem;
  margin-bottom: .2rem; min-height: 2.4rem;
}
.pricing-price .amount  { font-size: 2rem; font-weight: 800; color: var(--text); }
.pricing-price .period  { font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.pricing-price .free-label { font-size: 1.5rem; font-weight: 800; color: var(--green, #16a34a); }
.pricing-annual { font-size: .7rem; color: var(--text-subtle, var(--text-muted)); min-height: 1em; }
.pricing-annual strong { color: var(--green, #16a34a); }
.pricing-card-body { padding: 0 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.pricing-divider { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }
.pricing-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.pricing-features li {
  font-size: .775rem; color: var(--text-muted);
  display: flex; align-items: flex-start; gap: .45rem; line-height: 1.4;
}
.pricing-features li .icon { flex-shrink: 0; margin-top: .1rem; }
.icon-check { color: var(--accent); }
.icon-plus  { color: var(--accent); }
.pricing-feature-inherits {
  color: var(--text-muted); font-style: italic;
  padding-bottom: .3rem; margin-bottom: .1rem;
  border-bottom: 1px solid var(--border);
}
.pricing-feature-inherits strong { font-style: normal; color: var(--text); }
.pricing-feature-section-label {
  font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); opacity: .6;
}

.billing-toggle {
  display: flex; align-items: center;
  gap: .75rem;
}
.billing-toggle span { font-size: .825rem; color: var(--text-muted); }
.billing-toggle span.active { font-weight: 600; color: var(--text); }
.toggle-switch {
  position: relative; width: 44px; height: 24px;
  background: var(--accent); border-radius: 99px;
  cursor: pointer; transition: background .2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.toggle-switch.monthly::after { transform: translateX(0); }
.toggle-switch.yearly::after  { transform: translateX(20px); }
.billing-save-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .15rem .5rem; border-radius: 99px;
  background: rgba(22,163,74,.12); color: var(--green, #16a34a);
}

.pricing-ribbon {
  position: absolute; top: 35px; right: -50px;
  width: 190px;
  background: linear-gradient(130deg, var(--accent) 0%, var(--green) 65%); color: #fff;
  font-size: .6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  text-align: center; padding: .3rem 0;
  transform: rotate(45deg);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.pr-testimonials { text-align: center; margin-bottom: 2rem; padding: 1.5rem; background: var(--bg); border-radius: var(--radius-lg); }
.pr-testimonials-title { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; }
.pr-testimonials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .pr-testimonials-grid { grid-template-columns: 1fr; } }
.pr-testimonial-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; text-align: left; background: var(--bg-card); }
.pr-testimonial-quote { font-size: .85rem; color: var(--text); line-height: 1.5; margin: 0 0 .5rem; }
.pr-testimonial-author { font-size: .75rem; color: var(--text-muted); }

.pr-trust-icons { display: flex; justify-content: center; gap: 2.5rem; margin-bottom: 2rem; padding: 1rem 0; }
.pr-trust-icon-item { display: flex; flex-direction: column; align-items: center; gap: .4rem; color: var(--text-muted); }
.pr-trust-icon-item svg { color: var(--green, #16a34a); }
.pr-trust-icon-item span { font-size: .78rem; font-weight: 500; }
@media (max-width: 480px) { .pr-trust-icons { gap: 1.5rem; } .pr-trust-icon-item span { font-size: .72rem; } }

.pr-inline-faq { padding-top: 1.5rem; margin-bottom: 2rem; }
.pr-inline-faq-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; }
.pr-inline-faq-item { border-left: 3px solid var(--green, #16a34a); padding: .75rem 1rem; margin-bottom: .5rem; background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.pr-inline-faq-item strong { font-size: .85rem; color: var(--text); display: block; margin-bottom: .25rem; }
.pr-inline-faq-item p { font-size: .8rem; color: var(--text-muted); margin: 0; line-height: 1.5; }


.insight-assessment {
  border-left: 3px solid var(--insight-color, var(--accent));
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
  font-size: .875rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.insight-facts { display: flex; flex-wrap: wrap; gap: .4rem; }
.insight-fact {
  flex: 1 1 130px;
  padding: .2rem .65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.insight-fact-label { font-size: .7rem; color: var(--text-muted); white-space: nowrap; margin-bottom: .1rem; }
.insight-fact-value { font-size: .95rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 480px) {
  .insight-facts { flex-direction: column; }
  .insight-fact { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: .5rem; }
  .insight-fact-label { white-space: normal; margin-bottom: 0; }
}
.insight-extra {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.insight-observation {
  font-size: .8rem;
  line-height: 1.55;
  padding: .5rem .75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-input);
  color: var(--text);
}
.insight-observation--warn  { border-left-color: var(--orange); }
.insight-observation--muted { color: var(--text-muted); }


.stripe-payment-wrap {
  min-height: 120px;
  margin-bottom: 1rem;
}


.stripe-consent-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  cursor: pointer;
  padding: .5rem 0;
}
.stripe-consent-toggle-row span {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.stripe-consent-text {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: .6rem .75rem;
  background: var(--bg-stripe, var(--bg-hover));
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
}


.idx-hero {
  position: relative;
  padding: 72px 1.5rem 64px;
  background:
    radial-gradient(circle at 76% 20%, rgba(16,177,94,.09), transparent 28%),
    radial-gradient(circle at 5%  82%, rgba(16,177,94,.07), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  overflow: hidden;
}
[data-theme="dark"] .idx-hero {
  background:
    radial-gradient(circle at 76% 20%, rgba(34,197,94,.07), transparent 28%),
    radial-gradient(circle at 5%  82%, rgba(34,197,94,.05), transparent 20%),
    var(--bg-card);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-hero {
    background:
      radial-gradient(circle at 76% 20%, rgba(34,197,94,.07), transparent 28%),
      radial-gradient(circle at 5%  82%, rgba(34,197,94,.05), transparent 20%),
      var(--bg-card);
  }
}
.idx-hero-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: .9fr 1.1fr;
  align-items: flex-start; gap: 52px;
}
.idx-hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.idx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  background: #e2f5ea; color: var(--accent);
  font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; margin-bottom: 20px;
}
[data-theme="dark"] .idx-eyebrow { background: rgba(34,197,94,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-eyebrow { background: rgba(34,197,94,.15); }
}
.idx-h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 4.5vw, 62px);
  font-weight: 800; line-height: 1.07; letter-spacing: -.04em;
  color: var(--text);
}
.idx-h1 .idx-accent { color: var(--accent); }
.idx-hero-sub {
  margin: 0 0 28px; max-width: 520px;
  font-size: 1.05rem; line-height: 1.72; color: var(--text-muted);
}
.idx-hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 22px;
}
.idx-btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 22px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff; font-size: .9375rem; font-weight: 700;
  text-decoration: none; border: none;
  box-shadow: 0 12px 24px rgba(7,147,79,.25);
  transition: transform .15s, box-shadow .15s; cursor: pointer;
}
.idx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 28px rgba(7,147,79,.32); color: #fff; text-decoration: none; }
.idx-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 12px;
  background: #fff; color: var(--text);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  border: 1px solid #cbd5e3; box-shadow: 0 1px 3px rgba(23,32,51,.05);
  transition: border-color .15s, color .15s, transform .15s;
}
.idx-btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); text-decoration: none; }
[data-theme="dark"] .idx-btn-secondary { background: var(--bg-card); border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-btn-secondary { background: var(--bg-card); border-color: var(--border); }
}
.idx-trust-row { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 10px; }
.idx-trust-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; color: #526174;
}
.idx-trust-check {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: #e2f5ea; color: var(--accent);
  font-size: 11px; font-weight: 900; flex-shrink: 0; font-style: normal;
}
[data-theme="dark"] .idx-trust-check { background: rgba(34,197,94,.18); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-trust-check { background: rgba(34,197,94,.18); }
}
[data-theme="dark"] .idx-trust-item { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-trust-item { color: var(--text-muted); }
}
.idx-device-hint {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: .78rem; color: var(--text-subtle);
}
.idx-device-hint svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }


.idx-hero-visual { position: relative; }
.idx-device-card {
  position: relative; border-radius: 22px; padding: 14px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(207,215,228,.9);
  box-shadow: 0 18px 50px rgba(23,32,51,.10);
  transform: rotate(.3deg);
}
[data-theme="dark"] .idx-device-card {
  background: rgba(26,29,39,.88);
  border-color: rgba(46,51,71,.9);
  box-shadow: 0 20px 52px rgba(0,0,0,.4);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-device-card {
    background: rgba(26,29,39,.88);
    border-color: rgba(46,51,71,.9);
    box-shadow: 0 20px 52px rgba(0,0,0,.4);
  }
}
.idx-device-card::after {
  content: ""; position: absolute;
  left: 10%; right: 10%; bottom: -16px;
  height: 24px; border-radius: 999px;
  background: rgba(23,32,51,.13); filter: blur(14px); z-index: -1;
}
[data-theme="dark"] .idx-device-card::after { background: rgba(0,0,0,.35); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-device-card::after { background: rgba(0,0,0,.35); }
}
.idx-device-card img { border-radius: 14px; border: 1px solid #e2e8f0; width: 100%; display: block; }


.idx-steps-section {
  padding: 80px 1.5rem;
  background: linear-gradient(180deg, #eff8f3 0%, #f8fcfa 100%);
  border-top: 1px solid #dcebe4;
  border-bottom: 1px solid #dcebe4;
}
[data-theme="dark"] .idx-steps-section {
  background: rgba(34,197,94,.05);
  border-color: rgba(34,197,94,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-steps-section {
    background: rgba(34,197,94,.05);
    border-color: rgba(34,197,94,.12);
  }
}
.idx-steps-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.idx-section-title {
  font-size: clamp(26px, 3.5vw, 44px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1; color: var(--text); margin: 0 0 10px;
}
.idx-section-sub { font-size: .9375rem; color: var(--text-muted); margin: 0 0 48px; }
.idx-steps {
  display: grid; grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: start; gap: 16px;
}
.idx-step { text-align: center; position: relative; }
.idx-step-number {
  position: absolute; top: -6px; left: 50%; margin-left: -46px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-grid; place-items: center;
  font-size: .68rem; font-weight: 800;
}
[data-theme="dark"] .idx-step-number { color: #050e05; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-step-number { color: #050e05; }
}
.idx-icon-bubble {
  width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e3f4e9; color: var(--accent);
}
[data-theme="dark"] .idx-icon-bubble { background: rgba(34,197,94,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-icon-bubble { background: rgba(34,197,94,.15); }
}
.idx-icon-bubble.blue { background: #eaf1ff; color: #4f83f1; }
[data-theme="dark"] .idx-icon-bubble.blue { background: rgba(91,141,239,.15); color: var(--blue); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-icon-bubble.blue { background: rgba(91,141,239,.15); color: var(--blue); }
}
.idx-icon-bubble.orange { background: #fff0e6; color: #ff7a22; }
[data-theme="dark"] .idx-icon-bubble.orange { background: rgba(249,115,22,.15); color: var(--orange); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-icon-bubble.orange { background: rgba(249,115,22,.15); color: var(--orange); }
}
.idx-icon-bubble svg { width: 32px; height: 32px; }
.idx-step h3 { font-size: 1rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -.02em; color: var(--text); }
.idx-step p { margin: 0 auto; max-width: 215px; color: var(--text-muted); font-size: .875rem; line-height: 1.6; }
.idx-step-arrow {
  font-size: 1.4rem; line-height: 88px; text-align: center;
  color: var(--accent); opacity: .9; margin-top: 18px;
}


.idx-showcase-section { padding: 80px 1.5rem; background: #ffffff; }
.idx-showcase-section.alt {
  background: linear-gradient(180deg, #eff8f3 0%, #f8fcfa 100%);
  border-top: 1px solid #dcebe4;
  border-bottom: 1px solid #dcebe4;
}
[data-theme="dark"] .idx-showcase-section { background: var(--bg-card); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-showcase-section { background: var(--bg-card); }
}
[data-theme="dark"] .idx-showcase-section.alt {
  background: rgba(34,197,94,.05);
  border-color: rgba(34,197,94,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-showcase-section.alt {
    background: rgba(34,197,94,.05);
    border-color: rgba(34,197,94,.12);
  }
}
.idx-showcase {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
}
.idx-showcase.reverse { grid-template-columns: .95fr 1.05fr; }
.idx-showcase.reverse .idx-showcase-media { order: 2; }
.idx-showcase.reverse .idx-showcase-text  { order: 1; }
.idx-showcase-media {
  border-radius: 22px; background: var(--bg-card);
  padding: 10px; border: 1px solid #dce3ed; box-shadow: 0 12px 32px rgba(23,32,51,.08);
}
.idx-showcase-media img { border-radius: 14px; width: 100%; display: block; }
.idx-showcase-tag {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  background: #e2f5ea; color: var(--accent);
  font-size: .7rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; margin-bottom: 14px;
}
[data-theme="dark"] .idx-showcase-tag { background: rgba(34,197,94,.15); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-showcase-tag { background: rgba(34,197,94,.15); color: var(--green); }
}
.idx-showcase-text h2 {
  font-size: clamp(24px, 3vw, 38px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1; color: var(--text); margin: 0 0 14px;
}
.idx-showcase-text > p { font-size: .9375rem; color: var(--text-muted); line-height: 1.72; margin: 0 0 20px; }
.idx-check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.idx-check-list li {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: .875rem; font-weight: 600; color: #46546a;
}
[data-theme="dark"] .idx-check-list li { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-check-list li { color: var(--text-muted); }
}
.idx-check-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: #e2f5ea; color: var(--accent);
  font-size: 11px; font-weight: 900; flex-shrink: 0; margin-top: 1px; font-style: normal;
}
[data-theme="dark"] .idx-check-icon { background: rgba(34,197,94,.18); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-check-icon { background: rgba(34,197,94,.18); color: var(--green); }
}


.idx-features-section {
  padding: 80px 1.5rem;
  background: linear-gradient(180deg, #f9fbfd 0%, #ffffff 100%);
}
[data-theme="dark"] .idx-features-section { background: var(--bg); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-features-section { background: var(--bg); }
}
.idx-features-section.alt {
  background: rgba(34,197,94,.06);
  border-top: 1px solid rgba(34,197,94,.13);
  border-bottom: 1px solid rgba(34,197,94,.13);
}
[data-theme="dark"] .idx-features-section.alt {
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.16);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-features-section.alt {
    background: rgba(34,197,94,.08);
    border-color: rgba(34,197,94,.16);
  }
}
.idx-features-inner { max-width: 1060px; margin: 0 auto; text-align: center; }
.idx-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-top: 40px;
}
.idx-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
  text-align: left; transition: box-shadow .18s, transform .18s;
}
.idx-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.idx-card-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(7,147,79,.1); color: #07934f;
  margin-bottom: 14px;
}
[data-theme="dark"] .idx-card-icon { background: rgba(34,197,94,.12); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-card-icon { background: rgba(34,197,94,.12); color: var(--green); }
}
.idx-card-icon svg { width: 21px; height: 21px; }
.idx-card-icon.blue { background: rgba(91,141,239,.12); color: var(--accent); }
.idx-card-icon.orange { background: rgba(249,115,22,.12); color: var(--orange); }
.idx-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.idx-card h3 { font-size: .9375rem; font-weight: 700; margin: 0 0 6px; color: var(--text); letter-spacing: -.01em; }
.idx-card-header h3 { margin: 0; }
.idx-card > p { font-size: .84rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.idx-plan-badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 3px 8px;
  background: rgba(91,141,239,.12); color: var(--blue);
  font-size: .67rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.idx-coming-badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 3px 8px;
  background: rgba(249,115,22,.12); color: var(--orange);
  font-size: .67rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}


.idx-articles-section {
  padding: 80px 1.5rem;
  background: #faf7f2;
  border-top: 1px solid #ece6d9;
  border-bottom: 1px solid #ece6d9;
}
[data-theme="dark"] .idx-articles-section {
  background: color-mix(in srgb, var(--bg-card) 97%, #b88a30);
  border-color: rgba(255,255,255,.07);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-articles-section {
    background: color-mix(in srgb, var(--bg-card) 97%, #b88a30);
    border-color: rgba(255,255,255,.07);
  }
}
.idx-articles-inner { max-width: 1060px; margin: 0 auto; text-align: center; }
.idx-article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.idx-article-card {
  overflow: hidden; background: var(--bg-card);
  border-radius: 20px; border: 1px solid var(--border);
  box-shadow: var(--shadow); text-decoration: none !important; color: inherit;
  display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.idx-article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.idx-article-card picture, .idx-article-card picture img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.idx-article-body { padding: 18px; flex: 1; text-align: left; }
.idx-article-cat {
  font-size: .69rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.idx-article-body h3 {
  font-size: .9375rem; font-weight: 700; margin: 0 0 6px;
  color: var(--text); line-height: 1.35; letter-spacing: -.02em;
}
.idx-article-body p { font-size: .8125rem; color: var(--text-muted); margin: 0; line-height: 1.55; }


.idx-cta-section {
  padding: 64px 1.5rem;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(7,147,79,.07) 100%);
}
[data-theme="dark"] .idx-cta-section {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(34,197,94,.06) 100%);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-cta-section {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(34,197,94,.06) 100%);
  }
}
.idx-cta-box {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px; padding: 30px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(7,147,79,.06), var(--bg-card));
  border: 1px solid rgba(7,147,79,.15); box-shadow: var(--shadow-md);
}
[data-theme="dark"] .idx-cta-box {
  background: linear-gradient(135deg, rgba(34,197,94,.05), var(--bg-card));
  border-color: rgba(34,197,94,.15);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-cta-box {
    background: linear-gradient(135deg, rgba(34,197,94,.05), var(--bg-card));
    border-color: rgba(34,197,94,.15);
  }
}
.idx-cta-icon {
  width: 72px; height: 72px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff; flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(7,147,79,.22);
}
.idx-cta-icon svg { width: 32px; height: 32px; }
.idx-cta-text h2 {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em;
  margin: 0 0 4px; color: var(--text);
}
.idx-cta-text p { font-size: .875rem; color: var(--text-muted); margin: 0; }


@media (max-width: 1100px) {
  .idx-hero-inner { gap: 36px; }
  .idx-showcase   { gap: 40px; }
}
@media (max-width: 860px) {
  .idx-hero-inner,
  .idx-showcase,
  .idx-showcase.reverse { grid-template-columns: 1fr; }
  .idx-hero-inner  { gap: 32px; }
  .idx-hero-text   { align-items: center; text-align: center; }
  .idx-hero-sub    { margin-left: auto; margin-right: auto; }
  .idx-hero-actions, .idx-trust-row { justify-content: center; }
  .idx-device-hint { justify-content: center; }
  .idx-hero-visual { max-width: 720px; margin: 0 auto; }
  .idx-device-card { transform: none; }
  .idx-showcase.reverse .idx-showcase-media,
  .idx-showcase.reverse .idx-showcase-text { order: unset; }
  .idx-steps { grid-template-columns: 1fr; gap: 20px; }
  .idx-step-arrow { line-height: 1; transform: rotate(90deg); margin: -4px 0; }
  .idx-step-number { margin-left: -36px; }
  .idx-cards, .idx-article-grid { grid-template-columns: 1fr 1fr; }
  .idx-cta-box { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 600px) {
  .idx-hero { padding: 40px 1.25rem 48px; }
  .idx-steps-section, .idx-showcase-section,
  .idx-features-section, .idx-articles-section,
  .idx-cta-section { padding: 56px 1.25rem; }
  .idx-h1 { font-size: clamp(32px, 10vw, 42px); }
  .idx-hero-sub { font-size: 1rem; }
  .idx-hero-actions { flex-direction: column; align-items: stretch; }
  .idx-btn-primary, .idx-btn-secondary { justify-content: center; }
  .idx-trust-row { justify-content: flex-start; flex-direction: column; gap: 8px; }
  .idx-device-hint { justify-content: flex-start; }
  .idx-hero-text { align-items: flex-start; text-align: left; }
  .idx-cards, .idx-article-grid { grid-template-columns: 1fr; }
  .idx-cta-box { padding: 20px; }
  .idx-cta-icon { width: 58px; height: 58px; }
  .idx-cta-text h2 { font-size: 1.2rem; }
}


.badge-revision {
  background: #3b82f6;
  color: #fff;
  font-size: .7rem;
  padding: .15rem .45rem;
  border-radius: .25rem;
  font-weight: 600;
  margin-left: .4rem;
  vertical-align: middle;
  cursor: default;
}
[data-theme="dark"] .badge-revision { background: #60a5fa; color: #111; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .badge-revision { background: #60a5fa; color: #111; }
}

.revision-list { display: flex; flex-direction: column; gap: .3rem; }
.revision-list-item {
  display: flex; flex-direction: column; gap: .15rem;
  text-align: left; padding: .6rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); cursor: pointer; width: 100%;
}
.revision-list-item:hover { background: var(--bg-hover); }
.revision-list-label { font-weight: 600; font-size: .9rem; color: var(--text); }
.revision-list-note { font-style: italic; }

.revision-mode input[type="number"],
.revision-mode input[type="text"] { pointer-events: none; opacity: .75; }
.revision-mode .row-action-btn,
.revision-mode .btn-icon.row-menu-btn { display: none; }


.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


.month-col--inactive {
  background: color-mix(in srgb, var(--bg-stripe) 60%, transparent);
  color: var(--text-subtle);
  opacity: .55;
  pointer-events: none;
  user-select: none;
}
th.month-col--inactive {
  font-style: italic;
}
