:root {
  --paper: #f6f4ef;
  --ink: #14201d;
  --muted: #5f6b66;
  --line: #d9d5ca;
  --panel: #fffdf8;
  --green: #153a35;
  --green-2: #27665e;
  --red: #d4513f;
  --amber: #b98222;
  --blue: #335f85;
  --shadow: 0 18px 50px rgba(20, 32, 29, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
textarea,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(246, 244, 239, 0.9);
  border-bottom: 1px solid rgba(217, 213, 202, 0.85);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green);
}

.brand-mark span {
  width: 5px;
  height: 17px;
  border-radius: 2px;
  background: var(--paper);
}

.nav {
  display: flex;
  gap: 6px;
}

.nav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 8px 10px;
}

.nav a:hover,
.nav a:focus-visible {
  background: #ebe7dc;
  color: var(--ink);
  outline: none;
}

main {
  overflow: clip;
}

.checker-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 71px);
  padding: clamp(32px, 6vw, 86px) clamp(18px, 4vw, 56px);
}

.checker-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  max-width: 680px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

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

.lede {
  max-width: 590px;
  color: var(--muted);
  font-size: 1.14rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.58);
  color: #33443f;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 11px;
}

.trust-row svg,
.pattern-grid svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.checker,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.checker {
  padding: clamp(16px, 3vw, 24px);
}

.field-head,
.actions,
.risk-header,
.share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

label {
  font-weight: 900;
}

.icon-button,
.primary-button,
.secondary-button,
.sample-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(51, 95, 133, 0.35);
  outline-offset: 2px;
}

.icon-button {
  width: 42px;
  background: #f0ece2;
  color: var(--muted);
}

.icon-button:hover {
  color: var(--ink);
}

textarea {
  display: block;
  width: 100%;
  min-height: 270px;
  margin-top: 10px;
  border: 1px solid #cfc9bc;
  border-radius: 8px;
  resize: vertical;
  background: #fffefa;
  color: var(--ink);
  padding: 14px;
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sample-row button,
.secondary-button {
  background: #f0ece2;
  color: #2c3734;
  padding: 9px 12px;
}

.sample-row button:hover,
.secondary-button:hover {
  background: #e8e2d5;
}

.actions {
  align-items: flex-start;
  margin-top: 18px;
}

.primary-button {
  flex: 0 0 auto;
  background: var(--green);
  color: #fffdf8;
  padding: 11px 16px;
}

.primary-button:hover {
  background: var(--green-2);
}

.primary-button svg,
.secondary-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.microcopy {
  max-width: 410px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.result-section {
  padding: 0 clamp(18px, 4vw, 56px) 56px;
}

.result-card {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 32px);
}

.score-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: conic-gradient(var(--red) 0deg, var(--red) 0deg, #ebe7dc 0deg);
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 950;
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--panel);
}

.score-ring span {
  position: relative;
}

.risk-summary {
  max-width: 840px;
  color: var(--muted);
  font-size: 1.05rem;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 22px;
}

.finding-list,
.step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.finding-list li,
.step-list li {
  padding-left: 4px;
}

.finding-list strong {
  display: block;
}

.finding-list span,
.step-list li {
  color: #44534f;
}

.share-box {
  justify-content: flex-start;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

#copyStatus {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.info-band,
.privacy-band {
  padding: clamp(44px, 7vw, 88px) clamp(18px, 4vw, 56px);
}

.info-band {
  background: #e9eee9;
  border-top: 1px solid #d4ddd4;
  border-bottom: 1px solid #d4ddd4;
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

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

.pattern-grid article {
  min-height: 218px;
  border: 1px solid #cfd8ce;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  padding: 20px;
}

.pattern-grid svg {
  margin-bottom: 22px;
  color: var(--green);
}

.pattern-grid p,
.privacy-band p {
  color: var(--muted);
}

.privacy-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.privacy-band p {
  max-width: 720px;
  font-size: 1.08rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .checker-shell,
  .privacy-band {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

@media (max-width: 680px) {
  .topbar {
    position: static;
  }

  .nav {
    display: none;
  }

  .checker-shell {
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(2.45rem, 15vw, 4.2rem);
  }

  .actions,
  .risk-header,
  .result-grid,
  .share-box {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .score-ring {
    width: 74px;
    height: 74px;
  }

  .pattern-grid {
    grid-template-columns: 1fr;
  }

  .pattern-grid article {
    min-height: 0;
  }
}
