/* Arthvyuh page kit (15 Oct 2026): the calm, consistent building blocks every workspace page uses.
   Page header (title, one-line purpose, one primary action), "at a glance" figures, pill tabs, a toolbar
   (search + filter chips + sort + view), refined cards and a quiet "more" menu. Built on the app.css tokens,
   so light and dark themes follow; phone first (one column under 760px, nothing scrolls sideways). */

/* ---- page header ------------------------------------------------------------------------------------------------ */
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 2px 0 18px; }
.pg-head h1 { margin: 0; font-size: 24px; letter-spacing: -.5px; }
.pg-head .pg-sub { margin: 4px 0 0; color: var(--text-2); font-size: 14px; max-width: 640px; }
.pg-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pg-actions .button, .pg-actions button { min-height: 38px; }
.pg-actions .quiet { border-color: transparent; background: transparent; color: var(--link); padding-left: 8px; padding-right: 8px; }
.pg-actions .quiet:hover { background: var(--inset); }
.btn-ico { display: inline-flex; align-items: center; gap: 6px; }
.btn-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---- at a glance ------------------------------------------------------------------------------------------------ */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.glance-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; min-width: 0; text-align: left;
  font: inherit; cursor: default; align-items: flex-start; justify-content: flex-start; min-height: 0; }
button.glance-card, a.glance-card { cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
button.glance-card:hover, a.glance-card:hover { border-color: var(--link); background: var(--surface); }
.glance-card .g-label { font-size: 12px; color: var(--text-2); white-space: normal; line-height: 1.35; }
.glance-card .g-value { font-size: 22px; font-weight: 500; letter-spacing: -.3px; line-height: 1.3; font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glance-card .g-sub { font-size: 12px; color: var(--text-2); }
.glance-card.attention { border-color: var(--warn); }
.glance-card.attention .g-label { color: var(--warn); }

/* ---- pill tabs ---------------------------------------------------------------------------------------------------- */
.pill-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--inset); border: 1px solid var(--border);
  margin-bottom: 18px; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tabs button { border: 0; border-radius: 9px; background: transparent; color: var(--text-2); min-height: 34px; padding: 6px 14px;
  font-weight: 400; white-space: nowrap; }
.pill-tabs button:hover { background: transparent; color: var(--text); }
.pill-tabs button.on, .pill-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 500;
  box-shadow: 0 1px 2px rgba(22, 32, 46, .08); border-bottom-color: transparent; }
:root[data-theme="dark"] .pill-tabs button.on { color: var(--text); }

/* ---- toolbar ------------------------------------------------------------------------------------------------------ */
.kit-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.kit-toolbar .grow { flex: 1 1 auto; }
.kit-search { position: relative; flex: 0 1 300px; min-width: 200px; }
.kit-search input { width: 100%; padding-left: 34px; min-height: 38px; margin: 0; }
.kit-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-2);
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.kit-select { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.kit-select select { width: auto; min-height: 34px; }
.kit-count { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.view-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.view-switch button { border: 0; border-radius: 0; min-height: 32px; padding: 4px 10px; background: var(--surface); color: var(--text-2); font-size: 13px; }
.view-switch button + button { border-left: 1px solid var(--border); }
.view-switch button[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-text); font-weight: 500; }

/* ---- calm cards --------------------------------------------------------------------------------------------------- */
.kit-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 16px; }
.kit-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease; min-width: 0; }
.kit-card:hover { border-color: color-mix(in srgb, var(--link) 35%, var(--border)); box-shadow: 0 6px 18px rgba(22, 32, 46, .06); }
.kit-card .k-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kit-card .k-title { font-size: 16px; font-weight: 500; letter-spacing: -.15px; line-height: 1.35; overflow-wrap: anywhere; margin: 0; }
.kit-card .k-by { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.kit-card .k-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.kit-card .k-figure { font-size: 22px; font-weight: 500; letter-spacing: -.3px; font-variant-numeric: tabular-nums lining-nums; line-height: 1.2; }
.kit-card .k-figure small { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--text-2); margin-top: 2px; }
.kit-card .k-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 13px; margin: 0; }
.kit-card .k-facts div { min-width: 0; }
.kit-card .k-facts span { display: block; color: var(--text-2); font-size: 12px; }
.kit-card .k-facts b { font-weight: 400; font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere; }
.kit-card .k-legs { display: flex; flex-direction: column; gap: 6px; }
.kit-card .k-legs div { background: var(--inset); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.kit-card .k-legs .more { background: none; padding: 0; }
.kit-card .k-note { font-size: 12px; color: var(--text-2); margin: 0; }
.kit-card .k-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.kit-card .k-actions > .primary, .kit-card .k-actions > .grow { flex: 1; }
.kit-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 99px;
  border: 1px solid var(--border); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.kit-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--control); }
.kit-tag.t-time i { background: #6366F1; } .kit-tag.t-indicator i { background: #0EA5E9; } .kit-tag.t-signal i { background: #F59E0B; }
.kit-tag.t-stock i { background: #10B981; } .kit-tag.t-template i { background: #8B5CF6; } .kit-tag.t-upload i { background: #64748B; }

/* compact list view */
.kit-rows { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.kit-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 14px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border); }
.kit-row:last-child { border-bottom: 0; }
.kit-row:hover { background: var(--inset); }
.kit-row .r-name { font-weight: 500; overflow-wrap: anywhere; }
.kit-row .r-sub { font-size: 12px; color: var(--text-2); }
.kit-row .r-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }

/* section heads inside a list (portfolios ...) */
.kit-section { margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.kit-section h2 { margin: 0; font-size: 15px; }
.kit-section .kit-count { margin: 0; }

/* gentle notice */
.kit-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--inset); color: var(--text-2); font-size: 13px; margin-bottom: 14px; }
.kit-note.warn { border-color: var(--warn); background: var(--warn-fill); color: var(--text); }

@media (max-width: 760px) {
  .pg-head h1 { font-size: 21px; }
  .pg-head .pg-sub { font-size: 13px; }               /* kept on phones: some pages say "no real order is placed" here */
  .pg-head { margin-bottom: 14px; }
  .pg-actions { width: 100%; }
  .pg-actions > .primary { flex: 1; }
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .glance-card { padding: 12px; }
  .glance-card .g-value { font-size: 18px; }
  .glance-card .g-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .kit-select > span { display: none; }
  .pill-tabs { display: flex; }
  .pill-tabs button { flex: 1; padding: 6px 10px; }
  .kit-search { flex: 1 1 100%; }
  .kit-card { padding: 16px; }
  .kit-row { grid-template-columns: minmax(0, 1fr) auto; }
  .kit-row .r-hide { display: none; }
}
/* Narrow phones (Part C, 17 Oct 2026): a tab bar wider than the screen wraps to a second row instead of cutting its last
   tab at the edge; wider screens are unchanged. */
@media (max-width: 420px) { .pill-tabs { flex-wrap: wrap; row-gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .kit-card, .glance-card { transition: none; } }

/* ==== UI redesign, step 1 (18 Oct 2026, owner OK): one scale for the whole site ==========================   The same token names and numbers as visitor.css (UI builder 1), so both halves of the site match. Defining
   them changes nothing on its own; pages adopt them step by step. Colours and fonts are untouched. */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --t-body: 17px; --t-small: 15px; --t-h3: 20px; --t-h2: clamp(26px, 3vw, 34px); --t-h1: clamp(36px, 6vw, 60px);
  --radius: 14px; --radius-s: 10px; --measure: 64ch; --gutter: 20px; --page: 1120px;
  --t-title: 32px; --t-figure: 40px; --t-table: 16px; --tap: 48px;      /* app pages: page title, money figure, tables, taps */
}
@media (max-width: 760px) { :root { --t-title: 26px; --t-figure: 36px; } }
@media (max-width: 400px) { :root { --gutter: 16px; } }

/* Contrast (WCAG 1.4.11, approved 18 Oct): the --control grey is 2.95:1 on white, under the 3:1 a field edge needs,
   so field edges and the off state of switches use the existing --text-2 (6:1). Dark mode already passed. */
/* same weight as app.css's "input, select, textarea" rule (later file wins), so its :hover, :disabled and
   [aria-invalid] states still win over this one */
input:where(:not([type=checkbox]):not([type=radio]):not([type=range])), select, textarea { border-color: var(--text-2); }
.seg { border-color: var(--text-2); }
.switch:not(.on) { box-shadow: inset 0 0 0 1.5px var(--text-2); }

/* ---- kit pieces for the redesigned pages (opt-in: nothing uses them until a page does) ---------------------- */
.ui-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.ui-title { margin: 0; font-size: var(--t-title); font-weight: 500; letter-spacing: -.6px; line-height: 1.2; }
.ui-lead { margin: var(--s1) 0 0; color: var(--text-2); font-size: var(--t-body); max-width: var(--measure); }
.ui-figure { font-size: var(--t-figure); font-weight: 500; letter-spacing: -1px; line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; }
.ui-small { font-size: var(--t-small); color: var(--text-2); }
/* one notice, said once, where the fix is */
.ui-attn { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s5); border-radius: var(--radius);
  background: var(--warn-fill); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); color: var(--text); }
.ui-attn p { margin: 0; flex: 1; }
/* a state in words with a dot: "Running", "Paused", "Waiting for FYERS" */
.ui-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--control); flex: none; }
.ui-dot.ok { background: var(--pos); } .ui-dot.warn { background: var(--warn); }
.ui-dot.run { background: var(--pos); box-shadow: 0 0 0 3px var(--pos-fill); }
.ui-state { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-small); color: var(--text-2); }
.ui-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 8px; background: var(--inset); color: var(--text);
  font-size: var(--t-small); }
.ui-tag.live { background: var(--sel-bg); color: var(--sel-text); font-weight: 500; }
/* a few figures in one strip, split by thin lines (in place of several equal boxes) */
.ui-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ui-strip > div { display: flex; flex-direction: column; min-width: 0; padding: var(--s4) var(--s5); }
.ui-strip > div + div { border-left: 1px solid var(--border); }
.ui-strip b { font-size: 28px; font-weight: 500; letter-spacing: -.4px; line-height: 1.3; font-variant-numeric: tabular-nums lining-nums; }
/* rows: a quiet list split by thin lines */
.ui-rows { list-style: none; margin: 0; padding: 0; }
.ui-rows > li + li { border-top: 1px solid var(--border); }
/* a progress bar against a limit */
.ui-meter { height: 10px; border-radius: 99px; background: var(--inset); overflow: hidden; }
.ui-meter > i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.ui-meter.near > i { background: var(--warn); }
/* stepper: minus, the value, plus */
.ui-stepper { display: inline-flex; align-items: center; border: 1px solid var(--text-2); border-radius: var(--radius-s); background: var(--surface); }
.ui-stepper button { width: var(--tap); height: var(--tap); min-height: 0; border: 0; border-radius: var(--radius-s); background: transparent; font-size: 22px; padding: 0; }
.ui-stepper output { min-width: 96px; text-align: center; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
/* a destructive action as quiet red text, away from the everyday buttons (the confirm dialog stays) */
.ui-danger-link { border-color: transparent; background: transparent; color: var(--neg); }
.ui-danger-link:hover { background: var(--neg-fill); }
@media (max-width: 760px) {
  .ui-attn { flex-wrap: wrap; padding: var(--s4); } .ui-attn > .button, .ui-attn > button { width: 100%; }
  .ui-strip { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } .ui-strip > div { padding: var(--s3) var(--s4); }
  .ui-strip > div:nth-child(odd) { border-left: 0; } .ui-strip > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .ui-strip b { font-size: 24px; }
}

/* ==== UI redesign, step 2: the app shell (owner OK 18 Oct 2026) =======================================   Bigger reading text, a calm menu that marks your page softly, plain group names, one sentence about the market,
   and the Arthvyuh guide's "?" menu. Existing colour tokens only. */
body { font-size: var(--t-body); }
.nav-section { margin: 18px 12px 4px; font-size: var(--t-small); letter-spacing: 0; }
aside nav a { min-height: 42px; margin-bottom: 2px; border-radius: var(--radius-s); color: var(--text); font-size: 16px; }
aside nav a svg.icon { color: var(--text-2); }
aside nav a.on { background: var(--sel-bg); color: var(--sel-text); }
aside nav a.on svg.icon { color: var(--sel-text); }
.user { font-size: var(--t-small); }
.user .who { min-height: 52px; border-radius: var(--radius-s); padding: 4px 6px; margin: 0 -6px; }
.user .who:hover { background: var(--inset); }
.user .who b { font-size: 15px; }
.user .who small, .user .admin { font-size: var(--t-small); }

/* top bar: the market in one sentence; FYERS only when it needs you */
.topbar .status { align-items: center; gap: var(--s3); }
.top-line { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-small); color: var(--text-2); }
.top-line i, .top-need i { width: 8px; height: 8px; border-radius: 50%; background: var(--control); flex: none; }
.top-line.ok i { background: var(--pos); }
.top-need { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s3); border-radius: 99px;
  background: var(--warn-fill); color: var(--warn); font-size: var(--t-small); font-weight: 500; text-decoration: none; white-space: nowrap; }
.top-need i { background: var(--warn); }
.top-need:hover { text-decoration: underline; }
.topbar .tools { position: relative; }

/* the guide's "?" menu (guide.js opens it) */
.guide-button[aria-expanded="true"] { background: var(--sel-bg); color: var(--sel-text); }
.guide-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: min(300px, calc(100vw - 24px)); padding: var(--s4);
  border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(22, 32, 46, .16); }
.guide-menu[hidden] { display: none; }
.guide-menu .gm-title { margin: 0; font-size: 16px; font-weight: 500; }
.guide-menu .gm-text { margin: var(--s1) 0 var(--s3); color: var(--text-2); font-size: var(--t-small); line-height: 1.45; }
.guide-menu .gm-phone { display: none; }
.guide-menu .gm-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); }
.gm-switch { min-height: var(--tap); padding: 0 4px; border: 0; background: transparent; }
.gm-switch[aria-checked="false"] .switch { background: var(--control); box-shadow: inset 0 0 0 1.5px var(--text-2); }
.gm-switch[aria-checked="false"] .switch::after { left: 3px; }

/* BIRBAL's button never sits on the last line of a page (phones already have this room) */
@media (min-width: 901px) { body:has(#birbal-launcher) .page { padding-bottom: 80px; } }
@media (max-width: 900px) {
  .guide-menu .gm-desk { display: none; } .guide-menu .gm-phone { display: inline; }
  .bottom-nav a, .bottom-nav button { font-size: 13px; }
  .bottom-nav .on { color: var(--sel-text); }
  .bottom-nav .on svg.icon { background: var(--sel-bg); border-radius: 99px; width: 56px; height: 30px; padding: 4px 17px; box-sizing: border-box; }
}

/* ==== Text floor (product lead, 18 Oct 2026): nothing a person reads on a signed-in page is under 15 px    Icon glyphs (ticks, the "?" badge, kbd, unread counts) are not reading text. Sizes only; no colours change. */
body:not([data-signed-out]) footer.legal { font-size: var(--t-small); line-height: 1.6; }
body:not([data-signed-out]) .help, body:not([data-signed-out]) .muted, body:not([data-signed-out]) .kit-count,
body:not([data-signed-out]) .stat .label, body:not([data-signed-out]) span.label, body:not([data-signed-out]) label,
body:not([data-signed-out]) .check { font-size: var(--t-small); }
body:not([data-signed-out]) button, body:not([data-signed-out]) .button { font-size: 16px; }
body:not([data-signed-out]) button.small, body:not([data-signed-out]) .button.small,
body:not([data-signed-out]) .page-finder-button { font-size: var(--t-small); }
body:not([data-signed-out]) input:where(:not([type=checkbox]):not([type=radio])), body:not([data-signed-out]) select,
body:not([data-signed-out]) textarea { font-size: 16px; }
.menu-body button.menu-item { font-size: var(--t-small); }
.ui-attn { font-size: var(--t-body); }
.state, .state strong { font-size: var(--t-small); }
.workspace-guide summary, .workspace-guide li, .workspace-guide a, details.workspace-sample, details.workspace-sample summary { font-size: var(--t-small); }
.pill-tabs button { font-size: 16px; }
.chips button { font-size: var(--t-small); }
.glance-card .g-label, .glance-card .g-sub, .kit-card .k-by, .kit-card .k-facts span, .kit-card .k-note, .kit-card small,
.kit-card .k-figure small, .kit-tag, .kit-row .r-sub, .pg-actions .quiet { font-size: var(--t-small); }
.pg-head .pg-sub { font-size: var(--t-body); }
.risk-modal ul.risk-points li, .risk-modal .help, .risk-modal .check { font-size: var(--t-small); }
body #birbal-launcher { font-size: 15px; }
@media (max-width: 760px) { .pg-head .pg-sub { font-size: var(--t-small); } .pill-tabs button { font-size: 15px; } }
@media (max-width: 900px) { .bottom-nav a, .bottom-nav button { font-size: 15px; letter-spacing: -.2px; } }
/* 320 px phones: the guide button made the top bar 6 px too wide; tighter gaps keep the 44 px buttons */
@media (max-width: 360px) { .topbar .tools { gap: 2px; } }
/* ...and on a touch phone the icon buttons are 44 px (coarse pointer), which made it 14 px too wide again (release 42
   look check, 19 Oct 2026): a slimmer gap and Find button keep all three on a 320 px screen, text still 15 px */
@media (max-width: 360px) { .topbar { gap: 6px; } .topbar .tools { gap: 0; } body .topbar .page-finder-button { padding: 4px 6px !important; } }
/* text floor, continued (batch 3, 18 Oct 2026): the shared capital chart's lines and the note box, on every signed-in page */
body:not([data-signed-out]) :is(.history-details, .history-comparisons, .history-caption, .history-date, .history-ranges button, .note) { font-size: var(--t-small); }

/* ==== Phone fit (release 42, UI builder 1's look check and 3's naming rule, 19 Oct 2026) ====================   Each phone-bar slot is as wide as its own label (measured: all five labels fit a 320 px screen at 15 px), so no label
   is cut, wraps or pushes the page sideways; one bar height whether or not an item is selected; the page bottom clears
   the bar so the footer's last row can be tapped; the footer at 15 px with 44 px taps (its words unchanged). */
@media (max-width: 900px) {
  .bottom-nav { display: flex; }
  .bottom-nav a, .bottom-nav button { flex: 1 0 auto; white-space: nowrap; padding-left: 2px; padding-right: 2px; }
  .bottom-nav svg.icon { height: 30px; padding: 4px 0; box-sizing: border-box; }          /* the same box as the selected pill */
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
footer.legal { font-size: var(--t-small); line-height: 1.6; }
footer.legal a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 900px) { footer.legal { font-size: var(--t-small); } }

/* ---- Wide screens (19 Oct 2026, owner request): the signed-in pages stop at 1600 px on very wide screens and sit in the middle,
   like the Home page; the simulator keeps the whole window. ---- */
@media (min-width: 1800px) { body[data-page]:not([data-page="simulator"]) main { max-width: 1600px; margin-inline: auto; } }
/* Release 44 (Tester A's preview of 43, 19 Oct 2026): a link inside a sentence, list or table cell has a 44 px tap area on a phone, with the
   page's lines where they were (the padding is cancelled by the margin). Buttons and chips already size themselves. */
@media (max-width: 760px), (pointer: coarse) {
  body[data-page] main :is(p, li, dd, td, .help, .kit-note, .workspace-guide) a:not(.button):not(.sup-btn):not(.hp-faq) { display: inline-block; padding-block: 13px; margin-block: -13px; }
}
@media (max-width: 760px), (pointer: coarse) { body[data-page] main a.pill { display: inline-flex; align-items: center; min-height: var(--tap); } }

/* ==== Layout stability (29 Oct 2026): nothing may jump while a page fills in ==================================
   The areas a script fills after the page has drawn are at least as tall as what is left of the screen, so the footer and
   the boxes under them start below the fold and cannot be pushed into view. The text swap of the Inter font is covered by
   the metric-matched stand-in in app.css and the preload in base.html. */
body[data-page="strategies"] #list, body[data-page="builder"] #builder, body[data-page="paper"] #paper, body[data-page="model"] #model,
body[data-page="etf-portfolio"] .etf-page { min-height: calc(100vh - 200px); min-height: calc(100svh - 200px); }
