/* TomFiction website. Colours and wording follow docs/brand.md: light only,
   white pages, one blue, flat colours, small coloured category bars.
   Type: Roboto. Gold is for Pro and nothing else. */

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --line-strong: #dadce0;
  --soft: #f1f3f4;
  --track: #f1f3f4;
  /* Brand green: logo, rings, bars, highlights. Never for text. */
  --brand: #1a73e8;
  /* Action green: every "do it" button and link. White text on it is 5.1:1. */
  --action: #1a73e8;
  --action-hover: #1765cc;
  --tint: #e8f0fe;
  --tint-line: #d2e3fc;
  --pro-col: #f8fafd;
  /* Stage tints, one per feature, from the category colours. */
  --t-spell: #f1f3f4;
  --t-write: #f1f3f4;
  --t-history: #f1f3f4;
  /* Pro gold: the PRO badge and the Get Pro chip only. */
  --pro-a: #1a73e8;
  --pro-b: #1a73e8;
  --pro-ink: #fff;
  --pro-grad: linear-gradient(135deg, var(--pro-a), var(--pro-b));
  --k-correctness: #d93025;
  --k-correctness-ink: #c5221f;
  --k-clarity: #1a73e8;
  --k-format: #9334e6;
  --shadow: none;
  --shadow-card: none;
  --shadow-ui: none;
  --shadow-big: none;
  --radius: 4px;
  --wrap: 1200px;
  --gutter: 24px;
  --nav-h: 68px;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
  line-height: 1.12;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

svg.i {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.d-block {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  z-index: 100;
  left: 12px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 700;
  color: var(--pro-ink);
  background: var(--action);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 12px;
}

.small {
  font-size: 13px;
}

.center {
  text-align: center;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row.between {
  justify-content: space-between;
}

.row.tight {
  gap: 6px;
}

.row.wrap {
  flex-wrap: wrap;
}

.fine {
  font-size: 14px;
  color: var(--muted);
}

.fine a {
  color: var(--action);
  font-weight: 600;
}

.logo {
  display: block;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
}

/* ---- PRO badge and Get Pro chip (Pro gold) ----------------------------- */

.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.07em;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--pro-ink);
  background: var(--pro-grad);
  box-shadow: inset 0 0 0 1px rgba(138, 90, 0, 0.16);
}

.pro-badge svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
}

.pro-badge.lg {
  gap: 4px;
  padding: 4px 9px 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.pro-badge.lg svg {
  width: 13px;
  height: 13px;
}

.get-pro {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  color: var(--pro-ink);
  background: var(--pro-grad);
  box-shadow: 0 1px 2px rgba(138, 90, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.get-pro svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.get-pro:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px transparent, inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg.i {
  width: 18px;
  height: 18px;
}

.btn.primary {
  color: var(--pro-ink);
  background: var(--action);
}

.btn.primary:hover {
  background: var(--action-hover);
}

.btn.outline {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line-strong);
}

.btn.outline:hover {
  border-color: var(--ink);
}

.btn.white {
  color: var(--action);
  background: var(--pro-ink);
}

.btn.white:hover {
  background: var(--tint);
}

.btn.ghost-white {
  color: var(--pro-ink);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn.ghost-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn.xl {
  min-height: 58px;
  padding: 0 30px;
  font-size: 18px;
}

.btn.sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.btn.block {
  width: 100%;
}

/* "Add to Chrome | It's free": the second half is lighter. */
.btn-sub {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  opacity: 0.9;
}

.btn-sub::before {
  content: "";
  width: 1px;
  height: 1.1em;
  background: currentColor;
  opacity: 0.45;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--action);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link svg.i {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.text-link:hover svg.i {
  transform: translateX(3px);
}

/* ---- Referral banner ---------------------------------------------------- */

.ref-banner {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 52px 12px 16px;
  color: var(--ink);
  background: var(--tint);
  border-bottom: 1px solid var(--tint-line);
  font-size: 15px;
  animation: drop 0.4s ease;
}

.ref-banner[hidden] {
  display: none;
}

.ref-banner .gift {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--pro-ink);
  background: var(--action);
  animation: wiggle 1.6s ease-in-out 2;
}

.ref-banner .gift svg {
  width: 18px;
  height: 18px;
}

.ref-banner .ref-help {
  color: var(--muted);
}

.ref-banner .ref-help b {
  color: var(--ink);
}

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 3px 12px;
  border-radius: 4px;
  background: var(--card);
  border: 1.5px dashed var(--brand);
}

.code-chip code {
  font: 800 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.code-chip .copy {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pro-ink);
  background: var(--action);
}

.code-chip .copy:hover {
  background: var(--action-hover);
}

.ref-banner .x {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
}

.ref-banner .x:hover {
  color: var(--ink);
  background: rgba(16, 24, 40, 0.06);
}

/* ---- Nav ---------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand .logo {
  width: 32px;
  height: 32px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu > li {
  position: relative;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.menu-link:hover,
.menu-link[aria-expanded="true"] {
  background: var(--soft);
}

.menu-link[aria-current="page"] {
  color: var(--action);
}

.menu-link svg.i {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.menu-link[aria-expanded="true"] svg.i {
  transform: rotate(180deg);
}

.mega {
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  z-index: 35;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 8px;
  width: 720px;
  padding: 12px;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-big);
  animation: rise 0.18s ease both;
}

.mega[hidden] {
  display: none;
}

.mega-head {
  grid-column: 1 / -1;
  padding: 8px 12px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mega-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  text-decoration: none;
}

.mega-item:hover {
  background: var(--soft);
}

.mega-item strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.mega-item span.d {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

.ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  color: var(--action);
  background: var(--tint);
}

.ico svg.i {
  width: 20px;
  height: 20px;
}

.ico.write {
  color: var(--k-clarity);
  background: var(--t-write);
}

.ico.history {
  color: var(--k-format);
  background: var(--t-history);
}

.mega-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-radius: 4px;
  background: var(--tint);
}

.mega-aside p {
  font-size: 14px;
  color: var(--muted);
}

.mega-aside strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-right .quiet {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav-right .quiet:hover {
  color: var(--action);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border-radius: 4px;
}

.menu-toggle:hover {
  background: var(--soft);
}

.menu-toggle svg.i {
  width: 24px;
  height: 24px;
}

.menu-toggle .close-i,
.menu-toggle[aria-expanded="true"] .open-i {
  display: none;
}

.menu-toggle[aria-expanded="true"] .close-i {
  display: block;
}

.mobile-menu {
  position: fixed;
  z-index: 29;
  inset: var(--nav-top, var(--nav-h)) 0 0;
  overflow-y: auto;
  padding: 12px 20px 32px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.mobile-menu .group {
  padding: 18px 4px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mobile-menu a:not(.btn) {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 4px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-menu .ico {
  width: 32px;
  height: 32px;
}

.mobile-menu .ico svg.i {
  width: 17px;
  height: 17px;
}

/* ---- Hero --------------------------------------------------------------- */

.hero {
  padding: 80px 0 24px;
  overflow: hidden;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(40px, 6.2vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  animation: rise 0.55s ease both;
}

/* Our twist on the underline a checker draws: green means caught. */
.hl {
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: none;
}

.lede {
  max-width: 660px;
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  animation: rise 0.55s 0.06s ease both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  animation: rise 0.55s 0.12s ease both;
}

.hero .fine {
  margin-top: 16px;
  animation: rise 0.55s 0.16s ease both;
}

/* Feature cards: a row you can scroll sideways. */

.carousel {
  position: relative;
  margin-top: 64px;
  animation: rise 0.7s 0.2s ease both;
}

.fcards {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 6px max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))) 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.fcards::-webkit-scrollbar {
  display: none;
}

/* The three highlights fit side by side on wide screens: no scrolling, no arrows. */
@media (min-width: 900px) {
  .fcards.three {
    justify-content: center;
    overflow: visible;
  }
  .fcards.three > li {
    flex: 0 1 340px;
  }
  .carousel:has(.fcards.three) .carousel-nav {
    display: none;
  }
}

.fcards > li {
  flex: 0 0 300px;
  scroll-snap-align: start;
}

.fcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fcard:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.fcard-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 196px;
  padding: 18px;
  background: var(--t, var(--soft));
  overflow: hidden;
}

.fcard-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 22px;
}

.fcard-body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
}

.fcard-body p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.t-spell {
  --t: var(--t-spell);
}
.t-write {
  --t: var(--t-write);
}
.t-history {
  --t: var(--t-history);
}

.carousel-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.round-btn:hover:not(:disabled) {
  border-color: var(--ink);
}

.round-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.round-btn svg.i {
  width: 20px;
  height: 20px;
}

/* Mini mock-ups on the feature cards */

.mini {
  width: 100%;
  max-width: 236px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 12.5px;
  line-height: 1.4;
  background: var(--card);
  box-shadow: var(--shadow-ui);
}

.mini .t {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.mini del {
  color: var(--k-correctness-ink);
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pro-ink);
  background: var(--action);
}

.mini-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
}

.mini-bars span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-bars span::after {
  content: "";
  height: 3px;
  border-radius: 4px;
  background: var(--k);
}

.mini-gap {
  margin-top: 10px;
}

.mini-q {
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--soft);
  font-weight: 600;
}

.mini-a {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1.5px solid var(--k-clarity);
  color: var(--ink);
}

.mini-pages {
  display: flex;
  gap: 12px;
}

.mini-page {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 92px;
  height: 124px;
  padding: 14px 12px;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow-ui);
}

.mini-page i {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: var(--track);
}

.mini-page i.k {
  background: color-mix(in srgb, var(--k) 45%, #fff);
}

.mini-page b {
  align-self: center;
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Sections ----------------------------------------------------------- */

.section {
  padding: 112px 0;
}

.section.tight-top {
  padding-top: 40px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 48px;
}

.section-head.center {
  align-items: center;
  text-align: center;
}

.section h2,
.h2 {
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.sub {
  max-width: 640px;
  font-size: 19px;
  color: var(--muted);
}

.band-soft {
  background: var(--soft);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--action);
}

.kicker svg.i {
  width: 18px;
  height: 18px;
}

/* ---- The live demo window ----------------------------------------------- */

.demo-section {
  padding-top: 96px;
}

.demo-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.demo-hint {
  position: absolute;
  z-index: 3;
  top: -34px;
  right: 110px;
  font-size: 15px;
  font-weight: 700;
  color: var(--action);
  animation: bounce 1.6s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.demo-hint.gone {
  opacity: 0;
  pointer-events: none;
}

.window {
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-big);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.lights {
  display: flex;
  gap: 6px;
}

.lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #dadce0;
}

.doc-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-icon {
  flex-shrink: 0;
  width: 14px;
  height: 18px;
  border-radius: 4px;
  background: #4285f4;
  box-shadow: inset 0 -12px 0 -8px #fff, inset 0 -6px 0 -4px #fff;
}

.docs-toolbar {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.docs-toolbar i {
  width: 22px;
  height: 10px;
  border-radius: 4px;
  background: var(--track);
}

.docs-toolbar i.w {
  width: 54px;
}

.window-body {
  display: flex;
  height: 620px;
}

.canvas {
  flex: 1;
  min-width: 0;
  padding: 28px;
  overflow: auto;
  background: var(--soft);
}

.paper {
  max-width: 560px;
  margin: 0 auto;
  padding: 52px 56px 64px;
  min-height: 100%;
  border-radius: 4px;
  background: #fff;
  color: #202124;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1), 0 6px 24px rgba(16, 24, 40, 0.05);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.paper-title {
  margin-bottom: 14px;
  font-weight: 700;
}

.paper-p {
  margin-bottom: 14px;
}

.paper.fmt {
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
}

.paper.fmt .paper-title {
  text-align: center;
  font-weight: 400;
}

.paper.fmt-apa .paper-title {
  font-weight: 700;
}

.paper.fmt .paper-p {
  text-indent: 2em;
}

.paper.fmt-basic {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.paper.fmt-basic .paper-title {
  text-align: left;
  font-weight: 700;
}

.paper-heading {
  margin-bottom: 14px;
}

.paper-heading[hidden],
.paper-cited[hidden] {
  display: none;
}

.paper-cited {
  margin-top: 22px;
}

.paper-cited-title {
  margin-bottom: 8px;
  text-align: center;
}

.paper-cited-entry {
  margin-bottom: 8px;
  padding-left: 2em;
  text-indent: -2em;
  overflow-wrap: anywhere;
}

/* Suggestions, underlined in their category's colour like a spell-checker. */
mark.err {
  color: inherit;
  padding: 0 1px;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  border-bottom: 2.5px solid var(--k);
  transition: background 0.15s ease;
}

mark.err:hover,
mark.err:focus-visible {
  background: color-mix(in srgb, var(--k) 12%, #fff);
}

.fixed-word {
  border-radius: 4px;
}

.fixed-word.just {
  animation: fixed-flash 1.4s ease;
}

@keyframes fixed-flash {
  0% {
    background: #1a73e8;
    box-shadow: 0 0 0 3px #1a73e8;
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 3px transparent;
  }
}

/* ---- The mini side panel ------------------------------------------------ */

.panel {
  position: relative;
  flex: 0 0 380px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--card);
  border-left: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
  container-type: inline-size;
}

.panel-head {
  padding: 12px 14px 0;
  border-bottom: 1px solid var(--line);
}

.word-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tabs {
  display: flex;
  margin: 10px -14px 0;
  padding: 0 8px;
}

.tabs button {
  position: relative;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 4px 11px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

.tabs button::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 3px;
  border-radius: 4px;
  background: transparent;
  transition: background 0.2s ease, left 0.2s ease, right 0.2s ease;
}

.tabs button:hover,
.tabs button[aria-selected="true"] {
  color: var(--ink);
}

.tabs button[aria-selected="true"] {
  font-weight: 700;
}

.tabs button[aria-selected="true"]::after {
  left: 8%;
  right: 8%;
  background: var(--brand);
}

.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--k-correctness-ink);
}

.badge[hidden] {
  display: none;
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px 80px;
}

.pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  animation: fade 0.25s ease;
}

.pane[hidden] {
  display: none;
}

.pane h4 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  background: var(--soft);
}

.pill-accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  color: var(--pro-ink);
  background: var(--action);
  transition: transform 0.12s ease, background 0.12s ease;
}

.pill-accept:hover {
  background: var(--action-hover);
}

.pill-accept:active {
  transform: scale(0.95);
}

.cat-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 2px;
}

.cat-tab {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 4px 0 0;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s ease;
}

.cat-tab b {
  font-weight: 800;
}

.cat-bar {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: var(--k);
  transition: opacity 0.15s ease;
}

.cat-tab.dim {
  color: var(--muted);
}

.cat-tab.dim .cat-bar {
  opacity: 0.3;
}

.cat-tab:disabled {
  cursor: default;
  color: var(--muted);
}

.cat-tab:disabled .cat-bar {
  background: var(--track);
}

.k-correctness {
  --k: var(--k-correctness);
}
.k-clarity {
  --k: var(--k-clarity);
}
.k-format {
  --k: var(--k-format);
}

.kdot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--k, var(--brand));
}

.fixes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fix {
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.15s ease, background 0.15s ease;
}

.fix.collapsed {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

.fix.collapsed:hover {
  border-color: var(--line-strong);
  background: var(--soft);
}

.fix-word {
  font-weight: 700;
}

.fix.collapsed .muted {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fix.open {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  animation: rise 0.25s ease both;
}

.fix.leaving {
  opacity: 0;
  transform: translateX(24px);
}

.fix-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
}

.why {
  margin-top: -4px;
  font-size: 13px;
  color: var(--muted);
}

.diff {
  font-size: 14px;
  word-break: break-word;
}

.diff del {
  color: var(--k-correctness-ink);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.fix-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-accept {
  padding: 6px 14px;
  font-size: 14px;
}

.pill-accept.small {
  align-self: flex-start;
  padding: 6px 14px;
  font-size: 13px;
}

.pill-accept.wide {
  width: 100%;
  padding: 10px 14px;
}

.pill-accept.hint {
  animation: hint 1.6s ease-in-out infinite;
}

.dismiss {
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.dismiss:hover {
  color: var(--ink);
  background: var(--soft);
}

.all-clear {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  animation: rise 0.35s ease;
}

.big-check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 900;
  color: var(--pro-ink);
  background: var(--brand);
  animation: pop 0.5s ease;
}

.all-clear > div {
  flex: 1;
  min-width: 150px;
}

.chip {
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--action);
  background: var(--tint);
}

.chip:hover {
  background: var(--tint-line);
}

.link {
  align-self: flex-start;
  color: var(--action);
  font-weight: 600;
  font-size: 13px;
  padding: 4px 0;
}

.link:hover {
  text-decoration: underline;
}

/* Toasts */

.toasts {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: 4px;
  color: var(--bg);
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.2);
  font-size: 13px;
  font-weight: 600;
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast.out {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast button {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 800;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toast button:hover {
  background: color-mix(in srgb, var(--bg) 16%, transparent);
}

/* Outliner: steps, the questions form, the outline */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: var(--muted);
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  border-radius: 4px;
  background: var(--line);
  transition: background 0.4s ease;
}

.steps li.done:not(:last-child)::after {
  background: var(--brand);
}

.step-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  background: var(--card);
  border: 1.5px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.steps li {
  font-size: 11px;
}

.steps li.now {
  color: var(--ink);
}

.steps li.now .step-icon {
  border: 2.5px solid var(--brand);
  animation: pop 0.4s ease;
}

.steps li.done .step-icon {
  color: var(--pro-ink);
  background: var(--brand);
  border-color: var(--brand);
}

.guess {
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--tint);
}

.qform {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qform[hidden] {
  display: none;
}

.q {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.q > span {
  display: flex;
  gap: 8px;
}

.q b {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--action);
  background: var(--tint);
}

.q textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  font: 400 13.5px/1.45 var(--font);
  color: var(--ink);
  background: var(--card);
}

.q textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.q textarea[readonly] {
  background: var(--soft);
}

.plan-out {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  animation: rise 0.35s ease both;
}

.plan-out[hidden] {
  display: none;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.plan-list li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  counter-increment: s;
}

.plan-list li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  border: 1.5px solid var(--line-strong);
}

.plan-list li span:not(.from) {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: var(--soft);
}

.pill[hidden] {
  display: none;
}

.mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.meter {
  display: block;
  height: 6px;
  border-radius: 4px;
  background: var(--track);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--brand);
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- Feature sections: copy on the left, a demo on the right ----------- */

.feature-row {
  padding: 72px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 72px;
  align-items: center;
}

.feature-copy h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.feature-copy > p {
  max-width: 470px;
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
}

.feature-copy .text-link {
  margin-top: 22px;
}

.ticks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  display: flex;
  gap: 10px;
  font-size: 16px;
}

.ticks svg.i {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--brand);
}

/* The stage a demo plays on. */
.stage {
  position: relative;
  padding: 44px;
  border-radius: 4px;
  background: var(--t, var(--soft));
  min-width: 0;
}

.replay {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
}

.replay:hover {
  transform: rotate(-30deg);
}

.replay svg.i {
  width: 18px;
  height: 18px;
}

.ui-card {
  min-width: 0;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-ui);
  font-size: 14px;
  line-height: 1.45;
}

/* Two cards, one over the other. */
.duo {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.duo > .back {
  grid-column: 1 / 10;
  grid-row: 1;
}

.duo > .front {
  position: relative;
  z-index: 1;
  grid-column: 5 / 13;
  grid-row: 1;
  align-self: start;
  margin-top: 132px;
}

.mock-doc {
  padding: 30px 32px 40px;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 16px;
  line-height: 1.9;
  color: #202124;
}

.mock-doc .title {
  margin-bottom: 8px;
  text-align: center;
  font-weight: 700;
}

.mock-doc p + p {
  margin-top: 6px;
}

.u {
  border-bottom: 2.5px solid var(--k);
}

.mock-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-panel .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mock-panel .head h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}

.mp-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.mp-cats span {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-cats span::after {
  content: "";
  height: 4px;
  border-radius: 4px;
  background: var(--k);
}

.mp-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--card);
}

.mp-card .why {
  margin: 0;
  font-size: 12.5px;
}

.mp-done {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.mp-done .big-check {
  width: 38px;
  height: 38px;
  font-size: 18px;
  animation: none;
}

.ok-text {
  color: var(--action);
  font-weight: 700;
}

/* Stacks: things that swap places share one grid cell. */
.stack {
  display: grid;
}

.stack > * {
  grid-area: 1 / 1;
}

.swap {
  display: inline-grid;
}

.swap > * {
  grid-area: 1 / 1;
}

/* Outliner animation */

.mock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.mock-form .fq {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 13.5px;
}

.mock-form .fq > span:first-child {
  display: flex;
  gap: 8px;
}

.mock-form .fq b {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--action);
  background: var(--tint);
}

.fa {
  display: block;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
}

.fa > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.fq.dim {
  color: var(--muted);
}

.fq.dim .fa {
  border-style: dashed;
}

.mock-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.mock-plan .plan-list li {
  font-size: 13.5px;
}

.from {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--k-clarity);
  background: var(--t-write);
}

.yours {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--action);
  background: var(--tint);
}

.yours svg.i {
  width: 16px;
  height: 16px;
}

.added {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--action);
}

/* History demo: the before/after pages */

.hist {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hist-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
}

.hist-bar strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fake-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  background: var(--card);
}

.fake-btn svg.i {
  width: 14px;
  height: 14px;
}

.fake-btn.solid {
  color: var(--pro-ink);
  border-color: var(--action);
  background: var(--action);
}

/* Sources: a citation written from a link. */
.cite-demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 460px;
  margin: 0 auto;
  padding: 22px;
}

.cite-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 4px;
  background: var(--soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.cite-seg span {
  padding: 4px 14px;
  border-radius: 4px;
}

.cite-seg .on {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

.cite-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
}

.cite-link svg.i {
  width: 16px;
  height: 16px;
}

.cite-out {
  padding: 14px 16px 14px calc(16px + 2em);
  text-indent: -2em;
  border-radius: 4px;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--soft);
}

.ba {
  position: relative;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
}

.ba:has(.ba-range:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent);
  outline-offset: 6px;
}

.page {
  background: #fff;
  color: #202124;
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-ui);
  padding: 9% 10% 10%;
  font-size: clamp(11px, 1.35vw, 15px);
}

.after-page {
  position: relative;
  font-family: "Times New Roman", Times, Georgia, serif;
  line-height: 2;
  clip-path: inset(0 0 0 var(--pos));
}

.before-page {
  position: absolute;
  inset: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(10px, 1.25vw, 14px);
  line-height: 1.45;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.page .pp {
  position: relative;
  margin: 0;
}

.before-page .pp {
  margin-bottom: 0.9em;
}

.page .pp.center {
  text-align: center;
}

.page .pp.indent {
  text-indent: 2.2em;
}

/* Formatting changed this paragraph: a bar in the margin. */
.page .pp.restyled::before {
  content: "";
  position: absolute;
  left: -1.6em;
  top: 0.4em;
  bottom: 0.4em;
  width: 0.35em;
  border-radius: 4px;
  background: var(--k-format);
}

.page mark {
  color: inherit;
  border-radius: 4px;
  padding: 0 2px;
  background: color-mix(in srgb, var(--k) 14%, #fff);
  box-shadow: inset 0 -2.5px 0 var(--k);
}

.ba-handle {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: var(--brand);
  pointer-events: none;
}

.ba-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: var(--pro-ink);
  background: var(--action);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.2);
}

.ba-handle svg.i {
  width: 20px;
  height: 20px;
}

.ba-label {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--ink);
  pointer-events: none;
}

.ba-label.left {
  left: 12px;
}

.ba-label.right {
  right: 12px;
  background: var(--action);
}

.ba-range {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 14px;
  font-weight: 600;
}

.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend .kdot {
  width: 10px;
  height: 10px;
}

.legend .k-words {
  --k: var(--brand);
}

/* ---- Honest by design: a ring of promises ------------------------------- */

.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.trust-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: flex;
  gap: 14px;
}

.trust-list strong {
  display: block;
  font-size: 17px;
}

.trust-list span {
  color: var(--muted);
  font-size: 16px;
}

.trust-list .ico {
  width: 40px;
  height: 40px;
}

.orbit {
  --size: 460px;
  --r: 178px;
  --dot: 100px;
  position: relative;
  width: min(100%, var(--size));
  aspect-ratio: 1;
  margin: 0 auto;
}

.orbit::before {
  content: "";
  position: absolute;
  inset: calc(50% - var(--r));
  border-radius: 50%;
  border: 2px dashed var(--tint-line);
}

.orbit .core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--tint);
}

.orbit .core svg {
  width: 112px;
  height: 112px;
}

.orbit .sat {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: var(--dot);
  height: var(--dot);
  margin: calc(var(--dot) / -2) 0 0 calc(var(--dot) / -2);
  padding: 8px;
  border-radius: 50%;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-ui);
  transform: rotate(var(--a)) translate(var(--r)) rotate(calc(-1 * var(--a)));
}

.orbit .sat svg.i {
  width: 22px;
  height: 22px;
  color: var(--action);
}

.orbit .sat .n {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--action);
}

/* ---- Works where you write ---------------------------------------------- */

.where-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.where-card {
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}

.where-art {
  display: grid;
  place-items: center;
  height: 190px;
  padding: 20px;
  background: var(--soft);
}

.where-body {
  display: flex;
  gap: 14px;
  padding: 20px 22px 24px;
}

.where-body .num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: var(--pro-ink);
  background: var(--action);
}

.where-body h3 {
  font-size: 18px;
  font-weight: 700;
}

.where-body p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
}

.where-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  text-align: center;
}

.chrome-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--pro-ink);
  background: var(--action);
  box-shadow: var(--shadow-card);
}

.chrome-btn .logo {
  width: 22px;
  height: 22px;
}

.doc-mini {
  position: relative;
  width: 170px;
  height: 150px;
  padding: 18px 16px;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow-ui);
}

.doc-mini i {
  display: block;
  height: 6px;
  margin-bottom: 9px;
  border-radius: 4px;
  background: var(--track);
}

.doc-mini i:nth-child(1) {
  width: 55%;
  margin: 0 auto 14px;
  background: var(--line-strong);
}

.doc-mini i:nth-child(3n) {
  width: 78%;
}

.t-pill {
  position: absolute;
  right: -18px;
  bottom: -14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.t-pill .logo {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.t-pill .t-logo {
  position: relative;
}

.t-pill .n {
  position: absolute;
  top: -6px;
  right: -8px;
  border: 2px solid #fff;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
  background: var(--k-correctness-ink);
}

.t-pill .sc {
  color: var(--action);
}

/* ---- Plans (teaser on home, full on plans.html) ------------------------- */

.plan-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 920px;
  margin: 44px auto 0;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line);
}

.plan-col {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 32px 36px;
}

.plan-col + .plan-col {
  border-left: 1px solid var(--line);
}

.plan-col.pro {
  margin: -1px -1px -1px 0;
  border-radius: 4px;
  background: var(--pro-col);
  border: 2px solid var(--action);
}

.plan-tab {
  position: absolute;
  bottom: 100%;
  left: -2px;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pro-ink);
  background: var(--action);
}

.plan-tab svg.i {
  width: 16px;
  height: 16px;
}

.aud {
  font-size: 14px;
  font-weight: 600;
  color: var(--action);
}

.plan-col h3,
.plan-col .h3-like {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 30px;
  font-weight: 800;
}

.plan-desc {
  margin-top: 8px;
  min-height: 3.2em;
  font-size: 16px;
  color: var(--muted);
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 22px;
}

.price b {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.price .cur {
  font-size: 15px;
  font-weight: 700;
}

.price-note {
  margin-top: 6px;
  min-height: 2.8em;
  font-size: 14px;
  color: var(--muted);
}

.plan-col .btn {
  margin-top: 20px;
}

.plan-fine {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 10px;
  font-size: 15.5px;
  line-height: 1.45;
}

.checks li > svg.i {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--action);
}

.checks small {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
}

.plans-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* ---- Referral band (full-width green) ------------------------------------ */

.band {
  padding: 104px 0;
  color: var(--pro-ink);
  background: var(--action);
}

.band .section-head .sub {
  color: var(--pro-ink);
}

.band .eyebrow-w {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--pro-ink);
}

.band .eyebrow-w svg.i {
  width: 18px;
  height: 18px;
}

.band .cta-row {
  margin-top: 4px;
  animation: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  border-radius: 4px;
  color: var(--ink);
  background: var(--card);
}

.metric .who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.metric .who svg.i {
  width: 18px;
  height: 18px;
  color: var(--action);
}

.metric .big {
  margin-top: 6px;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric p {
  font-size: 15.5px;
  color: var(--muted);
}

.band-fine {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--pro-ink);
}

/* ---- FAQ ------------------------------------------------------------------ */

.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}

.faq details {
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq details[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary svg.i {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq details[open] summary svg.i {
  transform: rotate(180deg);
}

.faq .ans {
  padding: 0 22px 20px;
  color: var(--muted);
}

.faq .ans p + p {
  margin-top: 10px;
}

.faq .ans a {
  color: var(--action);
  font-weight: 600;
}

.faq-more {
  margin-top: 28px;
  text-align: center;
}

/* ---- Final CTA ----------------------------------------------------------- */

.final {
  padding: 112px 0;
}

.final-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.final h2 {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.final p.sub {
  margin-top: 18px;
}

.final .cta-row {
  justify-content: flex-start;
  animation: none;
}

.final .fine {
  margin-top: 16px;
}

.final-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  border-radius: 4px;
  background: var(--tint);
}

.final-art .tom {
  width: 168px;
  height: 168px;
}

.say {
  position: absolute;
  top: 44px;
  right: 36px;
  max-width: 230px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.final-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.final-center .cta-row {
  justify-content: center;
}

/* ---- Footer -------------------------------------------------------------- */

.footer {
  padding: 72px 0 0;
  background: var(--soft);
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.foot-brand p {
  max-width: 260px;
  margin: 14px 0 20px;
  font-size: 15px;
  color: var(--muted);
}

.foot-col h2 {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.foot-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-col a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
}

.foot-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.foot-bottom .brand {
  font-size: 17px;
  color: var(--ink);
}

.foot-bottom .brand .logo {
  width: 26px;
  height: 26px;
}

/* ---- Plans page ----------------------------------------------------------- */

.plans-hero {
  padding: 80px 0 24px;
  text-align: center;
}

.plans-hero h1 {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.plans-hero .lede {
  margin: 20px auto 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.facts svg.i {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.plans-page .plan-grid {
  margin-top: 72px;
}

.payer {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 920px;
  margin: 28px auto 0;
  padding: 20px 24px;
  border-radius: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.payer .ico {
  color: var(--ink);
  background: var(--card);
}

.payer h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.payer p {
  margin-top: 4px;
  font-size: 15.5px;
  color: var(--muted);
}

.payer b {
  color: var(--ink);
}

/* Compare table */

.compare-wrap {
  max-width: 1000px;
  margin: 0 auto;
}

.compare-wrap h2 {
  margin-bottom: 28px;
}

.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15.5px;
}

.compare col.c-feat {
  width: 50%;
}

.compare col.c-plan {
  width: 25%;
}

.compare thead th {
  position: sticky;
  top: var(--nav-h);
  z-index: 2;
  padding: 18px 12px 16px;
  text-align: center;
  vertical-align: bottom;
  background: var(--card);
  border-bottom: 1px solid var(--line-strong);
}

.compare thead th:first-child {
  text-align: left;
}

.compare thead th.pro {
  background: var(--pro-col);
  box-shadow: inset 0 4px 0 var(--action);
  border-radius: 4px;
}

.compare .ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.compare .ph strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.compare .ph span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.compare .ph .btn {
  margin-top: 8px;
}

.compare tbody th,
.compare tbody td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
}

.compare tbody th {
  text-align: left;
  font-weight: 500;
}

.compare tbody td {
  text-align: center;
  font-weight: 600;
}

.compare td.pro {
  background: var(--pro-col);
}

.compare tr.group th {
  padding-top: 34px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border-bottom-color: var(--line-strong);
}

.compare tr.group th > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compare tr.group td {
  border-bottom-color: var(--line-strong);
}

.compare tbody:last-of-type tr:last-child td.pro {
  border-radius: 4px;
}

.compare tr.group .ico {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.compare tr.group .ico svg.i {
  width: 17px;
  height: 17px;
}

.compare tbody th small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.compare .yes svg.i {
  width: 22px;
  height: 22px;
  color: var(--action);
  vertical-align: middle;
}

.compare .no {
  color: #80868b;
  font-weight: 400;
}

.compare small {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.table-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

/* Free Pro week and referrals on the plans page */

.how-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.how-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line);
}

.how-card h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.how-card > p {
  color: var(--muted);
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: h;
}

.how-steps li {
  display: flex;
  gap: 14px;
  counter-increment: h;
}

.how-steps li::before {
  content: counter(h);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: var(--action);
  background: var(--tint);
}

.ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ladder li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: 4px;
  text-align: center;
  background: var(--tint);
}

.ladder b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ladder span {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---- Feature demos that play once when seen ------------------------------
   Base styles are the END of each demo, so with reduced motion (no
   animation) visitors see the finished result. Each animation runs from its
   start state, held paused at its first frame until the stage plays. */

.a-in,
.a-out,
.a-type,
.a-tap,
.a-fill {
  animation-duration: 0.45s;
  animation-delay: var(--d, 0s);
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-play-state: paused;
}

.a-in {
  animation-name: a-in;
}

.a-out {
  animation-name: a-out;
  animation-duration: 0.3s;
  opacity: 0;
  visibility: hidden;
}

.a-type {
  animation-name: a-type;
  animation-duration: var(--t, 1.2s);
  animation-timing-function: steps(28, end);
}

.a-tap {
  animation-name: a-tap;
  animation-duration: 0.5s;
  animation-fill-mode: none;
}

.a-fill {
  animation-name: a-fill;
  animation-duration: 1.2s;
}

.stage.play .a-in,
.stage.play .a-out,
.stage.play .a-type,
.stage.play .a-tap,
.stage.play .a-fill {
  animation-play-state: running;
}

.stage.reset * {
  animation: none !important;
}

@keyframes a-in {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
  }
  1% {
    visibility: visible;
  }
}

@keyframes a-out {
  from {
    opacity: 1;
    visibility: visible;
  }
  99% {
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes a-type {
  from {
    clip-path: inset(0 100% 0 0);
  }
}

@keyframes a-tap {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent);
  }
  35% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 12px transparent;
  }
}

@keyframes a-fill {
  from {
    width: 0;
  }
}

/* ---- Confetti and motion --------------------------------------------------- */

.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes drop {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: none;
  }
}

@keyframes pop {
  0% {
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-12deg);
  }
  40% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(-6deg);
  }
  80% {
    transform: rotate(0);
  }
}

@keyframes hint {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent);
  }
  60% {
    box-shadow: 0 0 0 9px transparent;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .replay,
  .demo-hint {
    display: none;
  }
}

/* ---- Smaller screens ------------------------------------------------------ */

@media (max-width: 1080px) {
  .foot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .nav-inner > nav,
  .nav-right .quiet {
    display: none;
  }
  .nav-inner {
    gap: 12px;
  }
  .nav-right {
    gap: 10px;
  }
  .menu-toggle {
    display: grid;
  }
  .feature-grid,
  .trust-grid,
  .final-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .feature-row {
    padding: 56px 0;
  }
  .feature-copy > p {
    max-width: 640px;
  }
  .where-grid,
  .metrics {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
  .how-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .window-body {
    flex-direction: column;
    height: auto;
  }
  .canvas {
    padding: 14px;
  }
  .paper {
    padding: 28px 24px 30px;
    font-size: 15px;
    line-height: 1.75;
  }
  .panel {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .panel-body {
    overflow: visible;
    padding-bottom: 76px;
  }
  .demo-hint {
    position: static;
    margin-bottom: 10px;
    text-align: center;
  }
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
    max-width: 520px;
    border: none;
    background: none;
  }
  .plan-col {
    border-radius: 4px;
    background: var(--card);
    border: 1px solid var(--line);
  }
  .plan-col + .plan-col {
    border-left: 1px solid var(--line);
  }
  .plan-col.pro {
    margin: 0;
    border-radius: 4px;
    border: 2px solid var(--action);
  }
  .plan-desc,
  .price-note {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 20px;
    --nav-h: 62px;
  }
  body {
    font-size: 16px;
  }
  .brand {
    gap: 8px;
    font-size: 18px;
  }
  .brand .logo {
    width: 28px;
    height: 28px;
  }
  .nav-right {
    gap: 10px;
  }
  /* "Email me when it's ready" is long for a phone nav: let it take two lines. */
  .nav-right .btn {
    min-height: 38px;
    max-width: 124px;
    padding: 2px 10px;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }
  .nav-right .btn .btn-sub {
    display: none;
  }
  .hero {
    padding-top: 48px;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .btn.xl {
    min-height: 54px;
    padding: 0 20px;
    font-size: 17px;
  }
  .carousel {
    margin-top: 44px;
  }
  .fcards > li {
    flex-basis: 78%;
  }
  .section,
  .final {
    padding: 72px 0;
  }
  .band {
    padding: 72px 0;
  }
  .sub {
    font-size: 17px;
  }
  .stage {
    padding: 20px 14px;
    border-radius: 4px;
  }
  .replay {
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
  }
  .duo > .back {
    grid-column: 1 / 13;
  }
  .duo > .front {
    grid-column: 2 / 13;
    grid-row: 2;
    margin-top: -36px;
  }
  .mock-doc {
    padding: 20px 18px 44px;
    font-size: 14.5px;
  }
  .mock-form {
    padding: 16px 16px 48px;
  }
  .orbit {
    --size: 340px;
    --r: 128px;
    --dot: 80px;
  }
  .orbit .core {
    width: 110px;
    height: 110px;
  }
  .orbit .core svg {
    width: 80px;
    height: 80px;
  }
  .orbit .sat {
    font-size: 10.5px;
  }
  .orbit .sat svg.i {
    width: 18px;
    height: 18px;
  }
  .orbit .sat .n {
    font-size: 17px;
  }
  .final .cta-row {
    align-items: stretch;
  }
  .final-art {
    min-height: 260px;
  }
  .final-art .tom {
    width: 120px;
    height: 120px;
  }
  .say {
    top: 20px;
    right: 16px;
    max-width: 190px;
    font-size: 14px;
  }
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .plan-col {
    padding: 28px 22px 30px;
  }
  .compare {
    font-size: 14px;
  }
  .compare col.c-feat {
    width: 46%;
  }
  .compare col.c-plan {
    width: 27%;
  }
  .compare thead th,
  .compare tbody th,
  .compare tbody td {
    padding-left: 8px;
    padding-right: 8px;
  }
  .compare .ph strong {
    font-size: 16px;
    flex-direction: column;
    gap: 4px;
  }
  .compare .ph .btn {
    display: none;
  }
  .compare tr.group th {
    font-size: 16px;
  }
  .compare tr.group .ico {
    display: none;
  }
  .how-card {
    padding: 26px 22px;
  }
  .ladder b {
    font-size: 19px;
  }
  .payer {
    padding: 18px;
  }
  .ref-banner {
    justify-content: flex-start;
    font-size: 14px;
  }
  .ref-banner .gift {
    display: none;
  }
  .window-bar .muted {
    display: none;
  }
  .t-pill {
    right: -8px;
  }
}

/* ---- Privacy and terms ---------------------------------------------------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  font-size: 17px;
  line-height: 1.65;
}

.legal h1 {
  margin-top: 10px;
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.legal .updated {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.legal h2 {
  margin-top: 44px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal h3 {
  margin-top: 24px;
  font-size: 18px;
  font-weight: 700;
}

.legal p,
.legal ul {
  margin-top: 12px;
}

.legal ul {
  padding-left: 22px;
}

.legal li + li {
  margin-top: 8px;
}

.legal a {
  font-weight: 600;
  color: var(--action);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-short {
  margin-top: 32px;
  padding: 4px 28px 24px;
  border: 1px solid var(--tint-line);
  border-radius: 4px;
  background: var(--tint);
}

.legal-short h2 {
  margin-top: 20px;
  font-size: 20px;
}

.foot-legal {
  display: flex;
  gap: 18px;
  margin: 0;
}

.foot-legal a {
  font-size: 14px;
  color: var(--muted);
}

.foot-legal a:hover {
  color: var(--ink);
}

/* After paying: /thanks */
.thanks {
  text-align: left;
}

.thanks .tom {
  display: block;
  margin-bottom: 8px;
}

.thanks .lede {
  font-size: 20px;
}

.thanks ol {
  padding-left: 22px;
}

.thanks li + li {
  margin-top: 8px;
}

/* ---- Positioning pass: hero category line, three plans, guide pages. Tokens only. ---- */
.mock-doc {
  background: #fff; /* Mock paper: white in both themes. */
}

.eyebrow-line {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--action);
}

.ticks a {
  color: var(--action);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.plan-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1120px;
}

.plan-grid.three .plan-col {
  padding: 28px 22px 30px;
}

.plan-grid.three .price b {
  font-size: 40px;
}

.buy-terms {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.buy-terms li + li {
  margin-top: 2px;
}

.guide {
  font-size: 18px;
  line-height: 1.55;
}

.guide.wide {
  max-width: 1120px;
}

.guide.wide > p,
.guide.wide > ul,
.guide.wide > h2,
.guide.wide > .guide-cta {
  max-width: 720px;
}

.guide .guide-steps,
.guide .checklist {
  margin-top: 12px;
  padding-left: 26px;
}

.guide .guide-steps li + li,
.guide .checklist li + li {
  margin-top: 10px;
}

.guide .note {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--tint-line);
  border-radius: 4px;
  background: var(--tint);
  font-size: 16px;
}

.guide-cta {
  margin-top: 44px;
  padding: 4px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.guide-cta h2 {
  margin-top: 18px;
  font-size: 22px;
}

.guide-cta .cta-row {
  justify-content: flex-start;
  margin-top: 14px;
}

.guide-cta .btn {
  text-decoration: none;
}

.guide-cta .btn.primary {
  color: var(--pro-ink);
}

.guide-cta .btn.outline {
  color: var(--ink);
}

.guide .never {
  padding-left: 22px;
}

.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.guide .door {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
}

.guide .door:hover {
  border-color: var(--action);
}

.guide .door strong {
  color: var(--action);
}

.guide .door span {
  font-size: 16px;
  color: var(--muted);
}

.facts-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.facts-list > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.facts-list dt {
  font-weight: 700;
}

.rules-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.4;
}

.rules-table th,
.rules-table td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.rules-table thead th {
  background: var(--soft);
  font-weight: 700;
}

.rules-table tbody th a {
  font-weight: 700;
}

.table-source {
  font-size: 16px;
}

@media (max-width: 960px) {
  .plan-grid.three {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
    max-width: 520px;
    border: none;
    background: none;
  }
  .plan-grid.three .plan-col + .plan-col:not(.pro) {
    border-left: 1px solid var(--line);
  }
  .plan-grid.three .plan-col {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--card);
  }
  .plan-grid.three .plan-col.pro {
    margin: 0;
    border: 2px solid var(--action);
    background: var(--pro-col);
  }
  .plan-grid.three .plan-desc,
  .plan-grid.three .price-note {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .guide {
    padding: 36px 16px 64px;
  }
  .doors,
  .facts-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .doors {
    gap: 12px;
  }
  .rules-table,
  .rules-table tbody,
  .rules-table tr,
  .rules-table th,
  .rules-table td {
    display: block;
    width: 100%;
  }
  .rules-table thead {
    display: none;
  }
  .rules-table tr {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
  }
  .rules-table th,
  .rules-table td {
    border: none;
    border-top: 1px solid var(--line);
  }
  .rules-table tbody th {
    border-top: none;
    background: var(--soft);
  }
  .rules-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
  }
}

/* Dark mode: the same tokens, for people whose system is dark. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #202124; --card: #292a2d; --ink: #e8eaed; --muted: #9aa0a6; --line: #3c4043; --line-strong: #3c4043;
    --soft: #303134; --track: #3c4043; --brand: #8ab4f8; --action: #8ab4f8; --action-hover: #aecbfa;
    --tint: #1f2f47; --tint-line: #3c4043; --pro-col: #1e232c;
    --t-spell: #303134; --t-write: #303134; --t-history: #303134;
    --pro-a: #8ab4f8; --pro-b: #8ab4f8; --pro-ink: #202124;
  }
  body { background: var(--bg); color: var(--ink); }
}

.pay-note {
  margin: 0;
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  background: var(--soft, #f8f9fa);
  border-bottom: 1px solid var(--line, #dadce0);
}

/* ---- The four-page panel: header button, preview, Formatter, Sources, History ---- */
.head-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
}

.head-btn svg.i {
  width: 14px;
  height: 14px;
}

.head-btn:hover,
.head-btn[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--tint);
}

.big-spell {
  padding: 13px 14px;
  font-size: 16px;
}

.pill-accept:disabled {
  cursor: default;
  opacity: 0.7;
}

.pv-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.pv {
  font-size: 13.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.pv del,
.pv ins {
  color: var(--k-ink, var(--k));
}

.pv del {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.pv ins {
  font-weight: 800;
  text-decoration: none;
}

.pv-mark {
  display: inline;
  padding: 0 2px;
  border-radius: 4px;
  font: inherit;
  text-align: left;
}

.pv-mark:hover,
.pv-mark.on {
  background: color-mix(in srgb, var(--k) 14%, transparent);
}

.k-correctness {
  --k-ink: var(--k-correctness-ink);
}

.k-words {
  --k: var(--brand);
}

.mp-start {
  align-self: start;
}

.mp-card .pv {
  margin: 0;
}

.doc-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}

.doc-switch input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--action);
}

.seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 4px;
  background: var(--soft);
}

.seg button {
  padding: 6px 2px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.seg button:hover {
  color: var(--ink);
}

.seg button.on {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

.off-list,
.hist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.off-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}

.hist-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13.5px;
}

.hist-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.src-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.src-form input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: 400 13.5px/1.45 var(--font);
  color: var(--ink);
  background: var(--card);
}

.src-form input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.src-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.src-cite {
  padding-left: 1.5em;
  text-indent: -1.5em;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.src-remove {
  align-self: flex-start;
  padding-left: 0;
}

.qform .mini-card p {
  margin: 0;
}

@container (max-width: 360px) {
  .tabs button {
    font-size: 13px;
  }
}

@media (prefers-color-scheme: dark) {
  .k-correctness { --k-ink: #f28b82; }
  .k-clarity { --k-ink: #8ab4f8; }
  .diff del, .mini del { color: #f28b82; }
}

/* The PRO badge keeps its own ink inside the compare table header. */
.compare .ph .pro-badge {
  color: var(--pro-ink);
}

/* Roboto runs wider tracking than the old face. */
h1 { letter-spacing: -0.015em; }

/* ---- Three tabs: Spelling, Format, Sources -------------------------------- */

.seg.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#pane-sources .row.between .seg {
  flex: 0 1 190px;
}

.paper-p mark.err {
  cursor: default;
}

/* The sources list as the student left it, before Fix. */
.paper-cited-title.messy {
  text-align: left;
}

.paper-cited-entry.messy {
  padding-left: 0;
  text-indent: 0;
}

.mock-switch {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: var(--line-strong);
}

.mock-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
}

.mock-panel .doc-switch {
  margin: 0;
  cursor: default;
}

.cite-out p + p {
  margin-top: 6px;
}

.cite-out .cite-head {
  text-indent: 0;
  text-align: center;
}

/* The style picker and its "Example" label share a row; on a phone they wrap. */
.cite-demo > .row.between {
  flex-wrap: wrap;
  gap: 8px;
}
