/* Hissado Market – light and dark themes, in the Hissado brand system (navy #011631 · gold #BB801D · ivory #F7F4EE;
   headings Montserrat, text Inter – the same as hissadoconsulting.com) */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 400; src: url(/static/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 500; src: url(/static/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 600; src: url(/static/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 700; src: url(/static/fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 600; src: url(/static/fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 700; src: url(/static/fonts/montserrat-latin-700-normal.woff2) format('woff2'); }
:root {
  --navy: #011631; --navy-2: #0A2446; --navy-3: #16345E; --gold: #BB801D; --gold-lt: #D9A24A; --gold-dk: #9A6A14; --gold-tint: #F6EEDF;
  --f-head: 'Montserrat', 'Inter', system-ui, sans-serif; --f-body: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #F7F4EE; --panel: #FFFFFF; --text: #011631; --muted: #5B6578; --line: #E6E1D6;
  --nav-bg: rgba(255,255,255,.96); --nav-text: #011631; --nav-line: #E6E1D6; --head: #011631; --head-text: #FFFFFF;
  --accent: #9A6A14; --accent-weak: #F6EEDF; --focus: #BB801D; --link: #9A6A14; --input: #FFFDF8; --input-line: #D9CBB0;
  --btn: #BB801D; --btn-text: #011631; --btn-hover: #011631; --btn-hover-text: #FFFFFF; --btn2-line: #011631;
  --g-bg: #D7F0E1; --g-tx: #0B5E36; --a-bg: #FFF1C7; --a-tx: #7A5300; --r-bg: #FAD4D2; --r-tx: #8C1D18; --n-bg: #EEF0F3; --n-tx: #5B6472;
  --pos: #0B7A43; --neg: #B42318; --shadow: 0 1px 2px rgba(1,22,49,.06), 0 2px 8px rgba(1,22,49,.04);
  --ma20: #BB801D; --ma50: #2563EB; --ma200: #9333EA; --close: #0A2446; --area: rgba(10,36,70,.07); --grid: #ECE7DD; --entry: #16345E;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #011631; --panel: #0A2446; --text: #F2F4F8; --muted: #A9B4C7; --line: #1C3A63;
  --nav-bg: rgba(1,22,49,.96); --nav-text: #FFFFFF; --nav-line: #16345E; --head: #16345E; --head-text: #FFFFFF;
  --accent: #D9A24A; --accent-weak: rgba(187,128,29,.16); --focus: #D9A24A; --link: #D9A24A; --input: #0E2B52; --input-line: #2C4C7A;
  --btn: #BB801D; --btn-text: #011631; --btn-hover: #FFFFFF; --btn-hover-text: #011631; --btn2-line: rgba(255,255,255,.5);
  --g-bg: #0F3B27; --g-tx: #8EE3B5; --a-bg: #3D2F0A; --a-tx: #F5CF6B; --r-bg: #46181A; --r-tx: #F7A3A0; --n-bg: #16345E; --n-tx: #C3CADB;
  --pos: #5FD49A; --neg: #FF8B85; --shadow: none;
  --ma20: #D9A24A; --ma50: #60A5FA; --ma200: #C084FC; --close: #FFFFFF; --area: rgba(255,255,255,.06); --grid: #16345E; --entry: #8FB3E8;
} }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--f-body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; } h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; } h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 8px; z-index: 99; background: var(--panel); padding: 6px 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--gold); color: #fff; }

/* header – white bar with the logo, like hissadoconsulting.com (navy in dark mode) */
header.top { background: var(--nav-bg); color: var(--nav-text); border-bottom: 1px solid var(--nav-line); position: sticky; top: 0; z-index: 20;
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
.bar { display: flex; align-items: center; gap: 14px; padding: 0 20px; min-height: 64px; max-width: 1480px; margin: 0 auto; }
.brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.brand img { display: block; height: 44px; width: auto; }
.main-nav { display: flex; gap: 0; align-items: center; flex: 1; flex-wrap: wrap; }
.main-nav .mob { display: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a, .main-nav summary { color: var(--nav-text); font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: .01em; text-decoration: none;
  padding: 10px 9px; white-space: nowrap; cursor: pointer; list-style: none; position: relative; transition: color .2s; }
.main-nav a::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 4px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .3s cubic-bezier(.22,1,.36,1); }
.main-nav a:hover, .main-nav summary:hover, .main-nav a[aria-current="page"], .dd.current > summary { color: var(--accent); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav summary::-webkit-details-marker, .account summary::-webkit-details-marker { display: none; }
.main-nav summary::after { content: " ▾"; font-size: .8em; }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 4px); left: 0; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 32px rgba(1,22,49,.14); min-width: 200px; padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.dd-menu.right { left: auto; right: 0; }
.dd-menu a, .dd-menu .linklike { color: var(--text); padding: 8px 10px; border-radius: 4px; text-decoration: none; text-align: left; }
.dd-menu a::after { display: none; }
.dd-menu a:hover, .dd-menu .linklike:hover { background: var(--accent-weak); }
.dd-menu a[aria-current="page"] { background: var(--accent-weak); color: var(--text); }
.right-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang { color: var(--nav-text); font-family: var(--f-head); font-weight: 600; font-size: 12px; letter-spacing: .04em; padding: 6px 10px; border: 1px solid var(--nav-line); border-radius: 3px; text-decoration: none; }
.lang:hover { border-color: var(--gold); color: var(--accent); }
.account summary { display: flex; align-items: center; color: var(--nav-text); padding: 6px 4px; cursor: pointer; list-style: none; font-weight: 600; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--navy); font-family: var(--f-head); font-weight: 700; margin-right: 8px; }
.acct-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; width: 100%; }

main { max-width: 1480px; margin: 0 auto; padding: 22px 16px 40px; }
main.narrow { max-width: 560px; }
.foot { max-width: 1480px; margin: 0 auto; padding: 0 16px 28px; color: var(--muted); font-size: .85rem; }
.foot .src { opacity: .85; } .foot a { color: var(--muted); }

/* panels and grids */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel > h2:first-child, .panel > h3:first-child, .panel > input[type=hidden]:first-child + h2 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .k { color: var(--muted); font-size: .8rem; } .kpi .v { font-family: var(--f-head); font-size: 1.1rem; font-weight: 700; margin-top: 2px; color: var(--accent); overflow-wrap: anywhere; }
.kpi.warn .v { color: var(--r-tx); }
.notice { background: var(--accent-weak); color: var(--text); border-left: 3px solid var(--gold); border-radius: 4px; padding: 10px 14px; margin-bottom: 14px; }
.flash { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.flash.ok { background: var(--g-bg); color: var(--g-tx); } .flash.error { background: var(--r-bg); color: var(--r-tx); }
.muted, small { color: var(--muted); } .empty { color: var(--muted); font-style: italic; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* tables */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); max-height: 75vh; }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
table.data th { position: sticky; top: 0; background: var(--head); color: var(--head-text); font-family: var(--f-head); font-weight: 600; text-align: left; padding: 9px 10px; white-space: nowrap; z-index: 2; font-size: .78rem; letter-spacing: .02em; }
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.data tbody tr:hover td { background: var(--accent-weak); }
table.data .num { text-align: right; }
.table-wrap.wide table.data th:first-child, .table-wrap.wide table.data td:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); }
.table-wrap.wide table.data th:first-child { z-index: 3; background: var(--head); }
table.compact td { padding: 5px 8px; }
table.data td.wrap, table.data th.wrap { white-space: normal; min-width: 240px; }
.th-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
th[aria-sort="ascending"] .th-btn::after { content: " ▲"; font-size: .7em; } th[aria-sort="descending"] .th-btn::after { content: " ▼"; font-size: .7em; }
.hint { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; border: 1px solid currentColor; font-size: 10px; opacity: .7; cursor: help; position: relative; vertical-align: middle; }
.tip { position: fixed; z-index: 100; max-width: 320px; background: #011631; color: #FFFFFF; padding: 8px 10px; border-radius: 6px; font-size: .8rem; line-height: 1.35; white-space: normal; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; }
.tk { font-weight: 700; text-decoration: none; color: var(--text); } a.tk:hover { color: var(--accent); text-decoration: underline; } .sub { display: block; color: var(--muted); font-size: .78rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.na { color: var(--muted); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.sig-buy { background: var(--g-bg); color: var(--g-tx); } .sig-watch { background: var(--a-bg); color: var(--a-tx); } .sig-avoid { background: var(--r-bg); color: var(--r-tx); }
.sig-insufficient { background: var(--n-bg); color: var(--n-tx); }
.score { display: inline-block; min-width: 36px; text-align: center; padding: 2px 6px; border-radius: 6px; font-weight: 700; background: hsl(var(--h) 70% 88%); color: hsl(var(--h) 75% 22%); }
@media (prefers-color-scheme: dark) { .score { background: hsl(var(--h) 45% 22%); color: hsl(var(--h) 80% 80%); } }
.flagcount { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; padding: 1px 6px; }
.flagcount.f1 { background: var(--a-bg); color: var(--a-tx); } .flagcount.f2 { background: var(--r-bg); color: var(--r-tx); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: var(--text); font-size: .85rem; }
.chip[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* forms */
form.inline { display: inline; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-weight: 600; font-size: .85rem; }
.field.check label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--input-line); border-radius: 4px; padding: 8px 10px; min-height: 38px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: 2px solid var(--accent-weak); }
/* buttons as on hissadoconsulting.com: gold with navy text, navy on hover; outline buttons in navy */
.btn { font-family: var(--f-head); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px;
  background: var(--btn); color: var(--btn-text); border: 1px solid var(--btn); border-radius: 3px; padding: 9px 16px; cursor: pointer; text-decoration: none; min-height: 38px;
  white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-hover-text); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--btn2-line); }
.btn.secondary:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-hover-text); }
.btn.danger { background: transparent; color: var(--neg); border-color: var(--line); }
.btn.danger:hover { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: .7rem; }
.actions-cell { display: flex; gap: 6px; }
table.data.settings-table td { white-space: normal; vertical-align: top; }
table.data.settings-table td.wrap { min-width: 260px; }
.settings-table input { min-width: 110px; }
.sec-head td { background: var(--n-bg); font-weight: 700; }
.ex { color: var(--r-tx); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; margin: 0; }
.kv div { border-bottom: 1px dashed var(--line); padding: 4px 0; display: flex; justify-content: space-between; gap: 10px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.why { margin: 0; padding-left: 18px; }
.bars-mini .b { height: 8px; border-radius: 4px; background: var(--n-bg); overflow: hidden; } .bars-mini .b > i { display: block; height: 100%; background: var(--gold); }
.bars-mini div { display: grid; grid-template-columns: 120px 1fr 40px; gap: 8px; align-items: center; margin: 6px 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--n-bg); padding: 8px 10px; border-radius: 6px; overflow-wrap: anywhere; display: block; user-select: all; }

/* charts */
.chart { margin: 0; } .chart svg { width: 100%; height: auto; display: block; }
.chart.sm { display: none; } .chart.sm .ax, .chart.sm .lvl-t { font-size: 12.5px; }
.grid { stroke: var(--grid); stroke-width: 1; } .ax { fill: var(--muted); font-size: 11px; }
.ch-close { fill: none; stroke: var(--close); stroke-width: 2; } .ch-area { fill: var(--area); stroke: none; }
.ch-ma20 { fill: none; stroke: var(--ma20); stroke-width: 1.4; } .ch-ma50 { fill: none; stroke: var(--ma50); stroke-width: 1.4; } .ch-ma200 { fill: none; stroke: var(--ma200); stroke-width: 1.4; }
.lvl { stroke-dasharray: 5 4; stroke-width: 1.3; } text.lvl-t { font-size: 11px; font-weight: 600; stroke: none; }
.lvl-entry { stroke: var(--entry); fill: var(--entry); } .lvl-stop { stroke: var(--neg); fill: var(--neg); } .lvl-target { stroke: var(--pos); fill: var(--pos); }
.lvl-support, .lvl-resistance { stroke: var(--muted); fill: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.lg::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.lg.close::before { background: var(--close); } .lg.ma20::before { background: var(--ma20); } .lg.ma50::before { background: var(--ma50); } .lg.ma200::before { background: var(--ma200); }
.spark { display: block; } .spark path { fill: none; stroke-width: 1.6; } .spark.up path { stroke: var(--pos); } .spark.down path { stroke: var(--neg); }
.head-line { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: baseline; margin-bottom: 12px; }
.head-line .big { font-size: 1.6rem; font-weight: 700; }

/* auth pages */
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }

@media (max-width: 760px) {
  .bar { flex-wrap: wrap; padding: 8px 12px 0; gap: 6px; min-height: 0; }
  /* phones: one scrollable strip; the Analysis dropdown is replaced by its three links (a dropdown would be clipped) */
  .main-nav { order: 3; flex-basis: 100%; padding-bottom: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .main-nav .desk { display: none; }
  .main-nav .mob { display: contents; }
  .brand img { height: 34px; }
  .acct-name { display: none; }
  main { padding: 16px 12px 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 1rem; }
  h1 { font-size: 1.25rem; }
  .grid2 { grid-template-columns: 1fr; }
  .bars-mini div { grid-template-columns: 96px 1fr 34px; }
  .chart.lg { display: none; } .chart.sm { display: block; }
  /* settings: one stacked block per setting instead of a 5-column table */
  .settings-table, .settings-table tbody, .settings-table tr, .settings-table td { display: block; width: 100%; }
  .settings-table tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .settings-table td { border: 0; padding: 4px 12px; text-align: left !important; }
  .settings-table td:first-child { font-weight: 600; }
  .settings-table .sec-head td:not(:first-child) { display: none; }
  .settings-table .sec-head { padding: 0; }
  .settings-table td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); font-weight: 500; }
  .settings-table td:empty { display: none; }
}

/* Market scan */
.scan-counts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 12px; }
.scan-counts a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.scan-counts a b { font-variant-numeric: tabular-nums; }
.scan-counts a:hover b, .scan-counts a:focus-visible b, .scan-counts a[aria-current] b { text-decoration: underline; text-underline-offset: 3px; }
.nowrap { white-space: nowrap; }
