  /* Always dark, whatever the device's setting, like the rest of the site. The colours are the
     extension's own: the popup's navy, its gold border and its menu's active-tab gradient. */
  :root {
    color-scheme: dark;
    --bg: #0e1423;
    --panel: #161e31;
    --panel-2: #0d1320;
    --ink: #e7ecf5;
    --muted: #9eabc2;
    --rule: #263049;
    --accent: #d4a16e;
    --accent-ink: #14171c;
    --menu-ink: rgb(239,204,148);
    --menu-active: linear-gradient(to bottom right, transparent, rgb(50,72,120), rgb(105,103,120));
    --good-bg: #1c2a1b;
    --good-ink: #9ed07f;
    --warn-bg: #2a2317;
    --warn-ink: #e0b678;
    --info-bg: #182540;
    --info-ink: #9cc2ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --menu-w: 8.5rem;
    --top: 3.25rem;
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-wrap: anywhere;
  }
  a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
  code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .875em; background: var(--panel);
    border: 1px solid var(--rule); border-radius: 4px; padding: .1em .35em;
  }
  .wrap { max-width: 66rem; margin: 0 auto; padding: 0 1rem; }

  /* top bar */
  .nav {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
  }
  .nav .wrap { display: flex; align-items: center; gap: 1rem; min-height: var(--top); flex-wrap: wrap; padding-top: .4rem; padding-bottom: .4rem; }
  .nav.wide .wrap { max-width: 80rem; }
  .brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
  .brand img { width: 28px; height: 28px; border-radius: 7px; }
  .nav nav { display: flex; gap: .2rem 1rem; flex-wrap: wrap; margin-left: auto; font-size: .92rem; align-items: center; }
  .nav nav a { color: var(--muted); text-decoration: none; }
  .nav nav a:hover { color: var(--ink); }
  .nav nav a.lang {
    font-weight: 700; letter-spacing: .04em; font-size: .8rem;
    padding: .15em .6em; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink);
  }
  .nav .langs-top { display: inline-flex; gap: .3rem; }
  .nav nav .langs-top a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .nav nav a.pill {
    font-weight: 600; color: var(--accent-ink); background: var(--accent);
    padding: .2em .8em; border-radius: 999px;
  }

  /* ---------------------------------------------------------------- page with the side menu */
  .layout { display: grid; grid-template-columns: var(--menu-w) minmax(0, 1fr); gap: 0 2.5rem; max-width: 80rem; margin: 0 auto; padding: 0 1rem 0 0; }
  .layout > main { min-width: 0; padding-bottom: 2rem; }

  /* The extension's popup menu: a column of emoji tabs between gold hairlines, the open one lit
     with the same gradient, two chips for a tab that has a Macro and an ⚡ Auto half. */
  .side {
    position: sticky; top: var(--top); align-self: start;
    height: calc(100vh - var(--top)); overflow-y: auto; scrollbar-width: none;
    background: var(--panel-2);
    border-right: 1px solid transparent;
    border-image: linear-gradient(to bottom, transparent, rgb(212,161,110), transparent) 1;
    display: flex; flex-direction: column;
  }
  .side::-webkit-scrollbar { display: none; }
  .side a.item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    min-height: 4.1rem; padding: .35rem .3rem; text-decoration: none;
    color: var(--menu-ink); font: 700 .8rem/1.2 "Trebuchet MS", Verdana, sans-serif;
    transition: background .15s ease, color .15s ease;
  }
  .side a.item .e { font-size: 1.6rem; line-height: 1; margin-bottom: .2rem; }
  .side a.item:hover { filter: brightness(1.15); }
  .side a.item.on { background: var(--menu-active); color: #fffdf5; }
  .side .split { height: 1px; flex: 0 0 1px; background: linear-gradient(to right, transparent, rgb(212,161,110), transparent); }
  .side .twin { display: flex; gap: 4px; width: 100%; margin-top: .3rem; }
  .side .twin span {
    flex: 1 1 0; min-width: 0; border-radius: 999px; padding: 1px 2px; font-size: .68rem; font-weight: 400;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: rgba(0,0,0,.25); border: 1px solid rgba(212,161,110,.4); color: var(--menu-ink);
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
  }
  .side .twin span.on { background: var(--menu-active); border-color: rgb(212,161,110); color: #fffdf5; font-weight: 700; }
  .side .foot { margin-top: auto; padding: .5rem .3rem .8rem; border-top: 1px solid rgba(212,161,110,.4); }
  .side .langs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .side .langs a {
    text-align: center; border-radius: 999px; padding: 2px 6px; font: .7rem "Trebuchet MS", Verdana, sans-serif;
    text-decoration: none; color: var(--menu-ink); border: 1px solid rgba(212,161,110,.4);
  }
  .side .langs a[aria-current] { background: var(--menu-active); border-color: rgb(212,161,110); color: #fffdf5; font-weight: 700; }

  /* hero */
  .hero { padding: 3rem 0 1rem; }
  .hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; margin: 0 0 .75rem; letter-spacing: -.02em; }
  .hero h1 span { color: var(--accent); }
  .hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 44rem; margin: 0 0 1.5rem; }
  .cta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
  .btn {
    display: inline-block; text-decoration: none; font-weight: 600; text-align: center;
    padding: .8em 1.5em; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
    border: 1px solid var(--accent);
  }
  .btn.alt { background: var(--panel); color: var(--accent); border-color: var(--rule); }
  .hint { color: var(--muted); font-size: .9rem; margin: .9rem 0 0; }
  .hero figure { margin: 2.5rem 0 0; }

  /* figures */
  figure { margin: 0; }
  figure a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--panel); box-shadow: var(--shadow); }
  figure img { display: block; width: 100%; height: auto; }
  figcaption { color: var(--muted); font-size: .85rem; margin-top: .6rem; }
  .stack { display: grid; gap: 1.5rem; }
  .shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; align-items: start; }
  .shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shots .wide { grid-column: 1 / -1; }
  .placeholder {
    aspect-ratio: 16 / 10; display: grid; place-items: center;
    color: var(--muted); font-size: .9rem; background: repeating-linear-gradient(45deg, var(--panel), var(--panel) 12px, var(--bg) 12px, var(--bg) 24px);
  }

  /* sections */
  section { padding: 3rem 0 0; scroll-margin-top: calc(var(--top) + 1rem); }
  .part { padding-top: 4.5rem; }
  .part > header { max-width: 46rem; margin-bottom: .5rem; }
  .kicker { display: inline-flex; gap: .4rem; align-items: center; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
  h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.015em; }
  h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .6rem; letter-spacing: -.01em; }
  p { margin: 0 0 1rem; }
  ul { margin: 0 0 1rem; padding-left: 1.2rem; }
  li { margin-bottom: .4rem; }
  .feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem 3rem; align-items: start; padding-top: 3rem; scroll-margin-top: calc(var(--top) + 1rem); }
  .feature.flip .text { order: 2; }
  .feature.full { grid-template-columns: 1fr; }
  .feature > * { min-width: 0; }
  .feature .text p:last-child, .feature .text ul:last-child { margin-bottom: 0; }
  .tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
  .tag {
    display: inline-block; font-size: .78rem; font-weight: 600;
    padding: .15em .6em; border-radius: 999px; white-space: nowrap;
    background: var(--good-bg); color: var(--good-ink);
  }
  .tag.key { background: var(--warn-bg); color: var(--warn-ink); }
  .tag.full { background: var(--info-bg); color: var(--info-ink); }

  .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
  .card { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 1.2rem 1.3rem; }
  .card .n { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .9rem; margin-bottom: .6rem; }
  .card h3 { font-size: 1.05rem; margin-bottom: .35rem; }
  .card p { margin: 0; color: var(--muted); font-size: .95rem; }
  .card p:last-child { margin-bottom: 0; }
  a.card { display: block; text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
  a.card:hover { border-color: var(--accent); transform: translateY(-1px); }
  .card .e { font-size: 1.5rem; line-height: 1; display: block; margin-bottom: .5rem; }

  .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
  .grid2 .card ul { margin: 0; }
  .grid2 .card li { color: var(--ink); }

  .scroll { overflow-x: auto; margin: 1.5rem 0 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
  table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 34rem; }
  th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
  tr:last-child td { border-bottom: 0; }
  th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
  td code { white-space: nowrap; }
  table.plans td.yes { color: var(--good-ink); font-weight: 700; }
  table.plans td.no { color: var(--muted); }

  .note { background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 8px; padding: .7rem 1rem; color: var(--muted); font-size: .92rem; margin: 1.5rem 0 0; }

  .chat { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.1rem; font-size: .93rem; }
  .chat p { margin: 0 0 .5rem; padding: .45rem .7rem; border-radius: 10px; background: var(--bg); display: inline-block; max-width: 100%; white-space: pre-line; }
  .chat p:last-child { margin-bottom: 0; }

  .contact dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
  .contact dt { color: var(--muted); font-size: .9rem; }
  .contact dd { margin: 0; }

  footer {
    margin-top: 5rem; padding: 1.5rem 0 3rem; border-top: 1px solid var(--rule);
    color: var(--muted); font-size: .9rem;
  }
  footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; max-width: 80rem; }
  footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

  @media (max-width: 1100px) {
    .feature { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .feature.flip .text { order: 0; }
  }

  /* Phones and narrow windows: the menu turns into a strip of tabs under the top bar, scrolled
     sideways, the open tab still lit. */
  @media (max-width: 760px) {
    /* the top bar wraps here, so it scrolls away and the menu strip takes the top edge */
    .nav { position: static; }
    .layout { grid-template-columns: minmax(0, 1fr); padding: 0 1rem; gap: 0; }
    .side {
      position: sticky; top: 0; z-index: 15; height: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden;
      margin: 0 -1rem; border-right: 0; border-bottom: 1px solid rgba(212,161,110,.5); border-image: none;
    }
    .side a.item { min-height: 0; min-width: 4.6rem; padding: .35rem .4rem; font-size: .72rem; }
    .side a.item .e { font-size: 1.25rem; }
    .side .split { width: 1px; height: auto; flex: 0 0 1px; background: linear-gradient(to bottom, transparent, rgb(212,161,110), transparent); }
    .side .twin, .side .foot { display: none; }
    section, .feature { scroll-margin-top: 4.5rem; }
    .cards, .grid2, .shots, .shots.three { grid-template-columns: minmax(0, 1fr); }
    .hero { padding-top: 2rem; }
    .nav nav { margin-left: 0; }
  }
