:root {
  color-scheme: light;
  --ink: #111317;
  --muted: #5b626d;
  --panel: #fffefa;
  --canvas: #eef2ec;
  --line: #d4dacd;
  --green: #13835e;
  --amber: #bc7b16;
  --red: #b4232a;
  --blue: #2866a8;
  --black: #111317;
  --shadow: 0 24px 70px rgba(19, 25, 21, 0.13);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(19, 131, 94, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(180, 35, 42, 0.045) 1px, transparent 1px),
    var(--canvas);
  background-size: 42px 42px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.42;
}

a { color: inherit; }
button, input, textarea { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(16px, 3vw, 42px);
  border-bottom: 1px solid rgba(212, 218, 205, 0.9);
  background: rgba(238, 242, 236, 0.9);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--black);
  color: white;
  font-weight: 950;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 0.78rem; }
nav { display: flex; gap: 16px; color: var(--muted); font-size: 0.94rem; font-weight: 800; }
nav a { text-decoration: none; }

main { width: min(1500px, 100%); margin: 0 auto; }
.console-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1fr) minmax(280px, 0.72fr);
  gap: 18px;
  min-height: calc(100vh - 67px);
  padding: clamp(18px, 3vw, 42px);
}

.hero-copy, .scan-card, .score-card, .signal-grid article, .modules-panel, .bulk-tool, .bulk-results, .seo-grid a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 3vw, 36px);
  border-top: 4px solid var(--green);
}

.eyebrow, .label {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: 4rem;
  line-height: 0.96;
  letter-spacing: 0;
}
h2 { margin-bottom: 0; font-size: 1.35rem; line-height: 1.14; letter-spacing: 0; }
p { color: var(--muted); }

.metric-strip {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.metric-strip span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.metric-strip strong { color: var(--ink); font-family: "SFMono-Regular", Consolas, monospace; }

.scan-card, .score-card { padding: 18px; }
.card-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.card-head span { padding: 7px 10px; border-radius: 999px; background: #e2f0e8; color: var(--green); font-size: 0.76rem; font-weight: 900; white-space: nowrap; }
label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.76rem; font-weight: 950; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
}
input { min-height: 48px; padding: 0 14px; }
textarea { min-height: 150px; padding: 14px; resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(19, 131, 94, 0.16); }

button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--black);
  color: white;
  cursor: pointer;
  font-weight: 950;
}
button:hover { background: #000; }
button:disabled { cursor: not-allowed; background: #aab2aa; }
.secondary { border-color: var(--line); background: white; color: var(--ink); }
.full { width: 100%; margin-top: 16px; }
.sample-row, .button-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.sample-row button { border-color: var(--line); background: white; color: var(--ink); }

.decision-card {
  min-height: 176px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f1;
}
.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
}
.status.low { background: #dff2e9; color: var(--green); }
.status.medium { background: #fff0d4; color: var(--amber); }
.status.high { background: #f7dede; color: var(--red); }
.status.neutral { background: #e8ece4; color: var(--muted); }

.score-card { display: grid; align-content: center; }
.score-ring {
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 50%;
  background:
    conic-gradient(var(--red) calc(var(--score) * 1%), #e1e7dd 0),
    radial-gradient(circle at center, var(--panel) 59%, transparent 60%);
}
.score-ring span { font-size: 3.1rem; font-weight: 950; line-height: 1; }
.score-ring small { margin-top: -54px; color: var(--muted); font-weight: 900; text-transform: uppercase; }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 clamp(18px, 3vw, 42px) clamp(24px, 4vw, 42px);
}
.signal-grid article { padding: 18px; }
.signal-grid strong { display: block; margin: 8px 0; }
.signal-dot { display: block; width: 14px; height: 14px; border-radius: 50%; }
.signal-dot.green { background: var(--green); }
.signal-dot.amber { background: var(--amber); }
.signal-dot.blue { background: var(--blue); }
.signal-dot.red { background: var(--red); }

.modules-panel {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 18px;
  margin: 0 clamp(18px, 3vw, 42px) clamp(24px, 4vw, 42px);
  padding: 18px;
}
.module-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.module-list article { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.module-list strong, .module-list span { display: block; }
.module-list span { margin-top: 8px; color: var(--muted); }

.bulk-panel {
  display: grid;
  grid-template-columns: 0.62fr 0.9fr 1.1fr;
  gap: 18px;
  align-items: start;
  padding: 0 clamp(18px, 3vw, 42px) clamp(24px, 4vw, 42px);
}
.bulk-tool, .bulk-results { padding: 16px; }
.microcopy { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; }

.seo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 0 clamp(18px, 3vw, 42px) clamp(30px, 4vw, 54px);
}
.seo-grid a { display: block; padding: 16px; text-decoration: none; }
.seo-grid span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.72rem; font-weight: 950; overflow-wrap: anywhere; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 3vw, 42px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
footer p { max-width: 780px; margin-bottom: 0; }
footer a { font-weight: 950; }

.route-page { display: grid; gap: 24px; padding: clamp(18px, 4vw, 54px); }
.route-hero { max-width: 980px; min-height: 50vh; align-content: center; border-top: 4px solid var(--green); border-bottom: 1px solid var(--line); }
.route-hero h1 { max-width: 13ch; }
.route-hero p { max-width: 62ch; font-size: 1.08rem; }
.route-button { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; padding: 0 16px; border-radius: 8px; background: var(--black); color: white; text-decoration: none; font-weight: 950; }

@media (max-width: 1120px) {
  .console-hero, .bulk-panel, .modules-panel { grid-template-columns: 1fr; }
  .signal-grid, .seo-grid { grid-template-columns: repeat(2, 1fr); }
  .module-list { grid-template-columns: repeat(2, 1fr); }
  h1 { max-width: 13ch; font-size: 3.35rem; }
}

@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  nav { width: 100%; justify-content: space-between; }
  .console-hero { padding: 14px; }
  .input-row, .signal-grid, .seo-grid, .module-list { grid-template-columns: 1fr; }
  h1 { font-size: 2.35rem; }
}
