@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root{
  --bg:#07090f;
  --bg2:#0d1020;
  --card:rgba(13,16,28,.84);
  --card2:rgba(20,24,40,.92);
  --glass:rgba(255,255,255,.045);
  --glass-brd:rgba(255,255,255,.09);
  --text:#e8eaf6;
  --muted:#8a96b3;
  --border:rgba(255,255,255,.08);
  --accent:#2563eb;
  --accent-glow:rgba(37,99,235,.28);
  --accent2:#facc15;
  --accent2-glow:rgba(250,204,21,.22);
  --ok:#10b981;
  --ok-bg:rgba(16,185,129,.10);
  --ok-brd:rgba(16,185,129,.36);
  --danger:#f43f5e;
  --danger-bg:rgba(244,63,94,.10);
  --warn:#f59e0b;
  --warn-bg:rgba(245,158,11,.11);
  --shadow:0 24px 60px rgba(0,0,0,.52);
  --shadow-sm:0 4px 20px rgba(0,0,0,.34);
  --pill:rgba(255,255,255,.055);
  --inp:rgba(0,0,0,.28);
  --radius:20px;
  --radius-sm:12px;
  --radius-xs:8px;
}

[data-theme="light"]{
  --bg:#f3f6fb;
  --bg2:#e8edf8;
  --card:rgba(255,255,255,.88);
  --card2:rgba(247,249,255,.96);
  --glass:rgba(255,255,255,.64);
  --glass-brd:rgba(37,99,235,.14);
  --text:#172033;
  --muted:#65718c;
  --border:rgba(37,99,235,.13);
  --accent-glow:rgba(37,99,235,.18);
  --accent2-glow:rgba(250,204,21,.20);
  --ok-bg:rgba(16,185,129,.08);
  --ok-brd:rgba(16,185,129,.30);
  --danger-bg:rgba(244,63,94,.08);
  --warn-bg:rgba(245,158,11,.09);
  --shadow:0 24px 60px rgba(37,99,235,.11);
  --shadow-sm:0 4px 20px rgba(16,24,40,.08);
  --pill:rgba(37,99,235,.055);
  --inp:rgba(255,255,255,.92);
}

*{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  min-height:100vh;
  overflow-x:hidden;
  background:
    radial-gradient(circle at 8% -8%,rgba(37,99,235,.18),transparent 34%),
    radial-gradient(circle at 88% 8%,rgba(250,204,21,.13),transparent 30%),
    linear-gradient(180deg,var(--bg),var(--bg2));
  color:var(--text);
  line-height:1.5;
  transition:background .3s,color .3s;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);
  background-size:48px 48px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.65),transparent 72%);
  z-index:0;
}

.wrap{
  position:relative;
  z-index:1;
  max-width:1280px;
  margin:0 auto;
  padding:28px 24px 48px;
}

.hdr{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:24px;
  padding:20px 24px;
  background:var(--card);
  border:1px solid var(--glass-brd);
  border-radius:var(--radius);
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow-sm);
}

h1{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  font-size:clamp(24px,3vw,34px);
  font-weight:900;
  letter-spacing:-.035em;
}

.ua-flag-premium{
  width:50px;
  height:36px;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  isolation:isolate;
  filter:
    drop-shadow(0 12px 22px rgba(37,99,235,.38))
    drop-shadow(0 6px 18px rgba(250,204,21,.26))
    drop-shadow(0 0 14px rgba(255,255,255,.10));
}
.ua-flag-premium::before{
  content:"";
  position:absolute;
  width:54px;
  height:38px;
  border-radius:999px;
  background:
    radial-gradient(circle at 68% 38%,rgba(96,165,250,.26),transparent 58%),
    radial-gradient(circle at 56% 70%,rgba(250,204,21,.22),transparent 60%);
  filter:blur(10px);
  opacity:.82;
  z-index:-1;
  animation:uaFlagAura 4.8s ease-in-out infinite;
}
.ua-flag-svg{
  width:50px;
  height:36px;
  display:block;
  overflow:visible;
}
.ua-flag-cloth,
.ua-flag-blue,
.ua-flag-gold,
.ua-flag-sheen,
.ua-flag-folds,
.ua-flag-ridge,
.ua-flag-edge,
.ua-flag-free-edge,
.ua-flag-pole-shine{
  transform-box:fill-box;
  transform-origin:12% 50%;
  will-change:transform,opacity,filter;
}
.ua-flag-cloth{
  animation:uaFlagClothWave 3.15s cubic-bezier(.42,0,.22,1) infinite;
}
.ua-flag-blue{
  animation:uaFlagBlueBreath 3.85s ease-in-out infinite;
}
.ua-flag-gold{
  animation:uaFlagGoldBreath 3.85s ease-in-out infinite;
}
.ua-flag-sheen{
  mix-blend-mode:screen;
  animation:uaFlagSheenSlide 2.9s ease-in-out infinite;
}
.ua-flag-folds{
  animation:uaFlagFoldDrift 2.75s ease-in-out infinite;
}
.ua-flag-ridge{
  animation:uaFlagRidgePulse 3.2s ease-in-out infinite;
}
.ua-flag-edge{
  animation:uaFlagEdgeGlow 3.6s ease-in-out infinite;
}
.ua-flag-free-edge{
  animation:uaFlagFreeEdge 2.65s ease-in-out infinite;
}
.ua-flag-pole-shine{
  animation:uaFlagPoleShine 4.2s ease-in-out infinite;
}
@keyframes uaFlagAura{
  0%,100%{transform:scale(.96);opacity:.58;}
  45%{transform:scale(1.08);opacity:.92;}
  72%{transform:scale(1.01);opacity:.72;}
}
@keyframes uaFlagClothWave{
  0%,100%{transform:translateX(0) translateY(0) skewY(0deg) scaleY(1) rotate(0deg);}
  18%{transform:translateX(.9px) translateY(-.35px) skewY(-1.45deg) scaleY(1.026) rotate(-.25deg);}
  43%{transform:translateX(-.45px) translateY(.2px) skewY(.92deg) scaleY(.988) rotate(.18deg);}
  68%{transform:translateX(1.25px) translateY(-.15px) skewY(-.72deg) scaleY(1.014) rotate(-.12deg);}
  84%{transform:translateX(.25px) translateY(.25px) skewY(.38deg) scaleY(.997) rotate(.08deg);}
}
@keyframes uaFlagBlueBreath{
  0%,100%{transform:translateY(0) scaleY(1);filter:saturate(1.05) brightness(1.02);}
  44%{transform:translateY(-.75px) scaleY(1.035);filter:saturate(1.25) brightness(1.12);}
  72%{transform:translateY(.22px) scaleY(.992);filter:saturate(1.10) brightness(1.05);}
}
@keyframes uaFlagGoldBreath{
  0%,100%{transform:translateY(0) scaleY(1);filter:saturate(1.06) brightness(1.02);}
  44%{transform:translateY(.7px) scaleY(1.03);filter:saturate(1.28) brightness(1.13);}
  72%{transform:translateY(-.2px) scaleY(.994);filter:saturate(1.10) brightness(1.05);}
}
@keyframes uaFlagSheenSlide{
  0%,100%{transform:translateX(-23px) skewX(-10deg);opacity:.12;}
  36%{transform:translateX(6px) skewX(-10deg);opacity:.62;}
  58%{transform:translateX(23px) skewX(-10deg);opacity:.34;}
  76%{transform:translateX(34px) skewX(-10deg);opacity:.16;}
}
@keyframes uaFlagFoldDrift{
  0%,100%{transform:translateX(-1.5px) scaleX(.985);opacity:.56;}
  38%{transform:translateX(2.1px) scaleX(1.018);opacity:.96;}
  68%{transform:translateX(.45px) scaleX(.998);opacity:.70;}
}
@keyframes uaFlagRidgePulse{
  0%,100%{transform:translateX(-.7px);opacity:.34;}
  48%{transform:translateX(1.3px);opacity:.78;}
}
@keyframes uaFlagEdgeGlow{
  0%,100%{transform:translateX(0);opacity:.50;}
  50%{transform:translateX(.8px);opacity:.92;}
}
@keyframes uaFlagFreeEdge{
  0%,100%{transform:translateX(0) translateY(0) skewY(0deg);opacity:.72;}
  40%{transform:translateX(1.6px) translateY(-1px) skewY(-1.2deg);opacity:1;}
  70%{transform:translateX(.55px) translateY(.55px) skewY(.7deg);opacity:.82;}
}
@keyframes uaFlagPoleShine{
  0%,100%{transform:translateY(-9px);opacity:.18;}
  44%{transform:translateY(18px);opacity:.58;}
  78%{transform:translateY(30px);opacity:.12;}
}
@media (prefers-reduced-motion: reduce){
  .ua-flag-premium::before,
  .ua-flag-cloth,
  .ua-flag-blue,
  .ua-flag-gold,
  .ua-flag-sheen,
  .ua-flag-folds,
  .ua-flag-ridge,
  .ua-flag-edge,
  .ua-flag-free-edge,
  .ua-flag-pole-shine{animation:none;}
}
.h1-text{
  background:linear-gradient(135deg,#dbeafe 0%,#60a5fa 42%,#facc15 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.v-badge{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(250,204,21,.32);
  background:linear-gradient(135deg,rgba(37,99,235,.18),rgba(250,204,21,.12));
  color:#fef3c7;
  border-radius:999px;
  padding:4px 10px;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.03em;
}
[data-theme="light"] .v-badge{color:#1d4ed8;}
.subtitle{
  margin-top:6px;
  color:var(--muted);
  font-size:.88rem;
  font-weight:500;
}

.theme-toggle{
  position:relative;
  width:64px;
  height:34px;
  flex-shrink:0;
  border:0;
  background:none;
  cursor:pointer;
  padding:0;
}
.toggle-track{
  position:absolute;
  inset:0;
  overflow:hidden;
  border-radius:999px;
  background:linear-gradient(135deg,#172554,#1e3a8a);
  border:1px solid rgba(96,165,250,.38);
  box-shadow:inset 0 2px 8px rgba(0,0,0,.38),0 0 16px rgba(37,99,235,.18);
  transition:all .35s;
}
.toggle-track::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,#fef9c3,#fde68a,#facc15);
  opacity:0;
  transition:opacity .35s;
}
[data-theme="light"] .toggle-track::before{opacity:1;}
.toggle-thumb{
  position:absolute;
  top:4px;
  left:4px;
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(135deg,#bfdbfe,#60a5fa);
  box-shadow:0 2px 10px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.32);
  transition:transform .35s,background .35s;
}
[data-theme="light"] .toggle-thumb{
  transform:translateX(30px);
  background:linear-gradient(135deg,#fef08a,#facc15);
}
.thumb-sun{display:none;}
[data-theme="light"] .thumb-moon{display:none;}
[data-theme="light"] .thumb-sun{display:inline;}

.tabs-nav{
  display:flex;
  gap:8px;
  margin-bottom:24px;
  padding:6px;
  background:var(--card);
  border:1px solid var(--glass-brd);
  border-radius:var(--radius);
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow-sm);
}
.tab-btn{
  flex:1;
  min-width:0;
  position:relative;
  overflow:hidden;
  border:0;
  border-radius:14px;
  padding:12px 14px;
  background:transparent;
  color:var(--muted);
  font:700 .9rem 'Inter',sans-serif;
  cursor:pointer;
  transition:color .2s,box-shadow .2s,transform .12s;
}
.tab-btn::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:0;
  border-radius:14px;
  background:linear-gradient(135deg,var(--accent),#1d4ed8 56%,var(--accent2));
  transition:opacity .2s;
}
.tab-btn span{position:relative;z-index:1;}
.tab-btn:hover{color:var(--text);}
.tab-btn:hover::before{opacity:.08;}
.tab-btn.active{color:#fff;box-shadow:0 4px 18px var(--accent-glow);}
.tab-btn.active::before{opacity:1;}
.tab-panel{display:none;animation:fadeUp .22s ease;}
.tab-panel.active{display:block;}
@keyframes fadeUp{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}

.layout-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);
  gap:20px;
  align-items:start;
}
.card{
  background:var(--card);
  border:1px solid var(--glass-brd);
  border-radius:var(--radius);
  padding:22px;
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow);
}
.card + .card{margin-top:16px;}
.card:hover{border-color:rgba(37,99,235,.20);}
h2{
  margin-bottom:14px;
  color:var(--text);
  font-size:18px;
  font-weight:800;
  letter-spacing:-.015em;
}
.panel-title{
  font-size:clamp(22px,2.4vw,30px);
  line-height:1.2;
  margin-bottom:10px;
}
.lead{color:var(--muted);font-size:.96rem;max-width:780px;}
.muted{color:var(--muted);}
.placeholder-box{
  margin-top:16px;
  display:grid;
  gap:10px;
}
.placeholder-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  background:var(--pill);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  color:var(--muted);
  font-size:.9rem;
}
.placeholder-row strong{color:var(--text);}
.ad-slot{
  min-height:92px;
  display:grid;
  place-items:center;
  text-align:center;
  padding:18px;
  border:1px dashed rgba(250,204,21,.35);
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,rgba(37,99,235,.055),rgba(250,204,21,.055));
  color:var(--muted);
  font-size:.84rem;
}
.footer{
  margin-top:26px;
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  background:var(--card);
  border:1px solid var(--glass-brd);
  border-radius:var(--radius);
  color:var(--muted);
  font-size:.84rem;
  backdrop-filter:blur(18px);
}
.footer a{
  color:var(--text);
  text-decoration:none;
  border-bottom:1px solid transparent;
}
.footer a:hover{border-bottom-color:var(--accent2);}
.footer-links{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.footer-disclaimer{flex-basis:100%;font-size:.78rem;opacity:.82;}

#toasts{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:9999;
  display:flex;
  flex-direction:column-reverse;
  gap:10px;
  pointer-events:none;
}
.toast{
  min-width:220px;
  max-width:360px;
  padding:14px 18px;
  border-radius:var(--radius-sm);
  background:var(--card2);
  border:1px solid var(--glass-brd);
  border-left:4px solid var(--accent);
  box-shadow:0 8px 30px rgba(0,0,0,.44);
  color:var(--text);
  font-size:.88rem;
  font-weight:700;
  opacity:0;
  transform:translateX(24px) scale(.98);
  transition:opacity .2s,transform .2s;
  backdrop-filter:blur(18px);
}
.toast.show{opacity:1;transform:translateX(0) scale(1);}
.toast.ok{border-left-color:var(--ok);}
.toast.warn{border-left-color:var(--warn);}

button{font-family:'Inter',sans-serif;}
.btn-s{
  border:1px solid var(--glass-brd);
  border-radius:var(--radius-sm);
  background:var(--glass);
  color:var(--text);
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
  transition:transform .12s,border-color .2s,box-shadow .2s;
}
.btn-s:hover{
  transform:translateY(-1px);
  border-color:var(--accent);
  box-shadow:0 0 14px var(--accent-glow);
}


label.block{
  display:block;
  margin:14px 0 7px;
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.045em;
  text-transform:uppercase;
}
input[type=number],input[type=text],input[type=email],input[type=date],select,textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:11px 14px;
  background:var(--inp);
  color:var(--text);
  outline:none;
  font:500 .92rem 'Inter',system-ui,sans-serif;
  transition:border-color .2s,box-shadow .2s,background .25s;
}
select{
  appearance:none;
  -webkit-appearance:none;
  padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a96b3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
}
textarea{min-height:140px;resize:vertical;}
input[type=number]:focus,input[type=text]:focus,input[type=email]:focus,input[type=date]:focus,select:focus,textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-glow);
}

.tax-form{margin-top:18px;}
.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}
.result-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
.result-card{
  min-width:0;
  padding:15px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,var(--glass),rgba(37,99,235,.045));
}
.result-total{
  border-color:rgba(250,204,21,.38);
  background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(250,204,21,.10));
}
.result-label{
  color:var(--muted);
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.result-value{
  margin-top:7px;
  color:var(--text);
  font-size:clamp(20px,2.3vw,28px);
  line-height:1.12;
  font-weight:900;
  letter-spacing:-.035em;
}
.formula-note{
  margin-top:12px;
  color:var(--muted);
  font-size:.86rem;
}
.table-wrap{
  margin-top:14px;
  overflow:auto;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
}
table{
  width:100%;
  border-collapse:collapse;
  font-size:.86rem;
}
th,td{
  padding:12px 14px;
  text-align:left;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}
th{
  color:var(--muted);
  background:rgba(37,99,235,.08);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}
tr:last-child td{border-bottom:0;}
.source-line{
  margin-top:12px;
  color:var(--muted);
  font-size:.84rem;
}
.disclaimer-box{
  margin-top:12px;
  padding:14px 16px;
  border:1px solid rgba(245,158,11,.24);
  border-radius:var(--radius-sm);
  background:var(--warn-bg);
  color:var(--text);
  font-size:.88rem;
}
.seo-text p{
  color:var(--muted);
  font-size:.95rem;
}
.rate-list{
  display:grid;
  gap:10px;
}
.rate-list div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid var(--border);
  color:var(--muted);
  font-size:.87rem;
}
.rate-list div:last-child{border-bottom:0;}
.rate-list strong{
  color:var(--text);
  white-space:nowrap;
  text-align:right;
}
.tax-ad-slot{margin-top:18px;}

.nbu-status{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  color:var(--muted);
  font-size:.86rem;
}
.nbu-status span{
  padding:7px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--pill);
}
.rate-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.currency-card{
  min-width:0;
  padding:15px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,var(--glass),rgba(37,99,235,.045));
}
.currency-code{
  color:var(--muted);
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.currency-value{
  margin-top:8px;
  color:var(--text);
  font-size:clamp(20px,2.2vw,27px);
  line-height:1.12;
  font-weight:900;
  letter-spacing:-.03em;
}
.currency-date{
  margin-top:6px;
  color:var(--muted);
  font-size:.78rem;
}
.nbu-warning{
  display:none;
  margin-top:14px;
  padding:13px 15px;
  border:1px solid rgba(245,158,11,.28);
  border-radius:var(--radius-sm);
  background:var(--warn-bg);
  color:var(--text);
  font-size:.88rem;
}
.nbu-warning.show{display:block;}
.converter-grid{
  display:grid;
  grid-template-columns:1.1fr .8fr .8fr;
  gap:12px;
  margin-top:14px;
}
.converter-result{
  margin-top:14px;
  padding:15px;
  border:1px solid rgba(250,204,21,.30);
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(250,204,21,.08));
}
.converter-result .result-label{margin-bottom:6px;}
.converter-result strong{
  display:block;
  color:var(--text);
  font-size:clamp(24px,3vw,34px);
  line-height:1.1;
  letter-spacing:-.035em;
}
.rate-actions{margin-top:14px;}


.check-line{
  margin-top:14px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  color:var(--text);
  font-size:.9rem;
  font-weight:700;
}
.check-line input{
  width:18px;
  height:18px;
  margin-top:1px;
  accent-color:var(--accent);
  flex-shrink:0;
}
.client-mode-extra{display:none;}
.client-mode-extra.show{display:block;}
.client-summary{
  margin-top:12px;
  color:var(--muted);
  font-size:.86rem;
}
.client-summary strong{color:var(--text);}

.invoice-preview{
  margin-top:16px;
  padding:24px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:rgba(255,255,255,.96);
  color:#172033;
  box-shadow:var(--shadow-sm);
}
[data-theme="dark"] .invoice-preview{
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(245,248,255,.96));
  color:#172033;
}
.invoice-preview-head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  padding-bottom:16px;
  border-bottom:2px solid #dbe4f0;
}
.invoice-preview h3{
  margin:0;
  font-size:24px;
  line-height:1.15;
  letter-spacing:-.03em;
  color:#111827;
}
.invoice-preview .inv-meta{
  color:#4b5563;
  font-size:.88rem;
  text-align:right;
}
.invoice-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:18px;
}
.invoice-box{
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#f9fafb;
}
.invoice-box-title{
  margin-bottom:8px;
  color:#6b7280;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.invoice-box p{
  margin:4px 0;
  color:#1f2937;
  font-size:.88rem;
}
.invoice-preview table{
  margin-top:18px;
  color:#172033;
  border-color:#e5e7eb;
}
.invoice-preview th{
  color:#4b5563;
  background:#eef2ff;
  border-color:#e5e7eb;
}
.invoice-preview td{border-color:#e5e7eb;}
.invoice-total-line{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
}
.invoice-total-line strong{
  min-width:260px;
  padding:14px 16px;
  border-radius:12px;
  background:#eff6ff;
  color:#111827;
  text-align:right;
  font-size:20px;
}
.invoice-note-preview{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #e5e7eb;
  color:#4b5563;
  font-size:.84rem;
}
.invoice-actions-note{
  margin-top:10px;
  color:var(--muted);
  font-size:.82rem;
}

.faq-grid{
  display:grid;
  gap:12px;
  margin-top:14px;
}
.faq-item{
  padding:16px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,var(--glass),rgba(37,99,235,.045));
}
.faq-item h3{
  margin:0 0 8px;
  color:var(--text);
  font-size:1rem;
  font-weight:800;
  letter-spacing:-.01em;
}
.faq-item p{
  margin:0;
  color:var(--muted);
  font-size:.92rem;
}



@media(max-width:900px){
  .hdr{align-items:flex-start;}
  .tabs-nav{overflow:auto;}
  .tab-btn{flex:0 0 auto;white-space:nowrap;}
  .layout-grid{grid-template-columns:1fr;}
  .form-grid{grid-template-columns:1fr;}
  .result-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .rate-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .converter-grid{grid-template-columns:1fr;}
}
@media(max-width:640px){
  .wrap{padding:18px 14px 36px;}
  .hdr{padding:18px;flex-direction:row;}
  .subtitle{font-size:.82rem;}
  .card{padding:18px;}
  .placeholder-row{align-items:flex-start;flex-direction:column;}
  .result-grid{grid-template-columns:1fr;}
  .rate-grid{grid-template-columns:1fr;}
  .footer{align-items:flex-start;flex-direction:column;}
}


.static-nav .tab-btn{
  text-decoration:none;
  text-align:center;
  display:block;
}
.static-nav .tab-btn.active-page{color:#fff;box-shadow:0 4px 18px var(--accent-glow);}
.static-nav .tab-btn.active-page::before{opacity:1;}
.static-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,.36fr);
  gap:20px;
  align-items:start;
}
.about-layout-full{grid-template-columns:1fr;}
.static-content h2{margin-top:22px;}
.static-content h2:first-child{margin-top:0;}
.static-content p,
.static-content li{
  color:var(--muted);
  font-size:.96rem;
}
.static-content p{margin:10px 0;}
.static-content ul{padding-left:20px;margin:10px 0;}
.static-content strong{color:var(--text);}
.static-card-list{display:grid;gap:12px;margin-top:14px;}
.static-card-list .placeholder-row{align-items:flex-start;}
.static-card-list .placeholder-row span{line-height:1.45;}
@media(max-width:900px){.static-layout{grid-template-columns:1fr;}}


/* Clean knowledge base page */
.knowledge-hero{
  position:relative;
  overflow:hidden;
  padding:28px;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.18), transparent 36%),
    radial-gradient(circle at bottom right, rgba(250,204,21,.10), transparent 34%),
    var(--card);
}
.knowledge-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid rgba(250,204,21,.28);
  background:rgba(250,204,21,.08);
  color:var(--accent2);
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:12px;
}
.knowledge-title{
  font-size:clamp(28px,4vw,46px);
  line-height:1.05;
  letter-spacing:-.045em;
  margin:0 0 12px;
}
.knowledge-subtitle{
  color:var(--muted);
  max-width:820px;
  font-size:1.02rem;
  line-height:1.65;
}
.knowledge-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}
.knowledge-pill{
  border:1px solid var(--border);
  background:rgba(255,255,255,.045);
  border-radius:999px;
  padding:9px 12px;
  color:var(--text);
  font-size:.86rem;
  font-weight:800;
}
.knowledge-section{
  margin-top:18px;
}
.knowledge-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}
.knowledge-section-head h2{
  margin:0;
  font-size:22px;
}
.knowledge-section-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:.92rem;
}
.featured-grid,
.knowledge-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.knowledge-grid.compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.article-card{
  display:block;
  min-height:128px;
  padding:16px;
  border-radius:16px;
  border:1px solid var(--border);
  background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.025));
  text-decoration:none;
  color:var(--text);
  transition:transform .16s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.article-card:hover{
  transform:translateY(-2px);
  border-color:rgba(250,204,21,.35);
  box-shadow:0 16px 42px rgba(0,0,0,.28);
  background:linear-gradient(145deg,rgba(37,99,235,.12),rgba(250,204,21,.055));
}
.article-card.featured{
  min-height:154px;
  border-color:rgba(250,204,21,.24);
  background:
    radial-gradient(circle at top right, rgba(250,204,21,.13), transparent 34%),
    linear-gradient(145deg,rgba(37,99,235,.11),rgba(255,255,255,.035));
}
.article-label{
  display:inline-flex;
  margin-bottom:10px;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(37,99,235,.12);
  border:1px solid rgba(37,99,235,.20);
  color:#b9cdfd;
  font-size:.72rem;
  font-weight:900;
}
.article-title{
  display:block;
  font-weight:900;
  letter-spacing:-.02em;
  line-height:1.25;
  margin-bottom:8px;
}
.article-desc{
  display:block;
  color:var(--muted);
  font-size:.86rem;
  line-height:1.45;
}
.article-more{
  display:inline-flex;
  margin-top:12px;
  color:var(--accent2);
  font-size:.84rem;
  font-weight:900;
}
.knowledge-cta{
  margin-top:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border:1px solid rgba(250,204,21,.22);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(250,204,21,.09),rgba(37,99,235,.08));
}
.knowledge-cta strong{display:block;color:var(--text);margin-bottom:4px;}
.knowledge-cta span{display:block;color:var(--muted);font-size:.9rem;}
.knowledge-cta .btn-s{text-decoration:none;white-space:nowrap;}
.footer.simple-footer{
  align-items:flex-start;
}
.footer.simple-footer .footer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-basis:100%;
  flex-wrap:wrap;
}
.footer.simple-footer .footer-links{
  gap:8px 10px;
}
@media(max-width:900px){
  .featured-grid,
  .knowledge-grid,
  .knowledge-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:640px){
  .knowledge-hero{padding:22px;}
  .featured-grid,
  .knowledge-grid,
  .knowledge-grid.compact{grid-template-columns:1fr;}
  .knowledge-section-head{display:block;}
  .knowledge-cta{display:block;}
  .knowledge-cta .btn-s{display:inline-flex;margin-top:12px;}
}



/* v17: cleaner light theme, lower glow, higher readability */
[data-theme="light"]{
  --bg:#f6f8fc;
  --bg2:#eef3fa;
  --card:rgba(255,255,255,.98);
  --card2:rgba(248,250,252,.98);
  --glass:rgba(248,250,252,.92);
  --glass-brd:rgba(15,23,42,.10);
  --text:#172033;
  --muted:#526079;
  --border:rgba(15,23,42,.11);
  --accent-glow:rgba(37,99,235,.10);
  --accent2-glow:rgba(217,119,6,.08);
  --shadow:0 18px 46px rgba(15,23,42,.08);
  --shadow-sm:0 6px 20px rgba(15,23,42,.06);
  --pill:rgba(37,99,235,.045);
  --inp:rgba(255,255,255,.98);
}
[data-theme="light"] body{
  background:linear-gradient(180deg,#f7f9fd 0%,#eef3fa 100%);
}
[data-theme="light"] body::before{
  opacity:.32;
  background:
    linear-gradient(rgba(15,23,42,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(15,23,42,.025) 1px,transparent 1px);
}
[data-theme="light"] .card,
[data-theme="light"] .hdr,
[data-theme="light"] .site-nav,
[data-theme="light"] .tabs-nav{
  background:rgba(255,255,255,.98);
  border-color:rgba(15,23,42,.10);
  box-shadow:0 10px 30px rgba(15,23,42,.07);
}
[data-theme="light"] .seo-text,
[data-theme="light"] .faq-item,
[data-theme="light"] .result-card,
[data-theme="light"] .placeholder-row{
  background:#fff;
  border-color:rgba(15,23,42,.10);
}
[data-theme="light"] .tab-btn.active,
[data-theme="light"] .site-nav a.active{
  box-shadow:0 6px 18px rgba(37,99,235,.16);
}
[data-theme="light"] .hub-kicker,
[data-theme="light"] .article-more,
[data-theme="light"] .popular-more-link{
  color:#b45309;
}



/* v17: readable knowledge cards in light theme */
[data-theme="light"] .knowledge-hero{
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
  border-color:rgba(37,99,235,.14);
  box-shadow:0 12px 34px rgba(15,23,42,.07);
}
[data-theme="light"] .knowledge-kicker,
[data-theme="light"] .knowledge-pill{
  background:#eef5ff;
  border-color:#c7dafe;
  color:#1d4ed8;
}
[data-theme="light"] .article-card{
  background:#ffffff;
  border-color:rgba(37,99,235,.14);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}
[data-theme="light"] .article-card:hover{
  background:#f8fbff;
  border-color:rgba(37,99,235,.28);
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}
[data-theme="light"] .article-card.featured{
  background:linear-gradient(145deg,#ffffff 0%,#f8fbff 100%);
  border-color:rgba(37,99,235,.18);
  box-shadow:0 10px 26px rgba(15,23,42,.055);
}
[data-theme="light"] .article-label{
  color:#1d4ed8;
  background:#eaf2ff;
  border-color:#bfdbfe;
}
[data-theme="light"] .article-more{
  color:#b45309;
}
[data-theme="light"] .knowledge-cta{
  background:#fff;
  border-color:rgba(37,99,235,.14);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}


/* v22.3: local knowledge base search */
.knowledge-search{
  margin-top:18px;
  border-color:rgba(37,99,235,.22);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.12), transparent 32%),
    linear-gradient(145deg,rgba(255,255,255,.05),rgba(255,255,255,.025));
}
.knowledge-search-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.knowledge-search-head h2{
  margin:6px 0 4px;
  font-size:22px;
  letter-spacing:-.02em;
}
.knowledge-search-head p{
  margin:0;
  color:var(--muted);
  font-size:.94rem;
  line-height:1.55;
  max-width:760px;
}
.knowledge-search-kicker{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(37,99,235,.12);
  border:1px solid rgba(37,99,235,.20);
  color:#b9cdfd;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.knowledge-search-label{
  display:block;
  margin:0 0 8px;
  color:var(--text);
  font-weight:900;
  font-size:.9rem;
}
.knowledge-search-row{
  display:flex;
  gap:10px;
  align-items:center;
}
.knowledge-search-input{
  width:100%;
  min-height:48px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.055);
  color:var(--text);
  padding:0 14px;
  font:inherit;
  outline:none;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.knowledge-search-input:focus{
  border-color:rgba(250,204,21,.42);
  box-shadow:0 0 0 4px rgba(250,204,21,.10);
  background:rgba(255,255,255,.075);
}
.knowledge-search-input::placeholder{
  color:rgba(229,231,235,.48);
}
.knowledge-search-clear{
  min-height:48px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid rgba(250,204,21,.30);
  background:rgba(250,204,21,.10);
  color:var(--text);
  font:inherit;
  font-weight:900;
  cursor:pointer;
  transition:transform .16s ease,border-color .18s ease,background .18s ease;
}
.knowledge-search-clear:hover{
  transform:translateY(-1px);
  border-color:rgba(250,204,21,.48);
  background:rgba(250,204,21,.16);
}
.knowledge-search-status{
  margin-top:10px;
  color:var(--muted);
  font-size:.88rem;
}
.knowledge-search-results{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.search-result-card{
  display:block;
  padding:14px;
  border-radius:15px;
  border:1px solid var(--border);
  background:linear-gradient(145deg,rgba(255,255,255,.052),rgba(255,255,255,.024));
  color:var(--text);
  text-decoration:none;
  transition:transform .16s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.search-result-card:hover{
  transform:translateY(-2px);
  border-color:rgba(250,204,21,.35);
  box-shadow:0 14px 34px rgba(0,0,0,.24);
  background:linear-gradient(145deg,rgba(37,99,235,.12),rgba(250,204,21,.055));
}
.search-result-label{
  display:inline-flex;
  margin-bottom:8px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(37,99,235,.12);
  border:1px solid rgba(37,99,235,.20);
  color:#b9cdfd;
  font-size:.7rem;
  font-weight:900;
}
.search-result-title{
  display:block;
  font-weight:900;
  line-height:1.25;
  letter-spacing:-.02em;
  margin-bottom:6px;
}
.search-result-desc{
  display:block;
  color:var(--muted);
  font-size:.84rem;
  line-height:1.45;
}
.search-result-more{
  display:inline-flex;
  margin-top:10px;
  color:var(--accent2);
  font-size:.82rem;
  font-weight:900;
}
.search-empty-state{
  grid-column:1/-1;
  padding:14px;
  border-radius:15px;
  border:1px dashed rgba(250,204,21,.32);
  color:var(--muted);
  background:rgba(250,204,21,.055);
  font-size:.9rem;
}
[data-theme="light"] .knowledge-search{
  background:#ffffff;
  border-color:rgba(37,99,235,.14);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}
[data-theme="light"] .knowledge-search-kicker,
[data-theme="light"] .search-result-label{
  color:#1d4ed8;
  background:#eaf2ff;
  border-color:#bfdbfe;
}
[data-theme="light"] .knowledge-search-input{
  background:#ffffff;
  border-color:rgba(37,99,235,.18);
}
[data-theme="light"] .knowledge-search-input:focus{
  border-color:rgba(37,99,235,.34);
  box-shadow:0 0 0 4px rgba(37,99,235,.09);
}
[data-theme="light"] .knowledge-search-input::placeholder{
  color:#94a3b8;
}
[data-theme="light"] .knowledge-search-clear{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}
[data-theme="light"] .search-result-card{
  background:#ffffff;
  border-color:rgba(37,99,235,.14);
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}
[data-theme="light"] .search-result-card:hover{
  background:#f8fbff;
  border-color:rgba(37,99,235,.28);
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}
[data-theme="light"] .search-result-more{
  color:#b45309;
}
[data-theme="light"] .search-empty-state{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}
@media(max-width:760px){
  .knowledge-search-row{display:block;}
  .knowledge-search-clear{width:100%;margin-top:10px;}
  .knowledge-search-results{grid-template-columns:1fr;}
}

/* v22.12 — mobile smoothness polish for articles hub */
@media (max-width: 768px), (pointer: coarse) {
  .hdr,
  .tabs-nav,
  .static-nav,
  .card,
  .modal-content,
  .article-card,
  .topic-card,
  .category-card,
  .cluster-card,
  .read-also,
  .read-also-grid a {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .hdr,
  .tabs-nav,
  .static-nav,
  .card,
  .modal-content,
  .article-card,
  .topic-card,
  .category-card,
  .cluster-card,
  .read-also,
  .read-also-grid a {
    box-shadow: 0 8px 22px rgba(0,0,0,.14);
  }

  [data-theme="light"] .hdr,
  [data-theme="light"] .tabs-nav,
  [data-theme="light"] .static-nav,
  [data-theme="light"] .card,
  [data-theme="light"] .modal-content,
  [data-theme="light"] .article-card,
  [data-theme="light"] .topic-card,
  [data-theme="light"] .category-card,
  [data-theme="light"] .cluster-card,
  [data-theme="light"] .read-also,
  [data-theme="light"] .read-also-grid a {
    box-shadow: 0 8px 20px rgba(15,23,42,.07);
  }

  .ua-flag-premium {
    filter: drop-shadow(0 8px 16px rgba(37,99,235,.22)) drop-shadow(0 4px 12px rgba(250,204,21,.16));
  }

  .ua-flag-premium::before {
    animation: uaFlagAura 6.8s ease-in-out infinite;
    filter: none;
    opacity: .32;
    will-change: transform, opacity;
  }

  .ua-flag-cloth,
  .ua-flag-blue,
  .ua-flag-gold,
  .ua-flag-sheen,
  .ua-flag-folds,
  .ua-flag-ridge,
  .ua-flag-edge,
  .ua-flag-free-edge,
  .ua-flag-pole-shine {
    animation: none;
    filter: none;
    will-change: auto;
  }

  .ua-flag-cloth {
    animation: uaFlagClothWave 5.9s cubic-bezier(.42,0,.22,1) infinite;
    will-change: transform;
  }

  .ua-flag-blue {
    animation: uaFlagBlueBreath 7.2s ease-in-out infinite;
    will-change: opacity;
  }

  .ua-flag-gold {
    animation: uaFlagGoldBreath 7.2s ease-in-out infinite;
    will-change: opacity;
  }

  .ua-flag-sheen {
    animation: uaFlagSheenSlide 8s ease-in-out infinite;
    opacity: .42;
    will-change: transform, opacity;
  }

  .ua-flag-folds,
  .ua-flag-ridge {
    opacity: .14;
  }

  .ua-flag-edge,
  .ua-flag-free-edge {
    opacity: .58;
  }

  .ua-flag-free-edge {
    animation: uaFlagFreeEdge 6.6s ease-in-out infinite;
    will-change: transform, opacity;
  }

  .ua-flag-pole-shine {
    opacity: .18;
  }

  .tab-btn,
  .btn,
  .article-card,
  .topic-card,
  .category-card,
  .cluster-card,
  .read-also-grid a,
  .theme-toggle,
  .toggle-track,
  .toggle-thumb {
    transition-duration: .12s;
  }

  .tab-btn:hover,
  .btn:hover,
  .article-card:hover,
  .topic-card:hover,
  .category-card:hover,
  .cluster-card:hover,
  .read-also-grid a:hover {
    transform: none;
  }

  .table-wrap,
  .tabs-nav,
  .static-nav {
    -webkit-overflow-scrolling: touch;
  }
}


/* v22.12.1 — keep motion preferences respected after mobile flag polish */
@media (prefers-reduced-motion: reduce) {
  .ua-flag-premium::before,
  .ua-flag-cloth,
  .ua-flag-blue,
  .ua-flag-gold,
  .ua-flag-sheen,
  .ua-flag-folds,
  .ua-flag-ridge,
  .ua-flag-edge,
  .ua-flag-free-edge,
  .ua-flag-pole-shine {
    animation: none !important;
    will-change: auto !important;
  }
}

/* v22.12.2 — mobile browser smoothness polish for Android/iPhone */
@media (max-width: 768px), (pointer: coarse) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  .hdr,
  .tabs-nav,
  .static-nav,
  .footer,
  .ua-flag-premium {
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  .tab-btn,
  .btn,
  .article-card,
  .topic-card,
  .category-card,
  .cluster-card,
  .read-also-grid a,
  .theme-toggle,
  .toggle-track,
  .toggle-thumb {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(37,99,235,.14);
    transition-property: transform, opacity, color, border-color, background-color;
  }

  .tab-btn:active,
  .btn:active,
  .article-card:active,
  .topic-card:active,
  .category-card:active,
  .cluster-card:active,
  .read-also-grid a:active {
    transform: scale(.992);
  }

  .article-card,
  .topic-card,
  .category-card,
  .cluster-card,
  .read-also {
    background-attachment: scroll;
  }
}



/* v22.12.3 — mobile layout safety: prevent narrow multi-column cards */
@media (max-width: 900px) {
  .featured-grid,
  .knowledge-grid,
  .knowledge-grid.compact,
  .article-topic-grid,
  .rate-grid,
  .knowledge-search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .featured-grid,
  .knowledge-grid,
  .knowledge-grid.compact,
  .article-topic-grid,
  .result-grid,
  .rate-grid,
  .converter-grid,
  .form-grid,
  .faq-grid,
  .knowledge-search-results,
  .invoice-columns,
  .layout-grid {
    grid-template-columns: 1fr !important;
  }

  .article-card,
  .featured-card,
  .article-topic,
  .result-card,
  .currency-card,
  .search-result-card,
  .static-card-list > *,
  .faq-item {
    min-width: 0;
    min-height: auto;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .article-card small,
  .article-card strong,
  .article-card span,
  .article-label,
  .featured-card small,
  .featured-card strong,
  .featured-card span,
  .article-topic h3,
  .article-chip,
  .result-card,
  .currency-card,
  .search-result-card {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
  }
}

/* v22.12.4 — mobile overflow and glow cleanup */
@media (max-width: 768px), (pointer: coarse) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body::before {
    opacity: .42;
  }

  .hdr,
  .site-nav,
  .tabs-nav,
  .static-nav,
  .card,
  .hero,
  .calc,
  .modal-content,
  .article-card,
  .featured-card,
  .quick-link,
  .knowledge-card,
  .faq-item,
  .result-card,
  .currency-card,
  .search-result-card,
  .test-card,
  .fop-test-section,
  .fop-test-question {
    max-width: 100%;
    box-sizing: border-box;
  }

  [data-theme="light"] .hdr,
  [data-theme="light"] .site-nav,
  [data-theme="light"] .tabs-nav,
  [data-theme="light"] .static-nav,
  [data-theme="light"] .card,
  [data-theme="light"] .hero,
  [data-theme="light"] .calc,
  [data-theme="light"] .modal-content,
  [data-theme="light"] .article-card,
  [data-theme="light"] .featured-card,
  [data-theme="light"] .quick-link,
  [data-theme="light"] .knowledge-card,
  [data-theme="light"] .faq-item,
  [data-theme="light"] .result-card,
  [data-theme="light"] .currency-card,
  [data-theme="light"] .search-result-card,
  [data-theme="light"] .knowledge-search {
    box-shadow: 0 5px 16px rgba(15,23,42,.055) !important;
  }

  .site-nav,
  .tabs-nav,
  .static-nav {
    width: 100%;
    overflow: visible !important;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar,
  .tabs-nav::-webkit-scrollbar,
  .static-nav::-webkit-scrollbar {
    display: none;
  }

  .tabs-nav,
  .static-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tab-btn,
  .static-nav .tab-btn {
    width: 100%;
    min-width: 0 !important;
    flex: initial !important;
    white-space: normal !important;
    line-height: 1.18;
    text-align: center;
  }

  .tab-btn.active,
  .static-nav .tab-btn.active-page,
  .site-nav a.active {
    box-shadow: 0 4px 12px rgba(37,99,235,.18) !important;
  }

  .tab-btn::before,
  .static-nav .tab-btn::before {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 72%, #d9a91a 100%);
  }

  .theme-toggle,
  .toggle-track,
  .toggle-thumb {
    filter: none !important;
  }

  .toggle-track {
    box-shadow: inset 0 1px 4px rgba(15,23,42,.22), 0 2px 8px rgba(37,99,235,.08) !important;
  }

  .toggle-thumb {
    box-shadow: 0 1px 5px rgba(15,23,42,.22), inset 0 1px 0 rgba(255,255,255,.35) !important;
  }
}

@media (max-width: 520px) {
  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible !important;
  }

  .site-nav a {
    width: 100%;
    min-width: 0 !important;
    flex: initial !important;
    white-space: normal;
    line-height: 1.18;
    text-align: center;
  }
}

/* v22.12.5 — fix v22.12.4 nav regression: desktop stays rich, mobile tabs stay clickable */
@media (min-width: 769px) {
  .tabs-nav {
    display: flex !important;
    grid-template-columns: none !important;
    overflow: visible !important;
  }

  .tabs-nav .tab-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .static-nav,
  .site-nav {
    display: flex !important;
    grid-template-columns: none !important;
  }
}

@media (min-width: 769px) and (pointer: coarse) {
  .tabs-nav .tab-btn::before,
  .static-nav .tab-btn::before,
  .site-nav a.active {
    filter: none !important;
  }

  .tabs-nav .tab-btn.active::before,
  .static-nav .tab-btn.active-page::before {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  }
}

@media (max-width: 768px) {
  .tabs-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }

  .tabs-nav .tab-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: min(180px, 58vw) !important;
    max-width: 78vw;
    white-space: nowrap !important;
    scroll-snap-align: start;
    text-align: center;
  }

  .tabs-nav .tab-btn,
  .tabs-nav .tab-btn span {
    pointer-events: auto;
  }

  .tabs-nav .tab-btn::before,
  .static-nav .tab-btn::before {
    pointer-events: none;
  }

  .tabs-nav .tab-btn.active::before,
  .static-nav .tab-btn.active-page::before {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  }

  .tabs-nav .tab-btn.active,
  .static-nav .tab-btn.active-page,
  .site-nav a.active {
    box-shadow: 0 4px 12px rgba(37,99,235,.14) !important;
    filter: none !important;
  }

  [data-theme="light"] .tabs-nav .tab-btn:not(.active),
  [data-theme="light"] .static-nav .tab-btn:not(.active-page),
  [data-theme="light"] .site-nav a:not(.active) {
    color: #4b5870 !important;
    opacity: 1 !important;
  }
}

@media (max-width: 520px) {
  .site-nav,
  .static-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    overflow: visible !important;
  }

  .site-nav a,
  .static-nav .tab-btn {
    width: 100%;
    min-width: 0 !important;
    flex: initial !important;
    white-space: normal !important;
    line-height: 1.18;
    text-align: center;
  }
}

/* v22.13.2 — active button glow cleanup: keep yellow as an accent, but remove dirty yellow glare from active navigation controls */
.site-nav a.active,
.static-nav .tab-btn.active-page,
.tabs-nav .tab-btn.active {
  filter: none !important;
  box-shadow: 0 8px 22px rgba(37,99,235,.18) !important;
}

.site-nav a.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

.static-nav .tab-btn.active-page::before,
.tabs-nav .tab-btn.active::before {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  opacity: 1 !important;
}

.site-nav a.active:hover,
.static-nav .tab-btn.active-page:hover,
.tabs-nav .tab-btn.active:hover {
  filter: none !important;
  box-shadow: 0 10px 24px rgba(37,99,235,.20) !important;
}

[data-theme="light"] .site-nav a.active,
[data-theme="light"] .static-nav .tab-btn.active-page,
[data-theme="light"] .tabs-nav .tab-btn.active {
  box-shadow: 0 8px 20px rgba(37,99,235,.16) !important;
}

.theme-toggle,
.toggle-track,
.toggle-thumb {
  filter: none !important;
}

.toggle-track {
  box-shadow: inset 0 1px 6px rgba(0,0,0,.28), 0 3px 10px rgba(37,99,235,.12) !important;
}

.toggle-thumb {
  box-shadow: 0 2px 8px rgba(15,23,42,.24), inset 0 1px 0 rgba(255,255,255,.30) !important;
}

[data-theme="light"] .toggle-track {
  box-shadow: inset 0 1px 5px rgba(146,64,14,.16), 0 3px 10px rgba(15,23,42,.08) !important;
}

@media (max-width: 768px), (pointer: coarse) {
  .site-nav a.active,
  .static-nav .tab-btn.active-page,
  .tabs-nav .tab-btn.active {
    box-shadow: 0 5px 14px rgba(37,99,235,.15) !important;
  }

  .site-nav a.active:hover,
  .static-nav .tab-btn.active-page:hover,
  .tabs-nav .tab-btn.active:hover {
    box-shadow: 0 5px 14px rgba(37,99,235,.15) !important;
  }

  .toggle-track {
    box-shadow: inset 0 1px 5px rgba(0,0,0,.24), 0 2px 8px rgba(37,99,235,.09) !important;
  }
}



/* v22.13.10 — restored premium test CTA visual on knowledge base page */
.knowledge-test-cta{
  margin-top:18px;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(280px,.92fr);
  align-items:stretch;
  gap:18px;
  position:relative;
  overflow:hidden;
  border-color:rgba(250,204,21,.18);
  background:
    radial-gradient(circle at 94% 10%, rgba(250,204,21,.13), transparent 32%),
    radial-gradient(circle at 7% 96%, rgba(37,99,235,.15), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
    var(--card);
}
.knowledge-test-cta::before{
  content:"";
  position:absolute;
  inset:auto -70px -110px auto;
  width:260px;
  height:260px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(37,99,235,.17), transparent 66%);
  pointer-events:none;
  opacity:.72;
}
.knowledge-test-cta::after{
  content:"";
  position:absolute;
  inset:-130px auto auto 38%;
  width:220px;
  height:220px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(14,165,233,.10), transparent 68%);
  pointer-events:none;
  opacity:.66;
}
.knowledge-test-cta-main,
.knowledge-test-mode-card{
  position:relative;
  z-index:1;
  min-width:0;
}
.knowledge-test-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(37,99,235,.24);
  background:rgba(37,99,235,.10);
  color:#b9cdfd;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.knowledge-test-cta h2{
  margin:14px 0 10px;
  font-size:clamp(24px,3vw,38px);
  line-height:1.06;
  letter-spacing:-.05em;
}
.knowledge-test-cta p{
  margin:0;
  max-width:760px;
  color:var(--muted);
  line-height:1.56;
  font-size:.98rem;
}
.knowledge-test-mode-card{
  align-self:stretch;
  display:grid;
  gap:14px;
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(37,99,235,.20);
  background:linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.028));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.knowledge-test-mode-copy strong{
  display:block;
  margin-bottom:5px;
  font-size:1rem;
}
.knowledge-test-mode-copy span{
  display:block;
  color:var(--muted);
  line-height:1.46;
  font-size:.9rem;
}
.knowledge-test-pills{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  align-self:end;
}
.knowledge-test-pills a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(37,99,235,.24);
  background:rgba(37,99,235,.10);
  color:var(--text);
  text-decoration:none;
  font-size:.86rem;
  font-weight:900;
  text-align:center;
  transition:transform .14s ease, border-color .16s ease, background .16s ease;
}
.knowledge-test-pills a:hover{
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.38);
  background:rgba(37,99,235,.15);
}
.knowledge-test-cta-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}
.knowledge-test-primary,
.knowledge-test-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 17px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  text-align:center;
  border:1px solid rgba(37,99,235,.24);
  transition:transform .16s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.knowledge-test-primary{
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  box-shadow:0 14px 28px rgba(37,99,235,.22);
}
.knowledge-test-secondary{
  color:var(--text);
  background:rgba(255,255,255,.06);
}
.knowledge-test-primary:hover,
.knowledge-test-secondary:hover{
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.38);
}
.knowledge-test-primary:hover{box-shadow:0 18px 34px rgba(37,99,235,.28);}
[data-theme="light"] .knowledge-test-cta{
  background:
    radial-gradient(circle at 94% 10%, rgba(250,204,21,.16), transparent 31%),
    radial-gradient(circle at 7% 96%, rgba(37,99,235,.12), transparent 34%),
    linear-gradient(145deg,#ffffff,#f8fbff 58%,#fffdf2),
    #ffffff;
  border-color:rgba(37,99,235,.16);
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}
[data-theme="light"] .knowledge-test-cta::before{background:radial-gradient(circle,rgba(37,99,235,.10),transparent 66%);}
[data-theme="light"] .knowledge-test-cta::after{background:radial-gradient(circle,rgba(14,165,233,.08),transparent 68%);}
[data-theme="light"] .knowledge-test-kicker{
  color:#1d4ed8;
  background:#eaf2ff;
  border-color:#bfdbfe;
}
[data-theme="light"] .knowledge-test-mode-card{
  background:linear-gradient(145deg,#ffffff,#f8fbff);
  border-color:rgba(37,99,235,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 10px 26px rgba(15,23,42,.045);
}
[data-theme="light"] .knowledge-test-pills a{
  color:#1e293b;
  background:#f1f5ff;
  border-color:#dbeafe;
}
[data-theme="light"] .knowledge-test-secondary{
  color:#1e293b;
  background:#ffffff;
  border-color:rgba(37,99,235,.18);
}
@media(max-width:820px){
  .knowledge-test-cta{grid-template-columns:1fr;}
  .knowledge-test-mode-card{align-self:auto;}
}
@media(max-width:640px){
  .knowledge-test-cta{
    gap:16px;
    padding:20px;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  .knowledge-test-cta::before,
  .knowledge-test-cta::after{display:none;}
  .knowledge-test-cta-actions,
  .knowledge-test-pills{display:grid;grid-template-columns:1fr;width:100%;}
  .knowledge-test-primary,
  .knowledge-test-secondary,
  .knowledge-test-pills a{
    width:100%;
    white-space:normal;
  }
  .knowledge-test-primary:active,
  .knowledge-test-secondary:active,
  .knowledge-test-pills a:active{transform:translateY(1px);opacity:.96;}
}




/* v22.13.11 — exact old premium test panel style on knowledge page, no stat panel, no kicker */
.knowledge-test-cta{
  margin-top:18px;
  display:block;
  position:relative;
  overflow:hidden;
  padding:20px;
  border:1px solid rgba(250,204,21,.18);
  border-radius:18px;
  background:
    radial-gradient(circle at top right, rgba(250,204,21,.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(37,99,235,.14), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.028)),
    var(--card);
  box-shadow:none;
}
.knowledge-test-cta::before{
  content:"";
  position:absolute;
  inset:auto -20% 100% auto;
  width:240px;
  height:240px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(37,99,235,.18), transparent 68%);
  pointer-events:none;
  opacity:.7;
}
.knowledge-test-cta::after{display:none!important;}
.knowledge-test-cta-main,
.knowledge-test-mode-card,
.knowledge-test-cta-actions{
  position:relative;
  z-index:1;
  min-width:0;
}
.knowledge-test-kicker{display:none!important;}
.knowledge-test-cta h2{
  margin:0;
  font-size:clamp(22px,3vw,34px);
  line-height:1.08;
  letter-spacing:-.04em;
}
.knowledge-test-cta p{
  margin:10px 0 0;
  max-width:760px;
  color:var(--muted);
  line-height:1.55;
  font-size:.98rem;
}
.knowledge-test-mode-card{
  margin-top:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(250,204,21,.20);
  background:linear-gradient(135deg,rgba(250,204,21,.08),rgba(37,99,235,.07));
  box-shadow:none;
}
.knowledge-test-mode-copy strong{display:block;color:var(--text);margin-bottom:4px;}
.knowledge-test-mode-copy span{display:block;color:var(--muted);font-size:.9rem;line-height:1.45;}
.knowledge-test-mode-buttons{display:flex;gap:8px;flex:0 0 auto;}
.knowledge-test-mode-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.045);
  color:var(--text);
  text-decoration:none;
  font-weight:900;
  cursor:pointer;
  text-align:center;
  transition:transform .14s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.knowledge-test-mode-btn:hover{transform:translateY(-1px);border-color:rgba(37,99,235,.34);}
.knowledge-test-mode-btn.is-active{
  border-color:rgba(250,204,21,.42);
  background:linear-gradient(135deg,rgba(37,99,235,.18),rgba(250,204,21,.13));
  box-shadow:0 10px 26px rgba(37,99,235,.18);
}
.knowledge-test-cta-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.knowledge-test-primary,
.knowledge-test-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:11px 16px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  text-align:center;
  border:1px solid rgba(37,99,235,.24);
  transition:transform .14s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.knowledge-test-primary{
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  box-shadow:0 12px 24px rgba(37,99,235,.20);
}
.knowledge-test-secondary{
  color:var(--text);
  background:rgba(255,255,255,.055);
}
.knowledge-test-primary:hover,
.knowledge-test-secondary:hover{transform:translateY(-1px);border-color:rgba(37,99,235,.34);}
[data-theme="light"] .knowledge-test-cta{
  background:
    radial-gradient(circle at top right, rgba(250,204,21,.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(37,99,235,.11), transparent 36%),
    linear-gradient(145deg,#ffffff,#f8fbff 62%,#fffdf2);
  border-color:rgba(250,204,21,.22);
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}
[data-theme="light"] .knowledge-test-mode-card{
  border-color:rgba(250,204,21,.26);
  background:linear-gradient(135deg,rgba(250,204,21,.12),rgba(37,99,235,.07));
}
[data-theme="light"] .knowledge-test-mode-btn{
  color:#1e293b;
  background:#fff;
  border-color:#dbeafe;
}
[data-theme="light"] .knowledge-test-mode-btn.is-active{
  color:#1d4ed8;
  border-color:rgba(250,204,21,.44);
  background:linear-gradient(135deg,#eef5ff,#fff8d6);
  box-shadow:0 10px 22px rgba(37,99,235,.12);
}
[data-theme="light"] .knowledge-test-secondary{
  color:#1e293b;
  background:#ffffff;
  border-color:rgba(37,99,235,.18);
}
@media(max-width:820px){
  .knowledge-test-mode-card{display:block;}
  .knowledge-test-mode-buttons{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;width:100%;}
}
@media(max-width:640px){
  .knowledge-test-cta{
    padding:18px;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  .knowledge-test-cta::before{display:none;}
  .knowledge-test-mode-buttons,
  .knowledge-test-cta-actions{display:grid;grid-template-columns:1fr;width:100%;}
  .knowledge-test-primary,
  .knowledge-test-secondary,
  .knowledge-test-mode-btn{width:100%;white-space:normal;}
  .knowledge-test-primary:active,
  .knowledge-test-secondary:active,
  .knowledge-test-mode-btn:active{transform:translateY(1px);opacity:.96;}
}


/* v22.13.14: exact homepage test CTA copied to knowledge page */
.hub-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--accent2);
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:8px;
}
.hub-kicker::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--accent2);
  box-shadow:0 0 18px rgba(250,204,21,.55);
}
#knowledge-test-entry{margin-top:16px;}
.test-cta-panel{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) auto;
  align-items:center;
  gap:18px;
  margin-top:0;
  overflow:hidden;
  position:relative;
  border-color:rgba(250,204,21,.18);
  background:
    radial-gradient(circle at top right, rgba(250,204,21,.12), transparent 32%),
    radial-gradient(circle at bottom left, rgba(37,99,235,.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.028)),
    var(--card) !important;
}
.test-cta-panel::before{display:none !important;}
.test-cta-content{min-width:0;}
.test-cta-content .lead{max-width:760px;margin-bottom:0;}
.test-cta-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:10px;
}
.test-cta-primary,
.test-cta-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:12px 16px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  white-space:nowrap;
  transition:transform .14s ease,border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.test-cta-primary{
  border:1px solid rgba(37,99,235,.34);
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;
  box-shadow:0 10px 24px rgba(37,99,235,.16);
}
.test-cta-secondary{
  border:1px solid var(--border);
  background:rgba(255,255,255,.055);
  color:var(--text);
}
.test-cta-primary:hover,
.test-cta-secondary:hover{transform:translateY(-1px);}
.test-cta-secondary:hover{border-color:rgba(37,99,235,.30);}
[data-theme="light"] .test-cta-panel{
  background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(250,204,21,.045)),#fff !important;
  border-color:rgba(37,99,235,.13);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}
[data-theme="light"] .test-cta-secondary{
  background:#fff;
  border-color:rgba(37,99,235,.16);
  color:#172033;
}
@media(max-width:900px){
  .test-cta-panel{grid-template-columns:1fr;}
  .test-cta-actions{justify-content:flex-start;}
}
@media(max-width:640px){
  .test-cta-panel{
    gap:14px;
    background:var(--card) !important;
    box-shadow:0 6px 18px rgba(15,23,42,.10);
  }
  .test-cta-actions{display:grid;grid-template-columns:1fr;width:100%;}
  .test-cta-primary,
  .test-cta-secondary{width:100%;white-space:normal;text-align:center;}
}
@media(max-width:768px),(pointer:coarse){
  .test-cta-panel{background:var(--card) !important;filter:none !important;}
  .test-cta-primary,
  .test-cta-secondary{
    transition-property:transform,opacity,border-color,background-color;
    box-shadow:none;
  }
  .test-cta-primary:active,
  .test-cta-secondary:active{transform:translateY(1px);opacity:.96;}
}


/* v22.13.22 — final active nav text contrast on mobile/light theme */
.site-nav a.active,
.site-nav a.active:visited,
.site-nav a.active:hover,
.site-nav a.active:focus,
.site-nav a.active:focus-visible,
.static-nav .tab-btn.active-page,
.static-nav .tab-btn.active-page:visited,
.static-nav .tab-btn.active-page:hover,
.static-nav .tab-btn.active-page:focus,
.static-nav .tab-btn.active-page:focus-visible,
.tabs-nav .tab-btn.active,
.tabs-nav .tab-btn.active:visited,
.tabs-nav .tab-btn.active:hover,
.tabs-nav .tab-btn.active:focus,
.tabs-nav .tab-btn.active:focus-visible{
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}
.site-nav a.active *,
.static-nav .tab-btn.active-page *,
.tabs-nav .tab-btn.active *{
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

/* v22.13.23 — final active navigation contrast fix */
.site-nav a.active,
.site-nav a.active:link,
.site-nav a.active:visited,
.site-nav a.active:hover,
.site-nav a.active:focus,
.site-nav a.active:focus-visible,
.static-nav .tab-btn.active-page,
.static-nav .tab-btn.active-page:link,
.static-nav .tab-btn.active-page:visited,
.static-nav .tab-btn.active-page:hover,
.static-nav .tab-btn.active-page:focus,
.static-nav .tab-btn.active-page:focus-visible,
.tabs-nav .tab-btn.active,
.tabs-nav .tab-btn.active:link,
.tabs-nav .tab-btn.active:visited,
.tabs-nav .tab-btn.active:hover,
.tabs-nav .tab-btn.active:focus,
.tabs-nav .tab-btn.active:focus-visible{
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  text-shadow:none !important;
}

.site-nav a.active *,
.static-nav .tab-btn.active-page *,
.tabs-nav .tab-btn.active *{
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  text-shadow:none !important;
}


/* v22.13.28 — knowledge search compact cleanup */
.knowledge-search-label{
  margin:0 0 12px !important;
  font-size:1.15rem !important;
  line-height:1.25 !important;
  letter-spacing:-.015em !important;
}
.knowledge-search-status:empty{
  display:none !important;
}
@media (max-width:640px){
  .knowledge-search-label{
    font-size:1.08rem !important;
    margin-bottom:10px !important;
  }
}

/* v22.13.30 — final global compact knowledge search */
.knowledge-search .knowledge-search-kicker,
.knowledge-search .knowledge-search-head h2,
.knowledge-search .knowledge-search-head p,
.knowledge-search > h2,
.knowledge-search > p,
.knowledge-search .knowledge-search-hint{
  display:none !important;
}
.knowledge-search .knowledge-search-status:empty{
  display:none !important;
}
.knowledge-search .knowledge-search-label{
  display:block !important;
  font-size:clamp(18px, 2.2vw, 24px) !important;
  line-height:1.18 !important;
  font-weight:900 !important;
  margin:0 0 12px !important;
  color:var(--text) !important;
}

/* v22.13.34 — reporting deadline helper */
.reporting-deadline-helper{margin-top:16px;}
.reporting-helper-card{
  overflow:hidden;
  position:relative;
  border-color:rgba(37,99,235,.22);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.13), transparent 34%),
    radial-gradient(circle at bottom left, rgba(250,204,21,.09), transparent 34%),
    linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.028)),
    var(--card);
}
.reporting-helper-card::before{display:none!important;}
.reporting-helper-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(220px,.34fr);
  gap:18px;
  align-items:start;
}
.reporting-helper-copy .lead{margin-bottom:0;max-width:800px;}
.reporting-helper-safe-note{
  padding:13px 14px;
  border:1px solid rgba(250,204,21,.22);
  border-radius:16px;
  background:rgba(250,204,21,.075);
  color:var(--muted);
  font-size:.88rem;
  line-height:1.5;
  font-weight:700;
}
.reporting-helper-steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:16px 0;
}
.reporting-helper-steps div{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.045);
  color:var(--text);
  font-weight:800;
}
.reporting-helper-steps strong{
  display:inline-flex;
  width:24px;
  height:24px;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(37,99,235,.18);
  color:#bfdbfe;
  font-size:.78rem;
}
.reporting-helper-steps span{font-size:.88rem;line-height:1.25;}
.reporting-helper-grid{
  display:grid;
  grid-template-columns:minmax(260px,.72fr) minmax(0,1fr);
  gap:14px;
  align-items:stretch;
}
.reporting-helper-form,
.reporting-helper-result{
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.025));
  padding:16px;
}
.reporting-helper-form label{
  display:block;
  margin:0 0 7px;
  color:var(--text);
  font-size:.82rem;
  font-weight:900;
}
.reporting-helper-form select,
.reporting-helper-form input{
  width:100%;
  min-height:46px;
  margin:0 0 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.055);
  color:var(--text);
  font:inherit;
  padding:0 12px;
  outline:none;
}
.reporting-helper-form select:focus,
.reporting-helper-form input:focus{
  border-color:rgba(250,204,21,.42);
  box-shadow:0 0 0 4px rgba(250,204,21,.10);
}
.reporting-helper-form option{color:#111827;background:#fff;}
.reporting-helper-example{
  width:100%;
  min-height:44px;
  border:1px solid rgba(37,99,235,.32);
  border-radius:999px;
  background:rgba(37,99,235,.14);
  color:var(--text);
  font:inherit;
  font-weight:900;
  cursor:pointer;
}
.reporting-helper-result h3{
  margin:10px 0 14px;
  font-size:20px;
  line-height:1.25;
  letter-spacing:-.02em;
}
.reporting-status{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.055);
  color:var(--muted);
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.reporting-status.is-ok{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.12);color:#bbf7d0;}
.reporting-status.is-late{border-color:rgba(248,113,113,.38);background:rgba(248,113,113,.12);color:#fecaca;}
.reporting-status.is-neutral{border-color:rgba(250,204,21,.34);background:rgba(250,204,21,.10);color:#fde68a;}
.reporting-helper-result dl{
  display:grid;
  gap:10px;
  margin:0;
}
.reporting-helper-result dl div{
  display:grid;
  grid-template-columns:160px minmax(0,1fr);
  gap:12px;
  padding:11px 0;
  border-top:1px solid var(--border);
}
.reporting-helper-result dt{
  color:var(--muted);
  font-size:.82rem;
  font-weight:900;
}
.reporting-helper-result dd{
  margin:0;
  color:var(--text);
  font-weight:800;
  line-height:1.45;
}
.reporting-helper-links{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
[data-theme="light"] .reporting-helper-card,
[data-theme="light"] .reporting-helper-form,
[data-theme="light"] .reporting-helper-result{
  background:#fff;
  border-color:rgba(37,99,235,.14);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}
[data-theme="light"] .reporting-helper-safe-note{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
[data-theme="light"] .reporting-helper-steps div{background:#f8fbff;border-color:rgba(37,99,235,.13);}
[data-theme="light"] .reporting-helper-steps strong{background:#eaf2ff;color:#1d4ed8;}
[data-theme="light"] .reporting-helper-form select,
[data-theme="light"] .reporting-helper-form input{background:#fff;border-color:rgba(37,99,235,.18);}
[data-theme="light"] .reporting-helper-example{background:#eaf2ff;border-color:#bfdbfe;color:#1d4ed8;}
[data-theme="light"] .reporting-status.is-ok{color:#166534;background:#dcfce7;border-color:#86efac;}
[data-theme="light"] .reporting-status.is-late{color:#991b1b;background:#fee2e2;border-color:#fecaca;}
[data-theme="light"] .reporting-status.is-neutral{color:#9a3412;background:#fff7ed;border-color:#fed7aa;}
@media(max-width:900px){
  .reporting-helper-top,
  .reporting-helper-grid{grid-template-columns:1fr;}
  .reporting-helper-links{grid-template-columns:1fr;}
}
@media(max-width:640px){
  .reporting-helper-card{background:var(--card)!important;box-shadow:0 6px 18px rgba(15,23,42,.10);}
  .reporting-helper-steps{grid-template-columns:1fr;}
  .reporting-helper-form,
  .reporting-helper-result{padding:14px;}
  .reporting-helper-result dl div{grid-template-columns:1fr;gap:4px;}
}
@media(max-width:768px),(pointer:coarse){
  .reporting-helper-card{filter:none!important;}
  .reporting-helper-example{transition-property:opacity,border-color,background-color;}
}


/* v22.13.36: risk and closure hub */
.risk-closure-hub{margin-top:18px;margin-bottom:18px;}
.risk-closure-card{
  background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(30,41,59,.94) 52%,rgba(120,53,15,.88))!important;
  border:1px solid rgba(250,204,21,.22)!important;
  box-shadow:0 18px 42px rgba(2,6,23,.30),0 0 0 1px rgba(255,255,255,.04) inset;
}
.risk-closure-head{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start;margin-bottom:18px;}
.risk-closure-head .lead{max-width:820px;margin-bottom:0;}
.risk-closure-note{border:1px solid rgba(250,204,21,.32);background:rgba(250,204,21,.08);border-radius:14px;padding:14px;color:#fef3c7;font-weight:800;line-height:1.45;}
.risk-closure-grid{display:grid;grid-template-columns:1.2fr .9fr .9fr;gap:14px;}
.risk-closure-grid .article-card{min-height:100%;}
.risk-main-card{border-color:rgba(250,204,21,.45)!important;background:linear-gradient(135deg,rgba(37,99,235,.18),rgba(250,204,21,.10))!important;}
.risk-main-card .article-title{font-size:1.06rem;}
[data-theme="light"] .risk-closure-card{background:linear-gradient(135deg,#fff,#f8fbff 56%,#fff7ed)!important;border-color:#fed7aa!important;box-shadow:0 12px 30px rgba(15,23,42,.10);}
[data-theme="light"] .risk-closure-note{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
[data-theme="light"] .risk-main-card{background:linear-gradient(135deg,#eff6ff,#fff7ed)!important;border-color:#fbbf24!important;}
@media(max-width:900px){.risk-closure-head{grid-template-columns:1fr}.risk-closure-grid{grid-template-columns:1fr}.risk-closure-card{background:var(--card)!important}.risk-closure-note{font-size:.92rem;}}
@media(pointer:coarse){.risk-closure-card{box-shadow:0 6px 18px rgba(15,23,42,.10);filter:none!important}.risk-closure-grid .article-card{transition-property:opacity,border-color,background-color;}}
