/* ==================================================================
   AISO - Matter Reimagined (Fun Stuff > Periodic Table)
   Everything is scoped to html[page="periodic"] or the .pt- prefix,
   so the shared top.php / bottom.php chrome keeps working and no
   other page is affected.
   ================================================================== */

html[page="periodic"] {
  --pt-bg: #0a0e15;
  --pt-bg2: #0e131c;
  --pt-surface: #121824;
  --pt-surface2: #171e2c;
  --pt-line: rgba(160, 180, 210, 0.12);
  --pt-line2: rgba(160, 180, 210, 0.22);
  --pt-text: #e9edf3;
  --pt-muted: #8c97a8;
  --pt-faint: #5d6778;
  --pt-accent: #8fb8ff;

  --cat-alk: #ff7a66;
  --cat-ae:  #ffb547;
  --cat-tm:  #5aa2ff;
  --cat-pt:  #8ea7bf;
  --cat-md:  #c9cf5b;
  --cat-nm:  #4fd49b;
  --cat-hal: #39c9d9;
  --cat-ng:  #a98bff;
  --cat-ln:  #f28fc6;
  --cat-an:  #d9a06b;
}

/* ---------- page chrome reskin ---------- */
html[page="periodic"] body {
  background-color: var(--pt-bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(110, 150, 230, 0.13), transparent 70%),
    linear-gradient(rgba(150, 175, 215, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 175, 215, 0.028) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  background-attachment: fixed;
  color: var(--pt-text);
}
html[page="periodic"] .page { background: transparent; }
html[page="periodic"] .page-header,
html[page="periodic"] .rd-navbar,
html[page="periodic"] .rd-navbar-main-outer,
html[page="periodic"] .rd-navbar-main {
  background: rgba(10, 14, 21, 0.92) !important;
  box-shadow: none !important;
}
html[page="periodic"] .rd-navbar { border-bottom: 1px solid var(--pt-line); }
html[page="periodic"] .rd-navbar-nav > li > a {
  color: #c7cfdb !important;
  font-family: "IBM Plex Sans", "Noto Sans Georgian", sans-serif !important;
  font-size: 14px !important;
  letter-spacing: 0.2px;
}
html[page="periodic"] .rd-navbar-nav > li > a:hover,
html[page="periodic"] .rd-navbar-nav > li.active > a { color: #fff !important; }
html[page="periodic"] .language-option span { color: #c7cfdb !important; }
html[page="periodic"] .section { background: transparent !important; }
html[page="periodic"] .footer-corporate,
html[page="periodic"] .footer-corporate__aside {
  background: var(--pt-bg) !important;
  border-top: 1px solid var(--pt-line);
}
html[page="periodic"] .footer-corporate .rights,
html[page="periodic"] .footer-corporate span { color: var(--pt-faint) !important; }
html[page="periodic"] .footer-corporate .icon { color: var(--pt-muted) !important; border-color: var(--pt-line2) !important; }

/* ---------- layout ---------- */
.pt-app {
  font-family: "IBM Plex Sans", "Noto Sans Georgian", system-ui, sans-serif;
  color: var(--pt-text);
  text-align: left;
  max-width: 1640px;
  margin: 0 auto;
  padding: 34px 24px 60px;
  -webkit-font-smoothing: antialiased;
}
.pt-app *, .pt-app *::before, .pt-app *::after { box-sizing: border-box; }
.pt-num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.pt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; margin-bottom: 22px; }
.pt-eyebrow { font: 500 11px/1 "IBM Plex Mono", monospace; letter-spacing: 2.4px; text-transform: uppercase; color: var(--pt-muted); margin: 0 0 12px; }
.pt-eyebrow b { color: var(--pt-accent); font-weight: 500; }
.pt-title { font: 300 clamp(30px, 3.6vw, 50px)/1.05 "IBM Plex Sans", sans-serif !important; letter-spacing: -1px; margin: 0; color: #fff !important; text-transform: none !important; }
.pt-title em { font-style: normal; font-weight: 600; background: linear-gradient(90deg, #c9dbff, #8fb8ff 60%, #a98bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pt-sub { margin: 10px 0 0; color: var(--pt-muted); font-size: 15px; max-width: 620px; line-height: 1.55; }

.pt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pt-search { position: relative; }
.pt-search input {
  width: 240px; height: 38px; padding: 0 38px 0 36px;
  border-radius: 10px; border: 1px solid var(--pt-line2);
  background: var(--pt-surface); color: var(--pt-text);
  font: 400 14px "IBM Plex Sans", sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.pt-search input::placeholder { color: var(--pt-faint); }
.pt-search input:focus { border-color: rgba(143, 184, 255, 0.6); box-shadow: 0 0 0 3px rgba(143, 184, 255, 0.14); }
.pt-search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; stroke: var(--pt-muted); fill: none; stroke-width: 2; }
.pt-search .pt-count { position: absolute; right: 11px; top: 10px; font: 500 11px/18px "IBM Plex Mono", monospace; color: var(--pt-muted); }

.pt-modes { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 11px; background: var(--pt-surface); border: 1px solid var(--pt-line); }
.pt-modes button {
  border: 0; background: transparent; color: var(--pt-muted); cursor: pointer;
  font: 500 12.5px/1 "IBM Plex Sans", sans-serif; padding: 9px 11px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.pt-modes button:hover { color: var(--pt-text); }
.pt-modes button[aria-pressed="true"] { background: var(--pt-surface2); color: #fff; box-shadow: inset 0 0 0 1px var(--pt-line2); }
.pt-modes button:focus-visible, .pt-legend button:focus-visible, .pt-btn:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 1px; }

/* ---------- stage: table + explorer ---------- */
.pt-stage { display: grid; grid-template-columns: minmax(0, 1fr) 0px; gap: 0; transition: grid-template-columns .42s cubic-bezier(.2, .7, .2, 1), gap .42s; align-items: start; }
.pt-app.is-open .pt-stage { grid-template-columns: minmax(0, 1fr) 430px; gap: 22px; }

.pt-scroll { overflow-x: auto; overflow-y: visible; padding: 8px 2px 4px; margin: -8px -2px 0; scrollbar-width: thin; scrollbar-color: #2a3344 transparent; }
.pt-board {
  container-type: inline-size;
  position: relative;
  min-width: 760px;
  transition: height .6s cubic-bezier(.65, .05, .25, 1);
  /* keep the whole table inside one screen height on desktop */
  max-width: max(760px, calc((100vh - 150px) * 1.78));
  margin: 0 auto;
}

/* ---------- element tile ---------- */
.pt-el {
  --c: var(--cat-tm);
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0.4cqi 0.45cqi 0.45cqi;
  border-radius: clamp(4px, 0.55cqi, 9px);
  border: 1px solid color-mix(in oklab, var(--c) 26%, transparent);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--c) 15%, #141b27) 0%, #0f141d 78%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 1px 0 rgba(0, 0, 0, 0.4);
  color: var(--pt-text); opacity: var(--o, 1);
  font: inherit; text-align: left; cursor: pointer; overflow: hidden;
  transition: transform .9s cubic-bezier(.65, .05, .25, 1), translate .16s cubic-bezier(.2, .8, .2, 1), border-color .16s, box-shadow .16s, opacity .45s, filter .3s;
  -webkit-tap-highlight-color: transparent;
}
.pt-el::before { /* family accent line */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--c); opacity: .85;
}
.pt-el::after { /* light that follows the pointer */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), color-mix(in oklab, var(--c) 32%, transparent), transparent 62%);
  transition: opacity .18s;
}
.pt-el .z { font: 500 max(8px, 0.62cqi)/1 "IBM Plex Mono", monospace; color: var(--pt-muted); font-variant-numeric: tabular-nums; }
.pt-el .sym {
  font: 600 max(13px, 1.62cqi)/1 "IBM Plex Sans", sans-serif; letter-spacing: -0.02em;
  color: color-mix(in oklab, var(--c) 45%, #ffffff);
  margin-top: -2%;
}
.pt-el .nm { font: 500 max(7px, 0.56cqi)/1.1 "IBM Plex Sans", sans-serif; color: #c9d1dd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-el .w { font: 400 max(7px, 0.5cqi)/1 "IBM Plex Mono", monospace; color: var(--pt-faint); font-variant-numeric: tabular-nums; }
.pt-el .val { display: none; font: 500 max(7px, 0.52cqi)/1 "IBM Plex Mono", monospace; color: #fff; font-variant-numeric: tabular-nums; }

.pt-el.is-predicted { border-style: dashed; }
.pt-el.is-nodata { --c: #46505f !important; }
.pt-el.is-nodata .sym { color: #8790a0; }

.pt-el:hover, .pt-el.is-hover {
  translate: 0 -3px;
  border-color: color-mix(in oklab, var(--c) 75%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 22px -6px rgba(0, 0, 0, 0.7), 0 0 0 1px color-mix(in oklab, var(--c) 40%, transparent), 0 0 26px -8px var(--c);
  z-index: 3;
}
.pt-el:hover::after, .pt-el.is-hover::after { opacity: 1; }
.pt-el.is-near { border-color: color-mix(in oklab, var(--c) 46%, transparent); translate: 0 -1px; }
.pt-el:focus { outline: none; }
.pt-el:focus-visible { outline: 2px solid #fff; outline-offset: 2px; z-index: 4; }

.pt-board.is-dim .pt-el:not(.is-hit) { opacity: .18; filter: saturate(.25); }
.pt-board.is-dim .pt-el.is-hit { border-color: color-mix(in oklab, var(--c) 70%, transparent); }
.pt-app.is-open .pt-el:not(.is-selected) { opacity: .42; filter: saturate(.55); }
.pt-app.is-open .pt-el:not(.is-selected):hover { opacity: .9; filter: none; }
.pt-app.is-open .pt-board.is-dim .pt-el:not(.is-hit):not(.is-selected) { opacity: .14; }
.pt-el.is-selected {
  opacity: 1; z-index: 5; translate: 0 -3px;
  border-color: var(--c);
  box-shadow: 0 0 0 1px var(--c), 0 0 0 4px color-mix(in oklab, var(--c) 22%, transparent), 0 14px 30px -8px rgba(0, 0, 0, 0.8);
}

/* numeric modes show the value instead of the weight */
.pt-board.show-val .pt-el .w { display: none; }
.pt-board.show-val .pt-el .val { display: block; }
.pt-board.mode-scale .pt-el { background: linear-gradient(180deg, color-mix(in oklab, var(--c) 42%, #121822) 0%, color-mix(in oklab, var(--c) 16%, #0f141d) 100%); }
.pt-board.mode-scale .pt-el .sym { color: #fff; }
.pt-board.mode-scale .pt-el.is-nodata { background: repeating-linear-gradient(135deg, #121822 0 4px, #0f141d 4px 8px); }

/* narrow tables: keep symbol + number only */
@container (max-width: 1060px) {
  .pt-el .w { display: none; }
  .pt-board.show-val .pt-el .val { display: block; }
}
@container (max-width: 900px) {
  .pt-el .nm { display: none; }
  .pt-el { justify-content: flex-start; gap: 10%; }
}

/* placeholders + labels */
.pt-ph {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: clamp(4px, 0.55cqi, 9px);
  border: 1px dashed color-mix(in oklab, var(--c) 45%, transparent);
  color: color-mix(in oklab, var(--c) 60%, #fff);
  font: 500 max(8px, 0.56cqi)/1.15 "IBM Plex Mono", monospace; text-align: center;
  background: color-mix(in oklab, var(--c) 6%, transparent);
  cursor: default;
}
.pt-ph small { color: var(--pt-faint); font-size: inherit; }
.pt-frow-label { position: absolute; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font: 500 max(8px, 0.55cqi)/1.2 "IBM Plex Mono", monospace; color: var(--pt-faint); text-align: right; }
.pt-gnum { font: 500 max(8px, 0.55cqi)/1 "IBM Plex Mono", monospace; color: var(--pt-faint); text-align: center; align-self: end; padding-bottom: 4px; }

/* ---------- inspector (lives in the empty d-block gap) ---------- */
.pt-insp {
  position: absolute;
  display: grid; grid-template-columns: auto 1fr; gap: 0 clamp(12px, 1.6cqi, 26px); align-items: center;
  padding: 0 clamp(6px, 1cqi, 16px);
  pointer-events: none;
  min-height: 0;
}
.pt-insp-tile {
  --c: var(--pt-accent);
  width: clamp(70px, 8.4cqi, 128px); aspect-ratio: 1 / 1.14; border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--c) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 22%, #151c29), #0f141d 85%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8), 0 0 40px -18px var(--c);
  display: flex; flex-direction: column; justify-content: space-between; padding: 9px 10px 10px;
  transition: border-color .2s, box-shadow .2s;
}
.pt-insp-tile .z { font: 500 max(10px, 0.85cqi)/1 "IBM Plex Mono", monospace; color: var(--pt-muted); }
.pt-insp-tile .sym { font: 600 max(28px, 3.5cqi)/1 "IBM Plex Sans", sans-serif; color: color-mix(in oklab, var(--c) 40%, #fff); letter-spacing: -0.03em; }
.pt-insp-tile .w { font: 400 max(9px, 0.7cqi)/1 "IBM Plex Mono", monospace; color: var(--pt-muted); }
.pt-insp-body { min-width: 0; }
.pt-insp-name { font: 400 max(18px, 1.9cqi)/1.1 "IBM Plex Sans", sans-serif; color: #fff; letter-spacing: -0.3px; }
.pt-insp-cat { display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; font: 500 max(10px, 0.78cqi)/1 "IBM Plex Mono", monospace; letter-spacing: 1px; text-transform: uppercase; color: var(--pt-muted); }
.pt-insp-cat i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--pt-accent)); display: inline-block; }
.pt-insp-facts { display: flex; flex-wrap: wrap; gap: 4px clamp(10px, 1.3cqi, 22px); margin-top: clamp(8px, 0.9cqi, 14px); font-size: max(10px, 0.8cqi); color: var(--pt-muted); }
.pt-insp-facts b { color: var(--pt-text); font-weight: 500; font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.pt-insp-cfg { margin-top: 6px; font: 400 max(10px, 0.82cqi)/1.3 "IBM Plex Mono", monospace; color: #c9d4e6; }
.pt-insp-cfg sup, .pt-cfg sup { font-size: 0.68em; vertical-align: 0.55em; line-height: 0; margin-left: 0.5px; }
.pt-insp-hint { grid-column: 1 / -1; font: 400 max(10px, 0.75cqi)/1.4 "IBM Plex Mono", monospace; color: var(--pt-faint); }
.pt-insp.is-empty .pt-insp-tile { opacity: .55; }
.pt-app.is-open .pt-insp { opacity: .0; transition: opacity .3s; }
@container (max-width: 900px) { .pt-insp-facts span:nth-child(n+3) { display: none; } .pt-insp-hint { display: none; } }

/* ---------- legend ---------- */
.pt-legend { display: flex; flex-wrap: wrap; gap: 6px 6px; margin-top: 18px; align-items: center; }
.pt-legend button {
  --c: #888;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 11px 7px 9px; border-radius: 8px;
  border: 1px solid var(--pt-line); background: var(--pt-surface);
  color: #c9d1dd; font: 500 12.5px/1 "IBM Plex Sans", sans-serif;
  transition: border-color .15s, background .15s, color .15s;
}
.pt-legend button i { width: 11px; height: 11px; border-radius: 3px; background: var(--c); box-shadow: 0 0 10px -2px var(--c); }
.pt-legend button:hover { border-color: color-mix(in oklab, var(--c) 55%, transparent); color: #fff; }
.pt-legend button[aria-pressed="true"] { border-color: var(--c); background: color-mix(in oklab, var(--c) 14%, var(--pt-surface)); color: #fff; }
.pt-legend .pt-legend-note { color: var(--pt-faint); font: 400 12px "IBM Plex Mono", monospace; margin-left: 6px; }
.pt-legend .pt-legend-note .dash { display: inline-block; width: 16px; height: 11px; border: 1px dashed #8c97a8; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }

.pt-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; font: 400 12px "IBM Plex Mono", monospace; color: var(--pt-muted); }
.pt-scale-bar { width: min(420px, 70vw); height: 10px; border-radius: 99px; border: 1px solid var(--pt-line); }
.pt-scale-ends { display: flex; justify-content: space-between; width: min(420px, 70vw); margin-top: 5px; color: var(--pt-muted); font-size: 11px; }
.pt-scale-nodata { display: inline-flex; align-items: center; gap: 6px; }
.pt-scale-nodata i { width: 14px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(135deg, #2a313d 0 3px, #161b24 3px 6px); border: 1px solid var(--pt-line); }

.pt-temp { display: none; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: var(--pt-surface); border: 1px solid var(--pt-line); max-width: 640px; }
.pt-app.mode-phase .pt-temp { display: flex; }
.pt-temp label { font: 500 11px "IBM Plex Mono", monospace; letter-spacing: 1.5px; color: var(--pt-muted); text-transform: uppercase; white-space: nowrap; }
.pt-temp input[type=range] { flex: 1; accent-color: #8fb8ff; min-width: 120px; }
.pt-temp output { font: 500 13px "IBM Plex Mono", monospace; color: #fff; white-space: nowrap; min-width: 150px; text-align: right; font-variant-numeric: tabular-nums; }
.pt-temp .pt-btn { padding: 6px 9px; font-size: 11.5px; }

.pt-foot { margin-top: 26px; color: var(--pt-faint); font: 400 11.5px/1.6 "IBM Plex Mono", monospace; max-width: 980px; }
.pt-foot kbd { font: inherit; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--pt-line2); color: var(--pt-muted); }

/* ---------- explorer panel ---------- */
.pt-panel {
  --c: var(--pt-accent);
  position: sticky; top: calc(var(--pt-top, 0px) + 14px);
  max-height: calc(100vh - var(--pt-top, 0px) - 28px);
  overflow: hidden auto;
  border-radius: 16px;
  border: 1px solid var(--pt-line2);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 7%, #111723), #0e131c 340px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  opacity: 0; visibility: hidden; transform: translateX(24px);
  transition: opacity .3s, transform .42s cubic-bezier(.2, .7, .2, 1), visibility 0s .42s;
  scrollbar-width: thin; scrollbar-color: #2a3344 transparent;
  min-width: 0;
}
.pt-app.is-open .pt-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .3s .08s, transform .42s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.pt-panel-inner { padding: 20px 22px 26px; }
.pt-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.pt-panel-nav { display: flex; gap: 6px; }
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--pt-line2); background: var(--pt-surface); color: #c9d1dd;
  border-radius: 9px; padding: 7px 10px; cursor: pointer;
  font: 500 12px/1 "IBM Plex Sans", sans-serif;
  transition: border-color .15s, color .15s, background .15s;
}
.pt-btn:hover { color: #fff; border-color: rgba(143, 184, 255, 0.45); }
.pt-btn[aria-pressed="true"] { color: #fff; background: var(--pt-surface2); border-color: color-mix(in oklab, var(--c) 60%, transparent); }
.pt-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.pt-hero { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
.pt-hero-tile {
  aspect-ratio: 1 / 1.14; border-radius: 13px; padding: 10px 11px 11px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid color-mix(in oklab, var(--c) 65%, transparent);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 26%, #151c29), #0f141d 88%);
  box-shadow: 0 0 46px -16px var(--c), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.pt-hero-tile .z { font: 500 12px/1 "IBM Plex Mono", monospace; color: var(--pt-muted); }
.pt-hero-tile .sym { font: 600 46px/1 "IBM Plex Sans", sans-serif; letter-spacing: -0.04em; color: color-mix(in oklab, var(--c) 35%, #fff); }
.pt-hero-tile .w { font: 400 11px/1 "IBM Plex Mono", monospace; color: var(--pt-muted); }
.pt-hero h3 { margin: 0 !important; font: 400 30px/1.05 "IBM Plex Sans", sans-serif !important; letter-spacing: -0.6px; color: #fff !important; text-transform: none !important; }
.pt-chip { display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; padding: 4px 9px 4px 7px; border-radius: 99px; font: 500 11px/1 "IBM Plex Mono", monospace; letter-spacing: .6px; text-transform: uppercase; color: #dfe6f0; background: color-mix(in oklab, var(--c) 16%, transparent); border: 1px solid color-mix(in oklab, var(--c) 40%, transparent); }
.pt-chip i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.pt-hero-cfg { margin-top: 10px; }

.pt-sec { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--pt-line); }
.pt-sec h4 { margin: 0 0 12px !important; font: 500 11px/1 "IBM Plex Mono", monospace !important; letter-spacing: 2px; text-transform: uppercase; color: var(--pt-muted) !important; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pt-sec h4 .pt-tabs { display: flex; gap: 4px; letter-spacing: 0; text-transform: none; }
.pt-sec h4 .pt-tabs .pt-btn { padding: 5px 8px; font-size: 11.5px; }

.pt-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--pt-line); border: 1px solid var(--pt-line); border-radius: 11px; overflow: hidden; }
.pt-fact { background: #0f141d; padding: 10px 12px; min-width: 0; }
.pt-fact.wide { grid-column: 1 / -1; }
.pt-fact span { display: block; font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pt-faint); margin-bottom: 6px; }
.pt-fact b { display: block; font: 500 14px/1.35 "IBM Plex Sans", sans-serif; color: var(--pt-text); overflow-wrap: anywhere; }
.pt-fact b.mono, .pt-cfg { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; font-weight: 400; }
.pt-fact small { display: block; margin-top: 3px; color: var(--pt-muted); font-size: 12px; line-height: 1.4; }

.pt-atom-wrap { position: relative; border-radius: 13px; border: 1px solid var(--pt-line); background: radial-gradient(circle at 50% 45%, color-mix(in oklab, var(--c) 10%, #101622), #0b0f16 70%); overflow: hidden; }
.pt-atom-wrap canvas { display: block; width: 100%; height: 280px; touch-action: none; cursor: grab; }
.pt-atom-wrap canvas:active { cursor: grabbing; }
.pt-atom-badges { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.pt-atom-badges span { font: 500 11px/1 "IBM Plex Mono", monospace; color: #dfe6f0; background: rgba(10, 14, 21, 0.72); border: 1px solid var(--pt-line); border-radius: 6px; padding: 5px 7px; }
.pt-atom-badges span i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.pt-atom-play { position: absolute; right: 10px; top: 10px; }
.pt-orb-pick { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.pt-orb-pick .pt-btn { padding: 4px 7px; font: 500 11px "IBM Plex Mono", monospace; background: rgba(10, 14, 21, 0.75); }
.pt-caption { margin: 9px 2px 0; font-size: 12px; line-height: 1.5; color: var(--pt-muted); }
.pt-caption b { color: #c9d1dd; font-weight: 500; }

.pt-shells { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pt-shell { flex: 1 1 0; min-width: 40px; border: 1px solid var(--pt-line); border-radius: 9px; padding: 8px 6px 7px; text-align: center; background: #0f141d; }
.pt-shell b { display: block; font: 500 16px/1 "IBM Plex Mono", monospace; color: #fff; }
.pt-shell span { display: block; margin-top: 5px; font: 500 10px/1 "IBM Plex Mono", monospace; color: var(--pt-faint); letter-spacing: 1px; }
.pt-shell u { display: block; height: 3px; margin-top: 7px; border-radius: 3px; background: color-mix(in oklab, var(--c) 30%, #1b2230); text-decoration: none; overflow: hidden; }
.pt-shell u::after { content: ""; display: block; height: 100%; width: var(--f); background: var(--c); }

.pt-boxes { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pt-boxrow { display: flex; align-items: center; gap: 10px; }
.pt-boxrow > span { width: 30px; font: 500 12px "IBM Plex Mono", monospace; color: var(--pt-muted); text-align: right; flex: 0 0 auto; }
.pt-boxrow > div { display: flex; gap: 3px; flex-wrap: wrap; }
.pt-box { width: 26px; height: 26px; border-radius: 5px; border: 1px solid var(--pt-line2); background: #0f141d; display: flex; align-items: center; justify-content: center; gap: 1px; font: 600 13px/1 "IBM Plex Sans", sans-serif; color: color-mix(in oklab, var(--c) 45%, #fff); }
.pt-box.is-half { border-color: color-mix(in oklab, var(--c) 55%, transparent); }
.pt-box.is-full { border-color: color-mix(in oklab, var(--c) 35%, transparent); background: color-mix(in oklab, var(--c) 10%, #0f141d); }

.pt-props { display: flex; flex-direction: column; gap: 14px; }
.pt-prop-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pt-prop-top span { font-size: 13px; color: #c9d1dd; }
.pt-prop-top b { font: 500 14px "IBM Plex Mono", monospace; color: #fff; font-variant-numeric: tabular-nums; text-align: right; }
.pt-prop-top b small { color: var(--pt-muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.pt-prop-bar { position: relative; height: 6px; margin-top: 7px; border-radius: 99px; background: #1a212e; }
.pt-prop-bar i { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(10, 14, 21, 0.9), 0 0 14px var(--c); }
.pt-prop-bar u { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: color-mix(in oklab, var(--c) 40%, #1a212e); text-decoration: none; }
.pt-prop-sub { margin-top: 5px; font: 400 11px "IBM Plex Mono", monospace; color: var(--pt-faint); }

.pt-related { display: flex; flex-direction: column; gap: 10px; }
.pt-related > div > span { display: block; margin-bottom: 6px; font: 500 10px "IBM Plex Mono", monospace; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pt-faint); }
.pt-related .pt-minis { display: flex; flex-wrap: wrap; gap: 4px; }
.pt-mini { --c: #888; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 6px; cursor: pointer; border: 1px solid color-mix(in oklab, var(--c) 40%, transparent); background: color-mix(in oklab, var(--c) 12%, #0f141d); color: color-mix(in oklab, var(--c) 45%, #fff); font: 600 13px "IBM Plex Sans", sans-serif; }
.pt-mini:hover { border-color: var(--c); }
.pt-mini.is-me { box-shadow: 0 0 0 1px #fff inset; }

.pt-note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--pt-line); background: rgba(143, 184, 255, 0.05); font-size: 12.5px; line-height: 1.55; color: #b9c3d2; }

/* the tile that flies from the table into the panel */
.pt-fly { position: fixed; z-index: 9999; pointer-events: none; border-radius: 12px; overflow: hidden; }

/* ---------- smaller screens: explorer becomes a bottom sheet ---------- */
@media (max-width: 1180px) {
  .pt-app.is-open .pt-stage { grid-template-columns: minmax(0, 1fr) 0px; gap: 0; }
  .pt-panel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1200;
    max-height: 82vh; border-radius: 18px 18px 0 0; border-bottom: 0;
    transform: translateY(40px);
    background: #0f141d;
  }
  .pt-app.is-open .pt-panel { transform: none; }
  .pt-panel-inner { max-width: 640px; margin: 0 auto; padding: 14px 18px 30px; }
  .pt-panel-inner::before { content: ""; display: block; width: 42px; height: 4px; border-radius: 4px; background: #2c3546; margin: 0 auto 12px; }
  .pt-app.is-open .pt-scroll { padding-bottom: 46vh; }
}
@media (max-width: 720px) {
  .pt-app { padding: 22px 16px 40px; }
  .pt-search input { width: 100%; }
  .pt-search, .pt-tools { width: 100%; }
  .pt-modes { width: 100%; }
  .pt-modes button { flex: 1 1 auto; padding: 8px 8px; }
  .pt-hero { grid-template-columns: 92px 1fr; gap: 14px; }
  .pt-hero-tile .sym { font-size: 38px; }
  .pt-hero h3 { font-size: 25px !important; }
  .pt-temp { flex-wrap: wrap; }
  .pt-temp output { min-width: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-app *, .pt-app *::before, .pt-app *::after { transition-duration: 0s !important; animation: none !important; }
  .pt-el:hover, .pt-el.is-hover, .pt-el.is-near, .pt-el.is-selected { translate: none; }
}
