:root {
  --realty:      #C2562F;
  --realty-d:    #A0451F;
  --realty-soft: rgba(194, 86, 47, .12);
  --re-green:      #2E9D58;
  --re-green-soft: rgba(46, 157, 88, .10);
  --re-amber:      #E08A1F;
}

/* ── Page wrapper ────────────────────────────────────────────────────────── */
.re-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 32px 80px;
}

/* ── Draft notice ────────────────────────────────────────────────────────── */
.re-draft-notice {
  background: var(--ink);
  color: var(--bg);
  padding: 14px 32px;
  font: 500 13px/1.5 'Manrope', sans-serif;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.re-draft-notice__tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #E0A752;
  padding: 3px 10px;
  border: 1px solid #2A2823;
  border-radius: 999px;
  flex: none;
}
.re-draft-notice__text { margin: 0; color: #B0AB9A; max-width: 1020px; }
.re-draft-notice__text b { color: var(--bg); }

/* ── Shared button ────────────────────────────────────────────────────────── */
.re-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font: 600 13px 'Manrope', sans-serif;
  cursor: pointer;
  border: 0;
}
.re-btn--dark  { background: var(--ink); color: var(--bg); }
.re-btn--ghost { background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line); }

/* ── Hero card ────────────────────────────────────────────────────────────── */
.re-hero {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 38px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  box-shadow: 0 1px 0 rgba(21,20,15,.02), 0 24px 48px -32px rgba(21,20,15,.18);
}
.re-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-elev);
}
.re-hero__pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--realty); }
.re-hero__label { font-size: 13px; color: var(--ink-3); font-weight: 500; margin: 24px 0 6px; }
.re-hero__value {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 60px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: .95;
  color: var(--ink);
}
.re-hero__value-currency { font-size: 32px; color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.re-hero__subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 15px;
  color: var(--ink-3);
  margin-top: 10px;
}
.re-hero__stats { display: flex; gap: 0; margin: 22px 0 26px; flex-wrap: wrap; }
.re-hero__stat  { padding-right: 22px; margin-right: 22px; border-right: 1px solid var(--line); }
.re-hero__stat:last-child { border-right: 0; }
.re-hero__stat-label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.re-hero__stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-top: 3px;
}
.re-hero__stat-value--positive { color: var(--re-green); }
.re-hero__actions { display: flex; gap: 10px; }
.re-hero__grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Metric card (hero grid) ─────────────────────────────────────────────── */
.re-metric {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.re-metric__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.re-metric__label  { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.re-metric__badge  {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
}
.re-metric__badge--positive { background: var(--re-green-soft); color: var(--re-green); }
.re-metric__badge--cap      { background: var(--realty-soft);   color: var(--realty-d); }
.re-metric__value {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  margin: 14px 0 8px;
}
.re-metric__value--positive { color: var(--re-green); }
.re-metric__desc     { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.re-metric__desc b   { color: var(--ink-2); }

/* ── Section header ──────────────────────────────────────────────────────── */
.re-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 44px 0 22px;
}
.re-section-title {
  margin: 0;
  line-height: 1;
}
.re-section-title em { font-style: italic; color: var(--ink-3); font-weight: 500; }
.re-head-actions { display: flex; gap: 8px; align-items: center; }
.re-seg {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.re-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border: 0;
  background: none;
  cursor: pointer;
  transition: background .1s, color .1s;
}
.re-seg__btn--active { background: var(--ink); color: #F4F1EA; }
.re-holdings-count {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  opacity: .75;
}

/* ── Panel ───────────────────────────────────────────────────────────────── */
.re-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.re-panel__header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.re-panel__header h3 {
  margin: 0 0 3px;
}
.re-panel__header h3 em { font-style: italic; color: var(--ink-3); font-weight: 500; }
.re-panel__desc { font-size: 12px; color: var(--ink-3); margin: 0; }

/* ── Segment toggle ──────────────────────────────────────────────────────── */
.re-seg-toggle {
  display: flex;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}
.re-seg-toggle__btn { padding: 6px 11px; color: var(--ink-3); border: 0; background: none; cursor: pointer; }
.re-seg-toggle__btn--active { background: var(--ink); color: var(--bg); }

/* ── Objects table ───────────────────────────────────────────────────────── */
.re-objects { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }

.re-objects__head,
.re-objects__row {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 0.9fr 1.1fr 0.7fr;
  gap: 16px;
  padding: 15px 24px;
  align-items: center;
}
.re-objects__head {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.re-objects__row {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  transition: background .12s;
}
.re-objects__row:last-of-type { border-bottom: 0; }
.re-objects__row:hover        { background: var(--bg-elev); }

.re-objects__cell--right {
  text-align: right;
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-weight: 500;
}
.re-objects__name { display: flex; align-items: center; gap: 12px; }
.re-objects__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 17px;
  background: var(--realty-soft);
}
.re-objects__name-text { display: flex; flex-direction: column; gap: 5px; }
.re-objects__name-text b { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1; }
.re-objects__name-type {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.re-objects__money { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.re-objects__money-usd {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-weight: 600;
  font-size: 14px;
}
.re-objects__money-uah {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 11px;
  color: var(--ink-3);
}
.re-objects__profit {
  color: var(--re-green);
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-weight: 600;
  text-align: right;
}
.re-objects__roi {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--realty-d);
  text-align: right;
}
.re-objects__muted { color: var(--ink-3); font-weight: 500; text-align: right; }

.re-objects__foot {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 0.9fr 1.1fr 0.7fr;
  gap: 16px;
  padding: 15px 24px;
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.re-objects__foot-label  { color: var(--ink-3); font-weight: 500; }
.re-objects__foot-total  { text-align: right; font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; }
.re-objects__foot-profit { text-align: right; font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; color: var(--re-green); }
.re-objects__foot-roi    { text-align: right; font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; color: var(--realty-d); }

.re-objects__add-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  color: var(--ink-3);
  font-size: 13px;
  border-top: 1px dashed var(--line);
  cursor: pointer;
}
.re-objects__add-row:hover { background: var(--bg-elev); }
.re-objects__add-row b    { color: var(--ink); font-weight: 600; }
.re-objects__add-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  flex: none;
}

/* ── Income sources (dark) ───────────────────────────────────────────────── */
.re-income {
  margin-top: 18px;
  background: var(--ink);
  border-radius: 20px;
  padding: 34px 38px;
  color: var(--bg);
}
.re-income__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.re-income__header h2 {
  margin: 0 0 6px;
  color: var(--bg);
}
.re-income__header h2 em { font-style: italic; color: #E0A752; }
.re-income__header p { margin: 0; font-size: 13px; color: #B0AB9A; max-width: 560px; line-height: 1.55; }
.re-income__tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #E0A752;
  padding: 5px 12px;
  border: 1px solid #2A2823;
  border-radius: 999px;
  flex: none;
}
.re-income__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.re-source { background: #1E1C16; border: 1px solid #2A2823; border-radius: 14px; padding: 24px; }
.re-source__title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.re-source__number {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  background: var(--realty);
  color: #fff;
  flex: none;
}
.re-source__title b  { font-size: 15px; font-weight: 600; color: var(--bg); }
.re-source__desc     { margin: 0 0 16px; font-size: 12.5px; color: #B0AB9A; line-height: 1.5; }
.re-source__formula  {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #E0A752;
  background: #15140F;
  border: 1px solid #2A2823;
  border-radius: 9px;
  padding: 11px 13px;
  line-height: 1.5;
}
.re-source__formula-op { color: #7A756A; }

/* ── Object profile ──────────────────────────────────────────────────────── */
.re-profile { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; }
.re-profile__data { display: flex; flex-direction: column; gap: 0; }
.re-profile__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-2, var(--line));
}
.re-profile__line:last-child { border-bottom: 0; }
.re-profile__line-label { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.re-profile__line-value {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}
.re-profile__line-value--text { font-family: 'Manrope', sans-serif; }

.re-chip {
  display: inline-flex;
  align-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
}
.re-chip--own  { background: var(--re-green-soft); color: var(--re-green); }
.re-chip--type { background: var(--realty-soft);   color: var(--realty-d); }

/* ── KPI bridge ──────────────────────────────────────────────────────────── */
.re-kpi-bridge { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.re-kpi-bridge__end   { flex: 1; text-align: center; }
.re-kpi-bridge__label { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.re-kpi-bridge__value {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 5px;
  letter-spacing: -0.01em;
}
.re-kpi-bridge__arrow { font-size: 22px; color: var(--realty); flex: none; }

/* ── KPI breakdown list ──────────────────────────────────────────────────── */
.re-kpi-list { display: flex; flex-direction: column; gap: 0; }
.re-kpi-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2, var(--line));
}
.re-kpi-item:last-of-type { border-bottom: 0; }
.re-kpi-item__name { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); font-weight: 500; }
.re-kpi-item__swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.re-kpi-item__amount {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.re-kpi-item__amount--positive { color: var(--re-green); }
.re-kpi-item__percent {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 12px;
  color: var(--ink-3);
  min-width: 48px;
  text-align: right;
}
.re-kpi-item--total { margin-top: 6px; padding-top: 13px; border-top: 1px solid var(--line); border-bottom: 0; }
.re-kpi-item--total .re-kpi-item__name   { font-weight: 700; }
.re-kpi-item--total .re-kpi-item__amount { font-size: 19px; color: var(--re-green); }

.re-roi-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  background: var(--realty-soft);
  border: 1px solid rgba(194, 86, 47, .22);
  border-radius: 10px;
  padding: 11px 15px;
  font-size: 12.5px;
  color: var(--ink-2);
  width: 100%;
  box-sizing: border-box;
}
.re-roi-badge b        { font-family: 'Space Grotesk', sans-serif; color: var(--realty-d); font-size: 16px; }
.re-roi-badge__apy     { margin-left: auto; }
.re-roi-badge__apy b   { font-size: 13px; }

/* ── Charts ──────────────────────────────────────────────────────────────── */
.re-charts-row           { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
.re-charts-row--secondary { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-top: 18px; }

.re-legend { display: flex; gap: 18px; margin-bottom: 14px; }
.re-legend__item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.re-legend__line { width: 16px; height: 3px; border-radius: 2px; }

.re-linechart svg  { display: block; width: 100%; height: 240px; }
.re-linechart__axis {
  display: flex;
  justify-content: space-between;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 10px;
}

.re-stack__total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.re-stack__total-value {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 30px;
  font-weight: 600;
  color: var(--re-green);
  letter-spacing: -0.02em;
}
.re-stack__total-label { font-size: 12px; color: var(--ink-3); }

.re-stack__bar {
  display: flex;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line-2, var(--line));
  margin-bottom: 16px;
}
.re-stack__bar-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.re-stack__list { display: flex; flex-direction: column; gap: 0; }
.re-stack__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2, var(--line));
  font-size: 13px;
}
.re-stack__item:last-child { border-bottom: 0; }
.re-stack__item-swatch  { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.re-stack__item-name    { color: var(--ink-2); font-weight: 500; }
.re-stack__item-percent { margin-left: auto; font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; color: var(--ink-3); font-weight: 600; width: 42px; text-align: right; }
.re-stack__item-amount  { font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; color: var(--ink); font-weight: 600; width: 78px; text-align: right; }
.re-stack__item-amount--muted { color: var(--ink-3); }

/* ── Bar chart (yearly) ──────────────────────────────────────────────────── */
.re-barchart { display: flex; align-items: flex-end; gap: 18px; height: 200px; padding-top: 10px; }
.re-barchart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  justify-content: flex-end;
}
.re-barchart__bar {
  width: 100%;
  max-width: 64px;
  border-radius: 8px 8px 0 0;
  background: var(--realty);
  position: relative;
  transition: height .3s;
}
.re-barchart__bar-rent {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--re-amber);
}
.re-barchart__value { font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; font-size: 13px; font-weight: 600; color: var(--ink); }
.re-barchart__year  { font-family: 'Space Grotesk', sans-serif; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.re-barchart__col--ytd .re-barchart__bar { opacity: .55; }

/* ── Donut ───────────────────────────────────────────────────────────────── */
.re-donut { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.re-donut__chart { position: relative; width: 172px; height: 172px; }
.re-donut__chart svg { transform: rotate(-90deg); }
.re-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.re-donut__center-value { font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1; }
.re-donut__center-label { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.re-donut__legend { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.re-donut__legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.re-donut__legend-swatch  { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.re-donut__legend-name    { color: var(--ink-2); font-weight: 500; }
.re-donut__legend-percent { margin-left: auto; font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; font-weight: 600; color: var(--ink); }
.re-donut__legend-amount  { font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; font-size: 11px; color: var(--ink-3); width: 64px; text-align: right; }

/* ── Metrics grid ────────────────────────────────────────────────────────── */
.re-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.re-metric-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; }
.re-metric-card__label   { font-size: 12px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.re-metric-card__value   { font-family: 'Space Grotesk', sans-serif; font-feature-settings: 'tnum' 1; font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; margin-top: 10px; line-height: 1; }
.re-metric-card__value--positive { color: var(--re-green); }
.re-metric-card__note    { font-size: 11px; color: var(--ink-3); margin-top: 6px; line-height: 1.4; }
.re-metric-card__formula { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--realty-d); margin-top: 7px; }
.re-apy-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 700;
  background: var(--realty-soft);
  color: var(--realty-d);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ── Open questions ──────────────────────────────────────────────────────── */
.re-questions { margin-top: 36px; padding: 28px 32px; background: var(--bg-elev); border: 1px dashed var(--line); border-radius: 14px; }
.re-questions h3 { margin: 0 0 12px; }
.re-questions ul { margin: 0; padding: 0 0 0 18px; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.re-questions ul li b { color: var(--ink); }

/* ── Modal overlay ───────────────────────────────────────────────────────── */
.re-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 20, 15, .46);
  backdrop-filter: blur(2px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 44px 20px;
  overflow-y: auto;
  z-index: 50;
}
.re-overlay--open { display: flex; }
.re-modal {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  width: 780px;
  max-width: 100%;
  box-shadow: 0 40px 80px -30px rgba(21, 20, 15, .4);
  overflow: hidden;
}
.re-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 16px; }
.re-modal__head h3 { margin: 0 0 4px; }
.re-modal__head p  { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; max-width: 460px; }
.re-modal__close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.re-modal__body { padding: 6px 28px 8px; }
.re-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  margin-top: 18px;
}

/* Modal layout */
.re-modal__wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }

/* Mode tabs */
.re-mode-tabs {
  display: flex;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 5px;
  gap: 5px;
  margin-bottom: 20px;
}
.re-mode-tabs__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 8px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}
.re-mode-tabs__btn b    { font: 600 14px 'Manrope', sans-serif; color: var(--ink-2); }
.re-mode-tabs__btn span { font-size: 11px; color: var(--ink-3); }
.re-mode-tabs__btn--active { background: var(--bg-card); box-shadow: 0 1px 0 rgba(21,20,15,.04), 0 8px 18px -12px rgba(21,20,15,.25); }
.re-mode-tabs__btn--active b { color: var(--realty-d); }

/* Form fields */
.re-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.re-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.re-field label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.re-form-grid .re-field { margin-bottom: 0; }
.re-input,
.re-select {
  font: 500 14px 'Manrope', sans-serif;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
}
.re-input:focus,
.re-select:focus { outline: 2px solid var(--realty-soft); border-color: var(--realty); }

.re-input-suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-elev); overflow: hidden; }
.re-input-suffix:focus-within { outline: 2px solid var(--realty-soft); border-color: var(--realty); }
.re-input-suffix .re-input { border: 0; border-radius: 0; background: none; }
.re-input-suffix .re-input:focus { outline: 0; }
.re-input-suffix__label { padding: 0 14px; font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: var(--ink-3); font-weight: 600; flex: none; }
.re-mode-fields[hidden] { display: none; }

/* Live readout */
.re-readout {
  background: var(--realty-soft);
  border: 1px solid rgba(194, 86, 47, .26);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}
.re-readout__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.re-readout__title  { font-size: 12px; color: var(--realty-d); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.re-readout__dot    { width: 8px; height: 8px; border-radius: 50%; background: var(--realty); }
.re-readout__badge  {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  padding: 3px 8px;
  border-radius: 6px;
}
.re-readout__big {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--realty-d);
}
.re-readout__big--positive { color: var(--re-green); }
.re-readout__big-label { font-size: 12px; color: var(--ink-2); margin-top: 6px; font-weight: 500; }
.re-readout__rows { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 0; }
.re-readout__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(194, 86, 47, .16);
}
.re-readout__row:last-child { border-bottom: 0; }
.re-readout__row-label { font-size: 12.5px; color: var(--ink-2); }
.re-readout__row-value {
  font-family: 'Space Grotesk', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.re-readout__row-value--positive { color: var(--re-green); }

/* ── Updated objects table grid (7 cols: + actions) ─────────────────────── */
.re-objects__head,
.re-objects__row {
  grid-template-columns: 1.7fr 1fr 1fr 0.9fr 1.1fr 0.7fr 0.55fr;
}
.re-objects__foot {
  grid-template-columns: 1.7fr 1fr 1fr 0.9fr 1.1fr 0.7fr 0.55fr;
}
.re-objects__profit--positive { color: var(--re-green); }

/* ── Row actions ──────────────────────────────────────────────────────────── */
.re-objects__actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.re-objects__btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-3);
  cursor: pointer;
  font-size: 12px;
  display: grid;
  place-items: center;
  transition: background .1s, color .1s;
}
.re-objects__btn:hover { background: var(--ink); color: var(--bg); }
.re-objects__btn--delete:hover { background: #D33; color: #fff; }
.re-objects__btn--rent:hover   { background: var(--realty); color: #fff; }


/* ── Empty state ──────────────────────────────────────────────────────────── */
.re-empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}

/* ── Chip: sold ───────────────────────────────────────────────────────────── */
.re-chip--sold { background: rgba(180,0,0,.10); color: #B40000; }

/* ── Login gate ───────────────────────────────────────────────────────────── */
.re-login-gate {
  padding: 80px 32px;
  text-align: center;
  color: var(--ink-3);
  font-size: 16px;
}

/* ── Modal error ──────────────────────────────────────────────────────────── */
.re-modal__error {
  margin: 0 28px 4px;
  padding: 10px 14px;
  background: rgba(180,0,0,.08);
  border: 1px solid rgba(180,0,0,.20);
  border-radius: 9px;
  font-size: 13px;
  color: #B40000;
}

/* ── Chart canvas wrappers ────────────────────────────────────────────────── */
.re-canvas-wrap { position: relative; height: 240px; }
/* Chart.js manages canvas px dimensions itself — no CSS overrides or it blurs */
.re-donut__chart canvas { display: block; }

/* ── Sell fields separator ────────────────────────────────────────────────── */
#re-sell-fields { margin-top: 4px; }

/* ── Remove old questions section (now gone from template) ────────────────── */
.re-questions { display: none; }

/* ── Sub-section header (Динаміка / Метрики) ─────────────────────────────── */
.re-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 16px;
}
.re-section-header h2 {
  margin: 0;
}
.re-section-header h2 em { font-style: italic; color: var(--ink-3); font-weight: 500; }
.re-section-header__note { font-size: 12px; color: var(--ink-3); flex: none; }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1100px: Charts stack to single column ───────────────────────────────── */
@media (max-width: 1100px) {
  .re-charts-row,
  .re-charts-row--secondary { grid-template-columns: 1fr; }
}

/* ── 768px: Tablet ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .re-page { padding: 20px 20px 64px; }

  /* Hero */
  .re-hero { grid-template-columns: 1fr; gap: 22px; padding: 26px 26px; }
  .re-hero__value { font-size: 46px; }
  .re-hero__grid  { grid-template-columns: 1fr 1fr; }

  /* Section titles */
  .re-block-head    { flex-direction: column; align-items: flex-start; gap: 14px; margin: 32px 0 18px; }
  .re-section-title { font-size: 36px; }
  .re-section-header { margin: 28px 0 14px; }
  .re-section-header h2 { font-size: 22px; }

  /* Objects table: hide Rent column (4th child) → 6 visible cols */
  .re-objects__head,
  .re-objects__row,
  .re-objects__foot { grid-template-columns: 1.5fr 1fr 1fr 1.1fr 0.7fr 0.5fr; }
  .re-objects__head > :nth-child(4),
  .re-objects__row  > :nth-child(4),
  .re-objects__foot > :nth-child(4) { display: none; }

  /* Income */
  .re-income { padding: 26px 24px; }
  .re-income__grid { grid-template-columns: 1fr; }

  /* Metrics */
  .re-metrics { grid-template-columns: repeat(2, 1fr); }

  /* Modal */
  .re-overlay { padding: 20px 16px; }
  .re-modal   { width: 100%; }
  .re-modal__wrap { grid-template-columns: 1fr; }
  .re-readout { display: none; }
}

/* ── 640px: Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .re-page { padding: 14px 14px 56px; }

  /* Hero */
  .re-hero { padding: 20px 18px; border-radius: 18px; }
  .re-hero__value { font-size: 38px; }
  .re-hero__grid  { grid-template-columns: 1fr 1fr; gap: 10px; }
  .re-hero__stats { flex-direction: column; gap: 0; }
  .re-hero__stat  { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 0; margin: 0; }
  .re-hero__stat:last-child { border-bottom: 0; }

  /* Section head */
  .re-block-head    { margin: 24px 0 14px; gap: 12px; }
  .re-section-title { font-size: 28px; }
  .re-head-actions  { flex-wrap: wrap; }

  /* ── Objects table → card layout ─────────────────────────────────────── */
  .re-objects__head { display: none; }
  .re-objects__row {
    grid-template-columns: 1fr 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px 12px;
    padding: 14px 16px;
  }
  /* Row 1: name + actions */
  .re-objects__row > :nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .re-objects__row > :nth-child(7) { grid-column: 3;     grid-row: 1; align-self: start; }
  /* Row 2: buy | current | roi */
  .re-objects__row > :nth-child(2) { grid-column: 1; grid-row: 2; text-align: left; }
  .re-objects__row > :nth-child(3) { grid-column: 2; grid-row: 2; text-align: left; }
  .re-objects__row > :nth-child(6) { grid-column: 3; grid-row: 2; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
  /* Hide rent + profit */
  .re-objects__row > :nth-child(4),
  .re-objects__row > :nth-child(5) { display: none; }
  /* Money cells: left-align */
  .re-objects__row .re-objects__money { text-align: left; }
  /* Mini column labels */
  .re-objects__row > :nth-child(2)::before { content: 'Купівля'; }
  .re-objects__row > :nth-child(3)::before { content: 'Поточна'; }
  .re-objects__row > :nth-child(6)::before { content: 'ROI'; }
  .re-objects__row > :nth-child(2)::before,
  .re-objects__row > :nth-child(3)::before,
  .re-objects__row > :nth-child(6)::before {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 3px;
  }

  /* Footer: label full-width + buy + current */
  .re-objects__foot {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    padding: 12px 16px;
  }
  .re-objects__foot > :nth-child(1) { grid-column: 1 / -1; font-size: 12px; }
  .re-objects__foot > :nth-child(2) { text-align: left; }
  .re-objects__foot > :nth-child(4),
  .re-objects__foot > :nth-child(5),
  .re-objects__foot > :nth-child(6),
  .re-objects__foot > :nth-child(7) { display: none; }

  /* Add row */
  .re-objects__add-row { padding: 14px 16px; font-size: 12px; }

  /* Income */
  .re-income { padding: 20px 18px; border-radius: 16px; }
  .re-income__header { flex-direction: column; gap: 12px; }

  /* Charts */
  .re-charts-row,
  .re-charts-row--secondary { gap: 12px; }
  .re-canvas-wrap { height: 200px; }

  /* Metrics */
  .re-metric-card__value { font-size: 22px; }

  /* Sub-section header */
  .re-section-header { margin: 22px 0 12px; }
  .re-section-header h2 { font-size: 20px; }

  /* Modal: bottom sheet */
  .re-overlay { padding: 0; align-items: flex-end; }
  .re-modal   { border-radius: 20px 20px 0 0; max-height: 90vh; overflow-y: auto; }
  .re-modal__head  { padding: 18px 18px 12px; }
  .re-modal__body  { padding: 4px 18px 8px; }
  .re-modal__foot  { padding: 12px 18px; margin-top: 10px; }
  .re-modal__error { margin: 0 18px 4px; }

  /* Draft notice */
  .re-draft-notice { flex-direction: column; gap: 8px; padding: 12px 16px; }
}

/* ── 480px: Small phones ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .re-form-grid { grid-template-columns: 1fr; }
}

/* ── 400px: Very small phones ────────────────────────────────────────────── */
@media (max-width: 400px) {
  .re-hero__grid    { grid-template-columns: 1fr; }
  .re-metrics       { grid-template-columns: 1fr; }
  .re-section-title { font-size: 24px; }
  .re-metric-card__value { font-size: 20px; }
}
