/* Eastbasis: an institutional research note. Graphite ink, oxblood accent, Source Serif headlines, system sans text. */
:root {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --tint: #f8f8f5;
  --ink: #1d2230;
  --text: #2a2e37;
  --muted: #6b6f78;
  --rule: #dcdcd6;
  --rule-soft: #e8e8e3;
  --accent: #9a3b2e;
  --dark: #1d2230;
  --dark-text: #e9e9e4;
  --dark-muted: #a9acb3;
  --dark-rule: rgb(255 255 255 / 0.12);

  --serif: "Source Serif 4", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --cjk: "Noto Serif SC", "Songti SC", serif;

  --wrap: 1120px;
  --prose: 680px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: clip;
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) { body { font-size: 18px; } }
::selection { background: var(--ink); color: #fff; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[lang="zh-Hans"] { font-family: var(--cjk); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 30; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 6px; }
.skip:focus-visible { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--prose); }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-optical-sizing: auto; }
h1 { font-weight: 500; font-size: clamp(2.3rem, 4.9vw, 4.25rem); line-height: 1.06; letter-spacing: -0.022em; text-wrap: balance; }
h2 { font-weight: 500; font-size: clamp(1.9rem, 3.3vw, 2.85rem); line-height: 1.1; letter-spacing: -0.018em; text-wrap: balance; }
h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.005em; }
.lead { font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--text); margin-top: 20px; }
.small { font-size: 0.875rem; color: var(--muted); }

/* buttons and links */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  background: var(--ink); color: #fff; border-radius: 6px; text-decoration: none;
  font: 600 1rem/1 var(--sans); letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color 0.2s, transform 0.12s;
}
.button:hover { background: #2c3346; }
.button:active { transform: translateY(1px); }
.button--small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.button--light { background: #fff; color: var(--ink); }
.button--light:hover { background: #e9e9e4; }
.textlink { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 6px; text-decoration-thickness: 1.5px; font-weight: 500; padding-block: 12px; transition: text-decoration-color 0.2s; }
.textlink:hover { text-decoration-color: currentColor; }
.cta { margin-top: clamp(40px, 5vw, 56px); display: flex; justify-content: center; }
.cta--left { justify-content: flex-start; }

/* navigation */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
.nav__bar { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.wordmark { font: 600 1rem/1 var(--serif); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding-block: 12px; }
.nav__links { display: flex; gap: 28px; margin-left: auto; font-size: 0.925rem; }
.nav__links a { text-decoration: none; color: var(--text); padding-block: 12px; }
.nav__links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--rule); }
.nav .button { margin-left: 8px; }

/* hero */
.hero { padding-top: clamp(36px, 5.5vw, 72px); }
.hero__head { grid-column: 1 / -1; }
.hero__head h1 { max-width: 30ch; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); gap: clamp(28px, 3.5vw, 48px) clamp(36px, 5vw, 72px); align-items: start; }
.eyebrow { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }
.hero__sub { margin-top: 4px; color: var(--text); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }
.hero .small { margin-top: 14px; }
.hero__chart figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }

/* charts */
.chartcard { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: clamp(16px, 2.4vw, 28px); }
.chartcard__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 12px; }
.chartcard__title { font: 600 1rem/1.3 var(--serif); color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.chartcard__head .legend { margin-bottom: 0; }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key::before { content: ""; width: 18px; height: 2px; border-radius: 1px; background: var(--ink); }
.key--fees::before { background: var(--accent); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--rule-soft); stroke-width: 1; }
.chart .axis, .chart .tickmark { stroke: var(--rule); stroke-width: 1; }
.chart .tick { font: 400 12px var(--sans); fill: var(--muted); }
.chart .val { font: 500 11px var(--sans); fill: var(--ink); }
.chart .line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .line--costs { stroke: var(--ink); stroke-width: 2.2; }
.chart .line--fees { stroke: var(--accent); stroke-width: 1.6; }
.chart .dot--costs { fill: var(--ink); }
.chart .dot--fees { fill: var(--accent); }
.chart .bar--costs { fill: var(--ink); }
.chart .bar--fees { fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .hero .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s var(--ease) 0.2s forwards; }
  .hero .line--fees { animation-delay: 0.5s; }
  .hero .dot { opacity: 0; animation: fade 0.4s ease 2.2s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* logos */
.logos { margin-top: clamp(56px, 8vw, 104px); padding-block: 28px 8px; border-top: 1px solid var(--rule); }
.logos__label { font-size: 0.85rem; color: var(--muted); text-align: center; }
.logos__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px; margin-top: 24px; }
.logos__row li { display: flex; align-items: center; height: 44px; }
.logos__row img { height: 20px; width: auto; filter: grayscale(1) brightness(0.35) contrast(1.2); opacity: 0.72; transition: opacity 0.2s; }
.logos__row img.logo--tall { height: 36px; }
.logos__row img:hover { opacity: 1; }

/* proof bar */
.proof { margin-top: clamp(40px, 5vw, 64px); }
.proof__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block: 1px solid var(--rule); }
.proof__row > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 28px 24px 28px 0; }
.proof__row > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.proof__row dd { font: 500 clamp(2rem, 3.2vw, 2.75rem)/1 var(--serif); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.proof__row dt { font-size: 0.85rem; line-height: 1.4; color: var(--muted); }

/* sections */
.section { padding-block: var(--section); }
.section--surface { background: var(--surface); }
.section--dark { background: var(--dark); color: var(--dark-text); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .lead, .section--dark .tag, .section--dark p { color: var(--dark-text); }
.section--dark .tag { color: var(--dark-muted); }

.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin-top: clamp(40px, 5vw, 64px); counter-reset: n; }
.three li { border-top: 2px solid var(--ink); padding-top: 20px; counter-increment: n; }
.three li::before { content: counter(n); display: block; font: 500 0.9rem/1 var(--serif); color: var(--accent); margin-bottom: 14px; }
.three h3 { margin-bottom: 8px; }
.three p { color: var(--text); font-size: 0.975rem; }

.close-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: clamp(40px, 5vw, 64px); padding-top: 28px; border-top: 1px solid var(--rule); }
.section--dark .close-row { border-top-color: var(--dark-rule); }
.close-row__text { font: 500 clamp(1.15rem, 1.6vw, 1.35rem)/1.4 var(--serif); color: var(--ink); max-width: 34em; }
.section--dark .close-row__text { color: #fff; }

.offer__head { display: grid; gap: 12px; max-width: var(--prose); }
.tag { font-size: 1rem; color: var(--muted); }

.cards { display: grid; gap: 16px; margin-top: clamp(36px, 4.5vw, 56px); }
.cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards li { background: var(--tint); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 32px); }
.cards h3 { margin-bottom: 10px; }
.cards p { font-size: 0.975rem; color: var(--text); }
.section--dark .cards li { background: rgb(255 255 255 / 0.04); border-color: var(--dark-rule); }
.section--dark .cards p { color: var(--dark-muted); }

.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 56px); position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 1px; background: var(--rule); }
.timeline li { position: relative; padding: 28px 24px 0 0; display: grid; gap: 4px; font-size: 0.975rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.timeline__when { font: 600 1rem/1.3 var(--serif); color: var(--ink); }

.sample { margin-top: clamp(40px, 5vw, 56px); max-width: 760px; }
.contracts { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.contracts caption { text-align: left; font: 600 1rem/1.3 var(--serif); color: var(--ink); padding-bottom: 14px; }
.contracts th, .contracts td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: baseline; }
.contracts thead th { font-weight: 500; font-size: 0.8rem; color: var(--muted); border-bottom-color: var(--rule); padding-top: 0; }
.contracts tbody th { font-weight: 500; color: var(--ink); }
.contracts tbody th span { margin-left: 8px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.contracts .num { text-align: right; padding-right: 0; }
.route { display: inline-flex; align-items: center; gap: 10px; }
.route::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.route--qfi::before { background: transparent; border: 1.5px solid var(--accent); }
.sample figcaption { margin-top: 14px; font-size: 0.85rem; color: var(--muted); max-width: 60ch; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin-top: clamp(36px, 4.5vw, 56px); }
.steps li { display: grid; gap: 16px; align-content: start; }
.steps__n { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font: 500 1.1rem/1 var(--serif); color: var(--ink); }

.founder { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.founder__text p + p { margin-top: 1em; }
.founder__text .lead { margin-top: 0; }
.signature { margin-top: 28px !important; font: 600 1.2rem/1.2 var(--serif); color: var(--ink); }
.signature span { display: block; margin-top: 6px; font: 400 0.9rem/1.4 var(--sans); color: var(--muted); }

.results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: clamp(40px, 5vw, 56px); }
.chartcard--wide { grid-column: 1 / -1; }
.figures { width: 100%; border-collapse: collapse; align-self: start; background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); overflow: hidden; font-size: 0.95rem; }
.figures th, .figures td { padding: 11px 20px; border-bottom: 1px solid var(--rule-soft); text-align: left; font-weight: 400; }
.figures tr:last-child th, .figures tr:last-child td { border-bottom: 0; }
.figures td { text-align: right; font-weight: 600; color: var(--ink); white-space: nowrap; }
.footnote { margin-top: 20px; font-size: 0.8rem; color: var(--muted); max-width: 80ch; }

.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq__list { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; min-height: 44px; font: 600 1.075rem/1.4 var(--serif); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; max-width: 62ch; color: var(--text); }

.book .calendar { margin-top: clamp(32px, 4vw, 48px); background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 8px; }
#cal-inline-30min { width: 100%; min-height: 640px; overflow: auto; }
.calendar__fallback { padding: 24px; color: var(--muted); }
.book .small { margin-top: 20px; }

.footer { border-top: 1px solid var(--rule); padding-block: 40px 96px; }
.footer__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; font-size: 0.9rem; }
.footer__line a { text-underline-offset: 4px; padding-block: 12px; }
.wordmark--footer { padding: 0; margin-right: auto; }
.footer__small { margin-top: 16px; font-size: 0.8rem; color: var(--muted); max-width: 70ch; }

@media (max-width: 1023px) {
  .nav__links { display: none; }
  .nav .button { margin-left: auto; }
  .hero__grid, .founder, .faq, .results { grid-template-columns: minmax(0, 1fr); }
  .proof__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proof__row > div:nth-child(4) { padding-left: 0; border-left: 0; }
  .proof__row > div:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .cards--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .proof__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof__row > div { padding: 20px 16px 20px 0; }
  .proof__row > div + div { padding-left: 16px; }
  .proof__row > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .proof__row > div:nth-child(4) { border-left: 1px solid var(--rule); padding-left: 16px; }
  .proof__row > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .proof__row > div:last-child { grid-column: 1 / -1; }
  .three, .cards--4, .steps, .timeline { grid-template-columns: minmax(0, 1fr); }
  .three { gap: 28px; }
  .timeline::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .timeline li { padding: 0 0 24px 32px; }
  .logos__row { justify-content: center; gap: 20px 32px; }
  .logos__row img { height: 17px; }
  .logos__row img.logo--tall { height: 30px; }
  .actions .button { width: 100%; }
  .close-row .button, .cta .button { width: 100%; }
  .nav .button { padding: 0 14px; }
  .contracts tbody th span { display: block; margin: 2px 0 0; }
  .figures th, .figures td { padding: 10px 14px; }
}
#cal-inline-30min:has(iframe) .calendar__fallback { display: none; }
