:root {
  --bg: #f3f7fb;
  --bg-accent: #e6f0fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #172536;
  --muted: #516273;
  --line: #ced9e5;
  --line-strong: #9eb5cc;
  --brand: #0f5ea8;
  --brand-deep: #0a4174;
  --warning-bg: #fff7e6;
  --warning-text: #8c5f00;
  --danger-bg: #fff1ef;
  --danger-text: #8f1f1b;
  --success-bg: #e8f6ee;
  --success-text: #16643d;
  --shadow: 0 18px 40px rgba(11, 47, 81, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 94, 168, 0.1), transparent 38%),
    linear-gradient(180deg, #f9fcff 0%, var(--bg) 38%, #eef4fa 100%);
  line-height: 1.6;
}

a {
  color: var(--brand-deep);
}

a:hover {
  color: var(--brand);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--brand-deep);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid rgba(158, 181, 204, 0.55);
  background: rgba(249, 252, 255, 0.92);
  backdrop-filter: blur(10px);
}

.site-header__inner,
.site-footer__inner,
main {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.brand {
  text-decoration: none;
  color: var(--text);
}

.brand__title {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand__tag {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav ul,
.footer-nav ul,
.plain-list,
.check-list,
.warning-list,
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav ul {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.site-nav a,
.footer-nav a {
  text-decoration: none;
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--brand-deep);
  font-weight: 700;
}

main {
  padding: 2rem 0 4rem;
}

.hero {
  padding: 2rem 0 1rem;
}

.hero__panel,
.panel,
.results-panel,
.content-panel {
  background: var(--panel);
  border: 1px solid rgba(158, 181, 204, 0.52);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__panel {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero__panel::after {
  content: "";
  position: absolute;
  inset: auto -8% -30% auto;
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, rgba(15, 94, 168, 0.12), rgba(15, 94, 168, 0));
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5 {
  margin-top: 0;
  color: #0f2236;
  line-height: 1.2;
  text-wrap: balance;
}

h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin-bottom: 1rem;
  max-width: 22ch;
}

h2 {
  font-size: clamp(1.85rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.hero__lede {
  font-size: 1.12rem;
  max-width: 55rem;
}

.hero__actions,
.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}

.button--primary:hover {
  background: var(--brand);
  border-color: var(--brand);
}

.button--secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.metric-strip,
.grid-3,
.grid-2,
.bucket-grid,
.evidence-groups,
.resource-grid,
.comparison-grid {
  display: grid;
  gap: 1rem;
}

.metric-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.5rem;
}

.metric-card,
.info-card,
.bucket-card,
.evidence-card,
.resource-card,
.comparison-card,
.faq-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.grid-3,
.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-2,
.comparison-grid,
.bucket-grid,
.evidence-groups {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.panel,
.content-panel {
  padding: 1.6rem;
  margin-top: 1.5rem;
}

.section-heading {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.section-heading p {
  margin-bottom: 0;
}

.tool-layout {
  display: grid;
  gap: 1.5rem;
}

.triage-form {
  display: grid;
  gap: 1rem;
}

.field-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.field-group legend {
  padding: 0 0.35rem;
  font-weight: 700;
  color: #173151;
}

.field-hint {
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.field-error {
  margin: 0.75rem 0 0;
  color: var(--danger-text);
  font-size: 0.95rem;
}

.option-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.option-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.option-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(15, 94, 168, 0.25);
  background: #f3f8ff;
}

.option-card input {
  margin-top: 0.2rem;
}

.results-panel {
  padding: 1.5rem;
}

.results-header {
  margin-bottom: 1.5rem;
}

.results-section + .results-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.bucket-card__header,
.evidence-list__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.severity,
.state-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.severity--fix-now {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.severity--review {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.severity--possible-issue {
  background: var(--bg-accent);
  color: var(--brand-deep);
}

.state-tag--ready {
  background: var(--success-bg);
  color: var(--success-text);
}

.state-tag--todo {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.why-line {
  margin-bottom: 0;
  color: #405466;
}

.evidence-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.evidence-list__item {
  border-top: 1px solid rgba(206, 217, 229, 0.8);
  padding-top: 0.9rem;
}

.evidence-list__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.ordered-list {
  padding-left: 1.2rem;
  margin: 0;
  color: var(--text);
}

.ordered-list li + li {
  margin-top: 0.8rem;
}

.warning-list,
.check-list,
.link-list {
  display: grid;
  gap: 0.8rem;
}

.warning-list li,
.check-list li {
  position: relative;
  padding-left: 1.3rem;
}

.warning-list li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
}

.warning-list li::before {
  background: #c26d00;
}

.check-list li::before {
  background: var(--brand);
}

.link-list__item {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.link-list__item p {
  margin-bottom: 0;
}

.notice {
  border-left: 4px solid var(--brand);
  padding: 1rem 1.1rem;
  background: #eef5fd;
  border-radius: 0 14px 14px 0;
}

.notice--warning {
  border-left-color: #b27a14;
  background: #fff8ec;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: #173151;
}

.site-footer {
  border-top: 1px solid rgba(158, 181, 204, 0.55);
  padding: 1.5rem 0 2.5rem;
  background: rgba(249, 252, 255, 0.92);
}

.site-footer__inner {
  display: grid;
  gap: 1rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.site-footer p {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 920px) {
  .tool-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .hero__panel,
  .panel,
  .content-panel,
  .results-panel {
    padding: 1.25rem;
  }

  .site-header__inner {
    align-items: flex-start;
  }

  .bucket-card__header,
  .evidence-list__header {
    flex-direction: column;
  }
}
