/* Alex Lab public platform design. Tool pages retain alexlab.css and their own styles. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #192623;
  --muted: #68736f;
  --accent: #247264;
  --line: #e3e9e6;
  --wash: #f5f8f6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.75 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
main:focus { outline: none; }
::selection { background: #d8ece4; }
h1, h2, h3, p { margin: 0; }
.container { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 12px 24px; background: var(--ink); color: white; z-index: 10; }
.skip-link:focus { top: 12px; }
.header-inner { height: 104px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 26px; font-weight: 650; letter-spacing: -1.1px; line-height: 1; }
.brand span { color: var(--accent); padding-inline: 1px; }
nav { display: flex; gap: 36px; }
nav a { position: relative; padding-block: 10px; color: var(--muted); font-size: 14px; }
nav a[aria-current="page"] { color: var(--ink); }
nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.home-hero { padding-block: 76px 88px; }
.home-hero h1 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.4; letter-spacing: -.045em; font-weight: 550; }
.home-hero h1 span { display: inline-block; }
.home-hero h1 .hero-line { color: var(--accent); }
.hero-description { max-width: 560px; margin-top: 24px; color: var(--muted); font-size: 17px; line-height: 1.95; }
.text-link { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; color: var(--accent); font-size: 14px; }
.hero-link { margin-top: 25px; }
.text-link svg, .button svg { transition: transform 180ms ease; }
.text-link:hover svg, .button:hover svg { transform: translateX(3px); }
.icon { display: inline-block; flex-shrink: 0; width: 18px; height: 18px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding-block: 0 22px; border-bottom: 1px solid var(--ink); }
.section-heading h2 { font-size: 18px; font-weight: 550; }
.section-heading span { color: var(--muted); font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }
.work-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 104px 176px; gap: 20px; align-items: center; min-height: 149px; border-bottom: 1px solid var(--line); padding: 27px 0; transition: background 180ms ease; }
.work-symbol { display: grid; place-items: center; width: 44px; height: 44px; color: var(--accent); border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.work-symbol .icon { width: 22px; height: 22px; }
.work-copy h3 { font-size: 23px; font-weight: 550; letter-spacing: -.035em; }
.work-copy h3 a:hover { color: var(--accent); }
.work-copy p { margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 510px; }
.state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #819087; }
.state.active::before { background: var(--accent); }
.state.experiment::before { background: transparent; border: 1px solid #819087; }
.row-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.row-actions .text-link { min-height: 38px; font-size: 13px; }
.row-actions .secondary { color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 88px; padding-block: 26px 34px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.footer-brand { letter-spacing: .02em; }
.back-link { margin-top: 38px; color: var(--muted); font-size: 13px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 80px; padding-block: 43px 64px; }
.detail-hero h1, .about-hero h1 { font-size: clamp(38px, 4.5vw, 60px); line-height: 1.35; font-weight: 550; letter-spacing: -.04em; }
.detail-hero .lead { max-width: 610px; font-size: 20px; line-height: 1.85; color: var(--muted); margin-top: 24px; }
.detail-meta { margin-top: 24px; display: flex; gap: 20px; align-items: center; }
.meta-label { border-left: 1px solid var(--line); padding-left: 20px; color: var(--muted); font-size: 12px; }
.experience { border-left: 1px solid var(--line); padding-left: 32px; align-self: center; }
.experience p { color: var(--muted); font-size: 13px; line-height: 1.9; margin-top: 16px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 48px; padding: 12px 20px; background: var(--accent); border: 1px solid var(--accent); color: #fff; border-radius: 6px; font-size: 14px; transition: background 180ms ease; }
.button:hover { background: #1b5d51; }
.reading-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 60px; padding-block: 39px 43px; border-top: 1px solid var(--line); }
.reading-section h2 { font-size: 15px; font-weight: 550; padding-top: 3px; }
.reading-section .section-number { display: inline-block; width: 38px; color: #76817b; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.reading-copy { max-width: 690px; color: #4e5d55; font-size: 16px; line-height: 1.95; }
.reading-copy p + p { margin-top: 15px; }
.reading-copy .subtle { font-size: 14px; color: var(--muted); }
.evidence-block + .evidence-block { margin-top: 24px; }
.evidence-block h3 { color: var(--ink); font-size: 13px; font-weight: 550; margin-bottom: 7px; }
.evidence-block.boundary { border-left: 2px solid #b4c9be; padding-left: 20px; }
.detail-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 32px; border-top: 1px solid var(--line); }
.detail-bottom > p { color: var(--muted); font-size: 14px; }
.about-hero { padding-block: 74px 67px; max-width: 850px; }
.about-hero h1 span { display: block; color: var(--accent); }
.about-hero .lead { max-width: 660px; color: var(--muted); font-size: 18px; line-height: 1.95; margin-top: 30px; }
.about-copy strong { color: var(--ink); font-weight: 550; }
.principles { list-style: none; padding: 0; margin: 0; }
.principles li + li { margin-top: 17px; }
.principles strong { display: block; font-size: 15px; }
.principles span { font-size: 14px; color: var(--muted); }
@media (min-width: 1000px) {
  .work-row:hover { background: #fafcfb; }
}
@media (max-width: 900px) {
  .container { width: calc(100% - 64px); }
  .work-row { grid-template-columns: 44px minmax(0, 1fr) 142px; gap: 16px; }
  .work-row > .state { display: none; }
  .detail-hero { gap: 32px; grid-template-columns: minmax(0, 1fr) 230px; }
  .reading-section { grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 40px); }
  .header-inner { height: 82px; }
  .brand { font-size: 24px; }
  nav { gap: 28px; }
  .home-hero { padding-block: 47px 58px; }
  .home-hero h1 { font-size: clamp(29px, 7.8vw, 44px); line-height: 1.5; letter-spacing: -.05em; }
  .hero-description { margin-top: 22px; font-size: 15px; max-width: 330px; }
  .hero-link { margin-top: 20px; }
  .section-heading { padding-bottom: 18px; }
  .work-row { grid-template-columns: 36px minmax(0, 1fr); gap: 10px 14px; padding-block: 26px; align-items: start; }
  .work-symbol { width: 34px; height: 36px; border-radius: 9px; margin-top: 2px; }
  .work-symbol .icon { width: 19px; height: 19px; }
  .work-copy h3 { font-size: 21px; }
  .work-copy p { font-size: 13px; margin-top: 5px; }
  .row-actions { grid-column: 2; flex-direction: row; gap: 23px; align-items: center; flex-wrap: wrap; }
  .row-actions .text-link { min-height: 44px; gap: 8px; }
  .site-footer { margin-top: 55px; padding-block: 23px 28px; font-size: 11px; }
  .back-link { margin-top: 24px; }
  .detail-hero { display: block; padding-block: 28px 38px; }
  .detail-hero h1, .about-hero h1 { font-size: 38px; }
  .detail-hero .lead { font-size: 18px; margin-top: 20px; }
  .detail-meta { margin-top: 20px; }
  .experience { border-left: 0; padding: 0; margin-top: 30px; }
  .experience p { margin-top: 12px; }
  .reading-section { display: block; padding-block: 28px 32px; }
  .reading-section h2 { margin-bottom: 18px; }
  .reading-copy { font-size: 15px; }
  .detail-bottom { flex-direction: column; align-items: start; }
  .about-hero { padding-block: 50px 48px; }
  .about-hero h1 { font-size: 34px; }
  .about-hero .lead { font-size: 16px; margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Production content: resilient to CMS images, long copy, and variable work counts. */
.site-links { display: flex; gap: 36px; }
.detail-hero > *, .reading-section > *, .work-row > * { min-width: 0; }
.reading-copy, .lead, .work-copy { overflow-wrap: anywhere; }
.reading-copy h3 { font-size: 17px; font-weight: 550; margin-bottom: 12px; color: var(--ink); }
.evidence-block h3 { font-size: 13px; margin-bottom: 7px; }
.about-content img { display: block; max-width: 100%; height: auto; }
.about-cover { margin-bottom: 24px; border-radius: 6px; }
.about-content h2, .about-content h3 { margin-block: 24px 12px; }
.about-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.about-content table, .about-content pre { display: block; max-width: 100%; overflow-x: auto; }
.empty-works { padding-block: 40px; color: var(--muted); }
@media (max-width: 600px) { .site-links { gap: 28px; } }
