/* Growth pages: /spec (Ora Rules v1), /benchmarks, /r/<id> (shared rules). Prefix gx-. Loaded after app.css and
   site.css and uses their tokens; the public palette has no red (--bad is amber on .sx, --accent-2 teal). */
.gx { --gx-hi: var(--accent-2, #0f766e); --gx-lo: var(--bad); --gx-mid: var(--muted); }
.gx-wrap { padding-top: 56px; padding-bottom: 24px; max-width: 1120px; }
.gx-kick { font-size: 13.5px; color: var(--accent); margin: 0 0 12px; }
.gx h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.1; margin: 0 0 18px; overflow-wrap: anywhere; }
.gx h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.2; margin: 44px 0 12px; scroll-margin-top: 80px; }
.gx h3 { font-size: 18px; margin: 28px 0 8px; scroll-margin-top: 80px; }
.gx-lead { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0 0 20px; }
.gx .table th[scope="row"], .gx .table td { white-space: normal; }
.gx .table td code, .gx .table th code { white-space: normal; overflow-wrap: anywhere; }
.gx pre.code { white-space: pre-wrap; overflow-wrap: anywhere; }
.gx-cta { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 48px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.gx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.gx-chips a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 13.5px; color: var(--text); text-decoration: none; }
.gx-chips a:hover { border-color: var(--accent); }
.gx-chips a span { color: var(--muted); margin-left: 4px; }
.gx-callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 16px; background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.gx-callout p { margin: 6px 0; }

/* ---- spec: sticky contents column on wide screens */
.gx-doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.gx-toc { display: none; }
@media (min-width: 1100px) {
  .gx-doc { grid-template-columns: 200px minmax(0, 1fr); }
  .gx-toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 14px; }
  .gx-toc b { font-weight: 500; margin-bottom: 8px; }
  .gx-toc a { color: var(--muted); text-decoration: none; padding: 3px 0; }
  .gx-toc a:hover { color: var(--text); }
}
.gx-body { min-width: 0; }
.gx-lv { display: inline-block; font-size: 11.5px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.gx-lv-core { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.gx-lv-pattern { color: var(--gx-hi); border-color: color-mix(in srgb, var(--gx-hi) 45%, transparent); }
.gx-fn td:first-child { min-width: 150px; }
.gx-exp summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.gx-exp code { display: block; margin-top: 4px; }

/* ---- benchmarks */
.gx-hero { padding-bottom: 8px; }
.gx-head { font-size: 17px; margin: 0 0 8px; }
.gx-run { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 4px; }
.gx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 18px 0; }
.gx-stats > div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.gx-stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; }
.gx-stats span { color: var(--muted); font-size: 14px; line-height: 1.4; display: block; margin-top: 4px; }
.gx-bars { display: grid; gap: 8px; margin: 8px 0 18px; max-width: 760px; }
.gx-bar { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) 56px; gap: 12px; align-items: center; font-size: 14px; }
.gx-bl { color: var(--muted); }
.gx-bt { height: 10px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.gx-bt i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--muted); transition: width .5s ease; }
.gx-bar b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.gx-c-ora, .gx-c-ora_alt { background: var(--accent) !important; }
.gx-c-jev_ind { background: color-mix(in srgb, var(--gx-hi) 75%, var(--muted)) !important; }
.gx-c-jev_bars { background: color-mix(in srgb, var(--muted) 70%, transparent) !important; }
.gx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap !important; }
.gx-score td.gx-num { min-width: 92px; }
.gx-best { font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 560px) { .gx-bar { grid-template-columns: minmax(0, 1fr) 52px; } .gx-bl { grid-column: 1 / -1; } .gx-bt { grid-column: 1; } }

/* ---- shared rule page */
.gx-share { max-width: 860px; }
.gx-answer { border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin: 22px 0 8px; background: color-mix(in srgb, var(--sunk) 40%, transparent); }
.gx-says { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.gx-says span { color: var(--muted); font-size: 15px; width: 100%; }
.gx-says b { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 10vw, 84px); line-height: 1; font-variant-numeric: tabular-nums; }
.gx-says em { font-style: normal; font-size: 18px; }
.gx-v-hi { color: var(--gx-hi); } .gx-v-lo { color: var(--gx-lo); } .gx-v-mid { color: var(--gx-mid); }
.gx-meter { position: relative; height: 12px; border-radius: 999px; background: var(--sunk); margin: 18px 0 6px; overflow: hidden; }
.gx-meter i { display: block; height: 100%; width: 0; border-radius: 999px; background: currentColor; transition: width .6s ease; }
.gx-meter i.gx-v-hi { background: var(--gx-hi); } .gx-meter i.gx-v-lo { background: var(--gx-lo); } .gx-meter i.gx-v-mid { background: var(--gx-mid); }
.gx-meter span { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--muted); opacity: .6; }
.gx-scale { display: flex; justify-content: space-between; gap: 8px; margin: 0; }
.gx-rule { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.gx-rule pre { flex: 1; margin: 0; font-size: 16px; }
.gx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 18px; }
.gx-b { display: inline-flex; gap: 6px; align-items: baseline; font-size: 14px; }
.gx-b b { font-variant-numeric: tabular-nums; font-size: 15px; }
.gx-b-hi b { color: var(--gx-hi); } .gx-b-lo b { color: var(--gx-lo); } .gx-b-mid b { color: var(--gx-mid); }
.gx-embed, .gx-reqbox { border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 12px 0; }
.gx-embed summary, .gx-reqbox summary { cursor: pointer; font-weight: 500; }
.gx-embed label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: 14px 0 4px; }
.gx-snip { display: flex; gap: 8px; align-items: flex-start; }
.gx-snip pre { flex: 1; margin: 0; }
.gx-fine { margin-top: 26px; }
@media (max-width: 560px) { .gx-wrap { padding-top: 32px; } .gx-rule, .gx-snip { flex-direction: column; } .gx-rule .btn, .gx-snip .btn { align-self: flex-start; } }
@media (prefers-reduced-motion: reduce) { .gx-meter i, .gx-bt i { transition: none; } }
.gx-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 14px; z-index: 100; }
.gx-actions a.btn:not(.btn-primary) { color: var(--text); }
.gx-ans th[scope="row"] code { font-size: 12.5px; }
@media (max-width: 560px) { .gx-ans .gx-vt { display: none; } .gx-ans th, .gx-ans td { padding: 8px 6px; } }
