/* RoloCache - design tokens
   Color: navy #1F3B57 (primary/headings), cool light gray #F7F8FA (background),
   teal #2E7D6B (the one accent - used for "verified" signals specifically,
   not decoration), body text #2A2E35, muted secondary #6B7280.
   Type: Space Grotesk (display), IBM Plex Sans (body), IBM Plex Mono (data/
   timestamps/nav-eyebrow) - deliberately not the default Inter/system-ui
   stack, paired for a technical/protocol-fitting character rather than a
   generic SaaS look. */

:root {
  --navy: #1F3B57;
  --navy-deep: #16293E;
  --bg: #F7F8FA;
  --teal: #2E7D6B;
  --text: #2A2E35;
  --muted: #6B7280;
  --border: #E2E5EA;
  --display-font: "Space Grotesk", sans-serif;
  --body-font: "IBM Plex Sans", sans-serif;
  --mono-font: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

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

a {
  color: var(--navy);
  text-decoration: none;
}

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

/* --- Header / nav --- */

.site-header {
  background: var(--navy);
  border-bottom: 1px solid var(--navy-deep);
}

.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.header-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 10px;
}

.header-row-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono-font);
  font-size: 17px;
  color: #fff;
}

.brand:hover {
  color: #fff;
  text-decoration: none;
}

.brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: brand-pulse 2.5s ease-in-out infinite;
}

@keyframes brand-pulse {
  0%, 100% {
    background: #2E7D6B;
    box-shadow: 0 0 0 0 rgba(46, 125, 107, 0.5);
  }
  50% {
    background: #3EC99A;
    box-shadow: 0 0 0 5px rgba(46, 125, 107, 0.0);
  }
}

.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  font-weight: 500;
}

.site-nav a:hover {
  color: #fff;
  text-decoration: none;
}

.site-nav a.active {
  color: #fff;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 2px;
}

/* The three real product entry points get a distinct pill treatment -
   they're actionable destinations, not more reading material, and
   shouldn't blend into the plain-text explainer nav. */
.nav-product {
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 4px 12px;
  text-decoration: none;
}

.nav-product:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

.nav-product.active {
  color: #fff;
  border-color: var(--teal);
}

/* --- Main content --- */

.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.page-content h1 {
  font-family: var(--display-font);
  font-weight: 600;
  font-size: 36px;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 8px;
}

.page-content h2 {
  font-family: var(--display-font);
  font-weight: 600;
  font-size: 24px;
  color: var(--navy);
  margin-top: 40px;
  margin-bottom: 12px;
}

.page-content h3 {
  font-family: var(--display-font);
  font-weight: 500;
  font-size: 19px;
  color: var(--navy);
  margin-top: 28px;
}

.page-content p {
  margin: 16px 0;
}

.page-content em {
  color: var(--navy);
  font-style: italic;
}

.page-content ul, .page-content ol {
  padding-left: 24px;
}

.page-content li {
  margin: 8px 0;
}

.page-content code {
  font-family: var(--mono-font);
  font-size: 14px;
  background: #ECEEF2;
  padding: 2px 5px;
  border-radius: 3px;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.page-content th,
.page-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.page-content th {
  font-family: var(--mono-font);
  font-weight: 500;
  color: var(--navy);
  background: #ECEEF2;
}

.page-content td code {
  font-size: 13px;
}

.page-content.not-found h1 {
  font-size: 28px;
}

/* --- Vendor page --- */

.machine-note {
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--muted);
  background: #ECEEF2;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 28px;
}

.machine-note code {
  font-size: 13px;
}

.vendor-meta {
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--muted);
  margin-top: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 36px;
}

.tag-pill {
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--navy);
  background: #ECEEF2;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 12px;
  text-decoration: none;
}

.tag-pill:hover {
  background: var(--teal);
  color: #fff;
  text-decoration: none;
}

.protocol-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.protocol-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}

.protocol-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.protocol-name {
  font-family: var(--mono-font);
  font-weight: 500;
  font-size: 15px;
  color: var(--navy);
}

.status-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Only confirmed_present gets the "verified" teal treatment. Every other
   status (not_found, unable_to_verify, confirmed_absent) gets the same
   neutral gray pill, deliberately - absence is not a failure state and
   shouldn't read as alarming or red. */
.status-confirmed_present {
  background: rgba(46, 125, 107, 0.12);
  color: var(--teal);
}

.status-not_found,
.status-unable_to_verify,
.status-confirmed_absent {
  background: #ECEEF2;
  color: var(--muted);
}

.protocol-role {
  margin: 10px 0 4px;
  font-size: 14px;
}

.protocol-notes {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.not-available-note {
  color: var(--muted);
  font-size: 14px;
}

/* --- Overview Q&A block --- */

.overview-block {
  margin-bottom: 32px;
}

.overview-qa {
  margin-bottom: 16px;
}

.overview-q {
  margin-bottom: 4px;
  font-size: 15px;
}

.overview-a {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

/* --- AgentContext entries --- */

.context-entry {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.context-entry-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.context-claim {
  font-size: 14px;
  margin-bottom: 8px;
}

.context-actuals {
  font-size: 14px;
  margin-bottom: 8px;
}

.context-guidance {
  font-size: 14px;
  margin-bottom: 10px;
}

.context-evidence {
  font-size: 13px;
  color: var(--muted);
  padding-left: 20px;
  margin-bottom: 8px;
}

.context-evidence li {
  margin-bottom: 4px;
}

.context-evidence a {
  color: var(--muted);
  text-decoration: underline;
}

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

.context-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 0;
}

.context-coverage {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--border);
}



.tag-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.tag-index-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
}

.tag-index-item:hover {
  border-color: var(--teal);
  text-decoration: none;
}

.tag-index-name {
  font-family: var(--mono-font);
  font-size: 14px;
  color: var(--navy);
}

.tag-index-count {
  font-size: 12px;
  color: var(--muted);
}

/* --- Vendor index --- */

.vendor-index-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
}

.vendor-index-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  text-decoration: none;
}

.vendor-index-row:hover {
  border-color: var(--teal);
  text-decoration: none;
}

.vendor-index-name {
  font-family: var(--mono-font);
  font-size: 14px;
  color: var(--text);
}

/* --- Footer --- */

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

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.footer-mono {
  font-family: var(--mono-font);
}

.footer-terms {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.footer-terms:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: 20px;
}

/* --- Mobile --- */

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 14px; }
  .page-content h1 { font-size: 28px; }
}

/* --- Accessibility: visible keyboard focus, respect reduced motion --- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* --- Report an issue form --- */

/* Honeypot: off-screen, not display:none - some bots skip display:none fields */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 28px;
  max-width: 560px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}

.field-optional {
  font-weight: 400;
  color: var(--muted);
}

.field-required {
  color: var(--teal);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  font-family: var(--body-font);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 125, 107, 0.1);
}

.form-field textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-submit {
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  cursor: pointer;
  align-self: flex-start;
}

.form-submit:hover {
  background: var(--teal);
}

.field-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

.form-success {
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: 20px 24px;
  background: rgba(46, 125, 107, 0.06);
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
