:root {
  color-scheme: light;
  --ink: #17302a;
  --muted: #55675e;
  --faint: #8a9890;
  --green: #13776a;
  --green-deep: #0f5c51;
  --line: #dce4dd;
  --paper: #f8f9f5;
  --surface: #eef3ee;
  --stage: #e3ebe5;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body, h1, h2, h3, p, dl, dd, ol, figure { margin: 0; }
body { overflow-x: clip; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #4aa594; outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
code, kbd { font-family: var(--mono); }
code { font-size: .86em; padding: 1px 5px; border-radius: 5px; background: #e6ece7; word-break: break-word; }
.keys, [data-zip-size] { white-space: nowrap; }
h1, h2, h3 { text-wrap: balance; }
kbd { display: inline-block; min-width: 1.75em; margin: 0 1px; padding: 0 6px; font-size: .8em; line-height: 1.7; text-align: center; color: var(--ink); background: #fff; border: 1px solid #cdd7cf; border-bottom-width: 2px; border-radius: 6px; vertical-align: .08em; }
.wrap { width: min(1180px, calc(100% - clamp(40px, 8vw, 128px))); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 8px; padding: 10px 14px; background: #fff; border-radius: 8px; z-index: 20; transform: translateY(-200%); }
.skip:focus { transform: none; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgb(248 249 245 / 88%); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 680; letter-spacing: -.02em; }
.brand img { display: block; }
nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); font-size: 14px; color: var(--muted); }
nav a:hover, .footer-links a:hover { color: var(--green); }
.repo-link { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 560; padding-left: clamp(16px, 2.6vw, 34px); border-left: 1px solid var(--line); }
.repo-link .icon, .compat .icon { width: 14px; height: 14px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(36px, 5vw, 80px); align-items: center; padding-block: clamp(48px, 6vw, 88px) clamp(64px, 7vw, 104px); }
.meta-line { font-size: 14px; color: var(--green); font-weight: 600; margin-bottom: 20px; }
.meta-line a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: clamp(40px, 4.3vw, 58px); font-weight: 700; line-height: 1.16; letter-spacing: -.02em; }
.lede { max-width: 31em; margin-top: 24px; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.9; color: var(--muted); }
.lede kbd { font-size: .74em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 600; transition: background-color .15s, border-color .15s; }
.primary { color: #fff; background: var(--green-deep); }
.primary:hover { background: var(--green); }
.secondary { background: #fff; border: 1px solid #cfd9d1; }
.secondary:hover { border-color: #9fb8ad; }
.compat { max-width: 34em; margin-top: 18px; font-size: 13px; line-height: 1.75; color: var(--muted); }
.compat a { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; color: var(--green); font-weight: 560; white-space: nowrap; }
.compat a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Stage, window mock and capsule */
.stage { position: relative; min-width: 0; padding: clamp(18px, 2.4vw, 30px) clamp(18px, 2.4vw, 30px) 0; background: var(--stage); border-radius: 20px; }
.window { position: relative; overflow: hidden; background: #fff; border: 1px solid #d3ddd6; border-radius: 12px; box-shadow: 0 1px 2px rgb(20 50 40 / 6%), 0 24px 44px -28px rgb(16 48 40 / 45%); }
.titlebar { position: relative; display: flex; align-items: center; height: 34px; padding: 0 13px; background: #f4f6f3; border-bottom: 1px solid #e7ebe6; }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ec6a5e; }
.lights i:nth-child(2) { background: #f4bf4f; }
.lights i:nth-child(3) { background: #61c554; }
.title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: #6c7a73; }
.field { display: flex; gap: 12px; padding: 9px 18px; font-size: 13px; border-bottom: 1px solid #eef1ed; }
.field span { width: 44px; color: var(--faint); }
.mail-body, .note-body { min-height: 176px; padding: 16px 20px 64px; font-size: 15px; line-height: 1.8; }
.mail-body p + p, .note-body p + p { margin-top: 6px; }
.note-body { min-height: 190px; padding-top: 20px; }
.note-title { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.faint { color: var(--faint); }
.chat { min-height: 190px; padding: 18px 20px 64px; font-size: 14px; line-height: 1.7; }
.msg b { font-size: 13px; }
.msg p { color: #3e524a; }
.composer { min-height: 64px; margin-top: 18px; padding: 10px 12px; border: 1px solid #d9e1db; border-radius: 10px; font-size: 14.5px; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -.18em; background: var(--green); opacity: 0; }
.stage.is-typing .caret { opacity: 1; animation: blink 1s steps(1) infinite; }
.selection { background: #b6dcd2; border-radius: 2px; box-shadow: 0 0 0 1px #b6dcd2; }
.flash { animation: flash 1.4s ease-out; border-radius: 3px; }
.stage figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; min-height: 58px; padding-block: 64px 12px; font-size: 12.5px; color: #6a7a72; }
.replay { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 10px; background: rgb(255 255 255 / 70%); border: 1px solid #cad6cd; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 560; color: var(--ink); }
.replay:hover { background: #fff; }
.replay .icon { width: 15px; height: 15px; }
.dictionary { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dictionary b { padding: 2px 9px; font-weight: 500; color: #2f5a4c; background: rgb(255 255 255 / 70%); border: 1px solid #c9d6cd; border-radius: 999px; }

.capsule { position: absolute; z-index: 2; left: 50%; bottom: 66px; width: 36px; height: 36px; overflow: hidden; color: #fff; border-radius: 18px; transform: translateX(-50%); background: linear-gradient(160deg, #fafafa 0%, #f0f0f0 50%, #e6e6e6 100%); box-shadow: inset 0 1px 4px rgb(255 255 255 / 80%), 0 2px 8px rgb(0 0 0 / 8%), 0 6px 18px rgb(0 0 0 / 7%); transition: width .38s cubic-bezier(.3, .8, .25, 1), height .38s cubic-bezier(.3, .8, .25, 1), border-radius .38s; }
.capsule:not([data-state="idle"]) { background: linear-gradient(160deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%); box-shadow: inset 0 1px 4px rgb(255 255 255 / 12%), 0 4px 12px rgb(0 0 0 / 16%), 0 12px 28px rgb(0 0 0 / 12%); }
.capsule[data-state="rec"] { width: min(330px, calc(100% - 28px)); height: 86px; border-radius: 18px; }
.capsule[data-state="busy"] { width: 168px; }
.capsule[data-state="done"] { width: 92px; }
.capsule[data-state="edit"] { width: min(340px, calc(100% - 20px)); height: 40px; border-radius: 20px; }
.cap-part { position: absolute; inset: 0; display: flex; align-items: center; gap: 7px; padding: 0 12px; font-size: 12px; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
.capsule[data-state="idle"] .cap-idle, .capsule[data-state="rec"] .cap-rec, .capsule[data-state="busy"] .cap-busy, .capsule[data-state="done"] .cap-done, .capsule[data-state="edit"] .cap-edit { opacity: 1; visibility: visible; transition-delay: .16s; }
.cap-idle { justify-content: center; padding: 0; color: #5d6662; }
.cap-idle .icon { width: 18px; height: 18px; stroke-width: 1.5; }
.cap-rec { flex-direction: column; align-items: stretch; gap: 0; min-width: 300px; padding: 0 12px 10px; }
.cap-row { display: flex; align-items: center; gap: 8px; height: 36px; flex: none; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 80%); animation: pulse 1.5s ease-in-out infinite; }
.bars { display: flex; align-items: center; gap: 3px; height: 16px; }
.bars i { width: 2px; height: 16px; border-radius: 2px; background: rgb(255 255 255 / 80%); transform: scaleY(.2); animation: bar 1.1s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -.2s; }
.bars i:nth-child(3) { animation-delay: -.45s; }
.bars i:nth-child(4) { animation-delay: -.1s; }
.bars i:nth-child(5) { animation-delay: -.65s; }
.bars i:nth-child(6) { animation-delay: -.3s; }
.bars i:nth-child(7) { animation-delay: -.8s; }
.cap-label { font-size: 12px; }
.chip { padding: 1px 7px; font-size: 11px; background: rgb(255 255 255 / 15%); border-radius: 999px; }
.grow { flex: 1; }
.timer { font-size: 11px; color: rgb(255 255 255 / 70%); font-variant-numeric: tabular-nums; }
.cap-row .icon { width: 12px; height: 12px; color: rgb(255 255 255 / 70%); stroke-width: 2; }
.cap-preview { height: 40px; overflow: hidden; white-space: normal; font-size: 12px; line-height: 20px; color: rgb(255 255 255 / 90%); text-align: left; }
.cap-busy { font-size: 11px; }
.spinner { width: 12px; height: 12px; border: 1.5px solid rgb(255 255 255 / 30%); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.cap-done { justify-content: center; font-size: 11px; font-weight: 500; }
.cap-done .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.cap-edit { gap: 6px; padding: 0 6px 0 16px; }
.cap-status { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.cap-edit button { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; font-size: 12px; color: #fff; background: rgb(255 255 255 / 15%); border: 0; border-radius: 6px; cursor: pointer; }
.cap-edit button:hover { background: rgb(255 255 255 / 25%); }
.cap-edit .icon { width: 12px; height: 12px; stroke-width: 2; }

/* Sections */
.section-head { max-width: 640px; }
h2 { font-size: clamp(28px, 3.1vw, 40px); font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.section-head p { margin-top: 14px; font-size: 16px; line-height: 1.85; color: var(--muted); }
.section-head a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h3 { font-size: 18px; font-weight: 650; line-height: 1.45; }

.modes { padding-block: clamp(64px, 8vw, 104px); background: var(--surface); border-block: 1px solid #dde6df; }
.modes .stage { background: #dde7e0; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 32px; padding: 4px; background: #e1e9e3; border-radius: 12px; }
.tabs button { display: inline-flex; align-items: baseline; gap: 10px; min-height: 40px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgb(20 50 40 / 12%); }
.tab-keys { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--faint); }
.panel { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: 36px; }
.panel-text h3 { font-size: 24px; margin-bottom: 14px; }
.panel-text p { font-size: 15.5px; line-height: 1.9; color: var(--muted); }
.panel-text p + p { margin-top: 12px; }
.panel-text .note { margin-top: 14px; font-size: 13.5px; line-height: 1.8; color: #6a7a72; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font-size: 15px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.track { position: relative; width: 38px; height: 22px; background: #c6d1c9; border-radius: 11px; transition: background-color .2s; }
.track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgb(0 0 0 / 20%); transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid #4aa594; outline-offset: 2px; }

.local { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); padding-block: clamp(64px, 8vw, 104px); }
.facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding-block: 20px; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: 15.5px; font-weight: 650; line-height: 1.8; }
.facts dd { font-size: 15px; line-height: 1.85; color: var(--muted); }

.details { padding-block: 0 clamp(64px, 8vw, 104px); }
.details .wrap { padding-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; margin-top: 36px; }
.detail-grid article { padding-block: 22px 26px; border-top: 1px solid var(--line); }
.detail-grid h3 { font-size: 17px; margin-bottom: 8px; }
.detail-grid p { font-size: 14.5px; line-height: 1.85; color: var(--muted); }

.install { position: relative; padding-block: clamp(64px, 8vw, 104px); }
.install::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: var(--surface); border-block: 1px solid #dde6df; }
.install-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: 40px; counter-reset: step; }
.steps li { position: relative; display: grid; grid-template-columns: 34px 1fr; column-gap: 18px; padding-bottom: 30px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; font-size: 14px; font-weight: 650; color: var(--green); background: #fff; border: 1px solid #b9d0c5; border-radius: 50%; grid-row: span 2; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 40px; bottom: 6px; left: 17px; width: 1px; background: #c7d8cf; }
.steps h3 { font-size: 17px; line-height: 34px; }
.steps p { margin-top: 4px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.spec { padding: 26px 26px 24px; background: #fff; border: 1px solid #d8e2da; border-radius: 16px; }
.spec h3 { font-size: 15px; }
.spec h3 + table { margin-top: 10px; }
.spec table + h3 { margin-top: 24px; }
.spec table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.spec th, .spec td { padding: 9px 0; text-align: left; vertical-align: top; border-top: 1px solid #e8ede9; }
.spec th { width: 42%; padding-right: 14px; font-weight: 500; color: var(--muted); }
.spec p { margin-top: 18px; font-size: 13px; line-height: 1.8; color: #6a7a72; }

.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); padding-block: clamp(64px, 8vw, 104px); }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 2px; font-size: 16.5px; font-weight: 600; line-height: 1.5; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--green); }
summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 6px 4px 0; border: solid var(--green); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s, margin .2s; }
details[open] summary::after { transform: rotate(225deg); margin-bottom: -4px; }
details > div { padding: 0 32px 22px 2px; }
details p { font-size: 15px; line-height: 1.9; color: var(--muted); }
details p + p { margin-top: 8px; }

.closing { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-block: 56px 72px; border-top: 1px solid var(--line); }
.closing h2 { font-size: clamp(24px, 2.4vw, 32px); }
.closing .actions { margin-top: 0; }

.site-footer { background: var(--surface); border-top: 1px solid #dde6df; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 24px 48px; padding-block: 36px 44px; }
.footer-brand .brand { font-size: 18px; gap: 7px; }
.footer-brand p { margin-top: 10px; font-size: 13px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 26px; font-size: 14px; color: var(--muted); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes bar { 0%, 100% { transform: scaleY(.22); } 50% { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash { from { background: #c7e6db; } to { background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bars i { transform: scaleY(.6); }
}

@media (max-width: 980px) {
  .hero, .panel, .local, .faq, .install-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 44px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { max-width: 720px; }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 56px; }
  .brand { font-size: 19px; }
  .brand img { width: 28px; height: 28px; }
  nav a:not(.repo-link):not([href="#install"]) { display: none; }
  .repo-link { padding-left: 16px; }
  h1 { font-size: clamp(38px, 11vw, 50px); }
  .lede { margin-top: 18px; }
  .actions { margin-top: 24px; }
  .actions .button { flex: 1 1 160px; }
  .stage { border-radius: 16px; }
  .mail-body, .note-body, .chat { font-size: 14px; }
  .tabs { display: flex; }
  .tabs button { flex: 1; justify-content: center; padding: 0 10px; }
  .tab-keys { display: none; }
  .panel-text h3 { font-size: 21px; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .spec { padding: 20px; }
  .closing { padding-block: 44px 56px; }
  .closing .actions { width: 100%; }
}

@media (max-width: 380px) {
  .wrap { width: calc(100% - 28px); }
  .capsule[data-state="edit"] .cap-status { display: none; }
}
