/* Technosight - Notion Web Design Theme (05-notion) */

:root {
  --fh: 'Geist', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* Retained font for titles/subtitles per Guideline 6 */
  --fb: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* 05-Notion body font */
  --fm: 'JetBrains Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;
  --r: 12px;
  --rb: 8px;
  --rad: 12px;
  --hw: 700;
  --ht: -0.035em;
  --cols: 4;
  --h1max: 4.8rem;
  --bg: #ffffff;
  --bg2: #f7f6f3;
  --card: #ffffff;
  --fg: #37352f;
  --fg2: #2f2d28;
  --muted: #787774;
  --line: #e9e8e4;
  --accent: #2383e2;
  --accentfg: #ffffff;
  --at: #1a6fc4;
  --accent2: #72a9e8;
  --soft: rgba(35, 131, 226, 0.12);
  --glow1: rgba(35, 131, 226, 0.28);
  --glow2: rgba(114, 169, 232, 0.20);
  --fbg: var(--bg2);
  --h3s: 1.12rem;
  --maxw: 1180px;
  --gut: 24px;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --soft: color-mix(in srgb, var(--accent) 13%, transparent);
    --glow1: color-mix(in srgb, var(--accent) 30%, transparent);
    --glow2: color-mix(in srgb, var(--accent2, var(--accent)) 22%, transparent);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light; /* Strictly Light Theme - Guideline 4 */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--soft);
}

h1, h2, h3, h4, h5 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-weight: var(--hw);
  letter-spacing: var(--ht);
  line-height: 1.14;
  margin: 0;
  color: var(--fg);
}

.sub, .lead-t {
  font-family: var(--fh); /* Geist retained for subtitles - Guideline 6 */
}

p {
  margin: 0 0 1em;
}

code {
  font-family: var(--fm);
  font-size: .88em;
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut, 24px);
  width: 100%;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- Theme Extras: Notion ---------- */
.hl {
  color: var(--fg);
}

/* Background elements removed for pure Notion clean look */
.page-top-bg {
  display: none !important;
}

/* ---------- Header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}

.hdr.sc {
  box-shadow: 0 6px 24px -14px rgba(0, 0, 0, .35);
}

.hdr-in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fh);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: var(--ht);
  white-space: nowrap;
}

.brand img {
  width: 26px;
  height: 26px;
}

.links {
  display: flex;
  gap: 2px;
  margin-left: 6px;
}

.links a {
  padding: 8px 13px;
  border-radius: var(--rb);
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color .2s, background .2s;
}

.links a:hover {
  color: var(--fg);
  background: var(--bg2);
}

.links a.on {
  color: var(--fg);
  font-weight: 600;
}

.act {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ib {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--rb);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.ib:hover {
  background: var(--bg2);
  border-color: color-mix(in srgb, var(--fg) 30%, var(--line));
}

.ib svg {
  width: 18px;
  height: 18px;
}

.burger {
  display: none;
}

.mnav {
  display: none;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
}

.mnav a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-weight: 500;
}

.hdr.open .mnav {
  display: block;
}

.signin {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
}

.signin:hover {
  color: var(--fg);
}

/* ---------- Buttons & Badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--rb);
  border: 1px solid var(--line);
  font: 600 14.5px/1.2 var(--fb);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s, filter .2s, box-shadow .2s;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--fg);
}

.btn.pri {
  background: var(--accent);
  color: var(--accentfg);
  border-color: var(--accent);
}

.btn.pri:hover {
  filter: brightness(1.08);
  border-color: var(--accent);
  box-shadow: 0 4px 14px -4px var(--accent);
}

.btn.sec {
  background: var(--card);
  color: var(--fg);
  border-color: var(--line);
}

.btn.sec:hover {
  background: var(--bg2);
  border-color: var(--fg);
}

.btn.lg {
  padding: 14px 26px;
  font-size: 15.5px;
}

.btn.sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* Notion Style Pill Badge (data-badge="pill") */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12.5px/1 var(--fb);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--at);
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--soft);
  margin-bottom: 22px;
}

/* ---------- Original Page Header / Simple Hero (Guideline 2) ---------- */
.page-head {
  padding: 42px 0 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.page-head h1 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: clamp(1.85rem, 2.8vw + 1rem, 2.5rem);
  font-weight: 700;
  letter-spacing: var(--ht);
  line-height: 1.18;
  margin: 0 0 10px;
}

.page-head p.sub {
  font-family: var(--fh); /* Geist retained for subtitles - Guideline 6 */
  color: var(--muted);
  font-size: clamp(1rem, .4vw + .95rem, 1.15rem);
  margin: 0;
  max-width: 65ch;
  line-height: 1.5;
}

/* ---------- Standard Hero (Used on How It Works / About / Sector / Watchlist) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 44px;
}

.hero.sm {
  padding: 48px 0 36px;
}

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero h1 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: clamp(2rem, 3.6vw + .6rem, 3.2rem);
  line-height: 1.1;
  max-width: 26ch;
  margin: 0 0 12px;
}

.hero.sm h1 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: clamp(1.8rem, 2.8vw + .6rem, 2.6rem);
  max-width: 28ch;
  line-height: 1.14;
}

.hero .sub, .hero .lead-t {
  font-family: var(--fh); /* Geist retained for subtitles - Guideline 6 */
  font-size: clamp(1.02rem, .4vw + .95rem, 1.25rem);
  color: var(--muted);
  max-width: 58ch;
  margin: 18px 0 0;
  line-height: 1.5;
}

.hero .lead-t {
  color: var(--fg);
  font-weight: 600;
  font-size: clamp(1.1rem, .8vw + .95rem, 1.45rem);
  line-height: 1.35;
  margin-top: 16px;
}

.hero .aud {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.hero .aud b {
  color: var(--fg);
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ---------- Sections ---------- */
.sec {
  padding: 56px 0;
}

.sec.tight {
  padding: 36px 0;
}

.sec-h {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.sec-h h2 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: clamp(1.65rem, 1.6vw + 1.1rem, 2.35rem);
}

.sec-h p {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 62ch;
  font-size: 15px;
}

.sec-h.center {
  display: block;
  text-align: center;
}

.sec-h.center p {
  margin-left: auto;
  margin-right: auto;
}

.alt {
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Cards & Grids (Guideline 5: Notion Style) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s, background .3s;
  position: relative;
}

.card:hover {
  border-color: var(--fg);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .12);
}

.card.pad {
  padding: 26px;
  gap: 12px;
}

/* Notion Style Nested Rounded Thumbnail with Margins */
.thumb {
  margin: 10px 10px 0;
  border-radius: 8px;
  aspect-ratio: 16/9;
  background: var(--bg2);
  overflow: hidden;
  position: relative;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.card:hover .thumb img {
  transform: scale(1.035);
}

.cbody {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: var(--h3s);
  line-height: 1.28;
  font-weight: 700;
  color: var(--fg);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.clamp p, .cbody p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.meta .tag {
  color: var(--at);
  font-weight: 600;
}

.meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
  display: inline-block;
}

.go svg, .tocd summary svg {
  width: 16px;
  height: 16px;
}

.card .go {
  margin-top: auto;
  padding-top: 6px;
  color: var(--at);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* ---------- Home Specific ---------- */
.lead {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.feat .thumb {
  margin: 10px 10px 0;
  border-radius: 8px;
  aspect-ratio: 16/8.4;
}

.feat .cbody {
  padding: 26px;
  gap: 12px;
}

.feat h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: clamp(1.35rem, 1.3vw + 1rem, 1.95rem);
}

.feat p {
  font-size: 15px;
  -webkit-line-clamp: 5;
}

.qbox h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.qitem {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  transition: padding .25s, color .2s;
}

.qitem:first-of-type {
  border-top: 0;
}

.qitem:hover {
  padding-left: 6px;
  color: var(--at);
}

.qitem h4 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1rem;
  line-height: 1.35;
  margin: 6px 0 6px;
  font-weight: 600;
  color: var(--fg);
}

.qitem p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tools Bar: Search & Sector Chips & Time Range */
.tools-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 26px;
}

.tools-top {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 26px;
}

.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 380px;
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.in {
  width: 100%;
  font: 400 15px/1.4 var(--fb);
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: min(var(--rb), 14px);
  padding: 11px 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: 0;
}

.search .in {
  padding-left: 42px;
}

.in:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--soft);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font: 500 13.5px var(--fb);
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  transition: all .2s;
}

.chip:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.chip.on {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* Time range filter buttons */
.time-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.time-filters-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}

.t-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font: 500 13px var(--fb);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.t-btn:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.t-btn.on {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  font-weight: 600;
}

.empty {
  display: none;
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
  font-size: 15px;
}

/* Browse by Sector Section */
.groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 56px;
}

.grp h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--fg);
  margin-bottom: 4px;
}

.grp h3 small {
  font: 500 13px var(--fb);
  color: var(--muted);
  letter-spacing: 0;
}

.grp-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  transition: color .2s;
}

.grp-link:hover {
  color: var(--at);
}

.row {
  display: grid;
  grid-template-columns: 92px 1fr 20px;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .25s, color .2s;
}

.row:hover {
  padding-left: 6px;
  color: var(--at);
}

.row span {
  font-size: 12.5px;
  color: var(--muted);
}

.row b {
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg);
}

.row svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  align-self: center;
}

/* ---------- About Us Page Specific ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ico {
  width: 46px;
  height: 46px;
  border-radius: calc(var(--r) * .7);
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--at);
  margin-bottom: 6px;
}

.ico svg {
  width: 23px;
  height: 23px;
}

.pillars .card.pad p {
  font-size: 15px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.two .card.pad h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.two .card.pad p {
  font-size: 15.5px;
  color: var(--fg);
  opacity: .86;
}

.princ {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.princ .k {
  font: 600 12.5px var(--fm);
  color: var(--at);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.princ h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.25rem;
}

.hq {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
}

.hq-t {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.hq-t h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.6rem;
}

.hq-t p {
  color: var(--muted);
  margin: 0;
}

/* Headquarters Map Container */
.map-wrap {
  position: relative;
  min-height: 260px;
  flex: 1;
  background: var(--bg2);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 38px 38px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 583;
}

.hq-map-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .4s ease, transform .4s ease;
  pointer-events: none;
}

.card.hq:hover .hq-map-img, .map-wrap:hover .hq-map-img {
  filter: none;
}

.pin {
  position: absolute;
  left: 46.1%;
  top: 40.5%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--soft);
  transform: translate(-50%, -50%);
  z-index: 5;
}

.pin::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ping 2.2s ease-out infinite;
}

.pin-l {
  position: absolute;
  left: calc(46.1% + 14px);
  top: calc(40.5% - 13px);
  font: 600 12px var(--fb);
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  z-index: 6;
  white-space: nowrap;
}

@keyframes ping {
  0% { transform: scale(.8); opacity: .9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.faq {
  max-width: 860px;
  margin: 0 auto;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  font: 600 1.05rem/1.4 var(--fh);
  letter-spacing: var(--ht);
  color: var(--fg);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font: 300 1.7rem/1 var(--fb);
  color: var(--at);
  transition: transform .3s;
  flex: none;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .ans {
  padding: 0 0 22px;
  color: var(--muted);
  max-width: 75ch;
  line-height: 1.6;
}

.form {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form .full {
  grid-column: 1 / -1;
}

.form label {
  display: block;
  font: 600 13.5px var(--fb);
  margin-bottom: 6px;
  color: var(--fg);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.note {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- How It Works Specific ---------- */
.crumbs {
  font-size: 13.5px;
  color: var(--muted);
  padding-top: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.crumbs a:hover {
  color: var(--fg);
}

.doc {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  padding: 20px var(--gut, 24px) 40px;
}

.tocd {
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding-right: 6px;
}

.tocd summary {
  display: none;
}

.toc-h {
  font: 600 12px var(--fb);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}

.toc-t {
  font: var(--hw) 1.1rem var(--fh);
  margin-bottom: 14px;
}

.tocd .in {
  padding: 9px 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

.toc a {
  display: block;
  padding: 6px 10px;
  border-radius: calc(var(--rb) * .7);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  border-left: 2px solid transparent;
}

.toc a:hover {
  color: var(--fg);
  background: var(--bg2);
}

.toc a.l1 {
  margin-left: 12px;
  font-size: 13.5px;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
}

.toc a.cur {
  color: var(--at);
  font-weight: 600;
  border-left-color: var(--at);
  background: var(--soft);
}

.kt {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 36px;
}

.kt .card.pad h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.05rem;
}

.kt .card.pad p {
  font-size: 14.5px;
}

.kt .n {
  font: 600 12px var(--fm);
  color: var(--at);
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--soft);
  padding: 22px 26px;
  border-radius: 0 var(--r) var(--r) 0;
  margin: 0 0 44px;
}

.callout h3 {
  font-size: .8rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--at);
  margin-bottom: 8px;
  font-family: var(--fb);
  font-weight: 700;
}

.callout p {
  margin: 0;
  font-size: 1.05rem;
}

.docsec {
  margin-bottom: 46px;
}

.docsec h2 {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: clamp(1.4rem, 1.2vw + 1.05rem, 1.9rem);
  margin-bottom: 18px;
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
}

.docsec h2 b {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 14px var(--fm);
  background: var(--fg);
  color: var(--bg);
}

/* Pricing Page Styles */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

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

.pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.pricing-price {
  font: var(--hw) 2.5rem var(--fh);
  letter-spacing: -0.03em;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 8px;
}

.pricing-price small {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--fb);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--fg2);
  line-height: 1.5;
}

.pricing-features li svg {
  width: 16px;
  height: 16px;
  color: var(--fg);
  flex-shrink: 0;
  margin-top: 3px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--rb);
  background: var(--card);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color .2s;
}

.faq-item:hover {
  border-color: var(--muted);
}

.faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 15px var(--fh);
  cursor: pointer;
  color: var(--fg);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform .2s;
}

.faq-item[open] summary svg {
  transform: rotate(180deg);
}

.faq-item p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg2);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* Data Table & Watchlist Styles */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--rb);
  background: var(--card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.data-table th {
  background: var(--bg2);
  color: var(--muted);
  font: 600 11.5px var(--fb);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.data-table th a:hover {
  color: var(--fg);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--fg2);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--bg2);
}

.symbol-link {
  font-family: var(--fm);
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  cursor: pointer;
}

.symbol-link:hover {
  color: var(--at);
  border-bottom-color: var(--at);
}

.company-link {
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  cursor: pointer;
}

.company-link:hover {
  color: var(--at);
  border-bottom-color: var(--at);
}

.score-badge {
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--fg);
  border: 1px solid var(--line);
  display: inline-block;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: var(--rb);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--fg);
  background: var(--card);
}

.pagination a:hover {
  background: var(--bg2);
}

.pagination .current {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.prose {
  font-size: 1.04rem;
  line-height: 1.75;
}

.prose h3 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.2rem;
  margin: 1.7em 0 .6em;
}

.prose h4 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: 1.1rem;
  margin: 1.5em 0 .5em;
}

.prose ul, .prose ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

.prose li {
  margin: .45em 0;
  padding-left: .2em;
}

.prose li::marker {
  color: var(--at);
}

.prose a {
  color: var(--at);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 650;
}

.doc-content table {
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 1.75rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--rb);
  overflow: hidden;
}

.doc-content th {
  background-color: var(--bg2);
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 650;
  color: var(--fg);
  border: 1px solid var(--line);
}

.doc-content td {
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  color: var(--fg2);
}

.doc-content tr:nth-child(even) td {
  background-color: var(--soft);
}

.doc-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1.25rem;
  background-color: var(--soft);
  border-radius: 0 var(--rb) var(--rb) 0;
  margin: 1.5rem 0;
  color: var(--fg2);
}

.doc-content .katex-display {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rb);
  overflow-x: auto;
}

.doc-content img {
  border-radius: var(--rb);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
  height: auto;
  display: block;
}

.next {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  margin-top: 20px;
}

.next small {
  display: block;
  font: 600 12px var(--fb);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.next b {
  font: var(--hw) 1.25rem var(--fh);
  letter-spacing: var(--ht);
  color: var(--fg);
}

.next svg {
  width: 24px;
  height: 24px;
  color: var(--at);
  transition: transform .25s;
}

.next:hover svg {
  transform: translateX(5px);
}

/* ---------- Article Specific ---------- */
.art {
  max-width: 780px;
  margin: 0 auto;
  padding: 30px 24px 20px;
  position: relative;
  z-index: 2;
}

.back {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
  margin-bottom: 26px;
}

.back:hover {
  color: var(--fg);
}

.back svg {
  width: 16px;
  height: 16px;
}

.ahead {
  padding: 34px 34px 30px;
  margin-bottom: 34px;
}

.ahead h1 {
  font-family: var(--fh); /* Geist retained for titles - Guideline 6 */
  font-size: clamp(1.8rem, 2.6vw + 1rem, 2.7rem);
  line-height: 1.12;
  margin: 14px 0 18px;
  text-transform: none;
}

.card .take, .take {
  font-style: italic;
  margin-bottom: 22px !important;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
  margin: 0 0 22px;
}

.by {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accentfg);
  display: grid;
  place-items: center;
  font: 700 14px var(--fb);
  text-transform: uppercase;
}

.by b {
  color: var(--fg);
  font-weight: 600;
}

.art .prose h4 {
  font: var(--hw) clamp(1.35rem, 1vw + 1.05rem, 1.7rem)/1.2 var(--fh);
  letter-spacing: var(--ht);
  margin: 2.1em 0 .7em;
}

.art .prose h3.scores {
  font: 600 13px/1.5 var(--fm);
  letter-spacing: 0;
  color: var(--at);
  background: var(--soft);
  padding: 10px 14px;
  border-radius: var(--rb);
  margin: 0 0 1.2em;
}

.art .prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

.art .prose figure {
  margin: 1.8em 0;
}

.art .prose figure img {
  width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
}

.art .prose .sources {
  font-size: .9rem;
  line-height: 1.55;
  color: var(--muted);
}

.art .prose .sources li {
  margin: .35em 0;
}

.rel {
  max-width: 780px;
  margin: 30px auto 0;
  padding: 0 24px;
}

.rel .grid {
  --cols: 2;
}

.rel .card.pad .k {
  font: 600 12px var(--fm);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--at);
}

.rel .links2 {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.rel .links2 a {
  color: var(--at);
  font-weight: 600;
  font-size: 14px;
}

.rel .links2 a:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.ftr {
  margin-top: 72px;
  background: var(--fbg);
  color: var(--ffg, var(--fg));
  border-top: 1px solid var(--line);
  padding: 58px 0 26px;
  --muted-f: color-mix(in srgb, var(--ffg, var(--fg)) 62%, transparent);
}

.ftr-g {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.ftr .brand {
  margin-bottom: 14px;
}

.ftr p {
  color: var(--muted-f);
  font-size: 14.5px;
  max-width: 38ch;
}

.ftr h5 {
  font: 700 12px var(--fb);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--ffg, var(--fg));
}

.ftr ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ftr li, .ftr li a {
  font-size: 14.5px;
  color: var(--muted-f);
  transition: color .2s;
}

.ftr li a:hover {
  color: var(--ffg, var(--fg));
}

.ftr li.chk::before {
  content: "\2713";
  margin-right: 8px;
  color: var(--at);
  font-weight: 700;
}

.ftr-b {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--ffg, var(--fg)) 14%, transparent);
  font-size: 13.5px;
  color: var(--muted-f);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Responsive Breakpoints (Guideline 8) ---------- */
@media (max-width: 1060px) {
  .grid {
    grid-template-columns: repeat(min(var(--cols), 3), minmax(0, 1fr));
  }
  .ftr-g {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .links, .signin, .act .btn {
    display: none;
  }
  .burger {
    display: inline-grid;
  }
  .lead, .two, .hq, .doc, .groups {
    grid-template-columns: 1fr;
  }
  .hq .card {
    flex-direction: column;
  }
  .pillars {
    grid-template-columns: 1fr;
  }
  .doc {
    gap: 10px;
  }
  .tocd {
    position: static;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 0 16px;
    background: var(--card);
  }
  .tocd summary {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
  }
  .tocd summary::-webkit-details-marker {
    display: none;
  }
  .tocd[open] > summary {
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
  }
  .tocd:not([open]) {
    padding-bottom: 0;
  }
  .hero {
    padding: 44px 0 36px;
  }
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: repeat(min(var(--cols), 2), minmax(0, 1fr));
  }
  .princ, .kt, .form {
    grid-template-columns: 1fr;
  }
  .rel .grid {
    --cols: 1;
  }
}

@media (max-width: 560px) {
  .grid, .rel .grid {
    grid-template-columns: 1fr;
  }
  :root {
    --gut: 18px;
  }
  .ahead {
    padding: 24px 20px;
  }
  .row {
    grid-template-columns: 1fr 18px;
  }
  .row span {
    grid-column: 1 / -1;
  }
  .ftr-g {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    max-width: none;
  }
  .sec {
    padding: 38px 0;
  }
  .hq-t {
    padding: 24px;
  }
  .next {
    padding: 20px;
  }
}

/* ==========================================================================
   Restricted Workspace Area & Modals (Notion Style - Guideline 7)
   ========================================================================== */

.ws-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--rb);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg2);
  background: var(--bg2);
  border: 1px solid var(--line);
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s ease;
}

.ws-tab:hover {
  color: var(--fg);
  border-color: var(--accent);
  background: var(--card);
}

.ws-tab.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.ws-tab svg {
  width: 14px;
  height: 14px;
}

.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--fm);
  background: var(--soft);
  color: var(--fg);
  border: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ws-badge.active, .ws-badge.success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.ws-badge.pending, .ws-badge.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.ws-badge.archived, .ws-badge.muted {
  background: var(--soft);
  color: var(--muted);
  border-color: var(--line);
}

.ws-badge.featured {
  background: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
}

.ws-badge.beehiiv {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.ws-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--rb);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}

.ws-btn-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--rb);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}

.ws-btn-icon:hover {
  color: var(--fg);
  border-color: var(--fg);
  background: var(--bg2);
}

.ws-btn-icon.danger:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

/* Modal styling */
.ws-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.ws-modal-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.ws-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  border-radius: var(--rad) var(--rad) 0 0;
}

.ws-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.ws-stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
