/* Sentinel Ready — uses the shared brand tokens (assets/brand/tokens.css). */

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

.ready a {
  color: var(--accent);
}
.ready a:focus-visible,
.ready button:focus-visible,
.ready input:focus-visible,
.ready select:focus-visible,
.ready summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Main page: content inside the shared site shell. */
.ready-content {
  max-width: 52rem;
  padding-bottom: 1.5rem;
}

/* Plain header for the print page; the main page uses the shared site header. */
.print-page .site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.print-page .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}
.print-page .brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.print-page .wordmark {
  font-weight: 650;
  letter-spacing: 0.02em;
}
.print-page .site nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

body.ready main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.2;
  margin: 0.5rem 0;
}
h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}
h3 {
  font-size: 1.05rem;
  margin: 0;
}
h3.sub {
  margin: 1.25rem 0 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
}
.lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
}
.card h2 {
  margin-top: 0.25rem;
}

form.area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.ready button,
.ready .button,
.ready select,
.ready input[type='text'],
.ready input[type='number'],
.ready input[type='date'] {
  font: inherit;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  max-width: 100%;
}
.ready button,
.ready .button {
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.ready .button input[type='file'] {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
}
.ready button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.official {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.official h2 {
  margin-top: 0;
}
.official blockquote {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border-left: 4px solid var(--accent);
  white-space: pre-line;
}
.sender {
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.level {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.1rem;
}
.level-name {
  font-weight: 700;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.level-ready .level-name {
  color: var(--band-stable);
}
.level-prepared .level-name {
  color: var(--band-normal);
}
.level-guarded .level-name {
  color: var(--band-guarded);
}
.level-elevated .level-name {
  color: var(--band-elevated);
}
.level-severe .level-name {
  color: var(--band-severe);
}
.meta,
.note,
.src,
small {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.note {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

details.threat summary {
  cursor: pointer;
  list-style: none;
}
details.threat summary::-webkit-details-marker {
  display: none;
}
details.threat summary p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}
details.threat[open] summary {
  margin-bottom: 0.5rem;
}

.steps,
.items,
.assumptions,
.reasons,
.gaps {
  padding-left: 1.1rem;
}
.steps li,
.items li,
.assumptions li {
  margin: 0.4rem 0;
}
.items {
  list-style: none;
  padding-left: 0;
}
.check {
  display: inline;
}
.check input {
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: -0.15rem;
  margin-right: 0.35rem;
}
.fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.3rem 0 0 1.5rem;
}
.field {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
}
.expired-flag {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}
.blank {
  color: var(--text-muted);
  margin-right: 1rem;
}

fieldset.cat {
  min-width: 0;
}
fieldset.cat legend {
  font-weight: 650;
  padding: 0 0.25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.grid .field {
  flex-direction: column;
  align-items: stretch;
}

.safety {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--is-gold);
  background: var(--surface-raised);
}
.safety-head {
  font-weight: 650;
  margin: 0;
}

.privacy .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
#ready-status {
  flex-basis: 100%;
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.sources ul {
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}

@media print {
  body,
  body.ready {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .ready a {
    color: #000;
  }
  .site nav,
  header.site form,
  header.site .cta-header,
  header.site .beta-label,
  footer.site,
  form.area,
  .privacy,
  #profile,
  .ready button {
    display: none !important;
  }
  .site,
  header.site {
    background: #fff;
    color: #000;
    border-bottom: 1px solid #000;
  }
  header.site .brand {
    color: #000;
  }
  .card,
  .official,
  .safety {
    background: #fff;
    color: #000;
    box-shadow: none;
    border: 1px solid #000;
    break-inside: avoid;
  }
  .meta,
  .note,
  .src,
  small,
  .blank,
  .lead,
  details.threat summary p {
    color: #000;
  }
  .level-name {
    color: #000 !important;
  }
  details.threat > * {
    display: block;
  }
  body.ready main {
    max-width: none;
    padding: 0;
  }
  .src a::after {
    content: ' (' attr(href) ')';
    font-size: 8pt;
  }
}
