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

main,
.intro,
.workspace,
.results,
.result-grid,
.verdict-card,
.result-card,
.field-meta,
.field-meta > div {
  width: 100%;
  min-width: 0;
}

.sheet-heading > *,
.results-header > *,
.results-actions > *,
.verdict-card > *,
.card-heading > *,
.finding > *,
.source-list,
.source-list li,
.sources-details {
  min-width: 0;
  max-width: 100%;
}

.verdict-card h3,
.result-card h3,
.result-card h4,
.result-card p,
.result-card li,
.finding blockquote,
.source-list a,
.source-list p {
  overflow-wrap: anywhere;
  word-break: normal;
}

.field-meta p {
  max-width: 52rem;
}

.example-link {
  margin-top: .45rem;
  padding: .15rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font: 700 .78rem/1.4 system-ui, sans-serif;
  cursor: pointer;
}

.example-link:hover {
  color: var(--ink);
}

.controls {
  display: block;
}

.progress-panel {
  min-height: 9rem;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--forest);
  background: rgba(255, 254, 250, .72);
}

.progress-panel .kicker,
.progress-message,
.progress-steps {
  margin: 0;
}

.cancel-review {
  margin-top: .7rem;
  padding: .2rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
}

.retry-button { margin-top: .8rem; }

.research-card h4 { margin: 1rem 0 .3rem; font: 800 .72rem/1.4 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.research-card ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.sources-details { margin-top: 1rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: .8rem 0; }
.sources-details summary { cursor: pointer; font-weight: 800; }
.research-mode-control small { display:block; margin-top:.55rem; color:var(--muted); font-size:.76rem; line-height:1.4; }
.source-list a { overflow-wrap: anywhere; }

.progress-message {
  min-height: 2rem;
  margin-top: .45rem;
  font: 700 1rem/1.5 Georgia, serif;
}

.progress-message.is-changing {
  animation: editorial-fade .25s ease-out;
}

.progress-track {
  height: 2px;
  margin: .9rem 0 .7rem;
  overflow: hidden;
  background: var(--rule);
}

.progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  background: var(--red);
  transition: width 1s ease;
}

.progress-steps {
  color: var(--muted);
  font: 700 .68rem/1.5 ui-monospace, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

@keyframes editorial-fade {
  from { opacity: .45; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 460px) {
  .field-meta {
    gap: .75rem;
  }

  .field-meta > div {
    max-width: calc(100% - 4.5rem);
  }

  .progress-panel {
    min-height: 10rem;
    padding: .9rem;
  }

  .progress-steps {
    max-width: 18rem;
  }
}

@media (max-width: 760px) {
  main,
  .site-header {
    width: 100%;
    padding-inline: clamp(1rem, 4.5vw, 1.25rem);
  }

  .workspace,
  .verdict-card,
  .result-card {
    width: 100%;
    padding: clamp(1rem, 4vw, 1.25rem);
  }

  .results {
    width: 100%;
    padding-top: 4rem;
  }

  .results-header {
    width: 100%;
    gap: 1rem;
  }

  .results-header h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: .98;
    overflow-wrap: anywhere;
  }

  .results-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .results-actions .button,
  .form-actions .button {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }

  .verdict-card {
    gap: 1.25rem;
  }

  .stamp {
    width: min(8rem, 100%);
    max-width: calc(100% - .35rem);
    min-height: 5rem;
    justify-self: start;
    transform: rotate(-1deg);
  }

  .verdict-card h3 {
    font-size: clamp(1.45rem, 7.2vw, 2.15rem);
  }

  .card-heading {
    align-items: flex-start;
    gap: .8rem;
  }

  .card-heading h3 {
    font-size: clamp(1.35rem, 6.5vw, 1.65rem);
    line-height: 1.08;
  }

  .section-number,
  .raccoon {
    flex: 0 0 2.5rem;
  }

  .source-list {
    padding-left: 1.25rem;
  }

  .source-list li {
    display: grid;
    gap: .2rem;
  }

  .research-status {
    max-width: 100%;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-message.is-changing {
    animation: none;
  }

  .progress-track span {
    transition: none;
  }
}
