/* Sticky Reader — marketing site styles
   One brand colour, declared once in :root as --brand and referenced by token
   everywhere else. Mock surfaces reuse the extension's real visual language:
   320px card, 12px radius, uppercase 11px labels, neutral greys, dark chrome. */

:root {
  /* brand */
  --brand: #008080;
  --brand-hover: #006b6b;
  --brand-soft: #0a5f5f;
  --brand-tint: #eaf4f4;
  --brand-tint-strong: #d7ecec;
  --brand-line: #9fcfcd;
  --on-brand: #ffffff;

  /* surfaces */
  --canvas: #ffffff;
  --band: #eef3f5;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #f2f4f6;

  /* text */
  --ink: #1f2328;
  --ink-2: #57606a;
  --ink-3: #636b76;
  --ink-4: #697280;

  /* lines */
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --line-soft: rgba(0, 0, 0, 0.06);

  /* extension chrome (mock surfaces) */
  --chrome: #1f2328;
  --chrome-hover: #000000;
  --chrome-head: #f6f7f9;
  --msg-user: #1f2328;
  --msg-user-ink: #ffffff;
  --msg-ai: #f2f4f6;
  --scrim: rgba(15, 20, 24, 0.55);

  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --speed: 140ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #35b5ac;
    --brand-hover: #4fc8bf;
    --brand-soft: #7fd8d0;
    --brand-tint: rgba(53, 181, 172, 0.14);
    --brand-tint-strong: rgba(53, 181, 172, 0.24);
    --brand-line: rgba(53, 181, 172, 0.5);
    --on-brand: #06231f;

    --canvas: #0f1418;
    --band: #151b21;
    --surface: #171d23;
    --surface-2: #1c2128;
    --surface-3: #22272e;

    --ink: #e6edf3;
    --ink-2: #adb8c4;
    --ink-3: #9aa4b2;
    --ink-4: #768390;

    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.28);
    --line-soft: rgba(255, 255, 255, 0.08);

    --chrome: #30363d;
    --chrome-hover: #454d56;
    --chrome-head: #161b22;
    --msg-user: #30363d;
    --msg-user-ink: #e6edf3;
    --msg-ai: #22272e;
    --scrim: rgba(0, 0, 0, 0.68);
  }
}

/* --------------------------------- base ---------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.9rem, 1.25rem + 2.6vw, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
}

h3 {
  font-size: 1.0625rem;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--brand-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--speed) ease;
}

a:hover {
  color: var(--brand-hover);
}

code {
  font: 500 0.875em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 5px;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* -------------------------------- layout --------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.wrap.narrow {
  max-width: 760px;
}

.band {
  padding-block: clamp(48px, 7vw, 88px);
}

.band-alt {
  background: var(--band);
}

section[id] {
  scroll-margin-top: 84px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-soft);
}

.section-lede {
  margin: 8px 0 32px;
  max-width: 60ch;
  color: var(--ink-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-demo {
  color: var(--brand-soft);
  background: var(--brand-tint-strong);
  border: 1px solid var(--brand-line);
}

/* ------------------------------- buttons --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font: 500 15px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background-color var(--speed) ease,
    border-color var(--speed) ease,
    color var(--speed) ease;
}

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-outline:hover {
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-soft);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-ghost:hover {
  background: var(--brand-tint);
}

.btn-lg {
  font-size: 16px;
  padding: 13px 22px;
}

.btn-sm {
  min-height: 38px;
  font-size: 14px;
  padding: 8px 14px;
}

.btn-cta {
  white-space: nowrap;
  min-height: 40px;
  font-size: 14px;
  padding: 8px 14px;
}

.btn-block {
  width: 100%;
}

/* -------------------------------- header --------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding-block: 12px;
}

.wordmark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

a.wordmark:hover {
  color: var(--brand-soft);
}

/* The brand mark sits beside the word, not inside it. */
.wordmark-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wordmark-mark {
  display: block;
  height: 26px;
  width: auto;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-right: auto;
  order: 3;
  width: 100%;
  font-size: 15px;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 0;
}

.site-nav a:hover {
  color: var(--brand-soft);
  text-decoration: underline;
}

@media (min-width: 900px) {
  .site-nav {
    order: 0;
    width: auto;
    margin-inline: 24px;
  }
}

/* --------------------------------- hero ---------------------------------- */

.band-hero {
  padding-block: clamp(36px, 5vw, 72px) clamp(48px, 6vw, 80px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.hero-copy .lede {
  margin-top: 16px;
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-meta {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-3);
}

.hero-notice {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
    gap: 52px;
  }
}

/* ---------------------------- demo (hero right) --------------------------- */

.hero-demo {
  min-width: 0;
}

.demo-frame {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.demo-bar-note {
  margin: 0;
  flex: 1 1 220px;
  font-size: 13px;
  color: var(--ink-3);
}

.demo-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.demo-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.demo-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}

.demo-sel-area {
  min-width: 0;
}

.demo-target {
  cursor: pointer;
  color: var(--ink);
  background: var(--brand-tint);
  box-shadow: inset 0 -2px 0 var(--brand-line);
  border-radius: 2px;
  transition:
    background-color var(--speed) ease,
    box-shadow var(--speed) ease;
}

.demo-target:hover,
.demo-target:focus-visible {
  background: var(--brand-tint-strong);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.demo-target.is-picked {
  background: var(--brand-tint-strong);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.demo-lane {
  position: relative;
  min-height: 42px;
  margin-top: 10px;
}

.demo-show {
  margin-top: 2px;
}

.demo-card-slot {
  min-width: 0;
}

.demo-card {
  margin-top: 0;
}

.demo-foot-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

/* ------------------ mock surfaces: the extension's language ---------------- */

.sr-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  font: 500 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #ffffff;
  background: var(--chrome);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--speed) ease;
}

.sr-chip:hover {
  background: var(--chrome-hover);
}

.demo-chip {
  position: absolute;
  top: 0;
  left: 0;
}

.sr-card {
  display: flex;
  flex-direction: column;
  width: 320px;
  max-width: 100%;
  min-width: 0;
  font: 400 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.sr-card--confirmed {
  border-color: var(--brand);
}

.sr-card--confirmed .sr-card-head {
  background: var(--brand-tint);
}

.sr-card-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome-head);
}

.sr-card-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.sr-card-state {
  margin-left: auto;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-soft);
  background: var(--brand-tint-strong);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
}

.sr-card-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background-color var(--speed) ease,
    color var(--speed) ease;
}

.sr-card-close:hover {
  color: var(--ink);
  background: var(--surface-3);
}

.sr-card-body {
  padding: 12px 14px 14px;
  min-width: 0;
}

.sr-card-text {
  margin: 0;
}

.sr-card-label {
  margin: 12px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sr-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.sr-card-got,
.sr-card-angle {
  padding: 7px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background-color var(--speed) ease,
    border-color var(--speed) ease;
}

.sr-card-got {
  color: #ffffff;
  background: var(--chrome);
}

.sr-card-got:hover {
  background: var(--chrome-hover);
}

.sr-card-got.is-active {
  background: var(--brand);
  color: var(--on-brand);
}

.sr-card-angle {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.sr-card-angle:hover {
  background: var(--surface-3);
}

.sr-card-ask {
  margin-top: 14px;
}

.sr-card-thread {
  display: grid;
  gap: 8px;
  max-height: 210px;
  margin-bottom: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sr-msg {
  max-width: 94%;
  margin: 0;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sr-msg--user {
  justify-self: end;
  color: var(--msg-user-ink);
  background: var(--msg-user);
}

.sr-msg--ai {
  justify-self: start;
  color: var(--ink);
  background: var(--msg-ai);
  border: 1px solid var(--line-soft);
}

.sr-ask {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sr-ask-input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 8px 10px;
  font: 400 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition:
    border-color var(--speed) ease,
    box-shadow var(--speed) ease;
}

.sr-ask-input::placeholder {
  color: var(--ink-4);
}

.sr-ask-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-tint-strong);
  outline: none;
}

.sr-ask-send {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--on-brand);
  background: var(--brand);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--speed) ease;
}

.sr-ask-send:hover {
  background: var(--brand-hover);
}

/* --------------------------- card states, shared -------------------------- */

/* The phone page and the document reader open the same card, so the states that
   card passes through live here once: the passage it was asked about, the thinking
   skeleton, the pending reply, and the copy that went wrong. */

.sr-card-quote {
  margin: 0 0 10px;
  padding-left: 10px;
  font-style: italic;
  color: var(--ink-2);
  border-left: 2px solid var(--brand-line);
}

.sr-card-thinking {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--ink-2);
}

.sr-card-lines {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.sr-card-line {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: sr-shimmer 1.1s ease-in-out infinite;
}

.sr-card-line:nth-child(2) {
  width: 92%;
}

.sr-card-line:nth-child(3) {
  width: 74%;
}

@keyframes sr-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.sr-msg--pending {
  font-weight: 500;
  color: var(--ink-2);
}

.sr-msg--error {
  color: #ff9b9b;
  background: rgba(255, 123, 148, 0.1);
  border: 1px solid rgba(255, 123, 148, 0.3);
}

/* --------------------------- form fields, shared -------------------------- */

.m-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.m-hint {
  margin-left: 6px;
  font-weight: 400;
  color: var(--ink-3);
}

/* 16px is not a style choice here: iOS Safari zooms the page into any smaller
   input, which is the opposite of calm. */
.m-input {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}

.m-text {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition:
    border-color var(--speed) ease,
    box-shadow var(--speed) ease;
}

.m-text:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-tint-strong);
  outline: none;
}

.m-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.m-note {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
}

/* The plan a field belongs to: quiet, but readable before anything is spent. */
.m-plan-note {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* -------------------------------- steps ---------------------------------- */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  min-width: 0;
  padding-top: 16px;
  border-top: 2px solid var(--brand);
}

.step-num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-soft);
}

.step h3 {
  margin: 8px 0 6px;
}

.step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

/* ------------------------------ why it works ----------------------------- */

.prose p {
  color: var(--ink-2);
}

.prose h2 + p {
  margin-top: 18px;
}

.tight-list {
  margin: 18px 0;
  padding-left: 20px;
  color: var(--ink-2);
}

.tight-list li {
  margin-bottom: 8px;
}

.tight-list li::marker {
  color: var(--brand);
}

.fine-print {
  margin-bottom: 0;
  font-size: 14px;
  color: var(--ink-3);
}

/* -------------------------------- pricing -------------------------------- */

.plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plan--pro {
  border-color: var(--brand);
}

.plan:focus-visible,
.plan.is-focused {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.plan-price {
  margin: 0;
  text-align: right;
}

.plan-amount {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.plan-amount--soon {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.plan-period {
  font-size: 13px;
  color: var(--ink-3);
}

.plan-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
  font-size: 15px;
  color: var(--ink-2);
}

.plan-list li {
  padding-left: 22px;
  position: relative;
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand);
}

.plan-off {
  color: var(--ink-4);
}

.plan-off::before {
  background: transparent !important;
  border: 1px solid var(--line-strong);
}

.plan-cap {
  font-weight: 700;
  color: var(--ink);
}

@media (min-width: 860px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

.activate {
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  max-width: 76ch;
}

.activate h3 {
  margin-bottom: 6px;
}

.activate p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

/* ---------------------------------- faq ---------------------------------- */

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  padding: 16px 28px 16px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: color var(--speed) ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 15px;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-3);
}

.faq-item summary:hover {
  color: var(--brand-soft);
}

.faq-item[open] summary {
  color: var(--brand-soft);
}

.faq-item[open] summary::after {
  content: "\2013";
}

.faq-item p {
  margin: 0 0 18px;
  max-width: 68ch;
  color: var(--ink-2);
}

/* ------------------------------ closing + foot ---------------------------- */

.band-close {
  padding-block: clamp(44px, 6vw, 72px);
}

.close-inner {
  max-width: 700px;
  text-align: center;
}

.close-inner p {
  margin: 10px auto 24px;
  color: var(--ink-2);
}

.close-inner .hero-actions {
  justify-content: center;
  margin-top: 0;
}

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 36px;
  background: var(--canvas);
}

.foot-inner {
  display: grid;
  gap: 20px;
}

.foot-brand {
  min-width: 0;
}

@media (min-width: 760px) {
  .foot-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .foot-fine {
    grid-column: 1 / -1;
  }
}

.foot-note {
  margin: 8px 0 0;
  max-width: 46ch;
  font-size: 14px;
  color: var(--ink-3);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 15px;
}

.foot-fine {
  margin: 0;
  max-width: 70ch;
  font-size: 13px;
  color: var(--ink-3);
}

/* --------------------------------- modal --------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
}

.modal-card {
  position: relative;
  width: 420px;
  max-height: calc(100vh - 32px);
  margin: auto;
}

.modal-card .sr-card-body {
  /* Without this the flex item refuses to shrink, so short viewports clip the
     grade buttons out of reach instead of scrolling the body. */
  min-height: 0;
  overflow-y: auto;
}

.quiz-quote {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--brand-line);
  font-size: 13px;
  color: var(--ink-2);
}

.quiz-question {
  margin: 0;
  font-weight: 600;
}

.sr-label-block {
  display: block;
  margin-top: 12px;
}

.quiz-answer {
  width: 100%;
  min-height: 74px;
  margin-top: 4px;
  padding: 8px 10px;
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  resize: vertical;
  transition:
    border-color var(--speed) ease,
    box-shadow var(--speed) ease;
}

.quiz-answer:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-tint-strong);
  outline: none;
}

.modal-card .btn-block {
  margin-top: 12px;
}

.quiz-reveal {
  margin-top: 10px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.quiz-reveal p {
  margin: 4px 0 0;
  color: var(--ink-2);
}

.reveal-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ladder {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--ink-3);
}

.ladder li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.ladder li.is-current {
  color: var(--ink);
  font-weight: 700;
  border-color: var(--brand);
  background: var(--brand-tint-strong);
}

.ladder li.is-done {
  text-decoration: line-through;
  color: var(--ink-4);
}

.quiz-status {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* ------------------------------ privacy page ------------------------------ */

.doc-head {
  border-bottom: 1px solid var(--line);
  padding-block: 20px;
}

.doc-body {
  padding-block: clamp(32px, 5vw, 64px);
}

.doc {
  max-width: 72ch;
}

.doc h2 {
  margin-top: 34px;
  font-size: 1.25rem;
}

.doc h3 {
  margin-top: 22px;
}

.doc p,
.doc li {
  color: var(--ink-2);
}

.doc-list {
  padding-left: 22px;
}

.doc-list li {
  margin-bottom: 8px;
}

.doc-callout {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--band);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.doc-reviewed {
  margin-top: 34px;
  font-size: 14px;
  color: var(--ink-3);
}

.doc-head-sub {
  margin: 10px 0 0;
  max-width: 66ch;
  color: var(--ink-2);
}

.back-link {
  display: inline-block;
  font-size: 15px;
}

/* -------------------------------- reader ---------------------------------- */

/* The reader is a workspace, not a landing page. While a document is open the
   marketing header steps out and the reader's own bar — name, progress, way back —
   takes its place, so nothing but the text and one pill is on screen. */

body.is-reading .site-head {
  display: none;
}

.rd-intake {
  display: grid;
  gap: 14px;
  margin-bottom: 40px;
}

.rd-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.rd-pick:has(.rd-file:focus-visible) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-tint-strong);
}

/* The label is the button; the input stays focusable so the keyboard can reach it. */
.rd-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.rd-formats {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

.rd-paste {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* The two text-based intakes sit side by side until the width says otherwise. */
.rd-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rd-steps {
  margin-top: 8px;
}

/* ---------------------------- saved documents ----------------------------- */

/* The library is one list in two homes: inline under the intake form while nothing is
   open, and in the drawer below a document. Rows are ordinary grid and flex — nothing
   positioned — because the same markup has to survive both widths and a phone. */

.lib {
  margin-block: 4px 34px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* The drawer is scrolled to; the reader's own bar is sticky over it. */
  scroll-margin-top: 92px;
}

.lib-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 14px;
}

/* The global h2 is a section display size. In a drawer this is a label. */
.lib-heading {
  font-size: 1.125rem;
}

.lib-count {
  flex: 1 1 120px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

.lib-status {
  margin-bottom: 14px;
}

.lib-list {
  display: grid;
  gap: 12px;
}

.lib-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.lib-item.is-active {
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

.lib-title {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.lib-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.lib-type {
  color: var(--brand-soft);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
}

.lib-facts {
  font-size: 13px;
  color: var(--ink-3);
}

.lib-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.lib-bar {
  flex: 1 1 110px;
  min-width: 0;
  height: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.lib-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
}

.lib-pct {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.lib-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-left: auto;
}

.lib-reading {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-soft);
  white-space: nowrap;
}

/* One tap deletes a document, so the confirming pair is inline rather than a modal. */
.lib-remove {
  padding: 6px 2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.lib-remove:hover {
  color: var(--danger);
}

.lib-confirm {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
}

.lib-confirm-text {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* The outline button's own colour rule is later in this file, so the destructive pair
   needs the compound selector to be seen at all. */
.btn.lib-danger {
  color: var(--danger);
  border-color: var(--danger-line);
}

.btn.lib-danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.lib-empty {
  margin: 0;
  padding: 16px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

/* Thumb width: the list is tapped here, so the quiet text buttons get real targets. */
@media (max-width: 640px) {
  .lib {
    padding: 14px;
  }

  .lib-remove {
    padding: 10px 6px;
    font-size: 15px;
  }
}

/* In the drawer the list sits under the text, so it keeps the text's measure rather than
   the page's — otherwise it would run out from under the paragraph above it. */
body.is-reading .lib-drawer {
  max-width: 780px;
  padding-bottom: clamp(24px, 4vw, 40px);
}

/* --------------------------------- the bar -------------------------------- */

.rd-work {
  padding-bottom: clamp(40px, 6vw, 80px);
}

.rd-bar {
  position: sticky;
  top: 0;
  z-index: 45;
  padding-top: env(safe-area-inset-top);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.rd-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding-block: 10px;
}

.rd-doc-id {
  min-width: 0;
  margin-right: auto;
}

.rd-doc-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.rd-doc-meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

.rd-pct {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.rd-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

/* Three pixels under the bar is the whole indicator: enough to show the document
   has an end, quiet enough to ignore while reading. */
.rd-progress {
  height: 3px;
  background: var(--surface-3);
}

.rd-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
  transition: width var(--speed) linear;
}

/* -------------------------------- the text -------------------------------- */

.rd-column {
  max-width: 780px;
  padding-block: clamp(26px, 5vw, 56px) clamp(48px, 8vw, 96px);
}

.rd-doc {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

/* pre-wrap is what keeps the file honest: line breaks the document has are the
   line breaks the reader shows. */
.rd-para {
  margin: 0 0 1.15em;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.rd-doc ::selection {
  background: var(--brand-tint-strong);
}

.rd-doc-status {
  max-width: 68ch;
  margin-top: 26px;
}

/* -------------------------------- the pill -------------------------------- */

.rd-pill {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 55;
  padding: 10px 18px;
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--on-brand);
  background: var(--brand-fill);
  border: 1px solid var(--brand-fill-hover);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.rd-pill:hover {
  background: var(--brand-fill-hover);
}

/* ------------------------------ the card panel ---------------------------- */

.rd-panel {
  position: fixed;
  z-index: 50;
  top: 88px;
  right: 24px;
  bottom: 24px;
  width: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* A 380px panel beside a 68ch paragraph beside the library sidebar needs about 1500px
   of window. Under that it takes the bottom of the screen instead of covering the
   paragraph it is explaining. */
@media (max-width: 1499px) {
  .rd-panel {
    top: auto;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
    max-height: min(76vh, 620px);
  }
}

/* Phone width: the pill joins the thumb at the bottom, and the card's buttons are
   thumb targets. */
@media (max-width: 640px) {
  .rd-pill.is-bar {
    top: auto;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: var(--radius);
  }

  .rd-panel {
    right: 8px;
    left: 8px;
  }

  .rd-panel .sr-card-body {
    font-size: 15px;
  }

  .rd-panel .sr-card-foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .rd-panel .sr-card-foot button {
    min-height: 44px;
    font-size: 15px;
  }

  .rd-panel .sr-card-thread {
    max-height: 200px;
  }
}

/* --------------------------- motion preference --------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ============================== brand theme: dark ===========================
   Every web page. Everything hangs off one token override on body: the rest of
   this file is already token-driven, so the shared chrome (buttons, bands, plan
   cards, the reader and mobile workspaces, the mock extension card, the quiz
   modal) picks the dark palette up without a rule each. Only rules that are
   genuinely landing-page layout stay scoped to body.landing. */

body {
  color-scheme: dark;

  /* surfaces */
  --canvas: #0b0d12;
  --band: rgba(255, 255, 255, 0.024);
  --surface: #13161f;
  --surface-2: #171b26;
  --surface-3: #1f2433;

  /* text: white display ink, muted slate body */
  --ink: #f5f7fb;
  --ink-2: #aab3c8;
  --ink-3: #8b95ac;
  --ink-4: #78829b;

  /* lines */
  --line: #1f2433;
  --line-strong: #2a3142;
  --line-soft: #191d28;

  /* electric blue. --brand is the accent for text, borders and marks;
     --brand-fill is the deeper blue that carries white button labels. */
  --brand: #3b82f6;
  --brand-hover: #6ba1f8;
  --brand-soft: #8ab4ff;
  --brand-fill: #2563eb;
  --brand-fill-hover: #1d4ed8;
  --brand-tint: rgba(59, 130, 246, 0.12);
  --brand-tint-strong: rgba(59, 130, 246, 0.24);
  --brand-line: rgba(59, 130, 246, 0.42);
  --on-brand: #ffffff;

  /* purple marks the "unique to sticky reader" tier */
  --violet: #a855f7;
  --violet-soft: #cba6ff;
  --violet-tint: rgba(168, 85, 247, 0.14);
  --violet-line: rgba(168, 85, 247, 0.46);

  /* rose marks the one thing in the app that cannot be undone: a deleted document */
  --danger: #ff9b9b;
  --danger-line: rgba(255, 123, 148, 0.42);

  /* extension chrome (mock surfaces) */
  --chrome: #2a3142;
  --chrome-hover: #3a4459;
  --chrome-head: #171b26;
  --msg-user: #2a3142;
  --msg-user-ink: #eaf0fa;
  --msg-ai: #1a1f2b;
  --scrim: rgba(4, 6, 10, 0.74);

  background-color: var(--canvas);
  /* architectural grid, with one blue wash behind the hero. Translucent band
     backgrounds let these lines read through every section. */
  background-image:
    radial-gradient(820px 460px at 50% -80px, rgba(59, 130, 246, 0.17), transparent 72%),
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-repeat: no-repeat, repeat, repeat;
  background-size:
    auto,
    56px 56px,
    56px 56px;
}

::selection {
  background: rgba(59, 130, 246, 0.34);
  color: #ffffff;
}

/* -------------------------------- headings -------------------------------- */

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  font-size: clamp(2.05rem, 1.3rem + 3.1vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.028em;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.accent {
  color: var(--brand);
}

/* -------------------------------- buttons --------------------------------- */

.btn-primary,
.sr-ask-send,
.sr-card-got.is-active {
  background: var(--brand-fill);
}

.btn-primary:hover,
.sr-ask-send:hover,
.sr-card-got.is-active:hover {
  background: var(--brand-fill-hover);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-outline:hover {
  border-color: var(--brand-line);
}

/* -------------------------------- header ---------------------------------- */

.site-head {
  background: rgba(11, 13, 18, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* The base header pins the nav to the left and the button to the right edge of
   the 1120px wrap; every page centres the cluster instead. */
.head-inner {
  justify-content: center;
}

.head-pill {
  margin-left: -10px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--brand-soft);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
}

.wordmark {
  letter-spacing: -0.02em;
}

.site-nav {
  font-size: 14px;
  margin-right: 0;
  justify-content: center;
}

.site-nav a:hover {
  color: var(--ink);
}

/* ------------------------------ explanation language ---------------------- */
/* One dropdown in the header: the language the explanation comes back in. It
   sits with the site chrome, not inside the reading column, because it is a
   setting about the whole page rather than about the document. */

.sr-lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sr-lang-label {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}

.sr-select,
.sr-lang-custom {
  min-height: 36px;
  padding: 6px 10px;
  font: 400 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.sr-select {
  max-width: 220px;
}

.sr-lang-custom {
  width: 140px;
}

.sr-select:focus,
.sr-lang-custom:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-tint-strong);
  outline: none;
}

@media (max-width: 560px) {
  .sr-lang-label {
    display: none;
  }
}

/* --------------------------------- hero ----------------------------------- */

body.landing .band-hero {
  padding-block: clamp(40px, 6vw, 80px) clamp(48px, 6vw, 84px);
}

body.landing .hero {
  display: block;
  max-width: 900px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 22px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
  border-radius: 999px;
  color: var(--brand-soft);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
}

body.landing .hero .lede {
  margin: 18px auto 0;
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.2rem);
  color: var(--ink-2);
}

body.landing .hero-actions {
  justify-content: center;
  margin-top: 28px;
}

body.landing .hero-meta {
  margin-top: 16px;
  color: var(--ink-3);
}

body.landing .hero-notice {
  max-width: 620px;
  margin-inline: auto;
}

body.landing .hero-demo {
  margin-top: 44px;
  text-align: left;
}

/* -------------------------------- quickstart ------------------------------- */

/* The three steps next to the install and reader buttons, so the page answers
   "what happens after I install this" before anyone installs anything. The
   extension's welcome tab lands on this same block. */
.quickstart {
  margin-top: 30px;
  padding: 18px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* The header is sticky, so an anchor jump must not tuck the title under it. */
  scroll-margin-top: 96px;
}

.quickstart-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
}

/* The confirmation that the download started. It sits above the steps it
   refers to, so it has to read as a banner rather than a footnote. */
.quickstart-banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
}

/* Browser tabs: the guide only shows the steps for the browser in use, but a
   visitor can switch without leaving the page. */
.qs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.qs-tab {
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.qs-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.qs-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--brand);
}

.qs-panel--reader {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.qs-copy--lead {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* auto-fit, not auto-fill: three columns on a desktop, one on a phone, and
   never a row of empty tracks beside a single step. */
.quickstart-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qs-step {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.qs-num {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-soft);
}

.qs-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.qs-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.quickstart-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* -------------------------------- sections -------------------------------- */

.section-lede {
  font-size: 1.0625rem;
  color: var(--ink-2);
}

.band-alt {
  border-block: 1px solid var(--line);
}

/* The footer already draws this line. */
body.landing .band-close {
  border-bottom: 0;
}

/* ------------------------------ bento: how it ----------------------------- */

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.bento-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--speed) ease;
}

.bento-card:hover {
  border-color: var(--line-strong);
}

.bento-card .bento-num {
  margin: 18px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand);
}

.bento-card h3 {
  margin: 6px 0 8px;
  font-size: 1.125rem;
}

.bento-card > p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

@media (min-width: 820px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ----------------------- wireframes (css only, no art) -------------------- */

.wf {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 186px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.wf-line {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--line-strong);
}

.wf-line.dim {
  opacity: 0.5;
}

.w40 {
  width: 40%;
}
.w45 {
  width: 45%;
}
.w55 {
  width: 55%;
}
.w60 {
  width: 60%;
}
.w65 {
  width: 65%;
}
.w70 {
  width: 70%;
}
.w75 {
  width: 75%;
}
.w80 {
  width: 80%;
}
.w90 {
  width: 90%;
}
.w95 {
  width: 95%;
}
.w100 {
  width: 100%;
}

.wf-sel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px;
  background: var(--brand-tint-strong);
  box-shadow: inset 0 0 0 1px var(--brand-line);
  border-radius: 6px;
}

.wf-chip {
  align-self: flex-start;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  color: #ffffff;
  background: var(--brand-fill);
}

.wf-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}

.wf-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.wf-file .wf-line {
  flex: 0 0 auto;
}

.wf-focus {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: 6px;
}

.wf-note {
  margin-top: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--brand-soft);
}

.wf-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.wf-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.wf-cap {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.wf-msg {
  max-width: 86%;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 8px;
}

.wf-msg.user {
  align-self: flex-end;
  color: var(--msg-user-ink);
  background: var(--msg-user);
}

.wf-msg.ai {
  align-self: flex-start;
  color: var(--ink);
  background: var(--msg-ai);
  border: 1px solid var(--line-soft);
}

.wf-ladder {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.wf-ladder span {
  padding: 4px 9px;
  font-size: 11px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.wf-ladder .is-done {
  color: var(--ink-3);
  text-decoration: line-through;
}

.wf-ladder .is-current {
  font-weight: 600;
  color: var(--ink);
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

/* ---------------------------- features grid ------------------------------ */

.feat-head {
  text-align: center;
}

.feat-head .section-lede {
  margin-inline: auto;
  max-width: 64ch;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 30px;
}

.legend-pill {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid;
}

.legend-pill.is-signature {
  color: var(--brand-soft);
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

.legend-pill.is-unique {
  color: var(--violet-soft);
  background: var(--violet-tint);
  border-color: var(--violet-line);
}

.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  row-gap: 8px;
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--speed) ease;
}

.feature:hover {
  border-color: var(--line-strong);
}

.feature .tag {
  grid-column: 2;
  grid-row: 1;
}

.feature h3 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: 1.0625rem;
}

.feature p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

.tag-signature {
  color: var(--brand-soft);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
}

.tag-unique {
  color: var(--violet-soft);
  background: var(--violet-tint);
  border: 1px solid var(--violet-line);
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ----------------------------- shared card chrome ------------------------- */

.sr-card {
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

.sr-chip {
  color: #ffffff;
  background: var(--brand-fill);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.sr-chip:hover {
  background: var(--brand-fill-hover);
}

.demo-frame {
  max-width: 660px;
  margin-inline: auto;
}

.demo-page {
  background: var(--surface);
  border-color: var(--line);
}

.prose p,
.tight-list,
.faq-item p {
  color: var(--ink-2);
}

.site-foot {
  background: transparent;
  border-top-color: var(--line-strong);
}

/* ============================== workspace page =============================
   The library as an app: a rail of notebooks down the left, a bar across the
   top, and the documents in the middle. Everything is grid or flex with
   min-width:0, so a 200-character title cannot push the page sideways at 320px. */

.ws-app {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100dvh;
}

.ws-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----------------------------------- rail ---------------------------------- */

.ws-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(255, 255, 255, 0.016);
  border-right: 1px solid var(--line);
}

.ws-rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 18px 14px;
}

.ws-brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.ws-brand-pill {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand-soft);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  white-space: nowrap;
}

.ws-rail-scroll {
  display: grid;
  align-content: start;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 18px;
}

.ws-new-nb {
  width: 100%;
  justify-content: center;
  min-height: 42px;
}

.ws-nb-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.ws-nb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-views {
  display: grid;
  gap: 4px;
}

.ws-view,
.ws-nb-name,
.ws-recent {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font: 600 14px/1.4 inherit;
  text-align: left;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.ws-view:hover,
.ws-nb-name:hover,
.ws-recent:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.ws-view.is-active,
.ws-nb.is-active > .ws-nb-name {
  color: var(--brand-soft);
  background: var(--brand-tint);
}

.ws-view-label,
.ws-nb-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-view-count {
  flex: 0 0 auto;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-4);
}

.ws-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ws-group-title {
  margin: 0;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-4);
}

.ws-group-list {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ws-side-empty {
  margin: 0;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink-4);
}

.ws-nb {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.ws-nb > .ws-nb-name {
  flex: 1 1 auto;
}

.ws-nb-ico,
.ws-recent-ico {
  color: var(--ink-3);
}

.ws-nb.is-active > .ws-nb-name .ws-nb-ico {
  color: var(--brand-soft);
}

/* The quiet controls: notebook and document removals, summary dismissal. Deleting a
   document is the one thing here that cannot be undone, hence --danger. */
.ws-remove {
  flex: 0 0 auto;
  padding: 6px 8px;
  font: 600 12px/1.2 inherit;
  color: var(--ink-4);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.ws-remove:hover {
  color: var(--danger);
  background: var(--surface-2);
}

.ws-recent {
  font-weight: 500;
  font-size: 13.5px;
}

.ws-recent-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------- the foot -------------------------------- */

.ws-rail-foot {
  display: grid;
  gap: 10px;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
}

.ws-rail-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ws-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: var(--brand-fill);
}

.ws-rail-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-gear {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.ws-gear:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.ws-rail-link {
  justify-self: start;
  padding: 0;
  font: 600 13px/1.4 inherit;
  color: var(--ink-3);
  background: none;
  border: 0;
  cursor: pointer;
}

.ws-rail-link:hover {
  color: var(--brand-soft);
  text-decoration: underline;
}

.ws-user .m-note {
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  background: none;
  border: 0;
  color: var(--ink-4);
}

/* ---------------------------------- top bar -------------------------------- */

.ws-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(16px, 3vw, 34px);
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.ws-topbar-title {
  margin: 0;
  margin-right: auto;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.ws-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-pro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.ws-pro-tag {
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.ws-account {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
}

.ws-account:hover {
  color: var(--ink);
  border-color: var(--ink-4);
}

.ws-account .ws-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.ws-chevron {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}

.ws-menu {
  display: none;
}

/* --------------------------------- popovers -------------------------------- */

.ws-pop {
  position: relative;
}

.ws-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 2px;
  min-width: 224px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

/* The settings menu hangs above its gear, so it opens into the rail instead of off
   the bottom of the window. */
.ws-pop-rail .ws-menu-panel {
  top: auto;
  right: 0;
  bottom: calc(100% + 10px);
}

/* The language dropdown needs more room than the rail is wide, so the reading
   settings panel opens to the right, over the content, instead of off screen. */
#settings-menu {
  min-width: 264px;
  left: 0;
  right: auto;
}

.ws-menu-head {
  padding: 6px 10px 9px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.ws-menu-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.ws-menu-mail {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-4);
  overflow-wrap: anywhere;
}

.ws-menu-item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  font: 600 14px/1.4 inherit;
  text-align: left;
  text-decoration: none;
  color: var(--ink-2);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.ws-menu-item:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.ws-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

/* The language dropdown stacks under its label: a select whose first option
   names the browser language is too wide to sit beside it. */
.ws-menu-row--lang {
  display: grid;
  gap: 8px;
}

.ws-menu-row--lang .sr-select,
.ws-menu-row--lang .sr-lang-custom {
  width: 100%;
  max-width: 240px;
}

.ws-menu-label {
  font-size: 13px;
  color: var(--ink-3);
}

.ws-menu-picks {
  display: flex;
  gap: 4px;
}

.ws-menu-pick {
  padding: 5px 10px;
  font: 600 12px/1.2 inherit;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.ws-menu-pick:hover {
  color: var(--ink);
}

.ws-menu-pick.is-on {
  color: var(--ink);
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

/* --------------------------------- the body -------------------------------- */

.ws-body {
  min-width: 0;
  padding: clamp(22px, 3vw, 38px) clamp(16px, 3vw, 34px) 90px;
}

.ws-hero,
.ws-intake,
.ws-items {
  max-width: 1080px;
  margin-inline: auto;
}

.ws-hero {
  margin-bottom: clamp(20px, 3vw, 30px);
}

.ws-hero-title {
  margin: 0;
  font-size: clamp(32px, 5.4vw, 54px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.ws-lede {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* The three ways in: a file, a paste, a link. */
.ws-intake {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.ws-intake-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 186px;
  padding: 20px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.ws-intake-card:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.ws-intake-card.is-active {
  background: var(--brand-tint);
  border-color: var(--brand);
}

.ws-intake-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.ws-intake-ico {
  width: 30px;
  height: 30px;
  color: var(--ink-2);
}

.ws-intake-pair {
  display: inline-flex;
  gap: 8px;
}

.ws-intake-pair .ws-intake-ico {
  width: 26px;
  height: 26px;
  padding: 4px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* The file-type chips are the icons a document has on a computer: a PDF is red, a
   Word file is blue, a text file is green. They are labels, not brand. */
.ws-chips {
  display: inline-flex;
  gap: 4px;
}

.ws-chip {
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  border-radius: 4px;
}

.ws-chip.is-pdf {
  background: #cf4b40;
}

.ws-chip.is-docx {
  background: #2f6fd0;
}

.ws-chip.is-txt {
  background: #2f8f5b;
}

.ws-intake-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ws-intake-copy {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* ------------------------------- recent items ------------------------------ */

.ws-recent-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.ws-recent-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ws-recent-count {
  font-size: 13px;
  color: var(--ink-4);
}

.ws-list {
  display: grid;
}

.ws-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.ws-row-lead {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 320px;
  min-width: 0;
}

.ws-row-ico {
  width: 22px;
  height: 22px;
  color: var(--brand-soft);
}

.ws-row-main {
  min-width: 0;
}

.ws-row-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ws-row-meta {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.ws-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-left: auto;
}

.ws-row-action {
  padding: 8px 11px;
  font: 600 13px/1 inherit;
  color: var(--ink-3);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.ws-row-action:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.ws-row-action.is-primary {
  color: var(--brand-soft);
}

.ws-row-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.ws-empty {
  margin: 0;
  padding: 26px;
  font-size: 15px;
  color: var(--ink-3);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* ---------------------------------- the gate -------------------------------- */

.ws-gate {
  max-width: 640px;
  margin: clamp(20px, 6vh, 60px) auto 0;
}

.ws-gate-card {
  display: grid;
  gap: 6px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ws-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.ws-gate-fine {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-4);
}

/* --------------------------------- reading --------------------------------- */

.ws-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding-block: 10px;
}

.ws-column {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding-block: clamp(20px, 4vw, 40px) clamp(48px, 8vw, 96px);
}

/* Reading hands the whole window to the text: the notebook list belongs to the library,
   and pushing the column left is what keeps the fixed panel beside a line instead of
   across it. */
body.ws-reading .ws-rail {
  display: none;
}

body.ws-reading .ws-app {
  grid-template-columns: minmax(0, 1fr);
}

body.ws-reading .ws-topbar {
  display: none;
}

body.ws-big-text .rd-doc {
  font-size: 19.5px;
}

.ws-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-3);
}

.ws-source-link {
  color: var(--brand-soft);
  overflow-wrap: anywhere;
}

.ws-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
}

.ws-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ws-summary-title {
  margin: 0;
  margin-right: auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-soft);
}

.ws-summary-headline {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ws-summary-text,
.ws-summary-ask {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.ws-summary-points {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.ws-summary-points li::marker {
  color: var(--brand);
}

.ws-summary-ask {
  color: var(--brand-soft);
}

/* --------------------------------- modals --------------------------------- */

.ws-modal-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.ws-modal-wide {
  width: min(720px, 100%);
}

.ws-modal-title {
  margin-right: auto;
  font-size: 17px;
  font-weight: 700;
}

.ws-modal-copy {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
}

.ws-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.ws-field {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ws-textarea {
  min-height: 220px;
  resize: vertical;
}

.ws-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ws-progress {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.ws-move {
  flex: 0 1 180px;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  font: 500 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink-2);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.ws-move:focus {
  border-color: var(--brand);
  outline: none;
}

.ws-delete:hover {
  color: var(--danger);
  border-color: var(--danger-line);
}

/* Narrow screens: the rail becomes a drawer the Library button opens, so nothing is
   taken out of the page and scrolling stays the browser's business. */
@media (max-width: 900px) {
  .ws-app {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-menu {
    display: inline-flex;
  }

  .ws-rail {
    display: none;
  }

  body.ws-side-open .ws-rail {
    display: grid;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 70;
    width: min(300px, 86vw);
    height: 100dvh;
    background: var(--canvas);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  }

  /* While reading there is no library to open in this column, and the read bar already
     carries "Back to library", so the toggle would be a button that does nothing. */
  body.ws-reading .ws-menu {
    display: none;
  }
}

@media (max-width: 760px) {
  .ws-intake {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-intake-card {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .ws-topbar {
    gap: 8px;
    padding-inline: 14px;
  }

  .ws-topbar-title {
    font-size: 15px;
  }

  .ws-pro {
    padding-inline: 10px;
  }

  .ws-pro-tag {
    display: none;
  }

  .ws-row-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .ws-modal-actions .btn {
    flex: 1 1 100%;
  }
}

/* The landing page's install steps grow taller as the nav wraps. */
@media (max-width: 900px) {
  .quickstart {
    /* The nav wraps on narrower screens, so the sticky header grows taller. */
    scroll-margin-top: 120px;
  }
}

@media (max-width: 640px) {
  .quickstart {
    scroll-margin-top: 190px;
  }
}
