:root {
  --accent: #4338ca;
  --accent2: #7c3aed;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); }

.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.logo-icon { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 10px; padding: 11px 18px; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .12s ease; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 6px 18px rgba(67,56,202,.25); }
.btn-primary:hover { transform: translateY(-1px); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hero { padding: 44px 0 24px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 10px; }
.hero p { font-size: 1.05rem; color: var(--muted); max-width: 680px; margin: 0; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 26px 0 0; }
.tab { border: none; background: none; cursor: pointer; padding: 11px 18px; font-size: .95rem; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-family: inherit; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }

.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; margin: 22px 0 8px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
.card h2 { font-size: 1.05rem; margin: 0 0 18px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: .8rem; font-weight: 600; color: #475569; }
.field .u { color: #94a3b8; font-weight: 400; }
input, select { padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: .95rem; font-family: inherit; width: 100%; background: #fff; }
input:focus, select:focus { outline: 2px solid #c7d2fe; border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rate-wrap { border-top: 1px dashed var(--border); padding-top: 16px; margin-top: 4px; }

.result { background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); color: #fff; border-radius: 16px; padding: 26px; box-shadow: 0 10px 28px rgba(67,56,202,.28); }
.result h2 { color: #fff; opacity: .95; }
.rrow { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.rrow .l { font-size: .9rem; opacity: .9; }
.rrow .v { font-weight: 700; font-size: 1.15rem; }
.rrow .v small { font-size: .75rem; font-weight: 500; opacity: .8; }
.big { background: rgba(255,255,255,.15); border-radius: 13px; padding: 18px; margin-bottom: 14px; }
.big .cap { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.big .num { font-size: 2.1rem; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.big .num small { font-size: 1rem; font-weight: 600; opacity: .85; }
.big .sub { font-size: .85rem; opacity: .85; margin-top: 2px; }
.disclaimer { font-size: .72rem; opacity: .75; margin: 14px 0 0; }

.copybtn { margin-top: 14px; width: 100%; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 11px; font-size: .85rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.copybtn + .copybtn { margin-top: 8px; }
.copybtn:hover { background: rgba(255,255,255,.26); }
.cur-bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .85rem; color: #475569; }
.cur-bar select { width: auto; padding: 7px 10px; }

.cta-band { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px; text-align: center; margin: 30px 0; }
.cta-band h2 { margin: 0 0 8px; font-size: 1.4rem; }
.cta-band p { color: var(--muted); margin: 0 auto 18px; max-width: 560px; }

.content { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px; margin: 24px 0; }
.content h2 { font-size: 1.3rem; margin-top: 0; }
.content h3 { font-size: 1.05rem; margin-top: 26px; }
.faq-item { border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; }
.faq-item h3 { margin: 0 0 6px; }
.faq-item p { margin: 0; color: #334155; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .92rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; }

.related { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.related a { display: inline-flex; align-items: center; gap: 8px; background: #eef2ff; color: var(--accent); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 16px; border-radius: 10px; }
.related a:hover { background: #e0e7ff; }

footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 30px 20px 50px; }

@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem; }
}
