:root {
  --red: #b5121b;
  --red-dark: #7f0d14;
  --ink: #15171d;
  --muted: #5d6575;
  --line: #e6e8ee;
  --paper: #ffffff;
  --soft: #f6f7f9;
  --accent: #0f766e;
  --topbar: rgba(255,255,255,.94);
  --shadow: rgba(20, 24, 32, .08);
  --field: #ffffff;
  --field-border: #cfd4dd;
}

html[data-theme="dark"] {
  --ink: #f4f6fb;
  --muted: #a9b1c4;
  --line: #303747;
  --paper: #171b24;
  --soft: #0f1218;
  --accent: #38b2a6;
  --topbar: rgba(18,22,30,.94);
  --shadow: rgba(0, 0, 0, .32);
  --field: #11151d;
  --field-border: #3a4354;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand img { display: block; height: 40px; width: 40px; flex: 0 0 auto; }
.brand span { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-weight: 650; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  background: currentColor;
  border-radius: 999px;
  transition: transform .18s ease, opacity .18s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
}
.moon { display: none; }
html[data-theme="dark"] .sun { display: none; }
html[data-theme="dark"] .moon { display: inline; }
.lang-picker select {
  width: auto;
  min-height: 42px;
  padding: 0 10px;
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--red);
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}
.button.ghost { background: #fff; color: var(--red); }
html[data-theme="dark"] .button.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.button.small { min-height: 34px; padding: 0 12px; font-size: 14px; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .55fr);
  gap: 36px;
  align-items: center;
  padding: clamp(48px, 8vw, 92px) clamp(20px, 5vw, 76px);
  background:
    linear-gradient(130deg, rgba(181,18,27,.94), rgba(127,13,20,.82)),
    #1c1012;
  color: #fff;
}
.hero-copy, .hero-panel { position: relative; z-index: 1; }
.hero-motion {
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,.22) 42% 43%, transparent 43% 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 54px);
  background-size: 260px 260px, 54px 54px, 54px 54px;
  animation: receiptFlow 18s linear infinite;
}
@keyframes receiptFlow {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-108px, 54px, 0); }
}
.hero h1 { font-size: clamp(46px, 7vw, 92px); line-height: .95; margin: 10px 0 20px; letter-spacing: 0; }
.lead { font-size: clamp(18px, 2.1vw, 24px); max-width: 760px; color: rgba(255,255,255,.88); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; color: var(--accent); }
.hero .eyebrow { color: #ffced2; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-panel {
  display: grid;
  gap: 12px;
}
.hero-panel div {
  padding: 22px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
}
.hero-panel strong { display: block; font-size: 34px; }
.hero-panel span { color: rgba(255,255,255,.82); }

.band { padding: 64px clamp(20px, 5vw, 76px); background: var(--paper); border-bottom: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); margin: 6px 0; }
.section-head p, .band p { color: var(--muted); line-height: 1.65; }
.section-head.compact h2 { font-size: 30px; }
.pricing { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pricing article, .form-card, .receipt-paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.pricing article { min-height: 190px; }
.price { color: var(--red) !important; font-size: 26px; font-weight: 850; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; align-items: start; }
.checks { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checks li { padding: 14px 16px; border-left: 4px solid var(--red); background: var(--soft); }

.auth { min-height: 72vh; display: grid; place-items: center; padding: 36px 20px; }
.form-card { width: min(100%, 460px); display: grid; gap: 14px; box-shadow: 0 18px 50px var(--shadow); }
.form-card.wide { width: min(100%, 720px); }
.form-card.inline { width: 100%; box-shadow: none; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--field);
  color: var(--ink);
}
textarea { resize: vertical; }
.alert, .success { padding: 12px; border-radius: 8px; margin: 0; }
.alert { background: #fff1f2; color: #9f1239; }
.success { background: #ecfdf5; color: #047857; }

.dashboard { display: grid; grid-template-columns: 260px 1fr; min-height: 76vh; }
.sidebar { background: #1b1f27; color: #fff; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
html[data-theme="dark"] .sidebar { background: #0a0d12; border-right: 1px solid var(--line); }
.sidebar a { color: rgba(255,255,255,.78); padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.content { padding: 32px; min-width: 0; }
.grid-two { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 24px; align-items: start; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }

.receipt { padding: 36px 20px; }
.receipt-actions { width: min(100%, 860px); margin: 0 auto 16px; text-align: right; }
.receipt-paper { width: min(100%, 860px); margin: auto; }
.receipt-paper header { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid var(--red); padding-bottom: 18px; }
.receipt-paper dl { display: grid; grid-template-columns: 180px 1fr; gap: 12px; margin: 28px 0; }
.receipt-paper dt { color: var(--muted); font-weight: 800; }
.legal { color: var(--muted); font-size: 14px; }
.print-body { background: #fff; color: #15171d; }
.print { box-shadow: none; border: 0; }

.footer { padding: 26px clamp(20px, 5vw, 76px); color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; }

@media (max-width: 900px) {
  .topbar { gap: 14px; padding: 12px 16px; }
  .brand { gap: 10px; font-size: 22px; }
  .brand img { height: 36px; width: 36px; }
  .menu-toggle { display: grid; flex: 0 0 auto; }
  .nav {
    display: none;
    position: absolute;
    top: 65px;
    left: 12px;
    right: 12px;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 50px var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nav.open { display: flex; }
  .nav a, .nav .button { width: 100%; justify-content: flex-start; min-height: 44px; padding: 0 12px; border-radius: 8px; }
  .nav > a { background: var(--soft); }
  .hero, .split, .dashboard, .grid-two { grid-template-columns: 1fr; }
  .hero { gap: 24px; padding: 42px 18px; }
  .hero h1 { font-size: clamp(42px, 15vw, 64px); }
  .lead { font-size: 18px; }
  .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { position: static; }
  .icon-button, .lang-picker select { width: 100%; }
  .sidebar { padding: 20px; }
  .table-wrap { border-radius: 8px; }
}

@media (max-width: 560px) {
  .pricing { grid-template-columns: 1fr; }
  .brand { font-size: 20px; }
  .hero { min-height: auto; }
  .hero-panel strong { font-size: 28px; }
  .band { padding: 44px 18px; }
  .auth { padding: 24px 14px; align-items: start; }
  .form-card { padding: 18px; }
  .receipt { padding: 20px 12px; }
  .receipt-actions { text-align: left; }
  .receipt-paper dl { grid-template-columns: 1fr; }
  .receipt-paper header { flex-direction: column; }
  .content { padding: 18px; }
  table { min-width: 620px; }
  th, td { padding: 12px; }
}

@media print {
  .topbar, .footer, .receipt-actions { display: none; }
  .receipt-paper { width: 100%; border: 0; }
}
