/* mrktpro's public pages: mobile first, system fonts, light and dark, no script. The tokens are the dashboard's (concept v2, app.css), so a public page and the app are one language. */

:root {
  --bg: #eef1f6;
  --panel: #ffffff;
  --panel-2: #f3f5f9;
  --line: rgba(16, 24, 40, 0.12);
  --line-2: rgba(16, 24, 40, 0.24);
  --sheen: rgba(255, 255, 255, 0.9);
  --text: #141a24;
  --muted: #556070;
  --accent: #0b6e8f;
  --accent-bg: #e7f0f4;
  --accent-text: #ffffff;
  --pos: #0a7a40;
  --neg: #bd2c2a;
  --watch: #a45708;
  --pos-bg: #e6f2ec;
  --neg-bg: #f8eaea;
  --watch-bg: #f6eee6;
  --shadow: 0 10px 28px -18px rgba(16, 24, 40, 0.35);
  --band1: #e07a76;
  --band2: #eda89d;
  --band3: #c9ced8;
  --band4: #8fcaa3;
  --band5: #4fae76;
  --radius: 14px;
  --radius-sm: 10px;
  --fs-label: 12px; --fs-data: 13px; --fs-body: 14px; --fs-head: 15px; --fs-h1: 22px; --fs-hero: 30px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080c13;
    --panel: #0e141d;
    --panel-2: #141c29;
    --line: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.18);
    --sheen: rgba(255, 255, 255, 0.07);
    --text: #e8eef7;
    --muted: #9fadc1;
    --accent: #5ad1ff;
    --accent-bg: #182d3a;
    --accent-text: #080c13;
    --pos: #3fd68f;
    --neg: #ff6b6e;
    --watch: #f2b84b;
    --pos-bg: #152f2d;
    --neg-bg: #302028;
    --watch-bg: #2e2b23;
    --shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.85);
    --band1: #a8403d;
    --band2: #b0675d;
    --band3: #4b5567;
    --band4: #3d8a5b;
    --band5: #2f9a5f;
  }
}
:root[data-theme="dark"] {
  --bg: #080c13;
  --panel: #0e141d;
  --panel-2: #141c29;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --sheen: rgba(255, 255, 255, 0.07);
  --text: #e8eef7;
  --muted: #9fadc1;
  --accent: #5ad1ff;
  --accent-bg: #182d3a;
  --accent-text: #080c13;
  --pos: #3fd68f;
  --neg: #ff6b6e;
  --watch: #f2b84b;
  --pos-bg: #152f2d;
  --neg-bg: #302028;
  --watch-bg: #2e2b23;
  --shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.85);
  --band1: #a8403d;
  --band2: #b0675d;
  --band3: #4b5567;
  --band4: #3d8a5b;
  --band5: #2f9a5f;
}

/* Light, dark or the device's own: the page's <html data-theme="light|dark"> is the person's choice (theme.js sets it before anything paints) and no
   attribute means "follow the device". Every dark rule is therefore written twice, by scripts/theme-codemod.mjs: once for a dark device that has not
   chosen light, and once for the dark choice. Component rules carry the prefix inside :where() so they keep the specificity they always had. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fs-body)/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
/* The type scale (concept v2): one h1 size at every width, h2 the card title's, labels 12 px. */
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: var(--fs-h1); font-weight: 650; letter-spacing: -0.015em; margin-bottom: 4px; }
h2 { font-size: var(--fs-head); font-weight: 600; margin: 28px 0 10px; }
h3 { font-size: var(--fs-body); font-weight: 600; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
ul { margin: 0 0 10px; padding-inline-start: 20px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: var(--fs-data); color: var(--muted); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { top: 8px; }

header.site { background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.mark { width: 24px; height: 24px; border-radius: 7px; background: url("/icon.svg") center / cover no-repeat; display: inline-block; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .mark { background-image: url("/icon-on-dark.svg"); }
}
:where(:root[data-theme="dark"]) .mark { background-image: url("/icon-on-dark.svg"); }
header.site nav { display: flex; gap: 4px; flex-wrap: wrap; }
header.site nav a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: var(--radius-sm); min-height: 44px; display: inline-flex; align-items: center; }
header.site nav a:hover { background: var(--panel-2); }
header.site nav a[aria-current="page"] { font-weight: 700; background: var(--panel-2); }
/* Sign in stays the header's filled button: on a page with registration closed it is a signed-out visitor's only action. */
header.site nav a.signin { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-text); font-weight: 600; }
header.site nav a.signin:hover { background: var(--accent); filter: brightness(0.92); }

main { padding-top: 28px; padding-bottom: 8px; }
.lede { color: var(--muted); margin-bottom: 14px; }
.crumbs { font-size: var(--fs-data); color: var(--muted); margin-bottom: 8px; }
.kind { color: var(--muted); margin-bottom: 14px; }
.sym { font-family: var(--mono); font-size: 0.7em; color: var(--muted); font-weight: 500; margin-inline-start: 4px; }

/* The one card (concept v2): the panel, a 1 px edge, radius 14, the 1 px sheen on top and the one shadow. */
.card { background: linear-gradient(180deg, var(--sheen), transparent 2px), var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.two { display: grid; gap: 14px; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }

.headline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.big { font-size: var(--fs-hero); font-weight: 650; letter-spacing: -0.02em; }
.label { font-size: var(--fs-head); font-weight: 600; }
.cur { color: var(--muted); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.flat { color: var(--muted); }
.asof { color: var(--muted); font-size: var(--fs-data); }
.src { color: var(--muted); font-size: var(--fs-data); margin: 10px 0 0; }
.unavailable { background: var(--watch-bg); border: 1px solid var(--line); border-inline-start: 4px solid var(--watch); border-radius: var(--radius-sm); padding: 10px 12px; }
.stale { background: var(--watch-bg); border-radius: var(--radius-sm); padding: 8px 12px; font-size: var(--fs-data); }
.ok { background: var(--pos-bg); border-radius: var(--radius-sm); padding: 10px 12px; }
.error { background: var(--neg-bg); border-radius: var(--radius-sm); padding: 10px 12px; }

.gauge { display: block; width: 100%; max-width: 360px; height: auto; }
.gauge .b1 { fill: var(--band1); } .gauge .b2 { fill: var(--band2); } .gauge .b3 { fill: var(--band3); } .gauge .b4 { fill: var(--band4); } .gauge .b5 { fill: var(--band5); }
.gauge .marker { fill: var(--text); }
.scale { display: flex; justify-content: space-between; max-width: 360px; font-size: var(--fs-label); color: var(--muted); margin: 2px 0 8px; }

.factors { list-style: none; padding: 0; }
.factors li { padding: 8px 0; border-top: 1px solid var(--line); }
.score { display: inline-block; min-width: 2em; text-align: center; font-weight: 700; border-radius: 6px; padding: 0 6px; background: var(--panel-2); }
.score.pos { background: var(--pos-bg); } .score.neg { background: var(--neg-bg); }

/* A table wider than its card scrolls inside it: a shadow at the edge where there is more (concept v2: nothing scrolls inside a card without a visible hint; the dashboard's rule). The two cover layers move with the content and hide the shadow at either end, so a table that fits shows nothing; the sides are tokens the right-to-left rule flips. */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card .scroll { --wrap-start: left; --wrap-end: right; background: linear-gradient(to var(--wrap-end), var(--panel) 30%, transparent) var(--wrap-start) / 40px 100% no-repeat local, linear-gradient(to var(--wrap-start), var(--panel) 30%, transparent) var(--wrap-end) / 40px 100% no-repeat local, linear-gradient(to var(--wrap-end), color-mix(in srgb, var(--text) 14%, transparent), transparent) var(--wrap-start) / 12px 100% no-repeat scroll, linear-gradient(to var(--wrap-start), color-mix(in srgb, var(--text) 14%, transparent), transparent) var(--wrap-end) / 12px 100% no-repeat scroll; }
html[dir="rtl"] .card .scroll { --wrap-start: right; --wrap-end: left; }
/* Tables (concept v2): 13 px, tabular numerals, a 12 px uppercase muted header, 36 px rows. */
table { border-collapse: collapse; width: 100%; font-size: var(--fs-data); }
th, td { padding: 8px 8px; line-height: 20px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: normal; }
thead th { font-size: var(--fs-label); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
tbody th { font-weight: 600; }
.r { text-align: end; white-space: nowrap; }
.name { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.bar { display: inline-block; width: 60px; height: 8px; margin-inline-start: 6px; vertical-align: middle; }
@media (max-width: 560px) {
  svg.bar { display: none; }
  th, td { padding: 8px 5px; }
  tbody th .name { display: block; }
}
abbr[title] { text-decoration: none; }
svg.bar .axis { fill: var(--line); } svg.bar .up { fill: var(--pos); } svg.bar .down { fill: var(--neg); }

.events { list-style: none; padding: 0; }
.events li { padding: 8px 0; border-top: 1px solid var(--line); }
.when { display: inline-block; min-width: 6.5em; color: var(--muted); font-size: var(--fs-data); }
/* Chips (concept v2): 24 px pills, a tint with text in the same hue. */
.imp { display: inline-flex; align-items: center; min-height: 24px; font-size: var(--fs-label); font-weight: 500; border-radius: 999px; padding: 0 10px; background: var(--panel-2); color: var(--muted); }
.imp.high { background: var(--watch-bg); color: var(--watch); font-weight: 600; }

.chart { margin: 0; }
.chart-svg { display: block; width: 100%; max-width: 640px; height: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-svg .tick { fill: var(--muted); font-size: 12px; font-family: var(--font); }
@media (min-width: 700px) { .chart-svg .tick { font-size: 8px; } }
.chart-svg .area { fill: var(--accent); opacity: 0.1; stroke: none; }
.chart-svg .close { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-svg .sma50 { fill: none; stroke: var(--watch); stroke-width: 1.5; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.chart-svg .sma200 { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 1 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
figcaption { font-size: var(--fs-data); color: var(--muted); margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-top: 6px; }
.sw { display: inline-block; width: 22px; height: 0; border-top: 2px solid; margin-inline-end: 4px; vertical-align: middle; }
.sw.close { border-color: var(--accent); border-top-width: 3px; }
.sw.sma50 { border-color: var(--watch); border-top-style: dashed; }
.sw.sma200 { border-color: var(--muted); border-top-style: dotted; border-top-width: 3px; }
.numbers { margin-top: 10px; }
.numbers summary { cursor: pointer; padding: 12px 0; color: var(--accent); }
.numbers table { max-width: 360px; }

.defs { margin: 0; display: grid; gap: 0; }
.defs > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); }
.defs dt { color: var(--muted); }
.defs dd { margin: 0; text-align: end; font-weight: 600; }
@media (min-width: 720px) { .defs { grid-template-columns: 1fr 1fr; column-gap: 32px; } }

.signals { list-style: none; padding: 0; }
.signals li { padding: 10px 0; border-top: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; min-height: 24px; font-size: var(--fs-label); font-weight: 500; border-radius: 999px; padding: 0 10px; margin-inline-end: 6px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.chip.positive { background: var(--pos-bg); color: var(--pos); }
.chip.negative { background: var(--neg-bg); color: var(--neg); }
.chip.watch { background: var(--watch-bg); color: var(--watch); }
.caveats { margin-top: 24px; }
.caveats li { margin-bottom: 6px; color: var(--muted); }

.symlist { list-style: none; padding: 0; display: grid; gap: 4px 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.symlist a { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; padding: 6px 8px; border-radius: var(--radius-sm); text-decoration: none; min-height: 44px; }
.symlist a:hover { background: var(--panel-2); }
.symlist b { color: var(--text); }
.count { font-size: var(--fs-label); color: var(--muted); font-weight: 400; }

.invite { margin-top: 32px; }
.invite-form .field { margin-bottom: 12px; }
.invite-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.opt { font-weight: 400; color: var(--muted); }
.invite-form input[type="text"] { width: 100%; max-width: 520px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--muted); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); font: inherit; font-size: 16px; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Buttons (concept v2): the primary is the filled accent, 600; `.alt` is the outline one; both 44 px. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.alt { background: var(--panel); border-color: var(--line-2); color: var(--text); font-weight: 500; }
.btn:hover { text-decoration: none; filter: brightness(0.92); }

footer.site { margin-top: 36px; padding: 20px 0 40px; border-top: 1px solid var(--line); color: var(--muted); }
.legal { color: var(--text); }

/* Right to left (a Hebrew page is <html dir="rtl">; docs/i18n.md). Everything above is written with start and end, so the page mirrors by itself. What follows keeps
   what must not mirror: the drawings and scales (a time axis and a gauge run left to right), numbers and tickers (each in a run of its own, so a sign and a percent
   stay on the right side of the digits), and what is typed left to right. Uppercase does nothing in Hebrew, so a header's tracking is off too. */
html[dir="rtl"] :is(svg, .gauge, .chart-svg, .scale) { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] :is(.sym, .pos, .neg, .flat, .big, .cur, code) { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] :is(.pos, .neg, .flat, .big, .score) { text-align: left; }
html[dir="rtl"] td.r { unicode-bidi: plaintext; }
html[dir="rtl"] td.r { text-align: left; }
html[dir="rtl"] th.r { text-align: left; }
html[dir="rtl"] thead th { letter-spacing: 0; }
html[dir="rtl"] .name { unicode-bidi: plaintext; }
html[dir="rtl"] .invite-form input[name="contact"] { direction: ltr; unicode-bidi: isolate; text-align: right; }
html[dir="rtl"] .invite-form input[name="note"] { unicode-bidi: plaintext; }
/* "עברית / English" in the footer: the language that is shown is marked; each is a 44 px target. */
.langs a { display: inline-flex; align-items: center; min-height: 44px; }
.langs [aria-current] { color: var(--text); font-weight: 600; text-decoration: none; }

/* The notice "How mrktpro works, and where it can be wrong" (/notice): the three plain sentences at its head. */
.notice-short { padding-inline-start: 1.2em; margin: 8px 0 18px; }
.notice-short li { margin: 6px 0; font-weight: 600; }
.notice-tap { display: inline-block; padding: 13px 4px; }
