:root {
  --paper: #f7f4ee;
  --ink: #111111;
  --graphite: #3a3a3a;
  --sheet: #e4e0d8;
  --gold: #c49a2c;
  --red: #c7332e;
  --amber: #d88a1d;
  --green: #2f7d4f;
  --white: #fffdf8;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(var(--sheet) 1px, transparent 1px),
    linear-gradient(90deg, var(--sheet) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 5;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
}

.skip-link:focus {
  top: 16px;
}

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

.site-header {
  padding: 22px 0 10px;
}

.brand-mark {
  display: grid;
  gap: 2px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  filter: grayscale(100%);
  border: 2px solid var(--ink);
  border-radius: 6px;
}

.brand-mark span,
.header-note,
.eyebrow,
.sheet-topline,
.progress-meta,
.status-list,
.data-chip,
.site-footer {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark strong {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 22px;
  line-height: 1;
}

.header-note {
  border: 1px solid var(--ink);
  padding: 6px 9px;
  background: var(--paper);
}

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

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: 44px;
  align-items: center;
  padding: 42px 0 80px;
}

.hero h1,
.screen-title,
.result-title {
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
}

.hero h1 {
  font-size: clamp(44px, 8vw, 88px);
  max-width: 870px;
}

.highlight-text {
  color: var(--red);
  display: inline-block;
  position: relative;
}

.highlight-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.16em;
  background: rgba(196, 154, 44, 0.48);
  z-index: -1;
}

.eyebrow {
  color: var(--graphite);
  margin: 0 0 14px;
}

.lead {
  max-width: 680px;
  font-size: 21px;
  color: var(--graphite);
  margin: 24px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.hero-actions span {
  max-width: 360px;
  color: var(--graphite);
  font-size: 14px;
}

.button {
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 13px 18px;
  min-height: 50px;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

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

.button:focus-visible,
.option:focus-within,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(196, 154, 44, 0.5);
  outline-offset: 3px;
}

.primary {
  background: var(--ink);
  color: var(--paper);
}

.primary.danger {
  background: var(--red);
  border-color: var(--red);
}

.secondary {
  background: transparent;
  color: var(--ink);
}

.diagnostic-sheet,
.checker-card,
.result-report {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.diagnostic-sheet {
  padding: 22px;
  min-height: 420px;
  position: relative;
}

.diagnostic-sheet::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(17, 17, 17, 0.22);
  pointer-events: none;
}

.sheet-topline,
.sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.sheet-topline {
  color: var(--graphite);
}

.stamp-stack {
  display: grid;
  gap: 16px;
  margin: 52px 0 34px;
}

.stamp {
  width: fit-content;
  border: 3px solid currentColor;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  padding: 8px 12px;
}

.stamp-main {
  color: var(--red);
  font-size: 30px;
  transform: rotate(-3deg);
}

.stamp-amber {
  color: var(--amber);
  font-size: 19px;
  transform: rotate(1.5deg);
  margin-left: 24px;
}

.stamp-green {
  color: var(--green);
  font-size: 17px;
  transform: rotate(-1deg);
}

.sheet-note {
  margin: 28px 0 0;
  color: var(--graphite);
  border-left: 4px solid var(--gold);
  padding-left: 14px;
}

.checker-shell {
  padding: 38px 0 72px;
}

.progress-wrap {
  margin-bottom: 14px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--graphite);
  margin-bottom: 8px;
}

.progress-track {
  height: 12px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 180ms ease;
}

.checker-card {
  padding: clamp(20px, 4vw, 42px);
}

.screen-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0 0 12px;
}

.screen-title {
  font-size: clamp(30px, 5vw, 58px);
  max-width: 850px;
}

.screen-help {
  color: var(--graphite);
  max-width: 720px;
  margin: 16px 0 0;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  border: 2px solid var(--sheet);
  border-radius: 6px;
  padding: 14px;
  cursor: pointer;
  background: var(--paper);
}

.option:hover {
  border-color: var(--ink);
}

.option input {
  margin-top: 4px;
  accent-color: var(--ink);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.consent-line.full {
  grid-column: 1 / -1;
}

.consent-line {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--graphite);
  font-size: 14px;
  line-height: 1.45;
}

.consent-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.consent-line a {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field label {
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 13px 12px;
}

textarea {
  min-height: 122px;
  resize: vertical;
}

.microcopy {
  color: var(--graphite);
  font-size: 14px;
  margin-top: 10px;
}

.form-error {
  min-height: 24px;
  color: var(--red);
  font-weight: 800;
  margin-top: 18px;
}

.checker-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.result-shell {
  padding: 38px 0 72px;
}

.result-report {
  padding: clamp(20px, 5vw, 50px);
  position: relative;
  overflow: hidden;
}

.result-report::after {
  content: "REF. RISULTATO";
  position: absolute;
  right: 24px;
  top: 24px;
  color: rgba(17, 17, 17, 0.18);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.result-label {
  display: inline-flex;
  border: 2px solid currentColor;
  border-radius: 4px;
  padding: 7px 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.result-label.red {
  color: var(--red);
  border-width: 3px;
  font-size: clamp(22px, 4vw, 42px);
  transform: rotate(-1deg);
}

.result-label.amber {
  color: var(--amber);
}

.result-label.green {
  color: var(--green);
}

.result-title {
  font-size: clamp(34px, 6vw, 70px);
  max-width: 860px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 30px;
  margin-top: 28px;
}

.result-copy p {
  color: var(--graphite);
  font-size: 18px;
}

.status-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.status-list div,
.data-chip {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 10px;
}

.candidate-box {
  border-top: 2px solid var(--ink);
  margin-top: 34px;
  padding-top: 28px;
}

.candidate-box h3 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 30px;
  margin: 0 0 10px;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.placeholder-note {
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  color: var(--graphite);
}

.site-footer {
  border-top: 2px solid var(--ink);
  padding: 24px 0 40px;
}

.privacy-main {
  padding: 56px 0 84px;
}

.privacy-article {
  width: min(860px, 100%);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 54px);
}

.privacy-article h1,
.privacy-article h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: 0;
  line-height: 1;
}

.privacy-article h1 {
  font-size: clamp(38px, 7vw, 76px);
  margin: 0 0 16px;
}

.privacy-article h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 34px 0 10px;
}

.privacy-article p,
.privacy-article li {
  color: var(--graphite);
}

.privacy-article ul {
  padding-left: 20px;
}

.privacy-article a {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .hero,
  .result-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .diagnostic-sheet {
    min-height: 340px;
  }

  .checker-actions,
  .hero-actions,
  .calendar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  html {
    scroll-behavior: auto;
    transition: none !important;
  }
}
