:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --surface: #ffffff;
  --ink: #0b0b0d;
  --muted: #5e5e66;
  --line: #d8d7d1;
  --accent: #c83b1b;
  --accent-ink: #ffffff;
  --soft: #eae9e3;
  --focus: #1769ff;
  --max: 1180px;
  --reading: 760px;
  --touch-target: 44px;
  --radius: 24px;
  --shadow: 0 18px 60px rgba(11, 11, 13, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-150%); min-height: var(--touch-target); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: white; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 24%); background: color-mix(in srgb, var(--paper), transparent 8%); backdrop-filter: blur(18px); }
.header-inner { width: min(var(--max), calc(100% - 40px)); min-height: 78px; margin: 0 auto; display: flex; align-items: center; gap: 26px; }
.brand { min-height: var(--touch-target); display: inline-flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 12px; }
.desktop-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-link, .language-link, .footer-group a, .text-links a { min-height: var(--touch-target); display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.nav-link:hover, .language-link:hover, .footer-group a:hover, .text-links a:hover { background: var(--soft); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.language-control, .mobile-menu { position: relative; }
.language-control > summary, .mobile-menu > summary { min-height: var(--touch-target); display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 750; list-style: none; }
.language-control > summary::-webkit-details-marker, .mobile-menu > summary::-webkit-details-marker { display: none; }
.language-list { position: absolute; z-index: 20; top: calc(100% + 10px); inset-inline-end: 0; width: 220px; max-height: min(70vh, 480px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); display: grid; }
[dir="rtl"] .language-list { left: 0; right: auto; }
.language-link[aria-current="page"] { background: var(--ink); color: white; }
.mobile-menu { display: none; margin-inline-start: auto; }
.mobile-menu > nav { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 28px)); padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); display: grid; }

.button { min-height: var(--touch-target); display: inline-flex; align-items: center; justify-content: center; padding: 11px 19px; border: 1px solid var(--ink); border-radius: 999px; font-size: 15px; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; transition: transform 150ms ease, opacity 150ms ease; }
.button:hover { opacity: 0.78; }
.button:active { transform: scale(0.98); }
.button--primary { background: var(--ink); color: white; }
.button--secondary { background: transparent; color: var(--ink); }
.button--small { padding-inline: 15px; font-size: 13px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.site-main { min-height: 70vh; }
.page-shell, .article-shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.article-shell { max-width: 1040px; }
.hero { padding: clamp(70px, 10vw, 142px) 0 clamp(62px, 9vw, 116px); }
.hero--home { max-width: 1000px; }
.hero--compact, .hero--article { max-width: 900px; padding-bottom: 70px; }
.eyebrow, .card-kicker { margin: 0 0 16px; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; overflow-wrap: anywhere; font-weight: 850; line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
h1 { max-width: 1000px; margin-bottom: 26px; font-size: clamp(46px, 8vw, 96px); }
.hero--compact h1, .hero--article h1 { font-size: clamp(42px, 6.6vw, 76px); }
h2 { font-size: clamp(31px, 4.6vw, 54px); }
h3 { font-size: clamp(21px, 2.5vw, 30px); }
p { margin: 0 0 1.15em; }
.hero-lede, .hero > p:not(.eyebrow) { max-width: 780px; color: var(--muted); font-size: clamp(19px, 2.2vw, 25px); line-height: 1.5; letter-spacing: -0.018em; }
.breadcrumbs { min-height: var(--touch-target); padding-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { min-height: var(--touch-target); display: inline-flex; align-items: center; }

.content-section { padding: clamp(62px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.section--tint { position: relative; isolation: isolate; }
.section--tint::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--soft); box-shadow: 0 0 0 100vmax var(--soft); clip-path: inset(0 -100vmax); }
.section-heading { max-width: 800px; margin-bottom: 42px; }
.section-heading > p { color: var(--muted); }
.feature-grid, .card-grid, .pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-grid > article, .editorial-card, .price-card { min-width: 0; padding: clamp(24px, 3vw, 38px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 rgba(11, 11, 13, 0.03); }
.feature-grid > article > span { color: var(--accent); font: 750 12px ui-monospace, monospace; text-transform: uppercase; }
.editorial-card { display: flex; flex-direction: column; }
.editorial-card p { color: var(--muted); }
.editorial-card h3 a { text-decoration: none; }
.editorial-card h3 a::after { content: ""; position: absolute; inset: 0; }
.editorial-card { position: relative; transition: transform 180ms ease, box-shadow 180ms ease; }
.editorial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.text-link { margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 800; }
.text-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page--404 .text-links { margin-top: 28px; }
.process-list { max-width: 920px; margin: 0; padding: 0; list-style: none; }
.process-list li { display: grid; grid-template-columns: 70px 1fr; gap: 18px; padding: 28px 0; border-top: 1px solid var(--line); }
.process-list li > span { color: var(--accent); font: 750 14px ui-monospace, monospace; }

.article-layout { display: grid; grid-template-columns: minmax(0, var(--reading)) 230px; align-items: start; gap: 50px; }
.article-copy { min-width: 0; }
.article-section { padding: 42px 0; border-top: 1px solid var(--line); }
.article-section h2 { font-size: clamp(28px, 4vw, 44px); }
.article-section p, .article-section li { color: #303038; }
.category-copy { max-width: var(--reading); }
.author-card { position: sticky; top: 104px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.author-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.author-card a { min-height: var(--touch-target); display: inline-flex; align-items: center; font-weight: 850; }
.author-card p { color: var(--muted); font-size: 14px; }
.media-frame { margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.media-frame img { max-height: 420px; margin: auto; object-fit: contain; }
.media-frame figcaption { padding: 12px 18px; color: var(--muted); font-size: 13px; }
.price { color: var(--accent); font-size: 24px; font-weight: 850; }
.citations a, .references a { min-height: var(--touch-target); display: inline-flex; align-items: center; font-weight: 750; }
.references li { margin-bottom: 12px; }
.references li span { display: block; color: var(--muted); font-size: 13px; }
.disclosure { padding: 24px; border-left: 4px solid var(--accent); background: var(--soft); color: var(--muted); font-size: 14px; }

.faq-list { max-width: 900px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { min-height: var(--touch-target); padding: 22px 48px 22px 0; cursor: pointer; font-size: 18px; font-weight: 800; list-style-position: outside; }
[dir="rtl"] .faq-item summary { padding-right: 0; padding-left: 48px; }
.faq-item p { max-width: var(--reading); padding-bottom: 22px; color: var(--muted); }
.contact-panel { margin: clamp(60px, 10vw, 130px) 0; padding: clamp(30px, 6vw, 72px); border-radius: 32px; background: var(--accent); color: var(--accent-ink); display: grid; grid-template-columns: 1.4fr 0.8fr; align-items: end; gap: 40px; }
.contact-panel .eyebrow, .contact-panel small { color: inherit; }
.contact-panel .button--primary { background: white; border-color: white; color: var(--ink); }
.contact-panel .button--secondary { border-color: white; color: white; }
.contact-panel :focus-visible { outline-color: white; }

.site-footer { margin-top: 80px; padding: 64px max(20px, calc((100vw - var(--max)) / 2)) 30px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 30px; }
.footer-grid > div p { max-width: 430px; color: var(--muted); font-size: 14px; }
.footer-group { display: grid; align-content: start; }
.footer-group h2 { margin-bottom: 8px; font-size: 14px; letter-spacing: 0; }
.footer-group a { padding-inline: 0; }
.copyright { margin-top: 42px; color: var(--muted); font-size: 13px; }

@media (max-width: 980px) {
  .desktop-nav, .header-actions { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu > nav { max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; }
  .mobile-menu .language-control { margin-block: 8px; }
  .mobile-menu .language-control > summary { width: 100%; justify-content: space-between; }
  .mobile-menu .language-list { position: static; width: 100%; max-height: min(46dvh, 360px); margin-top: 8px; box-shadow: none; }
  .mobile-menu .mobile-contact { width: 100%; margin-top: 8px; }
  .feature-grid, .card-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; }
  .author-card { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .header-inner, .page-shell, .article-shell { width: min(100% - 28px, var(--max)); }
  .brand span { display: none; }
  .hero { padding-top: 62px; }
  .feature-grid, .card-grid, .pricing-grid { grid-template-columns: 1fr; }
  .process-list li { grid-template-columns: 44px 1fr; }
  .contact-panel { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; }
  .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media (prefers-contrast: more) {
  :root { --line: #67676d; --muted: #303036; }
}
