:root,
[data-theme="dark"] {
  --bg: #131722;
  --panel: #1e222d;
  --panel-2: #2a2e39;
  --border: #2a2e39;
  --text: #d1d4dc;
  --muted: #787b86;
  --accent: #2962ff;
  --accent-soft: rgba(41, 98, 255, 0.18);
  --up: #089981;
  --down: #f23645;
  --hover: #2a2e39;
  --grid: rgba(42, 46, 57, 0.6);
  --input: #131722;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --gold: #d4a514;
  --gold-soft: rgba(212, 165, 20, 0.16);
  --scroll: #363a45;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f8f9fd;
  --panel-2: #eef0f6;
  --border: #e0e3eb;
  --text: #131722;
  --muted: #6a6d78;
  --accent: #2962ff;
  --accent-soft: rgba(41, 98, 255, 0.12);
  --up: #089981;
  --down: #f23645;
  --hover: #eef0f6;
  --grid: rgba(224, 227, 235, 0.7);
  --input: #ffffff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.14);
  --scroll: #c9cdd6;
  color-scheme: light;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
*:hover {
  scrollbar-color: var(--scroll) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}
:hover::-webkit-scrollbar-thumb {
  background: var(--scroll);
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font:
    13px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Ubuntu,
    "Helvetica Neue",
    Arial,
    sans-serif;
  overflow: hidden;
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.hidden {
  display: none !important;
}
.spacer {
  flex: 1;
}
.up {
  color: var(--up);
}
.down {
  color: var(--down);
}
.muted {
  color: var(--muted);
}

/* top bar */
.topbar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow-x: auto;
  overflow-y: hidden;
}
.topbar::-webkit-scrollbar {
  height: 0;
}
.brand {
  display: flex;
  align-items: center;
  padding: 0 8px 0 2px;
}
.sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 6px;
  flex: none;
}
.tb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
}
.tb:hover,
.tb.active {
  background: var(--hover);
}
.tb.on {
  color: var(--accent);
}
.tb.icon {
  padding: 0 7px;
}
select.tb {
  appearance: none;
  padding-right: 22px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 14px,
    calc(100% - 8px) 14px;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
select.tb option {
  background: var(--panel);
}
.tb.check {
  gap: 5px;
  color: var(--muted);
}
.symbol-btn {
  font-weight: 600;
  font-size: 14px;
}
.tf-group {
  display: flex;
  gap: 1px;
  flex: none;
}
.tf-group button {
  height: 32px;
  min-width: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  padding: 0 6px;
}
.tf-group button:hover {
  background: var(--hover);
}
.tf-group button.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.tf-custom {
  width: 46px;
  height: 28px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input);
  padding: 0 6px;
  text-align: center;
  flex: none;
}
.status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  margin: 0 6px 0 8px;
  flex: none;
}
.status.ok {
  background: var(--up);
}
.status.warn {
  background: #f7a600;
}
.status.bad {
  background: var(--down);
}

/* main layout */
.main {
  display: flex;
  height: calc(100% - 44px);
}
.drawbar {
  width: 44px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
  gap: 2px;
  flex: none;
}
.drawbar button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.drawbar button:hover {
  background: var(--hover);
}
.drawbar button.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.drawbar hr {
  width: 24px;
  border: 0;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}
.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.grid {
  flex: 1;
  display: grid;
  gap: 1px;
  background: var(--border);
  min-height: 0;
}
.side {
  width: 300px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex: none;
  background: var(--bg);
}

/* chart panes */
.pane {
  position: relative;
  background: var(--bg);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.pane.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  pointer-events: none;
  z-index: 5;
}
.grid[data-count="1"] .pane.active::after {
  display: none;
}
.pane .chart {
  position: absolute;
  inset: 0;
}
.legend {
  position: absolute;
  left: 8px;
  top: 6px;
  z-index: 4;
  pointer-events: none;
  font-size: 12px;
  max-width: calc(100% - 90px);
}
.legend .row {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 20px;
}
.legend .title {
  font-weight: 600;
  font-size: 13px;
  pointer-events: auto;
  cursor: pointer;
}
.legend .ohlc span {
  margin-right: 6px;
}
.legend .ohlc b {
  font-weight: 400;
  color: var(--muted);
  margin-right: 2px;
}
.legend .ind {
  pointer-events: auto;
  border-radius: 3px;
  padding: 0 4px 0 2px;
}
.legend .ind:hover {
  background: var(--panel);
}
.legend .ind .name {
  color: var(--muted);
}
.legend .ind .acts {
  display: none;
  gap: 2px;
}
.legend .ind:hover .acts {
  display: inline-flex;
}
.legend .ind .acts button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0 2px;
  color: var(--muted);
  height: 18px;
}
.legend .ind .acts button:hover {
  color: var(--text);
}
.legend .ind .acts svg {
  width: 14px;
  height: 14px;
}
.legend .note {
  color: #f7a600;
  font-size: 11px;
  pointer-events: auto;
  white-space: normal;
  max-width: 420px;
}
.pane-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  z-index: 3;
  pointer-events: none;
  text-align: center;
  padding: 20px;
}
.replay-bar {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: var(--shadow);
}
.replay-bar button,
.replay-bar select {
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 0 8px;
}
.replay-bar button:hover {
  background: var(--hover);
}
.replay-bar .hint {
  color: var(--muted);
  padding: 0 6px;
}

/* tabs and panels */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  padding: 0 6px;
  height: 38px;
  flex: none;
}
.tabs button {
  border: 0;
  background: transparent;
  height: 30px;
  padding: 0 10px;
  cursor: pointer;
  border-radius: 4px;
  color: var(--muted);
  white-space: nowrap;
}
.tabs button:hover {
  background: var(--hover);
  color: var(--text);
}
.tabs button.active {
  color: var(--text);
  background: var(--hover);
}
.tabs .icon {
  padding: 0 6px;
}
.tab-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.bottom {
  height: 320px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex: none;
  background: var(--bg);
}
.bottom.collapsed {
  height: 39px;
}
.bottom.collapsed .tab-body {
  display: none;
}
.bottom.collapsed #bottomToggle svg {
  transform: rotate(180deg);
}
.pad {
  padding: 10px 12px;
}
.row-flex {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.field {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.field > input,
.field > select {
  min-width: 70px;
}
input.in,
select.in,
textarea.in,
.field input,
.field select {
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input);
  padding: 0 7px;
  color: var(--text);
}
textarea.in {
  height: auto;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  width: 100%;
  resize: vertical;
  tab-size: 2;
}
.btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  background: var(--hover);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  filter: brightness(1.1);
}
.btn.small {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}
.btn.danger {
  color: var(--down);
}
.link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.hint-text {
  color: var(--muted);
  font-size: 12px;
}

/* tables */
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.t th {
  position: sticky;
  top: 0;
  background: var(--bg);
  text-align: right;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  z-index: 1;
}
table.t td {
  text-align: right;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.t th:first-child,
table.t td:first-child,
table.t .l {
  text-align: left;
}
table.t tbody tr {
  cursor: pointer;
}
table.t tbody tr:hover {
  background: var(--hover);
}

/* watchlist */
.wl-head {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}
.wl-head select {
  flex: 1;
}
.wl-row {
  display: grid;
  grid-template-columns: 1fr auto 64px 18px;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.wl-row:hover {
  background: var(--hover);
}
.wl-row.current {
  background: var(--accent-soft);
}
.wl-row .sym {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-row .ex {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.wl-row .px {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.wl-row .chg {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.wl-row .x {
  opacity: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
}
.wl-row:hover .x {
  opacity: 1;
}
.wl-row .x svg {
  width: 14px;
  height: 14px;
}

/* cards in side panel */
.card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px;
  background: var(--panel);
}
.card .top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: start;
}
.card .sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.impact-High {
  color: var(--down);
}
.impact-Medium {
  color: #f7a600;
}
.impact-Low {
  color: var(--muted);
}
.impact-Holiday {
  color: var(--muted);
}

/* stats grid */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
}
.stat .k {
  color: var(--muted);
  font-size: 11px;
}
.stat .v {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.tester {
  display: grid;
  grid-template-columns: minmax(330px, 420px) 1fr;
  height: 100%;
}
.tester .left {
  border-right: 1px solid var(--border);
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px;
}
.tester .right {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 10px;
}
.rule {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px;
}
.rule select,
.rule input {
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input);
  padding: 0 5px;
  max-width: 150px;
}
.rule input.num {
  width: 70px;
}
.rule .x {
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}
h4 {
  margin: 10px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.equity {
  height: 150px;
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
}
.next-step {
  font-size: 12px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding: 4px 10px;
}

/* heatmap */
.heatmap-wrap {
  position: relative;
  height: 100%;
}
.heatmap-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.tip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 9px;
  box-shadow: var(--shadow);
  font-size: 12px;
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
  display: grid;
  place-items: start center;
  padding-top: 9vh;
}
.modal-card {
  width: min(560px, 94vw);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
}
.modal-head button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}
.modal-body {
  padding: 12px 14px;
  overflow: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.search-in {
  width: 100%;
  height: 38px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input);
  padding: 0 12px;
  color: var(--text);
}
.list {
  margin-top: 8px;
}
.list .item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.list .item:hover,
.list .item.sel {
  background: var(--hover);
}
.list .item .meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.list .group {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 10px 4px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-grid .field input,
.form-grid .field select {
  width: 100%;
}

/* toasts */
.toasts {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  max-width: 360px;
  animation: in 0.2s ease-out;
}
.toast.err {
  border-left-color: var(--down);
}
.toast.alert {
  border-left-color: #f7a600;
}
@keyframes in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .side {
    display: none;
  }
  .bottom {
    height: 45%;
  }
}

/* PTQ connector */
.ptq-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--panel); }
.ptq-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.ptq-box p { margin: 6px 0; }
.ptq-verdict { display: inline-block; margin: 8px 0; padding: 4px 10px; border-radius: 4px; font-weight: 600; background: var(--hover); }
.ptq-verdict.up { color: var(--up); } .ptq-verdict.down { color: var(--down); } .ptq-verdict.warn { color: #f7a600; }
.ptq-arm { margin-top: 10px; border-left: 2px solid var(--accent); padding: 4px 10px; }
.ptq-arm ol { margin: 6px 0; padding-left: 18px; } .ptq-arm li { margin: 4px 0; }
.ptq-box code, .ptq-arm code, .tester code { background: var(--hover); padding: 1px 4px; border-radius: 3px; font-size: 12px; }
.ptq-box table.t td { white-space: normal; }
.ptq-box .stats { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

/* news */
a.card.news { display: block; color: inherit; text-decoration: none; }
a.card.news:hover { border-color: var(--accent); }
.news-title { font-weight: 600; line-height: 1.35; }
.news-sum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
/* seasonals */
.seas { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); height: 100%; }
.seas-left { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.seas-chart { flex: 1; min-height: 160px; position: relative; }
.seas-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 12px; font-size: 12px; }
.seas-legend i { display: inline-block; width: 10px; height: 3px; margin-right: 5px; vertical-align: middle; }
.seas-right { overflow: auto; }
.seas-table td, .seas-table th { padding: 4px 5px; font-size: 11px; text-align: center; }
.seas-table td.l, .seas-table th:first-child { text-align: left; }
.seas-sum td { font-weight: 600; border-top: 1px solid var(--border); }
/* financials */
.fin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12px; }
.fin-stats div { display: flex; flex-direction: column; }
.fin-bars { display: flex; gap: 10px; align-items: flex-end; height: 150px; margin: 12px 0 4px; }
.fin-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.fin-stack { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.fin-bar { width: 38%; border-radius: 3px 3px 0 0; min-height: 1px; }
.fin-bar.rev { background: var(--accent); } .fin-bar.ni { background: var(--up); } .fin-bar.ni.neg { background: var(--down); }
.fin-col .sub { font-size: 10px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.replay-bar.follower { pointer-events: none; opacity: .8; }

/* gold: bonus quant features and the PTQ / Academy links */
.gold-box { border: 1.5px solid var(--gold); border-radius: 8px; padding: 10px 12px; background: var(--panel); box-shadow: 0 0 0 3px var(--gold-soft); }
.gold-box { min-width: 0; overflow-x: auto; }
.gold-box table.t td, .gold-box table.t th, .tester .right table.t td, .tester .right table.t th { white-space: normal; }
.gold-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.gold-badge { background: var(--gold); color: #1a1405; font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 3px; letter-spacing: .03em; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1a1405; font-weight: 600; }
.btn.gold:hover { filter: brightness(1.08); }
.gold-text { color: var(--gold) !important; }
#tQuant, #tPtq { margin-top: 4px; }
table.t.heat td { text-align: center; } table.t.heat td.base { outline: 2px solid var(--gold); outline-offset: -2px; font-weight: 700; }
.ptq-verdict.warn { color: #f7a600; }
/* Academy button styling */
@property --academy-sheen-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes academy-border-sheen { to { --academy-sheen-angle: 360deg; } }
.btn.academy { flex: none; position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px; background: #dc2626; color: #fff; font-weight: 600; text-decoration: none; padding: 8px 18px; border-radius: 999px; border: 0; }
.btn.academy:hover { filter: brightness(0.93); color: #fff; }
.btn.academy::after { content: ""; position: absolute; inset: 0; padding: 2px; border-radius: inherit; background: conic-gradient(from var(--academy-sheen-angle), transparent 0deg, transparent 230deg, #8b7cff 265deg, #b6eaff 292deg, #fff 310deg, #0a8cff 335deg, transparent 360deg); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; animation: academy-border-sheen 5s linear infinite; }
@media (prefers-reduced-motion: reduce) { .btn.academy::after { animation: none; --academy-sheen-angle: 135deg; } }

/* PTQ: its own brand, from part-timequant.com's dark appearance (globals.css, 29 Sep 2026):
   near-black ground with rose/cyan/peach glows, glass panels, Instrument Sans with an
   Instrument Serif italic accent, Fragment Mono eyebrows, blue pill buttons. */
.ptq-brand {
  --bg: #0d0e12;
  --panel: rgba(23, 24, 29, 0.72);
  --panel-2: #1c1d23;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f5f7;
  --muted: #a4a9b4;
  --accent: #3aa1ff;
  --accent-soft: rgba(58, 161, 255, 0.14);
  --up: #4cc38a;
  --down: #ff7a7a;
  --hover: rgba(255, 255, 255, 0.06);
  --input: #17181d;
  --scroll: rgba(255, 255, 255, 0.18);
  color-scheme: dark;
  color: #c9ccd3;
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
.ptq-ground, .ptq-box.ptq-brand, .tester.ptq-brand {
  background:
    radial-gradient(520px 320px at -6% -20%, rgba(255, 122, 217, 0.26), transparent 70%),
    radial-gradient(620px 380px at 108% 20%, rgba(94, 231, 255, 0.2), transparent 70%),
    radial-gradient(520px 300px at 46% 130%, rgba(255, 179, 107, 0.2), transparent 70%),
    #0d0e12;
}
.ptq-box.ptq-brand { position: relative; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 22px; padding: 18px 24px 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06); overflow: hidden; }
.ptq-tab { min-height: 100%; background: #0d0e12; }
.pad.ptq-tab { padding: 12px 18px; display: flex; justify-content: center; align-items: flex-start; }
.pad.ptq-tab > .ptq-box { width: 100%; max-width: 1040px; }
.ptq-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ptq-logo { display: inline-flex; align-items: center; gap: 8px; color: #f4f5f7; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.ptq-logo-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #1c1d24; color: #f4f5f7; border: 1px solid rgba(255, 255, 255, 0.1); }
.ptq-eyebrow { font-family: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #a4a9b4; }
.ptq-status { display: inline-flex; align-items: center; gap: 7px; font-family: "Fragment Mono", ui-monospace, monospace; font-size: 11px; color: #a4a9b4; }
.ptq-status i { width: 7px; height: 7px; border-radius: 50%; background: #4cc38a; box-shadow: 0 0 8px rgba(76, 195, 138, 0.7); }
.ptq-title { margin: 0 0 8px; color: #f4f5f7; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.ptq-title em { font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: #9ccfff; }
.ptq-lead { margin: 0 0 16px; max-width: 640px; font-size: 14px; line-height: 1.55; color: #c9ccd3; }
.ptq-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; align-content: center; }
#tPtq, .pad.ptq-tab { container: ptqhost / inline-size; }
.ptq-box.ptq-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 28px; }
@container ptqhost (min-width: 760px) { .ptq-box.ptq-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; } }
.ptq-steps li { display: flex; gap: 12px; align-items: baseline; padding: 9px 14px; border-radius: 16px; background: rgba(23, 24, 29, 0.72); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(12px); }
.ptq-steps span { flex: none; font-family: "Fragment Mono", ui-monospace, monospace; font-size: 11px; color: #6cb8ff; letter-spacing: 0.1em; }
.ptq-steps b { display: block; color: #f4f5f7; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.ptq-steps p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #a4a9b4; }
.ptq-actions { display: flex; gap: 12px 22px; flex-wrap: wrap; align-items: flex-start; margin: 0 0 12px; }
.ptq-action { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.ptq-action > span { font-family: "Fragment Mono", ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.04em; color: #a4a9b4; padding-left: 4px; }
.btn.ptq-outline, .ptq-brand .btn.ptq-outline { display: inline-flex; align-items: center; gap: 6px; background: rgba(58, 161, 255, 0.12); border: 1px solid rgba(58, 161, 255, 0.55); color: #9ccfff; font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 9px 20px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.btn.ptq-outline:hover, .ptq-brand .btn.ptq-outline:hover { background: rgba(58, 161, 255, 0.2); color: #fff; }
.ptq-foot { margin: 0; font-size: 12px; color: #8d929e; }
.ptq-brand p { color: #c9ccd3; }
.ptq-brand .hint-text, .ptq-brand .muted { color: #a4a9b4; }
.ptq-brand .ptq-foot { color: #8d929e; }
.ptq-brand .link, .ptq-brand a:not(.btn) { color: #6cb8ff; }
.ptq-brand .btn { text-decoration: none; border-radius: 999px; }
.btn.ptq, .ptq-brand .btn.ptq { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; background: #0467cc; border: 1px solid #0467cc; color: #fff; font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 9px 20px; }
.btn.ptq:hover, .ptq-brand .btn.ptq:hover { background: #0a78e6; border-color: #0a78e6; color: #fff; }
.btn.ptq-ghost, .ptq-brand .btn.ptq-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); color: #f4f5f7; font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif; font-size: 14px; font-weight: 500; border-radius: 999px; padding: 9px 20px; }
.btn.ptq-ghost:hover, .ptq-brand .btn.ptq-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.ptq-brand .btn.small { font-size: 12px; padding: 4px 14px; }
.ptq-brand .btn.danger { background: rgba(255, 122, 122, 0.12); border: 1px solid rgba(255, 122, 122, 0.4); color: #ff7a7a; }
.ptq-brand .btn.danger:hover { background: rgba(255, 122, 122, 0.2); }
.ptq-brand .stat { background: rgba(23, 24, 29, 0.72); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; }
.ptq-brand .ptq-verdict { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 4px 14px; font-family: "Fragment Mono", ui-monospace, monospace; font-size: 12px; font-weight: 400; }
.ptq-brand .ptq-verdict.up { color: #4cc38a; background: rgba(76, 195, 138, 0.14); border-color: rgba(76, 195, 138, 0.35); }
.ptq-brand .ptq-verdict.down { color: #ff7a7a; background: rgba(255, 122, 122, 0.12); border-color: rgba(255, 122, 122, 0.4); }
.ptq-brand .ptq-verdict.warn { color: #e8b949; background: rgba(232, 185, 73, 0.14); border-color: rgba(232, 185, 73, 0.4); }
.ptq-brand .ptq-arm { margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(58, 161, 255, 0.45); border-radius: 16px; background: rgba(58, 161, 255, 0.08); }
.ptq-brand code { background: rgba(255, 255, 255, 0.08); color: #f4f5f7; font-family: "Fragment Mono", ui-monospace, monospace; border-radius: 6px; padding: 1px 6px; }
.ptq-brand table.t th { background: transparent; font-family: "Fragment Mono", ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #8d929e; font-weight: 400; }
.ptq-brand table.t td { border-bottom-color: rgba(255, 255, 255, 0.08); }
.ptq-brand h4 { font-family: "Fragment Mono", ui-monospace, monospace; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; color: #a4a9b4; margin: 16px 0 8px; }
.tester.ptq-brand .left { border-right-color: rgba(255, 255, 255, 0.1); }
.tabs button[data-tab="ptq"] { color: #6cb8ff; font-weight: 600; }

.web-notice{height:26px;box-sizing:border-box;padding:4px 12px;background:#111c2c;color:#b6c8df;font:11px "Instrument Sans",sans-serif;display:flex;gap:8px;align-items:center}.web-notice a{margin-left:auto;color:#a9c6ff}.web-notice span{opacity:.8}body{height:calc(100dvh - 26px);padding-top:26px}.web-notice{position:absolute;top:0;left:0;right:0}@media(max-width:650px){.web-notice span{font-size:9px}}

.web-notice{height:40px;padding:5px 12px;gap:12px}.web-notice #saveStatus{opacity:1}.web-notice .save-error{color:#ffb3ac}.web-notice .alert-note{margin-left:auto}.web-notice a{margin-left:0}body{height:calc(100dvh - 40px);padding-top:40px}#accountControls{display:flex;align-items:center;gap:8px}#accountControls button{background:#2962ff;color:white;border:0;border-radius:6px;padding:5px 10px;font:inherit;cursor:pointer;white-space:nowrap}#accountControls button[hidden]{display:none}#saveStatus{max-width:45vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#saveStatus.save-error{cursor:help}@media(max-width:750px){.web-notice .alert-note,.web-notice>a{display:none}.web-notice{gap:8px}.web-notice strong{font-size:10px}#accountControls{margin-left:auto}#saveStatus{max-width:30vw}}
