:root {
  --ink: #152033;
  --muted: #5f6b7d;
  --blue: #2156d9;
  --blue-dark: #173fa4;
  --blue-soft: #eef4ff;
  --green: #17875d;
  --paper: #ffffff;
  --line: #dfe5ee;
  --bg: #f5f7fb;
  --warning: #fff8df;
  --shadow: 0 18px 50px rgba(30, 51, 89, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
:focus-visible { outline: 3px solid rgba(33,86,217,.35); outline-offset: 3px; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.header-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 40px; border: 2px solid var(--blue); border-radius: 7px; position: relative; background: #fff; box-shadow: 5px 5px 0 var(--blue-soft); }
.brand-mark::after { content: ""; position: absolute; left: 8px; right: 8px; top: 12px; height: 2px; background: var(--blue); box-shadow: 0 7px 0 var(--blue), 0 14px 0 var(--blue); }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.main-nav a:hover { color: var(--blue); }
.header-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 17px; border-radius: 10px; background: var(--blue); color: white !important; }
.hero { padding: 86px 0 72px; background-color: #f5f8fd; background-image: linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.94) 34%,rgba(255,255,255,.64) 49%,rgba(255,255,255,.08) 72%),url('/assets/hero-background.webp'); background-repeat: no-repeat; background-size: cover; background-position: center right; border-bottom: 1px solid var(--line); }
.hero-grid { display: block; }
.hero-copy { max-width: 670px; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.035em; margin-top: 0; }
h1 { font-size: clamp(39px, 5vw, 66px); margin-bottom: 20px; max-width: 800px; }
h2 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 14px; }
h3 { font-size: 20px; margin-bottom: 9px; }
.lead { max-width: 700px; color: var(--muted); font-size: clamp(18px, 2vw, 21px); margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 12px; background: var(--blue); color: white; font-weight: 750; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--blue-dark); }
.btn-secondary { background: white; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--blue-soft); color: var(--blue-dark); }
.btn-small { min-height: 40px; padding: 0 15px; border-radius: 9px; font-size: 14px; }
.trust-line { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.trust-line span::before { content: "✓"; margin-right: 7px; color: var(--green); font-weight: 900; }
.section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 30px; }
.section-head p { color: var(--muted); margin: 0; }
.generator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.generator-card { position: relative; display: block; min-height: 190px; padding: 25px 25px 58px; border: 1px solid var(--line); border-radius: 16px; background: white; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.generator-card:hover { transform: translateY(-3px); border-color: #b7c9ef; box-shadow: 0 14px 30px rgba(30,51,89,.1); }
.card-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 850; margin-bottom: 22px; }
.generator-card p { margin: 0; color: var(--muted); font-size: 14px; }
.generator-card .open { position: absolute; right: 22px; bottom: 20px; color: var(--blue); font-size: 13px; font-weight: 750; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--ink); color: white; border-radius: 18px; padding: 28px; counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 26px; border-radius: 50%; background: #fff; color: var(--ink); font-weight: 850; }
.step p { margin: 0; color: #cfd7e5; }
.notice { padding: 18px 20px; border: 1px solid #efd88a; border-radius: 12px; background: var(--warning); color: #66521b; font-size: 14px; }
.tool-page { padding: 42px 0 70px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.breadcrumbs a { text-decoration: none; color: var(--blue); }
.tool-intro { margin-bottom: 26px; }
.tool-intro h1 { font-size: clamp(34px,4vw,52px); margin-bottom: 12px; }
.tool-intro p { color: var(--muted); max-width: 780px; margin: 0; font-size: 18px; }
.workspace { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 20px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 8px 26px rgba(30,51,89,.06); overflow: hidden; }
.panel-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-head h2 { margin: 0; font-size: 21px; }
.panel-body { padding: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 750; color: #39465a; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #cfd7e3; background: #fff; color: var(--ink); border-radius: 10px; padding: 11px 12px; outline: none; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(33,86,217,.12); }
.tone { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 18px 0; }
.tone button { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 10px 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.tone button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.generate-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.save-state { color: var(--muted); font-size: 13px; }
.editor { width: 100%; min-height: 580px; padding: 42px 44px; border: 0; outline: 0; resize: vertical; background: #fff; color: #111827; font: 16px/1.72 Georgia, "Times New Roman", serif; }
.toolbar { padding: 12px; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); background: #fafbfc; }
.toolbar .btn { flex: 1 1 auto; min-width: 100px; }
.rating { display: flex; align-items: center; gap: 9px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.rating button { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 7px 11px; }
.legal { max-width: 850px; margin: 0 auto; padding: 55px 0 80px; }
.legal h1 { font-size: 44px; }
.legal h2 { font-size: 26px; margin-top: 34px; }
.legal p, .legal li { color: #435067; }
.site-footer { padding: 42px 0; border-top: 1px solid var(--line); background: white; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 35px; }
.footer-note { color: var(--muted); font-size: 14px; max-width: 440px; margin-top: 13px; }
.footer-links { display: grid; gap: 9px; align-content: start; }
.footer-links strong { margin-bottom: 4px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.error-box { color: #a22929; background: #fff0f0; border: 1px solid #f0b6b6; border-radius: 9px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; display: none; }
.error-box.show { display: block; }
.empty-output { min-height: 580px; display: grid; place-items: center; padding: 40px; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .generator-grid { grid-template-columns: repeat(2,1fr); }
  .main-nav a:not(.header-cta) { display: none; }
}
@media (max-width: 620px) {
  .wrap { width: min(100% - 22px, 1180px); }
  .header-row { min-height: 62px; }
  .brand { font-size: 19px; }
  .header-cta { display: none !important; }
  .hero { padding: 52px 0 44px; background-image: linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.94) 62%,rgba(255,255,255,.68) 100%),url('/assets/hero-background.webp'); background-position: 64% center; }
  .section { padding: 52px 0; }
  .generator-grid, .steps, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .generator-card { min-height: 165px; }
  .field-wide { grid-column: auto; }
  .tool-page { padding-top: 26px; }
  .panel-head { align-items: flex-start; }
  .editor { min-height: 500px; padding: 28px 22px; }
  .tone { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  body * { visibility: hidden; }
  #document-editor, #document-editor * { visibility: visible; }
  #document-editor { position: absolute; inset: 0; width: 100%; min-height: 100%; border: 0; padding: 18mm; font-size: 12pt; resize: none; }
}
