/* DeskTerminal — site-wide type scale (loaded after page styles)
   Scale matches the usual product scale: 12 / 14 / 16 / 18 / 20 / 24 / 30–36.
   1rem = 16px. Captions never go under 12px. UI text is 14px. Reading text is 16px. */
:root{
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --text-xs: 0.75rem;     /* 12px captions, legal, overlines */
  --text-sm: 0.875rem;    /* 14px UI, nav, tables, meta */
  --text-base: 1rem;      /* 16px body */
  --text-lg: 1.125rem;    /* 18px lead */
  --text-xl: 1.25rem;     /* 20px h3, card titles */
  --text-2xl: 1.5rem;     /* 24px h2 */
  --text-3xl: 1.875rem;   /* 30px h1 floor */
  --text-4xl: 2.25rem;    /* 36px h1 ceiling */
  --leading-body: 1.6;
  --leading-ui: 1.45;
  --leading-tight: 1.25;
  --tracking-tight: -0.02em;
  --tracking-caps: 0.06em;
  --radius: 6px;
  --radius-lg: 8px;
}

html{
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body{
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button,
input,
select,
textarea{
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
}
.mono,
.nav-clock,
.util-clock,
.tape-chip,
.scanner-sub,
.home-date,
.home-ev-time,
.home-ev-val,
.hero-price,
.hero-change,
.hero-stat-value,
.perf-value,
.event-val,
.strength-code,
.strength-score,
.strength-pct{
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
small{
  font-size: var(--text-sm);
}
code, kbd, samp{
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* ---------- Type scale ---------- */
.wordmark{
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.pagehead{ padding-top: 1.6rem; padding-bottom: 1rem; }
h1,
.pagehead h1,
.glossary-main h1,
article h1,
.util-bar h1,
.instrument-hero h1{
  font-family: var(--font-sans);
  font-size: clamp(var(--text-3xl), 1.4rem + 1.2vw, var(--text-4xl));
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
  text-transform: none;
}
.pagehead h1,
.util-bar h1{
  font-size: clamp(var(--text-2xl), 1.2rem + 0.8vw, var(--text-3xl));
}
.pagehead p,
.instrument-hero .subtitle{
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 0.35rem;
  line-height: var(--leading-body);
}
h2,
.seo-content h2,
#postBody h2,
article h2{
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.panel h2,
.scanner-title,
.sessions-title,
.home-card-title,
.auth-modal h2{
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
h3,
.seo-content h3,
#postBody h3,
article h3,
.insight-main h3{
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
h4{
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
}
.faq-q{
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
}
p,
#postBody p,
article p,
.seo-content p,
.insight-main p,
.faq-a,
li,
#postBody li,
article li,
.seo-content li{
  font-size: var(--text-base);
  line-height: var(--leading-body);
}
.lead{
  font-size: var(--text-lg);
  line-height: 1.6;
}
.hero-price{
  font-size: clamp(2rem, 1.4rem + 2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero-change{ font-size: var(--text-lg); font-weight: 600; }
.hero-stat-value,
.insight-stat-value{ font-size: var(--text-lg); font-weight: 600; }

.section-label,
.insight-label,
.hot-stories-label,
.eyebrow,
.post-tag,
.related-tools-label,
.sidebar-label,
.hero-stat-label,
.insight-stat-label,
.perf-label,
.events-header-row,
.strength-head{
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  line-height: 1.4;
  text-transform: uppercase;
}

/* ---------- Nav ---------- */
.navlinks{
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: var(--leading-ui);
}
.navlinks a{
  border-radius: 4px;
}
.navlinks a:hover{
  color: var(--gold);
  background-color: transparent;
}
.navlinks a.active{
  color: var(--gold);
  background: transparent;
}
.mobile-subnav a,
.breadcrumb,
.internal-links{
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
  line-height: var(--leading-ui);
}
.nav-clock,
.util-clock{
  font-size: var(--text-xs);
  line-height: var(--leading-ui);
}

/* ---------- Cards / panels: consistent shape ---------- */
.home-card,
.post-card,
.category-card,
.tool-hub-card,
.news-card,
.panel,
.insight-main,
.insight-side,
.scanner-table-wrap,
.strength-collapsible,
.chart-panel,
.events-table,
.hero-stats,
.perf-grid,
.disclaimer-box,
.search-box,
.search-results,
.auth-modal,
.submit-news-modal,
.profile-dropdown,
.currency-dropdown-panel,
.instrument-results{
  border-radius: var(--radius);
  min-width: 0;
}
.sessions-widget{
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.post-card,
.category-card,
.tool-hub-card,
.news-card,
.panel,
.insight-main,
.scanner-table-wrap,
.strength-collapsible,
.chart-panel,
.events-table{
  overflow: hidden;
}
.home-card{ overflow: visible; }
.post-card:hover,
.category-card:hover,
.tool-hub-card:hover{
  transform: none;
}
.news-card,
.post-card,
.category-card,
.tool-hub-card{
  height: 100%;
}
.posts,
.category-grid,
.tool-hub-grid,
.news-grid,
.home-grid,
.insight-grid,
.related-grid{
  align-items: stretch;
}
.home-card-title{
  gap: 0.75rem;
  font-size: var(--text-xl);
}
.home-card-title a{ font-size: var(--text-sm); font-weight: 500; }
.post-title{
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
}
.post-excerpt,
.category-desc,
.tool-hub-desc,
.news-card-summary,
.disclaimer-box p,
.auth-modal p{
  font-size: var(--text-sm);
  line-height: 1.5;
}
.category-title,
.tool-hub-title,
.news-card-title{
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
}
.news-card-meta,
.ai-disclaimer,
.scanner-sub{
  font-size: var(--text-xs);
  line-height: 1.45;
}

/* ---------- Grid overflow / tables ---------- */
.scanner-section,
.home-dashboard,
.layout,
.news-layout,
.instrument-hero,
.section{
  min-width: 0;
}
.scanner-table-wrap{ overflow-x: auto; }
.strength-row{
  min-width: 0;
}
.strength-name{ min-width: 0; }
img, video, canvas{ max-width: 100%; }
.news-card-img{ height: 148px; object-fit: cover; display: block; }
th{
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
td,
.event-row,
.event-val,
.strength-code,
.strength-name,
.strength-score,
.strength-pct,
.session-name{
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
}
.session-local,
.sessions-hours,
.home-card-loading,
.home-preview-meta{
  font-size: var(--text-xs);
  line-height: 1.4;
}

@media (max-width: 700px){
  .strength-row,
  .strength-head{
    grid-template-columns: 40px minmax(0, 1fr) 52px 58px;
    gap: 0.4rem;
  }
  .strength-head span:nth-child(2),
  .strength-name{ display: none; }
  .sessions-widget{ padding: 1rem; }
  .session-name{ font-size: var(--text-sm); }
  .session-local{ font-size: var(--text-xs); }
}

/* ---------- DeskAi ---------- */
.deskai-toggle{ animation: none; }
.deskai-panel{ border-radius: 10px; }
.deskai-input{
  font-family: var(--font-sans);
  font-size: var(--text-base);
  border-radius: 8px;
}
.deskai-quick button{ border-radius: 4px; transform: none; }
.deskai-quick button:hover{ transform: none; }
.deskai-header-title span{
  font-size: var(--text-base);
  font-weight: 600;
}
.deskai-toggle-label{
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

/* ---------- Footer / legal ---------- */
footer{
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: 2rem 6vw;
}

/* ---------- Homepage FAQ ---------- */
.seo-content h1{
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.7rem;
}
.seo-content h2{ margin: 1.5rem 0 0.55rem; }
.seo-content h3{ margin: 1.15rem 0 0.35rem; }
.seo-content p{
  color: #B7BECC;
  margin-bottom: 0.85rem;
}
