/* Opposite Krillion Wiki — Twilight Observatory & Consensus Tally Board */
[hidden] { display: none !important; }

:root {
  --bg: #0c1424;
  --surface: #142038;
  --surface-alt: #1b2b4a;
  --border: #2a3d63;
  --ink: #f1f5fb;
  --muted: #a8b8d4;
  --primary: #f59e0b;
  --primary-hover: #fbbf24;
  --primary-ink: #0d1522;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.14);
  --amber-dim: rgba(245, 158, 11, 0.16);
  --danger: #fb7185;
  --danger-dim: rgba(251, 113, 133, 0.14);
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.32);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body.ok-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 45% at 50% -10%, rgba(45, 212, 191, 0.14), transparent 60%),
    var(--bg);
  color: var(--ink);
  overflow-x: clip;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  text-decoration: none;
}

:where(a:any-link, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #5eead4; }
img { max-width: 100%; height: auto; display: block; }

.ok-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 16px; }

.ok-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 20, 36, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.ok-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding-block: 6px;
}

.ok-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.ok-brand-mark { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.ok-nav { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.ok-nav::-webkit-scrollbar { display: none; }
.ok-nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ok-nav-list a {
  display: inline-flex;
  align-items: center;
  min-block-size: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.ok-nav-list a:hover, .ok-nav-list a[aria-current="page"] { color: var(--ink); background: var(--surface-alt); }
@media (max-width: 680px) {
  .ok-header-inner { flex-direction: column; align-items: flex-start; gap: 4px; min-height: 0; padding-block: 8px 6px; }
  .ok-nav { width: 100%; overflow-x: visible; }
  .ok-nav-list { flex-wrap: wrap; gap: 2px 6px; }
  .ok-nav-list a { min-block-size: 32px; padding: 4px 8px; font-size: 13px; }
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; margin-top: 0; }
h1 { font-size: clamp(28px, 4.5vw, 44px); margin-bottom: 8px; }
h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; }

.ok-eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ok-lead { margin: 0; color: var(--muted); font-size: 16px; max-width: 68ch; }
.ok-main { padding-block: 16px 48px; }
.ok-hero-head { margin-bottom: 14px; }

.ok-btn-primary, .ok-btn-ghost, .ok-pill-btn, .ok-pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.ok-btn-primary { background: var(--primary); color: var(--primary-ink); border: 1px solid var(--primary); }
.ok-btn-primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.ok-btn-primary:active { transform: translateY(1px); }
.ok-btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.ok-btn-ghost:hover { background: var(--surface-alt); border-color: var(--accent); color: var(--ink); }

.ok-engage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ok-pill-btn, .ok-pill-link {
  min-block-size: 40px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.ok-pill-btn:hover, .ok-pill-link:hover { border-color: var(--accent); background: var(--surface-alt); color: var(--ink); }
.ok-pill-btn[data-gf-liked], .ok-pill-btn[aria-pressed="true"] { background: var(--amber-dim); border-color: var(--primary); color: #fde68a; }
.ok-pill-link { margin-left: auto; color: var(--accent); }
.ok-share-msg { font-size: 13px; color: var(--accent); font-weight: 600; }

.ad-native-slot { width: 100%; max-width: 100%; overflow-x: clip; margin: 0; }
.ad-native-slot:not(:empty) { margin: 20px auto; }
.ad-native-slot:empty { display: none; }

.ok-feature-band {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 36px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.ok-hero-img, .ok-page-img { width: 100%; border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--border); }
.ok-steps-list { margin: 14px 0; padding-left: 20px; color: var(--muted); }
.ok-steps-list li { margin-bottom: 8px; }
.ok-steps-list strong { color: var(--ink); }
.ok-inline-cta { margin: 12px 0 0; }
.ok-text-link { font-weight: 700; text-decoration: none; }
.ok-text-link:hover { text-decoration: underline; }

.ok-guides-section, .ok-related-section, .ok-prose-section, .ok-faq-section, .ok-comments-section { margin-top: 48px; }
.ok-section-head { margin-bottom: 16px; }
.ok-section-head p { margin: 0; color: var(--muted); max-width: 68ch; }
.ok-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ok-guide-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ok-guide-card:hover { border-color: var(--accent); }
.ok-guide-tag { align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent-dim); color: var(--accent); }
.ok-guide-card h3 { margin: 4px 0 2px; font-size: 19px; }
.ok-guide-card h3 a { color: var(--ink); text-decoration: none; }
.ok-guide-card h3 a:hover { color: var(--primary); }
.ok-guide-card p { margin: 0; color: var(--muted); font-size: 15px; }

.ok-prose { max-width: 74ch; font-size: 16px; color: #dce4f3; }
.ok-prose h2 { margin-top: 32px; margin-bottom: 12px; }
.ok-prose h3 { margin-top: 24px; margin-bottom: 8px; }
.ok-prose p { margin: 0 0 16px; }
.ok-prose ul, .ok-prose ol { margin: 0 0 18px; padding-left: 22px; }
.ok-prose li { margin-bottom: 8px; }
.ok-prose strong { color: var(--ink); }

.ok-prose .table-wrapper, .table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  container-type: inline-size;
}
.ok-prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.ok-prose caption { padding: 12px 16px; text-align: left; font-weight: 700; color: var(--ink); background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.ok-prose th, .ok-prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.ok-prose thead th { position: sticky; inset-block-start: 0; z-index: 1; background: var(--surface-alt); color: var(--ink); font-weight: 700; }
.ok-prose tbody th { color: var(--ink); font-weight: 700; background: var(--surface); }

@container (width < 560px) {
  .ok-prose .table-wrapper table, .ok-prose .table-wrapper thead, .ok-prose .table-wrapper tbody, .ok-prose .table-wrapper tr, .ok-prose .table-wrapper th, .ok-prose .table-wrapper td { display: block; }
  .ok-prose .table-wrapper thead { display: none; }
  .ok-prose .table-wrapper tr { margin: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); overflow: hidden; }
  .ok-prose .table-wrapper tbody th { background: var(--surface-alt); border-bottom: 1px solid var(--border); }
  .ok-prose .table-wrapper td { border-bottom: 1px solid rgba(42, 61, 99, 0.5); }
  .ok-prose .table-wrapper td:last-child { border-bottom: 0; }
  .ok-prose .table-wrapper td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--accent); }
}

.ok-faq-list { display: grid; gap: 12px; }
.ok-faq-item { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ok-faq-item h3 { margin: 0 0 6px; font-size: 18px; }
.ok-faq-item p { margin: 0; color: var(--muted); }

.ok-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; color: var(--muted); }
.ok-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--border); }
.ok-page-head { margin-bottom: 20px; }
.ok-page-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ok-page-figure { margin: 24px 0; max-width: 780px; }
.ok-page-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

.ok-comment-form { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 12px; max-width: 720px; }
.ok-field { display: grid; gap: 6px; }
.ok-field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.ok-field input, .ok-field textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; }
.ok-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ok-form-msg { font-size: 14px; color: var(--accent); }
.ok-reply-banner { padding: 8px 12px; border-radius: 8px; background: var(--accent-dim); color: var(--accent); font-size: 13px; font-weight: 600; }
.ok-comments-list { margin-top: 16px; display: grid; gap: 12px; max-width: 720px; }
.ok-comments-list[data-gf-empty]::before { content: "No notes yet — post your altitude score or favorite consensus prompt above."; display: block; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.ok-comment { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ok-comment[data-gf-owner] { border-color: var(--primary); }
.ok-comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.ok-comment-meta strong { color: var(--ink); }
.ok-owner-badge { padding: 1px 7px; border-radius: 999px; background: var(--amber-dim); color: #fde68a; font-size: 12px; font-weight: 700; }
.ok-reply-btn { margin-left: auto; background: transparent; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 4px 8px; }
.ok-comment-body { margin: 0; white-space: pre-wrap; }
.ok-comment-replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border); display: grid; gap: 8px; }

.ok-notfound { padding-block: 48px; }

.ok-footer { border-top: 1px solid var(--border); background: #080e1a; padding-block: 36px 24px; color: var(--muted); font-size: 14px; }
.ok-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.ok-footer-title { margin: 0 0 6px; color: var(--ink); font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.ok-footer-tagline { margin: 0 0 10px; }
.ok-footer-disclaimer { margin: 0; font-size: 13px; line-height: 1.5; }
.ok-footer-head { margin: 0 0 10px; color: var(--ink); font-weight: 700; font-size: 14px; }
.ok-footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ok-footer-col a { color: var(--muted); text-decoration: none; }
.ok-footer-col a:hover { color: var(--ink); }
.ok-footer-contact { margin: 12px 0 0; font-size: 13px; }
.ok-footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(42, 61, 99, 0.5); font-size: 13px; }
.ok-footer-bottom p { margin: 0; }

@media (max-width: 640px) {
  .ok-wrap { padding-inline: 12px; }
  .ok-header-inner { min-height: 50px; gap: 8px; }
  .ok-brand { font-size: 16px; }
  .ok-brand-mark { width: 26px; height: 26px; }
  .ok-nav-list a { padding: 4px 8px; font-size: 13px; }
  .ok-main { padding-block: 12px 36px; }
  .ok-hero-head { margin-bottom: 10px; }
  .ok-lead { font-size: 15px; }
  .ok-feature-band { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .ok-guide-grid { grid-template-columns: 1fr; }
  .ok-footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .ok-pill-link { margin-left: 0; width: 100%; }
}
