/* Base styles from the T-Invest Bot dashboard. */
:root { color-scheme: light; }
  body {
    margin: 0;
    background: #efeae2;
    color: #221e1a;
    font: 15px/1.45 "Segoe UI", sans-serif;
  }
  main { max-width: 960px; margin: 36px auto; padding: 0 16px 40px; }
  table { width: 100%; border-collapse: collapse; margin-top: 18px; }
  caption { caption-side: top; text-align: left; font-weight: 700; padding: 0 0 8px; }
  th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eee4d8; vertical-align: top; }
  th { color: #75695d; font-size: 12px; font-weight: 650; }
  td { font-variant-numeric: tabular-nums; }
  article {
    background: #fff;
    border: 1px solid #e3d9cc;
    border-top: 6px solid #f0b429;
    border-radius: 18px;
    padding: 20px 20px 16px;
    box-shadow: 0 10px 30px rgba(70, 48, 20, 0.06);
  }
  header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
  h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
  .badge {
    flex: none;
    background: #f0b429;
    color: #3d2c00;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 999px;
  }
  .trading { margin: 8px 0 0; color: #6d6256; }
  .banner { margin: 14px 0 0; white-space: pre-wrap; }
  .banner:empty { display: none; }
  .stale, .error {
    border-radius: 12px;
    padding: 10px 12px;
  }
  .stale { background: #fff6e8; border: 1px solid #efd3a4; color: #6d4d16; }
  .error { background: #fff1ee; border: 1px solid #f0c2b8; color: #8a2e1f; }
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
  .grid[hidden],
  #paper-table[hidden] { display: none !important; }
  section { background: #faf7f3; border-radius: 12px; padding: 10px 12px; }
  .wide { grid-column: 1 / -1; }
  section span { display: block; color: #75695d; font-size: 12px; }
  section strong { display: block; margin-top: 2px; font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
  .note { margin: 12px 0 0; color: #6d6256; font-size: 13px; }
  button {
    margin-top: 16px;
    width: 100%;
    background: #2a241e;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
  }
  button:disabled { opacity: 0.6; cursor: progress; }
  .ok { color: #1b7a3a; }
  .bad { color: #9a3412; }
  .fresh-current { color: #1b7a3a; }
  .fresh-stale { color: #9a3412; }
  .fresh-unknown { color: #6d6256; }
  .paper { margin-top: 18px; border-top-color: #3d6b8c; }
  .badge-sim { background: #d7e6f2; color: #16324a; }
  label.field { display: block; margin-top: 10px; color: #75695d; font-size: 12px; }
  label.field input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; border: 1px solid #e3d9cc; border-radius: 10px; font: inherit; color: #221e1a; background: #fff; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .actions button { margin-top: 8px; }

html { scroll-padding-top: 1rem; }
body { font-size: 1rem; }
main { max-width: 1040px; padding-bottom: 56px; }
[hidden] { display: none !important; }
article { margin: 18px 0; }
.masthead { align-items: center; gap: 1rem; }
.masthead h1 { font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.05; }
.eyebrow { margin: 0 0 .35rem; color: #75695d; font-size: .8rem; font-weight: 700; letter-spacing: .13em; }
h2 { margin: 0; font-size: 1.3rem; }
.masthead button { width: auto; margin: 0; }
nav { display: flex; gap: .9rem 1.4rem; flex-wrap: wrap; margin: 1.15rem 0; }
nav a { color: #554637; font-weight: 650; text-underline-offset: .22rem; }
.badge { font-size: .8rem; max-width: 48%; text-align: center; overflow-wrap: anywhere; }
.note, section span, label.field, th { font-size: .875rem; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats strong { font-size: clamp(1rem, 3.8vw, 1.35rem); }
.protections strong { font-size: 1rem; }
.actions { grid-template-columns: 1fr 1fr 1fr; margin-top: .65rem; }
button { min-height: 44px; }
button:disabled { cursor: not-allowed; }
.secondary { background: #eee4d8; color: #231e19; }
.danger { background: #9b2c22; }
.banner { background: #fff9e8; border: 1px solid #ecd29a; border-radius: 12px; padding: .7rem .9rem; }
.error { background: #fff1ee; }
figure { margin: 1.4rem 0 .25rem; }
figcaption, summary { font-weight: 700; }
canvas { display: block; width: 100%; height: 205px; margin-top: .55rem; border-radius: 10px; background: #faf7f3; }
.table-wrap { overflow-x: auto; }
td, th { padding: .6rem .5rem; }
.limits-table td:first-child { min-width: 9rem; }
details { border-top: 1px solid #eee4d8; margin-top: 1.1rem; padding-top: .85rem; }
summary { cursor: pointer; }
input:not([type=checkbox]), select { min-height: 44px; font-size: 1rem; }
select { display: block; width: 100%; max-width: 26rem; box-sizing: border-box; margin-top: 4px; padding: .5rem; border: 1px solid #e3d9cc; border-radius: 10px; background: white; color: inherit; }
.check { display: flex; min-height: 44px; align-items: center; gap: .45rem; margin-top: .55rem; }
.check input { inline-size: 1.05rem; block-size: 1.05rem; accent-color: #6c4a10; }
.universe { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: 0 .5rem; background: #faf7f3; padding: 0 .6rem .5rem; border-radius: 10px; }
.universe .check { margin: 0; }
dl { display: grid; grid-template-columns: minmax(9rem, 1fr) 2fr; gap: .55rem 1rem; }
dt { color: #75695d; }
dd { margin: 0; overflow-wrap: anywhere; }
#login-panel { max-width: 30rem; }
:focus-visible { outline: 3px solid #327292; outline-offset: 3px; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 510px) {
  main { margin: 20px auto; padding-inline: 10px; }
  article { padding: 14px 11px; border-radius: 14px; }
  header { gap: .45rem; }
  section { padding-inline: 8px; }
  nav { gap: .45rem .9rem; padding-inline: .25rem; }
  .actions { grid-template-columns: 1fr 1fr; }
  .danger { grid-column: 1 / -1; }
  #settings-form .grid { grid-template-columns: 1fr; gap: 0; }
  canvas { height: 170px; }
  dl { grid-template-columns: 1fr; gap: .2rem; }
  dd { margin-bottom: .6rem; }
}
