@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #888;
  --paper: #faf8f4;
  --paper-warm: #f2ede4;
  --accent: #c0392b;
  --accent-soft: #e8c5c0;
  --green: #2d6a4f;
  --green-soft: #c8e6c9;
  --border: #d8d0c4;
  --mono: 'DM Mono', monospace;
  --serif: 'Lora', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  padding-top: 45px;
}

/* ─── HEADER NAVIGATOR SOHA ─── */
.sp-sticky-header {
  position: fixed !important; 
  top: 0 !important; 
  left: 0 !important; 
  width: 100%; 
  height: 45px !important;
  background-color: #000 !important; 
  display: flex !important; 
  align-items: center !important; 
  justify-content: space-between !important;
  z-index: 99999 !important; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important; 
  font-family: Arial, sans-serif !important;
}
.left-group, .right-group { display: flex; align-items: center; height: 100%; }
.sp-back-to-soha-new {
  display: flex; align-items: center; justify-content: center; 
  width: 45px; height: 45px;
  background-color: #007f74; color: white; cursor: pointer;
}
.sp-back-to-soha-new:hover { background-color: #00665d; }
.emg-icon-svg { fill: currentColor; width: 20px; height: 20px; }
.sp-mag-logo-new { margin-left: 15px; display: flex; align-items: center; }
.sp-mag-logo-new img { height: 24px; width: auto; display: block; }
.center-logo {
  position: absolute; left: 50%; transform: translateX(-50%); 
  pointer-events: none; user-select: none;
  display: flex; align-items: center; justify-content: center;
}
.center-logo img { height: 26px; width: auto; display: block; }
.mobile-emag-logo { display: none; height: 24px; width: auto; margin-right: 15px; }
.fb-custom-btn {
  display: flex; align-items: center; gap: 6px; color: white; 
  font-size: 13px; font-weight: bold; cursor: pointer; opacity: 0.9;
  margin-right: 15px;
}
.fb-custom-btn:hover { opacity: 1; text-decoration: underline; }

/* ─── DECORATIVE FINANCE LINES ─── */
.finance-decor {
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  pointer-events: none;
  z-index: -1;
}
.finance-decor .decor-axis {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
  opacity: 0.5;
}
.finance-decor .decor-axis::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 4px; left: -1.5px;
  background: repeating-linear-gradient(to bottom, transparent, transparent 99px, var(--ink-muted) 99px, var(--ink-muted) 100px);
  opacity: 0.25;
}
.finance-decor .axis-left { left: calc(50% - 370px); }
.finance-decor .axis-right { right: calc(50% - 370px); }

/* ─── LAYOUT CONTAINERS ─── */
.container-text { max-width: 660px; margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
.full-width-image { width: 100%; max-width: 1920px; margin: 3.5rem auto 2.5rem auto; display: block; }
.full-width-image img { width: 100%; height: auto; display: block; }

/* ─── HEADER ─── */
.page-header { background: var(--ink); color: var(--paper); padding: 3.5rem 0 3rem; text-align: center; }
.page-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.page-header h1 em { color: var(--accent-soft); font-style: italic; }
.title-top-mobile { display: inline; }
.label-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.35rem 1rem;
  border-radius: 2px;
}

/* ─── EDITORIAL ─── */
.editorial { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--border); }
.editorial h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; margin-top: 2rem; color: var(--ink); letter-spacing: -0.01em; line-height: 1.5; }
.editorial h2:first-child { margin-top: 0; }
.editorial p { margin-bottom: 1.25rem; color: var(--ink-soft); font-size: 0.97rem; }
.editorial strong { color: var(--ink); font-weight: 600; }

.pull-quote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 2.5rem 0 1.5rem;
  background: var(--paper-warm);
  border-radius: 0 4px 4px 0;
}
.pull-quote p { font-style: italic; color: var(--ink); font-size: 1rem; margin: 0; }
.pull-quote cite {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.formula-box { background: var(--ink); color: var(--paper); padding: 1.25rem 1.5rem; border-radius: 6px; margin: 1.5rem 0; font-family: var(--mono); font-size: 0.82rem; line-height: 1.9; }
.formula-box .formula-title { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 0.75rem; }
.formula-box .formula-main { color: var(--accent-soft); font-size: 0.95rem; font-weight: 500; }
.formula-box .formula-vars { margin-top: 0.75rem; color: rgba(255,255,255,0.6); font-size: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 0.75rem; }
.formula-box .formula-vars span { display: block; margin-bottom: 0.2rem; }

.compare-table-wrap { overflow-x: auto; margin: 1.5rem 0 0.5rem 0; border-radius: 6px; border: 1.5px solid var(--border); }
.compare-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.78rem; }
.compare-table thead tr { background: var(--ink); color: var(--paper); }
.compare-table thead th { padding: 0.75rem 1rem; text-align: left; font-weight: 500; letter-spacing: 0.06em; font-size: 0.68rem; text-transform: uppercase; }
.compare-table tbody tr { border-bottom: 1px solid var(--border); }
.compare-table tbody tr:nth-child(even) { background: var(--paper-warm); }
.compare-table td { padding: 0.65rem 1rem; color: var(--ink-soft); vertical-align: middle; }
.compare-table td:first-child { color: var(--ink); font-weight: 500; }
.compare-table td.green { color: var(--green); font-weight: 500; }
.compare-table td.red { color: var(--accent); font-weight: 500; }

/* ─── TOOL ─── */
.tool-section { padding: 2.5rem 0 3rem; }
.tool-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--ink); }
.input-group { margin-bottom: 1.25rem; }
.input-group label { display: block; font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.5rem; }
.input-row { position: relative; display: flex; align-items: stretch; border: 1.5px solid var(--border); border-radius: 6px; background: #fff; transition: border-color 0.2s; }
.input-row:focus-within { border-color: var(--ink); }
.input-row input { flex: 1; border: none; outline: none; padding: 0.75rem 1rem; font-family: var(--mono); font-size: 1.05rem; color: var(--ink); background: transparent; min-width: 0; border-radius: 6px 0 0 6px; }
.input-row .unit { padding: 0 1rem; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-muted); letter-spacing: 0.08em; white-space: nowrap; border-left: 1px solid var(--border); display: flex; align-items: center; background: var(--paper-warm); border-radius: 0 6px 6px 0; }

.input-tooltip {
  position: absolute; bottom: calc(100% + 10px); left: 0; background: var(--ink); color: var(--paper); padding: 0.65rem 1rem; border-radius: 6px; font-size: 0.8rem; font-family: var(--serif); line-height: 1.4; pointer-events: none; opacity: 0; transform: translateY(8px); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); width: max-content; max-width: 320px; box-shadow: 0 6px 16px rgba(0,0,0,0.12); z-index: 10;
}
.input-tooltip::after { content: ''; position: absolute; top: 100%; left: 1.5rem; border-width: 6px; border-style: solid; border-color: var(--ink) transparent transparent transparent; }
.input-row.show-tooltip .input-tooltip { opacity: 1; transform: translateY(0); }

.slider-wrap { margin-top: 0.5rem; }
input[type="range"] { width: 100%; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--border); outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); cursor: pointer; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); transition: transform 0.15s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.slider-labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.62rem; color: var(--ink-muted); margin-top: 0.35rem; }

.delay-toggle { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.delay-btn { font-family: var(--mono); font-size: 0.72rem; padding: 0.35rem 0.85rem; border: 1.5px solid var(--border); border-radius: 100px; background: transparent; color: var(--ink-soft); cursor: pointer; letter-spacing: 0.05em; transition: all 0.15s; }
.delay-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 400px) { .input-grid { grid-template-columns: 1fr; } }

.calc-btn { width: 100%; padding: 1rem; background: var(--accent); color: #fff; border: none; border-radius: 6px; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; margin-top: 1.75rem; transition: opacity 0.15s, transform 0.1s; font-weight: 500; }
.calc-btn:hover { opacity: 0.88; }
.calc-btn:active { transform: scale(0.99); }

.results { display: none; margin-top: 2rem; animation: fadeUp 0.4s ease; }
.results.visible { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
@media (max-width: 420px) { .cards { grid-template-columns: 1fr; } }
.card { border-radius: 8px; padding: 1.25rem 1rem; }
.card-a { background: var(--green); color: #fff; }
.card-b { background: var(--paper-warm); border: 1.5px solid var(--border); color: var(--ink); }
.card-tag { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; margin-bottom: 0.5rem; }
.card-amount { font-family: var(--mono); font-size: clamp(1.3rem, 5vw, 1.7rem); font-weight: 500; line-height: 1.1; margin-bottom: 0.4rem; }
.card-desc { font-size: 0.73rem; opacity: 0.75; line-height: 1.4; font-family: var(--mono); }

.delta-box { background: var(--ink); color: var(--paper); border-radius: 8px; padding: 1.25rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.delta-icon { font-size: 1.4rem; flex-shrink: 0; }
.delta-text { font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; color: rgba(255,255,255,0.8); }
.delta-text strong { color: var(--accent-soft); font-size: 1rem; display: block; margin-bottom: 0.15rem; }

.bar-section { background: var(--paper-warm); border: 1.5px solid var(--border); border-radius: 8px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.bar-section h3 { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.85rem; font-weight: 400; }
.bar-item { margin-bottom: 0.9rem; }
.bar-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.68rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; width: 0%; transition: width 0.9s cubic-bezier(0.4,0,0.2,1); }
.bar-a { background: var(--green); }
.bar-b { background: var(--accent-soft); }

.result-table-wrap { overflow-x: auto; border-radius: 6px; border: 1.5px solid var(--border); margin-bottom: 1rem; }
.result-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.76rem; }
.result-table thead tr { background: var(--ink); color: var(--paper); }
.result-table thead th { padding: 0.65rem 1rem; text-align: left; font-weight: 400; font-size: 0.63rem; letter-spacing: 0.08em; text-transform: uppercase; }
.result-table tbody td { padding: 0.6rem 1rem; color: var(--ink-soft); border-bottom: 1px solid var(--border); vertical-align: middle; }
.result-table tbody tr:last-child td { border-bottom: none; }
.result-table .td-green { color: var(--green); font-weight: 500; }
.result-table .td-red { color: var(--accent); font-weight: 500; }

.insight-note { background: var(--paper-warm); border-left: 3px solid var(--accent); padding: 1rem 1.25rem; border-radius: 0 6px 6px 0; font-size: 0.88rem; line-height: 1.65; color: var(--ink-soft); font-style: italic; }
.insight-note strong { color: var(--accent); font-style: normal; }

.footer-note { border-top: 1px solid var(--border); padding: 1.5rem 0 2.5rem; font-family: var(--mono); font-size: 0.63rem; color: var(--ink-muted); line-height: 1.7; letter-spacing: 0.01em; }
.footer-note a { color: var(--ink-muted); text-decoration: underline; }

.iframe-wrapper { max-width: 1920px; margin: 0 auto; width: 100%; overflow-x: auto; display: flex; justify-content: center; background: transparent; line-height: 0; }
.iframe-wrapper iframe { width: 100%; min-height: 85vh; height: 100%; border: none; display: block; }

@media (max-width: 768px) {
  .center-logo, .fb-custom-btn { display: none !important; } 
  .mobile-emag-logo { display: block !important; }
  .title-top-mobile { font-size: 37px; display: block; line-height: 1.25; margin-bottom: 0.25rem; }
  .finance-decor { display: none; }
  .container-wide { padding: 0; }
  .full-width-image { margin: 2rem 0; }
  .compare-table-wrap, .result-table-wrap { border: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; margin: 1.5rem 0; }
  .compare-table td:first-child, .compare-table th:first-child, .result-table td:first-child, .result-table th:first-child { padding-left: 1.25rem; }
  .compare-table td:last-child, .compare-table th:last-child, .result-table td:last-child, .result-table th:last-child { padding-right: 1.25rem; }
  .bar-section { border: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: 1.5rem 1.25rem; }
  .card-a { border-radius: 0; }
  .card-b { border: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
  .cards { gap: 0; }
  .formula-box, .pull-quote { border-radius: 0; margin-left: -1.25rem; margin-right: -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  .input-tooltip { left: 1.25rem; right: 1.25rem; width: auto; max-width: none; }
  .input-tooltip::after { left: 50%; transform: translateX(-50%); }
}