/* Gloss website. Colors match extension/src/tokens.css.
   The example site inside the demo is the only place with other colors. */

@font-face { font-family: "Figtree"; src: url("fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --sunken: #e8eaee;
  --ink: #1b1e23;
  --ink-soft: #5c6370;
  --line: #e3e5ea;
  --line-strong: #c8cdd6;
  --accent: #1f4fd0;
  --accent-fill: #1f4fd0;
  --accent-soft: #e7edfb;
  --fill: #1b1e23;
  --fill-hover: #32363e;
  --on-fill: #ffffff;
  --knob: #ffffff;
  --warn-soft: #fbf6ec;
  --warn-mark: #8a6232;
  --focus: color-mix(in srgb, var(--accent) 32%, transparent);
  --shadow-window: 0 1px 2px rgba(20, 24, 32, 0.06), 0 30px 70px -30px rgba(20, 24, 32, 0.32);
  --night: #14161b;
  --night-raised: #1c1f26;
  --night-line: #2e333c;
  --night-ink: #f2f3f5;
  --night-soft: #b4bac4;
  --night-accent: #9bb4f7;
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 6px;
  --wrap: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  accent-color: var(--accent-fill);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #14161b;
    --surface: #1c1f26;
    --sunken: #101216;
    --ink: #f2f3f5;
    --ink-soft: #b4bac4;
    --line: #2e333c;
    --line-strong: #454b57;
    --accent: #9bb4f7;
    --accent-fill: #2f5fe0;
    --accent-soft: #283456;
    --fill: #f2f3f5;
    --fill-hover: #d9dce2;
    --on-fill: #16181d;
    --warn-soft: #2a2418;
    --warn-mark: #e2b56a;
    --shadow-window: 0 1px 2px rgba(0, 0, 0, 0.3), 0 30px 70px -30px rgba(0, 0, 0, 0.7);
    --night: #0d0f12;
    --night-raised: #16181d;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

code, kbd {
  font-family: var(--mono);
  font-size: 0.86em;
}

:not(pre) > code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.tint :not(pre) > code { background: var(--surface); }

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.8em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  padding: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--fill);
  color: var(--on-fill);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--fill);
  color: var(--on-fill);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.button:hover { background: var(--fill-hover); }
.button.small { height: 34px; padding: 0 14px; font-size: 14px; }

.arrow-link {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.arrow-link::after {
  content: "→";
  display: inline-block;
  margin-left: 6px;
  color: var(--ink-soft);
  transition: transform 120ms ease;
}
.arrow-link:hover::after { transform: translateX(3px); color: var(--accent); }

.text-button {
  background: none;
  border: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.text-button:hover { text-decoration: underline; }

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}
.top::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
}
.top.is-scrolled { border-bottom-color: var(--line); }

.top-row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { border-radius: 5px; }
@media (prefers-color-scheme: dark) {
  .brand img { box-shadow: 0 0 0 1px var(--line-strong); }
}
.foot .brand img { box-shadow: 0 0 0 1px var(--night-line); }

.nav {
  display: flex;
  gap: 26px;
  margin-right: auto;
  font-size: 15px;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.nav a:hover { color: var(--ink); }

/* Hero */

.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
}

h1 {
  grid-column: 1 / span 8;
  font-size: clamp(2.75rem, 1.05rem + 5.6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.ruled {
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 94% / 100% 0.075em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: rule-in 700ms 250ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rule-in {
  from { background-size: 0 0.075em; }
}

.hero-side {
  grid-column: 9 / -1;
  padding-bottom: 8px;
}

.lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 26px;
}

.fine {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* Demo window */

.demo { margin: clamp(48px, 7vw, 80px) 0 0; }

.window {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-window);
}

.window-bar {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 14px 0 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  min-width: 0;
}

.tab-icon {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 3px;
  background: #e4572e;
}

.tab-title,
.address > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  min-width: 0;
}
.address > span { color: var(--ink); }
.address .path { color: var(--ink-soft); }
.address svg { flex: none; }

.ext-icon {
  border-radius: 4px;
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

.window-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  height: 620px;
}

.demo-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* The example site. It is meant to look like somebody else's website. */

.site {
  --s-bg: #ffffff;
  --s-ink: #222222;
  --s-text: #7a7a7a;
  --s-meta: #a3a3a3;
  --s-line: #ececec;
  --s-brand: #e4572e;
  position: relative;
  overflow: hidden;
  background: var(--s-bg);
  color: var(--s-text);
  font: 13px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: background-color 400ms ease, color 400ms ease;
  color-scheme: light;
}

.site-scroll {
  height: 100%;
  overflow: auto;
  scrollbar-width: thin;
}

.s-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--s-line);
  color: var(--s-ink);
}
.s-logo { font-weight: 700; font-size: 12px; letter-spacing: 0.22em; }
.s-links { display: flex; gap: 16px; font-size: 12px; }
.s-search { color: var(--s-meta); padding-left: 16px; border-left: 1px solid var(--s-line); }

.s-ad {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(135deg, #f3f3f3 0 8px, #ebebeb 8px 16px);
  color: #b0b0b0;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 300ms ease;
}
.s-ad-wide { height: 66px; margin: 14px 24px 20px; }
.s-ad-box { height: 150px; margin-bottom: 18px; }

.s-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 30px;
  padding: 0 24px 150px;
}

.s-article { max-width: 100%; margin: 0; transition: max-width 400ms ease; }
.s-article p,
.s-article li { margin: 0 0 12px; transition: color 400ms ease; }
.s-article ul { padding-left: 18px; margin: 0 0 12px; }
.s-crumb { font-size: 11px; color: var(--s-meta); margin-bottom: 8px !important; }
.s-title {
  margin: 0 0 6px;
  color: var(--s-ink);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.s-by { font-size: 11px; color: var(--s-meta) !important; margin-bottom: 16px !important; }
.s-article h3 { margin: 18px 0 8px; color: var(--s-ink); font-size: 15px; }

.s-rail { font-size: 12px; transition: opacity 300ms ease; }
.s-rail-title { color: var(--s-ink); font-weight: 700; margin-bottom: 6px; }
.s-rail ol { margin: 0; padding-left: 16px; }
.s-rail li { margin-bottom: 6px; }

.s-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.38);
}

.s-modal {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(300px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  padding: 22px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
  color: #666;
}
.s-modal-title { color: #222; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.s-input {
  display: block;
  margin: 14px 0 8px;
  padding: 9px 10px;
  border: 1px solid #ddd;
  text-align: left;
  color: #aaa;
}
.s-cta {
  display: inline-block;
  padding: 9px 14px;
  background: var(--s-brand);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.s-modal .s-cta { display: block; }
.s-no { display: block; margin-top: 10px; font-size: 11px; text-decoration: underline; color: #999; }

.s-cookies {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #242424;
  color: #d8d8d8;
  font-size: 12px;
}
.s-cookies p { flex: 1; }
.s-cta.ghost { background: transparent; border: 1px solid #666; }

.s-overlay,
.s-modal,
.s-cookies { transition: opacity 300ms ease, visibility 300ms, transform 300ms ease; }

.site.t-hide .s-overlay,
.site.t-hide .s-modal,
.site.t-hide .s-cookies { opacity: 0; visibility: hidden; }
.site.t-hide .s-cookies { transform: translateY(12px); }

.site.t-serif .s-article { font-family: "Fraunces", Georgia, serif; }
.site.t-serif .s-article p,
.site.t-serif .s-article li { font-size: 15px; line-height: 1.68; }
.site.t-serif .s-title { font-weight: 600; letter-spacing: -0.025em; font-size: 32px; }

.site.t-warm {
  --s-bg: #f4ecdf;
  --s-ink: #1c1915;
  --s-text: #1c1915;
  --s-meta: #6b5f50;
  --s-line: #e3d7c4;
}
.site.t-warm .s-ad { opacity: 0.6; }

.site.t-column .s-ad,
.site.t-column .s-rail { display: none; }
.site.t-column .s-layout { grid-template-columns: minmax(0, 1fr); padding-top: 26px; }
.site.t-column .s-article { max-width: 34em; margin: 0 auto; }

/* The Gloss panel replica. Same measures as extension/src/sidepanel.css. */

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  border-left: 1px solid var(--line);
  font: 14px/1.45 var(--sans);
  --gutter: 14px;
}

.panel button { font: inherit; }

.p-mast {
  position: relative;
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 12px var(--gutter) 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.p-mast::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
}
.panel.is-busy .p-mast::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 28%;
  background: var(--accent);
  animation: busy 0.9s ease-in-out infinite;
}
@keyframes busy {
  from { left: -28%; }
  to { left: 100%; }
}

.p-site { display: flex; gap: 8px; min-width: 0; }
.p-site-text { min-width: 0; }
.p-favicon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  border-radius: 3px;
  background: #e4572e;
}
.p-domain {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-scope { margin-top: 1px; font-size: 12px; line-height: 1.35; color: var(--ink-soft); }

.p-icon {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
}

.p-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.p-status {
  margin: 0;
  padding: 10px var(--gutter) 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.p-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px var(--gutter) 0;
}
.p-count { font-size: 12px; color: var(--ink-soft); }
.p-actions { display: flex; gap: 6px; }

.p-ghost,
.p-solid {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.p-ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.p-ghost:hover:not(:disabled) { background: var(--sunken); }
.p-ghost[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.p-solid {
  border: 0;
  background: var(--fill);
  color: var(--on-fill);
}
.p-solid:hover:not(:disabled) { background: var(--fill-hover); }
.p-solid:disabled,
.p-ghost:disabled {
  cursor: default;
  background: var(--sunken);
  color: var(--ink-soft);
}
.p-ghost:disabled { border-color: var(--line); }

.p-list { list-style: none; margin: 6px 6px 0; padding: 0; }
.p-tweak {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius);
}
.p-tweak:hover { background: var(--surface); }
.p-tweak.selected {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
.p-tweak-main {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.p-tweak-name {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-tweak.off .p-tweak-name { color: var(--ink-soft); }
.p-tweak-meta { display: block; margin-top: 1px; font-size: 12px; color: var(--ink-soft); }

.p-switch {
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--sunken);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.p-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--knob);
  transition: transform 120ms ease;
}
.p-switch[aria-checked="true"] { background: var(--accent-fill); box-shadow: none; }
.p-switch[aria-checked="true"]::after { transform: translateX(14px); }

.p-thread { padding: 12px var(--gutter) 8px; }
.p-thread-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.p-thread-title h4 {
  margin: 0;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-hint { margin: 0 0 8px; font-size: 13px; color: var(--ink-soft); }

.p-examples { display: flex; flex-direction: column; gap: 2px; }
.p-example {
  padding: 7px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  font-size: 13px !important;
  line-height: 1.4;
  color: var(--ink);
}
.p-example::before { content: "→"; margin-right: 8px; color: var(--ink-soft); }
.p-example:hover:not(:disabled) { background: var(--surface); }
.p-example:disabled { color: var(--ink-soft); cursor: default; }

.p-message { margin: 0 0 14px; }
.p-who {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.p-message.assistant .p-who { color: var(--accent); }
.p-message.thinking .p-who { font-weight: 500; }
.p-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.p-message.user p {
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.p-message.thinking p { font-size: 12px; line-height: 1.45; color: var(--ink-soft); }

.p-editor {
  margin: 0 var(--gutter);
  padding: 8px 0 12px;
  border-top: 1px solid var(--line);
}
.p-editor summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.p-editor summary::-webkit-details-marker { display: none; }
.p-editor summary::before,
.tri {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--ink-soft);
}
.p-editor[open] summary::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-soft);
  border-bottom: 0;
}
.p-editor pre {
  margin: 8px 0 0;
  padding: 8px 10px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font: 11.5px/1.5 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.p-composer {
  flex: none;
  margin: 0;
  padding: 10px var(--gutter) 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.p-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 3px 4px 3px 8px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 12px;
}
.p-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-chip-x {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-soft);
}
.p-chip-x:hover { background: var(--focus); color: var(--ink); }

#p-draft {
  display: block;
  width: 100%;
  min-height: 68px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  resize: none;
  font-size: 14px;
}
#p-draft::placeholder { color: var(--ink-soft); opacity: 1; }
#p-draft:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus);
}

.p-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.p-key { font-size: 12px; color: var(--ink-soft); }
#p-send { margin-left: auto; }

/* Sections */

.section {
  padding: clamp(72px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}
.section.tint { background: var(--bg); border-top-color: transparent; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.label {
  grid-column: 1 / span 3;
  padding-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.label::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  margin-bottom: 12px;
  background: var(--accent);
}

.content { grid-column: 4 / -1; min-width: 0; }

h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.012em; }

.intro {
  max-width: 38em;
  margin-top: 22px;
  font-size: 18px;
  color: var(--ink-soft);
}

/* How it works */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  margin-top: 56px;
  align-items: start;
}

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n {
  font: 500 14px/1.6 var(--mono);
  color: var(--accent);
}
.steps p { margin-top: 6px; color: var(--ink-soft); font-size: 16px; }

.script-card {
  position: sticky;
  top: 96px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.script-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.script-head .tri {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-soft);
  border-bottom: 0;
}

.code {
  margin: 12px 0 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font: 13px/1.65 var(--mono);
  tab-size: 2;
}
.code .c { color: var(--ink-soft); }
.code .s { color: var(--accent); }

.script-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}
.script-meta dt { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.script-meta dd {
  margin: 2px 0 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Split sections */

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.split.reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
.split.stacked { grid-template-columns: minmax(0, 1fr); gap: 48px; }
.split.stacked .split-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}
.split.stacked h2 { grid-column: 1 / -1; max-width: none; margin-bottom: 8px; }
.split-text p { margin-top: 18px; color: var(--ink-soft); }
.split-text p strong { color: var(--ink); }
.split-text em { font-style: normal; font-weight: 600; color: var(--ink); background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 100% 2px; }

.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-window);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags code { font-size: 12.5px; }

.code.block { margin: 0; padding: 20px 22px; font-size: 13.5px; }

/* Privacy */

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 0.8fr) minmax(0, 1fr) minmax(90px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  margin-top: 48px;
}

.node {
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  min-height: 118px;
}
.node.strong { border-color: var(--ink); box-shadow: inset 0 2px 0 var(--accent); }
.node-name { font-weight: 600; margin-bottom: 4px; }
.node p:not(.node-name) { font-size: 14px; color: var(--ink-soft); line-height: 1.45; }

.edge {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-soft);
  text-align: center;
}
.edge span { position: relative; padding-bottom: 8px; }
.edge span::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: 0;
  height: 1px;
  background: var(--ink-soft);
}
.edge span::before {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -3px;
  border-left: 6px solid var(--ink-soft);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}
.edge .back { color: var(--accent); }
.edge .back::after { background: var(--accent); }
.edge .back::before {
  right: auto;
  left: -10px;
  border-left: 0;
  border-right: 6px solid var(--accent);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 20px 0;
  border-top: 1px solid var(--line-strong);
  font-size: 16px;
  color: var(--ink-soft);
}
.facts strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }

.more { margin-top: 28px; }

/* Install */

.install {
  padding: clamp(72px, 10vw, 128px) 0;
  background: var(--night);
  color: var(--night-ink);
  --ink: var(--night-ink);
  --ink-soft: var(--night-soft);
  --line: var(--night-line);
  --accent: var(--night-accent);
  color-scheme: dark;
}
.install .label { color: var(--night-soft); }
.install .label::before { background: var(--night-accent); }

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
}

.files {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--night-line);
}
.files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--night-line);
}
.file-name { font: 500 15px/1.4 var(--mono); }
.file-meta { margin-top: 2px; font-size: 14px; color: var(--night-soft); }
.file-note { margin-top: 18px; font-size: 14px; color: var(--night-soft); }

.button.light { background: var(--night-ink); color: var(--night); }
.button.light:hover { background: #d9dce2; }
.button.outline { background: transparent; color: var(--night-ink); border-color: #454b57; }
.button.outline:hover { background: var(--night-raised); border-color: var(--night-soft); }

.install-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.install-steps li {
  position: relative;
  padding: 0 0 30px 52px;
  counter-increment: step;
}
.install-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #454b57;
  border-radius: var(--radius);
  font: 500 13px/1 var(--mono);
  color: var(--night-soft);
}
.install-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 6px;
  width: 1px;
  background: var(--night-line);
}
.install-steps p { margin-top: 6px; font-size: 16px; color: var(--night-soft); }
.install-steps strong { color: var(--night-ink); font-weight: 600; }
.install :not(pre) > code { background: var(--night-raised); border-color: var(--night-line); color: var(--night-ink); }
.install kbd { border-color: #454b57; color: var(--night-ink); }

.copy {
  position: relative;
  display: inline;
  padding: 1px 6px;
  border: 1px solid var(--night-line);
  border-radius: 4px;
  background: var(--night-raised);
  color: var(--night-ink);
  font: 0.86em var(--mono);
  cursor: copy;
}
.copy:hover { border-color: var(--night-soft); }
.copy.is-copied::after {
  content: "Copied";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--night-ink);
  color: var(--night);
  font: 600 11px/1.2 var(--sans);
  white-space: nowrap;
}

/* Footer */

.foot {
  padding: 28px 0 40px;
  background: var(--night);
  color: var(--night-soft);
  font-size: 14px;
  border-top: 1px solid var(--night-line);
}
.foot-row { display: flex; align-items: center; gap: 24px; }
.foot .brand { color: var(--night-ink); font-size: 15px; }
.foot p { margin-right: auto; }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot nav a:hover { color: var(--night-ink); }

/* Plain document pages */

.doc { padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 10vw, 120px); }
.doc .wrap { max-width: calc(40rem + 2 * var(--pad)); }
.doc h1 { font-size: clamp(2.25rem, 1.4rem + 3vw, 3.5rem); letter-spacing: -0.04em; }
.doc .updated { margin-top: 14px; color: var(--ink-soft); font-size: 14px; }
.doc h2 { margin-top: 48px; font-size: 22px; letter-spacing: -0.015em; max-width: none; }
.doc p, .doc li { margin-top: 14px; color: var(--ink-soft); }
.doc ul { padding-left: 20px; margin: 0; }
.doc li { margin-top: 8px; }
.doc a { color: var(--accent); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc h2 { scroll-margin-top: 88px; }

.summary {
  margin: 40px 0 32px;
  padding: 20px 24px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
}
.summary-title { font-weight: 600; color: var(--ink) !important; margin: 0 !important; }
.summary li { color: var(--ink); }

/* Narrow screens */

@media (max-width: 1080px) {
  h1 { grid-column: 1 / -1; max-width: 13ch; }
  .hero-side { grid-column: 1 / span 9; }
  .window-body { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 960px) {
  .nav { display: none; }
  .top-row { justify-content: space-between; }
  .label { grid-column: 1 / -1; padding-top: 0; }
  .content { grid-column: 1 / -1; }
  .how,
  .split,
  .split.reverse,
  .install-grid { grid-template-columns: minmax(0, 1fr); }
  .script-card { position: static; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .edge { flex-direction: row; justify-content: center; gap: 28px; padding: 14px 0; }
  .edge span { padding: 0 0 0 14px; text-align: left; }
  .edge span::after { left: 0; right: auto; top: -14px; bottom: -14px; width: 1px; height: auto; }
  .edge span::before { left: -3px; right: auto; top: auto; bottom: -14px; border: 0; border-top: 6px solid var(--ink-soft); border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
  .edge .back::before { top: -14px; bottom: auto; border: 0; border-bottom: 6px solid var(--accent); border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
}

@media (max-width: 760px) {
  .hero-side { grid-column: 1 / -1; }
  .window-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .tab { display: none; }
  .window-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 380px auto; height: auto; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .p-stage { max-height: 360px; min-height: 240px; }
  .s-layout { grid-template-columns: minmax(0, 1fr); }
  .s-rail { display: none; }
  .demo-caption { flex-direction: column; gap: 8px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .split.stacked .split-text { grid-template-columns: minmax(0, 1fr); }
  .files li { flex-wrap: wrap; }
  .foot-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
