/* Local assets only: compatible with the server's Content Security Policy. */
:root {
  color-scheme: light dark;
  --bg: #f6f7f3; --panel: #fff; --ink: #202d28; --muted: #626e66;
  --line: #dce2d9; --accent: #285b46; --on-accent: #fff; --soft: #eaf0e5; --mark: #dfedbf;
  --shadow: 0 24px 70px -35px #243c3340;
  --win-close: #ff5f57; --win-close-edge: #e0443e; --win-close-ink: #4d0a07;
  --win-min: #febc2e; --win-min-edge: #dea123; --win-min-ink: #5c3d00;
  --win-zoom: #28c840; --win-zoom-edge: #1aab29; --win-zoom-ink: #064d0e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.65; }
body.is-locked { overflow: hidden; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -100px; padding: 12px; background: var(--panel); z-index: 10; }
.skip:focus { top: 12px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 100px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.8px; }
nav { display: flex; align-items: center; gap: 30px; }
nav a { text-decoration: none; font-size: 14px; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; transition: background-size .3s ease; }
nav a:hover { background-size: 100% 1px; }
.text-link:hover, footer > a:last-child:hover { text-decoration: underline; text-underline-offset: 5px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 22px; min-height: 50px; padding: 12px 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .2s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease; }
.button:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 16px 34px -20px #243c3355; }
.button:active { transform: translateY(0); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.small { min-height: 44px; padding: 8px 16px; }
.arrow { display: inline-block; transition: transform .25s ease; }
.button:hover .arrow { transform: translate(3px, -3px); }
.text-link:hover .arrow { transform: translateY(3px); }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding-block: 74px 84px; }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: 1.8px; color: var(--accent); }
.status-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--accent); animation: status-pulse 2.6s ease-in-out infinite; }
@keyframes status-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.78); } }
h1 { font-size: clamp(48px, 5.5vw, 76px); font-weight: 600; line-height: 1.04; letter-spacing: -.065em; margin-top: 23px; }
h1 > span { color: var(--accent); }
.lead { max-width: 395px; font-size: 17px; line-height: 1.75; margin-top: 26px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 30px; }
.text-link { font-size: 13px; font-weight: 600; text-decoration: none; }
.text-link span { margin-left: 8px; }
.hero-note { max-width: 340px; margin-top: 17px; color: var(--muted); font-size: 12px; }

/* ── macOS-style demo window ─────────────────────────────────────── */
.demo-stage { position: relative; min-width: 0; perspective: 1100px; transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .35s ease-out; }
.demo-stage[data-state="zoomed"] { transform: none; perspective: none; transition: none; }
.reading-demo { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); transform-origin: 50% 50%; transition: transform .38s cubic-bezier(.22, .72, .28, 1), box-shadow .38s ease, opacity .32s ease; }
@media (hover: hover) and (pointer: fine) {
  .demo-stage[data-state="default"] .reading-demo:hover { transform: translateY(-6px) scale(1.025); box-shadow: 0 34px 80px -32px #243c3355; }
}
.reading-demo.is-closed { opacity: 0; visibility: hidden; transform: scale(.82); transition: transform .32s ease-in, opacity .3s ease-in, visibility 0s .3s; }
.reading-demo.is-minimized { opacity: 0; visibility: hidden; transform: translateY(26%) scale(.22); transition: transform .42s cubic-bezier(.4, 0, .6, 1), opacity .35s ease, visibility 0s .42s; }
.reading-demo.is-zoomed { position: fixed; left: 50%; top: 50%; z-index: 60; width: min(880px, calc(100vw - 28px)); max-height: calc(100vh - 36px); overflow: auto; overscroll-behavior: contain; border-radius: 16px; transform: translate(-50%, -50%); animation: win-zoom-in .38s cubic-bezier(.22, .72, .28, 1); }
@keyframes win-zoom-in { from { transform: translate(-50%, -50%) scale(.92); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.demo-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(18, 26, 22, .5); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.demo-backdrop.is-on { opacity: 1; pointer-events: auto; }
.demo-toolbar { display: flex; align-items: center; gap: 16px; min-height: 48px; padding-inline: 20px; border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: 1px; color: var(--muted); }
.window-lights { display: flex; align-items: center; gap: 8px; }
.win-light { width: 12px; height: 12px; flex: none; padding: 0; border-radius: 50%; border: 1px solid transparent; cursor: pointer; position: relative; display: grid; place-items: center; transition: filter .16s ease, transform .16s ease; }
.win-light::before { font: 700 9px/1 -apple-system, BlinkMacSystemFont, sans-serif; opacity: 0; transition: opacity .16s ease; }
.win-close { background: var(--win-close); border-color: var(--win-close-edge); }
.win-close::before { content: "×"; color: var(--win-close-ink); }
.win-min { background: var(--win-min); border-color: var(--win-min-edge); }
.win-min::before { content: "−"; color: var(--win-min-ink); }
.win-zoom { background: var(--win-zoom); border-color: var(--win-zoom-edge); }
.win-zoom::before { content: "+"; color: var(--win-zoom-ink); font-size: 10px; }
.reading-demo:hover .win-light::before,
.reading-demo:focus-within .win-light::before,
.window-lights:hover .win-light::before { opacity: 1; }
@media (hover: none) { .win-light::before { opacity: 1; } }
.window-lights:hover .win-light:not(:hover) { filter: saturate(.7) brightness(.9); }
.win-light:hover { filter: brightness(1.07) saturate(1.06); transform: scale(1.15); }
.win-light:active { transform: scale(.9); }
.demo-mode { margin-left: auto; letter-spacing: .5px; white-space: nowrap; }
.demo-dock { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 13px/1 -apple-system, BlinkMacSystemFont, sans-serif; cursor: pointer; opacity: 0; visibility: hidden; transform: scale(.92) translateY(10px); box-shadow: var(--shadow); transition: opacity .3s ease, transform .3s cubic-bezier(.22, .72, .28, 1), visibility 0s .3s, border-color .2s ease, box-shadow .2s ease; }
.demo-stage.is-restore .demo-dock { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.demo-dock:hover { border-color: var(--accent); box-shadow: 0 18px 42px -20px #243c3366; transform: translateY(-2px); }
.dock-window { display: inline-flex; gap: 4px; padding: 7px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }
.dock-window span { width: 5px; height: 5px; border-radius: 50%; background: var(--win-close); }
.dock-window span:nth-child(2) { background: var(--win-min); }
.dock-window span:nth-child(3) { background: var(--win-zoom); }
.article { padding: 32px 30px 26px; }
.article-category { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); }
.article h2 { font: 30px/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.8px; margin-top: 15px; }
.article-text { font: 17px/1.8 Georgia, "Times New Roman", serif; margin-top: 20px; }
mark { color: inherit; border-radius: 3px; padding: 2px 3px; background-image: linear-gradient(var(--mark), var(--mark)); background-repeat: no-repeat; background-position: 0 62%; background-size: 100% 88%; }
.reading-demo.is-ready mark { animation: mark-swipe .7s .2s ease both; }
@keyframes mark-swipe { from { background-size: 0% 88%; } to { background-size: 100% 88%; } }
.translation { border-left: 2px solid var(--line); padding-left: 12px; color: var(--muted); font-size: 13px; line-height: 1.9; margin-top: 14px; }
.word-card { margin-top: 25px; border: 1px solid var(--line); border-radius: 9px; padding: 18px; background: var(--bg); font-size: 13px; transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.word-card:hover { transform: translateY(-3px); border-color: #285b4640; box-shadow: 0 18px 40px -24px #243c3355; }
.word-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.word-heading h3 { font-size: 18px; font-weight: 650; }
.word-heading h3 span { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.word-kind { color: var(--muted); font: italic 12px Georgia, serif; }
.word-translation { color: var(--muted); margin-top: 3px; }
.word-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; font-size: 10px; color: var(--muted); }
.saved { background: var(--soft); color: var(--accent); border-radius: 4px; padding: 4px 7px; font-weight: 600; }
figcaption { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 12px 20px; color: var(--muted); font-size: 11px; }

/* ── Sections & scroll reveal ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .75s ease, transform .75s cubic-bezier(.22, .72, .28, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.principles { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-block: 1px solid var(--line); padding-block: 23px; font-size: 12px; color: var(--muted); }
.principles span::before { content: "↗"; color: var(--accent); margin-right: 10px; display: inline-block; transition: transform .25s ease; }
.principles span:hover::before { transform: translate(2px, -2px); }
.workflow { padding-block: 100px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: end; }
.section-heading .eyebrow { grid-column: 1 / -1; margin-bottom: 16px; }
.section-heading h2, .ownership h2, .closing h2 { font-size: clamp(32px, 3.5vw, 46px); font-weight: 550; letter-spacing: -.045em; line-height: 1.14; }
.section-heading > p:last-child { color: var(--muted); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; list-style: none; padding: 0; margin: 48px 0 0; }
.steps li { border-top: 1px solid var(--line); padding-top: 22px; transition: border-color .3s ease, transform .3s ease; }
.steps li:hover { border-color: var(--accent); transform: translateY(-3px); }
.step-number { color: var(--accent); font-size: 11px; letter-spacing: 1.5px; }
.steps h3 { margin-top: 18px; font-size: 20px; font-weight: 600; letter-spacing: -.6px; }
.steps p { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.install { padding-block: 24px 96px; }
.install-command { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 14px 14px 14px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.install-command code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 15px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.install-command .button { flex: none; }
.install .steps b { color: var(--ink); font-weight: 600; }
.install-more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; margin-top: 36px; font-size: 12px; color: var(--muted); }
.install-more code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.ownership { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.ownership h2 { margin-top: 18px; }
.ownership-copy { max-width: 350px; font-size: 14px; color: var(--muted); margin: 20px 0; }
.details > div + div { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.details > div { transition: border-color .3s ease; }
dt { font-size: 15px; font-weight: 600; }
dd { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 6px; }
.closing { text-align: center; padding-block: 96px; }
.closing h2 { margin-top: 18px; }
.closing .button { margin-top: 28px; }
.closing > p:last-child { margin-top: 16px; font-size: 12px; color: var(--muted); }
.legal { max-width: 760px; padding-block: 24px 80px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); margin-top: 0; }
.legal-date { color: var(--muted); font-size: 13px; margin-top: 8px; }
.legal h2 { font-size: 20px; font-weight: 600; margin-top: 36px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; line-height: 1.8; margin-top: 10px; }
.legal ul { padding-left: 1.2em; margin: 8px 0 0; }
.legal b { color: var(--ink); font-weight: 600; }
.legal code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
footer p a { color: inherit; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-block: 28px; }
footer .brand { font-size: 18px; }
footer p, footer > a:last-child { color: var(--muted); font-size: 12px; text-decoration: none; }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 56px); }
  .hero { gap: 32px; padding-top: 45px; }
  h1 { font-size: 58px; }
  .article { padding: 24px 20px; }
  .word-heading h3 span { display: block; margin-left: 0; }
  .ownership { gap: 36px; padding: 32px; }
}
@media (max-width: 760px) {
  .top { min-height: 80px; }
  nav { gap: 16px; }
  .nav-detail { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 36px 48px; }
  h1 { font-size: clamp(46px, 9vw, 68px); }
  .desktop-break { display: none; }
  .lead { max-width: 480px; }
  .hero-note { max-width: none; }
  .demo-stage { width: 100%; max-width: 540px; justify-self: center; }
  .article { padding: 28px; }
  .word-heading h3 span { display: inline; margin-left: 8px; }
  .principles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 11px; }
  .workflow { padding-block: 60px; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-heading .eyebrow { margin: 0; }
  .steps { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }
  .steps h3 { margin-top: 10px; }
  .ownership { grid-template-columns: 1fr; gap: 30px; }
  .ownership-copy { max-width: none; }
  .closing { padding-block: 64px; }
  .install { padding-block: 0 60px; }
  .install-command { padding: 12px 12px 12px 16px; gap: 10px; }
  .install-command code { font-size: 13px; }
  footer p { order: 3; width: 100%; }
}
@media (max-width: 400px) {
  .wrap { width: calc(100% - 36px); }
  .brand { font-size: 19px; gap: 8px; }
  .button.small { padding-inline: 12px; gap: 10px; }
  .eyebrow { font-size: 10px; }
  .article { padding: 22px 18px; }
  .article h2 { font-size: 27px; }
  .demo-toolbar { padding-inline: 14px; gap: 10px; font-size: 8px; }
  .window-lights { gap: 6px; }
  .win-light { width: 11px; height: 11px; }
  .word-heading h3 span { display: block; margin-left: 0; }
  .ownership { padding: 24px; }
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171e1a; --panel: #202923; --ink: #ecf0e9; --muted: #a9b6ab; --line: #354238; --accent: #b5d5a3; --on-accent: #1b2c20; --soft: #242f25; --mark: #3e542f; --shadow: none; }
  .demo-stage[data-state="default"] .reading-demo:hover, .demo-dock:hover { box-shadow: 0 28px 60px -30px #00000066; }
  .button:hover, .word-card:hover { box-shadow: 0 18px 40px -24px #00000055; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .demo-stage { transform: none !important; }
  mark { background-size: 100% 88%; }
}
