:root {
  --navy: #14213d; --ink: #1d2433; --muted: #5b6475; --line: #dfe3ea; --bg: #f6f7f9; --card: #fff;
  --orange: #e8590c; --orange-dark: #c94c0a; --green: #2b8a3e; --red: #c92a2a;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e9ecf1; --muted: #a3acbb; --line: #2c3444; --bg: #10151f; --card: #171e2b; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
a { color: var(--orange); }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 1.5rem; margin: 40px 0 12px; }
h3 { font-size: 1.2rem; margin: 0 0 4px; }

.top { background: var(--navy); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.brand { color: #fff; font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.top nav { display: flex; gap: 16px; }
.top nav a { color: #cfd6e4; text-decoration: none; font-size: .95rem; }

.hero { padding-top: 40px; padding-bottom: 8px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn { display: inline-block; background: var(--orange); color: #fff; border: 0; border-radius: 10px; padding: 14px 20px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 48px; }
.btn:hover { background: var(--orange-dark); }
.btn.ghost { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.btn.small { padding: 8px 14px; min-height: 40px; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: wait; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chips a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; color: var(--ink); font-size: .95rem; }

.cat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0 0 16px; scroll-margin-top: 70px; }
.cat.sponsored { border: 2px solid var(--orange); }
.tag { display: inline-block; background: var(--orange); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.problem { color: var(--muted); margin: 0 0 12px; font-style: italic; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool { border-top: 1px solid var(--line); padding-top: 10px; }
.tool > a { font-weight: 700; font-size: 1.05rem; }
.tool p { margin: 4px 0 8px; }
.slot { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; color: var(--muted); }
.slot-name { font-weight: 700; }
.disclose { color: var(--muted); font-size: .9rem; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px 18px; margin-top: 32px; scroll-margin-top: 70px; }
.form { display: grid; gap: 12px; max-width: 520px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.form input, .form select { font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); min-height: 48px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.msg { min-height: 1.4em; margin: 0; font-weight: 600; }
.msg.ok { color: var(--green); } .msg.err { color: var(--red); }

.prompts { padding-left: 20px; }
.prompts li { margin-bottom: 24px; }
.prompts h2 { font-size: 1.1rem; margin: 0 0 6px; }
.prompts pre { white-space: pre-wrap; font: .95rem/1.5 ui-monospace, Consolas, monospace; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0 0 8px; }

.foot { margin-top: 48px; padding: 24px 16px; text-align: center; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.build { font-size: .8rem; }

@media print {
  .top, .foot, .copy, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .prompts pre { border: 1px solid #999; }
}

.brand { white-space: nowrap; }
.top nav a { white-space: nowrap; }
.sponsored .tools { grid-template-columns: 1fr; max-width: 640px; }
@media (max-width: 480px) {
  .top nav { gap: 12px; }
  .top nav a { font-size: .85rem; }
  .brand { font-size: 1rem; }
  .top nav a[href="#about"] { display: none; }
}
