/* AI Generator Suite — Digital Envisioned (navy + gold, A17-first) */
:root {
  --navy: #0a1f44;
  --navy-2: #12284d;
  --navy-3: #1b3a66;
  --gold: #3780d4;
  --gold-dark: #337acc;
  --ink: #1e2430;
  --muted: #5a6474;
  --line: #d9dee6;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ok: #1e7a3c;
  --warn: #1b4f8a;
  --danger: #a32e2e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
a { color: var(--navy-3); }
a:visited { color: var(--navy-3); }

/* Header */
.site-header { background: var(--navy); color: #fff; padding: 18px 0 14px; border-bottom: 4px solid var(--gold); }
.site-header .brand { color: #fff; font-size: 24px; font-weight: 800; text-decoration: none; letter-spacing: .2px; }
.site-header .brand:visited { color: #fff; }
.site-header .tagline { margin: 2px 0 10px; color: var(--gold); font-size: 14px; font-weight: 600; }
.main-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.main-nav a {
  color: #fff; text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 10px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.main-nav a[aria-current="page"] { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* Main */
main.wrap { padding-top: 20px; padding-bottom: 32px; }
h1 { font-size: 28px; line-height: 1.2; color: var(--navy); margin: 6px 0 8px; }
h2 { font-size: 22px; color: var(--navy); margin: 26px 0 8px; }
h3 { font-size: 18px; color: var(--navy); margin: 20px 0 6px; }
p { margin: 0 0 12px; }
.lede { font-size: 18px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.gold-rule { border: 0; border-top: 2px solid var(--gold); margin: 18px 0; }

/* Cards */
.cards { display: grid; gap: 16px; margin: 18px 0; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.card h2, .card h3 { margin: 0; font-size: 20px; }
.card p { margin: 0; flex: 1; }
.card .cta { margin-top: 6px; }

/* Pills */
.pill {
  display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px;
  border-radius: 999px; line-height: 1.4;
}
.pill-live { background: #e2f3e8; color: var(--ok); border: 1px solid #bfe3cb; }
.pill-capture { background: #fdf3d7; color: var(--warn); border: 1px solid #7aafec; }

/* Forms */
form.gen { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
label.field { display: block; font-weight: 700; color: var(--navy); margin: 14px 0 6px; }
label.field:first-child { margin-top: 0; }
input[type="text"], textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid #b9c2cf; border-radius: 8px; padding: 12px 14px;
  background: #fff; min-height: 48px;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input[type="text"]:focus, textarea:focus, select:focus { outline: 3px solid rgba(55,128,212,.55); border-color: var(--gold-dark); }
.hint { font-size: 14px; color: var(--muted); margin-top: 4px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.radio-row label {
  border: 1px solid #b9c2cf; border-radius: 999px; padding: 10px 16px;
  font-weight: 600; cursor: pointer; min-height: 48px; display: inline-flex; align-items: center; gap: 6px;
  background: #fff;
}
.radio-row input { accent-color: var(--navy); width: 18px; height: 18px; }
.radio-row label:has(input:checked) { border-color: var(--gold-dark); background: #fdf6dd; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border-radius: 10px; border: 1px solid transparent;
  min-height: 52px; padding: 12px 22px; font-size: 17px;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:visited { color: #fff; }
.btn-primary:hover { background: var(--navy-3); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:visited { color: var(--navy); }
.btn-gold:hover { background: #458de0; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-ghost:visited { color: var(--navy); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }

/* Result areas */
.result { margin: 18px 0; }
.result[hidden] { display: none; }
.notice {
  border-radius: 10px; padding: 14px 16px; margin: 14px 0; font-size: 16px;
  border: 1px solid var(--line); background: #fff;
}
.notice-ok { border-color: #bfe3cb; background: #eef8f1; }
.notice-warn { border-color: #7aafec; background: #fdf6dd; }
.notice-err { border-color: #eec2c2; background: #fdf0f0; }
pre.code {
  background: var(--navy); color: #e8eef7; border-radius: 10px; padding: 16px;
  overflow-x: auto; font-size: 14px; line-height: 1.5; white-space: pre; tab-size: 2;
  max-height: 480px; overflow-y: auto;
}
.preview-frame { width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.gen-image { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
.doc-text {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  white-space: pre-wrap; font-size: 15px; line-height: 1.6; max-height: 480px; overflow-y: auto;
}
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Steps / how it works */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 12px 0; }
.steps li { counter-increment: step; padding: 10px 0 10px 46px; position: relative; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 10px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* Footer */
.site-footer { background: var(--navy); color: #dfe6f2; padding: 22px 0 28px; border-top: 4px solid var(--gold); font-size: 15px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--gold); }
.site-footer a:visited { color: var(--gold); }
