/* Classic skin: the original navy Trade Desk look, adapted to the current page structure.
   Dark only. The AumSwaps skin lives in skin-aumswaps.css; the switch is in theme.js. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/static/fonts/archivo-latin-wdth-normal.woff2) format("woff2"); }

:root {
  --ink: #13233A;        /* page */
  --panel: #192C45;      /* raised surfaces */
  --panel-2: #20365391;  /* hover / zebra */
  --line: #2C4566;
  --text: #E7EDF5;
  --muted: #93A6BF;
  --long: #3CC6A8;       /* long side, profit */
  --short: #F07A62;      /* short side, loss */
  --attn: #F2B33D;       /* needs your attention */
  --focus: #9CC2FF;
  --radius-s: 6px;
  --radius-m: 10px;
  --font: "Archivo", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink); color: var(--text); font-family: var(--font);
  font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums;
  font-variation-settings: "wdth" 100;
}
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.error { color: var(--short); min-height: 1.2em; margin: 0; }
.long, .pos { color: var(--long); }
.short, .neg { color: var(--short); }
.attn { color: var(--attn); }
h1, h2, h3 { font-weight: 700; font-variation-settings: "wdth" 88; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); display: grid; gap: 10px; }
.login-card h1 { font-size: 34px; font-variation-settings: "wdth" 75; }

/* ---------- shell ---------- */
.shell {
  display: grid; min-height: 100vh;
  grid-template-columns: 188px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "rail top" "rail view";
}
.topbar {
  grid-area: top; display: grid; gap: 6px; padding: 10px 20px 8px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--ink); z-index: 5;
}
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 12px 18px; font-weight: 800; text-decoration: none;
  color: var(--text); font-variation-settings: "wdth" 75; font-size: 20px; }
.brand img.full { display: none; }
.brand img.mark { width: 30px; height: auto; }
.brand span { font-stretch: 75%; }

/* the session strip */
.strip-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ribbon { display: grid; gap: 2px; }
.session { width: 100%; height: 34px; display: block; overflow: visible; }
.session .day { fill: #1B3050; }
.session .win { fill: #2E5A7A; }
.session .win.active { fill: #3D7C8E; }
.session .tick { stroke: #355377; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.session .now { stroke: var(--attn); stroke-width: 4; vector-effect: non-scaling-stroke; }
.session .budget-bg { fill: #24395A; }
.session .budget { fill: var(--long); }
.session .budget.warn { fill: var(--attn); }
.session .budget.bad { fill: var(--short); }
.ribbon-hours { position: relative; height: 15px; font-size: 11px; color: var(--muted); }
.ribbon-hours span { position: absolute; top: 0; transform: translateX(-50%); }
.ribbon-hours span:first-child { transform: none; }
.ribbon-hours b { position: absolute; top: -36px; height: 24px; display: grid; place-items: center; font-size: 11px;
  font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; pointer-events: none; }
.clock { font-size: 22px; font-weight: 700; font-variation-settings: "wdth" 70; }
.session-label { color: var(--muted); font-size: 13px; }
.status { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--long); border-color: #2C6B60; }
.pill.warn { color: var(--attn); border-color: #6E5626; }
.pill.bad { color: #fff; background: #8C3B2E; border-color: #B24B3A; }

.rail { grid-area: rail; display: flex; flex-direction: column; padding: 16px 10px; gap: 2px;
  border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; }
.rail a.nav { text-decoration: none; padding: 8px 12px; border-radius: var(--radius-s); color: var(--muted);
  display: flex; justify-content: space-between; align-items: center; }
.rail a.nav:hover { color: var(--text); background: #1C324F; }
.rail a.nav.active { color: var(--text); background: var(--panel); box-shadow: inset 3px 0 0 var(--long); }
.badge { background: var(--attn); color: #2A1E05; font-size: 11.5px; font-weight: 700; min-width: 20px;
  text-align: center; border-radius: 999px; padding: 0 6px; }
.rail-foot { margin-top: auto; display: grid; gap: 2px; }
.rail-foot .linkish { text-align: left; padding: 8px 12px; }
.login-logo { width: 200px; height: auto; justify-self: center; margin-bottom: 12px; }
.panel-head.spaced { margin-top: 12px; }
.wrap { white-space: normal !important; }
.flush { margin: 0; }
td.w-input { width: 120px; }
.btn[aria-selected="true"] { border-color: var(--long); color: var(--long); }
.appearance .presets .btn[aria-pressed=true] { border-color: var(--long); color: var(--long); }

.view { grid-area: view; padding: 22px 24px 60px; min-width: 0; display: grid; gap: 22px; align-content: start; }
.view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }

/* ---------- numbers row ---------- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.figure { background: var(--ink); padding: 12px 14px; }
.figure .label { color: var(--muted); font-size: 13px; }
.figure .value { font-size: 24px; font-weight: 700; font-variation-settings: "wdth" 80; }
.figure .sub { color: var(--muted); font-size: 12.5px; }

/* ---------- panels and tables ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; }
.panel { display: grid; gap: 10px; align-content: start; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-head a { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid #22395A; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; position: sticky; top: 0; background: var(--panel); }
th.sortable { cursor: pointer; }
th.sortable[aria-sort] { color: var(--text); }
tbody tr:hover { background: #1A2F4B; }
tbody tr:last-child td { border-bottom: 0; }
td.left, th.left { text-align: left; }
.sym { font-weight: 700; }
.hot { color: var(--attn); font-weight: 700; }
.empty { padding: 22px; color: var(--muted); text-align: center; }
.tag { font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--muted); }
.tag.long { color: var(--long); border-color: #2C6B60; }
.tag.short { color: var(--short); border-color: #7A3D33; }
.tag.live { color: #fff; background: #8C3B2E; border-color: #B24B3A; }

/* recommendation cards: a ticket, not a SaaS card */
.tickets { display: grid; gap: 12px; }
.ticket { border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--radius-s);
  padding: 12px 14px; display: grid; gap: 8px; background: var(--panel); }
.ticket.side-long { border-left-color: var(--long); }
.ticket.side-short { border-left-color: var(--short); }
.ticket .span2 { grid-column: span 2; }
.ticket dd.targets { display: grid; gap: 2px; }
.ticket dd.targets > span { white-space: nowrap; }
.ticket-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ticket-top h3 { font-size: 17px; }
.ticket dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px 14px; margin: 0; }
.ticket dt { color: var(--muted); font-size: 12px; }
.ticket dd { margin: 0; font-weight: 600; }
.ticket .why { color: var(--muted); font-size: 13px; margin: 0; }
.ticket .actions { display: flex; gap: 8px; }

/* ---------- forms ---------- */
.btn { font: inherit; font-weight: 600; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: transparent; color: var(--text); padding: 7px 14px; cursor: pointer; }
.btn:hover { background: #1F3655; }
.btn.primary { background: var(--long); border-color: var(--long); color: #08241E; }
.btn.primary:hover { background: #52D4B8; }
.btn.danger { border-color: #8C3B2E; color: var(--short); }
.btn.danger:hover { background: #3A2027; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.linkish { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; }
.linkish:hover { color: var(--text); }
input, select { font: inherit; color: var(--text); background: #0F1D31; border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 7px 9px; width: 100%; }
input[type=checkbox] { width: auto; accent-color: var(--long); }
label { color: var(--muted); font-size: 13px; }

.rules { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; display: grid; gap: 14px; }
.fieldset > h2 { font-size: 17px; }
.fieldset > p { margin: -8px 0 0; color: var(--muted); font-size: 13.5px; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 16px; align-items: start; }
.field { display: grid; gap: 4px; align-content: start; }
#add-rung { justify-self: start; }
.field small { color: var(--muted); font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.presets .btn[aria-pressed=true] { border-color: var(--long); color: var(--long); }
.ladder { display: grid; gap: 8px; }
.ladder-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.sticky-side { position: sticky; top: 80px; display: grid; gap: 16px; }
.control-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #2A4060; transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.switch input:checked + span { background: var(--short); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.preview dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.preview dt { color: var(--muted); }
.preview dd { margin: 0; text-align: right; font-weight: 600; }
.save-bar { display: flex; gap: 10px; align-items: center; }
.save-bar .error { flex: 1; }

/* alerts feed */
.feed { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.feed-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #22395A; align-items: baseline; }
.feed-item:last-child { border-bottom: 0; }
.feed-item time { color: var(--muted); font-size: 13px; }
.feed-item .t { font-weight: 600; }
.feed-item .b { color: var(--muted); font-size: 13.5px; }
.feed-item.critical { background: #351C22; }
.feed-item.warning .t { color: var(--attn); }
.feed-item.unread { box-shadow: inset 3px 0 0 var(--attn); }

.chart { width: 100%; height: 260px; display: block; }
.chart .grid { stroke: #22395A; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--long); stroke-width: 2; }
.chart .area { fill: #3CC6A822; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--panel); border: 1px solid var(--line); padding: 10px 16px; border-radius: var(--radius-s);
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1100px) {
  .split, .rules { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-areas: "rail" "top" "view"; }
  .topbar { padding: 10px 16px; position: static; }
  .brand { padding: 0 8px 0 0; flex: none; }
  .brand span { display: none; }
  .ribbon-hours span:nth-child(even) { display: none; }
  .ribbon-hours b { font-size: 0; }
  .status { justify-content: flex-start; }
  .rail { flex-direction: row; align-items: center; overflow-x: auto; height: auto; position: static; border-right: 0;
    border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .rail a.nav { white-space: nowrap; }
  .rail-foot { margin: 0 0 0 auto; display: flex; }
  .rail-foot .linkish { white-space: nowrap; }
  .view { padding: 16px; }
  .feed-item { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, .toast { transition: none !important; }
}

.exch { white-space: nowrap; }
.exch-kraken { color: #9CC2FF; }
