:root {
  --bg: #f3f5f7;
  --panel: #fff;
  --line: #dfe3e8;
  --fg: #14181f;
  --muted: #56606d;
  --accent: #2b5bd7;
  --up: #06775a;
  --down: #b42318;
  --warn: #7a5200;
  --chip: #eef2f7;
  --field: #8a939e;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --panel: #161b22;
    --line: #2a313b;
    --fg: #e7ebf0;
    --muted: #9aa4b1;
    --accent: #7ea2ff;
    --up: #4fd1a5;
    --down: #ff8a7a;
    --warn: #e3b341;
    --chip: #1f2630;
    --field: #5f6a78;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--sans);
}
a {
  color: var(--accent);
}
.up {
  color: var(--up);
}
.down {
  color: var(--down);
}
.sitefoot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 0 16px 22px;
}
.dtitle {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.titlerow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.auth {
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  display: grid;
  place-items: center;
  padding: 40px 16px;
}
.authbox {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(20, 24, 31, 0.06);
}
h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}
.card > h1,
.card > p.lead {
  text-align: center;
}
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.legal .card > h1,
.legal .card > p.lead {
  text-align: left;
}
.legal h2 {
  font-size: 16px;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
  margin: 22px 0 6px;
}
.legal .card p {
  margin: 0 0 10px;
  line-height: 1.65;
}
.sitefoot a {
  color: var(--muted);
}
.help {
  margin: -8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
form.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}
input::-ms-reveal {
  display: none;
} /* Edge draws its own eye next to ours */
input,
select {
  font: inherit;
  font-weight: 400;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--panel);
  color: var(--fg);
  width: 100%;
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 91, 215, 0.22);
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[type='checkbox'],
input[type='radio'] {
  min-height: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
}
label.check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}
button,
.btn {
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
button.ghost,
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
button.danger {
  background: var(--down);
}
.small {
  padding: 6px 11px;
  font-size: 13px;
}
.msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin: 0;
}
.msg.err {
  background: rgba(180, 35, 24, 0.12);
  background: color-mix(in srgb, var(--down) 12%, transparent);
  color: var(--down);
}
.msg.ok {
  background: rgba(6, 119, 90, 0.12);
  background: color-mix(in srgb, var(--up) 12%, transparent);
  color: var(--up);
}
.msg.warn {
  background: rgba(122, 82, 0, 0.14);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
}
.foot {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.steps {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.steps li {
  flex: 1;
  border-top: 3px solid var(--line);
  padding-top: 6px;
}
.steps li.on {
  border-color: var(--accent);
  color: var(--fg);
  font-weight: 600;
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 16px 56px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
/* logo and signed-in header / footer */
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
}
.word {
  width: 120px;
  height: 32px;
  flex: none;
}
.authbox .word {
  width: 135px;
  height: 36px;
}
.word text {
  fill: currentColor;
  font-size: 18px;
  font-weight: 700;
}
.word .sub {
  fill: var(--muted);
  font-size: 8.5px;
}
.logo {
  flex: none;
}
.logo rect {
  fill: var(--accent);
}
.logo .ink {
  fill: none;
  stroke: var(--panel);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.appbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.appbar .inner,
.appfoot .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.appbar .inner {
  min-height: 64px;
  gap: 8px 20px;
}
.appbar .left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  align-self: stretch;
}
.tabs {
  display: flex;
  align-self: stretch;
}
.tabs a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-height: 62px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a:hover {
  color: var(--fg);
}
.tabs .badge {
  margin-left: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--down);
  color: var(--panel);
  font-size: 12px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.tabs a[aria-current='page'] {
  color: var(--fg);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.appfoot {
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.appfoot .inner {
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 10px 24px;
  font-size: 13px;
  color: var(--muted);
}
.appfoot .copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.appfoot nav {
  display: flex;
  gap: 20px;
}
.appfoot a {
  color: var(--muted);
  text-decoration: none;
}
.appfoot a:hover {
  color: var(--fg);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
h2 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.tbl {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td.num {
  font-family: var(--mono);
}
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--chip);
}
.pill.approved,
.pill.run {
  color: var(--up);
}
.pill.test {
  color: var(--warn);
}
.pill.pending {
  color: var(--warn);
}
.pill.rejected,
.pill.stop {
  color: var(--down);
}
.money {
  display: block;
  position: relative;
}
.money input {
  padding-left: 26px;
  font-family: var(--mono);
}
.money .cur {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
} /* $ inside the field, so it is exactly as wide as the menus beside it */
.inline {
  display: inline;
}
.acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
label.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
}
label.check input {
  margin-top: 2px;
  flex: none;
}
.acts select {
  width: auto;
  min-height: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.pw {
  position: relative;
  display: block;
}
.pw input {
  padding-right: 46px;
}
.eye {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
}
.eye:hover,
.eye[aria-pressed='true'] {
  color: var(--accent);
}
.caps {
  font-size: 12px;
  font-weight: 500;
  color: var(--warn);
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.row a {
  font-size: 13px;
  font-weight: 500;
}
button[aria-busy='true'] {
  opacity: 0.7;
  cursor: progress;
}
.user {
  position: relative;
}
.user summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.user summary::-webkit-details-marker {
  display: none;
}
.user[open] summary,
.user summary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.user summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.menu {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(20, 24, 31, 0.14);
  z-index: 5;
}
.menu b {
  padding: 10px 12px 2px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.menu .role {
  padding: 0 12px 10px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
}
.menu a:hover {
  background: var(--chip);
}
.menu a.out {
  color: var(--down);
}
/* platform pill: same header row as the logo and tabs, same bar height */
.platform {
  position: relative;
  flex: none;
}
.platform summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
}
.platform summary::-webkit-details-marker {
  display: none;
}
.platform summary .platicon {
  display: none;
}
.platform[open] summary,
.platform summary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.platform summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.platmenu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(20, 24, 31, 0.14);
  z-index: 6;
}
.platitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.platitem .meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.platitem .meta small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.platitem[aria-current='true'] {
  background: var(--chip);
  font-weight: 600;
}
.platitem.soon {
  color: var(--muted);
  opacity: 0.72;
  cursor: default;
}
.soon-tag {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 999px;
}
.platform .check {
  color: var(--accent);
  display: grid;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: var(--panel);
  color: var(--fg);
  width: min(600px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}
dialog.wide {
  width: min(1360px, calc(100vw - 24px));
}
.dlghead,
.reporthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
  padding: 18px 16px 12px 24px;
}
.dlghead-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.dlgclose {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  flex: none;
}
.dlgclose:hover {
  background: var(--chip);
}
dialog > form.stack {
  padding: 0 24px 22px;
}
#report > .hint,
#report > .tablebox {
  padding-left: 24px;
  padding-right: 24px;
}
#report > .tablebar {
  padding: 0 24px 22px;
}
#rsub {
  margin: 4px 0 12px;
}
dialog::backdrop {
  background: rgba(10, 14, 20, 0.55);
  overflow: hidden; /* makes the backdrop a scroll container so overscroll-behavior applies */
  overscroll-behavior: contain;
}
dialog:modal {
  overscroll-behavior: contain; /* scrolling inside a dialog never moves the page behind it */
}
dialog h2 {
  font-size: 18px;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hours {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}
.hours label {
  position: relative;
  display: block;
}
.hours input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.hours span {
  display: block;
  text-align: center;
  padding: 8px 0;
  border: 1px solid var(--field);
  border-radius: 6px;
  font: 500 12px var(--mono);
  color: var(--muted);
}
.hours input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.hours input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.timehead {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}
.timehead label.check {
  align-items: center;
}
.timehead input {
  margin: 0;
}
.dlgacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.dlgacts .push {
  margin-left: auto;
}
@media (max-width: 560px) {
  .uname {
    display: none;
  }
  .platname {
    display: none;
  }
  .platform summary .platicon {
    display: block;
  }
  .platform summary {
    padding: 0 10px;
  }
  .appbar .inner {
    padding-top: 10px;
  }
  .appbar .left {
    display: contents;
  }
  .platform {
    order: 1;
  }
  .user {
    order: 2;
  }
  .tabs {
    order: 3;
    flex-basis: 100%;
    min-width: 0;
    overflow-x: auto; /* the owner's five tabs are wider than a phone: the row scrolls instead of widening the page */
    scrollbar-width: none;
  }
  .tabs a {
    min-height: 44px;
    padding: 0 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  input,
  select,
  .acts select,
  .tablebar select {
    font-size: 16px;
  } /* below 16px iOS zooms the page on focus */
  .hours {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .two {
    grid-template-columns: 1fr;
  }
}
/* dashboard */
.pred {
  --s: 5;
}
.pred .m {
  display: none;
}
.summary {
  display: grid;
  grid-template-columns: repeat(var(--s, 8), minmax(0, 1fr));
  gap: 12px;
} /* 16 boxes: two rows of 8 */
.box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
}
.label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.value {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  margin-top: 4px;
  white-space: nowrap;
}
.analytics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.analytics h3 {
  margin: 0;
  padding: 12px 14px 4px;
  font-size: 14px;
  font-weight: 600;
}
.analytics .panel h3 {
  padding: 0 0 6px;
}
.tips {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sub {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
th button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
th .arrow {
  font-size: 10px;
  opacity: 0.35;
}
th[aria-sort] .arrow {
  opacity: 1;
}
/* soft shadows at the edges show that a wide table scrolls sideways */
.tablebox {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  background:
    linear-gradient(to right, var(--panel) 30%, transparent),
    linear-gradient(to left, var(--panel) 30%, transparent) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.14), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.14), transparent) 100% 0;
  background-color: var(--panel);
  background-repeat: no-repeat;
  background-size:
    40px 100%,
    40px 100%,
    14px 100%,
    14px 100%;
  background-attachment: local, local, scroll, scroll;
}
.tablebar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
}
.tablebar .left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.tablebar select {
  width: auto;
  min-height: 0;
  padding: 5px 8px;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.pager button {
  min-width: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  font-weight: 500;
}
.pager button[aria-current='page'] {
  background: var(--fg);
  color: var(--bg);
}
.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.gap {
  color: var(--muted);
  padding: 0 4px;
}
@media (max-width: 1100px) {
  .summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* phones: two boxes a row. It must come after the .summary rule and the 1100px block above, which also match phones */
@media (max-width: 560px) {
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lineid {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
}
/* tall tables scroll inside their box, so the sideways scrollbar is always on screen; scrollbars stay visible */
.tablebox.scrolly {
  max-height: 70vh;
  overflow: auto;
}
.scrolly thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.tablebox {
  scrollbar-width: auto;
  scrollbar-color: var(--muted) var(--chip);
}
.tablebox::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}
.tablebox::-webkit-scrollbar-track {
  background: var(--chip);
}
.tablebox::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 6px;
  border: 3px solid var(--chip);
}
.summary #action {
  white-space: normal;
  font-size: 15px;
}
.idcell .lineid {
  display: block;
  margin-bottom: 6px;
}
/* Edit and Report side by side: small, with a gap, still 28px tall for a finger (owner, 2026-11-17) */
.idcell button {
  font-size: 11.5px;
  padding: 0 8px;
  min-height: 28px;
}
.idcell button + button {
  margin-left: 6px;
}
#lines th,
#lines td {
  padding: 9px 6px;
}
#lines th {
  white-space: nowrap;
  vertical-align: bottom;
} /* headers stay on one line; the box already scrolls sideways */
#rtable th,
#rtable td {
  white-space: nowrap;
}

/* every Analytics table: the leading columns take 45% together, so Trade..P&L sit in the same place in all of them */
.even table {
  table-layout: fixed;
}
.even th:first-child {
  width: 45%;
}
.even2 th:nth-child(-n + 2) {
  width: 22.5%;
}
.even3 th:nth-child(-n + 3) {
  width: 15%;
}
.even5 th:nth-child(1) {
  width: 8%;
}
.even5 th:nth-child(2) {
  width: 11%;
}
.even5 th:nth-child(3) {
  width: 8%;
}
.even5 th:nth-child(4) {
  width: 8%;
}
.even5 th:nth-child(5) {
  width: 10%;
}
.pubnav {
  display: flex;
  gap: 8px;
}
.pubnav .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--panel);
  font-weight: 600;
  text-decoration: none;
}
main:focus {
  outline: none;
}
.skip:focus {
  top: 12px;
}

.tips .warn,
td .warn {
  color: var(--warn);
  font-weight: 600;
}
tr.few {
  opacity: 0.7;
}
td .warn {
  margin-left: 2px;
}

/* Simulation | Automation switch, just left of the account menu */
.appbar .right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.mode-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  flex: none;
}
.mode-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.mode-switch a:hover {
  color: var(--fg);
}
.mode-switch a.on,
.mode-switch a[aria-current="page"] {
  background: var(--panel);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(20, 24, 31, 0.1);
}
.mode-switch[data-mode="automation"] a.on {
  box-shadow: inset 0 0 0 1px #e67a00;
}
.mode-switch .live {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: #fff;
  background: #e67a00;
  border-radius: 999px;
  padding: 2px 5px;
}
.mode-short {
  display: none;
}

@media (max-width: 560px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .wrap,
  .appbar .inner,
  .appfoot .inner,
  main {
    max-width: 100%;
    min-width: 0;
  }
  .appbar .right {
    order: 2;
    gap: 8px;
    margin-left: 0;
  }
  .mode-switch a {
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }
  .platform summary {
    min-height: 40px;
    height: 40px;
  }
  .pubnav .btn,
  .idcell button,
  button.small,
  .acts button,
  .acts a.btn,
  .pager button,
  .tablebar select,
  dialog button,
  dialog .btn,
  [data-close] {
    min-height: 40px;
    min-width: 40px;
  }
  .pager button {
    padding: 8px 10px;
  }
  dialog,
  dialog.wide {
    width: 100%;
    max-width: 100%;
    margin: 0;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: 0;
    inset: 0;
  }
  .dlghead,
  .reporthead {
    padding: 12px 8px 10px 16px;
  }
  dialog > form.stack {
    padding: 0 16px 16px;
  }
  #report > .hint,
  #report > .tablebox {
    padding-left: 16px;
    padding-right: 16px;
  }
  #report > .tablebar {
    padding: 0 16px 16px;
  }
  #rtable,
  dialog .tablebox {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tablebox table th,
  .tablebox table td,
  #lines th,
  #lines td,
  #rtable th,
  #rtable td {
    white-space: nowrap;
  }
}

@media (max-width: 414px) {
  .appbar .word {
    display: none; /* logo stays; the wordmark would crowd the Sim/Auto toggle */
  }
  .mode-long {
    display: none;
  }
  .mode-short {
    display: inline;
  }
}
