/* ─── Wealthcon Brand Tokens ──────────────────────────────────── */
:root {
  --brand: #1B9EC8;
  --brand-dark: #147FA0;
  --brand-light: #0D7EA8;
  --brand-glow: rgba(27, 158, 200, 0.18);
  --brand-glow2: rgba(27, 158, 200, 0.10);

  --bg: #F3F8FB;
  --bg2: #E8F2F8;
  --card: #FFFFFF;
  --card-border: #CAE3EF;
  --surface: #EEF6FB;
  --surface2: #E2EFF6;

  --text: #0D2233;
  --text-muted: #3A6B82;
  --text-dim: #8AAFC0;

  --valid: #15803D;
  --valid-bg: #ECFDF5;
  --valid-border: #86EFAC;
  --watch: #B45309;
  --watch-bg: #FFFBEB;
  --watch-border: #FCD34D;
  --reject: #B91C1C;
  --reject-bg: #FEF2F2;
  --reject-border: #FCA5A5;
}

/* ─── Reset ───────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Top Header Bar ──────────────────────────────────────────── */
.top-bar {
  width: 100%;
  background: linear-gradient(135deg, #071622 0%, #0D2335 50%, #071622 100%);
  border-bottom: 1px solid var(--brand-dark);
  padding: 16px 40px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wc-logo {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.top-brand-text {
  display: flex;
  flex-direction: column;
}

.top-brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-light);
  letter-spacing: 1.5px;
  line-height: 1.2;
}

.top-brand-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.top-product {
  text-align: right;
}

.product-label {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 2px;
  line-height: 1.2;
}

.product-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* ─── App Container ───────────────────────────────────────────── */
#app {
  width: 100%;
  padding: 28px 40px 16px;
  flex: 1;
}

/* ─── Screens ─────────────────────────────────────────────────── */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ─── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 40px 48px;
  box-shadow: 0 4px 24px rgba(13, 34, 51, 0.08), 0 0 0 1px rgba(27, 158, 200, 0.04);
}

.card.center {
  text-align: center;
  padding: 100px 48px;
}

.results-card {
  padding: 36px 48px;
}

/* ─── Scorer Title / MDSPORT Badge ───────────────────────────── */
.scorer-title {
  text-align: center;
  margin-bottom: 32px;
}

.mdsport-badge {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 10px;
}

.mdsport-badge span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0;
  border: 1px solid;
}

.b-m {
  background: var(--brand-glow2);
  border-color: var(--brand);
  color: var(--brand-light);
}

.b-d {
  background: var(--brand-glow2);
  border-color: var(--brand-dark);
  color: var(--brand);
}

.b-s {
  background: rgba(34, 197, 94, 0.08);
  border-color: #15803D;
  color: #4ade80;
}

.b-p {
  background: rgba(34, 197, 94, 0.08);
  border-color: #15803D;
  color: #4ade80;
}

.b-o {
  background: rgba(245, 158, 11, 0.08);
  border-color: #B45309;
  color: #fbbf24;
}

.b-r {
  background: rgba(245, 158, 11, 0.08);
  border-color: #B45309;
  color: #fbbf24;
}

.b-t {
  background: rgba(239, 68, 68, 0.08);
  border-color: #B91C1C;
  color: #f87171;
}

.scorer-sub {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ─── Form ────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input,
select {
  background: #FFFFFF;
  border: 1.5px solid var(--card-border);
  border-radius: 9px;
  color: var(--text);
  padding: 13px 16px;
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

select option {
  background: var(--card);
}

/* ─── Search Suggestions ──────────────────────────────────────── */
.search-wrap {
  position: relative;
}

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--brand-dark);
  border-radius: 10px;
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(13, 34, 51, 0.12);
}

.suggestions li {
  padding: 13px 16px;
  cursor: pointer;
  font-size: 1rem;
  list-style: none;
  border-bottom: 1px solid var(--surface2);
  transition: background 0.15s;
}

.suggestions li:last-child {
  border-bottom: none;
}

.suggestions li:hover {
  background: var(--surface2);
}

.suggestions li .s-ticker {
  font-weight: 700;
  color: var(--brand);
  margin-right: 8px;
}

.suggestions li .s-name {
  color: var(--text-muted);
}

/* ─── Divider ─────────────────────────────────────────────────── */
.divider {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  padding-top: 22px;
  margin-bottom: 22px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hint {
  font-weight: 400;
  text-transform: none;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ─── Filters Grid ────────────────────────────────────────────── */
.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(27, 158, 200, 0.3);
}

.btn-primary:hover {
  opacity: 0.92;
  box-shadow: 0 6px 24px rgba(27, 158, 200, 0.45);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-back {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 20px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-back:hover {
  border-color: var(--brand);
  color: var(--brand-light);
}

.error {
  color: var(--reject);
  font-size: 0.85rem;
  margin-top: 10px;
}

.hidden {
  display: none !important;
}

/* Courtesy Text Styling */
.courtesy-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
  margin-top: 10px;
  margin-bottom: 0px;
}

/* ─── Loading / Spinner ───────────────────────────────────────── */
.wc-spinner {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 28px;
}

.spinner-ring {
  width: 72px;
  height: 72px;
  border: 3px solid var(--card-border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  position: absolute;
  top: 0;
  left: 0;
}

.spinner-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(47%) sepia(95%) saturate(400%) hue-rotate(163deg) brightness(90%);
  opacity: 0.85;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 1rem;
  color: var(--text-muted);
}

.loading-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ─── Results: Company Header ─────────────────────────────────── */
.company-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.company-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.company-logo-wrap {
  flex-shrink: 0;
}

.company-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border: 1px solid var(--card-border);
}

.company-initials {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.company-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.ticker-badge {
  display: inline-block;
  background: var(--brand-glow2);
  border: 1px solid var(--brand-dark);
  color: var(--brand-light);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-top: 4px;
  letter-spacing: 1px;
}

.market-cap-box {
  text-align: right;
}

.mc-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mc-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.mc-large-cap {
  color: var(--valid) !important;
}

.mc-small-cap {
  color: var(--reject) !important;
}

.mc-threshold {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ─── Filter Flags ────────────────────────────────────────────── */
.filter-flags {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.flag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid;
}

.flag.pass {
  background: var(--valid-bg);
  border-color: var(--valid-border);
  color: var(--valid);
}

.flag.fail {
  background: var(--reject-bg);
  border-color: var(--reject-border);
  color: var(--reject);
}

.flag.skip {
  background: var(--surface);
  border-color: var(--card-border);
  color: var(--text-muted);
}

.flag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.flag.pass .flag-dot {
  background: var(--valid);
}

.flag.fail .flag-dot {
  background: var(--reject);
}

.flag.skip .flag-dot {
  background: var(--text-dim);
}

/* ─── Data Warning ────────────────────────────────────────────── */
.data-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #92400E;
}

.data-warning .warn-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.data-warning .warn-text {
  flex: 1;
}

.data-warning .warn-fy {
  font-weight: 800;
  font-size: 1rem;
  background: rgba(180, 83, 9, 0.08);
  border: 1px solid #FCD34D;
  border-radius: 6px;
  padding: 2px 10px;
  margin-left: 8px;
  white-space: nowrap;
}

/* ─── Score Banner ────────────────────────────────────────────── */
.score-banner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 24px 28px;
  border-radius: 14px;
  margin-bottom: 28px;
  border: 1px solid;
}

.score-banner.valid {
  background: var(--valid-bg);
  border-color: var(--valid-border);
}

.score-banner.watch {
  background: var(--watch-bg);
  border-color: var(--watch-border);
}

.score-banner.reject {
  background: var(--reject-bg);
  border-color: var(--reject-border);
}

.score-circle {
  min-width: 110px;
  min-height: 110px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  border: 3px solid;
}

.valid .score-circle {
  border-color: var(--valid);
  color: var(--valid);
}

.watch .score-circle {
  border-color: var(--watch);
  color: var(--watch);
}

.reject .score-circle {
  border-color: var(--reject);
  color: var(--reject);
}

.score-circle small {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
}

.score-label {
  font-size: 1.7rem;
  font-weight: 800;
}

.valid .score-label {
  color: var(--valid);
}

.watch .score-label {
  color: var(--watch);
}

.reject .score-label {
  color: var(--reject);
}

.score-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Section Titles ──────────────────────────────────────────── */
.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
}

.section-title.collapsible {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.toggle-icon {
  transition: transform 0.2s;
  color: var(--text-dim);
}

.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

/* ─── Tables ──────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

.sport-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.sport-table th {
  background: var(--bg2);
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.sport-table th:first-child {
  text-align: left;
}

.sport-table td {
  padding: 11px 16px;
  text-align: right;
  border-bottom: 1px solid var(--surface2);
  white-space: nowrap;
}

.sport-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
}

.sport-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  background: var(--bg2);
}

/* ─── Score Cell Colors ───────────────────────────────────────── */
.s4 {
  color: #15803D;
  font-weight: 700;
}

.s3 {
  color: #16A34A;
}

.s2 {
  color: #B45309;
}

.s1 {
  color: #C2410C;
}

.s0 {
  color: #B91C1C;
  font-weight: 700;
}

.s-null {
  color: var(--text-dim);
}

.row-total td {
  background: var(--bg2) !important;
  color: var(--text);
  font-weight: 700;
}

.row-param td:first-child {
  padding-left: 8px;
}

/* ─── Recent Scores ───────────────────────────────────────────── */
.recent-section {
  margin-top: 16px;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.btn-clear {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s;
}

.btn-clear:hover {
  color: var(--reject);
}

.recent-item {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 13px 20px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 1rem;
}

.recent-item:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-glow);
}

.recent-name {
  font-weight: 700;
  color: var(--text);
  min-width: 200px;
}

.recent-ticker {
  color: var(--brand-light);
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--brand-glow2);
  border: 1px solid var(--brand-dark);
  border-radius: 12px;
  padding: 2px 10px;
  margin-right: 12px;
}

.recent-meta {
  color: var(--text-dim);
  font-size: 0.92rem;
  flex: 1;
}

.recent-meta span {
  margin-right: 16px;
}

.recent-score {
  font-weight: 800;
  font-size: 1.05rem;
  min-width: 90px;
  text-align: right;
}

.recent-score.valid {
  color: var(--valid);
}

.recent-score.watch {
  color: var(--watch);
}

.recent-score.reject {
  color: var(--reject);
}

.recent-date {
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-left: 12px;
  white-space: nowrap;
}

.recent-ticker.mptds-ticker {
  background: rgba(124, 58, 237, 0.08);
  border-color: #C4B5FD;
  color: #6D28D9;
}

/* MPTDS verdict in recent list — compact badge */
.recent-score.valid {
  color: var(--valid);
}

.recent-score.watch {
  color: var(--watch);
}

.recent-score.reject {
  color: var(--reject);
}

.recent-score.skip {
  color: var(--text-dim);
}

/* MPTDS trend cells in recent list — styled like screener table */
.recent-trends {
  display: flex;
  align-items: stretch;
  gap: 4px;
  flex-shrink: 0;
}

.ra-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 32px;
  padding: 3px 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  border: 1px solid;
}

.ra-cell small {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 1px;
  opacity: 0.7;
}

.ra-up {
  color: var(--valid);
  background: var(--valid-bg);
  border-color: var(--valid-border);
}

.ra-down {
  color: var(--reject);
  background: var(--reject-bg);
  border-color: var(--reject-border);
}

.ra-side {
  color: var(--watch);
  background: var(--watch-bg);
  border-color: var(--watch-border);
}

.ra-insuf {
  color: var(--text-dim);
  background: var(--surface);
  border-color: var(--card-border);
}

/* ─── Landing Page ────────────────────────────────────────────── */
.home-hero {
  text-align: center;
  padding: 48px 24px 32px;
}

.home-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.home-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.method-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 0 32px 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 700px) {
  .method-cards {
    grid-template-columns: 1fr;
    padding: 0 16px 24px;
  }
}

.method-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px 28px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.method-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(13, 34, 51, 0.14);
}

.mdsport-card:hover {
  border-color: var(--brand);
  box-shadow: 0 12px 40px rgba(27, 158, 200, 0.2);
}

.mptds-card:hover {
  border-color: #A855F7;
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.2);
}

.method-badge-row {
  display: flex;
  align-items: center;
}

.method-acronym {
  display: flex;
  gap: 4px;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: 2px;
}

/* MPTDS letter colours */
.b-mp {
  color: var(--brand);
}

.b-pp {
  color: #A855F7;
}

.b-tp {
  color: #EC4899;
}

.b-dp {
  color: #F59E0B;
}

.b-sp {
  color: #22C55E;
}

.method-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.method-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.method-params-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mparam {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.82rem;
  color: var(--brand-light);
}

.mptds-param {
  color: #7C3AED;
  border-color: #C4B5FD;
  background: #F5F3FF;
}

.method-result-box {
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mdsport-result {
  background: var(--brand-glow2);
  border: 1px solid var(--brand-dark);
}

.mptds-result {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid #6B21A8;
}

.result-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.result-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.method-cta {
  border-radius: 10px;
  padding: 12px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 4px;
  transition: opacity 0.15s;
}

.method-cta:hover {
  opacity: 0.85;
}

.mdsport-cta {
  background: var(--brand);
  color: #fff;
}

.mptds-cta {
  background: #7C3AED;
  color: #fff;
}

.home-note {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.note-icon {
  font-size: 1.1rem;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 3px;
}

.home-note-lines {
  display: block;
}

.home-note-lines div {
  display: block;
  line-height: 1.6;
  margin-bottom: 2px;
}

.home-note-lines div:last-child {
  margin-bottom: 0;
}

/* ─── MPTDS Verdict Banner ────────────────────────────────────── */
.mptds-verdict-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: 16px;
  padding: 20px 28px;
  margin-bottom: 24px;
  border: 2px solid;
}

.mptds-verdict-banner.verdict-valid {
  background: var(--valid-bg);
  border-color: var(--valid-border);
}

.mptds-verdict-banner.verdict-invalid {
  background: var(--reject-bg);
  border-color: var(--reject-border);
}

.mptds-verdict-banner.verdict-doubtful {
  background: var(--watch-bg);
  border-color: var(--watch-border);
}

.mptds-verdict-banner.verdict-insufficient {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.mptds-verdict-acronym {
  display: flex;
  gap: 4px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.mptds-verdict-label {
  font-size: 1.6rem;
  font-weight: 800;
}

.mptds-verdict-label.verdict-valid {
  color: var(--valid);
}

.mptds-verdict-label.verdict-invalid {
  color: var(--reject);
}

.mptds-verdict-label.verdict-doubtful {
  color: var(--watch);
}

.mptds-verdict-label.verdict-insufficient {
  color: #64748B;
}

.mptds-verdict-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.mptds-ticker-badge {
  background: rgba(124, 58, 237, 0.08);
  border-color: #C4B5FD;
  color: #6D28D9;
}

/* ─── Trend Note Labels ───────────────────────────────────────── */
.trend-note-good {
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--valid);
  background: var(--valid-bg);
  border: 1px solid var(--valid-border);
  border-radius: 6px;
  padding: 3px 10px;
  display: inline-block;
}

.trend-note-warn {
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--watch);
  background: var(--watch-bg);
  border: 1px solid var(--watch-border);
  border-radius: 6px;
  padding: 3px 10px;
  display: inline-block;
}

.trend-note-bad {
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--reject);
  background: var(--reject-bg);
  border: 1px solid var(--reject-border);
  border-radius: 6px;
  padding: 3px 10px;
  display: inline-block;
}

/* ─── Trend Cards ─────────────────────────────────────────────── */
.trend-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 600px) {
  .trend-cards {
    grid-template-columns: 1fr;
  }
}

.trend-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 20px 20px 16px;
  border: 1px solid var(--card-border);
  position: relative;
}

.trend-card.uptrend {
  border-color: var(--valid-border);
  background: rgba(22, 163, 74, 0.07);
}

.trend-card.downtrend {
  border-color: var(--reject-border);
  background: rgba(220, 38, 38, 0.07);
}

.trend-card.sideways {
  border-color: var(--watch-border);
  background: rgba(217, 119, 6, 0.07);
}

.trend-card.insufficient {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.trend-param {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.trend-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.trend-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trend-arrow {
  font-size: 2rem;
  line-height: 1;
}

.trend-arrow.uptrend {
  color: var(--valid);
}

.trend-arrow.downtrend {
  color: var(--reject);
}

.trend-arrow.sideways {
  color: var(--watch);
}

.trend-arrow.insufficient {
  color: #94A3B8;
}

.trend-text {
  font-size: 1rem;
  font-weight: 700;
}

.trend-text.uptrend {
  color: var(--valid);
}

.trend-text.downtrend {
  color: var(--reject);
}

.trend-text.sideways {
  color: var(--watch);
}

.trend-text.insufficient {
  color: #94A3B8;
}

.trend-slope {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.trend-count {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.trend-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin-top: 12px;
  height: 40px;
}

.spark-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  background: var(--brand-glow);
}

.trend-card.uptrend .spark-bar {
  background: rgba(22, 163, 74, 0.4);
}

.trend-card.downtrend .spark-bar {
  background: rgba(220, 38, 38, 0.4);
}

.trend-card.sideways .spark-bar {
  background: rgba(217, 119, 6, 0.4);
}

/* ─── Footer ──────────────────────────────────────────────────── */
.app-footer {
  width: 100%;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-dim);
  border-top: 1px solid var(--card-border);
  margin-top: 8px;
}

/* ─── One-time Disclaimer Modal ──────────────────────────────── */
.disc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 22, 34, 0.90);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.disc-modal-overlay.hidden {
  display: none !important;
}

.disc-modal {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 600px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.disc-modal-header {
  background: linear-gradient(135deg, #071622 0%, #0D2335 100%);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.disc-modal-logo {
  height: 38px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.disc-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.disc-modal-sub {
  font-size: 0.77rem;
  color: #8BAFC8;
  margin-top: 3px;
}

.disc-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.disc-modal-list {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.disc-modal-list li {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.disc-modal-list li strong {
  color: var(--text);
  font-weight: 600;
}

.disc-modal-footer {
  flex-shrink: 0;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--card-border);
  background: var(--surface);
}

.disc-modal-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  text-align: center;
}

.disc-modal-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.disc-modal-btn:hover {
  opacity: 0.88;
}

/* ─── Collapsible Disclaimers (home screen reference) ─────────── */
.disc-wrap {
  max-width: 760px;
  margin: 0 auto 32px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}

.disc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  user-select: none;
}

.disc-toggle::-webkit-details-marker {
  display: none;
}

.disc-toggle span:nth-child(2) {
  flex: 1;
}

.disc-arrow {
  font-size: 0.7rem;
  transition: transform 0.25s;
}

details[open]>summary .disc-arrow {
  transform: rotate(180deg);
}

.disc-body {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--card-border);
}

.disc-list {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.disc-list li {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.disc-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Mobile Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {

  body {
    font-size: 15px;
  }

  #app {
    padding: 16px 12px 12px;
  }

  .card {
    padding: 20px 16px;
  }

  .results-card {
    padding: 20px 16px;
  }

  /* Header */
  .top-bar {
    padding: 12px 16px;
  }

  .wc-logo {
    height: 36px;
  }

  .top-brand-name {
    font-size: 1rem;
  }

  .top-brand-tag {
    font-size: 0.72rem;
  }

  .product-label {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .product-sub {
    font-size: 0.7rem;
  }

  /* Company header — stack logo+name on one line, mcap below */
  .company-header {
    flex-direction: column;
    gap: 10px;
  }

  .market-cap-box {
    text-align: left;
  }

  .mc-threshold {
    font-size: 0.7rem;
  }

  .company-header h2 {
    font-size: 1.3rem;
  }

  /* Score banner — stack vertically on mobile */
  .score-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    gap: 16px;
  }

  .score-circle {
    min-width: 90px;
    min-height: 90px;
    font-size: 1.9rem;
  }

  .score-label {
    font-size: 1.4rem;
  }

  .score-desc {
    font-size: 0.88rem;
  }

  /* MPTDS verdict banner — stack vertically */
  .mptds-verdict-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 14px;
    gap: 10px;
  }

  .mptds-verdict-acronym {
    font-size: 1.6rem;
    justify-content: center;
  }

  .mptds-verdict-label {
    font-size: 1.3rem;
  }

  .mptds-verdict-desc {
    font-size: 0.85rem;
  }

  /* Trend cards — 1 column on small screens */
  .trend-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .trend-card {
    padding: 14px 12px 12px;
  }

  .trend-arrow {
    font-size: 1.6rem;
  }

  .trend-text {
    font-size: 0.9rem;
  }

  .trend-name {
    font-size: 0.88rem;
    margin-bottom: 8px;
  }

  .trend-sparkline {
    height: 28px;
    margin-top: 8px;
  }

  /* Tables — horizontal scroll with smaller text */
  .sport-table {
    font-size: 0.82rem;
  }

  .sport-table th,
  .sport-table td {
    padding: 8px 10px;
  }

  /* Filter flags — wrap nicely */
  .filter-flags {
    gap: 6px;
  }

  .flag {
    font-size: 0.82rem;
    padding: 6px 12px;
  }

  /* Input form */
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    font-size: 1rem;
    padding: 14px;
  }

  /* Recent items — stack on mobile */
  .recent-item {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
  }

  .recent-name {
    min-width: unset;
    width: 100%;
    font-size: 0.9rem;
  }

  .recent-meta {
    font-size: 0.8rem;
  }

  .recent-score {
    font-size: 0.9rem;
  }

  /* Footer */
  .app-footer {
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    font-size: 0.78rem;
  }

  /* Method cards on landing */
  .method-cards {
    padding: 0 8px 16px;
    gap: 14px;
  }

  .method-card {
    padding: 20px 16px;
  }

  .method-acronym {
    font-size: 1.3rem;
  }

  .home-title {
    font-size: 1.6rem;
  }

  .home-sub {
    font-size: 0.9rem;
  }

  .home-note {
    font-size: 0.82rem;
    margin: 0 8px 28px;
  }

  /* Collapsible disclaimers */
  .disc-wrap {
    margin: 0 8px 20px;
    border-radius: 11px;
  }

  .disc-toggle {
    padding: 10px 14px;
    font-size: 0.78rem;
  }

  .disc-body {
    padding: 12px 14px 14px;
  }

  .disc-list li {
    font-size: 0.76rem;
  }

  /* Modal */
  .disc-modal {
    max-height: 92vh;
    border-radius: 14px;
  }

  .disc-modal-header {
    padding: 14px 16px;
  }

  .disc-modal-logo {
    height: 30px;
  }

  .disc-modal-title {
    font-size: 0.9rem;
  }

  .disc-modal-body {
    padding: 14px 16px;
  }

  .disc-modal-footer {
    padding: 12px 16px 18px;
  }

  .disc-modal-list li {
    font-size: 0.78rem;
  }

  .disc-modal-btn {
    font-size: 0.95rem;
    padding: 13px;
  }
}