/* Toolowner landing v5 (lab): warm paper, ink-brown type, serif display, hairline edges. No gradients on controls, no shipped UI sans default. */
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-normal.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-italic.woff2) format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken"; src: url(fonts/hanken-grotesk-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #FAF9F6; --paper-2: #F3F1EB; --card: #FFFEFB;
  --ink: #2A2420; --ink-2: #4A413A; --muted: #6E645B;
  --line: rgba(42, 36, 32, 0.12); --line-2: rgba(42, 36, 32, 0.07);
  --green: #2E6A4E; --green-wash: rgba(46, 106, 78, 0.09); --clay: #A4532F;
  --serif: "Newsreader", "Songti TC", "Noto Serif CJK TC", "Source Han Serif TC", "PMingLiU", Georgia, serif;
  --sans: "Hanken", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1120px; --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); overflow-x: hidden; }
html[data-lang="zh"] [data-l="en"], html[data-lang="en"] [data-l="zh"] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 14px; background: var(--ink); color: var(--paper); border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
.eyebrow { margin: 0 0 14px; font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; }
section { padding-block: clamp(64px, 9vw, 120px); }
.lede { max-width: 34em; color: var(--ink-2); margin: 18px 0 0; }

/* masthead */
.mast { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); border-bottom: 1px solid var(--line-2); }
@supports (backdrop-filter: blur(1px)) { .mast { backdrop-filter: blur(14px); } }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font: 600 18px/1 var(--serif); text-decoration: none; }
.mark i { width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 3px; position: relative; }
.mark i::after { content: ""; position: absolute; inset: 3px; background: var(--green); border-radius: 1px; }
.end { display: flex; align-items: center; gap: 10px; }
.lang { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 13px/1 var(--mono); cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 500 16px/1 var(--sans); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); transition: transform 140ms ease-out, background 140ms ease-out; }
.pill:hover { background: #1c1815; transform: translateY(-1px); }
.pill .arr { font-family: var(--mono); transition: transform 140ms ease-out; }
.pill:hover .arr { transform: translateX(3px); }
.pill.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.ghost { display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; color: var(--ink-2); text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* hero */
.hero { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(46px, 9.4vw, 116px); line-height: 0.98; letter-spacing: -0.035em; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--green); }
.hero .lede { font-size: clamp(18px, 2vw, 21px); max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 34px; }
.fine { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

/* topology */
.topo-sec { border-top: 1px solid var(--line-2); }
.topo { position: relative; display: grid; grid-template-columns: 1fr minmax(180px, 0.9fr) 1fr; grid-template-rows: auto auto auto; gap: 28px 24px; margin-top: 48px; align-items: center; }
.topo svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.topo svg line { stroke: var(--ink); stroke-opacity: 0.28; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 5; }
.topo svg circle { fill: var(--paper); stroke: var(--ink); stroke-opacity: 0.4; vector-effect: non-scaling-stroke; }
.node { position: relative; z-index: 1; display: grid; gap: 6px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 12px 30px -24px rgba(42, 36, 32, 0.45); }
.node b { font: 500 21px/1.2 var(--serif); }
.node span { color: var(--muted); font-size: 15px; line-height: 1.55; }
.node .tag { font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.n1 { grid-area: 1 / 1; } .n2 { grid-area: 1 / 3; } .n3 { grid-area: 3 / 1; } .n4 { grid-area: 3 / 3; }
.hub { grid-area: 2 / 2; z-index: 1; justify-self: center; display: grid; place-items: center; gap: 4px; width: clamp(150px, 17vw, 190px); aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; background: var(--ink); color: var(--paper); text-align: center; box-shadow: 0 0 0 9px var(--paper), 0 0 0 10px var(--line); }
.hub div { display: grid; gap: 4px; }
.hub b { font: italic 400 clamp(22px, 2.4vw, 28px)/1.1 var(--serif); }
.hub small { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.72; }
.topo-note { margin: 40px auto 0; max-width: 30em; text-align: center; font: italic 400 clamp(19px, 2.2vw, 24px)/1.45 var(--serif); color: var(--ink-2); }

/* workbench mockup */
.bench-sec { background: var(--paper-2); border-block: 1px solid var(--line-2); }
.bench { margin-top: 44px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); overflow: hidden; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 40px 80px -50px rgba(42, 36, 32, 0.5); }
.bench-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; }
.bench-top .dots { display: inline-flex; gap: 6px; } .bench-top .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line); }
.bench-top button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; cursor: pointer; }
.bench-body { display: grid; grid-template-columns: 2fr 3fr; min-height: 420px; }
.chat { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 22px; border-right: 1px solid var(--line-2); background: var(--paper); }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 12px; font-size: 15px; line-height: 1.5; opacity: 0; transform: translateY(6px); animation: show 14s infinite; }
.msg.me { align-self: flex-end; background: #EDEAE3; font-family: var(--mono); font-size: 13.5px; }
.msg.sys { align-self: flex-start; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.msg.sys b { color: var(--green); font-weight: 500; }
.m1 { animation-delay: 0.4s; } .m2 { animation-delay: 1.6s; } .m3 { animation-delay: 5s; } .m4 { animation-delay: 6.2s; }
.box { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--muted); font-size: 14px; }
.box i { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; color: var(--paper); font: normal 14px/1 var(--mono); }
.canvas { position: relative; padding: 26px 28px; }
.pane { position: absolute; inset: 26px 28px; opacity: 0; animation: pane 14s infinite; }
.p1 { animation-delay: 1.6s; } .p2 { animation-delay: 6.2s; }
.pane h3 { font-size: 26px; margin-bottom: 4px; }
.pane .src { display: inline-block; margin-bottom: 14px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font: 500 11px/1.6 var(--mono); color: var(--muted); }
.pane p { margin: 0 0 8px; color: var(--ink-2); font-size: 16px; }
.pane .wl { color: var(--green); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.todo { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 16px; }
.todo i { width: 16px; height: 16px; border: 1.5px solid var(--ink-2); border-radius: 4px; display: grid; place-items: center; font: normal 11px/1 var(--mono); }
.todo.done { color: var(--muted); text-decoration: line-through; } .todo.done i { background: var(--green); border-color: var(--green); color: #fff; }
.back { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.pane table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 10px; }
.pane th, .pane td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.pane th { background: var(--paper-2); font-weight: 500; }
.stamp { display: inline-block; margin-top: 16px; padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--green) 60%, transparent); border-radius: 4px; color: var(--green); font: 600 11px/1.7 var(--sans); letter-spacing: 0.08em; transform: rotate(-2deg); }
@keyframes show { 0%, 2% { opacity: 0; transform: translateY(6px); } 6%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes pane { 0%, 2% { opacity: 0; } 6%, 30% { opacity: 1; } 34%, 100% { opacity: 0; } }
.p2 { animation-name: pane2; } @keyframes pane2 { 0%, 2% { opacity: 0; } 6%, 58% { opacity: 1; } 63%, 100% { opacity: 0; } }
.bench[data-paused] .msg, .bench[data-paused] .pane { animation: none; opacity: 1; transform: none; }
.bench[data-paused] .p1 { opacity: 0; }
.bench-cap { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-top: 44px; }
.stat { padding: 30px 26px; border-left: 1px solid var(--line-2); display: grid; gap: 10px; align-content: start; }
.stat:first-child { border-left: 0; }
.stat b { font: 400 clamp(40px, 5vw, 60px)/1 var(--serif); letter-spacing: -0.03em; white-space: nowrap; }
.stat b small { font: 500 0.36em/1 var(--mono); letter-spacing: 0.04em; margin-left: 6px; color: var(--green); }
.stat strong { font-weight: 500; font-size: 16px; }
.stat span { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* faq */
.faq { margin-top: 36px; border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 2px; cursor: pointer; list-style: none; font: 500 clamp(19px, 2.1vw, 23px)/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--muted); transition: transform 160ms ease-out; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 2px 24px; color: var(--ink-2); max-width: 44em; }
.faq .a p { margin: 0 0 10px; }

/* closing + footer */
.close { text-align: center; border-top: 1px solid var(--line-2); }
.close h2 { font-size: clamp(34px, 5.4vw, 64px); }
.close .cta { justify-content: center; }
footer { padding: 28px 0 44px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
footer a { text-underline-offset: 4px; }

@media (max-width: 860px) {
  .topo { grid-template-columns: 1fr; grid-template-rows: none; gap: 14px; padding-left: 22px; }
  .topo svg { display: none; }
  .topo::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 12px; border-left: 1px dashed rgba(42, 36, 32, 0.35); }
  .n1, .n2, .n3, .n4, .hub { grid-area: auto; }
  .hub { order: -1; justify-self: start; width: auto; aspect-ratio: auto; border-radius: 999px; padding: 14px 22px; box-shadow: none; }
  .hub div { grid-auto-flow: column; align-items: baseline; gap: 10px; }
  .bench-body { grid-template-columns: 1fr; min-height: 0; }
  .chat { border-right: 0; border-bottom: 1px solid var(--line-2); min-height: 250px; }
  .canvas { min-height: 300px; }
  .pane { inset: 22px 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n + 3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 460px) {
  .wrap { padding-inline: 18px; }
  .stats { grid-template-columns: 1fr; } .stat { border-left: 0; } .stat + .stat { border-top: 1px solid var(--line-2); }
  .mast .pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg, .pane { animation: none; opacity: 1; transform: none; } .p1 { opacity: 0; }
  .pill, .pill .arr { transition: none; }
}
.tight { padding-top: 0; }
