*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  text-align: center;
  padding-top: 50px;
  background:
    radial-gradient(circle at 15% 20%, rgba(76,175,80,0.06), transparent 45%),
    radial-gradient(circle at 85% 5%, rgba(33,150,243,0.06), transparent 45%),
    linear-gradient(135deg, #f2f5f9, #e8eff6);
}

    /* Плавная анимация темы */
body,
.container,
input,
select,
button,
canvas,
hr,
#cp_table th,
#cp_table td {
  transition: 
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 18px;
}

body:not(.dark) .nav a {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(0,0,0,0.04);
  transition: all 0.25s ease;
}

body:not(.dark) .nav a:hover {
  background: rgba(76,175,80,0.15);
}

.nav a:hover{
  opacity:1;
}

.theme-toggle{
  position: fixed;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #2e7d32;
  color: white;
  -webkit-text-fill-color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition:
    background 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  z-index: 999;
}

.theme-toggle:hover{
  transform: scale(1.1);
}

.lang-corner-toggle{
  position: fixed;
  top: 26px;
  right: 68px;
  width: 74px;
  min-width: 74px;
  height: 42px;
  line-height: 1;
  z-index: 998;
  margin-top: 0;
  padding: 0 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  font-family: Arial, sans-serif;
  letter-spacing: 0;
  text-align: center;
  text-align-last: center;
  -webkit-appearance: auto;
  appearance: auto;
  text-overflow: clip;
}

.lang-corner-toggle option{
  font-weight: 600;
  letter-spacing: 0;
}

body:not(.dark) .container {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow:
    0 25px 60px rgba(0,0,0,0.08),
    0 8px 20px rgba(0,0,0,0.05);
  color: #1c1f26;
}

.fx-panel{
  width: 100%;
  max-width: 520px;
  margin: 0 auto 25px auto;
  padding: 18px;
  border-radius: 18px;
}

.fx-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fx-row select{
  flex: 1;
  min-width: 100px;
}

.fx-row button{
  width: 45px;
  padding: 8px;
  font-size: 16px;
}

.fx-status{
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.8;
}

.chart-tooltip{
  position: absolute;
  pointer-events: none;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.25;
  transform: translate(-50%, -110%);
  white-space: nowrap;
  display: none;
  z-index: 10;
}

.chart-wrap{
  position: relative;
}

input, select, button {
      width: 100%;
      box-sizing: border-box;
      padding: 10px;
      margin-top: 10px;
      font-size: 16px;
      border-radius: 8px;
      border: none;
      outline: none;
    }

button {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(135deg, #4CAF50, #3fa447);
  border: none;
  color: #08140a;
  -webkit-text-fill-color: #08140a;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(76,175,80,0.3);
}

    h1 { margin-bottom: 20px; }

    #result, #simple_result, #savings_result, #savings_interest_result, #interest_result, #savings_term_result, #term_result, #cp_result, #chg_result, #profit_result, #markup_result, #vat_result {
      margin-top: 20px;
      font-size: 18px;
      font-weight: bold;
      line-height: 1.5;
      text-align: center;
      word-break: break-word;
    }

    hr { border: 0; height: 1px; background: rgba(255,255,255,0.35); }
 #cp_table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 15px;
}

#cp_table thead tr {
  background: rgba(0,0,0,0.04);
}

body.dark #cp_table thead tr {
  background: rgba(255,255,255,0.05);
}

#cp_table th,
#cp_table td {
  padding: 10px 12px;
  text-align: left;
}

#cp_table th {
  font-weight: 600;
  border-bottom: 2px solid rgba(0,0,0,0.1);
}

body.dark #cp_table th {
  border-bottom: 2px solid rgba(255,255,255,0.15);
}

#cp_table td {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.dark #cp_table td {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#cp_table tbody tr:hover {
  background: rgba(76,175,80,0.07);
}

.money-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.money-label {
  font-size: 11px;
  opacity: 0.7;
}

.money-value {
  font-weight: bold;
  font-size: 15px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.chart-legend{
  display:flex;
  gap:16px;
  justify-content:center;
  align-items:center;
  font-size:13px;
  margin-top:10px;
  opacity:.95;
}

.legend-item{ display:flex; gap:8px; align-items:center; }

.legend-line{
  width:22px;
  height:0;
  border-top:2px solid rgba(255,255,255,0.95);
  display:inline-block;
}

.legend-line.dashed{
  border-top:2px dashed rgba(255,255,255,0.65);
}

.legend-line.solid{
  border-top-style:solid;
}

.light-theme{
  background: #f4f6f9;
  color: #111;
}

.light-theme .container{
  background: white;
  color: #111;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark .theme-toggle {
  background: #444;
  box-shadow: 0 0 12px rgba(255,255,255,0.15);
}

body.dark {
  background: #121212;
}

body.dark .container {
  background: #1e1e1e;
  color: #f1f1f1;
  box-shadow: 0 5px 25px rgba(0,0,0,0.6);
}

body:not(.dark) input,
body:not(.dark) select {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.06);
  color: #1c1f26;
  transition: all 0.25s ease;
}

body:not(.dark) input:hover,
body:not(.dark) select:hover {
  background: rgba(255,255,255,0.95);
}

body:not(.dark) input:focus,
body:not(.dark) select:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 0 4px rgba(76,175,80,0.15);
  background: white;
}

body.dark button {
  background: #2e7d32;
}

body.dark button:hover {
  background: #1b5e20;
}

body.dark hr {
  background: rgba(255,255,255,0.15);
}

body.dark #cp_table th {
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

body.dark #cp_table td {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.dark canvas {
  background: rgba(255,255,255,0.05) !important;
}

.nav{
  display:flex;
  justify-content:center;
  gap:20px;
  margin-bottom:20px;
}

body:not(.dark) .nav a {
  color: #1c1f26;
  padding: 8px 16px;
  border-radius: 30px;
  background: rgba(0,0,0,0.05);
  font-weight: 600;
  transition: all 0.25s ease;
}

body:not(.dark) .nav a:hover {
  background: rgba(76,175,80,0.18);
  color: #2e7d32;
}

.nav a.active {
  background: linear-gradient(135deg, #4CAF50, #3fa447);
  color: white !important;
}

.nav a:hover{
  opacity:1;
}

.input-group{
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2a2a;
}

body:not(.dark) .input-group{
  background: #f1f1f1;
}

.input-group input{
  flex: 1;
  border: none;
  padding: 10px 12px;
  margin: 0;
  background: transparent;
  color: inherit;
}

.input-suffix{
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 600;
  opacity: 0.7;
  background: rgba(0,0,0,0.15);
  white-space: nowrap;
}

body:not(.dark) .input-suffix{
  background: rgba(0,0,0,0.05);
}

body:not(.dark) input,
body:not(.dark) select {
  background: rgba(255,255,255,0.9);
  border: 1px solid #dce3ec;
  color: #1c1f26;
}

body:not(.dark) input:focus,
body:not(.dark) select:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

body:not(.dark) .fx-panel {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
}

/* Светлая тема — вкладки */
body:not(.dark) .nav a {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.05);
  color: #1c1f26;
  padding: 8px 16px;
  border-radius: 30px;
}

body:not(.dark) .nav a.active {
  background: linear-gradient(135deg, #4CAF50, #3fa447);
  color: white;
  box-shadow: 0 8px 20px rgba(76,175,80,0.3);
}

body:not(.dark) #cp_table th {
  border-bottom: 1px solid #e2e8f0;
}

body:not(.dark) #cp_table td {
  border-bottom: 1px solid #eef2f7;
}

body:not(.dark) #cp_table tr:hover {
  background: rgba(76,175,80,0.06);
}

.table-wrap {
  width: 100%;
  margin-top: 20px;
}

/* Светлая тема */
body:not(.dark) canvas {
  background: rgba(0,0,0,0.03);
}

/* Тёмная тема */
body.dark canvas {
  background: rgba(255,255,255,0.05);
}

#cp_table th:first-child,
#cp_table td:first-child {
  text-align: left;
  width: 60px;
}

#cp_table th:not(:first-child),
#cp_table td:not(:first-child) {
  text-align: right;
}

/* ===== Темная тема — курс валют ===== */
body.dark .fx-status{
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ===== Темная тема — вкладки ===== */
body.dark .nav a{
  color: #cfcfcf;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 500;
  opacity: 1;
  transition: all 0.25s ease;
}

body.dark .nav a:hover{
  background: rgba(76,175,80,0.15);
  color: #4CAF50;
}

body.dark .nav a.active{
  background: linear-gradient(135deg, #4CAF50, #3fa447);
  color: white !important;
  box-shadow: 0 8px 20px rgba(76,175,80,0.35);
}

/* Убираем underline полностью */
.nav a{
  text-decoration: none !important;
}

body.dark .nav a,
body:not(.dark) .nav a{
  position: relative;
  text-decoration: none;
  transition: 
    background 0.3s ease,
    color 0.3s ease,
    transform 0.25s ease,
    box-shadow 0.3s ease;
}

.nav a:hover{
  transform: translateY(-2px);
}

.nav a.active{
  transform: translateY(-2px);
}

body.dark .nav a.active{
  box-shadow: 0 6px 18px rgba(76,175,80,0.35);
}

/* Плавное исчезновение страницы */
body{
  opacity: 0;
  transform: translateY(10px);
  transition: 
    opacity 0.35s ease,
    transform 0.35s ease;
}

body.loaded{
  opacity: 1;
  transform: translateY(0);
}

.nav a,
.nav a:visited,
.nav a:hover,
.nav a:active,
.nav a:focus {
  text-decoration: none !important;
}

/* ===== SELECT как input (темная тема) ===== */
body.dark select {
  background: #2a2a2a;
  color: #f1f1f1;
  border: 1px solid rgba(255,255,255,0.08);
}

body.dark select:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.2);
}

body.dark select {
  border-radius: 8px;
  padding: 10px;
}

/* ===== FX панель в темной теме ===== */
body.dark .fx-panel {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 5px 25px rgba(0,0,0,0.6);
  backdrop-filter: none;
}

/* ===== Калькулятор изменения процентов ===== */

.change-result{
  margin-top:18px;
  padding:16px;
  border-radius:12px;
  font-size:16px;
  line-height:1.5;
  text-align:left;
  background:rgba(0,0,0,0.04);
}

body.dark .change-result{
  background:rgba(255,255,255,0.05);
}

.change-percent{
  font-size:22px;
  font-weight:700;
  margin-bottom:8px;
}

.change-up{
  color:#2e7d32;
}

.change-down{
  color:#d32f2f;
}

.change-row{
  display:flex;
  justify-content:space-between;
  font-size:14px;
  margin-top:4px;
}

.result-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-top:12px;
}

.result-actions button{
  width:auto;
  padding:8px 16px;
  font-size:14px;
}

.chart-wrap{
position: relative;
max-width: 720px;
margin: 20px auto;
}

#growthChart{
height: 320px !important;
}

#savingsGoalChart{
height: 280px !important;
}

input[readonly]{
opacity:0.7;
cursor:not-allowed;
background:rgba(0,0,0,0.05);
}

body.dark input[readonly]{
background:rgba(255,255,255,0.05);
}

.calc-summary{
margin-top:20px;
border:1px solid rgba(255,255,255,0.1);
border-radius:10px;
overflow:hidden;
background:rgba(255,255,255,0.02);
}

.summary-row{
display:flex;
justify-content:space-between;
padding:12px 16px;
border-bottom:1px solid rgba(255,255,255,0.05);
font-size:15px;
}

.summary-row:last-child{
border-bottom:none;
}

.summary-row span:first-child{
opacity:0.7;
}

body.dark .calc-summary{
border-color:rgba(255,255,255,0.14);
background:rgba(255,255,255,0.03);
}

body:not(.dark) .calc-summary{
border-color:rgba(0,0,0,0.1);
background:rgba(0,0,0,0.02);
}

body:not(.dark) .summary-row{
border-bottom:1px solid rgba(0,0,0,0.08);
}

.theme-btn{
position:fixed;
top:20px;
right:20px;
width:40px;
height:40px;
border-radius:50%;
border:none;
cursor:pointer;
background:#2a2a2a;
color:white;
font-size:18px;
}

.faq-section{
margin-top:22px;
padding-top:8px;
}

.faq-section h2{
margin-bottom:12px;
}

.faq-item{
border:1px solid rgba(255,255,255,0.12);
border-radius:10px;
padding:10px 12px;
margin-bottom:10px;
background:rgba(255,255,255,0.03);
}

.faq-item summary{
cursor:pointer;
font-weight:700;
line-height:1.4;
}

.faq-item p{
margin:10px 0 2px 0;
opacity:.9;
line-height:1.5;
}

/* Unify plain content links on SEO pages with the main site style */
body:not(.legal-page) .container > p a,
body:not(.legal-page) .faq-section p a,
body:not(.legal-page) .faq-section li a{
color:inherit;
text-decoration:none;
border-bottom:1px dotted currentColor;
}

body:not(.legal-page) .container > p a:link,
body:not(.legal-page) .container > p a:visited,
body:not(.legal-page) .faq-section p a:link,
body:not(.legal-page) .faq-section p a:visited,
body:not(.legal-page) .faq-section li a:link,
body:not(.legal-page) .faq-section li a:visited{
color:inherit;
}

body:not(.legal-page) .container > p a:hover,
body:not(.legal-page) .faq-section p a:hover,
body:not(.legal-page) .faq-section li a:hover{
opacity:.92;
}

.breadcrumbs{
display:flex;
flex-wrap:wrap;
align-items:center;
gap:8px;
margin:4px 0 14px;
font-size:13px;
line-height:1.4;
opacity:.9;
}

.breadcrumbs a{
text-decoration:none;
border-bottom:1px dotted currentColor;
color:inherit !important;
}

.breadcrumbs a:link,
.breadcrumbs a:visited,
.breadcrumbs a:hover,
.breadcrumbs a:active,
.breadcrumbs a:focus{
color:inherit !important;
}

.breadcrumbs .sep{
opacity:.55;
}

.breadcrumbs [aria-current="page"]{
font-weight:700;
}

.related-links{
margin-top:22px;
padding-top:8px;
}

.related-links h2{
margin-bottom:10px;
}

.related-links-list{
display:grid;
grid-template-columns:repeat(2, minmax(0, 1fr));
gap:10px;
}

.related-links-list a{
display:block;
padding:10px 12px;
border-radius:10px;
text-decoration:none;
border:1px solid rgba(255,255,255,0.12);
background:rgba(255,255,255,0.03);
line-height:1.4;
}

body.dark .related-links-list a{
color:#f1f3f5;
border-color:rgba(255,255,255,0.18);
}

body:not(.dark) .related-links-list a{
color:#222a34;
border-color:rgba(0,0,0,0.12);
background:rgba(0,0,0,0.02);
}

.related-links-list a:hover{
transform:translateY(-1px);
border-color:rgba(63, 192, 80, 0.8);
}

.popular-links{
margin-top:18px;
padding-top:8px;
}

.popular-links h2{
margin-bottom:10px;
}

.site-footer{
margin-top:20px;
padding-top:14px;
border-top:1px solid rgba(255,255,255,0.1);
font-size:13px;
line-height:1.4;
opacity:.72;
text-align:center;
}

body.dark .site-footer{
color:#e6e6e6;
opacity:.95;
border-top-color:rgba(255,255,255,0.22);
}

body:not(.dark) .site-footer{
color:#2a2f38;
opacity:.85;
border-top-color:rgba(0,0,0,0.14);
}

.site-footer a{
color:inherit;
text-decoration:none;
border-bottom:1px dashed rgba(255,255,255,0.45);
}

body.dark .site-footer a{
border-bottom-color:rgba(255,255,255,0.75);
}

body:not(.dark) .site-footer a{
border-bottom-color:rgba(0,0,0,0.4);
}

.site-footer a:hover{
opacity:1;
border-bottom-color:rgba(255,255,255,0.85);
}

body:not(.dark) .site-footer a:hover{
border-bottom-color:rgba(0,0,0,0.75);
}

.footer-sep{
display:inline-block;
margin:0 8px;
opacity:.5;
}

.cookie-banner{
position:fixed;
left:16px;
right:16px;
bottom:16px;
bottom:calc(16px + env(safe-area-inset-bottom, 0px));
z-index:1200;
display:flex;
justify-content:center;
}

.cookie-content{
width:min(920px, 100%);
background:rgba(22,22,24,0.92);
border:1px solid rgba(255,255,255,0.16);
border-radius:14px;
padding:14px 16px;
box-shadow:0 16px 34px rgba(0,0,0,0.28);
backdrop-filter:blur(8px);
}

.cookie-content p{
margin:0 0 10px 0;
font-size:14px;
line-height:1.45;
text-align:left;
color:#f2f2f2;
}

.cookie-actions{
display:flex;
gap:10px;
align-items:center;
flex-wrap:wrap;
}

.cookie-btn{
width:auto;
margin-top:0;
padding:9px 14px;
font-size:14px;
border-radius:9px;
cursor:pointer;
border:none;
color:#08140a;
-webkit-text-fill-color:#08140a;
-webkit-appearance:none;
appearance:none;
}

.cookie-btn.primary{
background:linear-gradient(135deg,#4CAF50,#3fa447);
}

.cookie-link{
font-size:14px;
opacity:.9;
color:#e8f5e9;
text-decoration:underline;
text-underline-offset:2px;
}

.mfo-row{
display:grid;
grid-template-columns: 1.1fr 1fr 0.8fr auto;
gap:10px;
align-items:center;
margin-top:10px;
}

.mfo-row .mfo-name,
.mfo-row .mfo-amount,
.mfo-row .mfo-rate{
margin-top:0;
}

.btn-mfo-remove{
width:auto;
margin-top:0;
padding:10px 12px;
background:rgba(255,255,255,0.08);
}

body:not(.dark) .btn-mfo-remove{
background:rgba(0,0,0,0.06);
color:#1c1f26;
}

.mfo-row-actions{
margin-top:10px;
}

.mfo-row-actions button{
width:auto;
margin-top:0;
}

.term-progress{
margin-top:12px;
padding:10px 12px;
border:1px solid rgba(255,255,255,0.1);
border-radius:10px;
background:rgba(255,255,255,0.03);
}

.term-progress-head{
font-size:13px;
opacity:.9;
margin-bottom:8px;
text-align:left;
}

.term-progress-track{
position:relative;
height:10px;
border-radius:999px;
background:rgba(255,255,255,0.12);
overflow:hidden;
}

.term-progress-fill-next{
position:absolute;
left:0;
top:0;
height:100%;
width:0;
border-radius:999px;
background:linear-gradient(90deg,rgba(142,212,145,0.85),rgba(94,181,97,0.85));
transition:width 0.35s ease;
z-index:1;
}

.term-progress-fill{
position:absolute;
left:0;
top:0;
height:100%;
width:0;
border-radius:999px;
background:linear-gradient(90deg,#4CAF50,#2ea043);
transition:width 0.35s ease;
z-index:2;
}

body:not(.dark) .cookie-content{
background:rgba(255,255,255,0.95);
border-color:rgba(0,0,0,0.12);
}

body:not(.dark) .cookie-content p{
color:#1e1f22;
}

body:not(.dark) .cookie-link{
color:#246b2d;
}

body:not(.dark) .term-progress{
background:rgba(76,175,80,0.06);
border-color:rgba(0,0,0,0.1);
}

body:not(.dark) .term-progress-track{
background:rgba(0,0,0,0.12);
}

body.legal-page{
text-align:left;
}

body.legal-page .container{
text-align:left;
}

body.legal-page h1,
body.legal-page h2,
body.legal-page h3,
body.legal-page p,
body.legal-page li{
text-align:left;
}

body.legal-page ul{
padding-left:22px;
}

body.legal-page .site-footer{
text-align:center;
}

/* Better readable inline links on legal/about content, especially in dark theme */
body.legal-page .container p a,
body.legal-page .container li a{
text-decoration:underline;
text-underline-offset:2px;
}

body.dark.legal-page .container p a,
body.dark.legal-page .container li a{
color:#7dc4ff;
}

body.dark.legal-page .container p a:hover,
body.dark.legal-page .container li a:hover{
color:#a8dbff;
}

body:not(.dark).legal-page .container p a,
body:not(.dark).legal-page .container li a{
color:#1f5ea8;
}

@media (max-width: 768px) {
  body {
    padding-top: 18px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .fx-panel,
  .container {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 18px;
    border-radius: 16px;
  }

  .fx-panel {
    margin-top: 56px;
    margin-bottom: 16px;
  }

  .fx-row {
    gap: 8px;
  }

  .fx-row select {
    min-width: 0;
    flex: 1 1 100%;
  }

  .nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }

  .nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .breadcrumbs{
    font-size:12px;
    margin-bottom:12px;
  }

  .related-links-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  h2 {
    font-size: 18px;
    line-height: 1.3;
  }

  input,
  select,
  button {
    font-size: 16px;
  }

  .input-group {
    border-radius: 10px;
  }

  .input-group input {
    min-width: 0;
  }

  .input-suffix {
    min-width: 54px;
    font-size: 14px;
    padding: 0 10px;
  }

  #result,
  #simple_result,
  #savings_result,
  #profit_result,
  #markup_result,
  #vat_result,
  #cp_result,
  #chg_result {
    font-size: 17px;
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .result-actions button {
    width: 100%;
  }

  #cp_table {
    font-size: 13px;
  }

  #cp_table th,
  #cp_table td {
    padding: 8px 10px;
  }

  .summary-row {
    padding: 10px 12px;
    font-size: 14px;
    gap: 12px;
  }

  .chart-wrap {
    margin: 16px auto;
  }

  #growthChart {
    height: 240px !important;
  }

  #savingsGoalChart{
    height: 220px !important;
  }

  .faq-item{
    padding:10px;
  }

  .mfo-row{
    grid-template-columns: 1fr;
    gap:8px;
  }

  .btn-mfo-remove,
  .mfo-row-actions button{
    width:100%;
  }

  .faq-item summary{
    font-size:15px;
  }

  .site-footer{
    margin-top:16px;
    padding-top:12px;
    font-size:12px;
    line-height:1.6;
  }

  .site-footer a{
    display:inline-block;
    white-space:nowrap;
    margin:2px 4px;
  }

  .footer-sep{
    display:none;
  }

  .cookie-banner{
    left:10px;
    right:10px;
    bottom:10px;
    bottom:calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .cookie-content{
    padding:12px;
    border-radius:12px;
  }

  .cookie-content p{
    font-size:13px;
    margin-bottom:8px;
  }

  .cookie-actions{
    gap:8px;
  }

  .cookie-btn,
  .cookie-link{
    font-size:13px;
  }

  .theme-toggle,
  .theme-btn {
    top: 14px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .lang-corner-toggle{
    top: 22px;
    right: 58px;
    width: 68px;
    min-width: 68px;
    height: 40px;
    line-height: 1;
    padding: 0 6px;
    font-size: 13px;
    text-align: center;
    text-align-last: center;
  }
}

@media (max-width: 480px) {
  body {
    padding-left: 8px;
    padding-right: 8px;
  }

  .fx-panel,
  .container {
    padding: 14px;
    border-radius: 14px;
  }

  .fx-panel {
    margin-top: 54px;
  }

  h1 {
    font-size: 21px;
  }

  h2 {
    font-size: 17px;
  }

  .fx-status {
    font-size: 11px;
    line-height: 1.4;
  }

  .nav a {
    padding: 8px 12px;
    font-size: 14px;
  }

  .input-suffix {
    min-width: 50px;
    font-size: 13px;
  }

  #cp_table {
    font-size: 12px;
  }

  #cp_table th,
  #cp_table td {
    padding: 7px 8px;
  }

  .site-footer{
    line-height:1.7;
  }

  .site-footer a{
    margin:3px 5px;
  }

  .lang-corner-toggle{
    top: 22px;
    right: 56px;
    width: 66px;
    min-width: 66px;
  }
}
