/* ============================================================================
   ATOMIC LAB — COMPONENTS
   Instrument chrome: hairlines, corner ticks, tabular readouts, restrained glow.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   PANEL — the base surface. Glass with a top rim highlight so it reads as a
   physical plate lit from above rather than a flat div.
   ------------------------------------------------------------------------- */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012) 42%, rgba(255,255,255,0) 100%),
    rgba(9, 13, 22, 0.62);
  border: 1px solid var(--edge);
  border-radius: var(--r-4);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--lift-2);
}

.panel--flat   { background: rgba(255,255,255,0.022); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.panel--solid  { background: var(--panel-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
.panel--pad    { padding: clamp(1.15rem, 2.2vw, 1.85rem); }
.panel--pad-lg { padding: clamp(1.5rem, 3.2vw, 2.75rem); }
.panel--tight  { border-radius: var(--r-3); }

/* Corner ticks — the single strongest "instrument" cue. Pure CSS, no DOM. */
.ticked::before, .ticked::after {
  content: '';
  position: absolute;
  width: 13px; height: 13px;
  border: 1px solid var(--edge-strong);
  pointer-events: none;
  opacity: 0.75;
  transition: opacity var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out);
}
.ticked::before { top: 9px;    left: 9px;  border-right: 0; border-bottom: 0; border-top-left-radius: 3px; }
.ticked::after  { bottom: 9px; right: 9px; border-left: 0;  border-top: 0;    border-bottom-right-radius: 3px; }
.ticked:hover::before, .ticked:hover::after { opacity: 1; border-color: var(--beam); }

/* Hairline separator with a centred node */
.rule {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--edge) 18%, var(--edge) 82%, transparent);
  position: relative;
}
.rule--node::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: var(--beam);
  box-shadow: 0 0 12px var(--beam);
}

/* ---------------------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------------------- */
.btn {
  --btn-bg: rgba(255,255,255,0.05);
  --btn-fg: var(--ink);
  --btn-edge: var(--edge);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.72rem 1.35rem;
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-edge);
  border-radius: var(--r-3);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition:
    transform var(--d-2) var(--e-spring),
    border-color var(--d-2) var(--e-out),
    background var(--d-2) var(--e-out),
    box-shadow var(--d-2) var(--e-out),
    color var(--d-2) var(--e-out);
}
.btn:hover  { transform: translateY(-2px); border-color: var(--edge-strong); background: rgba(255,255,255,0.085); }
.btn:active { transform: translateY(0) scale(0.985); }

/* Sweep highlight on hover — a light bar passing across the plate */
.btn::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform var(--d-4) var(--e-out);
}
.btn:hover::before { transform: translateX(110%); }

.btn--primary {
  --btn-fg: #041016;
  --btn-edge: transparent;
  background: linear-gradient(135deg, #8df3ff 0%, var(--beam) 46%, #35b8e8 100%);
  box-shadow: 0 6px 22px -6px rgba(89,230,255,0.6), 0 1px 0 rgba(255,255,255,0.5) inset;
  font-weight: 700;
}
.btn--primary:hover {
  background: linear-gradient(135deg, #a6f7ff 0%, #6debff 46%, #45c8f5 100%);
  box-shadow: 0 12px 34px -8px rgba(89,230,255,0.75), 0 1px 0 rgba(255,255,255,0.6) inset;
}

.btn--violet {
  --btn-fg: #0b0517;
  --btn-edge: transparent;
  background: linear-gradient(135deg, #cbb6ff, var(--pulse) 55%, #7d5cf0);
  box-shadow: 0 6px 22px -6px rgba(169,139,255,0.55), 0 1px 0 rgba(255,255,255,0.4) inset;
  font-weight: 700;
}

.btn--ghost   { --btn-bg: transparent; }
.btn--outline { --btn-bg: transparent; --btn-edge: var(--edge-strong); }
.btn--beam    { --btn-bg: rgba(89,230,255,0.09); --btn-edge: rgba(89,230,255,0.35); --btn-fg: #b6f2ff; }
.btn--beam:hover { --btn-bg: rgba(89,230,255,0.16); box-shadow: 0 0 0 1px rgba(89,230,255,0.3), 0 8px 26px -10px rgba(89,230,255,0.6); }

.btn--sm  { padding: 0.48rem 0.9rem;  font-size: var(--t-2xs); border-radius: var(--r-2); }
.btn--lg  { padding: 0.95rem 1.9rem;  font-size: var(--t-md); border-radius: var(--r-3); }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 0.6rem; aspect-ratio: 1; border-radius: var(--r-2); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

.btn.is-active { --btn-bg: rgba(89,230,255,0.15); --btn-edge: rgba(89,230,255,0.5); --btn-fg: #cdf6ff; }

/* ---------------------------------------------------------------------------
   CHIPS / TAGS / BADGES
   ------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.34rem 0.72rem;
  font-family: var(--font-mono);
  font-size: var(--t-3xs);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--edge);
  border-radius: var(--r-pill);
  white-space: nowrap;
  transition: all var(--d-2) var(--e-out);
}
.chip--fam {
  color: color-mix(in srgb, var(--fam, var(--beam)) 92%, white);
  border-color: color-mix(in srgb, var(--fam, var(--beam)) 38%, transparent);
  background: color-mix(in srgb, var(--fam, var(--beam)) 12%, transparent);
}
.chip--danger { color: #ffb3be; border-color: rgba(255,95,118,0.4); background: rgba(255,95,118,0.12); }
.chip--warn   { color: #ffe2a3; border-color: rgba(255,201,77,0.4); background: rgba(255,201,77,0.12); }
.chip--ok     { color: #a8f5cb; border-color: rgba(79,224,138,0.4); background: rgba(79,224,138,0.12); }

.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; flex: none; }

/* Live status pip with breathing ring */
.pip { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.pip::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid currentColor; color: var(--ok); opacity: 0.55;
  animation: pip-breathe 2.4s var(--e-inout) infinite;
}
@keyframes pip-breathe {
  0%,100% { transform: scale(0.7); opacity: 0.6; }
  50%     { transform: scale(1.25); opacity: 0; }
}

/* ---------------------------------------------------------------------------
   DATA READOUT — the workhorse for numbers
   ------------------------------------------------------------------------- */
.readout {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.95rem 1.05rem;
  background: rgba(255,255,255,0.022);
  border: 1px solid var(--edge-soft);
  border-radius: var(--r-3);
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out), transform var(--d-2) var(--e-out);
}
.readout:hover { border-color: var(--edge-strong); background: rgba(255,255,255,0.04); }
.readout__k {
  font-family: var(--font-mono);
  font-size: var(--t-3xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 0.4em;
}
.readout__v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-md);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.readout__v small { font-size: 0.66em; color: var(--ink-3); font-weight: 400; margin-left: 0.25em; }
.readout__v.is-empty { color: var(--ink-3); font-weight: 400; }

/* Percentile bar: where this value sits among all 118 elements */
.gauge { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; position: relative; }
.gauge__fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fam, var(--beam)) 55%, transparent), var(--fam, var(--beam)));
  width: var(--pct, 0%);
  transform-origin: left;
  animation: gauge-in var(--d-5) var(--e-out) both;
}
@keyframes gauge-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------------------------------------------------------------------------
   FORM CONTROLS
   ------------------------------------------------------------------------- */
.field {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--edge);
  border-radius: var(--r-3);
  color: var(--ink);
  font-size: var(--t-sm);
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.field::placeholder { color: var(--ink-3); }
.field:hover { border-color: var(--edge-strong); }
.field:focus {
  border-color: rgba(89,230,255,0.55);
  background: rgba(89,230,255,0.05);
  box-shadow: 0 0 0 3px rgba(89,230,255,0.12);
}
textarea.field { resize: vertical; min-height: 8rem; line-height: 1.6; }

select.field {
  appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236a768f' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}
select.field option { background: #0a0e18; color: var(--ink); }

/* Range slider — machined track */
.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; background: transparent; cursor: pointer;
}
.slider::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--beam) 0%, var(--beam) var(--fill, 0%), rgba(255,255,255,0.1) var(--fill, 0%));
}
.slider::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); }
.slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--beam); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%;
  background: #eafcff;
  border: 3px solid var(--beam);
  box-shadow: 0 0 14px rgba(89,230,255,0.8), 0 2px 6px rgba(0,0,0,0.6);
  transition: transform var(--d-2) var(--e-spring);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.22); }
.slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #eafcff; border: 3px solid var(--beam);
  box-shadow: 0 0 14px rgba(89,230,255,0.8);
}

/* Segmented control */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--edge);
  border-radius: var(--r-3);
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented__btn {
  position: relative;
  padding: 0.48rem 0.9rem;
  font-family: var(--font-mono);
  font-size: var(--t-3xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-radius: calc(var(--r-3) - 4px);
  white-space: nowrap;
  transition: color var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}
.segmented__btn:hover { color: var(--ink-2); background: rgba(255,255,255,0.04); }
.segmented__btn[aria-pressed="true"], .segmented__btn.is-active {
  color: #04060b;
  background: linear-gradient(135deg, #9bf1ff, var(--beam));
  box-shadow: 0 2px 10px -2px rgba(89,230,255,0.5);
}

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 38px; height: 21px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--edge);
  position: relative;
  transition: background var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out);
  flex: none;
}
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink-2);
  transition: transform var(--d-2) var(--e-spring), background var(--d-2) var(--e-out);
}
.switch input:checked + .switch__track { background: rgba(89,230,255,0.28); border-color: rgba(89,230,255,0.5); }
.switch input:checked + .switch__track::after { transform: translateX(17px); background: var(--beam); box-shadow: 0 0 10px var(--beam); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--beam); outline-offset: 3px; }
.switch__label { font-size: var(--t-2xs); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* ---------------------------------------------------------------------------
   TOOLTIP / HUD CARD
   ------------------------------------------------------------------------- */
.hud {
  position: fixed;
  z-index: 300;
  min-width: 210px;
  padding: 0.85rem 1rem;
  background: rgba(6, 9, 16, 0.93);
  border: 1px solid var(--edge-strong);
  border-radius: var(--r-3);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.04) inset;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity var(--d-2) var(--e-out), transform var(--d-2) var(--e-out);
}
.hud.is-on { opacity: 1; transform: none; }
.hud::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  border-top: 2px solid var(--fam, var(--beam));
  border-top-left-radius: var(--r-3); border-top-right-radius: var(--r-3);
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   CARDS (content)
   ------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: clamp(1.15rem, 2vw, 1.6rem);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.008));
  border: 1px solid var(--edge);
  border-radius: var(--r-4);
  overflow: hidden;
  transition:
    transform var(--d-3) var(--e-out),
    border-color var(--d-3) var(--e-out),
    box-shadow var(--d-3) var(--e-out);
}
.card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--fam, var(--beam)) 14%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity var(--d-3) var(--e-out);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--fam, var(--beam)) 34%, transparent);
  box-shadow: var(--lift-3);
}
.card:hover::after { opacity: 1; }

.card__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-3);
  background: color-mix(in srgb, var(--fam, var(--beam)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--fam, var(--beam)) 30%, transparent);
  color: var(--fam, var(--beam));
  flex: none;
}
.card__icon svg { width: 20px; height: 20px; }
.card__title { font-family: var(--font-display); font-size: var(--t-md); font-weight: 600; letter-spacing: -0.015em; }
.card__body  { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.62; }

/* Link card affordance */
a.card { cursor: pointer; }
a.card .card__go {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-mono); font-size: var(--t-3xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fam, var(--beam));
}
a.card .card__go svg { transition: transform var(--d-2) var(--e-out); }
a.card:hover .card__go svg { transform: translateX(4px); }

/* ---------------------------------------------------------------------------
   PROSE — long-form content blocks
   ------------------------------------------------------------------------- */
.prose { max-width: var(--maxw-text); color: var(--ink-2); font-size: var(--t-base); line-height: 1.72; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { color: var(--ink); font-size: var(--t-xl); margin-top: 2em; }
.prose h3 { color: var(--ink); font-size: var(--t-lg); margin-top: 1.6em; }
.prose h4 { color: var(--ink); font-size: var(--t-md); margin-top: 1.4em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--beam); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(89,230,255,0.4); }
.prose a:hover { text-decoration-color: var(--beam); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul > li { list-style: none; position: relative; padding-left: 1.1em; }
.prose ul > li::before {
  content: ''; position: absolute; left: 0; top: 0.68em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--fam, var(--beam)); opacity: 0.8;
}
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--fam, var(--beam)); font-family: var(--font-mono); font-size: 0.85em; }
.prose li + li { margin-top: 0.45em; }
.prose code {
  font-family: var(--font-mono); font-size: 0.88em;
  padding: 0.15em 0.4em; border-radius: var(--r-1);
  background: rgba(255,255,255,0.07); color: #cdf6ff;
}
.prose blockquote {
  padding-left: 1.2em; border-left: 2px solid var(--fam, var(--beam));
  color: var(--ink-2); font-style: italic;
}
.prose--wide { max-width: none; }

/* ---------------------------------------------------------------------------
   ACCORDION (FAQ)
   ------------------------------------------------------------------------- */
.acc { border-top: 1px solid var(--edge-soft); }
.acc__item { border-bottom: 1px solid var(--edge-soft); }
.acc__q {
  width: 100%;
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4);
  padding: 1.15rem 0.35rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--t-base);
  font-weight: 500;
  color: var(--ink);
  transition: color var(--d-2) var(--e-out);
}
.acc__q:hover { color: var(--beam); }
.acc__mark {
  flex: none; width: 22px; height: 22px; position: relative; margin-top: 2px;
  border: 1px solid var(--edge); border-radius: var(--r-1);
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}
.acc__mark::before, .acc__mark::after {
  content: ''; position: absolute; left: 50%; top: 50%; background: currentColor;
  transform: translate(-50%, -50%); transition: transform var(--d-3) var(--e-out), opacity var(--d-2);
}
.acc__mark::before { width: 9px; height: 1.5px; }
.acc__mark::after  { width: 1.5px; height: 9px; }
.acc__item.is-open .acc__mark { border-color: var(--beam); background: rgba(89,230,255,0.12); }
.acc__item.is-open .acc__mark::after { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }
.acc__a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--d-3) var(--e-out);
}
.acc__item.is-open .acc__a { grid-template-rows: 1fr; }
.acc__a > div { overflow: hidden; }
.acc__a p { padding: 0 0.35rem 1.3rem; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.72; }

/* ---------------------------------------------------------------------------
   TABLE (data)
   ------------------------------------------------------------------------- */
.dtable { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.dtable th {
  text-align: left; padding: 0.7rem 0.9rem;
  font-family: var(--font-mono); font-size: var(--t-3xs);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  border-bottom: 1px solid var(--edge);
  white-space: nowrap;
}
.dtable td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--edge-soft); color: var(--ink-2); }
.dtable tr:hover td { background: rgba(255,255,255,0.028); color: var(--ink); }
.dtable td.num, .dtable th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------------------------------------------------------------------
   SECTION HEADER
   ------------------------------------------------------------------------- */
.shead { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: clamp(1.25rem, 2.4vw, 2rem); }
.shead--center { align-items: center; text-align: center; }
.shead--center .lede { margin-inline: auto; }
.shead__title { font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.028em; }

/* ---------------------------------------------------------------------------
   MISC
   ------------------------------------------------------------------------- */
.kbd {
  display: inline-grid; place-items: center;
  min-width: 1.5em; padding: 0.12em 0.42em;
  /* system-ui first: the mono face has no glyph for ⌘ and falls back to tofu */
  font-family: system-ui, -apple-system, 'Segoe UI', var(--font-mono);
  font-size: 0.8em; line-height: 1.5;
  color: var(--ink-2);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--edge);
  border-bottom-width: 2px;
  border-radius: var(--r-1);
}

.scan-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--beam), transparent);
  opacity: 0.45;
  animation: scan 7s linear infinite;
}
@keyframes scan { 0% { top: 0%; opacity: 0; } 8% { opacity: 0.45; } 92% { opacity: 0.45; } 100% { top: 100%; opacity: 0; } }

.noise::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Loading shimmer */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--r-2);
}
@keyframes shimmer { to { background-position: -400% 0; } }

/* ---------------------------------------------------------------------------
   BREADCRUMBS
   ------------------------------------------------------------------------- */
.crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.5rem;
  font-family: var(--font-mono); font-size: var(--t-3xs);
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 0.9rem;
}
.crumbs a { transition: color var(--d-1); }
.crumbs a:hover { color: var(--beam); }
.crumbs span[aria-current] { color: var(--ink-2); }
.crumbs span[aria-hidden] { opacity: 0.45; }

/* ---------------------------------------------------------------------------
   FOLDOUT — long-form content clipped to a readable height until asked for.
   Several element pages carry several thousand words in a single column; left
   unclipped they push the page past 20,000px and bury everything below them.
   ------------------------------------------------------------------------- */
.foldout { position: relative; }
.foldout__h {
  font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600;
  margin: 2.25rem 0 1rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--edge-soft);
}
.foldout__body {
  max-height: var(--fold-h, 520px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 120px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 120px), transparent);
  transition: max-height var(--d-4) var(--e-out);
}
.foldout.is-open .foldout__body {
  max-height: var(--fold-full, 20000px);
  -webkit-mask-image: none;
  mask-image: none;
}
.foldout.is-short .foldout__body { max-height: none; -webkit-mask-image: none; mask-image: none; }
.foldout.is-short .foldout__btn { display: none; }

.foldout__btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-mono); font-size: var(--t-3xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fam, var(--beam));
  background: color-mix(in srgb, var(--fam, var(--beam)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--fam, var(--beam)) 32%, transparent);
  border-radius: var(--r-pill);
  transition: all var(--d-2) var(--e-out);
}
.foldout__btn:hover { background: color-mix(in srgb, var(--fam, var(--beam)) 20%, transparent); transform: translateY(-1px); }
.foldout__btn svg { transition: transform var(--d-2) var(--e-out); }
.foldout.is-open .foldout__btn svg { transform: rotate(180deg); }

/* ---------------------------------------------------------------------------
   FAMILIES
   ------------------------------------------------------------------------- */
.fams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 0.65rem; }

.fam {
  --fam: var(--f-unknown);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'n name go' 'n syms go';
  align-items: center;
  gap: 0.15rem 0.85rem;
  padding: 1rem 1.1rem 1rem 1.35rem;
  background: linear-gradient(100deg, color-mix(in srgb, var(--fam) 9%, transparent), rgba(255,255,255,0.018) 55%);
  border: 1px solid var(--edge);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: transform var(--d-2) var(--e-out), border-color var(--d-2), background var(--d-3);
}
.fam__bar { grid-area: n; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--fam); box-shadow: 0 0 14px var(--fam); }
.fam__n { grid-area: n; font-size: var(--t-lg); font-weight: 500; color: var(--fam); letter-spacing: -0.02em; }
.fam__name { grid-area: name; font-family: var(--font-display); font-weight: 600; font-size: var(--t-sm); }
.fam__syms { grid-area: syms; font-size: var(--t-3xs); color: var(--ink-3); letter-spacing: 0.09em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fam__go { grid-area: go; color: var(--ink-3); transition: transform var(--d-2) var(--e-out), color var(--d-2); }
.fam:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--fam) 45%, transparent); background: linear-gradient(100deg, color-mix(in srgb, var(--fam) 18%, transparent), rgba(255,255,255,0.03) 55%); }
.fam:hover .fam__go { transform: translateX(4px); color: var(--fam); }


/* ---------------------------------------------------------------------------
   BIGFIELD — the large primary input used by the tools, search and anywhere
   a single query is the whole point of the page. Lives here rather than in a
   page stylesheet because three pages depend on it.
   ------------------------------------------------------------------------- */
.bigfield {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--edge);
  border-radius: var(--r-3);
  transition: border-color var(--d-2), background var(--d-2), box-shadow var(--d-2);
}
.bigfield:focus-within {
  border-color: rgba(89,230,255,0.5);
  background: rgba(89,230,255,0.05);
  box-shadow: 0 0 0 3px rgba(89,230,255,0.1);
}
.bigfield__in {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  color: var(--ink); padding: 0.6rem 0;
  letter-spacing: 0.01em;
}
.bigfield__in::placeholder { color: var(--ink-3); }
.bigfield__x { color: var(--ink-3); font-size: 1.3rem; line-height: 1; padding: 0.35rem 0.6rem; border-radius: var(--r-2); }
.bigfield__x:hover { color: var(--danger); background: rgba(255,95,118,0.1); }

.chipset { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }
.chipset .chip { cursor: pointer; }
.chipset .chip:hover { color: var(--beam); border-color: rgba(89,230,255,0.4); background: rgba(89,230,255,0.08); transform: translateY(-1px); }


/* ---------------------------------------------------------------------------
   FULLY EXPANDED Q&A — no accordion, every answer visible and indexable
   ------------------------------------------------------------------------- */
.qa { display: flex; flex-direction: column; gap: 0.6rem; }

.qa__item {
  position: relative;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--edge);
  border-radius: var(--r-4);
  background: linear-gradient(160deg, color-mix(in srgb, var(--fam, var(--beam)) 7%, transparent), rgba(255,255,255,0.012) 55%);
  transition: border-color var(--d-3) var(--e-out), background var(--d-3);
}
.qa__item:hover {
  border-color: color-mix(in srgb, var(--fam, var(--beam)) 32%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--fam, var(--beam)) 11%, transparent), rgba(255,255,255,0.02) 55%);
}

.qa__q {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
  margin-bottom: 0.85rem;
}
.qa__mark {
  font-size: var(--t-3xs);
  letter-spacing: 0.12em;
  color: var(--fam, var(--beam));
  opacity: 0.85;
}
.qa__a {
  padding-left: calc(2.2rem + 0.85rem);
  font-size: var(--t-sm);
  line-height: 1.72;
}
.qa__a > div > *:first-child { margin-top: 0; }
.qa__a code {
  font-family: var(--font-mono); font-size: 0.88em;
  padding: 0.12em 0.4em; border-radius: 3px;
  background: rgba(255,255,255,0.07);
  color: color-mix(in srgb, var(--fam, var(--beam)) 55%, white 45%);
}

@media (max-width: 640px) {
  .qa__item { padding: 1.15rem 1.15rem; }
  .qa__q { grid-template-columns: 1fr; gap: 0.3rem; }
  .qa__a { padding-left: 0; }
}

