:root {
  --ink: #15231d;
  --ink-soft: #43554b;
  --forest: #10251d;
  --forest-2: #18382b;
  --cream: #f3f0e7;
  --paper: #fbfaf6;
  --line: #cfd7d0;
  --line-dark: #b8c3ba;
  --mint: #dcece2;
  --lime: #c8e66a;
  --gold: #f3d978;
  --red: #c64d45;
  --red-soft: #f7e4e1;
  --orange: #d17a31;
  --shadow: 0 18px 60px rgba(16, 37, 29, .09);
  --radius: 20px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 3%, rgba(243, 217, 120, .22), transparent 27rem),
    linear-gradient(180deg, #f7f4ec 0, var(--cream) 58rem, #ecefe9 100%);
  min-width: 320px;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #47745a; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 200; left: 16px; top: 12px; transform: translateY(-140%); padding: 11px 16px; border-radius: 10px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; transition: transform .15s ease; }
.skip-link:focus { transform: translateY(0); }

.topbar {
  width: min(1440px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(21, 35, 29, .12);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 13px; background: var(--forest); box-shadow: 0 7px 20px rgba(16, 37, 29, .15);
}
.brand-mark svg { width: 28px; fill: var(--gold); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand strong { font-size: 16px; letter-spacing: -.01em; }
.brand small { color: var(--ink-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.topbar-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; margin-right: 34px; }
.topbar-nav a { position: relative; color: #425249; font-size: 11px; font-weight: 750; text-decoration: none; }
.topbar-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; border-radius: 2px; background: #47745a; transition: right .18s ease; }
.topbar-nav a:hover::after, .topbar-nav a:focus-visible::after { right: 0; }
.topbar-meta { display: flex; align-items: center; gap: 18px; }
.button-header { border-color: var(--forest); background: var(--forest); color: #fff; }
.button-header:hover { background: #224534; }
.source-chip, .data-status, .precision-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--forest-2);
}
.source-chip i, .data-status i, .precision-badge i {
  width: 7px; height: 7px; border-radius: 99px; background: #48a76c; box-shadow: 0 0 0 4px rgba(72, 167, 108, .12);
}

main { width: min(1440px, calc(100% - 48px)); margin: 0 auto; }
.hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(400px, .65fr);
  align-items: end;
  gap: 80px;
  padding: 76px 28px 68px;
}
.eyebrow { margin: 0 0 18px; color: #597163; font-size: 11px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.hero h1 {
  margin: 0; max-width: 820px; font-family: Georgia, "Times New Roman", serif; font-weight: 500;
  font-size: clamp(52px, 6vw, 86px); line-height: .96; letter-spacing: -.055em;
}
.hero h1 span { color: #446a55; font-style: italic; }
.hero-lead { max-width: 760px; margin: 28px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.7; }
.hero-lead strong { color: #233a2e; font-weight: 780; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button-large { min-height: 50px; padding: 0 22px; font-size: 12px; }
.hero-proof {
  display: grid; grid-template-columns: repeat(3, 1fr); align-self: end;
  border-top: 1px solid rgba(21, 35, 29, .18); padding-top: 22px;
}
.hero-proof div { min-width: 0; padding-right: 15px; }
.hero-proof strong { display: block; font-family: Georgia, serif; font-size: clamp(24px, 2.5vw, 38px); font-weight: 500; letter-spacing: -.04em; }
.hero-proof span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 11px; line-height: 1.35; }

.workspace {
  display: grid;
  grid-template-columns: minmax(600px, 1.45fr) minmax(390px, .8fr);
  align-items: start;
  gap: 24px;
  padding-bottom: 84px;
}
.calculator { display: grid; gap: 14px; }
.mobile-result-bar { display: none; }
.form-progress { padding: 16px 18px; border: 1px solid rgba(21,35,29,.12); border-radius: 15px; background: rgba(255,255,255,.52); }
.form-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.form-progress strong { font-size: 12px; }
.form-progress span { color: #4c6256; font-size: 10px; font-weight: 750; }
.form-progress small { display: block; margin-top: 8px; color: #5f7067; font-size: 10px; line-height: 1.5; }
.form-progress-track { height: 7px; overflow: hidden; margin-top: 11px; border-radius: 99px; background: #dce3dd; }
.form-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4f8263, var(--lime)); transition: width .28s ease; }
.panel { border: 1px solid rgba(21, 35, 29, .11); border-radius: var(--radius); background: rgba(251, 250, 246, .94); box-shadow: var(--shadow); }
.form-panel { padding: 28px 30px; }
.primary-panel { border-top: 4px solid var(--forest-2); }
.form-panel.section-complete { border-color: rgba(70,123,88,.32); }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 26px; }
.panel-heading > div, .calculator summary > span { display: flex; align-items: center; gap: 12px; }
.panel-heading-status { justify-content: flex-end; flex-wrap: wrap; }
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.step {
  display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 9px;
  background: var(--mint); color: #31543f; font-size: 10px; font-weight: 800; letter-spacing: .06em;
}
.data-status { color: #476051; font-weight: 650; }
.data-status.error { color: var(--red); }
.data-status.error i { background: var(--red); }
.section-state { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid transparent; border-radius: 99px; font-size: 8px; font-weight: 850; letter-spacing: .035em; white-space: nowrap; }
.section-state.required { border-color: #dfb2ae; background: #faecea; color: #8d3d38; }
.section-state.recommended { border-color: #dcc777; background: #fff5cf; color: #725c13; }
.section-state.optional { border-color: #c8d2cb; background: #eef2ee; color: #596b61; }
.section-state.completed { border-color: #b8d5be; background: #e4f1e6; color: #356a45; }
.summary-meta { display: inline-flex; align-items: center; gap: 12px; }

.calculator details { overflow: visible; }
.calculator details summary { min-height: 72px; list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin: -28px -30px; padding: 22px 30px; font-size: 16px; font-weight: 750; }
.calculator details summary::-webkit-details-marker { display: none; }
.calculator details summary svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s ease; }
.calculator details[open] summary svg { transform: rotate(180deg); }
.details-body { padding-top: 30px; margin-top: 28px; border-top: 1px solid var(--line); }

label { font-size: 13px; font-weight: 720; }
.label-with-help { position: relative; display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; }
.help-tip {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0;
  border: 1px solid #9bad9f; border-radius: 50%; background: #f4f7f4; color: #486352;
  font-size: 11px; font-weight: 850; line-height: 1; cursor: pointer;
}
.help-tip:hover, .help-tip:focus-visible, .help-tip.open { border-color: #365943; background: #365943; color: #fff; outline: none; }
.help-tip:focus-visible { box-shadow: 0 0 0 3px rgba(81, 116, 96, .16); }
.help-popover {
  position: absolute; z-index: 50; left: 0; top: calc(100% + 8px); width: max-content; max-width: min(280px, calc(100vw - 48px));
  padding: 10px 12px; border: 1px solid #cbd4cd; border-radius: 10px; background: #10251d; color: #f5f8f5;
  box-shadow: 0 14px 34px rgba(16, 37, 29, .2); font-size: 10px; font-weight: 520; line-height: 1.5;
  opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none; transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.help-tip.open + .help-popover {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.field-grid > .field:last-child .help-popover { left: auto; right: 0; }
.switch-field .label-with-help { display: flex; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span:first-child, .category-field > label { color: #34473e; }
.field-grid { display: grid; gap: 16px; margin-top: 18px; }
.field-grid:first-child { margin-top: 0; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field.span-two { grid-column: span 2; }
.compact-row { margin-top: 16px; }
.narrow-field { max-width: 31.5%; margin-top: 18px; }
input, select {
  width: 100%; min-height: 54px; border: 1px solid var(--line-dark); border-radius: 12px;
  background: #fff; color: var(--ink); outline: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input { padding: 0 16px; }
select { padding: 0 42px 0 16px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23384b41' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: calc(100% - 15px) 50%; }
input:focus, select:focus { border-color: #517460; box-shadow: 0 0 0 4px rgba(81, 116, 96, .12); }
input::placeholder { color: #9aa49e; }
.money-input { position: relative; display: block; }
.money-input input { padding-right: 48px; font-weight: 720; font-variant-numeric: tabular-nums; }
.money-input b { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #7a8881; font-size: 11px; pointer-events: none; }

.category-field { position: relative; }
.combobox-wrap { position: relative; margin-top: 9px; }
.combobox-wrap input { min-height: 56px; padding: 0 48px; font-size: 14px; }
.input-icon { position: absolute; z-index: 1; left: 16px; top: 50%; transform: translateY(-50%); width: 19px; fill: none; stroke: #6e7e75; stroke-width: 1.8; }
.clear-field { position: absolute; z-index: 1; right: 10px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #7d8a83; font-size: 22px; line-height: 1; }
.clear-field:hover { background: #edf1ed; color: var(--ink); }
.suggestions {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; overflow: auto; max-height: 348px;
  padding: 8px; border: 1px solid var(--line-dark); border-radius: 15px; background: #fff; box-shadow: 0 24px 70px rgba(16, 37, 29, .18);
}
.suggestion { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 14px; text-align: left; padding: 12px; border: 0; border-radius: 10px; background: transparent; }
.suggestion:hover, .suggestion.active { background: #eef4ef; }
.suggestion strong { display: block; margin-bottom: 3px; font-size: 13px; }
.suggestion small { color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.suggestion em { align-self: start; padding: 4px 7px; border-radius: 6px; background: #e8eee9; color: #51665a; font-style: normal; font-size: 9px; font-weight: 800; }
.empty-suggestions { padding: 18px 14px; color: var(--ink-soft); font-size: 12px; text-align: center; }
.selected-category { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #eef4ef; }
.selected-category span { display: block; font-size: 12px; font-weight: 800; }
.selected-category small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.id-chip { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #cedbd1; border-radius: 7px; color: #4b6757; background: #f9fbf9; font-size: 9px !important; letter-spacing: .06em; }
.field-note { margin: 9px 0 0; color: #718078; font-size: 10px; line-height: 1.5; }
.conditional-field { max-width: 49%; margin-top: 16px; }

.switch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.switch-field { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; }
.switch-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch { flex: 0 0 auto; position: relative; width: 38px; height: 23px; border-radius: 99px; background: #ccd3ce; transition: .2s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.17); transition: .2s; }
.switch-field input:checked + .switch { background: #427158; }
.switch-field input:checked + .switch::after { transform: translateX(15px); }
.switch-field input:focus-visible + .switch { box-shadow: 0 0 0 4px rgba(81, 116, 96, .17); }
.switch-field b, .switch-field small { display: block; }
.switch-field b { font-size: 12px; }
.switch-field small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; font-weight: 500; }
.inline-switch { margin-bottom: 18px; }

.results { position: relative; }
.result-card { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow-x: hidden; overflow-y: auto; padding: 28px; background: var(--forest); color: #f8faf7; border-color: rgba(255,255,255,.08); box-shadow: 0 28px 70px rgba(16,37,29,.2); scrollbar-width: thin; scrollbar-color: #557566 transparent; }
.result-card::before { content: ""; position: absolute; inset: -120px -170px auto auto; width: 330px; height: 330px; border-radius: 50%; background: rgba(200,230,106,.07); pointer-events: none; }
.result-card.negative { background: #351c1a; }
.result-topline { position: relative; display: flex; align-items: center; justify-content: space-between; color: #c1ccc6; font-size: 11px; }
.precision-badge { padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.08); color: #f0f5f1; font-size: 10px; }
.precision-badge.manual i { background: var(--gold); box-shadow: 0 0 0 4px rgba(243,217,120,.12); }
.result-label { position: relative; margin: 26px 0 5px; color: #bdc9c2; font-size: 13px; }
.profit-value { position: relative; font-family: Georgia, serif; font-size: clamp(45px, 4.4vw, 70px); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.profit-context { position: relative; min-height: 18px; margin-top: 10px; color: #c5d0ca; font-size: 11px; line-height: 1.5; }
.metric-grid { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 25px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; overflow: hidden; }
.metric-grid div { padding: 14px; border-right: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.metric-grid div:nth-child(even) { border-right: 0; }
.metric-grid div:nth-child(n+3) { border-bottom: 0; }
.metric-grid span, .metric-grid strong { display: block; }
.metric-grid span { color: #bdc9c2; font-size: 10px; }
.metric-grid strong { margin-top: 5px; font-size: 15px; font-variant-numeric: tabular-nums; }
.price-targets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.price-targets > div { padding: 14px; border-radius: 13px; background: rgba(255,255,255,.06); }
.price-targets .target-highlight { background: var(--lime); color: #17241d; }
.price-targets span, .price-targets strong, .price-targets small { display: block; }
.price-targets span { color: #bdc9c2; font-size: 10px; }
.price-targets .target-highlight span, .price-targets .target-highlight small { color: #50603a; }
.price-targets strong { margin: 5px 0 2px; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.price-targets small { color: #adbbb3; font-size: 9px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-top: 26px; padding-bottom: 9px; border-bottom: 1px solid rgba(255,255,255,.1); }
.section-title h3 { margin: 0; font-size: 13px; }
.section-title span { color: #aebeb5; font-size: 9px; }
.cost-list { display: grid; gap: 9px; margin-top: 13px; }
.cost-item { display: grid; grid-template-columns: 118px 1fr auto; align-items: center; gap: 11px; }
.cost-item > span { color: #c0cbc5; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-item strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.cost-bar { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.cost-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.cost-item:nth-child(n+2) .cost-bar i { background: #7f9b8a; }
.insights { display: grid; gap: 8px; margin-top: 12px; }
.insight { display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: start; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.055); }
.insight-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: rgba(200,230,106,.13); color: var(--lime); font-size: 11px; font-weight: 900; }
.insight.warning .insight-icon { background: rgba(243,217,120,.15); color: var(--gold); }
.insight.danger .insight-icon { background: rgba(230,106,97,.15); color: #ff9b92; }
.insight b { display: block; font-size: 11px; }
.insight p { margin: 4px 0 0; color: #bdc9c2; font-size: 10px; line-height: 1.55; }
.scenario-table { margin-top: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.scenario-row { display: grid; grid-template-columns: 1fr .8fr .6fr; gap: 8px; padding: 10px; border-bottom: 1px solid rgba(255,255,255,.075); font-size: 10px; }
.scenario-row:last-child { border: 0; }
.scenario-row.header { color: #91a49a; text-transform: uppercase; letter-spacing: .06em; }
.scenario-row span:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.scenario-row.current { background: rgba(200,230,106,.08); color: #eafaad; }
.result-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 22px; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-size: 10px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-small { min-height: 36px; }
.button-primary { background: var(--lime); color: #15231d; }
.button-secondary { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #f7faf8; }
.button-ghost { border-color: rgba(21,35,29,.15); background: transparent; }
.button-ghost:hover { background: rgba(255,255,255,.45); }

.portfolio { margin-bottom: 24px; padding: 46px; border-top: 4px solid #315b45; background: linear-gradient(145deg, #dfe9dd 0%, #eef2e9 55%, #e7ede3 100%); box-shadow: 0 22px 60px rgba(29,65,46,.09); }
.portfolio-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) auto; gap: 48px; align-items: end; }
.portfolio-intro h2 { max-width: 760px; margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 4.2vw, 56px); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; }
.portfolio-intro p:last-child { max-width: 760px; margin: 20px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.portfolio-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.portfolio-actions .button { min-width: 168px; }
.portfolio-actions .button-primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.portfolio-actions .button-primary:hover { background: #234734; }
.portfolio-dropzone {
  min-height: 158px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  margin-top: 34px; padding: 24px; border: 2px dashed #587563; border-radius: 17px; background: rgba(255,255,255,.68);
  text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.portfolio-dropzone:hover, .portfolio-dropzone.dragging { transform: translateY(-2px); border-color: #557561; background: rgba(255,255,255,.82); }
.portfolio-upload-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--forest); color: var(--lime); font-size: 20px; }
.portfolio-dropzone strong { font-size: 13px; }
.portfolio-dropzone small { color: #4f6257; font-size: 11px; font-weight: 600; }
.portfolio-import-status { min-height: 18px; margin: 12px 0 0; color: #4f6257; font-size: 11px; text-align: center; }
.portfolio-import-status.loading { color: #8a6a18; }
.portfolio-import-status.success { color: #38704c; }
.portfolio-import-status.error { color: var(--red); }
.portfolio-dashboard { margin-top: 38px; padding-top: 34px; border-top: 1px solid rgba(21,35,29,.13); }
.portfolio-dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.portfolio-dashboard-head .eyebrow { margin-bottom: 7px; }
.portfolio-dashboard-head h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.portfolio-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.portfolio-kpis article { min-height: 128px; padding: 19px; border: 1px solid rgba(21,35,29,.1); border-radius: 14px; background: var(--paper); }
.portfolio-kpis span, .portfolio-kpis strong, .portfolio-kpis small { display: block; }
.portfolio-kpis span { color: #52645a; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .065em; }
.portfolio-kpis strong { margin-top: 14px; font-family: Georgia, serif; font-size: clamp(25px, 2.4vw, 38px); font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.portfolio-kpis small { margin-top: 6px; color: #637268; font-size: 10px; }
.portfolio-kpis #portfolioProfitKpi { background: var(--forest); color: #fff; }
.portfolio-kpis #portfolioProfitKpi span, .portfolio-kpis #portfolioProfitKpi small { color: #aab8b0; }
.portfolio-kpis #portfolioProfitKpi strong { color: var(--lime); }
.portfolio-kpis #portfolioProfitKpi.negative { background: #421f1d; }
.portfolio-kpis #portfolioProfitKpi.negative strong { color: #ffaaa3; }
.portfolio-visuals { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: 10px; margin-top: 10px; }
.portfolio-card { min-height: 300px; padding: 20px; border: 1px solid rgba(21,35,29,.1); border-radius: 14px; background: var(--paper); }
.portfolio-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.portfolio-card-title h3 { margin: 0; font-size: 13px; }
.portfolio-card-title span { color: #66766c; font-size: 10px; }
.portfolio-profit-bars { display: grid; gap: 14px; margin-top: 20px; }
.portfolio-bar-row { display: grid; grid-template-columns: 72px 1fr 78px; gap: 9px; align-items: center; }
.portfolio-bar-row > span { overflow: hidden; color: #4d6055; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-bar-row strong { font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.portfolio-bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e5e9e3; }
.portfolio-bar-track i { display: block; height: 100%; border-radius: inherit; }
.portfolio-bar-track i.positive { background: #6e9f79; }
.portfolio-bar-track i.negative { background: #cf665f; }
.portfolio-donut-wrap { display: grid; justify-items: center; gap: 24px; padding-top: 24px; }
.portfolio-donut { width: 132px; height: 132px; display: grid; place-items: center; border-radius: 50%; background: #e5e9e3; }
.portfolio-donut::before { content: ""; grid-area: 1 / 1; width: 82px; height: 82px; border-radius: 50%; background: var(--paper); }
.portfolio-donut > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.portfolio-donut strong, .portfolio-donut span { display: block; }
.portfolio-donut strong { font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.portfolio-donut span { color: #7e8b83; font-size: 8px; }
.portfolio-legend { width: 100%; display: grid; gap: 9px; }
.portfolio-legend span { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; color: #53665b; font-size: 10px; }
.portfolio-legend i { width: 8px; height: 8px; border-radius: 3px; }
.portfolio-legend i.healthy { background: #6ea176; }
.portfolio-legend i.below { background: #e2bd55; }
.portfolio-legend i.loss { background: #c64d45; }
.portfolio-legend strong { color: var(--ink); }
.portfolio-insights { display: grid; gap: 8px; margin-top: 16px; }
.portfolio-insights article { display: grid; grid-template-columns: 26px 1fr; gap: 9px; padding: 10px; border-radius: 10px; background: #eef2eb; }
.portfolio-insights article > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--forest); color: var(--lime); font-size: 10px; font-weight: 850; }
.portfolio-insights b { display: block; font-size: 10px; }
.portfolio-insights p { margin: 3px 0 0; color: #56685e; font-size: 10px; line-height: 1.5; }
.portfolio-warnings { display: grid; gap: 5px; margin-top: 12px; padding: 13px 15px; border: 1px solid #e4c4a4; border-radius: 11px; background: #fff5e9; color: #76512b; font-size: 9px; }
.portfolio-warnings strong { margin-bottom: 3px; }
.portfolio-table-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: 30px; }
.portfolio-table-head h3 { margin: 0; font-size: 15px; }
.portfolio-table-head > div:first-child span { display: block; margin-top: 4px; color: #748078; font-size: 9px; }
.portfolio-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.portfolio-filters button { min-height: 30px; padding: 0 10px; border: 1px solid #cbd3cc; border-radius: 9px; background: transparent; color: #637168; font-size: 8px; font-weight: 750; }
.portfolio-filters button.active { border-color: var(--forest); background: var(--forest); color: #fff; }
.portfolio-table-wrap { overflow-x: auto; margin-top: 11px; border: 1px solid rgba(21,35,29,.11); border-radius: 13px; background: var(--paper); }
.portfolio table { width: 100%; min-width: 760px; border-collapse: collapse; }
.portfolio th, .portfolio td { padding: 12px 13px; border-bottom: 1px solid #e4e8e3; font-size: 9px; text-align: right; font-variant-numeric: tabular-nums; }
.portfolio th { color: #77847c; background: #f3f5f0; font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.portfolio th:first-child, .portfolio td:first-child { text-align: left; }
.portfolio tbody tr:last-child td { border-bottom: 0; }
.portfolio td > strong, .portfolio td > small { display: block; }
.portfolio td > strong { font-size: 10px; }
.portfolio td > small { max-width: 330px; margin-top: 3px; overflow: hidden; color: #7e8b83; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-status { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 99px; font-size: 7px; font-weight: 800; white-space: nowrap; }
.portfolio-status.healthy { background: #e2efe4; color: #3d6e4b; }
.portfolio-status.below { background: #fff0c9; color: #80631c; }
.portfolio-status.loss { background: var(--red-soft); color: #93423d; }

.methodology { display: grid; grid-template-columns: .7fr 1.3fr; gap: 64px; padding: 54px; background: #e4ebdf; box-shadow: none; }
.methodology h2, .sources h2 { margin: 0; font-family: Georgia, serif; font-size: 38px; font-weight: 500; letter-spacing: -.035em; }
.methodology > div:first-child > p:last-child { max-width: 430px; margin: 20px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.method-grid article { padding: 21px; border: 1px solid rgba(21,35,29,.1); border-radius: 14px; background: rgba(255,255,255,.43); }
.method-grid article > span { color: #5d7466; font-size: 10px; font-weight: 800; }
.method-grid h3 { margin: 22px 0 7px; font-size: 14px; }
.method-grid p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }

.ad-zone {
  position: relative; width: min(1120px, calc(100% - 80px)); min-height: 150px;
  display: grid; align-content: center; margin: 28px auto; padding: 30px 26px 22px;
  border-top: 1px solid rgba(21,35,29,.13); border-bottom: 1px solid rgba(21,35,29,.13);
  background: rgba(255,255,255,.18);
}
.ad-label { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); color: #6f7d75; font-size: 8px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.ad-zone .adsbygoogle { width: 100%; min-width: 0; }
.ad-zone-preview { min-height: 150px; border: 1px dashed #aab6ae; border-radius: 16px; background: rgba(255,255,255,.35); }
.ad-zone-preview .adsbygoogle { display: none !important; }
.ad-preview-copy { display: grid; justify-items: center; gap: 6px; color: #52665b; text-align: center; }
.ad-preview-copy strong { font-size: 13px; }
.ad-preview-copy small { font-size: 10px; }

.seo-guide { padding: 84px 30px 70px; }
.seo-guide-heading { max-width: 850px; }
.seo-guide-heading h2, .faq-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(38px, 4.5vw, 58px); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; }
.seo-guide-heading > p:last-child { max-width: 760px; margin: 22px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }
.seo-guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 38px; }
.seo-guide-grid article { padding: 27px; border: 1px solid rgba(21,35,29,.12); border-radius: 16px; background: rgba(255,255,255,.48); }
.seo-guide-grid article > span { color: #557061; font-size: 10px; font-weight: 850; }
.seo-guide-grid h3 { margin: 24px 0 10px; font-size: 17px; }
.seo-guide-grid p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.formula-strip { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; margin-top: 12px; padding: 25px 28px; border-radius: 16px; background: var(--forest); color: #fff; }
.formula-strip div { display: grid; gap: 6px; }
.formula-strip span { color: #b9c8c0; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.formula-strip strong { font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.formula-strip > b { color: var(--lime); font-size: 24px; }

.faq { display: grid; grid-template-columns: .65fr 1.35fr; gap: 70px; padding: 74px 30px; border-top: 1px solid rgba(21,35,29,.12); }
.faq-list { display: grid; gap: 9px; }
.faq-item { border: 1px solid rgba(21,35,29,.12); border-radius: 14px; background: rgba(255,255,255,.5); overflow: hidden; }
.faq-item summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 780; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #e4ebe4; color: #315b45; font-size: 18px; transition: transform .2s ease; }
.faq-item[open] summary span { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 18px 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }

.sources { display: grid; grid-template-columns: .55fr 1.45fr; gap: 50px; padding: 78px 30px 42px; }
.source-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.source-links a { min-height: 100px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px; border: 1px solid rgba(21,35,29,.12); border-radius: 13px; background: rgba(255,255,255,.35); text-decoration: none; transition: background .15s, transform .15s; }
.source-links a:hover { transform: translateY(-2px); background: rgba(255,255,255,.7); }
.source-links span { font-size: 13px; font-weight: 750; }
.source-links small { color: var(--ink-soft); font-size: 11px; }
.legal-note { grid-column: 1 / -1; margin: 36px 0 0; padding-top: 19px; border-top: 1px solid rgba(21,35,29,.12); color: #50645a; font-size: 11px; line-height: 1.7; }
.site-footer { width: min(1440px, calc(100% - 48px)); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin: 0 auto; padding: 32px 0 42px; border-top: 1px solid rgba(21,35,29,.13); }
.site-footer > div { display: grid; gap: 5px; }
.site-footer > div strong { font-size: 15px; }
.site-footer > div span, .site-footer small { color: #52655a; font-size: 11px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.site-footer nav a { color: #3e5448; font-size: 11px; font-weight: 750; text-decoration: none; }
.footer-link { padding: 0; border: 0; background: none; color: #3e5448; font-size: 11px; font-weight: 750; text-decoration: none; }
.site-footer nav a:hover, .footer-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer small { grid-column: 1 / -1; }

.consent-banner {
  position: fixed; z-index: 140; left: 50%; bottom: 18px; width: min(960px, calc(100% - 32px));
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px;
  transform: translateX(-50%); padding: 20px 22px; border: 1px solid rgba(255,255,255,.13);
  border-radius: 17px; background: rgba(16,37,29,.98); color: #fff;
  box-shadow: 0 24px 80px rgba(16,37,29,.32); backdrop-filter: blur(14px);
}
.consent-banner strong { display: block; font-size: 14px; }
.consent-banner p { max-width: 650px; margin: 7px 0 0; color: #c6d2cb; font-size: 11px; line-height: 1.65; }
.consent-banner p a { color: #e7f4be; font-weight: 750; }
.consent-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.button-consent-secondary { border-color: rgba(255,255,255,.25); background: transparent; color: #fff; }
.button-consent-secondary:hover { background: rgba(255,255,255,.09); }

.legal-page { min-height: 100vh; }
.legal-page main { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 90px; }
.legal-hero { padding-bottom: 34px; border-bottom: 1px solid rgba(21,35,29,.14); }
.legal-hero h1 { max-width: 760px; margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 6vw, 68px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.legal-hero p:last-child { max-width: 720px; margin: 20px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.legal-content { display: grid; gap: 34px; padding-top: 40px; }
.legal-content section { scroll-margin-top: 20px; }
.legal-content h2 { margin: 0 0 12px; font-size: 21px; }
.legal-content h3 { margin: 22px 0 8px; font-size: 15px; }
.legal-content p, .legal-content li { color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.legal-content ul { margin: 10px 0 0; padding-left: 22px; }
.legal-content a { color: #28553d; font-weight: 700; }
.legal-alert { padding: 18px 20px; border: 1px solid #d7b864; border-radius: 13px; background: #fff6d9; }
.legal-alert strong { display: block; margin-bottom: 6px; color: #66500e; font-size: 13px; }
.legal-alert p { margin: 0; color: #705d24; }
.legal-meta { color: #63746b; font-size: 11px; }
.error-page { min-height: 100vh; display: grid; place-items: center; }
.error-page main { width: min(680px, calc(100% - 32px)); margin: 0; padding: 48px; border: 1px solid rgba(21,35,29,.12); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.error-page .brand { width: fit-content; margin-bottom: 70px; }
.error-page h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(46px, 8vw, 76px); font-weight: 500; letter-spacing: -.05em; }
.error-page main > p:not(.eyebrow) { margin: 20px 0 28px; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.toast { position: fixed; z-index: 99; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 10px; background: var(--forest); color: white; box-shadow: 0 10px 40px rgba(16,37,29,.25); font-size: 10px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }

@media (max-width: 1120px) {
  .topbar-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 45px; padding-left: 8px; padding-right: 8px; }
  .hero-proof { max-width: 620px; }
  .workspace { grid-template-columns: minmax(500px, 1fr) minmax(350px, .7fr); }
  .form-panel { padding: 23px; }
  .calculator details summary { margin: -23px; padding: 19px 23px; }
  .details-body { margin-top: 23px; }
  .methodology { grid-template-columns: 1fr; gap: 34px; }
  .portfolio-intro { grid-template-columns: 1fr; gap: 24px; }
  .portfolio-actions { justify-content: flex-start; }
  .portfolio-visuals { grid-template-columns: 1fr 1fr; }
  .portfolio-visuals .portfolio-card:first-child { grid-column: 1 / -1; }
  .faq { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .result-card { position: relative; top: auto; max-height: none; overflow: hidden; }
  .mobile-result-bar {
    position: sticky; z-index: 80; top: 10px; order: -1; min-height: 68px;
    display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 16px;
    padding: 10px 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 15px;
    background: rgba(16,37,29,.96); color: #fff; box-shadow: 0 15px 42px rgba(16,37,29,.22);
    text-decoration: none; backdrop-filter: blur(12px);
  }
  .mobile-result-bar.negative { background: rgba(53,28,26,.97); }
  .mobile-result-bar span { display: grid; gap: 3px; }
  .mobile-result-bar small { color: #b9c9c0; font-size: 9px; }
  .mobile-result-bar strong { font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
  .mobile-result-bar b { color: var(--lime); font-size: 10px; white-space: nowrap; }
  .result-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .result-topline, .result-label, .profit-value, .profit-context, .metric-grid, .price-targets, .result-actions { grid-column: 1 / -1; }
  .insights-title, .insights, .scenario-title, .scenario-table { grid-column: 2; }
  .section-title:not(.insights-title):not(.scenario-title), .cost-list { grid-column: 1; }
  .scenario-title { margin-top: 16px; }
  .methodology { padding: 38px; }
  .sources { grid-template-columns: 1fr; gap: 24px; }
  .portfolio { padding: 34px; }
  .portfolio-kpis { grid-template-columns: repeat(2, 1fr); }
  .portfolio-table-head { align-items: flex-start; flex-direction: column; }
  .seo-guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar, main { width: min(100% - 24px, 1440px); }
  .topbar { min-height: 70px; height: auto; }
  .source-chip { display: none; }
  .topbar-meta { gap: 7px; }
  #resetButton { display: none; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 8px; }
  .hero { min-height: auto; padding: 54px 3px 44px; }
  .hero h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero-lead { font-size: 16px; }
  .hero-actions, .hero-actions .button { width: 100%; }
  .hero-proof { grid-template-columns: repeat(3, 1fr); }
  .workspace { gap: 12px; padding-bottom: 55px; }
  .mobile-result-bar { grid-template-columns: 1fr 1fr; top: 7px; }
  .mobile-result-bar b { display: none; }
  .result-card { display: block; padding: 22px; }
  .form-panel { padding: 21px 18px; }
  .calculator details summary { margin: -21px -18px; padding: 17px 18px; }
  .details-body { margin-top: 21px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading-status { align-items: flex-end !important; flex-direction: column; gap: 7px !important; }
  .data-status { max-width: 120px; text-align: right; }
  .section-state { min-height: 23px; }
  .summary-meta { gap: 7px !important; }
  .summary-meta .section-state { display: none; }
  .field-grid.two, .field-grid.three, .switch-grid { grid-template-columns: 1fr; }
  .field.span-two { grid-column: auto; }
  .conditional-field, .narrow-field { max-width: none; }
  .methodology { padding: 28px 20px; border-radius: 16px; }
  .method-grid, .source-links { grid-template-columns: 1fr; }
  .methodology h2, .sources h2 { font-size: 32px; }
  .sources { padding: 58px 4px 34px; }
  .suggestion { grid-template-columns: 1fr; }
  .suggestion em { justify-self: start; }
  .portfolio { padding: 27px 18px; border-radius: 16px; }
  .portfolio-intro h2 { font-size: 36px; }
  .portfolio-actions, .portfolio-actions .button { width: 100%; }
  .portfolio-kpis, .portfolio-visuals { grid-template-columns: 1fr; }
  .portfolio-visuals .portfolio-card:first-child { grid-column: auto; }
  .portfolio-dashboard-head { align-items: flex-start; flex-direction: column; }
  .portfolio-card { min-height: auto; }
  .portfolio-filters { width: 100%; }
  .seo-guide { padding: 62px 4px 50px; }
  .seo-guide-heading h2, .faq-heading h2 { font-size: 37px; }
  .formula-strip { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .formula-strip > b { transform: rotate(90deg); justify-self: start; }
  .faq { padding: 52px 4px; }
  .site-footer { width: min(100% - 24px, 1440px); grid-template-columns: 1fr; align-items: start; }
  .site-footer nav { justify-content: flex-start; }
  .ad-zone { width: calc(100% - 8px); min-height: 120px; margin: 18px auto; padding: 28px 14px 18px; }
  .legal-page main { padding-top: 42px; }
  .consent-banner { bottom: 8px; grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .consent-actions, .consent-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
