/* Trida — v22 shared stylesheet.
   The system from design/trida-design-concept-v22-filled.html: tokens, header, section labels,
   headings, metric panels, model rows, resources, FAQ and footer. Page-level additions for the
   subpages (page hero, tables, code blocks, probability rows, notes) follow the same tokens.
   Header and footer rules are scoped to body>header and body>footer so <header> inside a code
   block is not affected; FAQ rules are scoped to .faq so the mobile menu's <details> is not. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #131313;
  --line: #2b2b2b;
  --muted: #a5a5a5;
  --dim: #686868;
  --white: #f5f5f5;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--white); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { transition: color .2s, background .2s, transform .2s; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #c3c3c3; outline-offset: 6px; }
p { margin: 0; color: var(--muted); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.055em; font-weight: 500; line-height: 1.04; }
code { font-family: var(--mono); font-size: .9em; }
[hidden] { display: none !important; }

.section { max-width: 1440px; padding-left: 64px; padding-right: 64px; margin: auto; }
.section-label { font-family: var(--mono); font-size: 10px; font-weight: 400; line-height: 1.6; letter-spacing: .075em; text-transform: uppercase; }
.muted { color: #a8a8a8; }
.dim { color: var(--dim); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #b5b5b5; display: inline-block; box-shadow: 0 0 10px #b2b2b2; margin-right: 10px; vertical-align: middle; }
.skip { position: absolute; top: -80px; background: #fff; color: #000; padding: 10px; z-index: 60; }
.skip:focus { top: 10px; }

/* Header: slim, full-width, fixed */
body > header { position: fixed; top: 0; left: 0; width: 100%; height: 56px; padding: 0 48px; display: flex; align-items: center; justify-content: space-between; z-index: 50; background: rgba(12,12,12,.86); border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand { display: flex; gap: 8px; align-items: center; font-size: 20px; letter-spacing: -1px; font-weight: 550; }
.brand span { font-size: 10px; letter-spacing: 0; margin-left: 8px; padding-left: 14px; border-left: 1px solid #ffffff30; font-weight: 400; color: #acacac; }
body > header nav { display: flex; gap: 27px; font-size: 12px; color: #c4c4c4; }
body > header nav a:hover { color: #fff; }
.nav-cta { font-size: 11px; background: #ededed; color: #141414; padding: 7px 13px; border-radius: 100px; line-height: 1.4; }
.nav-cta span { margin-left: 18px; }
.nav-cta:hover { background: #fff; }
.mobile-nav { display: none; }

/* Buttons and links */
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 35px; padding: 14px 22px; font-size: 12px; line-height: 1.3; font-weight: 550; border-radius: 100px; }
.white { background: var(--white); color: #090909; }
.white:hover { background: #d5d5d5; transform: translateY(-2px); }
.subtle-link { display: inline-flex; align-items: center; gap: 26px; font-size: 12px; color: #c4c4c4; }
.subtle-link:hover { color: #fff; }

/* Page hero (subpages): the home hero's type, left-aligned, no dial */
.page-hero { padding-top: 176px; padding-bottom: 110px; background: radial-gradient(ellipse at 80% 0%, #25252555, transparent 55%); max-width: none; }
.page-hero > * { max-width: 1312px; margin-left: auto; margin-right: auto; }
.page-hero h1 { font-size: clamp(48px, 6vw, 88px); line-height: 1.06; font-weight: 450; letter-spacing: -.06em; color: #f3f3f3; }
.page-hero h1 > span { display: block; }
.page-hero h1 > span + span { color: #bdbdbd; }
.page-hero .hero-description { font-size: 17px; line-height: 1.85; color: #a0a0a0; margin-top: 32px; max-width: 640px; margin-left: 0; }
.hero-body { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: end; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-actions small { font: 10px/1.6 var(--mono); color: #8a8a8a; letter-spacing: .03em; }

/* Section heading: label column, then h2 and lede */
.block { padding-top: 110px; padding-bottom: 20px; }
.page-heading { display: grid; grid-template-columns: 1fr 2fr; column-gap: 50px; border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 55px; }
.page-heading > .section-label { color: #9a9a9a; padding-top: 12px; }
.page-heading h2 { font-size: 55px; line-height: 1.06; grid-column: 2; }
.page-heading h2 span, .page-heading h2 .dim { color: var(--dim); }
.page-heading p { grid-column: 2; font-size: 15px; line-height: 1.85; margin-top: 24px; max-width: 650px; }
.sub-title { font-size: 25px; letter-spacing: -.6px; line-height: 1.3; margin: 70px 0 22px; }
.lede { font-size: 15px; line-height: 1.85; max-width: 760px; margin-bottom: 26px; }

/* Metric panels */
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.metric { padding: 30px 25px; border: 1px solid #3c3c3c; border-radius: 12px; background: radial-gradient(ellipse at 0 0, #7575751f, transparent 80%); display: flex; flex-direction: column; min-width: 0; }
.metric .eyebrow { font: 9px var(--mono); letter-spacing: .04em; color: #b2b2b2; text-transform: uppercase; }
.metric h4 { font-size: 19px; letter-spacing: -.5px; line-height: 1.4; margin-top: 14px; }
.big-number { font-size: 62px; letter-spacing: -4px; line-height: 1.1; margin: 28px 0 20px; white-space: nowrap; }
.big-number small { font: 11px var(--sans); letter-spacing: -.1px; display: block; margin-top: 8px; color: #a7a7a7; }
.metric p { font-size: 13px; color: #b6b6b6; line-height: 1.8; }
.metric p strong { color: var(--white); font-weight: 500; }
.metric > small { display: block; font-size: 10px; color: #a1a1a1; line-height: 1.8; margin-top: auto; padding-top: 20px; }
.metric:first-child { background: #e4e4e4; color: #1b1b1b; border-color: #e4e4e4; }
.metric:first-child .eyebrow { color: #5a5a5a; }
.metric:first-child .big-number { font-size: 86px; }
.metric:first-child .big-number small, .metric:first-child p { color: #5f5f5f; }
.metric:first-child p strong { color: #1b1b1b; }
.metric:first-child > small { color: #6c6c6c; }

/* Zero-based bars: the fill's width is the value over the axis maximum */
.bars { margin: 20px 0; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #a5a5a5; margin: 12px 0 6px; }
.bar-label b { font-weight: 500; color: #d5d5d5; font-variant-numeric: tabular-nums; }
.bar { height: 5px; background: #2c2c2c; border-radius: 2px; }
.bar i { display: block; height: 100%; background: #6c6c6c; border-radius: 2px; }
.bar.accent i { background: #e4e4e4; }
.metric:first-child .bar-label { color: #5a5a5a; }
.metric:first-child .bar-label b { color: #1b1b1b; }
.metric:first-child .bar { background: #c6c6c6; }
.metric:first-child .bar i { background: #959595; }
.metric:first-child .bar.accent i { background: #3c3c3c; }

/* Model rows */
.model-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 30px; }
.model-row { display: flex; align-items: flex-start; gap: 14px; padding: 22px 0; border-top: 1px solid #333; }
.model-row > div { min-width: 0; }
.model-row h4 { font-size: 19px; line-height: 1.4; letter-spacing: -.5px; }
.model-row .kicker { font: 9px var(--mono); letter-spacing: .06em; color: #858585; text-transform: uppercase; margin-top: 10px; }
.model-row p { font-size: 13px; line-height: 1.85; color: #939393; margin-top: 16px; }
.tag { display: table; margin: 11px 0 0; font: 7px var(--mono); letter-spacing: .02em; color: #a8a8a8; background: #161616; border: 1px solid #383838; padding: 4px 6px; border-radius: 3px; white-space: nowrap; text-transform: uppercase; }
.row-stat { display: flex; align-items: baseline; gap: 12px; margin-top: 20px; padding-top: 14px; border-top: 1px solid #262626; }
.row-stat b { font-size: 30px; font-weight: 500; letter-spacing: -1.5px; line-height: 1.1; }
.row-stat span { font-size: 11px; color: #8f8f8f; line-height: 1.6; }
.row-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; }
.row-links a { font-size: 12px; color: #bcbcbc; }
.row-links a:hover { color: #fff; }

/* Steps: numbered, hairline-topped summaries */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; align-items: start; }
.process-step { border-top: 1px solid #303030; padding-top: 21px; min-width: 0; }
.process-label { font: 9px/1.5 var(--mono); letter-spacing: .075em; color: #929292; margin-bottom: 21px; text-transform: uppercase; }
.process-step h4 { font-size: 22px; line-height: 1.25; letter-spacing: -.6px; margin-bottom: 15px; }
.process-step p { font-size: 14px; line-height: 1.85; color: #a0a0a0; }

/* Figure */
.figure { margin: 0 0 50px; border: 1px solid var(--line); border-radius: 12px; background: #111; padding: 32px; }
.figure-scroll { overflow-x: auto; }
.figure svg { display: block; width: 100%; min-width: 720px; height: auto; }
.figure figcaption { font-size: 12px; line-height: 1.9; color: #8a8a8a; margin-top: 22px; border-top: 1px solid #292929; padding-top: 18px; }

/* Code blocks */
.code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.code-block { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; min-width: 0; }
.code-block > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font: 10px/1.6 var(--mono); color: #9a9a9a; letter-spacing: .03em; }
.code-block pre { margin: 0; padding: 20px 18px; overflow-x: auto; font: 12.5px/1.75 var(--mono); color: #d8d8d8; }
.code-block pre code { font-size: inherit; }
.code-block .c { color: #6f6f6f; }
.code-block .k { color: #f5f5f5; }
.copy-button { background: transparent; border: 1px solid #444; border-radius: 30px; padding: 4px 11px; font: 10px var(--mono); color: #c4c4c4; }
.copy-button:hover { color: #fff; border-color: #777; }

/* Probability rows (illustrative response shape) */
.prob-list { padding: 8px 18px 20px; }
.prob-group { padding-top: 16px; }
.prob-group + .prob-group { border-top: 1px solid #262626; margin-top: 14px; }
.prob-group h4 { font: 500 13px var(--sans); letter-spacing: 0; display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.prob-group h4 span { font: 9px var(--mono); color: #7f7f7f; text-transform: uppercase; letter-spacing: .06em; }
.prob-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 40px; gap: 12px; align-items: center; font-size: 12px; color: #a5a5a5; padding: 4px 0; }
.prob-row b { font: 500 12px var(--mono); color: #d5d5d5; text-align: right; }

/* Tables: mono headers, hairline rows */
.table-wrap { overflow-x: auto; border-top: 1px solid #3a3a3a; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font: 400 9px/1.5 var(--mono); letter-spacing: .075em; text-transform: uppercase; color: #8a8a8a; text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px 14px 0; border-bottom: 1px solid #222; color: #bdbdbd; vertical-align: top; font-variant-numeric: tabular-nums; }
td:first-child { color: var(--white); }
td small { display: block; font: 10px/1.6 var(--mono); color: #767676; margin-top: 3px; }
td.best { color: var(--white); font-weight: 600; }
.caption { font-size: 12px; line-height: 1.9; color: #8a8a8a; margin-top: 18px; max-width: 900px; }
.caption code { color: #bdbdbd; }

/* Note */
.note { margin-top: 50px; border: 1px solid var(--line); border-left: 1px solid #8a8a8a; border-radius: 0 12px 12px 0; background: var(--surface); padding: 24px 28px; }
.note strong { font-weight: 500; font-size: 15px; }
.note ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.9; }

/* Resources */
.resource-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 45px; counter-reset: resource; }
.resource { position: relative; padding: 29px 45px; border-top: 1px solid #303030; display: block; counter-increment: resource; }
.resource:before { content: '0' counter(resource); position: absolute; top: 33px; left: 0; color: #767676; font: 10px var(--mono); }
.resource .eyebrow { font: 8px var(--mono); color: #999; text-transform: uppercase; letter-spacing: .04em; }
.resource h4 { font-size: 21px; line-height: 1.3; letter-spacing: -.7px; margin: 13px 0; }
.resource p { font-size: 13px; line-height: 1.8; }
.resource .arrow { position: absolute; right: 0; top: 50px; font-size: 23px; color: #bebebe; }
.resource:hover { background: #bebebe05; }
.resource:hover h4 { color: #fff; }

/* FAQ */
.faq { padding-top: 95px; padding-bottom: 95px; display: grid; grid-template-columns: 1fr 2fr; gap: 50px; }
.faq > .section-label { padding-top: 20px; color: #9a9a9a; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 23px 25px 23px 0; font-size: 15px; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:after { content: '+'; color: #a9a9a9; font-size: 20px; font-weight: 400; line-height: 1.2; }
.faq details[open] summary:after { content: '−'; }
.faq details p { font-size: 14px; line-height: 1.9; padding: 0 30px 25px 0; }

/* Footer with the large wordmark */
body > footer { overflow: hidden; padding: 0 64px; background: #0e0e0e; }
.footer-links { padding: 45px 0; display: flex; justify-content: space-between; gap: 30px; font-size: 12px; color: #a9a9a9; }
.footer-links > div { display: flex; gap: 25px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }
.footer-word { font-size: clamp(170px, 29vw, 450px); line-height: 1.08; font-weight: 500; letter-spacing: -.075em; text-align: center; user-select: none; padding: 0 0 .025em; background-image: linear-gradient(180deg, #2b2b2b 0%, #222 24%, #171717 48%, #101010 65%, #0e0e0e 80%, #0e0e0e 100%); background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@supports not ((background-clip: text) or (-webkit-background-clip: text)) { .footer-word { background: none; color: #202020; -webkit-text-fill-color: #202020; } }
.footer-bottom { padding: 25px 0; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #ffffff10; color: #7f7f7f; font: 8px var(--mono); }
.footer-bottom img { width: 110px; height: auto; opacity: .7; }

@media (max-width: 1000px) {
  body > header { padding: 0 30px; }
  .brand span { display: none; }
  .section { padding-left: 35px; padding-right: 35px; }
  .page-heading h2 { font-size: 45px; }
  .model-directory { column-gap: 23px; }
  .model-row h4 { font-size: 17px; }
  .big-number { font-size: 48px; }
  .metric:first-child .big-number { font-size: 70px; }
  .steps { gap: 27px; }
  .process-step h4 { font-size: 20px; }
  .code-grid { grid-template-columns: minmax(0, 1fr); }
  .resource-grid { gap: 0 30px; }
  .resource h4 { font-size: 19px; }
  body > footer { padding: 0 35px; }
  .footer-links > div { gap: 15px; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 78px; }
  body > header { gap: 12px; padding: 0 18px; }
  body > header nav { display: none; }
  body > header .mobile-nav { display: block; margin-left: auto; }
  .mobile-nav > summary { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 3px; font-size: 12px; color: #d0d0d0; line-height: 1.4; list-style: none; cursor: pointer; }
  .mobile-nav > summary::-webkit-details-marker { display: none; }
  .mobile-nav > summary span { font-size: 16px; }
  .mobile-nav-panel { position: absolute; left: 0; right: 0; top: 55px; background: #111; border-bottom: 1px solid #333; box-shadow: 0 12px 25px #0007; padding: 12px 18px 20px; display: flex; flex-direction: column; }
  .mobile-nav-panel a { display: flex; align-items: center; min-height: 48px; padding: 10px 3px; color: #ddd; font-size: 14px; border-bottom: 1px solid #292929; }
  .mobile-nav-panel a:last-child { border: 0; }
  .nav-cta { min-height: 36px; display: inline-flex; align-items: center; padding: 8px 12px; }
  .nav-cta span { margin-left: 9px; }
  .section { width: 100%; padding-left: 20px; padding-right: 20px; }
  .page-hero { padding-top: 120px; padding-bottom: 60px; }
  .page-hero h1 { font-size: clamp(40px, 11vw, 56px); }
  .page-hero .hero-description { font-size: 15px; margin-top: 24px; }
  .hero-body { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .button { min-height: 44px; }
  .block { padding-top: 64px; }
  .page-heading { display: block; margin-bottom: 35px; }
  .page-heading h2 { font-size: 38px; margin-top: 22px; }
  .page-heading p { font-size: 15px; margin-top: 20px; }
  .sub-title { font-size: 22px; margin-top: 50px; }
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .metric { padding: 28px 22px; }
  .metric h4 { font-size: 21px; }
  .big-number, .metric:first-child .big-number { font-size: 64px; margin: 22px 0; }
  .big-number small { display: inline; font-size: 13px; margin-left: 10px; letter-spacing: 0; }
  .metric p { font-size: 14px; }
  .metric > small { font-size: 12px; }
  .bar-label { font-size: 12px; }
  .model-directory, .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps { gap: 29px; }
  .model-row { padding: 25px 0; }
  .model-row h4 { font-size: 20px; }
  .model-row p, .process-step p { font-size: 14px; }
  .tag { font-size: 8px; }
  .figure { padding: 18px; }
  .code-block pre { font-size: 11.5px; }
  .prob-row { grid-template-columns: 62px minmax(0, 1fr) 36px; gap: 9px; }
  table { font-size: 13px; }
  .caption { font-size: 12px; }
  .note { padding: 20px; }
  .resource-grid { grid-template-columns: minmax(0, 1fr); }
  .resource { padding: 25px 30px 25px 32px; min-width: 0; }
  .resource:before { top: 29px; }
  .resource p, .faq details p { font-size: 14px; }
  .resource .eyebrow { font-size: 10px; }
  .faq { display: block; padding-top: 64px; padding-bottom: 64px; }
  .faq > .section-label { display: block; margin-bottom: 25px; padding-top: 0; }
  .faq summary { min-height: 52px; font-size: 14px; padding: 20px 0; gap: 15px; }
  body > footer { padding: 0 20px; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; font-size: 11px; gap: 22px; }
  .footer-links > a { grid-column: 1 / 3; }
  .footer-links > div { flex-direction: column; gap: 12px; }
  .footer-links > div a { min-height: 36px; display: flex; align-items: center; }
  .footer-word { font-size: 31vw; }
  .footer-bottom { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
