:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5d6a72;
  --line: #d9e1e5;
  --panel: #ffffff;
  --soft: #f4f7f8;
  --soft-blue: #e8f2ff;
  --blue: #2457d6;
  --green: #16845c;
  --amber: #b36b00;
  --red: #ba3a32;
  --shadow: 0 18px 48px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f7fafb;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header {
  min-height: 76px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.nav-links,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.nav-links a,
.site-footer a,
.text-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.nav-links a:hover,
.site-footer a:hover,
.text-link:hover,
.entry-grid a:hover,
.workflow-link:hover {
  text-decoration: underline;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 56px;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 26px;
  align-items: stretch;
  padding: 28px 0 34px;
}

.tool-copy,
.audit-panel,
.score-panel,
.evidence-panel,
.intent-panel,
.category-card,
.workflow-link,
.entry-grid a,
.policy-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tool-copy {
  padding: clamp(24px, 4vw, 42px);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.15rem, 4vw, 4.25rem);
  line-height: 0.98;
  margin-bottom: 18px;
  max-width: 850px;
}

h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  line-height: 1.05;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 760px;
}

.signal-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signal-list li,
.mode-strip span,
.category-status {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.audit-panel {
  padding: 24px;
  align-self: center;
}

.audit-panel label,
.intent-panel label {
  display: block;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 8px;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #b9c6cd;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(36, 87, 214, 0.28);
  outline-offset: 2px;
}

input[aria-invalid="true"] {
  border-color: var(--red);
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
}

.secondary-button {
  background: var(--ink);
  color: #ffffff;
  width: 100%;
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(0.95);
}

a.primary-button,
a.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  margin-top: 8px;
}

.field-note,
.form-status,
.demo-disclosure,
.category-card p,
.section-heading p,
.workflow-link span,
.policy-copy {
  color: var(--muted);
  line-height: 1.55;
}

.field-note {
  margin: 10px 0 18px;
}

.mode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1fr);
  gap: 20px;
  margin: 14px 0 42px;
}

.score-panel,
.evidence-panel {
  padding: 24px;
}

.score-meter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0;
}

.score-number {
  font-size: clamp(3.6rem, 8vw, 6.5rem);
  line-height: 0.9;
  font-weight: 900;
}

.score-total {
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 800;
}

.score-track,
.mini-track {
  width: 100%;
  height: 12px;
  background: #e5ecef;
  border-radius: 8px;
  overflow: hidden;
}

.score-track span,
.mini-track span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.fix-list {
  margin: 0;
  padding-left: 22px;
}

.fix-list li {
  padding: 10px 0;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}

.fix-list li:last-child {
  border-bottom: 0;
}

.category-section,
.report-section,
.workflow-section,
.seo-entry-section,
.policy-section {
  margin: 42px 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  padding: 18px;
  box-shadow: none;
}

.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
}

.category-head span {
  font-weight: 900;
  color: var(--blue);
  white-space: nowrap;
}

.category-status {
  display: inline-block;
  margin: 12px 0 8px;
  padding: 5px 8px;
  color: var(--amber);
  background: #fff7e8;
  border-color: #f0d6aa;
}

details {
  margin-top: 12px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.intent-grid,
.workflow-grid,
.entry-grid,
.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.intent-panel {
  padding: 22px;
  box-shadow: none;
}

.intent-panel input,
.intent-panel select {
  margin-bottom: 14px;
}

.workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-link,
.entry-grid a,
.policy-card {
  display: block;
  padding: 18px;
  text-decoration: none;
  box-shadow: none;
}

.workflow-link strong,
.workflow-link span {
  display: block;
}

.workflow-link span {
  margin-top: 8px;
}

.entry-grid a {
  color: var(--blue);
  font-weight: 800;
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.noscript {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 14px;
  background: #fff7e8;
  border: 1px solid #f0d6aa;
  border-radius: 8px;
  color: var(--ink);
}

.policy-hero {
  padding: 36px 0 18px;
  max-width: 840px;
}

.policy-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.policy-card h2 {
  font-size: 1.25rem;
}

.policy-card ul {
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .tool-shell,
  .result-layout,
  .category-grid,
  .workflow-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tool-copy {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .audit-panel {
    grid-column: 1 / -1;
  }

  .category-grid,
  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 24px, 1180px);
  }

  .site-header,
  .site-footer,
  .panel-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    gap: 10px;
  }

  .tool-shell,
  .result-layout,
  .category-grid,
  .intent-grid,
  .workflow-grid,
  .entry-grid,
  .policy-grid {
    grid-template-columns: 1fr;
  }

  .url-row {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  h1 {
    font-size: 2.35rem;
  }
}

@media (max-width: 420px) {
  .tool-copy,
  .audit-panel,
  .score-panel,
  .evidence-panel,
  .intent-panel,
  .category-card,
  .workflow-link,
  .entry-grid a,
  .policy-card {
    padding: 16px;
  }

  h1 {
    font-size: 2rem;
  }
}
