/* ============ Fonts (self-hosted, SIL OFL; see fonts/LICENSES.md) ============ */
@font-face { font-family: "Bricolage"; font-weight: 400 800; font-display: swap; src: url(fonts/bricolage-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Bricolage"; font-weight: 400 800; font-display: swap; src: url(fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage"; font-weight: 400 800; font-display: swap; src: url(fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JBMono"; font-weight: 400 700; font-display: swap; src: url(fonts/jbmono-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "JBMono"; font-weight: 400 700; font-display: swap; src: url(fonts/jbmono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JBMono"; font-weight: 400 700; font-display: swap; src: url(fonts/jbmono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Layout: split hero (copy left, the real app window right, sitting on blocks from the app's own space map),
   then quiet left-aligned sections on one 1160px column. Single light theme by choice: the app itself is light. */
:root {
  /* Color: the app's own palette */
  --bg: #f3f5f9;          /* app window background */
  --surface: #ffffff;
  --ink: #1c2230;
  --muted: #586174;
  --line: #e1e6ef;
  --blue: #2f6fed;        /* app accent */
  --blue-ink: #1f56c9;
  --amber: #ffb938;       /* logo "used space" slice */
  --good: #1e9e63;
  --bad: #cf3f3f;
  /* Treemap tile colors, same as the app's space map */
  --t1: #4f8df5; --t2: #2fb59c; --t3: #6cb84a; --t4: #f2b12e; --t5: #f07f3c; --t6: #e5565b; --t7: #9b6ce0;

  /* Type: characterful display face for headings, Segoe UI (what Windows and the app use) for reading, mono for sizes */
  --display: "Bricolage", "Segoe UI", system-ui, "Microsoft YaHei", "Yu Gothic UI", "Malgun Gothic", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Microsoft YaHei", "Yu Gothic UI", "Malgun Gothic", sans-serif;
  --mono: "JBMono", "Cascadia Code", Consolas, monospace;

  --max: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
kbd { padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; background: var(--surface); white-space: nowrap; }

.wrap {
  max-width: calc(var(--max) + 2 * 24px); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
}
section { padding-block: 88px; }
.center { text-align: center; }

h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; font-weight: 800; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
:lang(zh) h1, :lang(ja) h1, :lang(ko) h1 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.18; letter-spacing: 0; }
:lang(zh) h2, :lang(ja) h2, :lang(ko) h2 { line-height: 1.25; letter-spacing: 0; }
:lang(ja) :is(h1, h2), :lang(zh) :is(h1, h2) { word-break: auto-phrase; }
p { margin: 0; }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 60ch; }
.eyebrow { font: 600 13px/1.2 var(--mono); color: var(--blue-ink); letter-spacing: .02em; }
.head { display: grid; gap: 14px; max-width: 760px; margin-bottom: 44px; }

/* ============ Nav ============ */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(243, 245, 249, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-dl { margin-left: auto; }
.nav-right .nav-dl { margin-left: 0; }

.langsel { position: relative; }
.langsel > button {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 8px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13px/1 var(--mono);
}
.langsel > button svg { width: 16px; height: 16px; color: var(--blue); }
.langsel > button::after { content: "▾"; color: var(--muted); }
.langsel ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; margin: 0; padding: 6px; list-style: none; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(28, 34, 48, .14);
  max-height: 70vh; overflow: auto; display: none;
}
.langsel.open ul { display: block; }
.langsel li button {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: 500 15px/1.2 var(--body); cursor: pointer; text-align: left;
}
.langsel li button span { font: 600 11px/1.4 var(--mono); color: var(--muted); }
.langsel li button:hover, .langsel li button:focus-visible { background: var(--bg); outline: none; }
.langsel li button[aria-checked="true"] { color: var(--blue); font-weight: 700; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 10px; cursor: pointer;
  font: 600 17px/1.15 var(--body); border: 1px solid transparent; transition: background .15s, box-shadow .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn small { display: block; font: 500 12px/1.3 var(--mono); opacity: .8; margin-top: 3px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(47, 111, 237, .28); }
.btn-primary:hover { background: var(--blue-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9d1df; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; box-shadow: none; }

/* ============ Hero ============ */
.hero { padding-block: 64px 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 22px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust { font: 500 13px/1.7 var(--mono); color: var(--muted); }

/* The one bold element: the real app window resting on tiles from its own space map */
.stage { margin: 0; }
.mat { position: relative; padding: 30px; }
.mat .tiles {
  position: absolute; inset: 0; z-index: 0; display: grid; gap: 6px;
  grid-template-columns: 1.6fr 1fr 1fr .8fr; grid-template-rows: 1.2fr 1fr .9fr;
  grid-template-areas: "a a b c" "a a d d" "e f d d";
}
.mat .tiles i { border-radius: 9px; background: linear-gradient(145deg, rgba(255, 255, 255, .28), transparent 55%), var(--c); }
.mat .tiles i:nth-child(1) { grid-area: a; --c: var(--t1); }
.mat .tiles i:nth-child(2) { grid-area: b; --c: var(--t2); }
.mat .tiles i:nth-child(3) { grid-area: c; --c: var(--t4); }
.mat .tiles i:nth-child(4) { grid-area: d; --c: var(--t7); }
.mat .tiles i:nth-child(5) { grid-area: e; --c: var(--t5); }
.mat .tiles i:nth-child(6) { grid-area: f; --c: var(--t6); }
.window {
  position: relative; z-index: 1; border-radius: 10px; overflow: hidden; background: var(--surface);
  border: 1px solid rgba(28, 34, 48, .12); box-shadow: 0 24px 60px rgba(28, 34, 48, .28), 0 4px 12px rgba(28, 34, 48, .1);
}
.stage figcaption { margin-top: 14px; font: 500 13px/1.5 var(--mono); color: var(--muted); }

.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; padding-top: 30px; margin-top: 48px; border-top: 1px solid var(--line); }
.fact { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 15px; }
.fact b { font: 700 22px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ============ How it works (a real sequence, so it is numbered) ============ */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { display: grid; grid-template-rows: auto auto auto 1fr; gap: 10px; }
.step .n { font: 700 13px/1 var(--mono); color: var(--blue-ink); }
.step p { color: var(--muted); }
.crop { margin-top: 10px; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 30px rgba(28, 34, 48, .08); }
.crop img { width: 100%; height: 100%; object-fit: cover; }
.crop.drives img { object-position: 0 0; transform: scale(1.9); transform-origin: 0 0; }
.crop.map img { object-position: 100% 30%; }
.crop.dialog img { object-position: 50% 50%; transform: scale(1.7); transform-origin: 50% 52%; }

/* ============ Features ============ */
.white { background: var(--surface); border-block: 1px solid var(--line); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }
.feature { display: grid; gap: 8px; align-content: start; }
.feature p { color: var(--muted); font-size: 16px; }
.c1 { --c: var(--t1); } .c2 { --c: var(--t2); } .c3 { --c: var(--t3); } .c4 { --c: var(--t4); } .c5 { --c: var(--t5); } .c6 { --c: var(--t6); } .c7 { --c: var(--t7); }
.swatch { width: 28px; height: 28px; border-radius: 7px; background: var(--c); margin-bottom: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }

/* ============ Safety ============ */
.safety { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.safety-copy { display: grid; gap: 22px; }
.locks { display: flex; flex-wrap: wrap; gap: 8px; }
.lockchip { display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1 var(--mono); padding: 8px 11px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); }
.lockchip svg { width: 14px; height: 14px; color: var(--t4); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.rules li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; color: var(--muted); }
.rules li::before {
  content: ""; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.rules b { color: var(--ink); }
.safety .window { box-shadow: 0 20px 50px rgba(28, 34, 48, .14); }

/* ============ Compare ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.compare { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font: 600 13px/1.2 var(--mono); color: var(--muted); background: #f8f9fc; }
.compare tbody th { font-weight: 600; width: 18%; }
.compare td { color: var(--muted); }
.compare tr:last-child > * { border-bottom: 0; }
.compare .us { background: #f2f6ff; color: var(--ink); }
.compare thead .us { color: var(--blue-ink); background: #e8f0ff; }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--bad); font-weight: 700; }
.na { font-style: italic; font-size: 14px; }
.note { font: 500 13px/1.6 var(--mono); color: var(--muted); margin-top: 14px; }
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 36px; }
.pick > div { display: grid; gap: 8px; }
.pick p { color: var(--muted); }

/* ============ Changelog preview ============ */
.release { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.release .ver { display: grid; gap: 6px; align-content: start; }
.release .ver b { font: 700 24px/1 var(--mono); }
.release time { font: 500 14px/1 var(--mono); color: var(--muted); }
.pill { justify-self: start; font: 700 11px/1 var(--mono); padding: 5px 9px; border-radius: 99px; background: #e2f6ec; color: var(--good); }
.release ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.release .more { margin-top: 16px; display: inline-block; font-weight: 600; }

/* ============ FAQ ============ */
.faq { display: grid; max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 18px; display: flex; justify-content: space-between; gap: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 22px/1 var(--mono); color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 20px; color: var(--muted); max-width: 70ch; }

/* ============ Final band + footer ============ */
.final { background: var(--blue); color: #fff; }
.final .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.final .copy { display: flex; align-items: center; gap: 22px; }
.final img { width: 64px; height: 64px; flex: none; }
.final h2 { color: #fff; }
.final p { color: rgba(255, 255, 255, .86); margin-top: 6px; }
.btn-light { background: #fff; color: var(--blue-ink); box-shadow: 0 8px 20px rgba(14, 40, 110, .25); }
.btn-light:hover { background: #eef3ff; }
.final .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.final .btn-ghost:hover { border-color: #fff; }
.foot { padding-block: 32px 44px; color: var(--muted); font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--muted); }

/* ============ Simple pages (changelog, license, privacy, 404, soon) ============ */
.doc { max-width: calc(780px + 2 * 24px); padding-block: 56px 80px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 18px; }
.doc h2 { font-size: 28px; margin: 44px 0 6px; }
.doc h3 { font-size: 15px; margin: 22px 0 8px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; margin: 0; }
.doc strong { color: var(--ink); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
pre.license { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; font: 500 14px/1.65 var(--mono); color: var(--ink); overflow-x: auto; margin-top: 24px; }
.page { max-width: 780px; margin: 0 auto; padding-block: 64px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.page h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 16px; }
.page h2 { font-size: 24px; margin: 32px 0 8px; }
.page p { color: var(--muted); }
.page p + p { margin-top: 10px; }
.page hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.page.center .btn { margin-top: 24px; }
.center-img { margin: 0 auto 18px; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .hero-grid, .safety { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
}
@media (max-width: 680px) {
  section { padding-block: 64px; }
  .hero { padding-block: 40px 56px; }
  .steps, .features, .pick, .release { grid-template-columns: minmax(0, 1fr); }
  .mat { padding: 16px; }
  .nav-right .nav-dl { display: none; }
  .final .copy { align-items: flex-start; }
  .facts { gap: 10px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
