/* Nature research notebook: keep the established paper/forest palette, serif
   headings and compact mono labels. Spacing follows a 4/8px rhythm; motion is
   finite, optional and reserved for arrival, selection and direct feedback. */
:root {
  color-scheme: light;
  --paper: #f6f5ef;
  --surface: #fffefa;
  --ink: #24352f;
  --muted: #5e6c62;
  --green: #244d40;
  --green-hover: #193c31;
  --terracotta: #a8583f;
  --line: #d5d9ce;
  --pale-green: #e7ece3;
  --on-green: #f7f7ef;
  --on-green-muted: #d0ddd2;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius-control: 4px;
  --radius-panel: 8px;
  --feedback: 160ms cubic-bezier(.2, .7, .3, 1);
  --lift: 200ms cubic-bezier(.33, 1, .68, 1);
  --arrival: 600ms cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 32px; }
html[data-motion="on"] { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: #d5d9ce; }
button { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: #d5d9ce; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
::selection { background: #cbd9c7; color: #193c31; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 5px; }
section { scroll-margin-top: 32px; }
.page-width { width: calc(100% - 112px); max-width: 1200px; margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 16px; padding: 12px 20px; background: var(--green); color: var(--on-green); transform: translateY(calc(-100% - 24px)); }
.skip-link:focus { transform: translateY(0); }

/* Masthead */
.site-header { min-height: 104px; display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; margin-right: auto; min-height: 44px; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--green); color: var(--paper); font: 19px Georgia, serif; letter-spacing: -1px; border-radius: 2px; }
.brand-mark > span { color: #d5c29e; padding-inline: 2px; }
.brand-name { font: 600 29px/1.1 Georgia, serif; letter-spacing: -.8px; }
.brand-caption { margin-left: 8px; padding-left: 20px; border-left: 1px solid var(--line); color: var(--muted); font: 9px/1.7 var(--font-mono); letter-spacing: 1px; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: 12px; }
.main-nav a { display: flex; align-items: center; gap: 8px; min-height: 44px; transition: color var(--feedback); }
.main-nav a span { color: var(--muted); }
.main-nav .nav-chat { padding-inline: 14px; border: 1px solid var(--line); border-radius: var(--radius-control); font: 12px/1.5 var(--font-mono); }
.motion-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-height: 44px; padding: 0 0 0 20px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; line-height: 1.4; }
.motion-toggle svg { width: 18px; height: 18px; }
.motion-state { display: block; font-size: 9px; }
.motion-toggle[aria-pressed="false"] svg { opacity: .5; }
.motion-toggle:disabled { cursor: default; }

/* Editorial introduction and its hand-marked title. */
.intro { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); align-items: center; gap: 64px; padding-block: 72px 64px; }
.intro-copy, .research-figure { min-width: 0; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; letter-spacing: 1px; margin-bottom: 24px; }
.eyebrow-line { width: 24px; height: 1px; background: var(--terracotta); }
.eyebrow-divider { color: #8b9688; }
.eyebrow [lang="en"] { font: 10px/1.5 var(--font-mono); letter-spacing: 1px; }
h1 { font-family: var(--font-display); font-size: clamp(42px, 4.7vw, 64px); font-weight: 500; line-height: 1.42; letter-spacing: -.045em; }
.title-emphasis { position: relative; display: inline-block; isolation: isolate; color: var(--green); }
.title-annotation { position: absolute; z-index: -1; left: -4%; bottom: -.06em; width: 108%; height: .37em; }
.annotation-wash { stroke: #dbe2cd; stroke-width: 14; opacity: .75; }
.annotation-line { stroke: var(--terracotta); stroke-width: 1.3; stroke-linecap: round; }
.intro-description { margin-top: 28px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
.primary-link { display: inline-flex; justify-content: space-between; align-items: center; gap: 32px; min-height: 52px; padding: 12px 20px; border: 1px solid var(--green); border-radius: var(--radius-control); background: var(--green); color: var(--on-green); font-size: 14px; font-weight: 500; transition: background-color var(--feedback), box-shadow var(--lift), transform var(--lift); }
.primary-link svg { width: 20px; height: 20px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--green); font-size: 12px; }
.text-link span { color: var(--terracotta); }
.intro-footnote { display: flex; align-items: center; gap: 8px; margin-top: 28px; color: var(--muted); font-size: 11px; }
.intro-footnote > span { color: var(--terracotta); font-size: 18px; line-height: 1; }

/* Original field-map illustration; real HTML buttons sit on the SVG paths. */
.research-figure { width: 100%; max-width: 520px; justify-self: end; padding-top: 4px; }
.figure-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.figure-heading [lang="en"] { font: 10px/1.5 var(--font-mono); letter-spacing: 1px; }
.research-map { position: relative; margin-block: 8px 4px; }
.map-art { width: 100%; height: auto; }
.map-dot-field { color: #bec8b7; opacity: .65; }
.map-contours { stroke: #c1cbb8; stroke-width: .8; }
.map-contours path:nth-child(2) { stroke: #ccd4c4; }
.map-contours path:nth-child(4) { stroke: #d0d8c8; }
.map-botanical { stroke: #7e9479; stroke-width: 1.15; fill: #e8ecdf; }
.map-guides { stroke: #adb9a5; stroke-width: .8; }
.map-route { stroke: #b0bea9; stroke-width: 1.4; stroke-dasharray: .035 .035; transition: stroke var(--feedback); }
.map-island { fill: #e2e9d8; stroke: #849d7e; stroke-width: 1; }
.map-island-inner { stroke: #b6c4aa; stroke-width: .8; }
.map-monogram { fill: var(--green); font: 46px Georgia, serif; letter-spacing: -3px; }
.map-monogram tspan { fill: var(--terracotta); }
.map-center-label { fill: var(--muted); font: 7px var(--font-mono); letter-spacing: 2px; }
.route-node { fill: var(--paper); stroke: #9eb092; stroke-width: 1.2; transition: fill var(--feedback), stroke var(--feedback); }
.map-note { fill: var(--muted); font: 8px var(--font-mono); letter-spacing: 1.4px; }
.map-north { fill: var(--terracotta); }
.map-button { position: absolute; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 100px; min-height: 44px; padding: 8px 12px; border: 1px solid #aab9a1; border-radius: var(--radius-control); background: var(--paper); font-size: 13px; box-shadow: 0 3px 0 #d9dfd060; transition: color var(--feedback), background-color var(--feedback), border-color var(--feedback), transform var(--lift), box-shadow var(--lift); }
.map-read { left: 10.2%; top: 18%; }
.map-ask { right: 9.5%; top: 22%; }
.map-analyze { right: 15%; bottom: 13%; }
.map-button-number { font: 9px/1 var(--font-mono); opacity: .8; }
.map-button-mark { font-size: 14px; }
.map-button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--on-green); box-shadow: 0 4px 12px #244d4018; }
.map-button:disabled { cursor: default; }
.research-figure[data-mode="read"] .route-read, .research-figure[data-mode="ask"] .route-ask, .research-figure[data-mode="analyze"] .route-analyze { stroke: var(--terracotta); stroke-width: 1.8; stroke-dasharray: 1; }
.research-figure[data-mode="read"] .node-read, .research-figure[data-mode="ask"] .node-ask, .research-figure[data-mode="analyze"] .node-analyze { fill: var(--terracotta); stroke: var(--paper); stroke-width: 2; }
.research-figure figcaption { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: baseline; gap: 12px; min-height: 52px; padding-top: 16px; border-top: 1px solid var(--line); }
.caption-index { color: var(--terracotta); font: 10px/1.6 var(--font-mono); letter-spacing: .3px; }
.caption-copy { color: var(--muted); font-size: 11px; line-height: 1.8; }
.map-hint { color: var(--muted); text-align: right; font-size: 10px; margin-top: 4px; }
.map-hint span { color: var(--terracotta); margin-left: 6px; }

/* A prominent conversation workspace, alongside a compact service directory. */
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; padding-top: 24px; margin-bottom: 28px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 20px; }
.section-index { color: var(--terracotta); font: 11px/1.5 var(--font-mono); letter-spacing: .5px; }
h2 { font: 500 27px/1.5 var(--font-display); letter-spacing: -.025em; }
.section-note { color: var(--muted); text-align: right; font-size: 11px; }
.section-note > span[aria-hidden] { color: var(--terracotta); padding-left: 8px; }
.new-tab-description { display: block; margin-top: 2px; font-size: 9px; opacity: .85; }
.tools-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; }
.featured-tool { position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; padding: 28px 32px 24px; border: 1px solid var(--green); border-radius: var(--radius-panel); color: var(--on-green); background: var(--green); transition: background-color var(--feedback), box-shadow var(--lift), transform var(--lift); }
.featured-tool::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(340px circle at var(--spot-x, 50%) var(--spot-y, 50%), #c9ddaa20, transparent 75%); opacity: 0; transition: opacity var(--feedback); }
.featured-tool.is-spotlit::before { opacity: 1; }
.featured-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.featured-label { display: inline-flex; align-items: center; gap: 8px; color: var(--on-green-muted); font-size: 11px; letter-spacing: .5px; }
.featured-dot { width: 5px; height: 5px; border: 1px solid #d5c29e; transform: rotate(45deg); }
.featured-code { color: var(--on-green-muted); font: 9px/1.5 var(--font-mono); letter-spacing: 1px; }
.featured-body { padding-block: 24px 28px; flex: 1; }
.featured-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.featured-body h3 { min-width: 0; font: 400 clamp(34px, 3.5vw, 46px)/1.3 Georgia, serif; letter-spacing: -1.2px; }
.chat-symbol { width: 48px; height: 48px; color: #bdcdb3; }
.featured-body p { margin-top: 16px; color: var(--on-green-muted); font-size: 13px; line-height: 1.9; }
.topic-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; font-size: 10px; }
.topic-list li { padding: 4px 10px; border: 1px solid #668473; border-radius: 2px; color: #e4ebdc; }
.featured-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 16px; border-top: 1px solid #527365; padding-top: 20px; }
.service-domain { font: 11px/1.5 var(--font-mono); letter-spacing: .1px; overflow-wrap: anywhere; }
.featured-bottom > .service-domain { color: var(--on-green-muted); }
.featured-action { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.arrow-box { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #7a9486; border-radius: var(--radius-control); font-size: 21px; transition: background-color var(--feedback), color var(--feedback), transform var(--lift); }
.featured-tool:focus-visible { outline-color: var(--terracotta); outline-offset: 5px; }
.service-directory { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); min-width: 0; border-top: 1px solid var(--line); }
.service-link { display: grid; grid-template-columns: 24px minmax(0, 1fr) 36px; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); padding: 20px 12px; transition: background-color var(--feedback), transform var(--lift); }
.service-number { align-self: start; padding-top: 4px; color: var(--terracotta); font: 10px/1.8 var(--font-mono); }
.service-content { min-width: 0; }
.service-content h3 { font-size: 18px; font-weight: 500; line-height: 1.5; }
.service-content p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.service-content .service-domain { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.service-arrow { align-self: center; justify-self: end; color: var(--green); font-size: 24px; transition: transform var(--lift); }

/* A small field guide, with typography instead of another card grid. */
.method-section { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 2.15fr); gap: 48px; margin-top: 72px; padding-block: 32px 48px; border-top: 1px solid var(--line); }
.method-heading .section-index { display: block; margin-bottom: 16px; font-size: 10px; }
.method-heading h2 { font-size: 25px; }
.method-heading p { margin-top: 12px; color: var(--muted); font-size: 12px; }
.method-sprig { width: 64px; height: 56px; margin-top: 16px; color: #7c9276; }
.method-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; list-style: none; margin: 0; padding: 0; }
.method-list li { min-width: 0; padding-top: 4px; }
.method-number { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--terracotta); font: italic 22px/1.5 Georgia, serif; }
.method-number > span { color: var(--muted); font: 9px/1.5 var(--font-mono); letter-spacing: 1px; }
.method-list h3 { margin-bottom: 12px; font-size: 15px; font-weight: 500; }
.method-list p { color: var(--muted); font-size: 12px; line-height: 1.95; }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; min-height: 100px; padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-signature { display: flex; align-items: center; gap: 16px; }
.footer-name { color: var(--green); font: 600 22px/1.5 Georgia, serif; letter-spacing: -.5px; }
.footer-name > span { color: var(--terracotta); }
.site-footer > p { font: italic 14px/1.5 Georgia, serif; letter-spacing: .3px; }
.back-to-top { display: flex; align-items: center; gap: 12px; min-height: 44px; }

/* Visible by default. JS only arms reveals after observing an element. */
html[data-motion="on"] .hero-enter { animation: enter var(--arrival) both; animation-delay: calc(var(--order, 0) * 70ms); }
html[data-motion="on"] .annotation-wash { transform-origin: left center; animation: mark-wash 1000ms cubic-bezier(.22, 1, .36, 1) 240ms both; }
html[data-motion="on"] .annotation-line { stroke-dasharray: 1; animation: draw-line 1600ms cubic-bezier(.22, 1, .36, 1) 240ms both; }
html[data-motion="on"] [data-reveal].is-pending { opacity: 0; transform: translateY(16px); }
html[data-motion="on"] [data-reveal].is-revealed { animation: enter 500ms cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(var(--order, 0) * 65ms); }
html[data-motion="on"] .research-figure.is-changing[data-mode="read"] .route-read, html[data-motion="on"] .research-figure.is-changing[data-mode="ask"] .route-ask, html[data-motion="on"] .research-figure.is-changing[data-mode="analyze"] .route-analyze { animation: draw-line 500ms cubic-bezier(.16, 1, .3, 1) both; }
html[data-motion="on"] .research-figure.is-changing figcaption { animation: caption-in 400ms cubic-bezier(.16, 1, .3, 1) both; }
html[data-page-hidden="true"] *, html[data-page-hidden="true"] *::before, html[data-page-hidden="true"] *::after { animation-play-state: paused !important; }
[data-reveal]:focus-within { opacity: 1 !important; transform: none !important; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mark-wash { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes caption-in { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover, .back-to-top:hover, .text-link:hover, .motion-toggle:not(:disabled):hover { color: var(--terracotta); }
  .primary-link:hover { background: var(--green-hover); box-shadow: 0 6px 16px #244d4018; }
  .featured-tool:hover { background-color: #214839; box-shadow: 0 12px 28px #24352f16; }
  html[data-motion="on"] .primary-link:hover, html[data-motion="on"] .featured-tool:hover { transform: translateY(-3px); }
  .featured-tool:hover .arrow-box { background: var(--paper); color: var(--green); }
  .service-link:hover { background: var(--pale-green); }
  html[data-motion="on"] .service-link:hover .service-arrow { transform: translate(3px, -3px); }
  .map-button:not(:disabled):hover { border-color: var(--green); box-shadow: 0 6px 14px #244d4018; }
  html[data-motion="on"] .map-button:not(:disabled):hover { transform: translateY(-2px); }
}
.primary-link:active, .featured-tool:active { background: var(--green-hover); box-shadow: none; }
html[data-motion="on"] .primary-link:active, html[data-motion="on"] .featured-tool:active, html[data-motion="on"] .map-button:not(:disabled):active { transform: translateY(1px); }
.service-link:active { background: var(--pale-green); }

@media (max-width: 1100px) {
  .page-width { width: calc(100% - 72px); }
  .site-header { gap: 20px; }
  .brand-caption { display: none; }
  .intro { gap: 40px; padding-block: 56px; }
  h1 { font-size: clamp(38px, 4.8vw, 54px); }
  .intro-actions { gap: 20px; }
  .primary-link { gap: 24px; }
  .text-link { font-size: 11px; }
  .tools-grid { gap: 32px; }
  .featured-tool { padding-inline: 28px; }
  .service-link { gap: 16px; }
  .method-section { gap: 32px; }
  .method-list { gap: 24px; }
}

@media (max-width: 820px) {
  .page-width { width: calc(100% - 48px); }
  .site-header { min-height: 88px; gap: 16px; }
  .main-nav { gap: 20px; }
  .main-nav .nav-chat { display: none; }
  .motion-toggle { padding-left: 16px; }
  .intro { grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 24px; padding-block: 48px; }
  h1 { font-size: clamp(32px, 4.8vw, 40px); }
  .eyebrow { gap: 8px; font-size: 10px; margin-bottom: 20px; }
  .eyebrow [lang="en"] { font-size: 9px; }
  .eyebrow-line { width: 16px; }
  .intro-description { font-size: 12px; margin-top: 24px; }
  .desktop-break { display: none; }
  .intro-actions { margin-top: 24px; gap: 8px 16px; }
  .primary-link { min-height: 48px; padding-inline: 16px; font-size: 13px; }
  .intro-footnote { margin-top: 20px; font-size: 10px; }
  .figure-heading { font-size: 10px; gap: 8px; }
  .figure-heading [lang="en"] { font-size: 9px; }
  .map-button { min-width: 84px; padding-inline: 8px; gap: 6px; font-size: 12px; }
  .map-button-number { font-size: 8px; }
  .map-button-mark { font-size: 12px; }
  .map-read { left: 6%; top: 14%; }
  .map-ask { right: 4%; top: 19%; }
  .map-analyze { right: 11%; bottom: 10%; }
  .research-figure figcaption { grid-template-columns: minmax(0, 1fr); gap: 4px; min-height: 68px; padding-top: 12px; }
  .caption-copy { font-size: 10px; }
  .map-hint { font-size: 9px; }
  h2 { font-size: 24px; }
  .section-title { gap: 16px; }
  .tools-grid { gap: 24px; }
  .featured-tool { padding: 24px; }
  .featured-title-row { gap: 12px; }
  .featured-body h3 { font-size: 34px; }
  .chat-symbol { width: 36px; height: 36px; }
  .featured-body p { font-size: 12px; }
  .featured-code { font-size: 8px; }
  .service-link { grid-template-columns: 20px minmax(0, 1fr) 24px; gap: 12px; padding-inline: 4px; }
  .service-content h3 { font-size: 16px; }
  .service-content p { font-size: 11px; }
  .method-section { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 56px; }
  .method-heading { position: relative; padding-right: 88px; }
  .method-heading .section-index { margin-bottom: 12px; }
  .method-heading h2 { font-size: 24px; }
  .method-heading p { margin-top: 8px; }
  .method-sprig { position: absolute; right: 8px; bottom: 0; }
}

@media (max-width: 620px) {
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; padding-top: 16px; }
  .brand { margin: 0; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; font-size: 18px; }
  .brand-name { font-size: 27px; }
  .motion-toggle { grid-column: 2; grid-row: 1; border: 0; padding: 0 0 0 8px; min-width: 60px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 16px; padding-block: 8px; font-size: 11px; }
  .main-nav .nav-chat { display: flex; border: 0; padding: 0; font-size: 11px; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 40px; }
  h1 { font-size: clamp(38px, 10vw, 54px); line-height: 1.4; letter-spacing: -.05em; }
  .eyebrow { margin-bottom: 20px; }
  .intro-description { max-width: 400px; font-size: 13px; margin-top: 24px; }
  .desktop-break { display: block; }
  .intro-actions { gap: 20px; }
  .primary-link { min-height: 52px; padding-inline: 18px; gap: 28px; }
  .text-link { font-size: 11px; gap: 8px; }
  .intro-footnote { margin-top: 20px; }
  .research-figure { max-width: 420px; justify-self: center; }
  .research-map { max-width: 380px; margin-inline: auto; }
  .figure-heading { font-size: 10px; }
  .map-button { min-width: 88px; gap: 8px; font-size: 12px; }
  .map-read { left: 8%; top: 16%; }
  .map-ask { right: 6%; top: 21%; }
  .map-analyze { right: 13%; bottom: 11%; }
  .research-figure figcaption { grid-template-columns: 84px minmax(0, 1fr); gap: 8px; min-height: 52px; }
  .caption-index { font-size: 9px; }
  .caption-copy { font-size: 10px; }
  .map-hint { margin-top: 0; }
  .section-heading { align-items: flex-start; gap: 8px; padding-top: 20px; margin-bottom: 24px; }
  .section-title { gap: 12px; }
  h2 { font-size: 23px; }
  .section-note { flex-basis: 100%; padding-left: 40px; text-align: left; font-size: 10px; }
  .new-tab-description { display: inline; margin: 0 0 0 12px; font-size: 9px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .featured-tool { padding: 24px; }
  .featured-body { padding-block: 24px; }
  .featured-body h3 { font-size: 38px; }
  .chat-symbol { width: 44px; height: 44px; }
  .featured-body p { font-size: 12px; }
  .featured-bottom { padding-top: 16px; }
  .featured-action { gap: 12px; }
  .service-directory { grid-template-rows: none; }
  .service-link { grid-template-columns: 24px minmax(0, 1fr) 32px; gap: 16px; padding: 24px 4px; }
  .service-content h3 { font-size: 17px; }
  .service-content p { font-size: 12px; }
  .method-section { gap: 28px; margin-top: 40px; padding-block: 28px 40px; }
  .method-heading h2 { font-size: 24px; }
  .method-list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .method-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding-top: 0; }
  .method-number { flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; font-size: 24px; }
  .method-number > span { font-size: 8px; letter-spacing: .5px; }
  .method-list h3 { margin-bottom: 6px; }
  .method-list p { max-width: 380px; }
  .site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 24px; }
  .footer-signature { gap: 12px; font-size: 10px; }
  .site-footer > p { grid-column: 1; font-size: 12px; }
  .back-to-top { grid-column: 2; grid-row: 1 / span 2; gap: 8px; font-size: 10px; }
}

@media (max-width: 380px) {
  .page-width { width: calc(100% - 40px); }
  .intro-actions { gap: 8px 16px; }
  .primary-link { gap: 20px; padding-inline: 16px; }
  .featured-tool { padding: 20px; }
  .featured-body h3 { font-size: 34px; }
  .chat-symbol { width: 36px; height: 36px; }
  .featured-code { letter-spacing: .5px; }
  .new-tab-description { display: block; margin: 3px 0 0; }
}

html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] .is-pending { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html[data-motion="on"] { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html[data-motion="on"] [data-reveal].is-pending { opacity: 1; transform: none; }
  html[data-motion="on"] .primary-link:hover, html[data-motion="on"] .featured-tool:hover, html[data-motion="on"] .map-button:hover, html[data-motion="on"] .service-link:hover .service-arrow, html[data-motion="on"] .primary-link:active, html[data-motion="on"] .featured-tool:active, html[data-motion="on"] .map-button:active { transform: none; }
  .featured-tool::before { display: none; }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .brand-mark, .primary-link, .featured-tool, .map-button, .topic-list li, .arrow-box { border: 1px solid ButtonText; }
  .map-button[aria-pressed="true"] { border: 3px solid Highlight; }
  .map-island, .route-node { fill: Canvas; stroke: CanvasText; }
  .map-monogram, .map-center-label, .map-note { fill: CanvasText; }
  .map-monogram tspan { fill: CanvasText; }
  .map-route, .map-contours, .map-botanical, .map-island-inner { stroke: GrayText; }
  .research-figure[data-mode="read"] .route-read, .research-figure[data-mode="ask"] .route-ask, .research-figure[data-mode="analyze"] .route-analyze { stroke: Highlight; }
  .annotation-line { stroke: CanvasText; }
  .featured-tool::before, .annotation-wash, .map-dot-field { display: none; }
}

/* A fifth tool entry keeps the original four destinations and masthead intact. */
.network-banner { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-top: 24px; padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--pale-green); transition: background-color var(--feedback), border-color var(--feedback); }
.network-banner > div { min-width: 0; }
.network-banner h3 { font: 500 21px/1.5 var(--font-display); }
.network-banner p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.network-banner-action { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--green); border-radius: var(--radius-control); color: var(--green); font-size: 12px; }
@media (hover: hover) { .network-banner:hover { background: #dee7d8; border-color: #a7b59f; } }
.network-banner:active { background: #d3dfcc; }
@media (max-width: 820px) { .network-banner { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; padding: 24px; } .network-banner > .section-index { grid-column: 1 / -1; } }
@media (max-width: 620px) { .network-banner { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 12px; } .network-banner h3 { font-size: 20px; } .network-banner-action { justify-self: start; margin-top: 4px; } }
@media (prefers-reduced-motion: reduce) { .network-banner { transition: none; } }

/* Research demonstration: original chart assets, readable records, progressive tabs. */
.product-intro { grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: 48px; padding-block: 48px 56px; }
.product-intro h1 { font-size: clamp(36px, 4.1vw, 54px); line-height: 1.35; }
.product-intro .intro-description { max-width: 440px; font-size: 14px; margin-top: 24px; }
.product-intro .intro-footnote { margin-top: 16px; }
.demo-anchor { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 52px; padding: 12px 20px; border: 1px solid var(--green); border-radius: var(--radius-control); font-size: 14px; color: var(--green); transition: background-color var(--feedback); }
.demo-anchor:hover, .demo-anchor:active { background: var(--pale-green); }
.capability-labels { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; color: var(--muted); font-size: 11px; }
.capability-labels li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 2px; }
.demo-preview { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); box-shadow: 0 8px 0 #e7ece37a; }
.preview-caption { display: flex; gap: 16px; padding-block: 24px; }
.preview-marker { color: var(--terracotta); font: 34px/1.2 Georgia, serif; }
.preview-caption h2 { font-size: 27px; }
.preview-caption p { margin-top: 12px; font: 11px/1.8 var(--font-mono); color: var(--muted); }
.chart-link { display: block; min-width: 0; border: 1px solid var(--line); background: white; border-radius: var(--radius-control); }
.chart-link img { display: block; width: 100%; height: auto; }
.chart-link > span { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; padding: 8px 12px; background: var(--pale-green); color: var(--green); font-size: 11px; transition: background-color var(--feedback); }
.chart-link:hover > span { background: #dbe5d5; }
.demo-preview figcaption { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 20px; font-size: 10px; color: var(--muted); }
.preview-check::before { content: '✓'; margin-right: 6px; color: var(--terracotta); }
.demo-section { padding-bottom: 56px; }
.demo-introduction { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; margin-bottom: 24px; }
.demo-introduction > p { flex: 1 1 500px; max-width: 760px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.demo-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.demo-tabs a { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; min-height: 56px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--green); font-size: 13px; transition: background-color var(--feedback), color var(--feedback), border-color var(--feedback); }
.demo-tabs a span { font: 10px/1.5 var(--font-mono); }
.demo-tabs a:hover { border-color: var(--green); }
.demo-tabs a[aria-selected="true"] { background: var(--green); color: var(--on-green); border-color: var(--green); }
.demo-panel { padding: 28px; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
html[data-motion="on"] .demo-panel.is-selected { animation: caption-in 280ms cubic-bezier(.16, 1, .3, 1) both; }
.demo-panel h3 { font-size: 18px; font-weight: 500; }
.demo-panel p, .data-checklist ul { font-size: 12px; color: var(--muted); line-height: 1.9; }
.demo-data-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.demo-data-grid > * { min-width: 0; }
.data-sheet { padding: 24px; background: var(--pale-green); border: 1px solid var(--line); border-radius: var(--radius-control); }
.small-mono { font: 9px/1.8 var(--font-mono) !important; letter-spacing: 1px; }
.data-sheet h3 { margin-top: 16px; }
.sample-design { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block: 24px; }
.sample-design div { display: grid; text-align: center; }
.sample-design strong { font: 32px/1.3 Georgia, serif; color: var(--green); }
.sample-design span { font-size: 11px; color: var(--muted); }
.sample-design > span { color: var(--terracotta); }
.data-checklist ul { margin-block: 16px 24px; padding-left: 20px; }
.data-checklist li { margin-block: 8px; }
.demo-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.demo-panel-heading p { margin-top: 8px; }
.case-label { padding: 4px 8px; background: var(--pale-green); color: var(--green); font-size: 10px; border-radius: 2px; }
.result-figure + .result-figure { margin-top: 28px; }
.result-figure figcaption { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; color: var(--muted); font-size: 12px; }
.anova-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.anova-table caption { text-align: left; color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.anova-table th, .anova-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; }
.anova-table thead th { background: var(--pale-green); font-weight: 500; color: var(--green); }
.anova-table th:first-child, .anova-table td:nth-child(2), .anova-table th:nth-child(2) { text-align: left; }
.anova-table tbody th { font: 12px/1.8 var(--font-mono); color: var(--green); }
.anova-table .factor-end > * { border-bottom-color: #aab9a1; border-bottom-width: 2px; }
.statistics-note { margin-top: 20px; padding-left: 16px; border-left: 2px solid var(--terracotta); }
.demo-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; }
.demo-bottom > p { color: var(--muted); font-size: 11px; }
.capability-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 28px 0 0; padding: 20px 0 0; list-style: none; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; gap: 16px; }
.capability-flow li { min-width: 0; }
.capability-flow li:not(:last-child)::after { content: '→'; color: var(--terracotta); margin-left: 16px; }
.research-home .service-directory { grid-template-rows: none; grid-auto-rows: minmax(0, 1fr); }
.research-method { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
.research-method .method-heading { padding-right: 0; }
.research-method .method-list { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 32px; }
.research-method .method-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; }
.research-method .method-number { flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; }
.research-method .method-list h3 { margin-bottom: 4px; }
.chart-dialog { width: min(1200px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); color: var(--ink); }
.chart-dialog::backdrop { background: #142a24bd; }
.chart-dialog-heading, .chart-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chart-dialog-heading h2 { font-size: 22px; }
.chart-dialog button, .chart-dialog-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); font-size: 12px; background: var(--pale-green); }
.chart-dialog-hint { margin-top: 12px; color: var(--muted); font-size: 11px; }
.chart-dialog-image { margin-block: 20px; overflow: auto; max-height: 64vh; background: white; }
.chart-dialog-image img { display: block; width: 100%; height: auto; }
.chart-dialog-image.is-zoomed img { width: 1900px; max-width: none; }
@media (max-width: 1000px) { .product-intro { gap: 32px; } .product-intro h1 { font-size: 40px; } .demo-preview { padding: 20px; } .preview-caption h2 { font-size: 24px; } .demo-data-grid { gap: 24px; } }
@media (max-width: 760px) { .product-intro { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 36px 48px; } .product-intro h1 { font-size: clamp(36px, 7.8vw, 48px); } .product-intro .intro-description { max-width: 520px; } .demo-preview { max-width: 600px; width: 100%; } .preview-caption { padding-block: 20px; } .demo-data-grid, .research-method { grid-template-columns: minmax(0, 1fr); } .research-method .research-figure { justify-self: center; max-width: 420px; } .capability-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .demo-tabs a { gap: 8px; } }
@media (max-width: 480px) { .demo-preview { padding: 16px; } .demo-preview .figure-heading { flex-wrap: wrap; gap: 4px 12px; } .demo-panel { padding: 16px 12px; } .demo-tabs { gap: 4px; } .demo-tabs a { padding: 10px 4px; gap: 4px; font-size: 11px; } .demo-tabs a span { font-size: 9px; } .data-sheet { padding: 16px; } .sample-design { gap: 4px; } .sample-design strong { font-size: 27px; } .demo-panel h3 { font-size: 16px; } .anova-table { font-size: 10px; } .anova-table th, .anova-table td { padding: 12px 3px; } .anova-table tbody th { font-size: 10px; } .demo-section .section-note { padding-left: 0; } .capability-flow { font-size: 11px; gap: 12px 8px; } .capability-flow li:not(:last-child)::after { margin-left: 8px; } .chart-dialog { width: calc(100% - 16px); padding: 16px; } .chart-dialog-heading h2 { font-size: 18px; } .demo-anchor { padding-inline: 16px; min-height: 52px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .demo-panel.is-selected { animation: none !important; } .demo-anchor, .chart-link > span, .demo-tabs a { transition: none; } }

/* Public subscription and shop entries share the existing notebook rhythm. */
.support-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; margin-top: 32px; padding: 28px; border: 1px solid var(--line); border-left: 3px solid var(--terracotta); border-radius: var(--radius-panel); background: var(--surface); }
.support-entry > div { min-width: 0; }
.support-entry h2 { margin-top: 12px; }
.support-entry h2 + p { margin-top: 12px; max-width: 640px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; min-width: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); }
@media (hover: hover) { .footer-links a:hover { color: var(--terracotta); } }
@media (max-width: 760px) { .support-entry { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 20px; } .support-entry > a { justify-self: start; } }
@media (max-width: 620px) { .footer-links { grid-column: 1 / -1; gap: 8px 20px; } .support-entry { padding: 20px; } }
