:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef4ff;
  --surface-3: #fff5f4;
  --text: #142033;
  --muted: #637083;
  --line: #d9e1ec;
  --accent: #0057b8;
  --accent-2: #d52b1e;
  --accent-3: #0039a6;
  --accent-dark: #073763;
  --danger: #b42318;
  --shadow: 0 20px 54px rgba(20, 32, 51, 0.10);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 249, 252, 0) 360px),
    repeating-linear-gradient(90deg, rgba(0, 57, 166, 0.025) 0, rgba(0, 57, 166, 0.025) 1px, transparent 1px, transparent 96px),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 52px);
  background: rgba(247, 249, 252, 0.88);
  border-bottom: 1px solid rgba(23, 33, 30, 0.09);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(0, 121, 111, 0.22);
}

.nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav a,
.sidebar a,
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.nav a:hover,
.sidebar a:hover {
  background: rgba(0, 87, 184, 0.09);
  color: var(--accent-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: 610px;
  padding: clamp(48px, 8vw, 94px) clamp(18px, 5vw, 72px) 34px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 4% 28px auto;
  width: min(40vw, 470px);
  height: 58%;
  background:
    linear-gradient(135deg, rgba(0, 87, 184, 0.10), rgba(213, 43, 30, 0.08)),
    linear-gradient(90deg, transparent 49%, rgba(23, 33, 30, 0.08) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(23, 33, 30, 0.08) 50%, transparent 51%);
  background-size: auto, 44px 44px, 44px 44px;
  border-radius: 28px;
  transform: rotate(-2deg);
  z-index: -1;
}

.hero-copy {
  max-width: 770px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 0.74rem;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 4.9rem;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.lead {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: 0 14px 28px rgba(30, 42, 34, 0.09);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 121, 111, 0.35);
  box-shadow: 0 18px 34px rgba(30, 42, 34, 0.13);
}

.button.primary {
  background: var(--accent);
  border-color: transparent;
  color: white;
}

.hero-panel {
  display: grid;
  gap: 14px;
  align-self: center;
}

.metric {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(0, 57, 166, 0.98), rgba(0, 87, 184, 0.96)),
    var(--accent-dark);
  color: white;
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 6.5rem;
  font-weight: 900;
  line-height: 0.9;
}

.metric p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.metric small {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.mini-receipt {
  display: grid;
  gap: 2px;
  padding: 16px;
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(32, 42, 35, 0.08);
}

.mini-receipt div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(23, 33, 30, 0.08);
}

.mini-receipt div:last-child {
  border-bottom: 0;
}

.mini-receipt span {
  color: var(--muted);
  font-weight: 700;
}

.mini-receipt strong {
  color: var(--text);
  font-weight: 900;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.search-grid span {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 10px 24px rgba(32, 42, 35, 0.05);
}

.ad-slot {
  width: min(100% - 36px, 1120px);
  min-height: 92px;
  display: grid;
  place-items: center;
  margin: 24px auto;
  border: 1px dashed #b9b0a1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: #7a847d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tools-layout {
  width: min(100% - 36px, 1180px);
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin: 32px auto;
}

.sidebar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 30px rgba(32, 42, 35, 0.06);
  backdrop-filter: blur(12px);
}

.sidebar h2 {
  margin: 0 0 6px;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
}

.sidebar a {
  justify-content: flex-start;
}

.tools {
  display: grid;
  gap: 22px;
}

.tool {
  scroll-margin-top: 96px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    var(--surface);
  box-shadow: 0 18px 44px rgba(36, 48, 42, 0.08);
}

.tool-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.calculator.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
  gap: 22px;
  align-items: stretch;
}

.inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(23, 33, 30, 0.12);
  border-radius: 13px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

input:focus,
select:focus {
  outline: 3px solid rgba(0, 87, 184, 0.16);
  border-color: var(--accent);
}

.result {
  display: grid;
  align-content: start;
  min-height: 100%;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(0, 57, 166, 0.98), rgba(20, 32, 51, 0.98)),
    #142033;
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 36px rgba(0, 57, 166, 0.14);
}

.result > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result .main-value {
  display: block;
  margin-bottom: 14px;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 3.05rem;
  font-weight: 900;
  line-height: 1;
}

.breakdown {
  display: grid;
  gap: 9px;
  margin: 0;
}

.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.breakdown dt {
  color: rgba(255, 255, 255, 0.72);
}

.breakdown dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.note {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.seo-band {
  width: min(100% - 36px, 1180px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 44px auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(0, 121, 111, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(238, 244, 255, 0.95), rgba(255, 245, 244, 0.96));
}

.seo-band p {
  color: var(--muted);
  line-height: 1.6;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.seo-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(0, 87, 184, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(23, 33, 30, 0.08);
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.mini-page {
  width: min(100% - 36px, 980px);
  display: grid;
  gap: 42px;
  margin: 0 auto;
  padding: 42px 0 70px;
}

.mini-content {
  max-width: 760px;
  display: grid;
  gap: 18px;
}

.mini-content .button {
  width: fit-content;
  margin-top: 8px;
}

.content-block {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(36, 48, 42, 0.06);
}

.content-block h2 {
  margin-top: 10px;
}

.content-block h2:first-child {
  margin-top: 0;
}

.content-block p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

details {
  padding: 14px 0;
  border-top: 1px solid rgba(23, 33, 30, 0.08);
}

summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

@media (max-width: 920px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .brand {
    flex: 0 0 auto;
  }

  .nav {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .hero,
  .tools-layout,
  .calculator.two-col,
  .seo-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 32px;
    gap: 28px;
  }

  h1 {
    font-size: 3.7rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none;
  }

  .sidebar h2 {
    display: none;
  }

  .sidebar a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 249, 252, 0) 260px),
      var(--bg);
  }

  .site-header {
    position: sticky;
    padding: 10px 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .nav a,
  .sidebar a {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .hero {
    padding: 28px 16px 18px;
  }

  .hero::before {
    display: none;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .button {
    width: 100%;
  }

  .inputs,
  .search-grid {
    grid-template-columns: 1fr;
  }

  .tools-layout,
  .ad-slot,
  .seo-band,
  .mini-page {
    width: min(100% - 24px, 1180px);
  }

  .tools-layout {
    gap: 14px;
    margin: 20px auto;
  }

  .tool {
    padding: 16px;
    border-radius: 16px;
  }

  .tool-header {
    flex-direction: column;
    gap: 10px;
  }

  .nav a {
    padding: 0 11px;
  }

  .calculator.two-col {
    gap: 16px;
  }

  input,
  select {
    min-height: 48px;
    font-size: 1rem;
  }

  label {
    font-size: 0.72rem;
  }

  .result {
    padding: 18px;
    border-radius: 16px;
  }

  .result .main-value {
    font-size: 2.1rem;
    line-height: 1.05;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.48rem;
  }

  .metric {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .metric span {
    font-size: 5rem;
  }

  .mini-receipt {
    padding: 12px;
  }

  .mini-receipt div,
  .breakdown div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .breakdown dd {
    text-align: left;
  }

  .ad-slot {
    min-height: 74px;
    margin: 18px auto;
  }

  .seo-band {
    gap: 18px;
    margin: 28px auto;
    padding: 18px;
    border-radius: 16px;
  }

  .footer {
    padding: 22px 16px;
  }

  .mini-page {
    gap: 24px;
    padding: 24px 0 48px;
  }

  .mini-content {
    gap: 14px;
  }

  .content-block {
    padding: 18px;
    border-radius: 16px;
  }
}

@media (max-width: 390px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.32rem;
  }

  .result .main-value {
    font-size: 1.82rem;
  }

  .nav a,
  .sidebar a {
    font-size: 0.8rem;
  }
}
