/* Bulder Design System — Dark Native Theme */
:root {
  --bg-primary: #0D1421;
  --bg-surface: #151E2E;
  --bg-elevated: #1C2640;
  --bg-input: #1A2236;
  --border: #252F45;
  --text-primary: #FFFFFF;
  --text-secondary: #8A9BB5;
  --accent-blue: #2D6BE4;
  --accent-red: #E8402A;
  --positive: #2ECC71;
  --negative: #E8402A;
  --badge-bg: #1A3340;
  --badge-text: #2ECC71;
  --info-bg: #0F1E35;
  --radius-card: 16px;
  --radius-pill: 28px;
  --radius-input: 12px;
  --radius-small: 10px;
  /* Net worth tokens */
  --networth-funds: #7C8FFF;
  --networth-savings: #F5C842;
  --networth-home: #D97757;
  --streak-orange: #FF8A3D;
  --streak-red: #E8402A;
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }

html, body {
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  background: #000;
  color: var(--text-primary);
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* iOS status bar */
.status-bar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: 47px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px 0; z-index: 999;
  font-size: 16px; font-weight: 600; color: var(--text-primary);
  background: var(--bg-primary);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.status-bar-icons { display: flex; align-items: center; gap: 6px; }
.status-bar-icons svg { fill: var(--text-primary); }

/* Screen container — flex column so CTA can stick to bottom outside scroll */
.screen {
  position: fixed; inset: 0; left: 50%;
  width: 100%; max-width: 430px;
  background: var(--bg-primary);
  display: flex; flex-direction: column;
  padding-top: 47px;
  opacity: 0; pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.35, 1), opacity 0.2s ease;
  transform: translate3d(100%, 0, 0);
}
.screen.active {
  opacity: 1; pointer-events: auto;
  transform: translate3d(-50%, 0, 0);
}

/* Scrollable inner area */
.screen-body {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 100px;
}

/* Home indicator */
.home-indicator {
  position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,0.4); z-index: 999; pointer-events: none;
}

/* Header — iOS navigation bar */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 8px; position: sticky; top: 0; z-index: 100;
  background: rgba(13, 20, 33, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  min-height: 44px;
}
.header-title { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; }
.header-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none; color: var(--text-primary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.1s, background 0.15s;
}
.header-btn:active { opacity: 0.5; background: rgba(255,255,255,0.12); }
.header-btn.invisible { visibility: hidden; }
.header-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.header-btn svg path, .header-btn svg circle { stroke: currentColor; }

/* iOS large title pattern */
.large-title {
  padding: 4px 20px 20px; font-size: 34px; font-weight: 700;
  letter-spacing: -0.8px; line-height: 1.1;
}

/* Hero card with chart */
.hero-card {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 20px; padding: 24px 24px 0; position: relative; overflow: hidden;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.hero-label { font-size: 15px; color: var(--text-primary); font-weight: 400; margin-bottom: 4px; }
.hero-value { font-size: 40px; font-weight: 700; letter-spacing: -1px; line-height: 1; margin-bottom: 12px; }
.hero-badge {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 20px; font-size: 14px; font-weight: 600;
}
.hero-badge.positive { background: #2ECC71; color: #0D1421; }
.hero-badge.negative { background: #F59E0B; color: #1A1206; }

/* Time range selector */
.time-range-pill {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 8px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-primary); cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 6px;
}
.time-range-pill:active { background: rgba(255,255,255,0.1); }

.time-range-menu {
  display: none; position: absolute; top: 60px; right: 24px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.time-range-menu.open { display: block; }
.time-range-option {
  display: block; width: 100%; padding: 10px 16px; background: none; border: none;
  color: var(--text-primary); font-size: 14px; text-align: left; cursor: pointer;
  border-radius: 8px; font-family: inherit;
}
.time-range-option:hover, .time-range-option.active { background: var(--accent-blue); }

/* Chart */
.chart-container {
  position: relative; height: 180px; margin: 0 -24px;
  padding-top: 20px;
}
.chart-svg { width: 100%; height: 100%; display: block; }
.chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-x-axis {
  display: flex; justify-content: space-between; padding: 8px 24px 20px;
  font-size: 12px; color: var(--text-secondary);
}

/* Chart endpoint pulse */
.chart-endpoint { filter: drop-shadow(0 0 6px rgba(124, 143, 255, 0.6)); }
@keyframes pulse-ring {
  0% { r: 6; opacity: 0.5; }
  100% { r: 14; opacity: 0; }
}
.chart-endpoint-ring { animation: pulse-ring 1.8s ease-out infinite; }

/* Legacy (remove old hero-meta support) */
.hero-meta { display: none; }

/* Benchmark row (under chart) */
.benchmark-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px 20px;
}
.benchmark-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 8px 12px 8px 14px;
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  cursor: pointer; font-family: inherit; transition: opacity 0.1s;
}
.benchmark-pill:active { opacity: 0.6; }
.benchmark-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.benchmark-name { font-weight: 600; }
.benchmark-return { font-weight: 600; }
.benchmark-return.positive { color: var(--positive); }
.benchmark-return.negative { color: var(--negative); }
.benchmark-vs {
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 14px;
}
.benchmark-vs.ahead { background: rgba(46,204,113,0.15); color: var(--positive); }
.benchmark-vs.behind { background: rgba(245,158,11,0.15); color: #F59E0B; }

/* Bottom sheet (iOS action sheet) */
.sheet { position: fixed; inset: 0; z-index: 9999; pointer-events: none; visibility: hidden; }
.sheet.open { pointer-events: auto; visibility: visible; }
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.25s;
}
.sheet.open .sheet-backdrop { opacity: 1; }

.sheet-panel {
  position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 100%);
  width: 100%; max-width: 430px;
  background: var(--bg-surface);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  padding: 8px 0 32px;
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.35, 1);
  max-height: 80dvh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet.open .sheet-panel { transform: translate(-50%, 0); }
.sheet-handle {
  width: 40px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,0.25);
  margin: 6px auto 18px;
}
.sheet-title {
  font-size: 17px; font-weight: 700; padding: 0 20px 14px;
  letter-spacing: -0.2px;
}
.sheet-list { padding: 0 12px; }
.sheet-option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; background: none; border: none;
  padding: 14px 12px; border-radius: 14px;
  font-family: inherit; cursor: pointer; text-align: left;
  transition: background 0.12s;
}
.sheet-option:active { background: var(--bg-elevated); }
.sheet-option.selected { background: rgba(45,107,228,0.12); }
.sheet-option-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.sheet-option-info { flex: 1; min-width: 0; }
.sheet-option-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.sheet-option-sub { font-size: 12px; color: var(--text-secondary); }
.sheet-option-return {
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.sheet-option-return.positive { color: var(--positive); }
.sheet-option-return.negative { color: var(--negative); }
.sheet-check {
  color: var(--accent-blue); font-size: 18px; font-weight: 700; flex-shrink: 0;
}

/* Toggle row inside sheet (settings) */
.sheet-toggle-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
}
.sheet-toggle-row .sheet-option-icon svg { width: 22px; height: 22px; }

/* Section */
.section { padding: 0 20px; margin-bottom: 24px; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.section-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

/* Holdings bar */
.holding-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.holding-item:last-child { border-bottom: none; }
.holding-logo {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; overflow: hidden;
  background: var(--bg-elevated);
}
.holding-logo img { width: 100%; height: 100%; object-fit: cover; }
.holding-logo.fallback { background: var(--bg-elevated); color: var(--text-primary); }
.holding-bar-wrap { flex: 1; min-width: 0; }
.holding-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; }
.holding-weight { color: var(--text-secondary); font-size: 13px; }
.holding-bar { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.holding-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.holding-bar-fill.tech { background: #6366F1; }
.holding-bar-fill.health { background: #2ECC71; }
.holding-bar-fill.finance { background: #F59E0B; }
.holding-bar-fill.energy { background: #EF4444; }
.holding-bar-fill.consumer { background: #EC4899; }
.holding-bar-fill.default { background: var(--accent-blue); }
.holding-amount { font-size: 14px; font-weight: 600; text-align: right; min-width: 80px; }
.holding-amount-sub { font-size: 12px; color: var(--text-secondary); text-align: right; }

/* Sector pills */
.sector-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sector-pill {
  background: var(--bg-elevated); border-radius: 20px; padding: 8px 14px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.sector-pill span { color: var(--text-secondary); margin-left: 4px; }

/* Country row */
.country-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.country-flag { font-size: 24px; }
.country-info { flex: 1; }
.country-name { font-size: 14px; font-weight: 500; }
.country-bar { height: 4px; background: var(--bg-elevated); border-radius: 2px; margin-top: 4px; }
.country-bar-fill { height: 100%; background: var(--accent-blue); border-radius: 2px; transition: width 0.6s ease; }
.country-pct { font-size: 13px; color: var(--text-secondary); min-width: 40px; text-align: right; }

/* Fund card */
.fund-card {
  background: var(--bg-surface); border-radius: var(--radius-card);
  padding: 20px; margin-bottom: 12px; cursor: pointer;
  transition: transform 0.15s ease;
}
.fund-card:active { transform: scale(0.98); }
.fund-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.fund-card-name { font-size: 18px; font-weight: 700; }
.fund-card-company { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.fund-card-badges { display: flex; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-ask { background: var(--badge-bg); color: var(--badge-text); }
.badge-index { background: #1A2340; color: #7C8FFF; }
.badge-category { background: var(--bg-elevated); color: var(--text-secondary); }
.fund-card-stats {
  display: flex; gap: 16px; margin-bottom: 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.fund-stat { text-align: center; flex: 1; }
.fund-stat-value { font-size: 16px; font-weight: 700; }
.fund-stat-value.positive { color: var(--positive); }
.fund-stat-value.negative { color: var(--negative); }
.fund-stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.fund-card-holdings { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.fund-card-holdings strong { color: var(--text-primary); font-weight: 500; }
.fund-card-chevron { color: var(--accent-red); font-size: 20px; }

/* Asset bar (horizontal stacked) */
.asset-bar-container { margin: 16px 0; }
.asset-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.asset-bar-segment { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.asset-bar-segment.stock { background: var(--accent-blue); }
.asset-bar-segment.bond { background: #F59E0B; }
.asset-bar-segment.cash { background: var(--text-secondary); }
.asset-bar-legend { display: flex; gap: 16px; margin-top: 8px; }
.asset-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.asset-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Buy screen */
.buy-container { padding: 0 20px; }
.buy-fund-header {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-surface); border-radius: var(--radius-card);
  padding: 16px; margin-bottom: 24px;
}
.buy-fund-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--accent-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.buy-fund-name { font-size: 17px; font-weight: 600; }
.buy-fund-meta { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.input-group { margin-bottom: 20px; }
.input-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  color: var(--text-secondary); text-transform: uppercase; margin-bottom: 8px;
}
.input-field {
  width: 100%; background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius-input); padding: 14px 16px;
  font-size: 22px; font-weight: 600; color: var(--text-primary);
  outline: none; font-family: inherit; transition: border-color 0.2s;
}
.input-field:focus { border-color: var(--accent-blue); }
.input-field::placeholder { color: #3A4A65; font-weight: 400; }
.input-suffix {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--text-secondary); font-weight: 500; pointer-events: none;
}
.input-wrapper { position: relative; }

.quick-amounts {
  display: flex; gap: 8px; margin-bottom: 24px;
}
.quick-btn {
  flex: 1; background: var(--bg-elevated); border: 1.5px solid var(--border);
  border-radius: var(--radius-small); padding: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.quick-btn:active, .quick-btn.active { background: var(--accent-blue); border-color: var(--accent-blue); }

.select-field {
  width: 100%; background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius-input); padding: 14px 16px;
  font-size: 15px; color: var(--text-primary);
  outline: none; font-family: inherit; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23E8402A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  cursor: pointer;
}
.select-field option { background: var(--bg-surface); color: var(--text-primary); }

.recurring-toggle {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-surface); border-radius: var(--radius-card);
  padding: 16px; margin-bottom: 16px;
}
.recurring-label { font-size: 15px; font-weight: 500; }
.recurring-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.toggle {
  width: 52px; height: 30px; border-radius: 15px; background: var(--bg-elevated);
  border: none; cursor: pointer; position: relative; transition: background 0.2s;
}
.toggle.on { background: var(--positive); }
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: white;
  transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(22px); }

.recurring-options {
  background: var(--bg-surface); border-radius: var(--radius-card);
  padding: 16px; margin-bottom: 24px;
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s, margin 0.3s;
  padding: 0 16px; margin-bottom: 0;
}
.recurring-options.open { max-height: 200px; padding: 16px; margin-bottom: 24px; }

/* Primary button — iOS tactile */
.btn-primary {
  width: 100%; height: 54px; border-radius: 14px;
  background: var(--accent-blue); border: none;
  font-size: 17px; font-weight: 600; color: white;
  cursor: pointer; font-family: inherit; letter-spacing: -0.2px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.08s ease-out, opacity 0.08s, background 0.15s;
  will-change: transform;
}
.btn-primary:active { transform: scale(0.96); opacity: 0.85; }
.btn-primary:disabled { background: #2A3550; color: #5A6A85; cursor: not-allowed; }

.btn-secondary {
  width: 100%; height: 54px; border-radius: 14px;
  background: var(--bg-elevated); border: none;
  font-size: 17px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; font-family: inherit; letter-spacing: -0.2px;
  transition: transform 0.08s ease-out, opacity 0.08s;
}
.btn-secondary:active { transform: scale(0.96); opacity: 0.75; }

/* Info box */
.info-box {
  background: var(--info-bg); border: 1.5px solid var(--accent-blue);
  border-radius: var(--radius-input); padding: 14px 16px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
  margin-top: 16px;
}

/* Success screen */
.success-container { text-align: center; padding: 80px 40px 40px; }
.success-icon {
  width: 80px; height: 80px; border-radius: 50%; background: var(--positive);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; font-size: 36px;
}
.success-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.success-sub { font-size: 15px; color: var(--text-secondary); line-height: 1.5; }
.success-details {
  background: var(--bg-surface); border-radius: var(--radius-card);
  padding: 20px; margin: 32px 0; text-align: left;
}
.success-row { display: flex; justify-content: space-between; padding: 8px 0; }
.success-row-label { color: var(--text-secondary); font-size: 14px; }
.success-row-value { font-size: 14px; font-weight: 600; }

/* Package cards (Kron-inspired) */
.package-intro {
  padding: 0 20px 24px;
}
.package-intro-title { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.15; margin-bottom: 8px; }
.package-intro-sub { font-size: 15px; color: var(--text-secondary); line-height: 1.4; }

.package-card {
  background: var(--bg-surface); border-radius: 20px;
  padding: 24px; margin: 0 20px 12px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.12s ease-out, opacity 0.1s;
  will-change: transform;
}
.package-card:active { transform: scale(0.98); opacity: 0.85; }

.package-card-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.package-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.package-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.package-tagline { font-size: 14px; color: var(--text-secondary); margin-top: 2px; line-height: 1.35; }

.package-companies {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.package-logo-stack { display: flex; }
.package-logo-stack .holding-logo {
  width: 28px; height: 28px; border-radius: 8px; margin-left: -6px;
  border: 2px solid var(--bg-surface); box-sizing: content-box;
}
.package-logo-stack .holding-logo:first-child { margin-left: 0; }
.package-companies-text { font-size: 13px; color: var(--text-secondary); line-height: 1.3; }
.package-companies-text strong { color: var(--text-primary); font-weight: 500; }

.package-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.package-return { display: flex; align-items: baseline; gap: 6px; }
.package-return-value { font-size: 20px; font-weight: 700; color: var(--positive); }
.package-return-sub { font-size: 12px; color: var(--text-secondary); }
.package-cta-hint { font-size: 22px; color: var(--accent-red); }

/* Ask Bulder CTA */
.ask-divider {
  display: flex; align-items: center; gap: 14px; margin: 24px 20px 14px;
  font-size: 12px; color: var(--text-secondary); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase;
}
.ask-divider::before, .ask-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.ask-bulder {
  background: linear-gradient(135deg, #1A2744 0%, #0F1E35 100%);
  border: 1px solid rgba(124, 143, 255, 0.3);
  border-radius: 20px; padding: 20px 24px; margin: 0 20px 14px;
  cursor: pointer; position: relative;
}
.ask-bulder:active { transform: scale(0.985); }
.ask-bulder-icon { font-size: 22px; margin-bottom: 10px; }
.ask-bulder-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.ask-bulder-sub { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.ask-bulder-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ask-bulder-chip {
  font-size: 12px; padding: 6px 12px; border-radius: 20px;
  background: rgba(255,255,255,0.06); color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.08);
}

.all-funds-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px; margin: 8px 20px 20px;
  font-size: 14px; color: var(--text-secondary);
  border-top: 1px solid var(--border); cursor: pointer;
}
.all-funds-link:hover { color: var(--text-primary); }

/* Package detail header hero */
.package-hero {
  padding: 24px 20px;
  text-align: center;
}
.package-hero-icon {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #fff;
}
.package-hero-title { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 8px; }
.package-hero-tagline { font-size: 15px; color: var(--text-secondary); line-height: 1.4; max-width: 300px; margin: 0 auto; }

/* Horizon selector */
.horizon-selector {
  display: flex; background: var(--bg-surface); border-radius: 14px;
  padding: 4px; margin: 0 20px 20px;
}
.horizon-btn {
  flex: 1; background: none; border: none; color: var(--text-secondary);
  padding: 12px 8px; border-radius: 10px; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 500; transition: all 0.2s;
}
.horizon-btn.active {
  background: var(--bg-elevated); color: var(--text-primary); font-weight: 600;
}
.horizon-btn-sub { font-size: 11px; display: block; opacity: 0.7; margin-top: 2px; }

/* Ask Bulder chat screen */
.chat-messages {
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.chat-welcome {
  text-align: center; padding: 20px 0 40px;
}
.chat-welcome-icon {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #2D6BE4 0%, #6366F1 100%);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.chat-welcome-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.chat-welcome-sub { font-size: 14px; color: var(--text-secondary); line-height: 1.4; max-width: 300px; margin: 0 auto; }

.chat-suggestions-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px;
}
.chat-suggestion-chip {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; font-size: 13px; text-align: left;
  color: var(--text-primary); cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.chat-suggestion-chip:active { background: var(--bg-elevated); }

.chat-bubble {
  max-width: 82%; padding: 12px 16px; border-radius: 18px;
  font-size: 14.5px; line-height: 1.45; animation: bubbleIn 0.2s ease;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.chat-bubble.user {
  align-self: flex-end; color: white;
  background: linear-gradient(180deg, #3A7BFF 0%, #2D6BE4 100%);
  border-bottom-right-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}
.chat-bubble.assistant {
  align-self: flex-start; background: #2A3550; color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-typing {
  display: flex; gap: 4px; padding: 14px 16px; background: var(--bg-surface);
  border-radius: 18px; border-bottom-left-radius: 6px; align-self: flex-start;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-secondary);
  animation: typing 1.4s infinite; opacity: 0.4;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-suggestion-card {
  align-self: flex-start; max-width: 90%; width: 100%;
  background: var(--bg-surface); border-radius: 16px; padding: 14px;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.chat-suggestion-card:active { transform: scale(0.985); background: var(--bg-elevated); }
.chat-suggestion-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.chat-suggestion-card-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.chat-suggestion-card-name { font-size: 15px; font-weight: 600; flex: 1; }
.chat-suggestion-card-arrow { color: var(--accent-red); font-size: 18px; }
.chat-suggestion-card-reason { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* Chat input (flex child, sits at bottom of screen above tab bar) */
.chat-input-wrap {
  flex-shrink: 0;
  padding: 12px 16px 88px;
  background: var(--bg-primary);
  border-top: 0.5px solid rgba(255,255,255,0.06);
}
.chat-input-field {
  display: flex; gap: 8px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: 24px; padding: 6px 6px 6px 16px;
}
.chat-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 15px; font-family: inherit;
  padding: 10px 0; min-height: 24px;
}
.chat-input::placeholder { color: var(--text-secondary); }
.chat-send-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-blue);
  border: none; color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-family: inherit;
}
.chat-send-btn:disabled { background: var(--bg-elevated); color: var(--text-secondary); }

.chat-error {
  align-self: stretch; background: rgba(232, 64, 42, 0.1);
  border: 1px solid rgba(232, 64, 42, 0.3); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: #FF8A7A;
}

/* CTA bar — flex child outside scroll, sits above tab bar */
.sticky-cta {
  flex-shrink: 0;
  padding: 12px 16px 88px;
  background: linear-gradient(180deg, rgba(13,20,33,0) 0%, var(--bg-primary) 60%);
  margin-top: -32px; /* lift gradient over scrolling content */
  position: relative; z-index: 50;
  pointer-events: none;
}
.sticky-cta > * { pointer-events: auto; }
.sticky-cta.dual { display: flex; gap: 10px; }
.sticky-cta.dual > * { flex: 1; }

/* Bottom nav — iOS tab bar */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: rgba(13, 20, 33, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-around; padding: 6px 0 24px;
  z-index: 200;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--text-secondary);
  font-size: 10px; font-weight: 500; cursor: pointer; padding: 6px 12px;
  font-family: inherit; letter-spacing: 0.1px;
  transition: opacity 0.1s;
}
.nav-item:active { opacity: 0.5; }
.nav-item.active { color: #E8402A; }
.nav-item svg { width: 26px; height: 26px; }
.nav-item:not(.active) svg { stroke: var(--text-secondary); fill: none; }
.nav-item.active svg { fill: #E8402A; stroke: #E8402A; }

/* Scrollable fund list */
.fund-list { padding: 0 20px; }

/* My funds in portfolio */
.portfolio-fund {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--bg-surface); border-radius: var(--radius-card);
  margin-bottom: 8px; cursor: pointer;
}
.portfolio-fund:active { background: var(--bg-elevated); }
.portfolio-fund-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.portfolio-fund-info { flex: 1; }
.portfolio-fund-name { font-size: 15px; font-weight: 600; }
.portfolio-fund-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.portfolio-fund-value { text-align: right; }
.portfolio-fund-amount { font-size: 15px; font-weight: 600; }
.portfolio-fund-return { font-size: 13px; margin-top: 2px; }

/* Periodic order card */
.periodic-card {
  background: var(--bg-surface); border-radius: var(--radius-card);
  padding: 20px; margin-bottom: 12px;
}
.periodic-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.periodic-total { font-size: 22px; font-weight: 700; }
.periodic-badge { font-size: 12px; color: var(--positive); background: rgba(46,204,113,0.15); padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.periodic-item { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); }
.periodic-fund { font-size: 14px; font-weight: 500; }
.periodic-detail { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.periodic-amount { font-size: 14px; font-weight: 600; }

/* AI Insight card */
.insight-card {
  background: linear-gradient(135deg, #1A2744 0%, #0F1E35 100%);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-card); padding: 20px; margin: 0 20px 20px;
}
.insight-icon { font-size: 20px; margin-bottom: 8px; }
.insight-text { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.insight-text strong { color: var(--text-primary); font-weight: 600; }

/* Overlap indicator */
.overlap-warning {
  display: flex; align-items: flex-start; gap: 10px;
  background: #1A1F2E; border-radius: var(--radius-input);
  padding: 12px 14px; margin-top: 12px;
}
.overlap-warning-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.overlap-warning-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* ============================================
   NET WORTH SCREEN
   ============================================ */

.networth-hero {
  padding: 8px 20px 24px;
}
.networth-hero-label {
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  letter-spacing: 0.2px; margin-bottom: 8px;
}
.networth-hero-value {
  font-size: 44px; font-weight: 700; letter-spacing: -1.4px;
  line-height: 1.05; margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.networth-hero-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.networth-delta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
}
.networth-delta.positive { background: rgba(46,204,113,0.15); color: var(--positive); }
.networth-delta.negative { background: rgba(232,64,42,0.15); color: var(--negative); }
.networth-delta-period { font-size: 12px; color: var(--text-secondary); margin-left: 2px; opacity: 0.85; }

.streak-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 20px;
  background: linear-gradient(135deg, var(--streak-orange) 0%, var(--streak-red) 100%);
  font-size: 13px; font-weight: 700; color: white;
  box-shadow: 0 2px 12px rgba(232,64,42,0.25);
  border: none; cursor: pointer; font-family: inherit;
  transition: transform 0.1s, opacity 0.1s;
}
.streak-chip:active { transform: scale(0.95); opacity: 0.85; }
.streak-chip-icon { font-size: 14px; line-height: 1; }

/* Streak sheet content */
.streak-sheet-hero {
  text-align: center; padding: 16px 20px 8px;
}
.streak-sheet-flame {
  width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--streak-orange) 0%, var(--streak-red) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 28px rgba(232,64,42,0.35);
}
.streak-sheet-number {
  font-size: 64px; font-weight: 800; letter-spacing: -2.5px; line-height: 1;
  background: linear-gradient(135deg, var(--streak-orange) 0%, var(--streak-red) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
}
.streak-sheet-label {
  font-size: 14px; color: var(--text-secondary); margin-top: 4px;
  letter-spacing: 0.3px;
}
.streak-sheet-message {
  text-align: center; padding: 12px 28px 24px;
  font-size: 15px; line-height: 1.5; color: var(--text-secondary);
}
.streak-sheet-message strong { color: var(--text-primary); font-weight: 600; }

.streak-sheet-section {
  background: var(--bg-elevated); border-radius: 16px;
  margin: 0 16px 18px; padding: 18px 16px;
}
.streak-sheet-section-title {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 14px;
}
.streak-sheet-bars {
  display: flex; gap: 5px; align-items: flex-end;
  height: 64px; margin-bottom: 12px;
}
.streak-bar-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 6px; min-width: 0;
}
.streak-bar {
  width: 100%; max-width: 18px; border-radius: 4px;
  height: 36px;
}
.streak-bar.positive {
  background: linear-gradient(180deg, var(--streak-orange) 0%, var(--streak-red) 100%);
  height: 44px;
  box-shadow: 0 2px 8px rgba(232,64,42,0.25);
}
.streak-bar.negative {
  background: var(--bg-surface);
  border: 1px dashed rgba(255,255,255,0.15);
  height: 14px;
}
.streak-bar-label {
  font-size: 10px; color: var(--text-secondary); font-weight: 500;
  text-transform: lowercase;
}
.streak-sheet-stat {
  text-align: center; font-size: 13px; color: var(--text-primary);
  font-weight: 600; padding-top: 6px;
}

/* Period selector — reuses time-range-pill, but as a row */
.period-row {
  display: flex; gap: 6px; padding: 0 20px 16px;
}
.period-btn {
  flex: 1; background: var(--bg-surface); border: none;
  padding: 10px 8px; border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.period-btn.active {
  background: var(--bg-elevated); color: var(--text-primary);
}
.period-btn:active { opacity: 0.7; }

/* Period row inside chart card (Nordnet-style) */
.chart-period-row {
  display: flex; gap: 4px; padding: 16px 16px 4px;
}
.chart-period-btn {
  flex: 1; background: transparent; border: none;
  padding: 9px 6px; border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.chart-period-btn.active {
  background: var(--bg-elevated); color: var(--text-primary);
}
.chart-period-btn:active { opacity: 0.7; }

/* Chart options button (overflow ⋯ in chart-card top-right) */
.chart-options-btn {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  transition: background 0.15s;
}
.chart-options-btn:active { background: rgba(255,255,255,0.12); }
.chart-options-btn svg { width: 22px; height: 22px; }

/* Chart options sheet sections */
.chart-opt-section { padding: 0 20px 18px; }
.chart-opt-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.8px;
  color: var(--text-secondary); text-transform: uppercase;
  margin-bottom: 10px;
}
.segmented {
  display: flex; background: var(--bg-elevated);
  border-radius: 12px; padding: 4px; gap: 2px;
}
.segmented button {
  flex: 1; background: none; border: none; padding: 10px;
  border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.segmented button.active {
  background: var(--bg-surface); color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.chart-opt-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-elevated); border-radius: 14px;
  padding: 14px 16px;
}
.chart-opt-row-title { font-size: 15px; font-weight: 600; }
.chart-opt-row-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Chart card container */
.networth-chart-card {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 14px; padding: 0 0 12px;
  position: relative; overflow: hidden;
}
.chart-card-hero {
  padding: 24px 24px 16px;
}
.chart-card-label {
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.chart-card-value {
  font-size: 38px; font-weight: 700;
  letter-spacing: -1.2px; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.chart-card-delta {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
}
.chart-card-delta.positive { background: rgba(46,204,113,0.15); color: var(--positive); }
.chart-card-delta.negative { background: rgba(245,158,11,0.15); color: #F59E0B; }
.chart-card-delta-period {
  font-size: 12px; color: var(--text-secondary); font-weight: 500;
  margin-left: 6px; opacity: 0.85;
}
/* Reusable line chart */
.line-chart {
  position: relative; height: 200px; margin: 0;
}
.line-chart svg { display: block; width: 100%; height: 100%; }
/* Legacy stacked chart class kept for safety */
.networth-chart {
  position: relative; height: 200px;
}
.networth-chart svg { display: block; width: 100%; height: 100%; }

.networth-chart-legend {
  display: flex; justify-content: center; gap: 18px;
  padding: 10px 16px 0;
}
.legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary); font-weight: 500;
}
.legend-dot {
  width: 9px; height: 9px; border-radius: 50%;
}

/* Stack-mode toggle (segmented control) */
.stack-toggle {
  display: flex; background: var(--bg-elevated); border-radius: 10px;
  padding: 3px; margin: 8px 16px 0;
}
.stack-toggle button {
  flex: 1; background: none; border: none; padding: 8px;
  border-radius: 8px; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.stack-toggle button.active {
  background: var(--bg-surface); color: var(--text-primary);
}

/* Delta breakdown card (Siste måned) */
.delta-card {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 14px; padding: 20px;
}
.delta-card-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.delta-card-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.delta-card-amount {
  font-size: 26px; font-weight: 700; color: var(--positive);
  font-variant-numeric: tabular-nums; letter-spacing: -0.5px;
}
.delta-card-amount.negative { color: var(--negative); }
.delta-card.clickable { cursor: pointer; transition: transform 0.1s, opacity 0.1s; }
.delta-card.clickable:active { transform: scale(0.985); opacity: 0.85; }

/* Compact streak + months link card (combined trigger) */
.streak-mini {
  display: flex; align-items: center; gap: 14px;
  margin: 0 20px 14px; padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,138,61,0.16) 0%, rgba(232,64,42,0.08) 100%);
  border: 1px solid rgba(255,138,61,0.22);
  border-radius: 16px; cursor: pointer;
  transition: transform 0.1s, opacity 0.1s;
}
.streak-mini:active { transform: scale(0.985); opacity: 0.85; }
.streak-mini-flame {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--streak-orange) 0%, var(--streak-red) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 3px 10px rgba(232,64,42,0.3);
}
.streak-mini-body { flex: 1; min-width: 0; }
.streak-mini-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.streak-mini-headline {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.1px;
}
.streak-mini-link {
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
}
.streak-mini-link span { color: var(--accent-red); font-weight: 600; margin-left: 2px; }
.streak-mini-bars {
  display: flex; gap: 3px;
}
.streak-mini-bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.08);
}
.streak-mini-bar.positive {
  background: linear-gradient(90deg, var(--streak-orange) 0%, var(--streak-red) 100%);
}

/* Standalone month-link card (when no streak) */
.month-link-card {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 20px 14px; padding: 16px 20px;
  background: var(--bg-surface); border-radius: 16px;
  font-size: 14px; font-weight: 500; color: var(--text-primary);
  cursor: pointer; transition: transform 0.1s, opacity 0.1s;
}
.month-link-card:active { transform: scale(0.985); opacity: 0.85; }
.month-link-arrow { color: var(--accent-red); font-size: 18px; font-weight: 600; }

/* Months screen */
.months-streak-card {
  margin: 4px 20px 16px;
  background: linear-gradient(135deg, rgba(255,138,61,0.18) 0%, rgba(232,64,42,0.10) 100%);
  border: 1px solid rgba(255,138,61,0.25);
  border-radius: 20px; padding: 18px 18px 16px;
  cursor: pointer; transition: transform 0.1s, opacity 0.1s;
}
.months-streak-card:active { transform: scale(0.985); opacity: 0.85; }

.months-streak-card {
  display: grid; grid-template-columns: 56px 1fr;
  grid-template-areas: "flame info" "bars bars";
  gap: 14px 14px;
}
.months-streak-flame {
  grid-area: flame;
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--streak-orange) 0%, var(--streak-red) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(232,64,42,0.35);
}
.months-streak-info { grid-area: info; align-self: center; }
.months-streak-headline {
  font-size: 17px; font-weight: 700; letter-spacing: -0.2px;
  color: var(--text-primary);
}
.months-streak-sub {
  font-size: 13px; color: var(--text-secondary); margin-top: 2px;
}
.months-streak-bars {
  grid-area: bars;
  display: flex; gap: 5px; padding-top: 6px;
}
.months-streak-bar {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--bg-elevated);
}
.months-streak-bar.positive {
  background: linear-gradient(90deg, var(--streak-orange) 0%, var(--streak-red) 100%);
}

.months-hero {
  padding: 4px 20px 24px;
}
.months-hero-stats {
  display: flex; flex-direction: column; gap: 12px;
}
.months-stat {
  background: var(--bg-surface); border-radius: 16px;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.months-stat-year {
  font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.months-stat-total {
  font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.months-stat-total.positive { color: var(--positive); }
.months-stat-total.negative { color: var(--negative); }
.months-stat-sub {
  font-size: 12px; color: var(--text-secondary); margin-top: 2px;
}
.months-stat > div:first-child { display: flex; flex-direction: column; }
.months-stat > div:last-child { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }

.delta-rows { display: flex; flex-direction: column; gap: 4px; }
.delta-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.delta-row:last-child { border-bottom: none; }
.delta-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.delta-row-label { flex: 1; font-size: 14px; color: var(--text-primary); font-weight: 500; }
.delta-row-amount {
  font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.delta-row-amount.positive { color: var(--positive); }
.delta-row-amount.negative { color: var(--negative); }
.delta-row-amount.neutral { color: var(--text-secondary); }

/* Streak card — dedicated motivational block */
.streak-card {
  background: linear-gradient(135deg, rgba(255,138,61,0.18) 0%, rgba(232,64,42,0.10) 100%);
  border: 1px solid rgba(255,138,61,0.25);
  border-radius: 20px; margin: 0 20px 14px; padding: 22px 20px;
}
.streak-card-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.streak-card-flame {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--streak-orange) 0%, var(--streak-red) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(232,64,42,0.35);
}
.streak-card-text { flex: 1; }
.streak-card-headline {
  font-size: 17px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.2px;
}
.streak-card-sub {
  font-size: 13px; color: var(--text-secondary); margin-top: 2px;
  line-height: 1.4;
}
.streak-dots {
  display: flex; gap: 6px; padding-top: 4px;
}
.streak-dot {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--bg-elevated);
}
.streak-dot.positive {
  background: linear-gradient(180deg, var(--streak-orange) 0%, var(--streak-red) 100%);
}

/* Composition section (right now) */
.composition-card {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 14px; padding: 20px;
}
.composition-bar {
  display: flex; height: 12px; border-radius: 6px; overflow: hidden;
  margin: 8px 0 18px; gap: 2px;
}
.composition-segment {
  height: 100%; transition: flex-grow 0.4s ease;
}
.composition-segment.home { background: var(--networth-home); }
.composition-segment.savings { background: var(--networth-savings); }
.composition-segment.funds { background: var(--networth-funds); }

.composition-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.composition-row:last-child { border-bottom: none; }
.composition-row.clickable { cursor: pointer; transition: opacity 0.1s; margin: 0 -20px; padding: 12px 20px; border-radius: 12px; }
.composition-row.clickable:active { opacity: 0.6; background: var(--bg-elevated); }
.composition-row.clickable:not(:last-child) { border-bottom: 1px solid var(--border); border-radius: 0; }
.composition-chevron {
  color: var(--accent-red); font-size: 20px; font-weight: 600;
  margin-left: 4px; opacity: 0.85;
}
.composition-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: white;
}
.composition-icon.home { background: var(--networth-home); }
.composition-icon.savings { background: var(--networth-savings); color: #1A1206; }
.composition-icon.funds { background: var(--networth-funds); }
.composition-icon svg { width: 22px; height: 22px; }
.composition-info { flex: 1; min-width: 0; }
.composition-name { font-size: 15px; font-weight: 600; }
.composition-pct { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.composition-amount {
  font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Monthly drill-down list */
.month-list {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 14px; padding: 8px 20px;
}
.month-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: opacity 0.1s;
}
.month-row:last-child { border-bottom: none; }
.month-row:active { opacity: 0.6; }
.month-row-name {
  font-size: 14px; font-weight: 500; color: var(--text-primary);
}
.month-row-right {
  display: flex; align-items: center; gap: 10px;
}
.month-row-amount {
  font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.month-row-amount.positive { color: var(--positive); }
.month-row-amount.negative { color: var(--negative); }
.month-row-chevron { color: var(--accent-red); font-size: 16px; opacity: 0.6; }

/* Rate chip (savings hero) */
.rate-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px;
  background: rgba(245,200,66,0.18); color: var(--networth-savings);
  font-size: 13px; font-weight: 700;
  border: 1px solid rgba(245,200,66,0.25);
}
.rate-chip-icon { font-size: 13px; }

/* Interest card (savings) */
.interest-card {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 14px; padding: 8px 20px;
}
.interest-card-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.interest-card-row:last-child { border-bottom: none; }
.interest-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(46,204,113,0.15); color: var(--positive);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.interest-icon svg { width: 22px; height: 22px; }
.interest-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.interest-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.interest-amount {
  font-size: 17px; font-weight: 700; color: var(--positive);
  font-variant-numeric: tabular-nums;
}

/* Bolig screen */
.bolig-card {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 14px; padding: 22px 20px;
}
.bolig-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; font-size: 14px;
}
.bolig-row-label { color: var(--text-secondary); }
.bolig-row-value { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.bolig-row-value.positive { color: var(--positive); }
.bolig-equity-bar-card {
  background: var(--bg-surface); border-radius: 20px;
  margin: 0 20px 14px; padding: 22px 20px;
}

/* Section title used in net worth */
.nw-section-title {
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 0 28px 10px; margin-top: 8px;
}

/* Responsive */
@media (max-width: 380px) {
  .hero-value { font-size: 30px; }
  .quick-btn { font-size: 13px; padding: 8px; }
  .networth-hero-value { font-size: 36px; }
}
