  :root {
    --blue: #1f4e8c;
    --blue-dark: #163c6e;
    --link: #1a5aa6;
    --text: #222;
    --muted: #5c5c5c;
    --line: #d9dde3;
    --bg-soft: #f4f6f9;
  }
  * { box-sizing: border-box; }
  html { scroll-padding-top: 1rem; }
  body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: #fff;
  }
  a { color: var(--link); text-decoration: none; }
  a:hover { text-decoration: underline; }
  code, pre { font-family: Consolas, Menlo, "Courier New", monospace; font-size: 13.5px; }
  code { background: var(--bg-soft); padding: 1px 4px; border-radius: 2px; }
  pre {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    padding: 10px 14px;
    overflow-x: auto;
    line-height: 1.45;
  }
  pre code { background: none; padding: 0; }
  h1, h2, h3 { font-weight: 600; color: #111; line-height: 1.3; }
  h2, h1.page-title { font-size: 24px; margin: 0 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  h3 { font-size: 18px; margin: 28px 0 8px; }
  h4 { font-size: 15px; margin: 18px 0 4px; }
  p { margin: 0 0 12px; }
  ul, ol { margin: 0 0 12px; padding-left: 22px; }
  li { margin-bottom: 4px; }
  table { border-collapse: collapse; width: 100%; margin: 6px 0 16px; font-size: 14px; }
  th, td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
  th { background: var(--bg-soft); font-weight: 600; }
  img { max-width: 100%; height: auto; }
  figure { margin: 10px 0 20px; }
  figure img { border: 1px solid var(--line); display: block; }
  figcaption { font-size: 13px; color: var(--muted); margin-top: 5px; }

  /* header */
  .masthead { border-bottom: 1px solid var(--line); }
  .masthead .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
  .brand { display: flex; align-items: center; gap: 12px; color: inherit; }
  .brand:hover { text-decoration: none; }
  .brand img { width: 44px; height: 44px; }
  .brand .name { font-size: 22px; font-weight: 700; letter-spacing: .5px; color: #111; }
  .brand .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
  .masthead .ext { font-size: 14px; }
  .masthead .ext a { margin-left: 18px; }

  nav.tabs { background: var(--blue); }
  nav.tabs ul { list-style: none; margin: 0 auto; padding: 0 12px; max-width: 1040px; display: flex; flex-wrap: wrap; }
  nav.tabs li { margin: 0; }
  nav.tabs a {
    display: block; padding: 11px 14px; color: #fff; font-size: 14.5px;
    border-bottom: 3px solid transparent;
  }
  nav.tabs a:hover { background: var(--blue-dark); text-decoration: none; }
  nav.tabs a.active { background: var(--blue-dark); border-bottom-color: #fff; }

  .wrap { max-width: 1040px; margin: 0 auto; }
  main { padding: 28px 20px 40px; min-height: 60vh; }
  section.page { display: none; }
  section.page.active { display: block; }
  .no-js section.page { display: block; margin-bottom: 48px; }

  /* home */
  .lead { font-size: 17px; color: #333; max-width: 760px; }
  .keywords { font-size: 14px; color: var(--muted); max-width: 760px; }
  .motto {
    margin: 0 0 18px; padding: 2px 0 2px 14px; max-width: 760px;
    border-left: 3px solid var(--blue); font-size: 16px; font-style: italic; color: var(--muted);
  }
  .motto p { margin: 0; }
  .home-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin-top: 18px; }
  .sidebox { border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 18px; background: #fff; }
  .sidebox h4 { margin-top: 0; }
  .sidebox ul { padding-left: 18px; margin-bottom: 0; }
  .btn {
    display: inline-block; padding: 8px 16px; border: 1px solid var(--blue);
    background: var(--blue); color: #fff; font-size: 14px; border-radius: 2px;
  }
  .btn:hover { background: var(--blue-dark); text-decoration: none; }
  .btn.secondary { background: #fff; color: var(--blue); }
  .btn.secondary:hover { background: var(--bg-soft); }
  .news dt { font-weight: 600; font-size: 13px; color: var(--muted); }
  .news dd { margin: 0 0 10px; }
  .features { columns: 2; column-gap: 32px; padding-left: 18px; }
  .features li { break-inside: avoid; }
  .new {
    display: inline-block; margin-left: 3px; padding: 0 5px; border-radius: 2px; vertical-align: 1px;
    background: #2e7d4f; color: #fff; font-size: 10.5px; font-weight: 600; line-height: 16px; letter-spacing: .4px;
    text-transform: uppercase;
  }


  /* home (0.7.6 layout) */
  .hero { max-width: 860px; }
  .hero-title { font-size: 27px; border-bottom: 0; padding-bottom: 0; margin: 0 0 10px; }
  .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 6px; }
  .btn.big { padding: 11px 22px; font-size: 15.5px; font-weight: 600; }
  .store-badge { display: inline-block; line-height: 0; }
  .store-badge img { height: 48px; width: auto; }
  .platforms { font-size: 13.5px; margin: 6px 0 16px; }
  .numbers { margin: 22px 0 24px; }
  .numbers b { color: var(--blue-dark); }
  .hero-fig { margin-top: 0; }
  .pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .pillars > div { border-top: 3px solid var(--blue); background: var(--bg-soft); padding: 10px 16px 6px; }
  .pillars h4 { margin: 4px 0 6px; color: var(--blue-dark); }
  .pillars p { font-size: 14.5px; }
  .novel li, .trust li { margin-bottom: 7px; }
  .section-note { margin-top: -4px; font-size: 13.5px; }
  .features.exp li::marker { color: #b07d10; }
  .small { font-size: 13px; }
  .dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 14px 0 12px; }
  .dl-card { border: 1px solid var(--line); border-top: 3px solid var(--blue); padding: 12px 16px 4px; }
  .dl-card h4 { margin: 0 0 10px; font-size: 17px; }
  .dl-card h4 .muted { font-size: 13px; font-weight: 400; }
  .dl-card .btn { display: block; width: fit-content; min-width: 130px; text-align: center; margin-bottom: 6px; }
  .dl-card .store-badge { margin-bottom: 6px; }

  .note {
    border-left: 3px solid #c9a227; background: #fbf8ec; padding: 8px 12px; margin: 10px 0 16px; font-size: 14px;
  }
  .muted { color: var(--muted); }
  .steps h3 { counter-increment: step; }
  .steps { counter-reset: step; }
  .steps h3::before { content: counter(step) ". "; color: var(--muted); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .side-img { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }

  /* home: learn-more links */
  a.more { white-space: nowrap; font-size: 13.5px; }

  /* tutorial: contents sidebar */
  .tut { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 18px; }
  .toc {
    position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto;
    border: 1px solid var(--line); background: var(--bg-soft); padding: 10px 0 12px; font-size: 13.5px;
    counter-reset: toc;
  }
  .toc-title { font-weight: 600; color: #111; padding: 0 14px; margin: 0 0 4px; }
  .toc-group { margin: 10px 0 2px; padding: 0 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .5px;
    text-transform: uppercase; color: var(--muted); }
  .toc ol { list-style: none; margin: 0; padding: 0; }
  .toc li { margin: 0; counter-increment: toc; }
  .toc a { display: block; padding: 3px 14px 3px 11px; border-left: 3px solid transparent; color: var(--text); line-height: 1.4; }
  .toc a::before { content: counter(toc) ". "; color: var(--muted); }
  .toc a:hover { background: #e8ecf2; text-decoration: none; }
  .toc a.active { border-left-color: var(--blue); background: #e3eaf4; color: var(--blue-dark); font-weight: 600; }
  .tut-body { min-width: 0; }
  .tut-body h3 { margin-top: 34px; padding-top: 4px; }
  .t-group { margin: 40px 0 0; padding-bottom: 4px; border-bottom: 2px solid var(--blue); font-size: 12.5px;
    font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--blue); }
  .t-group:first-child { margin-top: 0; }
  .t-group + h3 { margin-top: 16px; }
  .try { border-left: 3px solid var(--blue); background: #eef3fa; padding: 8px 12px; margin: 10px 0 16px; font-size: 14px; }
  .ref { font-size: 13px; color: var(--muted); }
  kbd { font-family: Consolas, Menlo, monospace; font-size: 12.5px; padding: 0 4px; border: 1px solid var(--line);
    border-bottom-width: 2px; border-radius: 3px; background: #fff; white-space: nowrap; }

  /* statistics */
  .stat-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin: 6px 0 22px; }
  .stat-row.three { grid-template-columns: repeat(3, 1fr); }
  .stat-row.five { grid-template-columns: repeat(5, 1fr); }
  .stat-row div[hidden] { display: none; }
  .stat-row div { padding: 12px 16px; border-left: 1px solid var(--line); }
  .stat-row div:first-child { border-left: 0; }
  .stat-row b { display: block; font-size: 24px; font-weight: 600; color: #111; line-height: 1.2; }
  .stat-row span { font-size: 13px; color: var(--muted); }
  td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  td.bar { width: 40%; }
  td.bar i { display: block; height: 10px; background: #7d9cc4; min-width: 1px; }
  .geo { position: relative; margin: 6px 0 22px; }
  .geo svg { display: block; width: 100%; height: auto; }
  .geo path { fill: #e8e8e6; stroke: #fff; stroke-width: .5; stroke-linejoin: round; }
  .geo .has { cursor: default; }
  .geo .has:hover, .geo .has.hot { stroke: #1d2430; stroke-width: 1.2; }
  .geo circle.dot { stroke: #fff; stroke-width: 1.5; }
  .geo circle.hit { fill: transparent; }
  .geo-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
  .geo-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
  .geo-tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 6px;
    padding: 6px 9px; font-size: 13px; line-height: 1.4; box-shadow: 0 2px 8px rgba(0,0,0,.12); white-space: nowrap; }
  .geo-tip b { display: block; }
  .geo-tip span { color: var(--muted); }
  .stats-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

  .fb-form { max-width: 680px; }
  .fb-form label { display: block; font-weight: 600; margin: 14px 0 4px; }
  .fb-form textarea, .fb-form input { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line);
    border-radius: 3px; background: #fff; }
  .fb-form textarea:focus, .fb-form input:focus { outline: 2px solid #9db8dd; border-color: var(--blue); }
  .fb-form button.btn { border: 1px solid var(--blue); cursor: pointer; font: inherit; }
  .fb-form button.btn[disabled] { opacity: .6; cursor: default; }
  .fb-count { text-align: right; font-size: 12px; margin-top: 2px; }
  .fb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  #fb-status { margin-left: 10px; }
  #fb-status.ok { color: #23703a; } #fb-status.err { color: #b3261e; }

  footer { border-top: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; color: var(--muted); }
  footer .wrap { padding: 18px 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

  @media (max-width: 820px) {
    .home-grid, .two-col, .side-img, .stats-cols, .pillars, .dl-grid { grid-template-columns: 1fr; }
    .tut { grid-template-columns: minmax(0, 1fr); }
    .toc { position: static; max-height: none; }
    .stat-row, .stat-row.three, .stat-row.five { grid-template-columns: 1fr 1fr; }
    .stat-row div:nth-child(3) { border-left: 0; }
    .features { columns: 1; }
    .masthead .ext { display: none; }
    nav.tabs a { padding: 9px 10px; font-size: 14px; }
  }
