  @font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/fonts/poppins-extrabold.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
  }

  :root {
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-light: #ccfbf1;
    --gold: #b45309;
    --ink: #0f172a;
    --body: #334155;
    --muted: #64748b;
    --rule: #e2e8f0;
    --surface: #f8fafc;
    --white: #ffffff;
    --red: #dc2626;
    --amber: #d97706;
    --green: #16a34a;
    --radius: 10px;
    --shadow: 0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg: 0 4px 24px rgba(0,0,0,.12);
    --topbar-h: 54px;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

  .skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    z-index: 100;
    background: var(--brand);
    color: white;
    padding: .6rem 1.1rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: top .15s ease;
  }

  .skip-link:focus { top: 1rem; }

  html { scroll-behavior: smooth; font-size: 16px; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--body);
    background: var(--white);
    line-height: 1.7;
  }

  /* ── Layout ── */
  .page-wrap { display: flex; min-height: 100vh; }

  .sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--ink);
    color: #cbd5e1;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem 0 3rem;
  }

  .sidebar-logo {
    display: block;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 1.5rem;
  }

  .sidebar-logo .logo-text { font-size: 1.1rem; font-weight: 700; color: #f1f5f9; }
  .sidebar-logo .logo-sub { font-size: 0.7rem; color: #94a3b8; letter-spacing: .05em; text-transform: uppercase; }

  .sidebar-section { margin-bottom: .25rem; }

  .sidebar-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: .75rem 1.5rem .25rem;
  }

  .sidebar-section-title:hover { color: #f1f5f9; }

  .sidebar-section-title .chevron {
    flex-shrink: 0;
    transition: transform .15s;
    font-size: .7rem;
  }

  .sidebar-section.collapsed .sidebar-section-title .chevron { transform: rotate(-90deg); }
  .sidebar-section.collapsed .sidebar-links { display: none; }

  .sidebar a {
    display: block;
    padding: .4rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: .82rem;
    transition: color .15s, background .15s;
    border-radius: 0;
  }

  .sidebar a:hover { color: #f1f5f9; background: #1e293b; }
  .sidebar a.active { color: var(--brand); font-weight: 600; }
  .sidebar a.sub { padding-left: 2.25rem; font-size: .78rem; color: #94a3b8; }
  .sidebar a.sub:hover { color: #f1f5f9; }
  .sidebar a.search-hidden { display: none; }
  .sidebar-section.search-hidden { display: none; }

  /* ── Sidebar search ── */
  .sidebar-search {
    padding: 0 1.5rem 1rem;
    position: relative;
  }

  .sidebar-search input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: .82rem;
    padding: .5rem .7rem;
    font-family: inherit;
  }

  .sidebar-search input::placeholder { color: #64748b; }
  .sidebar-search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

  .sidebar-no-results {
    display: none;
    padding: .5rem 1.5rem;
    font-size: .78rem;
    color: #64748b;
    font-style: italic;
  }

  /* ── Mobile top bar ── */
  .mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 56;
    align-items: center;
    gap: .75rem;
    background: var(--ink);
    border-bottom: 1px solid #1e293b;
    padding: .65rem 1.25rem;
  }

  .mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
  }

  .mobile-topbar-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .mobile-topbar-title {
    min-width: 0;
    font-size: .9rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .4rem;
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: .45rem .8rem;
    font-size: .8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .6);
    z-index: 50;
  }

  .main { flex: 1; min-width: 0; }

  /* ── Cover ── */
  .cover {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 50%, #115e59 100%);
    color: white;
    padding: 6rem 4rem;
    min-height: 400px;
    display: flex;
    align-items: center;
  }

  .cover-inner { max-width: 700px; }

  .cover-back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    transition: color .15s;
  }

  .cover-back-link:hover { color: white; }

  .cover-badge {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #99f6e4;
    margin-bottom: .75rem;
  }

  .cover h1 { font-family: "Poppins", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 3rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1rem; color: white; }
  .cover-tagline { font-size: 1.15rem; color: rgba(255,255,255,.75); margin-bottom: 2rem; line-height: 1.6; }

  .cover-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .cover-meta-item { font-size: .8rem; color: rgba(255,255,255,.75); }
  .cover-meta-item strong { color: rgba(255,255,255,.85); display: block; font-size: .9rem; }

  /* ── Content ── */
  .content { padding: 3rem 4rem; max-width: 860px; }

  h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.3; }

  .content h1 { font-size: 2rem; margin-bottom: 1rem; padding-top: 1rem; }
  .content h2 { font-size: 1.4rem; margin-top: 3rem; margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--brand-light); }
  .content h3 { font-size: 1.1rem; margin-top: 2rem; margin-bottom: .5rem; color: var(--brand-dark); }
  .content h4 { font-size: .95rem; margin-top: 1.5rem; margin-bottom: .35rem; color: var(--body); }

  .content p { margin-bottom: 1rem; }
  .content ul, .content ol { margin: .75rem 0 1rem 1.5rem; }
  .content li { margin-bottom: .35rem; }
  .content strong { color: var(--ink); }

  .section-anchor { scroll-margin-top: 2rem; }

  /* ── Callouts ── */
  .callout {
    border-left: 4px solid;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: .9rem;
  }

  .callout.tip { border-color: var(--brand); background: #f0fdf9; }
  .callout.tip .callout-title { color: var(--brand-dark); }
  .callout.warning { border-color: var(--amber); background: #fffbeb; }
  .callout.warning .callout-title { color: #92400e; }
  .callout.info { border-color: #3b82f6; background: #eff6ff; }
  .callout.info .callout-title { color: #1e40af; }
  .callout.danger { border-color: var(--red); background: #fef2f2; }
  .callout.danger .callout-title { color: #991b1b; }

  .callout-title { font-weight: 700; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .4rem; }

  /* ── Screenshot frames ── */
  .screenshot-wrap {
    margin: 1.75rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--rule);
  }

  .screenshot-wrap img {
    width: 100%;
    display: block;
  }

  .screenshot-caption {
    background: var(--surface);
    border-top: 1px solid var(--rule);
    padding: .6rem 1rem;
    font-size: .78rem;
    color: var(--muted);
    font-style: italic;
  }

  .screenshot-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: var(--muted);
    font-size: .85rem;
  }

  .screenshot-placeholder .icon { font-size: 2.5rem; opacity: .4; }

  /* ── Step cards ── */
  .steps { margin: 1.5rem 0; }

  .step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
  }

  .step-num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    margin-top: .1rem;
  }

  .step-body { flex: 1; }
  .step-body strong { color: var(--ink); }

  /* ── Feature grid ── */
  .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
  }

  .feature-card {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--surface);
  }

  .feature-card .icon { font-size: 1.5rem; margin-bottom: .5rem; }
  .feature-card .title { font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: .25rem; }
  .feature-card .desc { font-size: .8rem; color: var(--muted); line-height: 1.5; }

  /* ── Table ── */
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    margin: 1.25rem 0 1.5rem;
  }

  th {
    background: var(--ink);
    color: white;
    text-align: left;
    padding: .65rem 1rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  td { padding: .6rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
  tr:last-child td { border-bottom: none; }
  tr:nth-child(even) td { background: var(--surface); }

  /* ── Shortcut tags ── */
  kbd {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: .1rem .45rem;
    font-family: monospace;
    font-size: .8rem;
    color: var(--ink);
    white-space: nowrap;
  }

  /* ── Badges ── */
  .badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .badge-green { background: #dcfce7; color: #166534; }
  .badge-amber { background: #fef3c7; color: #92400e; }
  .badge-red { background: #fee2e2; color: #991b1b; }
  .badge-blue { background: #dbeafe; color: #1e40af; }
  .badge-teal { background: var(--brand-light); color: var(--brand-dark); }

  /* ── FAQ ── */
  details { border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: .75rem; }
  details[open] { border-color: var(--brand-light); }
  summary { padding: .85rem 1rem; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
  summary::after { content: '+'; font-size: 1.2rem; color: var(--brand); font-weight: 400; }
  details[open] summary::after { content: '−'; }
  details .faq-body { padding: 0 1rem 1rem; font-size: .88rem; border-top: 1px solid var(--rule); padding-top: .75rem; }

  /* ── Print ── */
  @media print {
    .sidebar { display: none; }
    .cover { padding: 3rem 2rem; }
    .content { padding: 2rem; }
    .screenshot-placeholder { height: 200px; }
  }

  /* ── In-page Table of Contents ── */
  .toc {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
  }

  .toc-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1rem;
  }

  .toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.5rem;
  }

  .toc-group-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-dark);
    margin-bottom: .5rem;
  }

  .toc-group a {
    display: block;
    font-size: .85rem;
    color: var(--body);
    text-decoration: none;
    padding: .2rem 0;
  }

  .toc-group a:hover { color: var(--brand-dark); text-decoration: underline; }

  /* ── Responsive ── */
  @media (max-width: 900px) {
    .mobile-topbar { display: flex; }

    .sidebar {
      position: fixed;
      top: var(--topbar-h);
      left: 0;
      z-index: 55;
      height: calc(100vh - var(--topbar-h));
      transform: translateX(-100%);
      transition: transform .2s ease;
      box-shadow: var(--shadow-lg);
    }

    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.open { display: block; }

    .content { padding: 2rem 1.5rem; }
    .cover { padding: 2.5rem 1.5rem; min-height: 0; }
    .cover h1 { font-size: 2rem; }
    .toc { padding: 1.25rem 1.25rem; }
    .toc-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    table { font-size: .8rem; }
    th, td { padding: .5rem .65rem; }
  }

  @media (max-width: 480px) {
    .content { padding: 1.75rem 1.25rem; }
    .cover { padding: 2rem 1.25rem; }
    .cover h1 { font-size: 1.7rem; }
    .cover-tagline { font-size: 1rem; }
    .toc { padding: 1.1rem 1rem; }
    .toc-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .content h2 { font-size: 1.25rem; margin-top: 2.25rem; }
    table { font-size: .76rem; }
    th, td { padding: .45rem .5rem; }
  }

  /* ── Dark mode (native, follows device setting) ── */
  @media (prefers-color-scheme: dark) {
    :root { --muted: #94a3b8; }
    body { background: #0b1220; color: #cbd5e1; }

    .content h1, .content h2, .content h4 { color: #f1f5f9; }
    .content h3 { color: #5eead4; }
    .content strong { color: #f1f5f9; }
    .content h2 { border-bottom-color: rgba(20, 184, 166, 0.3); }

    .callout.tip { background: rgba(13, 148, 136, 0.12); }
    .callout.tip .callout-title { color: #5eead4; }
    .callout.warning { background: rgba(217, 119, 6, 0.12); }
    .callout.warning .callout-title { color: #fbbf24; }
    .callout.info { background: rgba(59, 130, 246, 0.12); }
    .callout.info .callout-title { color: #93c5fd; }
    .callout.danger { background: rgba(220, 38, 38, 0.12); }
    .callout.danger .callout-title { color: #fca5a5; }

    .screenshot-caption { background: #111827; border-top-color: #1e293b; color: #94a3b8; }
    .screenshot-placeholder { background: linear-gradient(135deg, #1e293b 0%, #111827 100%); color: #94a3b8; }
    .screenshot-wrap { border-color: #1e293b; }

    .step-body strong { color: #f1f5f9; }

    .feature-card { background: #111827; border-color: #1e293b; }
    .feature-card .title { color: #f1f5f9; }
    .feature-card .desc { color: #94a3b8; }

    td { border-bottom-color: #1e293b; }
    tr:nth-child(even) td { background: #111827; }

    kbd { background: #1e293b; border-color: #334155; color: #f1f5f9; }

    .badge-green { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
    .badge-amber { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
    .badge-red { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
    .badge-blue { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
    .badge-teal { background: rgba(20, 184, 166, 0.18); color: #5eead4; }

    details { border-color: #1e293b; }
    details[open] { border-color: rgba(20, 184, 166, 0.4); }
    summary { color: #f1f5f9; }
    details .faq-body { border-top-color: #1e293b; }

    .toc { background: #111827; border-color: #1e293b; }
    .toc-title { color: #f1f5f9; }
    .toc-group-title { color: #5eead4; }
    .toc-group a { color: #cbd5e1; }
    .toc-group a:hover { color: #5eead4; }
  }
