/* ResLab app-site kit. Colors come from theme.css (generated per app from its Material palette);
   this file holds type, layout, components and the fixed E-Ink theme. */

@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-wght-normal.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: "Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url(fonts/ibm-plex-sans-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-400-normal.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: "Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-500-normal.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: "Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

:root {
  --f-sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --w-body: 400;
  --r-chip: 6px; --r-btn: 10px; --r-card: 16px; --r-phone: 34px;
  --shadow: 0 30px 60px -30px rgb(10 16 24 / .38);
  --wrap: 1200px;
  --sec: 96px;
  --ease: 160ms ease-out;
}

/* E-Ink: two colors, 1px rules, no shadow, no motion. Same for every app. */
:root[data-theme="eink"] {
  --primary: #000; --on-primary: #fff; --primary-container: #fff; --on-primary-container: #000;
  --bg: #fff; --fg: #000; --surface: #fff; --surface-2: #fff; --muted: #000; --line: #000;
  --shadow: none; --w-body: 450; --ease: 0s;
  color-scheme: light;
}
:root[data-theme="eink"] *, :root[data-theme="eink"] *::before, :root[data-theme="eink"] *::after {
  transition: none !important; animation: none !important;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: var(--w-body) 1.0625rem/1.6 var(--f-sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.05; letter-spacing: -.028em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.14; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: var(--f-mono); font-size: .875em; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
.ico { width: 24px; height: 24px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: var(--r-btn); z-index: 20; }
.skip:focus { top: 12px; }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: 32px; padding-right: 32px; } }

.eyebrow {
  font: 500 .75rem/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); display: flex; gap: 8px; align-items: center;
}
.eyebrow::before { content: ""; width: 10px; height: 10px; flex: none;
  background: linear-gradient(var(--primary) 0 0) 0 0 / 5px 5px no-repeat, linear-gradient(var(--primary) 0 0) 5px 5px / 5px 5px no-repeat; }
.lead { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 52ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border-radius: var(--r-btn); border: 1px solid transparent;
  font: 600 1rem/1 var(--f-sans); text-decoration: none; cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.btn .ico { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--fg)); }
.btn-ghost { color: var(--fg); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--fg); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .875rem; }
:root[data-theme="eink"] .btn-primary:hover { background: #000; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 1.125rem; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: none; gap: 24px; font-size: .9375rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--fg); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { display: flex; gap: 2px; }
.lang a { font: 500 .75rem/1 var(--f-mono); text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 8px 6px; border-radius: var(--r-chip); }
.lang a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--primary); border-radius: 0; }
.switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 2px; gap: 2px; }
.switch button { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.switch button .ico { width: 18px; height: 18px; }
.switch button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.top .btn-sm { display: none; }
@media (min-width: 640px) { .top .btn-sm { display: inline-flex; } }
@media (min-width: 980px) { .nav { display: flex; } }

/* Hero */
.hero { display: grid; gap: 40px; padding-block: 56px 0; align-items: end; }
.hero-copy { display: grid; gap: 22px; padding-bottom: 48px; min-width: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.meta { font: 400 .8125rem/1.6 var(--f-mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 14px; }
.meta > span:empty { display: none; }
.stack { display: grid; gap: 24px; align-content: start; min-width: 0; }
.hero-shot { margin: 0; display: grid; justify-items: center; gap: 12px; min-width: 0; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; padding-top: 80px; }
}

/* Phone frame: real screenshots in a flat frame, cut at the bottom in the hero. */
.phone {
  width: 300px; max-width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-phone); padding: 9px; box-shadow: var(--shadow);
}
.phone img, .phone .ph { width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--line); background: var(--surface-2); }
.phone .ph { aspect-ratio: 9 / 20; display: grid; place-items: center; text-align: center; padding: 16px; font: 400 .75rem/1.5 var(--f-mono); color: var(--muted); }
.hero .phone { border-bottom: 0; border-radius: var(--r-phone) var(--r-phone) 0 0; padding-bottom: 0; }
.hero .phone img, .hero .phone .ph { border-bottom: 0; border-radius: 26px 26px 0 0; }
.hero .phone .crop { max-height: 560px; overflow: hidden; border-radius: 26px 26px 0 0; }
.caption { font: 400 .75rem/1.5 var(--f-mono); color: var(--muted); text-align: center; overflow-wrap: anywhere; }

/* Theme-dependent screenshots: one element per variant, the active theme shows its own. */
.v-dark, .v-eink { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .v-light { display: none; }
  :root:not([data-theme]) .v-dark { display: block; }
}
:root[data-theme="dark"] .v-light { display: none; }
:root[data-theme="dark"] .v-dark { display: block; }
:root[data-theme="eink"] .v-light, :root[data-theme="eink"] .v-dark { display: none; }
:root[data-theme="eink"] .v-eink { display: block; }

/* Facts strip */
.facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-block: 1px solid var(--line); }
.facts li { display: flex; gap: 10px; align-items: center; padding: 18px 16px 18px 0; font-weight: 500; }
.facts .ico { color: var(--primary); width: 20px; height: 20px; }

/* Sections */
.block { padding-block: var(--sec) 0; }
.sec-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.sec-head .lead { font-size: 1.125rem; }
@media (max-width: 719px) { :root { --sec: 64px; } }

.feature { display: grid; gap: 28px; align-items: center; padding-block: 24px; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature-copy { display: grid; gap: 12px; max-width: 48ch; min-width: 0; }
.feature-copy .ico { color: var(--primary); width: 28px; height: 28px; }
.feature-copy p { color: var(--muted); }
.feature .phone { justify-self: center; width: 260px; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; padding-block: 40px; }
  .feature:nth-child(even) .feature-copy { order: 2; }
}

.more { margin-top: 48px; display: grid; gap: 20px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mini { border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 8px; align-content: start; background: var(--surface); }
.mini .ico { color: var(--primary); }
.mini p { color: var(--muted); font-size: .9688rem; }

/* Spotlight */
.spot { display: grid; gap: 40px; align-items: center; }
.spot-copy { display: grid; gap: 16px; min-width: 0; }
.spot-copy > p { color: var(--muted); max-width: 56ch; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 12px; margin-top: 8px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: baseline; }
.steps li::before { content: counter(step); font: 500 .8125rem/32px var(--f-mono); width: 32px; height: 32px; text-align: center; border: 1px solid var(--line); border-radius: 50%; color: var(--primary); }
.spot .phone { justify-self: center; width: 280px; }
@media (min-width: 900px) { .spot.has-shot { grid-template-columns: 1.1fr .9fr; gap: 64px; } }

.theme-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; justify-items: center; margin-top: 8px; }
.theme-row figure { margin: 0; display: grid; gap: 12px; justify-items: center; width: 100%; max-width: 260px; }
.theme-row figcaption { font: 500 .75rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.theme-row .phone { width: 100%; }
.theme-row .is-eink .phone { border: 2px solid var(--fg); box-shadow: none; }
.rules { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; margin-top: 32px; }
.rules li { display: flex; gap: 10px; align-items: baseline; }
.rules li::before { content: ""; width: 8px; height: 8px; border: 1.5px solid var(--fg); flex: none; transform: translateY(-1px); }

/* Privacy */
.privacy { display: grid; gap: 32px; }
.points { list-style: none; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: flex-start; }
.points .ico { color: var(--primary); width: 22px; height: 22px; margin-top: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font: 500 .75rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
td code { font-size: .75rem; }
td:first-child { white-space: nowrap; }
@media (max-width: 599px) {
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  td:first-child { white-space: normal; border-bottom: 0; padding-bottom: 4px; }
  td + td { padding-top: 0; color: var(--muted); }
}
@media (min-width: 900px) { .privacy { grid-template-columns: 1fr 1fr; gap: 64px; } .privacy .sec-head { margin: 0; } }

/* Install and verify */
.install { display: grid; gap: 32px; }
.install .steps li { font-size: 1.0625rem; }
.note { color: var(--muted); font-size: .9375rem; }
.verify { border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 14px; background: var(--surface); min-width: 0; }
.hash { display: grid; gap: 6px; min-width: 0; }
.hash-row { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.hash code { flex: 1; min-width: 0; font-size: .8125rem; line-height: 1.5; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); overflow-wrap: anywhere; }
.hash .btn-sm { flex: none; }
@media (min-width: 900px) { .install { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); max-width: 820px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.25rem/1 var(--f-mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 18px; color: var(--muted); max-width: 68ch; display: grid; gap: 10px; }

/* Final call to action */
.final { margin-top: var(--sec); }
.final-box { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--primary-container); color: var(--on-primary-container); padding: clamp(28px, 6vw, 56px); display: grid; gap: 18px; justify-items: start; }
.final-box p { max-width: 56ch; }
.final-box .meta { color: inherit; opacity: .85; }
:root[data-theme="eink"] .final-box { border-width: 2px; }
:root[data-theme="eink"] .final-box .meta { opacity: 1; }

/* Footer */
.foot { margin-top: var(--sec); border-top: 1px solid var(--line); padding-block: 40px; font-size: .9375rem; }
.foot .wrap { display: grid; gap: 28px; }
.foot-top { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.family { display: grid; gap: 12px; }
.family ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.family a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); }
.family a span { color: var(--muted); font-size: .875rem; }
.family a:hover { border-color: var(--fg); }
.copyright { color: var(--muted); font: 400 .8125rem/1.6 var(--f-mono); }

/* Policy page */
.doc { max-width: 760px; padding-block: 56px 0; display: grid; gap: 20px; }
.doc > * { min-width: 0; }
.doc h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
.doc h2 { font-size: 1.375rem; margin-top: 20px; }
.doc ul { padding-left: 1.2em; display: grid; gap: 6px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
