/* Shared visual system for the public site, screener, analysis and account views. */
:root{
  --ink:#142b3e;--muted:#566f80;--line:#d6e3e8;--paper:#f2f7f8;
  --accent:#087e8b;--navy:#102c43;--surface:#fff;--soft:#edf7f8;
  --shadow:0 14px 36px rgba(17,54,69,.075);--radius:18px;
}
html{scroll-behavior:smooth}
body{background:radial-gradient(circle at 90% 0%,#e6f5f4 0,transparent 31rem),var(--paper);line-height:1.55}
button,input,select{font:inherit}
button,a,input,select{transition:background-color .18s,border-color .18s,color .18s,box-shadow .18s,transform .18s}
button:not(:disabled){cursor:pointer}
button:disabled{cursor:not-allowed}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #42bdca;outline-offset:3px}
a:hover{color:#065d68}
[hidden]{display:none!important}

/* Global shell and landing page */
body>header{position:relative;isolation:isolate;overflow:visible;align-items:center;gap:32px;padding:38px max(5vw,28px) 42px;background:linear-gradient(125deg,#0b263d 4%,#103d52 61%,#0b5664 100%)}
body>header::before{content:"";position:absolute;inset:0;z-index:-1;opacity:.32;pointer-events:none;background:radial-gradient(circle at 88% 16%,#40d4cb 0,transparent 24%),linear-gradient(160deg,transparent 60%,#147f88 100%)}
body>header>div:first-child{max-width:670px}
body>header .eyebrow{color:#86f0e4;font-weight:800}
body>header h1{font-size:clamp(2.15rem,4vw,3.55rem);line-height:1.08;letter-spacing:-.035em;margin:0 0 15px}
body>header>div>p:not(.eyebrow){max-width:570px;color:#d5e8ed;font-size:1.03rem;line-height:1.6}
.app-version,#free-remaining{display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(188,236,236,.3);border-radius:999px;background:rgba(255,255,255,.09);padding:6px 11px;color:#e6fbfb;font-size:.79rem;font-weight:700}
#free-remaining{margin:10px 0 0 8px}
.header-actions{align-items:end;justify-content:flex-end;flex-wrap:wrap;max-width:630px}
.header-actions>button{min-height:44px;padding:11px 16px;border-color:rgba(183,237,237,.58);border-radius:10px;background:rgba(255,255,255,.08);color:#fff}
.header-actions>button:hover{background:rgba(255,255,255,.18);border-color:#92ece9;transform:translateY(-1px)}
#search{min-width:min(330px,100%)}
#search label{color:#c4e2e8;letter-spacing:.02em}
.search{filter:drop-shadow(0 10px 22px rgba(0,0,0,.14))}
.search input{min-height:48px;border:1px solid transparent;border-radius:10px 0 0 10px;padding-inline:15px}
.search button{min-height:48px;border-radius:0 10px 10px 0;background:#5ae0d7;color:#073849;white-space:nowrap}
.search button:hover{background:#8ff0e8}
.company-suggestions{border-radius:12px;box-shadow:var(--shadow)}
.commerce{max-width:1320px;margin:28px auto 0;padding:30px clamp(24px,4vw,50px);gap:38px;border:1px solid #c4e7e7;border-radius:var(--radius);background:linear-gradient(120deg,#e6f7f7,#f6fbfb 70%);box-shadow:var(--shadow)}
.commerce h2{font-size:clamp(1.55rem,2.4vw,2.15rem);line-height:1.2;letter-spacing:-.025em}
.commerce>div>p:last-child{font-size:.99rem;line-height:1.65}
.membership-card{border:1px solid #badfe3;border-radius:15px;padding:24px;box-shadow:0 15px 34px rgba(7,96,109,.09)}
.membership-card strong{font-size:clamp(1.55rem,2.5vw,2rem);line-height:1.2}
.membership-card button,.youtube-join{min-height:44px;border-radius:9px}
.membership-card button:hover{background:#066b76;transform:translateY(-1px)}
.youtube-join{display:block;margin-top:10px;padding:10px 14px;border:1px solid #a8d6d9;text-align:center}
.youtube-join:hover{background:#e3f6f7}
main{max-width:1320px;padding:28px max(5vw,28px) 40px}
main>section{margin-bottom:20px}
.welcome,.loading,.error,.watch-home{border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.welcome{padding:27px 31px;background:linear-gradient(110deg,#fff 60%,#f1faf9)}
.welcome h2{font-size:1.3rem;letter-spacing:-.015em;margin-bottom:7px}
.welcome p{color:var(--muted);margin:0}
.watch-home{padding:28px}
.watch-home .section-title button,.watch-home-list button{min-height:40px;border-radius:9px}
.watch-home-preferences label{border-radius:9px;background:#f6fafb}
.watch-home-events article{border-radius:10px;background:#fbfdfd}
footer{max-width:1320px;margin-top:20px;padding:28px max(5vw,28px) 40px}
footer nav{gap:8px 20px}
footer a{font-weight:650}

/* Consistent interactive cards and information hierarchy */
.section-title{gap:16px;align-items:flex-start;margin-bottom:18px}
.section-title h3{font-size:1.16rem;line-height:1.3;letter-spacing:-.015em}
.section-title span{font-size:.78rem;line-height:1.4}
.section-title a{font-size:.82rem;font-weight:750;white-space:nowrap}
.section-title a:hover{text-decoration:underline}
.metric,.quality-parts article,.trend-list article,.horizons article,.ratio-insights article,.technical-cards span{border:1px solid var(--line);border-radius:11px;background:#fbfdfd;box-shadow:0 3px 10px rgba(15,55,65,.035)}
.metric{min-width:0;padding:16px 17px}
.metric span{font-size:.8rem;line-height:1.35}
.metric strong{font-size:clamp(1.1rem,1.8vw,1.42rem);letter-spacing:-.025em;overflow-wrap:anywhere}
.metric.good{background:#f1faf6;border-color:#b8dec9}
.metric.bad{background:#fff7f5;border-color:#f1c9c4}
.grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.sensitivity,.daily-research,.data-quality{border-radius:var(--radius)}
.sensitivity{padding:23px 25px}
.sensitivity-score{font-size:1.7rem;line-height:1.05}
.quality-score{font-size:1.7rem;line-height:1.05}
.quality-parts{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.quality-parts article{padding:14px;min-width:0}
.quality-parts strong{font-size:.8rem;line-height:1.35}
.quality-parts b{font-size:1.05rem}
.quality-parts span{font-size:.75rem;line-height:1.45}
.daily-signal-panel{border-radius:11px;padding:18px;background:#f0f9fa}
.daily-signal-grid>div{border-radius:9px;padding:15px}
.technical-summary,.section-comment,.news-risk{border-radius:0 8px 8px 0;padding:13px 16px;line-height:1.6}
.chart-panel{border-radius:13px;padding:22px}
.chart-controls{gap:9px}
.chart-tab{min-height:39px;border-radius:8px}
.chart-tab:hover:not(.active){border-color:#8cc9d0;background:#f0f9fa}
.technical-cards span{padding:10px 13px}
.news{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.news a{border-radius:12px;padding:17px 19px;line-height:1.5}
.news a:hover{border-color:#77bbc3;background:#f8fcfc;box-shadow:0 9px 20px rgba(15,60,70,.06);transform:translateY(-2px)}
.news strong{font-size:.93rem}
.horizons article{padding:19px;border-top-width:3px}
.horizons h4{font-size:1rem}
.two>div{border-radius:12px;padding:23px;min-width:0;overflow-x:auto}
.two h3{font-size:1.05rem;margin-bottom:15px}
.watch-items span{border-radius:9px}
.watchlist #watch-add{min-height:40px;padding:8px 13px;border-radius:8px}
.watchlist #watch-add:hover{background:#066774}
.data-quality{padding:18px 22px}
.ai-commentary .ai-hint{color:var(--muted);line-height:1.65}
.notice{border-radius:var(--radius)}
table{font-variant-numeric:tabular-nums}
th{color:#17495c;background:#f3f9fa;font-weight:800}
th,td{padding:11px 12px;border-bottom:1px solid #e2ecef}
tbody tr:hover{background:#f7fbfb}

/* Full-page stock analysis */
.analysis-view main{max-width:1530px;padding-top:20px}
.analysis-page .hero{border:1px solid var(--line);border-radius:var(--radius);padding:26px 30px;box-shadow:var(--shadow);background:linear-gradient(115deg,#fff 70%,#eff9f8)}
.analysis-page .hero h2{font-size:clamp(1.45rem,2.6vw,2.05rem);line-height:1.2}
.analysis-page .hero .eyebrow{color:#047784;font-weight:850}
.analysis-page .price strong{font-size:clamp(1.5rem,2.5vw,2rem);color:#084b5b}
.analysis-toolbar{margin-bottom:14px}
.analysis-toolbar>span{border:1px solid #cee5e7;border-radius:999px;background:#e9f5f5;color:#245365;padding:6px 12px}
.analysis-back{min-height:40px;border-radius:9px;box-shadow:0 3px 9px rgba(13,46,61,.04)}
.analysis-tabs{top:0;gap:5px;margin-bottom:18px;padding:10px 0 12px;border-bottom:0;background:var(--paper)}
.analysis-tabs button{min-height:43px;border:1px solid transparent;border-radius:10px;background:transparent;color:#466474;padding:10px 16px}
.analysis-tabs button:hover:not([aria-selected="true"]){background:#e5f1f2;color:#0b5e69}
.analysis-tabs button[aria-selected="true"]{background:#0b5565;border-color:#0b5565;color:#fff;box-shadow:0 6px 14px rgba(8,92,104,.18)}
.analysis-panel>section{margin-bottom:17px;padding:23px 25px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow)}
.analysis-panel>section.sensitivity{border-left:5px solid #16835d}
.analysis-panel>section.sensitivity.medium{border-left-color:#c57a0b}
.analysis-panel>section.sensitivity.high{border-left-color:#b42318}
.analysis-panel>section.quality,.analysis-panel>section.watchlist{border-left:4px solid var(--accent)}
.analysis-panel>section.chart-section .chart-panel{border:0;border-radius:0;padding:0;box-shadow:none}
.analysis-panel>section.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.45fr);gap:17px;background:transparent;border:0;padding:0;box-shadow:none}
.analysis-panel>section.two>div{border:1px solid var(--line);background:#fff;box-shadow:var(--shadow)}
.analysis-panel>section.notice{color:var(--muted);font-size:.8rem;line-height:1.55}

/* Filters and dense results */
.screener{border-radius:var(--radius);padding:26px 28px;box-shadow:var(--shadow)}
.screener h2{font-size:clamp(1.5rem,2.5vw,2rem);letter-spacing:-.025em}
.screener .section-title button{min-height:40px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);padding:8px 13px;font-weight:700}
.preset-note{padding:14px 18px;border:1px solid #d0e8e9;border-radius:11px;background:#f4fafb}
.preset-note h3{margin-bottom:6px}
.preset-note p{margin:6px 0;line-height:1.55}
.screener-presets{gap:8px;padding:13px 15px;border-radius:11px;background:#f5f9fa}
.screener-presets strong{color:#254b5a}
.screener-presets button{min-height:36px;border-radius:8px;padding:8px 11px}
.screener-presets button:hover:not(:disabled){background:#e2f4f4;border-color:#8bc7cc;color:#075a66}
.screener-presets select{min-height:39px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:6px 11px}
.screener-presets small{line-height:1.5}
.screener-grid{gap:14px}
.filter-group{min-width:0;border-radius:12px;background:#fff;padding:17px}
.filter-group h3{font-size:.97rem;margin-bottom:14px}
.filter-group label{font-size:.78rem;line-height:1.45}
.filter-hint{font-size:.72rem;line-height:1.45;margin:3px 0 6px}
.range-row{gap:9px}
.range-row input,.filter-group select,.screener select[name="universe"]{min-height:39px;border:1px solid #c8d9e0;border-radius:8px;background:#fff;padding:8px 10px}
.range-row input:focus,.filter-group select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(8,126,139,.12);outline:0}
.screener-actions button{min-height:44px;border-radius:9px;padding:10px 18px}
.screener-actions button:hover:not(:disabled){background:#066b76}
.screener-result{margin-top:20px}
.screener-table-viewport{max-height:68vh;border-radius:11px}
.screener-table-viewport th{background:#eef6f7}
.screener-table-viewport th:first-child{background:#eef6f7}
.screener-table-viewport td:first-child{background:#fff}
.screener-table-viewport tbody tr:hover td:first-child{background:#f7fbfb}
.screener-table-viewport th,.screener-table-viewport td{vertical-align:middle}
.screener-source{font-size:.71rem;line-height:1.45}
.screener-scroll-controls button{min-height:36px;border-radius:7px}

/* Membership and admin */
.auth-gate,.account-panel{border-radius:var(--radius);padding:30px;box-shadow:var(--shadow)}
.auth-gate h2,.account-panel h2{font-size:1.55rem;letter-spacing:-.025em}
.auth-gate form{gap:13px}
.auth-gate input,#access-code-form input,.admin-security input{min-height:43px;border-color:#c9dbe0;border-radius:9px}
.auth-gate button,.account-panel button{min-height:41px;border-radius:9px}
.auth-gate button:hover,.account-panel button:hover{transform:translateY(-1px)}
.account-panel{max-width:660px}
.access-code-redeem,.admin-security,.admin-users{border-radius:12px;padding:20px;background:#f6fafb}
.admin-user{border-radius:10px;padding:15px}

@media(max-width:980px){
  body>header{align-items:flex-start;flex-direction:column}
  .header-actions{max-width:none;width:100%;justify-content:flex-start}
  .commerce{grid-template-columns:minmax(0,1fr) minmax(290px,.85fr)}
  .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .quality-parts{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  body>header{gap:21px;padding:30px 20px 34px}
  .header-actions{align-items:stretch;flex-direction:column}
  .header-actions>button,#search{width:100%;max-width:none}
  .commerce{grid-template-columns:1fr;margin:16px 16px 0;padding:24px;border-radius:15px}
  main{padding:19px 16px 32px}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .news{grid-template-columns:1fr}
  .quality-parts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .analysis-view main{padding:16px}
  .analysis-page .hero{padding:22px}
  .analysis-tabs{margin-inline:-16px;padding-inline:16px}
  .analysis-panel>section{padding:19px 18px}
  .analysis-panel>section.two{grid-template-columns:1fr}
  .analysis-panel>section.chart-section .chart-panel{overflow:hidden}
  #chart-canvas{max-width:100%;overflow-x:auto}
  #chart-canvas .price-chart{min-width:650px}
  .screener{padding:20px 17px}
  .screener-grid{grid-template-columns:1fr}
  footer{padding:24px 20px 35px}
}
@media(max-width:460px){
  .search input{min-width:0}
  .search button{padding-inline:13px}
  .welcome,.loading,.error,.watch-home{padding:21px}
  .membership-card{padding:19px}
  .section-title{flex-direction:column;align-items:flex-start}
  .section-title a{white-space:normal}
  .grid{grid-template-columns:1fr}
  .quality-parts{grid-template-columns:1fr 1fr}
  .analysis-page .hero{gap:15px}
  .analysis-page .price{text-align:left}
  .technical-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .technical-cards span{min-width:0}
  .watch-home-preferences{gap:8px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}button,a,input,select{transition:none!important}}
