:root {
  --bg: #0b151d;
  --bg-soft: #111e27;
  --panel: rgba(14, 27, 36, 0.82);
  --line: rgba(225, 235, 237, 0.18);
  --line-strong: rgba(225, 235, 237, 0.34);
  --text: #f2f4ef;
  --muted: #b9c5c7;
  --muted-2: #8d9da1;
  --accent: #e6a164;
  --accent-soft: rgba(230, 161, 100, 0.14);
  --local: #b9d8ce;
  --send: #efc38f;
  --radius: 18px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--text);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(1320px, calc(100% - 48px));
  min-height: 86px;
  margin: 0 auto;
}

.site-header--overlay { position: absolute; inset: 0 0 auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  background: rgba(9, 18, 25, 0.42);
  backdrop-filter: blur(10px);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: 0.03em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: #dde5e5;
  font-size: 13px;
  text-decoration: none;
  text-underline-offset: 6px;
}
.main-nav a:hover, .main-nav a:focus-visible { color: #fff; text-decoration: underline; }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(9, 18, 25, 0.55);
}
.menu-toggle span:not(.sr-only) { display: block; width: 17px; height: 1px; margin: 5px auto; background: currentColor; }

.home {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow-x: hidden;
  background: #0a141c;
}

.site-header--overlay {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid rgba(225, 235, 237, 0.12);
  background: linear-gradient(to bottom, rgba(6, 15, 21, 0.78), rgba(6, 15, 21, 0.55));
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px) saturate(1.08);
}

.brand__wordmark {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.home-main {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100svh - 70px);
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 128px 0 58px;
  text-align: center;
}

.hero-copy {
  width: min(790px, 100%);
  padding: 0;
  text-shadow: 0 3px 32px rgba(0, 0, 0, 0.88);
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 6vw, 82px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-copy__lead {
  max-width: 790px;
  margin: 24px auto 0;
  color: #e0e6e4;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.58;
  text-wrap: balance;
}

.tools-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
  scroll-margin-top: 104px;
}

.tool-card {
  position: relative;
  display: grid;
  min-height: 98px;
  place-items: center;
  padding: 18px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: inherit;
  background: linear-gradient(145deg, rgba(16, 31, 41, 0.8), rgba(8, 18, 25, 0.62));
  backdrop-filter: blur(16px) saturate(1.05);
  text-decoration: none;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.tool-card strong {
  font-family: var(--serif);
  font-size: clamp(18px, 1.65vw, 23px);
  font-weight: 400;
  line-height: 1.08;
  transition: transform 240ms ease;
}

.tool-card__more {
  position: absolute;
  right: 20px;
  bottom: 17px;
  left: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 240ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  outline: none;
  background: linear-gradient(145deg, rgba(22, 40, 51, 0.92), rgba(11, 23, 31, 0.78));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

.tool-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tool-card:hover strong,
.tool-card:focus-visible strong {
  transform: translateY(-13px);
}

.tool-card:hover .tool-card__more,
.tool-card:focus-visible .tool-card__more {
  opacity: 1;
  transform: translateY(0);
}

.home-footer {
  position: relative;
  z-index: 12;
  display: flex;
  width: min(1120px, calc(100% - 48px));
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(225, 235, 237, 0.14);
  color: rgba(224, 232, 232, 0.64);
  font-size: 11px;
}

.home-footer a { text-underline-offset: 4px; }

.interior { background: radial-gradient(circle at 70% -10%, #1b2b35 0, transparent 38%), var(--bg); }
.interior .site-header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 18, 25, 0.9);
  backdrop-filter: blur(18px) saturate(1.06);
}
.page-shell { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 96px; }
.page-head { max-width: 760px; margin-bottom: 42px; }
.page-head .eyebrow { color: var(--accent); }
.page-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(40px, 6vw, 72px); font-weight: 400; line-height: 1; letter-spacing: -0.04em; }
.page-head p { max-width: 680px; margin: 22px 0 0; color: var(--muted); font-size: 17px; }
.privacy-flag { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; padding: 14px 16px; border: 1px solid rgba(185, 216, 206, 0.25); border-radius: 12px; color: #c9ddd7; background: rgba(185, 216, 206, 0.06); font-size: 13px; }
.privacy-flag--warn { border-color: rgba(239, 195, 143, 0.28); color: #efd0a9; background: rgba(239, 195, 143, 0.06); }

.panel { padding: clamp(22px, 4vw, 42px); border: 1px solid var(--line); border-radius: 22px; background: rgba(13, 27, 36, 0.74); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18); }
.panel + .panel { margin-top: 18px; }
.panel h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.panel > p { color: var(--muted); }

.wizard-progress { display: flex; gap: 8px; margin-bottom: 30px; }
.wizard-progress span { width: 34px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); }
.wizard-progress span.is-current, .wizard-progress span.is-done { background: var(--accent); }
.wizard-panel[hidden], [hidden] { display: none !important; }
.wizard-panel h2 { margin-bottom: 6px; }
.wizard-panel__intro { margin: 0 0 26px; color: var(--muted); }
.field { display: block; margin: 0 0 24px; }
.field span { display: block; margin-bottom: 9px; color: #e8ece9; font-size: 14px; }
textarea {
  width: 100%;
  min-height: 116px;
  padding: 15px 16px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(4, 12, 17, 0.5);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.summary-area { min-height: 320px; line-height: 1.65; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, .button:focus-visible { border-color: var(--accent); outline: none; }
.button--primary { border-color: var(--accent); color: #15100c; background: var(--accent); }
.button--quiet { border-color: transparent; color: var(--muted); }
.button:disabled { cursor: not-allowed; opacity: 0.45; }
.status { min-height: 22px; margin-top: 14px; color: var(--local); font-size: 13px; }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mode-card { min-height: 170px; padding: 24px; text-align: left; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: rgba(6, 15, 21, 0.4); cursor: pointer; }
.mode-card:hover, .mode-card:focus-visible { border-color: var(--accent); outline: none; }
.mode-card strong { display: block; font-family: var(--serif); font-size: 27px; font-weight: 400; }
.mode-card span { display: block; margin-top: 10px; color: var(--muted); }

.content-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.prose h2 { margin: 34px 0 10px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose a { color: var(--text); }
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts strong { display: block; color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.facts span { display: block; margin-top: 4px; color: var(--muted); }
.empty-state { padding: 28px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); }

.site-footer { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12px; }
.site-footer a { margin-left: 18px; }

@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 32px);
    min-height: 72px;
  }

  .site-header--overlay {
    width: 100%;
    min-height: 72px;
    padding: 0 16px;
  }

  .interior .site-header {
    width: 100%;
    padding: 0 16px;
  }

  .brand__wordmark { font-size: 17px; }
  .menu-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 66px;
    right: 0;
    display: none;
    width: min(280px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(7, 17, 23, 0.96);
    box-shadow: 0 18px 50px rgba(0,0,0,.36);
  }

  .site-header--overlay .main-nav { right: 16px; }
  .main-nav.is-open { display: grid; }
  .main-nav a { padding: 11px 10px; }

  .home-main {
    width: calc(100% - 32px);
    min-height: auto;
    padding: 126px 0 44px;
  }

  .hero-copy h1 { font-size: clamp(46px, 15vw, 64px); }
  .hero-copy__lead { max-width: 560px; font-size: 16px; }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 34px;
  }

  .tool-card {
    min-height: 82px;
    border-radius: 18px;
  }

  .tool-card strong { font-size: 21px; }
  .tool-card:hover strong,
  .tool-card:focus-visible strong { transform: translateY(-11px); }
  .tool-card__more { bottom: 12px; }

  .home-footer {
    width: calc(100% - 32px);
    min-height: 62px;
    padding-bottom: 18px;
  }

  .page-shell { padding-top: 48px; }
  .page-head h1 { font-size: 44px; }
  .mode-grid { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .brand__wordmark { font-size: 16px; }

  .hero-copy h1 { font-size: 46px; }

  .home-footer {
    gap: 10px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (hover: none) {
  .tool-card:active { transform: scale(0.985); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
