/* Artavayu: design tokens and components. Plain CSS, no build step.
   Dark is the default (trading terminal); light follows the OS, and data-theme on <html> forces either. */
:root {
  --bg: #070a10;
  --panel: #0f141d;
  --panel-2: #161c28;
  --border: #253041;
  --text: #eaf1f8;
  --muted: #8d9aae;
  --accent: #4fd1e8;
  --accent-2: #8b7cf6;
  --accent-fg: #041116;
  --profit: #2fbf8a;
  --loss: #f0625c;
  --warn: #e0a83c;
  --profit-bg: rgb(47 191 138 / 0.13);
  --loss-bg: rgb(240 98 92 / 0.13);
  --warn-bg: rgb(224 168 60 / 0.13);
  --accent-bg: rgb(79 209 232 / 0.12);
  --chart-line: #4fb8d0;
  --chart-up: #1fa77a;
  --chart-down: #d4483f;
  --chart-grid: #1d2533;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 18px 40px -12px rgb(0 0 0 / 0.6);
  --glass: rgb(15 20 29 / 0.72);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-2: #eef2f7;
    --border: #d9e0ea;
    --text: #0f1722;
    --muted: #5b6676;
    --accent: #0a7f95;
    --accent-2: #5b4bd6;
    --accent-fg: #ffffff;
    --profit: #0f7a55;
    --loss: #c0392f;
    --warn: #8a5f08;
    --profit-bg: rgb(15 122 85 / 0.10);
    --loss-bg: rgb(192 57 47 / 0.10);
    --warn-bg: rgb(138 95 8 / 0.10);
    --accent-bg: rgb(10 127 149 / 0.10);
    --chart-line: #0a7f95;
    --chart-up: #0d8d6e;
    --chart-down: #c43a30;
    --chart-grid: #e3e8ef;
    --shadow-sm: 0 1px 2px rgb(15 23 34 / 0.08);
    --shadow-lg: 0 18px 40px -16px rgb(15 23 34 / 0.25);
    --glass: rgb(255 255 255 / 0.78);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f4f7fb; --panel: #ffffff; --panel-2: #eef2f7; --border: #d9e0ea; --text: #0f1722; --muted: #5b6676;
  --accent: #0a7f95; --accent-2: #5b4bd6; --accent-fg: #ffffff; --profit: #0f7a55; --loss: #c0392f; --warn: #8a5f08;
  --profit-bg: rgb(15 122 85 / 0.10); --loss-bg: rgb(192 57 47 / 0.10); --warn-bg: rgb(138 95 8 / 0.10);
  --accent-bg: rgb(10 127 149 / 0.10); --chart-line: #0a7f95; --chart-up: #0d8d6e; --chart-down: #c43a30;
  --chart-grid: #e3e8ef; --shadow-sm: 0 1px 2px rgb(15 23 34 / 0.08); --shadow-lg: 0 18px 40px -16px rgb(15 23 34 / 0.25);
  --glass: rgb(255 255 255 / 0.78); color-scheme: light;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html { background: var(--bg); color: var(--text); }
body { background: transparent; color: var(--text); } /* transparent: the fixed three.js canvas (z-index -1) paints between html and body */
body { font-family: var(--font-sans); font-size: 15px; line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; }
button { cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: var(--accent-bg); }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.grad-text, .gold-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 1.5rem 1rem; }
@media (min-width: 768px) { .container { padding: 1.5rem 1.5rem; } }
.page-title { font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head p { color: var(--muted); font-size: .875rem; margin-top: .25rem; }

/* ------------------------------------------------------------------ three.js background */
#bg3d { position: fixed; inset: 0; z-index: -1; pointer-events: none; width: 100vw; height: 100vh; }
.bg-fallback {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgb(79 209 232 / 0.16), transparent 60%),
    radial-gradient(50rem 36rem at -10% 110%, rgb(139 124 246 / 0.14), transparent 60%),
    radial-gradient(70rem 30rem at 50% 75%, rgb(79 209 232 / 0.05), transparent 70%),
    var(--bg);
}

/* ------------------------------------------------------------------ card */
.card {
  border: 1px solid var(--border); border-radius: .875rem; background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 { font-size: .875rem; font-weight: 600; }
.card-body { padding: 1rem; }
.card-body.flush { padding: 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; white-space: nowrap;
  border-radius: .5rem; padding: .5rem .8rem; font-size: .875rem; font-weight: 500; line-height: 1.25rem;
  border: 1px solid transparent; transition: filter .15s, background-color .15s, border-color .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2))); color: var(--accent-fg); box-shadow: var(--shadow-sm); }
.btn-primary:not(:disabled):hover { filter: brightness(1.1); }
.btn-ghost { background: var(--panel-2); border-color: var(--border); }
.btn-ghost:not(:disabled):hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.btn-danger { background: var(--loss); color: #fff; }
.btn-danger:not(:disabled):hover { filter: brightness(1.1); }
.btn-link { color: var(--accent); padding: 0; border: 0; background: none; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { padding: .25rem .55rem; font-size: .75rem; line-height: 1rem; }
.btn-icon { padding: .4rem; }

/* ------------------------------------------------------------------ forms */
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); border-radius: .5rem; background: var(--panel-2);
  padding: .5rem .75rem; font-size: .875rem; line-height: 1.25rem; outline: none; transition: border-color .15s;
}
.select { width: auto; padding-right: 2rem; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%238d9aae' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: .75rem; }
.select.w-full { width: 100%; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .6; }
.textarea { resize: vertical; min-height: 4.5rem; }
.label { display: block; margin-bottom: .25rem; font-size: .75rem; font-weight: 500; color: var(--muted); }
.hint { margin-top: .25rem; font-size: .75rem; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; cursor: pointer; }
.check input { width: 1rem; height: 1rem; accent-color: var(--accent); }
.form-grid { display: grid; gap: .75rem; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.secret { position: relative; }
.secret .input { padding-right: 2.5rem; }
.secret button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); color: var(--muted); padding: .25rem; }

/* ------------------------------------------------------------------ badges, notes */
.badge { display: inline-flex; align-items: center; gap: .375rem; border-radius: 9999px; padding: .125rem .5rem;
  font-size: .75rem; font-weight: 500; line-height: 1rem; white-space: nowrap; background: var(--panel-2); color: var(--muted); }
.badge .dot, .dot { width: .375rem; height: .375rem; border-radius: 9999px; background: currentColor; display: inline-block; }
.badge-green { background: var(--profit-bg); color: var(--profit); }
.badge-red { background: var(--loss-bg); color: var(--loss); }
.badge-amber { background: var(--warn-bg); color: var(--warn); }
.badge-blue { background: var(--accent-bg); color: var(--accent); }
.badge-gray { background: var(--panel-2); color: var(--muted); }
.error-note { border-radius: .5rem; background: var(--loss-bg); color: var(--loss); padding: .5rem .75rem; font-size: .875rem; }
.warn-note { border-radius: .5rem; background: var(--warn-bg); color: var(--warn); padding: .5rem .75rem; font-size: .875rem; }
.ok-note { border-radius: .5rem; background: var(--profit-bg); color: var(--profit); padding: .5rem .75rem; font-size: .875rem; }
.empty { padding: 2rem 0; text-align: center; font-size: .875rem; color: var(--muted); }
.pos { color: var(--profit); } .neg { color: var(--loss); }

.spinner { width: .875rem; height: .875rem; border-radius: 9999px; border: 2px solid currentColor; border-top-color: transparent;
  display: inline-block; animation: spin .7s linear infinite; }
.spinner-lg { width: 1.75rem; height: 1.75rem; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.table th { padding: .5rem .75rem; text-align: left; font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .5rem .75rem; font-size: .875rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); vertical-align: middle; }
.table tbody tr:hover { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.table tr.clickable { cursor: pointer; }
.table .r { text-align: right; }
.table.compact td, .table.compact th { padding: .35rem .5rem; }

/* ------------------------------------------------------------------ tabs, stats, misc */
.tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tab { padding: .5rem .85rem; font-size: .875rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: .5rem; overflow: hidden; }
.seg button { padding: .35rem .7rem; font-size: .8rem; color: var(--muted); }
.seg button.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { border: 1px solid var(--border); border-radius: .75rem; background: var(--glass); padding: .85rem 1rem; backdrop-filter: blur(12px); }
.stat .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.stat .v { margin-top: .25rem; font-size: 1.35rem; font-weight: 600; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stat .s { margin-top: .125rem; font-size: .75rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1rem; font-size: .875rem; }
.kv dt { color: var(--muted); }
.code { font-family: var(--font-mono); font-size: .8rem; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: .5rem; padding: .75rem; white-space: pre-wrap; word-break: break-all; }
.chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--border); background: var(--panel-2);
  border-radius: 9999px; padding: .25rem .7rem; font-size: .8rem; }
.divider { height: 1px; background: var(--border); margin: 1rem 0; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 180px; }
.chart-box.lg { height: 340px; }
@keyframes flash-up { from { background-color: var(--profit-bg); } to { background-color: transparent; } }
@keyframes flash-down { from { background-color: var(--loss-bg); } to { background-color: transparent; } }
.flash-up { animation: flash-up .9s ease-out; }
.flash-down { animation: flash-down .9s ease-out; }

/* ------------------------------------------------------------------ app top navigation */
.topnav { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topnav-inner { max-width: 1600px; margin: 0 auto; height: 3.5rem; display: flex; align-items: center; gap: .5rem; padding: 0 1rem; }
@media (min-width: 768px) { .topnav-inner { padding: 0 1.5rem; } }
.topnav .side { flex: 1 1 0; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.topnav .side.end { justify-content: flex-end; }
.topnav nav.main { display: none; align-items: center; gap: .25rem; }
@media (min-width: 1100px) { .topnav nav.main { display: flex; } .topnav .burger { display: none; } }
.navtab { flex-shrink: 0; border-radius: .5rem; padding: .375rem .75rem; font-size: .875rem; color: var(--muted); display: inline-flex; align-items: center; gap: .25rem; }
.navtab:hover { background: var(--panel-2); color: var(--text); }
.navtab.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.dropdown { position: relative; }
.menu { position: absolute; top: calc(100% + .375rem); left: 50%; transform: translateX(-50%); z-index: 40; min-width: 14rem;
  border: 1px solid var(--border); border-radius: .75rem; background: var(--panel); padding: .375rem; box-shadow: var(--shadow-lg); }
.menu.right { left: auto; right: 0; transform: none; }
.menu a, .menu button.item { display: block; width: 100%; text-align: left; border-radius: .375rem; padding: .375rem .625rem; font-size: .875rem; }
.menu a:hover, .menu button.item:hover { background: var(--panel-2); }
.menu a.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.menu a.danger { color: var(--loss); }
.menu a.danger:hover { background: var(--loss-bg); }
.menu .sep { height: 1px; background: var(--border); margin: .375rem 0; }
.menu .group-label { padding: .375rem .625rem .125rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.avatar { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 9999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-fg); font-size: .7rem; font-weight: 700; }
.profile-btn { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--border); background: var(--panel); border-radius: 9999px; padding: .2rem .6rem .2rem .2rem; font-size: .875rem; }
.burger { border: 1px solid var(--border); border-radius: .5rem; padding: .45rem; }
.sheet { border-top: 1px solid var(--border); background: var(--panel); padding: .75rem 1rem; }
.sheet a { display: block; border-radius: .375rem; padding: .5rem; font-size: .875rem; }
.sheet a.active { background: var(--accent-bg); color: var(--accent); }
.caret { width: .75rem; height: .75rem; opacity: .7; transition: transform .15s; }
.open > .navtab .caret { transform: rotate(180deg); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-mark { width: 1.75rem; height: 1.75rem; }
.brand img { height: 30px; width: auto; }

/* ------------------------------------------------------------------ modal + toasts */
dialog.modal { margin: auto; border: 1px solid var(--border); border-radius: 1rem; background: var(--panel); color: var(--text);
  width: min(42rem, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 0; box-shadow: var(--shadow-lg); }
dialog.modal.wide { width: min(64rem, calc(100vw - 2rem)); }
dialog.modal::backdrop { background: rgb(0 0 0 / 0.55); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1rem; }
.modal-body { padding: 1.1rem; overflow-y: auto; max-height: calc(100vh - 10rem); }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .85rem 1.1rem; border-top: 1px solid var(--border); }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: grid; gap: .5rem; max-width: min(24rem, calc(100vw - 2rem)); }
.toast { border: 1px solid var(--border); background: var(--panel); border-radius: .65rem; padding: .65rem .85rem; font-size: .875rem;
  box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; border-left: 3px solid var(--accent); }
.toast.error { border-left-color: var(--loss); }
.toast.ok { border-left-color: var(--profit); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ public site */
.site-wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header .bar { height: 4rem; display: flex; align-items: center; gap: 1rem; }
.site-nav { margin-left: auto; display: none; gap: .25rem; }
.site-nav a { border-radius: .5rem; padding: .5rem .75rem; font-size: .875rem; color: var(--muted); }
.site-nav a:hover { color: var(--text); background: var(--panel); }
@media (min-width: 768px) { .site-nav { display: flex; } .site-burger { display: none; } }
.login-link { margin-left: auto; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-bg);
  color: var(--accent); border-radius: .5rem; padding: .5rem .9rem; font-size: .875rem; font-weight: 500; }
@media (min-width: 768px) { .login-link { margin-left: 0; } }
.login-link:hover { background: var(--accent); color: var(--accent-fg); }
.hero { padding: 6rem 0 1rem; }
@media (min-width: 640px) { .hero { padding-top: 8rem; } }
.eyebrow { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; color: var(--accent); }
.hero h1 { margin-top: 1rem; max-width: 50rem; font-size: clamp(2.25rem, 5.5vw, 4rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; }
.hero p.sub { margin-top: 1.25rem; max-width: 40rem; font-size: 1.125rem; color: var(--muted); }
.cta-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.cta { border-radius: .6rem; padding: .7rem 1.25rem; font-size: .9rem; font-weight: 600; }
.cta.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-fg); }
.cta.primary:hover { filter: brightness(1.08); }
.cta.secondary { border: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 60%, transparent); }
.cta.secondary:hover { border-color: var(--accent); color: var(--accent); }
.section { margin-top: 6rem; }
.section h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
.section .intro { margin-top: .75rem; max-width: 42rem; color: var(--muted); }
.tile { border: 1px solid var(--border); border-radius: .875rem; background: var(--glass); padding: 1.25rem;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .2s, transform .2s; }
a.tile:hover, .tile.hoverable:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile h3 { font-weight: 600; }
.tile p { margin-top: .5rem; font-size: .875rem; color: var(--muted); }
.tile .icon { width: 2.25rem; height: 2.25rem; border-radius: .6rem; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); margin-bottom: .85rem; }
.site-footer { margin-top: 6rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 40%, transparent); }
.ticker { display: flex; gap: 1.5rem; overflow-x: auto; padding: .75rem 1rem; scrollbar-width: thin; }
.ticker .sym { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.ticker .px { margin-top: .125rem; font-size: 1rem; font-weight: 600; font-family: var(--font-mono); }
.prose p { margin-top: .9rem; color: var(--muted); }
.prose h2 { margin-top: 1.75rem; font-size: 1.15rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* two-ink logos (an uploaded wordmark): show the one that reads on the current surface */
.logo-on-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-on-dark { display: none; }
  :root:not([data-theme="dark"]) .logo-on-light { display: inline-block; }
}
:root[data-theme="light"] .logo-on-dark { display: none; }
:root[data-theme="light"] .logo-on-light { display: inline-block; }

/* phone width: the bar holds brand + feed dot + avatar + burger only */
@media (max-width: 640px) {
  .topnav .side { flex: 0 1 auto; }
  .topnav .side.end { margin-left: auto; gap: .375rem; }
  .topnav .brand span { display: none; }
  #feed-pill .badge { font-size: 0; gap: 0; padding: .3rem; }
  #feed-pill .badge .dot { width: .5rem; height: .5rem; }
  .profile-btn { padding-right: .35rem; }
  .profile-btn .caret { display: none; }
}
.table th.text-center, .table td.text-center { text-align: center; }
.table th.text-right, .table td.text-right, .table th.r { text-align: right; }
.tile .hint { font-size: .75rem; margin-top: .25rem; }
.site-footer .site-wrap { padding-top: 3rem; padding-bottom: 3rem; }
.seg { flex-wrap: wrap; max-width: 100%; }
.seg button { flex: 1 0 auto; }

/* grid/flex children may shrink below their content (charts, long numbers): no sideways page scroll on phones */
.grid > *, .flex > * { min-width: 0; }
.chart-box { min-width: 0; }

/* large monitors: slightly bigger type and a wider public layout, so 2560px screens are not a strip of small text */
@media (min-width: 1920px) {
  html { font-size: 17px; }
  .site-wrap { max-width: 84rem; }
  .container { max-width: 1800px; }
}
@media (min-width: 2400px) {
  html { font-size: 18px; }
}
