:root {
  --blue: #3198d0;
  --blue-dark: #157eB8;
  --blue-deep: #075e8d;
  --blue-pale: #e8f4fa;
  --warm: #716d68;
  --warm-dark: #4f4c49;
  --ink: #35383b;
  --muted: #6c7378;
  --line: #d9dcde;
  --soft: #f2f3f3;
  --paper: #ffffff;
  --green: #24795f;
  --green-pale: #e8f5ef;
  --danger: #ad2f35;
  --shell: 1200px;
  --shadow: 0 18px 55px rgba(39, 48, 54, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(49, 152, 208, .35); outline-offset: 3px; }

.section-shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }

.site-header {
  width: min(calc(100% - 48px), var(--shell));
  min-height: 108px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 42px;
  background: var(--paper);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-icon {
  width: 44px;
  height: 44px;
  position: relative;
  display: inline-grid;
  place-items: center;
  background: var(--blue);
}
.brand-icon::before, .brand-icon::after, .brand-icon span::before, .brand-icon span::after {
  content: "";
  position: absolute;
  background: var(--paper);
}
.brand-icon::before { width: 22px; height: 5px; }
.brand-icon::after { width: 5px; height: 22px; }
.brand-icon span::before { width: 4px; height: 4px; left: 6px; top: 6px; }
.brand-icon span::after { width: 4px; height: 4px; right: 6px; bottom: 6px; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { color: var(--blue); font-size: 24px; letter-spacing: .055em; }
.brand-copy small { margin-top: 7px; color: var(--warm); font-size: 12px; font-weight: 700; letter-spacing: .1em; }

.site-header nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a { color: var(--warm-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { color: var(--blue); }
.header-cta {
  padding: 14px 18px;
  color: var(--paper);
  background: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.hero {
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(108deg, rgba(19, 112, 159, .94) 0%, rgba(49, 152, 208, .86) 48%, rgba(152, 205, 229, .7) 100%),
    linear-gradient(180deg, #7dc0df, #dbeef6);
}
.hero::before {
  content: "";
  width: 55%;
  height: 100%;
  position: absolute;
  right: -8%;
  top: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18));
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-grid {
  min-height: 520px;
  padding: 68px 0;
  position: relative;
  display: grid;
  align-items: center;
}
.hero-copy { max-width: 800px; position: relative; z-index: 3; }
.hero-kicker { margin-bottom: 18px; color: var(--paper); font-size: 12px; font-weight: 700; letter-spacing: .18em; }
.hero h1 { margin: 0; font-size: clamp(46px, 5.4vw, 74px); line-height: .95; letter-spacing: -.04em; }
.hero h1 span { width: fit-content; margin-bottom: 7px; padding: 5px 12px 7px; display: block; color: var(--warm-dark); background: var(--paper); }
.hero-copy > p { max-width: 570px; margin: 28px 0 0; color: var(--paper); font-size: 19px; line-height: 1.55; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--paper); background: var(--blue-deep); }
.button-primary:hover { background: #064d74; }
.button-light { color: var(--ink); background: var(--paper); }
.button-full { width: 100%; }

.promise-bar { overflow: hidden; padding: 19px 0; color: var(--paper); background: var(--warm-dark); }
.promise-track { width: max-content; min-width: 100%; padding: 0 30px; display: flex; align-items: center; justify-content: center; gap: 26px; white-space: nowrap; }
.promise-track span { font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.promise-track i { width: 5px; height: 5px; background: var(--blue); transform: rotate(45deg); }

.section-block { padding: 88px 0; }
.section-label { margin-bottom: 26px; color: var(--blue-dark); font-size: 12px; font-weight: 700; letter-spacing: .18em; }
.section-label-light { color: #9bd2eb; }
.value-heading, .invoice-intro { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 64px; }
.value-heading h2, .invoice-intro h2, .privacy-copy h2, .pioneer-copy h2 { margin: 0; font-size: clamp(40px, 4.5vw, 64px); line-height: 1; letter-spacing: -.045em; }
.value-heading p, .invoice-intro p, .privacy-copy > p, .pioneer-copy > p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }

.transition-compact { padding: 28px 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.transition-compact-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 34px; }
.transition-compact strong { color: var(--blue-deep); font-size: 15px; letter-spacing: .04em; }
.transition-compact p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.value-index { color: var(--blue); font-size: 13px; font-weight: 700; }

.value-section { background: var(--soft); }
.value-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper); }
.value-grid article { min-height: 310px; padding: 32px; display: flex; flex-direction: column; border-top: 5px solid var(--blue); }
.value-grid article + article { border-left: 1px solid var(--line); }
.value-grid h3 { margin: 44px 0 14px; color: var(--warm-dark); font-size: 27px; }
.value-grid p { margin: 0; color: var(--muted); font-size: 17px; }
.value-grid article > strong { margin-top: auto; padding-top: 30px; color: var(--blue-deep); font-size: 13px; line-height: 1.5; }

.invoice-section { color: var(--paper); background: var(--warm-dark); }
.invoice-intro { align-items: start; }
.invoice-intro p { color: #ddd9d6; }
.invoice-tabs { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.invoice-tabs button { padding: 11px 14px; border: 1px solid rgba(255,255,255,.4); color: var(--paper); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.invoice-tabs button.active { border-color: var(--blue); background: var(--blue); }

.invoice-demo-grid { margin-top: 42px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .85fr); align-items: start; gap: 28px; }
.official-invoice-viewer { margin: 0; position: relative; overflow: hidden; color: var(--ink); background: var(--paper); box-shadow: 0 24px 75px rgba(0,0,0,.25); line-height: 0; }
.invoice-page { position: relative; }
.invoice-page > img { width: 100%; height: auto; display: block; }
.official-invoice-viewer figcaption { padding: 13px 16px; position: relative; z-index: 4; color: var(--muted); background: var(--paper); font-size: 12px; line-height: 1.4; }
.invoice-row-highlight, .invoice-row-mask { position: absolute; left: 3.7%; right: 3.05%; top: 69.8%; height: 3.65%; z-index: 2; }
.invoice-row-highlight { border: 3px solid var(--blue); background: rgba(49,152,208,.13); box-shadow: 0 0 0 3px rgba(255,255,255,.82); }
.invoice-row-highlight span { padding: 7px 10px; position: absolute; right: 0; top: 100%; color: var(--paper); background: var(--blue-deep); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .07em; }
.invoice-row-mask { display: none; align-items: center; justify-content: center; border: 2px dashed var(--blue-deep); color: var(--blue-deep); background: rgba(255,255,255,.96); font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; }
.official-invoice-viewer[data-state="draft"] .invoice-row-highlight { display: none; }
.official-invoice-viewer[data-state="draft"] .invoice-row-mask { display: flex; }
.invoice-analysis { padding: 28px; position: sticky; top: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 75px rgba(0,0,0,.25); }
.analysis-eyebrow { color: var(--blue-deep); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.analysis-status { margin-top: 17px; padding: 8px 10px; display: inline-block; color: var(--green); background: var(--green-pale); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.analysis-status.is-draft { color: var(--muted); background: var(--soft); }
.invoice-analysis h3 { margin: 12px 0 0; color: var(--warm-dark); font-size: 25px; line-height: 1.08; }
.evidence-list { margin-top: 22px; border-top: 2px solid var(--ink); }
.evidence-list > div { padding: 11px 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.evidence-list small { color: var(--muted); font-size: 12px; }
.evidence-list strong { color: var(--warm-dark); font-size: 13px; text-align: right; }
.suggestion-result { margin-top: 18px; padding: 15px; color: var(--blue-deep); background: var(--blue-pale); }
.suggestion-result small, .suggestion-result strong { display: block; }
.suggestion-result small { font-size: 12px; }
.suggestion-result strong { margin-top: 6px; font-size: 18px; }
.invoice-analysis dl { margin: 18px 0 0; border-top: 2px solid var(--ink); }
.invoice-analysis dl div { padding: 13px 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px; border-bottom: 1px solid var(--line); }
.invoice-analysis dt { color: var(--muted); font-size: 12px; }
.invoice-analysis dd { margin: 0; font-size: 17px; font-weight: 700; text-align: right; }
.analysis-proof { margin-top: 18px; padding: 15px; color: var(--green); background: var(--green-pale); }
.analysis-proof strong, .analysis-proof span { display: block; }
.analysis-proof strong { margin-bottom: 5px; font-size: 12px; }
.analysis-proof span { font-size: 12px; line-height: 1.5; }
.annual-scenario { margin-top: 42px; display: grid; grid-template-columns: .9fr 1.1fr; color: var(--ink); background: var(--paper); box-shadow: 0 24px 75px rgba(0,0,0,.25); }
.annual-result { padding: 34px; background: var(--blue-pale); }
.annual-result > strong { margin-top: 24px; display: block; color: var(--blue-deep); font-size: clamp(42px, 5vw, 68px); line-height: 1; letter-spacing: -.05em; }
.annual-result > p { margin: 15px 0 32px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.annual-result label { display: block; font-size: 12px; font-weight: 700; }
.annual-result label span { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.annual-result output { color: var(--blue-deep); font-size: 15px; }
.annual-result input[type="range"] { width: 100%; margin-top: 15px; accent-color: var(--blue-deep); }
.annual-formula { padding: 34px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; }
.annual-formula > div { min-width: 0; }
.annual-formula small, .annual-formula strong, .annual-formula span { display: block; }
.annual-formula small { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.annual-formula strong { margin-top: 9px; color: var(--warm-dark); font-size: 24px; }
.annual-formula span { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.annual-formula i { color: var(--blue); font-size: 22px; font-style: normal; }
.invoice-note { max-width: 820px; margin: 26px auto 0; color: #c8c4c0; font-size: 12px; text-align: center; }
.invoice-note a { color: #9bd2eb; }

.privacy-section { background: var(--paper); }
.privacy-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 72px; }
.privacy-copy h2 { color: var(--warm-dark); }
.privacy-copy > p { margin-top: 28px; }
.local-model { border: 1px solid var(--line); background: var(--soft); box-shadow: var(--shadow); }
.machine-top { padding: 17px 22px; display: flex; align-items: center; justify-content: space-between; color: var(--paper); background: var(--warm-dark); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.machine-top i { padding: 5px 8px; color: #b7ecd9; background: rgba(42, 160, 118, .18); font-size: 12px; font-style: normal; }
.flow-item { margin: 0 24px; padding: 22px; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 17px; background: var(--paper); }
.flow-item > div { display: grid; }
.flow-item small { margin-top: 3px; color: var(--muted); }
.flow-number { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue-deep); background: var(--blue-pale); font-size: 13px; font-weight: 700; }
.active-flow { color: var(--paper); background: var(--blue); }
.active-flow small { color: #dbf1fb; }
.active-flow .flow-number { color: var(--blue); background: var(--paper); }
.flow-arrow { height: 34px; display: grid; place-items: center; color: var(--blue); font-weight: 700; }
.no-cloud { margin: 24px; padding: 17px; display: flex; align-items: center; gap: 12px; color: var(--green); background: var(--green-pale); font-size: 13px; }
.no-cloud span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--paper); background: var(--green); font-size: 18px; }
.privacy-pillars { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.privacy-pillars > div { padding: 28px 28px 0 0; }
.privacy-pillars > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.privacy-pillars span { color: var(--blue); font-size: 13px; font-weight: 700; }
.privacy-pillars strong { margin-top: 14px; display: block; font-size: 18px; }
.privacy-pillars p { color: var(--muted); }

.pioneer-section { background: var(--blue-pale); }
.pioneer-grid { display: grid; grid-template-columns: .95fr 1.05fr; align-items: start; gap: 64px; }
.pioneer-copy > p { margin-top: 28px; }
.pioneer-copy ul { margin: 30px 0 0; padding: 0; display: grid; gap: 13px; list-style: none; }
.pioneer-copy li { padding-left: 25px; position: relative; }
.pioneer-copy li::before { content: "✓"; position: absolute; left: 0; color: var(--blue-dark); font-weight: 700; }
.pioneer-form { padding: 36px; background: var(--paper); box-shadow: var(--shadow); }
.form-heading { margin-bottom: 26px; }
.form-heading span { color: var(--blue-dark); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.form-heading h3 { margin: 5px 0 0; color: var(--warm-dark); font-size: 26px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.pioneer-form label { margin-bottom: 16px; display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
.pioneer-form input, .pioneer-form select { width: 100%; min-height: 47px; padding: 0 12px; border: 1px solid #c9ced1; border-radius: 0; color: var(--ink); background: var(--paper); }
.pioneer-form input:focus, .pioneer-form select:focus { border-color: var(--blue); outline: 3px solid rgba(49,152,208,.12); }
.checkbox-label { grid-template-columns: 20px 1fr; align-items: start; cursor: pointer; }
.checkbox-label input { width: 18px; min-height: 18px; margin-top: 1px; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.fact-strip { padding: 28px 0; border-top: 1px solid var(--line); }
.fact-strip .section-shell { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.fact-strip p { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; }
.fact-strip div div { display: flex; gap: 18px; }
.fact-strip a { color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.site-footer { padding: 42px 0; color: #cfd4d7; background: var(--warm-dark); }
.site-footer .section-shell { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 30px; }
.footer-brand .brand-copy strong, .footer-brand .brand-copy small { color: var(--paper); }
.site-footer p { margin: 0; font-size: 12px; line-height: 1.7; }

@media (max-width: 1020px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero-copy { max-width: 760px; }
  .value-heading, .invoice-intro, .privacy-grid, .pioneer-grid { grid-template-columns: 1fr; gap: 38px; }
  .value-grid { grid-template-columns: 1fr; }
  .value-grid article { min-height: 290px; }
  .value-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .value-grid h3 { margin-top: 42px; }
  .privacy-grid, .pioneer-grid { gap: 60px; }
  .invoice-demo-grid { grid-template-columns: 1fr; }
  .official-invoice-viewer { max-width: 820px; }
  .invoice-analysis { position: static; }
  .annual-scenario { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .section-shell, .site-header { width: min(calc(100% - 28px), var(--shell)); }
  .site-header { min-height: 82px; }
  .header-cta { display: none; }
  .brand-icon { width: 38px; height: 38px; }
  .brand-copy strong { font-size: 20px; }
  .brand-copy small { font-size: 12px; letter-spacing: .06em; }
  .hero-grid { min-height: auto; padding: 54px 0 62px; }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-copy > p { font-size: 17px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .promise-track { justify-content: flex-start; animation: none; }
  .section-block { padding: 64px 0; }
  .value-heading h2, .invoice-intro h2, .privacy-copy h2, .pioneer-copy h2 { font-size: clamp(38px, 11vw, 52px); }
  .transition-compact { padding: 22px 0; }
  .transition-compact-row { grid-template-columns: 1fr; gap: 8px; }
  .privacy-pillars { grid-template-columns: 1fr; }
  .privacy-pillars > div, .privacy-pillars > div + div { padding: 25px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .value-grid article { min-height: 270px; padding: 28px; }
  .invoice-demo-grid { margin-top: 32px; gap: 18px; }
  .invoice-row-highlight, .invoice-row-mask { border-width: 2px; }
  .invoice-row-highlight span { display: none; }
  .invoice-row-mask { padding: 4px; font-size: 12px; }
  .invoice-analysis { padding: 24px; }
  .annual-scenario { margin-top: 38px; }
  .annual-result, .annual-formula { padding: 25px; }
  .annual-formula { grid-template-columns: 1fr; gap: 16px; }
  .annual-formula i { text-align: center; }
  .local-model { margin-inline: -4px; }
  .flow-item { margin-inline: 14px; padding: 17px; }
  .no-cloud { margin: 14px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .pioneer-form { padding: 24px; }
  .fact-strip .section-shell, .fact-strip div div, .site-footer .section-shell { align-items: flex-start; flex-direction: column; }
  .fact-strip .section-shell, .fact-strip div div, .site-footer .section-shell { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Language switcher */
.site-header { grid-template-columns: 1fr auto auto auto; }
.lang-switcher { display: flex; align-items: center; gap: 12px; }
.lang-switcher a { color: var(--warm-dark); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-decoration: none; opacity: 0.55; }
.lang-switcher a:hover { color: var(--blue); opacity: 1; }
.lang-switcher a[aria-current="page"] { opacity: 1; color: var(--blue); }
.site-footer a { color: inherit; }
@media (max-width: 1020px) {
  .site-header { grid-template-columns: 1fr auto auto; }
}
@media (max-width: 640px) {
  .site-header { grid-template-columns: 1fr auto; }
}

/* Legal pages */
.legal-page { padding: 60px 0 90px; max-width: 760px; }
.legal-page h1 { font-size: clamp(30px, 5vw, 42px); margin: 54px 0 6px; }
.legal-page section:first-child h1 { margin-top: 0; }
.legal-page h2 { font-size: 18px; margin: 30px 0 8px; }
.legal-page p { margin: 0 0 14px; font-size: 15px; line-height: 1.65; color: var(--warm-dark); }
.legal-page a { color: var(--blue); }
.legal-updated { font-size: 13px; opacity: 0.7; }
