/* Content Model Audit. One stylesheet for the page, the report and the exported report. */

:root {
  --bg: #05080f;
  --surface: #0b111d;
  --surface-2: #101827;
  --line: #1e2b42;
  --line-strong: #2c3d5c;
  --text: #f0f4fa;
  --muted: #b7c3d6;
  --subtle: #93a1b8;
  --accent: #16b1ff;
  --accent-soft: #8adcff;
  --accent-ink: #03131c;
  --good: #3fdcae;
  --fine: #8adcff;
  --fair: #ffd166;
  --warn: #ff9f5a;
  --poor: #ff7a6b;
  --radius: 14px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent-soft);
  text-underline-offset: 0.18em;
}

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

code,
pre {
  font-family: var(--mono);
  font-size: 0.875em;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--accent-soft);
  overflow-wrap: anywhere;
}

pre {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow-x: auto;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  overflow-wrap: normal;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip:focus {
  top: 1rem;
}

.eyebrow {
  color: var(--accent-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Site chrome ---- */

.site-head {
  border-bottom: 1px solid var(--line);
}

.site-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
}

.byline {
  color: var(--subtle);
  font-size: 0.9375rem;
}

.brand-logo {
  display: inline-block;
  width: 130px;
  height: auto;
  vertical-align: -1px;
}

.foot-logo {
  justify-self: start;
  padding-block: 0.5rem;
}

.site-foot {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.9375rem;
}

.site-foot-inner {
  display: grid;
  gap: 0.35rem;
  padding-block: 1.75rem 2.5rem;
}

/* ---- Hero ---- */

.hero {
  padding-block: 3.5rem 2rem;
  background:
    radial-gradient(60rem 22rem at 80% -10%, rgb(22 177 255 / 16%), transparent 70%),
    radial-gradient(40rem 18rem at 0% 0%, rgb(255 138 61 / 8%), transparent 70%);
}

.hero h1 {
  margin-top: 0.6rem;
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.025em;
}

.lead {
  margin-top: 1rem;
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.privacy {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  max-width: 44rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgb(63 220 174 / 35%);
  border-radius: 12px;
  background: rgb(63 220 174 / 7%);
  color: var(--muted);
}

.privacy strong {
  color: var(--text);
}

.privacy svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  color: var(--good);
}

/* ---- Panels and buttons ---- */

.panel {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel > h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.chip {
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-soft);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ---- Input ---- */

.input-panel {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-panel.is-dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(22 177 255 / 20%);
}

.input-head h2 {
  font-size: 1.25rem;
}

.input-head p {
  margin-top: 0.25rem;
  color: var(--muted);
}

textarea {
  display: block;
  width: 100%;
  min-height: 13rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
}

textarea::placeholder {
  color: var(--subtle);
}

.file-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.error {
  padding: 0.85rem 1rem;
  border: 1px solid rgb(255 122 107 / 55%);
  border-radius: 10px;
  background: rgb(255 122 107 / 9%);
}

.error strong {
  display: block;
  color: var(--poor);
}

.error p {
  margin-top: 0.2rem;
  color: var(--muted);
}

.input-actions,
.sample-list,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.samples {
  display: grid;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.howto summary {
  color: var(--accent-soft);
  cursor: pointer;
  font-weight: 600;
}

.howto-body {
  margin-top: 0.9rem;
  color: var(--muted);
}

.howto-body p + p {
  margin-top: 0.5rem;
}

/* ---- About ---- */

.about {
  margin-top: 3.5rem;
}

.about > h2 {
  font-size: 1.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.about-grid li {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.about-grid h3 {
  font-size: 1rem;
}

.about-grid p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---- Report ---- */

.report {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.report-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: center;
}

.dial {
  width: 10.5rem;
  height: 10.5rem;
}

.dial-track {
  stroke: var(--surface-2);
}

.dial-value {
  stroke: currentColor;
}

.dial-score {
  fill: var(--text);
  font-size: 2.3rem;
  font-weight: 700;
}

.dial-of {
  fill: var(--subtle);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tone-good {
  color: var(--good);
}

.tone-fine {
  color: var(--fine);
}

.tone-fair {
  color: var(--fair);
}

.tone-warn {
  color: var(--warn);
}

.tone-poor {
  color: var(--poor);
}

.tone-none {
  color: var(--subtle);
}

.verdict h2 {
  margin-top: 0.35rem;
  outline: none; /* focused by script after an audit so screen readers announce it */
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.verdict-summary {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin-top: 1rem;
}

.stats li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.875rem;
}

.stats strong {
  color: var(--text);
}

.source {
  margin-top: 0.75rem;
  color: var(--subtle);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.report-actions {
  margin-top: 1.1rem;
}

.basis-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.basis-item {
  display: flex;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.9375rem;
}

.basis-mark {
  flex: none;
  font-weight: 700;
}

.is-present .basis-mark {
  color: var(--good);
}

.is-missing .basis-mark,
.is-missing strong {
  color: var(--subtle);
}

.basis-note {
  display: block;
  color: var(--subtle);
  font-size: 0.875rem;
}

.warnings {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgb(255 209 102 / 40%);
  border-radius: 10px;
  background: rgb(255 209 102 / 7%);
  color: var(--muted);
  font-size: 0.9375rem;
}

.warnings li + li {
  margin-top: 0.35rem;
}

.not-assessed {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.not-assessed h4 {
  color: var(--text);
  font-size: 1rem;
}

.not-assessed > p {
  margin-top: 0.3rem;
}

.not-assessed li {
  margin-top: 0.8rem;
}

.not-assessed strong {
  color: var(--text);
}

.not-assessed-rules {
  display: block;
  margin-top: 0.25rem;
  color: var(--subtle);
  font-size: 0.875rem;
}

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

.category {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.category-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.category h4 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.category-score {
  font-size: 1.375rem;
  font-weight: 700;
}

.bar {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 0.55rem;
}

.bar-track {
  fill: var(--line);
}

.bar-value {
  fill: currentColor;
}

.category-detail {
  margin-top: 0.5rem;
  color: var(--subtle);
  font-size: 0.875rem;
}

.strengths li {
  display: flex;
  gap: 0.65rem;
  color: var(--muted);
}

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

.strength-mark {
  flex: none;
  color: var(--good);
  font-weight: 700;
}

.cite {
  display: block;
  margin-top: 0.2rem;
  color: var(--subtle);
  font-size: 0.8125rem;
}

.findings {
  display: grid;
  gap: 2rem;
  margin-top: 0.75rem;
}

.severity {
  display: grid;
  gap: 0.9rem;
}

.severity-head h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.375rem;
}

.severity-head p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.sev-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: currentColor;
}

.sev-high .sev-dot {
  color: var(--poor);
}

.sev-medium .sev-dot {
  color: var(--fair);
}

.sev-low .sev-dot {
  color: var(--fine);
}

.finding {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.finding.sev-high {
  border-left-color: var(--poor);
}

.finding.sev-medium {
  border-left-color: var(--fair);
}

.finding.sev-low {
  border-left-color: var(--fine);
}

.finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.finding h4 {
  font-size: 1.0625rem;
}

.finding-count {
  color: var(--subtle);
  font-size: 0.875rem;
  white-space: nowrap;
}

.why {
  margin-top: 0.6rem;
  color: var(--muted);
}

.places {
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.places li {
  display: grid;
  gap: 0.2rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.place {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
}

.place-sep {
  color: var(--subtle);
}

.place-text {
  color: var(--muted);
}

.more summary {
  padding: 0.6rem 0;
  color: var(--accent-soft);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
}

.more .places {
  margin-top: 0;
}

.fix {
  margin-top: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.fix strong {
  display: block;
  color: var(--good);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.passed summary {
  cursor: pointer;
}

.passed summary h3 {
  display: inline;
  font-size: 1.0625rem;
}

.passed ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.35rem 1.5rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.passed li::before {
  content: "✓ ";
  color: var(--good);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-color: rgb(22 177 255 / 35%);
  background: linear-gradient(135deg, rgb(22 177 255 / 10%), transparent 60%), var(--surface);
}

.cta > div {
  flex: 1 1 22rem;
}

.cta h3 {
  font-size: 1.25rem;
}

.cta p {
  margin-top: 0.4rem;
  color: var(--muted);
}

.method {
  color: var(--subtle);
  font-size: 0.875rem;
}

.exported .wrap {
  padding-block: 1.5rem 3rem;
}

.exported .report {
  margin-top: 0;
}

@media (max-width: 40rem) {
  .hero {
    padding-block: 2.25rem 1.5rem;
  }

  .panel {
    padding: 1.15rem;
  }

  .report-head {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .dial {
    width: 8.5rem;
    height: 8.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

/* ---- Print and PDF: light, ink-friendly ---- */

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #f4f6fa;
    --line: #d5dbe6;
    --line-strong: #b9c2d2;
    --text: #10151f;
    --muted: #333c4d;
    --subtle: #566176;
    --accent: #0a6fb0;
    --accent-soft: #0a5d94;
    --accent-ink: #fff;
    --good: #0d7a5c;
    --fine: #0a6fb0;
    --fair: #9a6700;
    --warn: #b4530f;
    --poor: #b3261e;
    color-scheme: light;
  }

  .no-print,
  .more summary {
    display: none !important;
  }

  body {
    font-size: 10.5pt;
  }

  .wrap {
    width: 100%;
  }

  .report {
    margin-top: 0;
  }

  /* Let long findings flow across pages; keep headings with what follows. */
  .report,
  .findings,
  .severity {
    display: block;
  }

  .report > * + *,
  .findings > * + *,
  .severity > * + * {
    margin-top: 1rem;
  }

  .places li,
  .fix,
  .category,
  .basis-item,
  .strengths li,
  .severity-head,
  .finding-head,
  .cta {
    break-inside: avoid;
  }

  .severity-head,
  .finding-head,
  .cite,
  .why {
    break-after: avoid;
  }

  /* One line per place keeps long reports to a reasonable page count. */
  .places li {
    display: block;
    padding: 0.3rem 0;
  }

  .place {
    margin-right: 0.4rem;
  }

  .cta {
    background: var(--surface-2);
  }

  .cta .button::after {
    content: " (asharizon.com/contact)";
    font-weight: 400;
  }

  a {
    color: var(--text);
  }
}
