:root {
  color-scheme: light dark;
  --bg: #f6f7fa;
  --surface: #ffffff;
  --ink: #17202e;
  --muted: #4c5668;
  --line: #d3d9e3;
  --accent: #a32a3a;
  --button-bg: #7a1f2b;
  --button-ink: #f3f6fb;
  --warn-bg: #fdf1d3;
  --code-bg: #eceff5;
  --sheet: #ffffff;
  --sheet-line: #b9c1cf;
  --sheet-link: #3b6fd1;
  --sheet-img: #d9dfe9;
  --cut: #d23a3a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #1a2029;
    --ink: #e8ecf3;
    --muted: #a8b1c2;
    --line: #333b4a;
    --accent: #f0a0aa;
    --button-bg: #e8ecf3;
    --button-ink: #11151c;
    --warn-bg: #3d3216;
    --code-bg: #262c38;
    --sheet: #232a35;
    --sheet-line: #56607280;
    --sheet-link: #8fb4f5;
    --sheet-img: #39414f;
    --cut: #ff7676;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.site-header { padding: 16px 0; }
.header-row { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; align-items: center; }
.header-row nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.soon { display: inline-block; margin: 0 0 14px; padding: 4px 10px; border-radius: 999px; background: var(--warn-bg); font-size: 15px; font-weight: 650; }
.not-yet { font-size: 15px; color: var(--muted); }
.logo { color: var(--ink); font-weight: 750; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }

h1 { font-size: clamp(28px, 6vw, 42px); line-height: 1.12; letter-spacing: -0.02em; margin: 8px 0 12px; overflow-wrap: break-word; }
h2 { font-size: 23px; line-height: 1.2; margin: 40px 0 10px; }
h3 { font-size: 18px; margin: 24px 0 4px; }
.lead { color: var(--muted); max-width: 66ch; }
.lead p { margin: 0 0 10px; }
.small { font-size: 15px; color: var(--muted); margin: 0 0 12px; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
p, li { overflow-wrap: break-word; }

kbd, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}
kbd { border: 1px solid var(--line); border-bottom-width: 2px; }

/* Buttons */
.cta { margin: 20px 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--button-bg);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
  text-align: center;
}
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button:disabled { cursor: not-allowed; opacity: 0.55; }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.button.cws:disabled { opacity: 1; background: var(--surface); color: var(--muted); border-color: var(--line); border-style: dashed; }

/* Illustration: A4 sheets with breaks vs one long page (decorative, aria-hidden) */
.illustration { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 24px 0; min-width: 0; }
.illustration h2 { margin-top: 0; }
.ill-label { display: inline-block; margin: 0 0 12px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ill-side { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.ill-side figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }
.ill-stack { display: flex; flex-direction: column; gap: 14px; align-items: center; flex: 1; }
.ill-sheet, .ill-long { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 180px; padding: 12px 10px; background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); overflow: hidden; }
.ill-sheet { aspect-ratio: 210 / 297; }
.ill-long { height: auto; }
.ill-line { display: block; height: 6px; border-radius: 3px; background: var(--sheet-line); }
.ill-link { background: var(--sheet-link); }
.ill-img { display: block; height: 44px; border-radius: 3px; background: var(--sheet-img); }
.w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; }
.w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; }
.cut-bottom { margin-top: auto; border-bottom: 2px dashed var(--cut); border-radius: 3px 3px 0 0; }
.ill-img.cut-bottom, .ill-img.cut-top { height: 22px; }
.cut-top { border-top: 2px dashed var(--cut); border-radius: 0 0 3px 3px; }
@media (max-width: 420px) {
  .ill-grid { gap: 10px; }
  .ill-sheet, .ill-long { padding: 8px 6px; gap: 5px; }
  .ill-img { height: 30px; }
}

/* Pro */
.prices { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.prices li { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.prices li:first-child { border-color: var(--accent); }

.legal { max-width: 720px; }

.site-footer { margin-top: 56px; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.footer-note { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
