/* DropSnap site: what sits inside the visuals (the island, the hero desktop, the browser demo, the feature
   panels) and the few page rules the kit lacks. The kit (system.css and friends) does the rest. */

/* Chinese text falls back to the Mac's own Chinese faces (Epilogue has no CJK glyphs) */
:root {
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-display: "Epilogue", var(--font-cjk), system-ui, sans-serif;
  --font-text: "Epilogue", var(--font-cjk), system-ui, sans-serif;
}
:root[lang="zh-CN"] { --display-tracking: -0.02em; --display-tracking-xl: -0.03em; }
/* the dealt greys read 5.2:1 and 6.7:1; small body text needs 7:1, so both are a step darker / lighter */
:root { --p-muted: #545559; --p-inv-muted: #a8a9ac; }
:root[lang="zh-CN"] h1 { word-break: keep-all; line-break: strict; }
.hero--centred h1 { max-width: 18ch; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------------------------------------------------------- nav */
.nav__logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-icon { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.logo-cn { color: var(--muted); font-weight: 400; }
.lang-toggle { background: none; border: 0; cursor: pointer; font: inherit; min-width: 44px; }
.panel--checker img.frame__img--contain { object-fit: contain; padding: 12px; }
@media (max-width: 639px) { .logo-cn { display: none; } .hero .pill > .muted { display: none; } }
@media (max-width: 359px) { .nav:not(.is-open) .nav__actions { display: none; } .nav:not(.is-open) .nav__toggle { margin-left: auto; } }

/* ---------------------------------------------------------------- checkerboard (transparent pixels) */
.checker, .panel--checker {
  background-color: #fff;
  background-image: conic-gradient(#e7ebf0 25%, transparent 0 50%, #e7ebf0 0 75%, transparent 0);
  background-size: 16px 16px;
}

/* ---------------------------------------------------------------- the island (DropSnap's own UI) */
.isl {
  display: inline-flex; align-items: flex-start; gap: 2px;
  padding: 12px 14px 12px; border-radius: 0 0 26px 26px;
  background: #0b0b0d; color: #fff;
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / .55);
  font-family: var(--font-text);
}
.isl__b {
  display: grid; justify-items: center; align-content: start; gap: 6px; width: 68px;
  padding: 0; border: 0; background: none; color: rgb(255 255 255 / .9);
  font: 500 11px/1.25 var(--font-text); text-align: center;
}
.isl__b > i {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(180deg, color-mix(in oklab, var(--tint, #888) 78%, white), var(--tint, #888));
  box-shadow: 0 0 10px color-mix(in oklab, var(--tint, #888) 45%, transparent);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .25s ease, opacity .2s ease;
}
.isl__b svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.isl__b.is-hot > i { transform: scale(1.16); box-shadow: 0 0 18px color-mix(in oklab, var(--tint, #888) 90%, transparent); }
.isl__b--shelf { color: rgb(255 255 255 / .62); }
.isl__b--shelf > i { border-radius: 14px; background: rgb(255 255 255 / .06); border: 1.5px dashed rgb(255 255 255 / .42); box-shadow: none; }
.isl__b--shelf svg { stroke: rgb(255 255 255 / .7); }
.isl__b.is-dim { opacity: .35; }
.isl__b.is-dim > i { transform: none; }
.isl__pills { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; max-width: 300px; padding: 9px 4px 0 10px; }
.isl__pill {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px;
  font: 600 12px/1 var(--font-text); color: #fff; white-space: nowrap;
  background: color-mix(in oklab, var(--tint) 28%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tint) 80%, transparent);
}
.isl__pill.is-hot { background: color-mix(in oklab, var(--tint) 95%, transparent); box-shadow: none; }

/* ---------------------------------------------------------------- hero: a Mac desktop in the lit frame */
.hero--centred .hero__window > .mac { height: 300px; }
.mac {
  overflow: hidden; border-radius: 14px; color: #1c2026; font-family: var(--font-text);
  background: linear-gradient(160deg, #eef3f9, #d3dfec 55%, #bccde1);
  box-shadow: 0 0 0 1px rgb(20 40 70 / .08), 0 30px 70px -30px rgb(20 40 70 / .5);
}
.mac__bar {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  height: 28px; padding: 0 14px; font-size: 12px; background: rgb(255 255 255 / .6);
}
.mac__menu { display: flex; gap: 16px; } .mac__menu b { font-weight: 600; }
.mac__status { display: flex; align-items: center; gap: 10px; }
.mac__bolt { width: 14px; height: 14px; fill: currentColor; }
.mac__desk { position: relative; height: calc(100% - 28px); }
.mac .isl { position: absolute; z-index: 2; left: 50%; top: -28px; transform: translateX(-50%); padding-top: 38px; }
.mac__file { position: absolute; left: 44px; top: 48px; display: grid; justify-items: center; gap: 6px; width: 132px; font-size: 12px; opacity: .45; }
.mac__file img { width: 112px; height: 75px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 3px #fff, 0 6px 16px -6px rgb(0 0 0 / .4); }
.mac__ghost { position: absolute; z-index: 3; left: calc(50% - 132px); top: 92px; }
.mac__ghost img { width: 92px; height: 61px; object-fit: cover; border-radius: 4px; opacity: .92; box-shadow: 0 0 0 3px #fff, 0 16px 30px -10px rgb(0 0 0 / .45); }
.mac__result { position: absolute; right: 48px; top: 22px; display: grid; justify-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
.mac__result .checker { display: grid; place-items: center; width: 150px; height: 150px; border-radius: 10px; box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 14px 30px -14px rgb(0 0 0 / .35); }
.mac__result img { width: auto; height: 136px; }
.mac__toast {
  position: absolute; left: 50%; top: 178px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 99px; white-space: nowrap; font-size: 13px; font-weight: 500;
  background: rgb(255 255 255 / .92); box-shadow: 0 10px 24px -12px rgb(0 0 0 / .35);
}
.mac__toast svg { width: 16px; height: 16px; fill: none; stroke: #1f9d63; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-ly-steps] .mac__toast[data-step].is-off { transform: translate(-50%, 6px); }
@media (max-width: 1023px) { .mac__menu span { display: none; } }
@media (max-width: 899px) {
  .mac__file { display: none; }
  .mac__result { right: 20px; }
}
/* a short screen (1024x768, 1280x800) leaves the window about 250px: the story moves up to stay above its fade */
@media (min-width: 640px) and (max-height: 820px) {
  .mac__ghost { top: 88px; }
  .mac__ghost img { width: 64px; height: 43px; }
  .mac__result { top: 10px; gap: 6px; }
  .mac__result .checker { width: 112px; height: 112px; }
  .mac__result img { height: 100px; }
  .mac__toast { top: 138px; }
}
@media (max-width: 639px) {
  .hero--centred .hero__window > .mac { height: 220px; }
  .mac__result { display: none; }
  .mac__menu, .mac__status { visibility: hidden; }
  .mac .isl { padding: 32px 8px 10px; border-radius: 0 0 20px 20px; }
  .mac .isl__b { width: 54px; font-size: 10px; gap: 4px; }
  .mac .isl__b > i { width: 36px; height: 36px; }
  .mac .isl__b svg { width: 17px; height: 17px; }
  .mac__ghost { left: calc(50% - 104px); top: 70px; }
  .mac__ghost img { width: 64px; height: 43px; }
  .mac__toast { top: 128px; font-size: 12px; }
}

/* ---------------------------------------------------------------- #try: the app frame (sections-library app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); overflow: hidden; }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane--list::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-fill)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .demo .demo__side { display: none; } .demo .demo__body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
  .app > .app__pane--list::after { display: none; }
  .demo .demo__side { display: none; }
  .demo .demo__body { grid-template-columns: minmax(0, 1fr); }
}

.demo { --demo-accent: var(--p-accent); min-height: 520px; font-family: var(--font-text); }
.demo__files { display: flex; flex-direction: column; background: var(--u-fill); }
.demo__bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; border-bottom: 1px solid var(--u-line); font-size: 13px; }
.demo__bar b { font-weight: 600; }
.demo__body { display: grid; grid-template-columns: 124px minmax(0, 1fr); flex: 1; min-height: 0; }
.demo__side { display: grid; align-content: start; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--u-line); font-size: 13px; color: var(--u-muted); }
.demo__side > span { padding: 5px 8px; border-radius: 6px; }
.demo__side > .is-on { background: var(--u-fill-3); color: var(--u-ink); }
.demo__side > .demo__label { padding-top: 0; font-size: 11px; font-weight: 600; color: var(--u-soft); }
.demo__list { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 2px; margin: 0; padding: 8px; list-style: none; }
.demo__list > li, .file { min-width: 0; }
.file {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  width: 100%; padding: 8px; border: 0; border-radius: 10px; background: none; color: var(--u-ink);
  font: inherit; text-align: left; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.file:hover { background: var(--u-fill-2); }
.file:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: -2px; }
.file.is-picked { background: color-mix(in oklab, var(--demo-accent) 12%, var(--u-bg)); box-shadow: inset 0 0 0 1.5px var(--demo-accent); }
.file.is-lifted { opacity: .45; }
.file__thumb { grid-row: 1 / span 2; width: 56px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--u-fill-3); box-shadow: 0 0 0 1px var(--u-line); }
.file__thumb--video { display: grid; place-items: center; background: linear-gradient(135deg, #2b3340, #11151b); }
.file__thumb--video svg { width: 16px; height: 16px; fill: #fff; }
.file__thumb--pdf { display: grid; place-items: center; background: #fff; color: #d6372e; font: 700 11px/1 var(--font-text); letter-spacing: .04em; }
.file__thumb--plus { display: grid; place-items: center; background: var(--u-bg); color: var(--u-muted); font-size: 22px; font-weight: 300; box-shadow: inset 0 0 0 1.5px var(--u-line-2); }
.file__name { align-self: end; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; line-height: 1.3; }
.file__meta { align-self: start; font-size: 12px; color: var(--u-muted); }
.file--pick { cursor: pointer; }
.file--pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file--pick:focus-within { outline: 2px solid var(--demo-accent); outline-offset: -2px; }

.demo__stage {
  display: flex; flex-direction: column; align-items: center; color: #1c2026;
  background: linear-gradient(rgb(255 255 255 / .6), rgb(255 255 255 / .6)) top / 100% 26px no-repeat, linear-gradient(160deg, #eef3f9, #d3dfec 55%, #bccde1);
}
.isl--demo { position: relative; z-index: 2; padding-top: 34px; }
.isl--demo .isl__b { cursor: pointer; border-radius: 12px; }
.isl--demo .isl__b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.isl--demo .isl__b:hover:not(.is-dim) > i { transform: scale(1.08); }
.isl--demo.is-armed .isl__b:not(.is-dim) > i { animation: isl-ready 1.4s ease-in-out infinite; }
@keyframes isl-ready { 50% { box-shadow: 0 0 20px color-mix(in oklab, var(--tint, #fff) 85%, transparent); } }
.isl--demo .isl__b--shelf > i { animation: none !important; }
.demo__out { position: relative; display: grid; place-items: center; gap: 14px; flex: 1 1 0; min-height: 0; width: 100%; padding: 20px 24px; }
.demo__hint { display: grid; justify-items: center; gap: 10px; max-width: 280px; color: #4d5964; font-size: 14px; line-height: 1.5; text-align: center; }
.demo__hint svg { width: 28px; height: 28px; transform: rotate(-90deg); fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.demo__hint[hidden] { display: none; }
.demo__result { display: grid; justify-items: center; gap: 10px; max-width: 100%; max-height: 100%; min-height: 0; }
.demo__result[hidden], .demo__ratios[hidden], [data-download][hidden] { display: none; }
.res__img { display: grid; place-items: center; min-height: 0; max-width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 18px 36px -18px rgb(0 0 0 / .4); }
.res__img img { display: block; width: auto; max-width: 100%; max-height: min(300px, 38svh); object-fit: contain; }
.res__img.checker img { padding: 10px; }
.res__name { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border-radius: 99px; background: rgb(255 255 255 / .85); font-size: 13px; font-weight: 500; }
.res__name > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.res__name small { color: #5b6470; font-size: 12px; font-weight: 400; white-space: nowrap; }
.res__rename { display: grid; gap: 8px; width: min(440px, 100%); padding: 16px; border-radius: 12px; background: rgb(255 255 255 / .9); box-shadow: 0 18px 36px -18px rgb(0 0 0 / .35); font-size: 13px; }
.res__rename s { color: #7a828c; overflow-wrap: anywhere; }
.res__rename b { font-family: var(--font-mono); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; color: #14161b; }
.res__note { display: grid; place-items: center; width: min(420px, 100%); padding: 18px 20px; border-radius: 12px; background: rgb(255 255 255 / .82); text-align: center; font-size: 14px; line-height: 1.5; }
.res__note .isl__pills { justify-content: center; max-width: none; padding: 10px 0 0; }
.demo__ratios { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgb(255 255 255 / .8); }
.demo__ratios button { height: 30px; padding: 0 12px; border: 0; border-radius: 99px; background: none; color: #1c2026; font: 500 13px/1 var(--font-text); cursor: pointer; }
.demo__ratios button[aria-pressed="true"] { background: #14161b; color: #fff; }
.demo__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; align-self: stretch; flex: none; min-height: 60px; padding: 10px 16px 10px 20px; background: rgb(255 255 255 / .72); border-top: 1px solid rgb(20 40 70 / .08); }
.demo__msg { margin: 0; font-size: 14px; line-height: 1.45; color: #1c2026; }
.demo__foot .btn { flex: none; color: #14161b; }
/* stacked (tablet and phone) the bar runs the full width: a hairline above it, no ground of its own */
@media (max-width: 1023px) { .demo__foot { background: none; } }
.demo.is-dragging, .demo.is-dragging * { cursor: grabbing; }
.drag-ghost { position: fixed; z-index: 1000; left: 0; top: 0; pointer-events: none; display: grid; justify-items: center; gap: 4px; transform: translate(-50%, -60%); opacity: .94; }
.drag-ghost img, .drag-ghost .file__thumb { width: 84px; height: 56px; border-radius: 5px; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 18px 30px -10px rgb(0 0 0 / .45); }
.drag-ghost span { padding: 2px 8px; border-radius: 99px; background: var(--demo-accent, #1d6af0); color: #fff; font: 500 11px/1.4 var(--font-text); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1023px) {
  .demo { min-height: 0; }
  .demo__files { max-height: none; }
  .demo__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
  .demo__list > li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .try-lede .link { display: none; }
  .app.ui { margin-top: var(--s-4); }
  .demo__bar { display: none; }
  .demo__list { padding: 6px; column-gap: 4px; }
  .file { grid-template-columns: 36px minmax(0, 1fr); column-gap: 8px; padding: 5px 6px; }
  .file__thumb { width: 36px; height: 30px; border-radius: 5px; }
  /* a phone shows the names whole (two or three short lines) and leaves out the type and size */
  .file__name { align-self: center; font-size: 12.5px; line-height: 1.28; }
  .file__meta { display: none; }
  .isl--demo { padding: 30px 6px 10px; border-radius: 0 0 20px 20px; }
  .isl--demo .isl__b { width: 58px; font-size: 10px; gap: 4px; }
  .isl--demo .isl__b > i { width: 38px; height: 38px; }
  .isl--demo .isl__b svg { width: 17px; height: 17px; }
  .demo__out { padding: 14px 12px; }
  .res__img img { max-height: 128px; }
  .demo__foot { flex-wrap: wrap; padding: 10px 12px; }
  .demo__msg { font-size: 13px; }
}

/* ---------------------------------------------------------------- #features panels */
#features .panel { --p-h: 300px; }
.panel--ba .ba { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; }
.ba__half { position: relative; overflow: hidden; }
.ba__half > .frame__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__half.checker { display: grid; place-items: center; }
.ba__half.checker img { width: auto; height: 86%; max-width: 92%; object-fit: contain; }
.ba::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .06); }
.panel--desk { --vy: 40%; }
.presets { inset: 0; display: grid; justify-items: center; align-content: start; gap: clamp(20px, 5vh, 56px); }
.presets .isl { padding: 18px 16px 16px 14px; border-radius: 0 0 26px 26px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 0 16px; }
.chips__arrow { width: 20px; height: 20px; fill: none; stroke: var(--ground-ink, #25303a); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .6; }
.chip-file {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px;
  background: #fff; color: #14161b; font-family: var(--font-text); box-shadow: 0 14px 30px -16px rgb(0 0 0 / .4);
}
.chip-file .file__thumb { width: 44px; height: 32px; grid-row: auto; }
.chip-file > span:last-child { display: grid; gap: 2px; font-size: 13px; }
.chip-file b { font-weight: 500; }
.chip-file small { color: #5b6470; font-size: 12px; }
.panel--shot > img { position: absolute; inset: 0; z-index: 1; margin: auto; width: auto; height: auto; max-width: calc(100% - 64px); max-height: calc(100% - 64px); border-radius: 12px; box-shadow: 0 24px 50px -24px rgb(20 40 70 / .5); }
.panel--names .names {
  left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 48px));
  display: grid; gap: 10px; margin: 0; padding: 0; list-style: none;
}
.names li { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #fff; color: #14161b; box-shadow: 0 12px 26px -16px rgb(0 0 0 / .35); }
.names__old { font-size: 12px; color: #7a828c; text-decoration: line-through; overflow-wrap: anywhere; }
.names__new { font: 500 13px/1.35 var(--font-mono); overflow-wrap: anywhere; }
@media (max-width: 1023px) and (min-width: 640px) {
  .presets .isl__pills { max-width: 220px; }
  #features > .wrap > .grid:last-child, #features > .wrap > .group > .grid:last-child { align-self: stretch; flex: 1 1 auto; min-height: 0; }
}
@media (max-width: 639px) {
  #features .panel { --p-h: 130px; }
  /* the second screen's pair has the screen to itself: its panels take more of it */
  #features > .wrap > .grid:last-child .panel { --p-h: 225px; }
  .presets .isl { padding: 12px 10px; }
  .presets .isl__pills { max-width: 170px; gap: 6px; padding-top: 4px; }
  .presets .isl__pill { height: 26px; padding: 0 10px; font-size: 11px; }
  .presets { gap: 12px; }
  .chips { gap: 8px; }
  .chips > .chip-file:last-child, .chips__arrow { display: none; }
  .panel--shot > img { max-width: calc(100% - 32px); max-height: calc(100% - 32px); }
  .panel--names .names { gap: 8px; }
  .names li { padding: 8px 12px; }
  .names li:nth-child(n+3) { display: none; }
}

/* ---------------------------------------------------------------- #local */
#local .checks { gap: var(--s-5); }
#local .checks b { font-weight: 600; }
#local .checks li > span > span { color: var(--muted); }
/* the moment's stage keeps 20px off the band's edges at every width (its own gutter is 9px on a tablet) */
#local { --mo-gap: 20px; }
.local > .span-6 { display: flex; flex-direction: column; min-height: 0; }
.local > .checks { align-self: start; }
.panel--dg { --p-h: 340px; flex: 1 1 auto; border-radius: var(--r-md); }
.panel--dg .dg { position: absolute; inset: 0; z-index: 1; --dg-ink: #14161b; --dg-muted: #46505c; --dg-node: #ffffff; }
/* the core is an ink tile: a name drawn inside it (a narrow diagram) takes the tile's light ink */
.panel--dg .dg-node--core.is-ink > .dg-cap--in { color: var(--dg-node); }
/* 1024-1279: the diagram takes seven columns, so it keeps its named lanes (under 480px it drops to bare tiles) */
@media (min-width: 1024px) and (max-width: 1279px) { .local > .span-6 { grid-column: 6 / span 7; } }
@media (max-width: 1023px) { #local .local { row-gap: var(--s-6); } .panel--dg { --p-h: 280px; } }
@media (min-width: 640px) and (max-width: 1023px) {
  #local .local { grid-template-rows: auto minmax(0, 1fr); }
  /* the four facts two by two, so the diagram keeps the height its four lanes need */
  #local .checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); }
}
@media (max-width: 639px) {
  .panel--dg { --p-h: 200px; }
  #local .local { row-gap: var(--s-4); }
  #local .checks { gap: var(--s-2); }
}

/* ---------------------------------------------------------------- #pricing */
.section-head--row > .tabs { display: flex; flex-wrap: nowrap; gap: var(--s-2); max-width: none; }
.plans { margin-top: 0; }
.plans .checks { align-content: start; }
.card--plan .price s { font-size: var(--t-lead); text-decoration-thickness: 1px; }
.card--plan .price .muted { font-size: var(--t-small, 14px); }
@media (min-width: 640px) {
  .plans > .card--plan { display: grid; grid-template-rows: subgrid; grid-row: span 5; gap: var(--s-4); }
}
/* a tablet keeps the three plans side by side, so the prices compare on one screen */
@media (min-width: 640px) and (max-width: 1023px) {
  .plans > .card--plan { grid-column: auto / span 4; padding: var(--s-5) var(--s-4); }
  /* the cards run down to the screen's foot; what is left goes under their lists */
  #pricing .plans { flex: 1 1 auto; grid-template-rows: repeat(3, auto) minmax(0, 1fr); }
  /* three cards side by side are narrow: the one-line descriptions under the names give way to the lists */
  .plans > .card--plan > p.muted { display: none; }
  .plans > .card--plan { grid-row: span 4; }
  .card--plan .checks { row-gap: 8px; }
  .plans { column-gap: var(--s-3); }
  .card--plan h3 .badge { margin-left: 0; }
  /* a button label never widens the card's column past its padding (the English labels are the long ones) */
  .plans > .card--plan { grid-template-columns: minmax(0, 1fr); }
  .plans > .card--plan > .btn { max-width: 100%; padding-inline: 14px; white-space: normal; text-align: center; }
}
.card--plan { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease, border-color .25s ease; }
@media (hover: hover) {
  html:not([data-motion="off"]) .card--plan:hover { transform: translateY(-2px); border-color: var(--line-strong, var(--line)); box-shadow: 0 14px 32px -18px rgb(20 22 27 / .22); }
}
@media (prefers-reduced-motion: reduce) { .card--plan { transition: none; } .card--plan:hover { transform: none; } }
/* a phone: the three plans stacked fit two screens */
@media (max-width: 639px) {
  #pricing { --hm: 2; }
  /* the plans take what the two screens leave, so the payment note sits on the section's foot */
  #pricing .plans { flex: 1 0 auto; }
  .card.card--plan { gap: 10px; }
  .card--plan .checks { row-gap: 6px; }
  .pay-foot { margin-top: var(--s-4); }
}
.pay-foot { display: grid; gap: var(--s-2); margin-top: var(--s-5); }
.pay-foot p { margin: 0; }
.notice { padding: 10px 14px; border-radius: var(--r-sm); background: color-mix(in oklab, var(--p-accent) 10%, var(--bg)); color: var(--ink); }
.notice[hidden] { display: none; }

/* ---------------------------------------------------------------- #faq */
.faq-lede .link { display: inline; }
/* the answers fill the screen under the heading, their rows spread to its foot; each icon sits over its
   question, so every question starts on its column's line */
.faq.grid { margin-top: var(--s-6); row-gap: 0; align-content: space-between; }
.faq > .faq__item { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-3); align-content: start; }
.faq__qa { display: grid; gap: var(--s-2); min-width: 0; }
.faq__qa > h3 { font: 500 var(--t-lead)/1.4 var(--font-text); letter-spacing: 0; }
.faq__qa > p { margin: 0; }
/* a phone: six answers stacked take two screens */
@media (max-width: 639px) {
  #faq { --hm: 2; }
  /* the answers still spread to the foot, but grow the section when they need more than two screens */
  #faq .faq.fill { flex: 1 0 auto; min-height: auto; }
  /* a short or narrow phone (320 wide): the demo and the local band grow their section rather than run into the next */
  #try .app.fill, #local .local.fill { flex: 1 0 auto; min-height: auto; }
}
@media (min-width: 640px) {
  .faq.grid > .faq__item { grid-column: auto / span 6; }
  .faq > .faq__item:nth-child(2) { padding-top: 0; }
}
/* a short screen (1024x768, 1280x800): six answers on one screen need tighter rows and a smaller tile (the icon
   inside stays 24px) */
@media (min-width: 640px) and (max-height: 820px) {
  .faq.grid { margin-top: var(--s-5); }
  .faq > .faq__item { padding-block: var(--s-3); row-gap: var(--s-2); }
  .faq > .faq__item:is(:first-child, :nth-child(2)) { padding-top: 0; }
  .faq .ic-tile--40 { width: 32px; height: 32px; }
  .faq__qa { gap: 6px; }
}

/* ---------------------------------------------------------------- footer */
.footer__legal .credits { color: var(--muted); }
@media (max-width: 1023px) { .footer .closing__links .footer__col { grid-column: auto / span 4; } }
@media (max-width: 359px) {
  .footer .closing__links .footer__col { grid-column: auto / span 6; }
  .closing__cta .btn { width: 100%; min-width: 0; white-space: normal; padding-inline: var(--s-4); }
}

/* ---------------------------------------------------------------- motion off */
@media (prefers-reduced-motion: reduce) {
  .isl__b > i, .isl--demo.is-armed .isl__b > i { transition: none; animation: none; }
}

/* ---------------------------------------------------------------- inner pages (welcome, download, legal) */
.page { padding: calc(var(--nav) + var(--s-9)) 0 var(--s-9); min-height: calc(100svh - 120px); }
.footer--sub { padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.footer--sub .footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); margin-block: 0; padding: 0; border: 0; font-size: var(--t-small); color: var(--muted); }
.footer__sublinks { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer__sublinks a { color: inherit; }
.footer__sublinks a:hover { color: var(--ink); }
/* long pages written once per language: the block in the other language is hidden */
:root:not([data-lang="en"]) [data-only="en"], :root[data-lang="en"] [data-only="zh"] { display: none !important; }

.welcome { display: grid; justify-items: start; gap: var(--s-5); max-width: 760px; }
.welcome__icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 12px 30px -16px rgb(20 40 70 / .5); }
.welcome__state { display: grid; gap: var(--s-5); width: 100%; }
.welcome__state[hidden] { display: none; }
.welcome__state h1 { font-size: var(--t-h2); line-height: 1.1; }
.welcome__state .t-lead { margin: 0; max-width: 60ch; }
.welcome__wait { display: flex; gap: 8px; height: 12px; }
.welcome__wait i { width: 10px; height: 10px; border-radius: 50%; background: var(--p-accent); animation: wait-dot 1.2s ease-in-out infinite; }
.welcome__wait i:nth-child(2) { animation-delay: .15s; } .welcome__wait i:nth-child(3) { animation-delay: .3s; }
@keyframes wait-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .welcome__wait i { animation: none; opacity: .6; } }
.keybox { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.keybox code { display: block; max-height: 9.5em; overflow: auto; font: 400 13px/1.55 var(--font-mono); overflow-wrap: anywhere; word-break: break-all; user-select: all; -webkit-user-select: all; }
.keybox code:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 4px; border-radius: 4px; }
.keybox__actions { display: flex; align-items: center; gap: var(--s-4); }
.welcome__manual { display: grid; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.welcome__manual h2 { font: 500 var(--t-lead)/1.4 var(--font-text); letter-spacing: 0; }
.welcome__manual ol { display: grid; gap: var(--s-2); margin: 0; padding-left: 1.4em; }

.legal { max-width: 760px; }
.legal h1 { font-size: var(--t-h2); line-height: 1.1; margin-bottom: var(--s-3); }
.legal .legal__date { color: var(--muted); font-size: var(--t-small); margin-bottom: var(--s-7); }
.legal h2 { font: 500 var(--t-h3)/1.3 var(--font-text); letter-spacing: -0.01em; margin: var(--s-7) 0 var(--s-3); }
.legal p, .legal li { max-width: 68ch; }
.legal p + p { margin-top: var(--s-3); }
.legal ul { display: grid; gap: var(--s-2); margin: var(--s-3) 0 0; padding-left: 1.2em; }
.legal a { color: var(--p-accent); }
.legal table { width: 100%; margin-top: var(--s-4); border-collapse: collapse; font-size: var(--t-small); }
.legal th, .legal td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { font-weight: 500; }

.download { display: grid; justify-items: start; gap: var(--s-5); max-width: 720px; }
.download h1 { font-size: var(--t-h1); line-height: 1.04; }
.download .t-lead { margin: 0; }
.download .checks { margin-top: var(--s-2); }
