:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-2: #edf1f7;
    --text: #1a2130;
    --muted: #5c6577;
    --border: #dde2ea;
    --accent: #2955d1;
    --accent-soft: #e8edfc;
    --ok: #157a53;
    --ok-soft: #e4f5ee;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0f1420;
      --surface: #161d2c;
      --surface-2: #1e2637;
      --text: #e7eaf0;
      --muted: #99a2b6;
      --border: #2a3247;
      --accent: #7095ff;
      --accent-soft: rgba(112,149,255,.14);
      --ok: #4fd6a4;
      --ok-soft: rgba(79,214,164,.12);
    }
  }
  :root[data-theme="dark"] {
    --bg: #0f1420;
    --surface: #161d2c;
    --surface-2: #1e2637;
    --text: #e7eaf0;
    --muted: #99a2b6;
    --border: #2a3247;
    --accent: #7095ff;
    --accent-soft: rgba(112,149,255,.14);
    --ok: #4fd6a4;
    --ok-soft: rgba(79,214,164,.12);
  }

  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    line-height: 1.6;
  }
  ::selection { background: var(--accent-soft); }

  .page { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }

  header.doc-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
  header.doc-head img { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
  header.doc-head h1 {
    font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 1.55rem;
    margin: 0 0 4px;
    text-wrap: balance;
  }
  .doc-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .82rem; color: var(--muted); align-items: center; }
  .doc-meta code {
    font-family: "IBM Plex Mono", monospace;
    background: var(--surface-2);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: .78rem;
  }
  .doc-label {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .68rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 10px;
  }

  .lede {
    background: var(--ok-soft);
    border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
    border-radius: 14px;
    padding: 20px 22px;
    margin: 28px 0 40px;
    font-size: 1.02rem;
  }
  .lede strong { color: var(--ok); }

  section { margin: 40px 0; }
  h2 {
    font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 0 6px;
    text-wrap: balance;
  }
  .section-sub { color: var(--muted); font-size: .88rem; margin: 0 0 18px; max-width: 62ch; }
  p { max-width: 66ch; }

  .data-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  @media (max-width: 560px) { .data-grid { grid-template-columns: 1fr; } }
  .data-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
  }
  .data-card .tab-icon { font-size: 1.3rem; }
  .data-card h3 { font-size: .95rem; margin: 8px 0 6px; font-weight: 600; }
  .data-card p { margin: 0; font-size: .83rem; color: var(--muted); max-width: none; }

  .never-leaves {
    display: flex; align-items: center; gap: 10px;
    margin-top: 16px; padding: 12px 16px;
    border-radius: 10px; background: var(--surface-2);
    font-size: .85rem; color: var(--muted);
  }
  .never-leaves .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }

  .opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 560px) { .opt-grid { grid-template-columns: 1fr; } }
  .opt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 16px 18px;
  }
  .opt-card h3 { font-size: .95rem; margin: 0 0 6px; }
  .opt-card p { font-size: .85rem; color: var(--muted); margin: 0; max-width: none; }
  .off-badge {
    display: inline-block; margin-top: 10px;
    font-size: .7rem; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); border: 1px solid var(--border); border-radius: 999px;
    padding: 2px 8px;
  }

  .perm-list { display: flex; flex-direction: column; gap: 10px; }
  .perm-row {
    display: flex; gap: 14px; align-items: baseline;
    padding: 12px 16px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px;
  }
  .perm-row code {
    font-family: "IBM Plex Mono", monospace;
    font-size: .76rem;
    color: var(--accent);
    flex-shrink: 0;
    width: 190px;
  }
  .perm-row span { font-size: .85rem; color: var(--muted); }
  .no-access { margin-top: 14px; font-size: .83rem; color: var(--muted); }

  .plain p { font-size: .95rem; }

  footer.contact {
    margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  }
  footer.contact a { color: var(--accent); text-decoration: none; font-weight: 500; }
  footer.contact a:hover { text-decoration: underline; }

  .en-summary {
    margin-top: 56px; padding: 22px 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    color: var(--muted); font-size: .84rem;
  }
  .en-summary h2 {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); margin-bottom: 10px;
  }
  .en-summary p { max-width: none; margin: 0 0 10px; }
  .en-summary ul { margin: 8px 0; padding-left: 20px; }
  .en-summary li { margin-bottom: 6px; }

  a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }