/* ClearGlass ORELOGIC — page shell.
 *
 * The workspace bundle ships its own Tailwind preflight, which zeroes borders
 * and margins on every element in the document. Everything here is therefore
 * declared explicitly rather than relying on a UA default, and the shell keeps
 * to its own `ore-` namespace so no rule reaches into the workspace tree.
 *
 * The workspace mounts fixed-position chrome (a rail, a status bar, modals)
 * anchored to the viewport. `.ore-workspace` takes `contain: layout paint`,
 * which makes it the containing block for those descendants — the app frames
 * itself inside the page instead of floating over the rest of it.
 */

.ore-page {
  margin: 0;
  background: #08090c;
  color: #e6edf3;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ore-page a { color: inherit; }

.ore-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ore-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: #f59e0b;
  color: #08090c;
  font-weight: 700;
  border-radius: 0 0 10px 0;
  text-decoration: none;
}
.ore-skip:focus { left: 0; }

/* ── top bar ─────────────────────────────────────────────────────────────── */

.ore-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 34px);
  background: #0d1117;
  border-bottom: 1px solid #21262d;
}

.ore-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #e6edf3;
}

.ore-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #f59e0b, #b45309);
  color: #08090c;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
}

.ore-brand strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: .06em; }
.ore-brand small { display: block; font-size: 10px; letter-spacing: .22em; color: #8b949e; text-transform: uppercase; }

.ore-crumb {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8b949e;
}
.ore-crumb a { color: #f0b429; text-decoration: none; }
.ore-crumb a:hover, .ore-crumb a:focus-visible { color: #fff; text-decoration: underline; }

.ore-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ore-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #c9d1d9;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  text-decoration: none;
}
.ore-chip--amber { border-color: rgba(245, 158, 11, .5); color: #fbbf24; }

.ore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.ore-btn:hover:not(:disabled), .ore-btn:focus-visible:not(:disabled) { border-color: #f59e0b; color: #fff; }
.ore-btn:disabled { opacity: .45; cursor: not-allowed; }
.ore-btn--primary { background: #f59e0b; border-color: #f59e0b; color: #08090c; }
.ore-btn--primary:hover, .ore-btn--primary:focus-visible { background: #ffb02e; color: #08090c; }

/* ── provenance banner ───────────────────────────────────────────────────── */

.ore-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 34px);
  background: rgba(245, 158, 11, .09);
  border-bottom: 1px solid rgba(245, 158, 11, .3);
  color: #f5d9a0;
  font-size: 13px;
  line-height: 1.6;
}
.ore-banner strong { color: #fbbf24; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.ore-banner p { margin: 0; }

/* ── workspace frame ─────────────────────────────────────────────────────── */

.ore-workspace {
  position: relative;
  contain: layout paint;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  max-height: 1400px;
  overflow: auto;
  background: #111417;
  border-bottom: 1px solid #21262d;
}

.ore-noscript {
  padding: 40px clamp(16px, 4vw, 34px);
  background: #0d1117;
  color: #c9d1d9;
  line-height: 1.7;
}

/* ── content sections ────────────────────────────────────────────────────── */

.ore-section { padding: clamp(48px, 7vw, 92px) clamp(16px, 4vw, 34px); border-bottom: 1px solid #16191f; }
.ore-inner { width: min(1180px, 100%); margin: 0 auto; }

.ore-eyebrow {
  margin: 0 0 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #f0b429;
}

.ore-section h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #f4f7fb;
}
.ore-section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: #f4f7fb;
}
.ore-section h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; color: #f4f7fb; }
.ore-section p { margin: 0 0 16px; color: #a7b1bd; line-height: 1.75; max-width: 78ch; }
.ore-section p:last-child { margin-bottom: 0; }
.ore-section strong { color: #e6edf3; }

.ore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.ore-card {
  padding: 22px;
  border-radius: 14px;
  border: 1px solid #21262d;
  background: #0d1117;
}
.ore-card p { font-size: 14px; margin: 0; color: #8b949e; }
.ore-card-tag {
  display: block;
  margin-bottom: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #f0b429;
}

.ore-list { margin: 0; padding: 0 0 0 20px; color: #a7b1bd; line-height: 1.8; }
.ore-list li { margin-bottom: 8px; }

.ore-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ── custody console ─────────────────────────────────────────────────────── */

.ore-console {
  margin-top: 30px;
  border: 1px solid #21262d;
  border-radius: 14px;
  background: #0d1117;
  overflow: hidden;
}

.ore-console-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border-bottom: 1px solid #21262d;
}
.ore-console-stat { padding: 18px 20px; border-right: 1px solid #21262d; }
.ore-console-stat:last-child { border-right: 0; }
.ore-console-stat span {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #6e7781;
  margin-bottom: 6px;
}
.ore-console-stat b {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #fbbf24;
  overflow-wrap: anywhere;
}

.ore-console-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid #21262d; }

.ore-console-status {
  padding: 14px 20px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #8b949e;
  border-bottom: 1px solid #21262d;
  overflow-wrap: anywhere;
}
.ore-console-status[data-kind="ok"] { color: #56d364; }
.ore-console-status[data-kind="bad"] { color: #ff7b72; }
.ore-console-status[data-kind="warn"] { color: #e3b341; }

.ore-table-wrap { overflow-x: auto; }
.ore-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ore-table th {
  text-align: left;
  padding: 12px 20px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6e7781;
  border-bottom: 1px solid #21262d;
  white-space: nowrap;
}
.ore-table td {
  padding: 12px 20px;
  border-bottom: 1px solid #16191f;
  color: #c9d1d9;
  vertical-align: top;
}
.ore-table td span { display: block; margin-top: 3px; font-size: 11px; color: #6e7781; }
.ore-table code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: #8b949e; }
.ore-empty { color: #6e7781; }

.ore-tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.ore-tier--low { color: #56d364; }
.ore-tier--medium { color: #e3b341; }
.ore-tier--high { color: #ffa657; }
.ore-tier--critical { color: #ff7b72; }

.ore-code {
  display: block;
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #21262d;
  background: #010409;
  color: #a5d6ff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */

.ore-faq { border: 1px solid #21262d; border-radius: 14px; background: #0d1117; margin-top: 26px; }
.ore-faq details { border-bottom: 1px solid #21262d; }
.ore-faq details:last-child { border-bottom: 0; }
.ore-faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  color: #f4f7fb;
  list-style: none;
}
.ore-faq summary::-webkit-details-marker { display: none; }
.ore-faq summary::after { content: "+"; float: right; color: #f0b429; font-weight: 700; }
.ore-faq details[open] summary::after { content: "–"; }
.ore-faq p { padding: 0 22px 20px; margin: 0; }

/* ── footer ──────────────────────────────────────────────────────────────── */

.ore-foot {
  padding: 30px clamp(16px, 4vw, 34px);
  color: #6e7781;
  font-size: 12px;
  line-height: 1.8;
  background: #08090c;
}
.ore-foot a { color: #f0b429; text-decoration: none; }
.ore-foot a:hover, .ore-foot a:focus-visible { color: #fff; text-decoration: underline; }

@media (max-width: 720px) {
  .ore-topbar-actions { margin-left: 0; width: 100%; }
  .ore-workspace { min-height: 620px; }
}

/* ── Theme precedence ────────────────────────────────────────────────────────
 * `assets/css/cg-design-system.css` repaints the site in the mission red/black
 * palette using `!important`, which is right for the marketing pages and wrong
 * around an application. Left alone it puts #FF6470 on the amber primary button
 * — roughly 1.6:1, unreadable — retints the status chips red beside a graphite
 * workspace, and sets body copy in the monospace face.
 *
 * The shell pins its own palette back. Everything below is scoped to the `ore-`
 * namespace, so the design system keeps its own components and the ambient page
 * background; only this page's chrome is claimed. Same reasoning as the
 * NAV_EXEMPT entry in tools/design_system.py: a framed application surface owns
 * its chrome.
 */
.ore-page .ore-btn,
.ore-page .ore-chip { font-family: var(--ore-ui, Inter, ui-sans-serif, system-ui, sans-serif) !important; }

.ore-page .ore-btn { color: #e6edf3 !important; background: #161b22 !important; border-color: #30363d !important; }
.ore-page .ore-btn:hover:not(:disabled),
.ore-page .ore-btn:focus-visible:not(:disabled) { color: #fff !important; border-color: #f59e0b !important; }
.ore-page .ore-btn--primary { color: #08090c !important; background: #f59e0b !important; border-color: #f59e0b !important; }
.ore-page .ore-btn--primary:hover,
.ore-page .ore-btn--primary:focus-visible { color: #08090c !important; background: #ffb02e !important; }

.ore-page .ore-chip { color: #c9d1d9 !important; background: #161b22 !important; border-color: #30363d !important; }
.ore-page .ore-chip--amber { color: #fbbf24 !important; background: rgba(245,158,11,.10) !important; border-color: rgba(245,158,11,.5) !important; }

.ore-page .ore-crumb { color: #8b949e !important; }
.ore-page .ore-crumb a { color: #f0b429 !important; }
.ore-page .ore-crumb a:hover, .ore-page .ore-crumb a:focus-visible { color: #fff !important; }

.ore-page .ore-eyebrow { color: #f0b429 !important; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; }
.ore-page .ore-section h1,
.ore-page .ore-section h2,
.ore-page .ore-section h3,
.ore-page .ore-faq summary { color: #f4f7fb !important; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important; }
.ore-page .ore-section p,
.ore-page .ore-faq p,
.ore-page .ore-list { color: #a7b1bd !important; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important; }
.ore-page .ore-section strong { color: #e6edf3 !important; }
.ore-page .ore-card p { color: #8b949e !important; }
.ore-page .ore-card-tag { color: #f0b429 !important; }

.ore-page .ore-banner { color: #f5d9a0 !important; }
.ore-page .ore-banner strong { color: #fbbf24 !important; }
.ore-page .ore-console-stat b { color: #fbbf24 !important; }
.ore-page .ore-console-stat span,
.ore-page .ore-table th,
.ore-page .ore-table td span,
.ore-page .ore-table code,
.ore-page .ore-empty { color: #6e7781 !important; }
.ore-page .ore-table td { color: #c9d1d9 !important; }
.ore-page .ore-code { color: #a5d6ff !important; }
.ore-page .ore-foot { color: #6e7781 !important; }
.ore-page .ore-foot a { color: #f0b429 !important; }
.ore-page .ore-tier { color: inherit; }
.ore-page .ore-tier--low { color: #56d364 !important; }
.ore-page .ore-tier--medium { color: #e3b341 !important; }
.ore-page .ore-tier--high { color: #ffa657 !important; }
.ore-page .ore-tier--critical { color: #ff7b72 !important; }
