:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #18202b;
  --muted: #657184;
  --line: #dde3ea;
  --brand: #1b6a6f;
  --brand-dark: #124a4e;
  --danger: #b42318;
  --success: #147a45;
  --warning: #b45309;
  --warning-bg: #fff7ed;
  --topbar-height: 76px;
  --review-header-height: 90px;
  --sticky-offset: calc(var(--topbar-height) + var(--review-header-height) + 22px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.site-logo {
  align-items: center;
  gap: 10px;
  display: inline-flex;
  min-height: 62px;
}

.site-logo img {
  display: block;
  height: 58px;
  max-width: 58px;
  object-fit: contain;
  width: auto;
}

.site-logo span {
  color: #111111;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.topnav {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 0 18px;
}

.topnav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.topnav a:hover {
  background: #f3f7f7;
  color: var(--brand-dark);
}

.topnav a.active {
  background: #eef8f7;
  color: var(--brand-dark);
}

.menu-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 4px;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.menu-toggle span {
  background: var(--brand-dark);
  border-radius: 999px;
  display: block;
  height: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
  width: 18px;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.tier {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--brand-dark);
  background: #eef8f7;
}

main {
  min-height: calc(100vh - var(--topbar-height));
}

.home-hero {
  background:
    linear-gradient(120deg, rgba(27, 106, 111, 0.94), rgba(26, 42, 63, 0.92)),
    url("/static/img/logo-relecture.png");
  background-position: center;
  background-size: cover;
  color: #ffffff;
  padding: 74px 24px 42px;
}

.home-hero-inner,
.home-section {
  margin: 0 auto;
  max-width: 1160px;
}

.home-hero-inner {
  align-items: end;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.home-hero-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  margin: 8px 0 18px;
  max-width: 850px;
}

.home-hero-copy p {
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
  max-width: 790px;
}

.home-kicker {
  color: #d7f2eb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

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

.primary-link,
.secondary-link,
.text-link {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 42px;
  padding: 11px 16px;
  text-decoration: none;
}

.primary-link {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #ffffff;
}

.home-hero .primary-link {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--brand-dark);
}

.secondary-link {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--brand-dark);
}

.home-hero .secondary-link {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.48);
  color: #ffffff;
}

.text-link {
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  padding-left: 6px;
  padding-right: 6px;
}

.home-proof-panel {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  display: grid;
  gap: 10px;
  padding: 18px;
}

.home-proof-panel span {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: #ffffff;
  display: block;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
}

.home-section {
  padding: 46px 24px 0;
}

.home-section:last-child {
  padding-bottom: 56px;
}

.home-section-heading {
  max-width: 780px;
}

.home-section .home-kicker {
  color: var(--brand);
}

.home-section h2 {
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.16;
  margin: 8px 0 12px;
}

.home-section p {
  color: var(--muted);
  line-height: 1.65;
}

.home-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.home-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(28, 40, 55, 0.06);
  padding: 20px;
}

.home-card h3 {
  font-size: 18px;
  margin: 0 0 10px;
}

.home-card p {
  font-size: 14px;
  margin: 0;
}

.correction-card {
  border-top: 5px solid #2f8f5b;
}

.style-card {
  border-top: 5px solid #2563eb;
}

.beta-card {
  border-top: 5px solid #b45309;
}

.home-split,
.home-offer-band,
.home-protection {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  margin-top: 46px;
  padding: 26px;
}

.home-offer-band {
  background: #eef8f7;
  border-color: #c4e1de;
}

.home-protection {
  background: #fff7ed;
  border-color: #fed7aa;
}

.home-steps {
  counter-reset: home-step;
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-steps li {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 13px 13px 13px 48px;
  position: relative;
}

.home-steps li::before {
  align-items: center;
  background: var(--brand);
  border-radius: 999px;
  color: #ffffff;
  content: counter(home-step);
  counter-increment: home-step;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  left: 13px;
  position: absolute;
  top: 15px;
  width: 26px;
}

.home-steps strong {
  color: var(--text);
  font-size: 14px;
}

.home-steps span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.home-offer-band .primary-link,
.home-protection .secondary-link {
  justify-self: end;
  white-space: nowrap;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.faq-list details {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
}

.faq-list summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.faq-list p {
  font-size: 14px;
  margin: 10px 0 0;
}

.blog-workspace {
  gap: 18px;
}

.blog-hero {
  background: linear-gradient(135deg, #ffffff, #eef8f7);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(28, 40, 55, 0.07);
  padding: 28px;
}

.blog-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  margin: 8px 0 12px;
}

.blog-hero p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 860px;
}

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

.blog-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  background: #eef8f7;
  display: block;
  overflow: hidden;
}

.blog-card-image img,
.blog-article-hero img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.blog-card > div {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.blog-card span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-preview-grid h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
}

.blog-preview-grid h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-preview-grid p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.blog-article {
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px 24px 56px;
}

.blog-article-hero {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  overflow: hidden;
}

.blog-article-copy {
  padding: 28px;
}

.blog-article-copy h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.04;
  margin: 8px 0 14px;
}

.blog-article-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}

.blog-article-hero img {
  aspect-ratio: 16 / 10;
  min-height: 320px;
}

.blog-article-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 280px;
  margin-top: 22px;
}

.blog-article-body {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.blog-article-body section + section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 24px;
}

.blog-article-body h2 {
  font-size: 25px;
  line-height: 1.2;
  margin: 0 0 12px;
}

.blog-article-body p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.blog-article-cta {
  background: #eef8f7;
  border-radius: 8px;
  padding: 18px;
}

.blog-article-aside {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 18px;
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
}

.blog-article-aside strong {
  color: var(--brand-dark);
}

.blog-article-aside a {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

@media (max-width: 860px) {
  .home-hero {
    padding: 46px 18px 28px;
  }

  .home-hero-inner,
  .home-split,
  .home-offer-band,
  .home-protection {
    grid-template-columns: 1fr;
  }

  .home-hero-copy h1 {
    font-size: 34px;
  }

  .home-hero-copy p {
    font-size: 16px;
  }

  .home-card-grid {
    grid-template-columns: 1fr;
  }

  .blog-preview-grid {
    grid-template-columns: 1fr;
  }

  .blog-article {
    padding: 18px;
  }

  .blog-article-hero,
  .blog-article-layout {
    grid-template-columns: 1fr;
  }

  .blog-article-copy,
  .blog-article-body {
    padding: 20px;
  }

  .blog-article-hero img {
    min-height: auto;
  }

  .blog-article-aside {
    position: static;
  }

  .home-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-split,
  .home-offer-band,
  .home-protection {
    margin-top: 32px;
    padding: 20px;
  }

  .home-offer-band .primary-link,
  .home-protection .secondary-link {
    justify-self: stretch;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .home-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-actions .primary-link,
  .home-actions .secondary-link,
  .home-actions .text-link {
    width: 100%;
  }

  .home-proof-panel {
    padding: 12px;
  }
}

.login-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel,
.review-panel,
.done-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(28, 40, 55, 0.08);
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.auth-shell {
  align-items: start;
  padding-top: 48px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 420px));
  gap: 18px;
  justify-content: center;
  width: min(880px, 100%);
}

.auth-panel h1 {
  font-size: 24px;
}

.password-toggle {
  align-items: center;
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.password-toggle input {
  width: auto;
}

.auth-link {
  color: var(--brand-dark);
  font-size: 13px;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
}

.forgot-link {
  justify-self: end;
  margin-top: -4px;
}

.create-account-link {
  justify-self: center;
}

.auth-register-prompt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  text-align: center;
}

.success-note {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: var(--success);
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
}

.auth-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-nested-form {
  display: grid;
  gap: 14px;
}

.verification-code {
  font-size: 20px;
  letter-spacing: 0;
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 30px;
}

h2 {
  font-size: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 650;
}

input[type="text"],
input[type="email"],
input[type="password"],
input:not([type]) {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
}

button:hover {
  background: var(--brand-dark);
}

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

button.is-loading,
button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.ghost,
.ghost-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 500;
}

.ghost:hover {
  background: #f3f5f7;
}

.workspace {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.workspace.review-workspace,
.workspace.coherence-workspace {
  padding-top: 0;
}

.review-workspace .page-heading,
.coherence-workspace .page-heading {
  align-items: center;
  background: rgba(246, 247, 249, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(28, 40, 55, 0.07);
  margin-left: calc((100vw - min(1120px, calc(100vw - 32px))) / -2);
  margin-right: calc((100vw - min(1120px, calc(100vw - 32px))) / -2);
  margin-bottom: 22px;
  min-height: var(--review-header-height);
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
  position: sticky;
  top: var(--topbar-height);
  z-index: 45;
  backdrop-filter: blur(14px);
}

.review-workspace .page-heading h1,
.coherence-workspace .page-heading h1 {
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 4px;
  max-width: min(760px, 68vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manuscripts-heading h2 {
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}

.page-heading p {
  color: var(--muted);
  margin-bottom: 0;
}

.manuscripts-heading {
  margin-bottom: 8px;
}

.manuscripts-intro {
  background: linear-gradient(135deg, #f8ffff, #ffffff);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(28, 40, 55, 0.06);
  margin-bottom: 16px;
  padding: 20px;
}

.manuscripts-intro h1 {
  color: var(--brand-dark);
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 8px;
}

.manuscripts-intro p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 880px;
}

.upload {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.upload-below-plans {
  justify-content: flex-end;
}

.upload-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.upload-section p {
  color: var(--muted);
  margin-bottom: 0;
}

.upload.disabled-upload {
  background: #f3f4f6;
  opacity: 0.72;
}

.upload.disabled-upload input,
.upload.disabled-upload button {
  cursor: not-allowed;
}

.visitor-product-preview {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 14px;
  position: relative;
}

.visitor-product-preview .page-heading,
.visitor-product-preview .upload-section {
  opacity: 0.78;
}

.visitor-product-preview .documents-panel {
  filter: grayscale(0.18);
  margin-bottom: 0;
  opacity: 0.82;
}

.visitor-product-preview .document-row:hover {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: none;
}

button:disabled,
button:disabled:hover {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.trial-alert-strip {
  background: #1d4ed8;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  padding: 8px 12px;
  text-align: center;
  text-transform: uppercase;
}

.trial-alert-strip.expired {
  background: #7f1d1d;
}

.global-trial-strip {
  border-radius: 0;
  margin-bottom: 0;
  position: sticky;
  top: var(--topbar-height);
  z-index: 45;
}

.author-protection-alert {
  align-items: center;
  background: linear-gradient(135deg, #fff7ed, #ffffff 64%);
  border: 1px solid #fed7aa;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.08);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px;
}

.author-protection-alert h2,
.guide-hero h2,
.guide-card h2,
.guide-section h2,
.guide-sources h2 {
  margin-bottom: 7px;
}

.author-protection-alert p,
.guide-hero p,
.guide-card p,
.guide-section p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.alert-kicker {
  color: var(--warning);
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.protection-guide-button {
  background: var(--warning);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  text-decoration: none;
}

.protection-guide-button:hover {
  background: #92400e;
}

.plan,
.document-row,
.empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.plan:first-child {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border-color: #fed7aa;
}

.plan span,
.document-row small {
  color: var(--muted);
}

.trial-plan-badge {
  background: #b42318;
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-size: 10px;
  font-weight: 850;
  margin-left: 6px;
  padding: 3px 7px;
  vertical-align: middle;
}

.plan-action {
  align-self: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
  min-height: 34px;
  padding: 7px 10px;
  text-align: center;
  text-decoration: none;
}

.plan-action:hover {
  background: #eef8f7;
}

.plan-action.current,
.plan-action.current:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  cursor: default;
  opacity: 1;
}

.plan.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand), 0 14px 30px rgba(27, 106, 111, 0.13);
  position: relative;
}

.plan.active::before {
  background: var(--brand);
  border-radius: 999px;
  color: #fff;
  content: "Offre actuelle";
  font-size: 11px;
  font-weight: 800;
  justify-self: start;
  padding: 4px 8px;
}

.professional-plan {
  background: linear-gradient(135deg, #ecfeff, #fefce8);
  border-color: #8bd4d2;
  color: var(--text);
}

.professional-plan span {
  color: #3f5963;
}

.documents-toolbar {
  align-items: center;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid #fed7aa;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.07);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px 16px;
}

.documents-toolbar div {
  display: grid;
  gap: 3px;
}

.documents-toolbar strong {
  color: var(--text);
}

.documents-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.visitor-account-cta {
  align-items: center;
  background: linear-gradient(135deg, #eef8f7, #ffffff);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(28, 40, 55, 0.06);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px;
}

.visitor-account-cta h2 {
  color: var(--brand-dark);
  margin-bottom: 6px;
}

.visitor-account-cta p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 760px;
}

.visitor-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.visitor-offers-note {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(28, 40, 55, 0.05);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 15px 16px;
}

.visitor-offers-note div:first-child {
  display: grid;
  gap: 3px;
}

.visitor-offers-note strong {
  color: var(--text);
}

.visitor-offers-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pack-add-button {
  background: var(--warning);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  text-decoration: none;
}

.pack-add-button:hover {
  background: #92400e;
}

.pricing-workspace {
  gap: 18px;
}

.pricing-hero {
  align-items: center;
  background: linear-gradient(135deg, #f8ffff, #ffffff);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(28, 40, 55, 0.07);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 22px;
}

.pricing-hero h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.pricing-hero p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
  max-width: 760px;
}

.pricing-panel {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(28, 40, 55, 0.09);
  overflow-x: auto;
  padding: 14px;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  min-width: 1080px;
}

.pricing-card {
  background: #ffffff;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(28, 40, 55, 0.06);
  color: var(--text);
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto auto 1fr auto;
  min-height: 100%;
  padding: 16px;
  position: relative;
}

.pricing-card-top {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.pricing-card-kicker {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.pricing-card h2 {
  color: var(--brand-dark);
  font-size: 20px;
  line-height: 1.15;
  margin-bottom: 0;
}

.pricing-card-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 0;
}

.pricing-card-price {
  background: #f6fbfb;
  border: 1px solid #d7eeee;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 12px;
}

.pricing-card-price strong {
  color: var(--brand-dark);
  font-size: 25px;
  line-height: 1.1;
}

.pricing-card-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.pricing-feature-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pricing-feature-list li {
  border-bottom: 1px solid #eef2f6;
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
}

.pricing-feature-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pricing-feature-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pricing-feature-list strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.feature-muted strong {
  color: #94a3b8;
  font-weight: 650;
}

.pack-pricing-card {
  background: linear-gradient(180deg, #fff7ed, #ffffff 46%);
  border-color: #fdba74;
}

.pack-pricing-card .pricing-card-price {
  background: #fff7ed;
  border-color: #fed7aa;
}

.pack-pricing-card .pricing-card-kicker,
.pack-pricing-card .pricing-card-price strong {
  color: var(--warning);
}

.professional-pricing-card {
  background: linear-gradient(180deg, #ecfeff, #ffffff 42%, #fefce8);
  border-color: #63c2bf;
  box-shadow: 0 16px 34px rgba(27, 106, 111, 0.14);
  transform: translateY(-6px);
}

.professional-pricing-card .pricing-card-price {
  background: #eef8f7;
  border-color: #b7e4e0;
}

.current-pricing-card {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand), 0 16px 34px rgba(27, 106, 111, 0.12);
}

.current-plan-badge {
  background: var(--brand);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  justify-self: start;
  padding: 4px 8px;
}

.pro-plan-badge {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: var(--warning);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
}

.pricing-card-action {
  display: grid;
}

.pricing-card-action form,
.pricing-card-action .plan-action {
  width: 100%;
}

.payment-placeholder {
  opacity: 0.78;
}

.payment-link {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.payment-link:hover {
  background: var(--brand-dark);
}

.pack-pricing-card .payment-link {
  background: var(--warning);
  border-color: var(--warning);
}

.pack-pricing-card .payment-link:hover {
  background: #92400e;
}

.plan-action.unavailable,
.plan-action.unavailable:hover {
  background: #f3f4f6;
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.pricing-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.pricing-seo-section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(28, 40, 55, 0.06);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.pricing-seo-section h2 {
  color: var(--text);
  font-size: 26px;
  line-height: 1.2;
  margin: 8px 0 10px;
}

.pricing-seo-section p {
  color: var(--muted);
  line-height: 1.62;
  margin: 0;
  max-width: 880px;
}

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

.pricing-seo-grid article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.pricing-seo-grid h3 {
  color: var(--brand-dark);
  font-size: 15px;
  margin: 0 0 8px;
}

.pricing-seo-grid p {
  font-size: 13px;
  line-height: 1.5;
}

.pricing-links-section {
  background: #f8ffff;
}

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

.pricing-internal-links a {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 14px;
  text-decoration: none;
}

.pricing-internal-links strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.pricing-internal-links span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pricing-faq-section .faq-list {
  margin-top: 0;
}

@media (max-width: 900px) {
  .pricing-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .pricing-hero h1 {
    font-size: 24px;
  }

  .pricing-panel {
    margin-left: -14px;
    margin-right: -14px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .pricing-cards {
    min-width: 980px;
  }

  .pricing-card {
    padding: 12px;
  }

  .professional-pricing-card {
    transform: none;
  }

  .pricing-seo-grid,
  .pricing-internal-links {
    grid-template-columns: 1fr;
  }
}

.professional-plan.active {
  border-color: #1b6a6f;
  box-shadow: inset 0 0 0 1px #1b6a6f, 0 14px 30px rgba(27, 106, 111, 0.14);
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}

.review-panel {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.document-sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(28, 40, 55, 0.08);
  display: grid;
  gap: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px);
}

.manuscript-paragraph {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0 0 1.35rem;
  scroll-margin-top: var(--sticky-offset);
}

.manuscript-paragraph:first-child {
  padding-top: 0;
}

.manuscript-paragraph:last-child {
  margin-bottom: 0;
}

.manuscript-paragraph p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.85;
  margin-bottom: 0;
  white-space: pre-wrap;
}

.active-paragraph {
  margin: 1.35rem -18px;
  padding: 20px 18px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  border-color: var(--brand);
  background: #f8ffff;
  box-shadow: 0 14px 34px rgba(27, 106, 111, 0.12);
}

.done-paragraph {
  border-left: 3px solid rgba(20, 122, 69, 0.18);
  padding-left: 16px;
}

.skipped-paragraph {
  border-left: 3px solid rgba(180, 83, 9, 0.28);
  padding-left: 16px;
}

.pending-paragraph {
  color: var(--muted);
}

.paragraph-toolbar,
.paragraph-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  width: max-content;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef8f7;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 750;
}

.status-pill.done {
  background: #edfdf4;
  color: var(--success);
}

.status-pill.pending {
  background: #f1f4f8;
  color: var(--muted);
}

.status-pill.skipped {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-pill.archived,
.archived-status {
  background: #f3f4f6;
  color: #4b5563;
}

.archived-notice,
.active-limit-note {
  margin-bottom: 16px;
}

.archived-paragraph {
  opacity: 0.92;
}

.archived-row {
  background: #f8fafc;
}

.archived-chip {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

.paragraph-box {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  line-height: 1.7;
}

.original-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.original-text strong {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.reintegrated-text {
  color: var(--text);
}

.skipped-text {
  color: var(--text);
}

.suggestions {
  display: grid;
  gap: 12px;
}

.suggestion {
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.change {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text);
}

del {
  color: var(--danger);
  background: #fff0ed;
  text-decoration-thickness: 2px;
}

ins {
  color: var(--success);
  background: #edfdf4;
  text-decoration: none;
}

.inline-review-text {
  white-space: pre-wrap;
}

.inline-suggestion {
  align-items: baseline;
  display: inline-flex;
  gap: 4px;
  margin: 0 3px;
  vertical-align: baseline;
}

.inline-suggestion input {
  inline-size: 15px;
  block-size: 15px;
  margin: 0 2px 0 0;
  transform: translateY(2px);
}

.inline-suggestion del,
.inline-suggestion ins {
  border-radius: 4px;
  padding: 1px 4px;
}

.inline-suggestion.readonly del {
  background: #fee2e2;
}

.inline-suggestion.readonly ins {
  background: #dcfce7;
}

.accepted-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.accepted-changes span,
.accepted-changes small {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.secondary-button:hover {
  background: #f3f5f7;
}

.download-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand-dark);
  display: inline-flex;
  font-size: 19px;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  min-width: 38px;
  padding: 6px 10px;
}

.download-button:hover {
  background: #eef8f7;
}

.text-download-button {
  gap: 8px;
  font-size: 13px;
  min-width: 0;
  padding: 9px 14px;
}

.text-download-button span[aria-hidden="true"] {
  font-size: 18px;
}

.skip-button {
  border: 1px solid #fed7aa;
  background: var(--warning-bg);
  color: var(--warning);
}

.skip-button:hover {
  background: #ffedd5;
}

.skipped-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skipped-issues span,
.skipped-issues small {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.skipped-issues mark {
  border-radius: 4px;
  padding: 2px 4px;
  background: #fee2e2;
  color: var(--danger);
}

.skipped-issues span small {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--warning);
}

.done-panel {
  padding: 28px;
}

.empty {
  padding: 18px;
  color: var(--muted);
}

.correction-comments .empty {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  padding: 10px 12px;
}

.inline-empty {
  margin-bottom: 8px;
}

.error {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff0ed;
  color: var(--danger);
  border: 1px solid #ffd4cc;
}

@media (max-width: 780px) {
  :root {
    --topbar-height: 70px;
    --review-header-height: 116px;
    --sticky-offset: calc(var(--topbar-height) + var(--review-header-height) + 16px);
  }

  .page-heading,
  .document-row,
  .upload {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: center;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(44px, auto);
    grid-template-rows: var(--topbar-height);
    height: var(--topbar-height);
    min-height: 0;
    flex-wrap: initial;
    gap: 8px;
    padding: 0 12px;
  }

  .site-logo {
    align-self: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    min-height: 54px;
    min-width: 0;
  }

  .site-logo img {
    height: 52px;
    max-width: 52px;
  }

  .site-logo span {
    font-size: clamp(16px, 4.4vw, 20px);
  }

  .topbar .account {
    align-self: center;
    grid-column: 3;
    grid-row: 1;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    min-width: 0;
  }

  .menu-toggle {
    align-self: center;
    display: inline-flex;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .topnav {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(28, 40, 55, 0.16);
    display: none;
    flex-direction: column;
    gap: 2px;
    left: 12px;
    margin: 0;
    padding: 8px;
    position: absolute;
    right: 12px;
    top: calc(100% + 8px);
  }

  .topnav a {
    font-size: 14px;
    padding: 12px;
    width: 100%;
  }

  .topnav.open {
    display: flex;
  }

  .topbar .account span:not(.tier) {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .tier {
    font-size: 11px;
    padding: 3px 7px;
  }

  .topbar .ghost {
    font-size: 11px;
    padding: 6px 8px;
    white-space: nowrap;
  }

  .review-workspace .page-heading,
  .coherence-workspace .page-heading {
    gap: 10px;
    min-height: var(--review-header-height);
    padding: 12px 16px;
  }

  .review-workspace .page-heading h1,
  .coherence-workspace .page-heading h1 {
    max-width: 100%;
    white-space: normal;
  }


  .subscription-grid {
    grid-template-columns: 1fr;
  }

  .suggestion {
    grid-template-columns: 22px 1fr;
  }

  .suggestion small {
    grid-column: 2;
  }

}

@media (max-width: 420px) {
  .site-logo {
    gap: 0;
  }

  .site-logo span {
    display: none;
  }
}

.layout-title {
  margin: 2.8rem 0 2rem;
  text-align: center;
}

.layout-title p,
.layout-title .inline-review-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.layout-subtitle {
  margin: 2.1rem 0 1.6rem;
  text-align: center;
}

.layout-subtitle p,
.layout-subtitle .inline-review-text {
  font-size: 20px;
  font-style: italic;
  line-height: 1.55;
}

.layout-dialogue {
  margin-left: 0;
}

.layout-dialogue p,
.layout-dialogue .inline-review-text {
  overflow: visible;
  padding-left: 1.45em;
  text-indent: -1.45em;
}

.layout-body + .layout-title,
.layout-dialogue + .layout-title {
  margin-top: 3.4rem;
}

.layout-body + .layout-body,
.layout-dialogue + .layout-body,
.layout-body + .layout-dialogue {
  margin-top: 0.65rem;
}

.done-paragraph.layout-title,
.done-paragraph.layout-subtitle,
.skipped-paragraph.layout-title,
.skipped-paragraph.layout-subtitle {
  border-left: 0;
  padding-left: 0;
}

.layout-body p,
.layout-long p {
  text-align: justify;
  text-indent: 1.7em;
}

.layout-short {
  margin: 1.05rem 0 1.45rem;
}

.layout-short p {
  text-indent: 0;
}

.layout-long {
  margin-bottom: 1.75rem;
}

.layout-long p {
  line-height: 1.95;
}

.layout-quote {
  margin: 1.4rem clamp(18px, 6vw, 64px);
}

.layout-quote p {
  font-style: italic;
  line-height: 1.8;
  text-indent: 0;
}

.layout-chapter-marker {
  margin: 2.8rem 0 1.2rem;
  text-align: center;
}

.layout-chapter-marker p {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0;
}

.layout-scene-break {
  margin: 2.4rem 0;
  text-align: center;
}

.layout-scene-break p {
  color: var(--muted);
  font-size: 20px;
  letter-spacing: 0.18em;
  line-height: 1;
  text-indent: 0;
}

.layout-title + .layout-body p,
.layout-title + .layout-long p,
.layout-subtitle + .layout-body p,
.layout-scene-break + .layout-body p,
.layout-chapter-marker + .layout-body p {
  text-indent: 0;
}

.active-paragraph.layout-body p,
.active-paragraph.layout-long p {
  text-align: left;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(280px, 32%);
  gap: 22px;
  align-items: start;
}

.review-text-pane {
  min-width: 0;
}

.correction-comments {
  border-left: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.comment-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proposals-title {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 14px;
}

.correction-comment {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  display: grid;
  gap: 8px;
  padding: 10px 70px 10px 10px;
  position: relative;
}

.correction-comment input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.correction-comment:has(input:checked) {
  box-shadow: inset 0 0 0 1px rgba(27, 106, 111, 0.3);
}

.correction-comment.dismissed {
  opacity: 0.5;
}

.correction-comment.dismissed .comment-change,
.correction-comment.dismissed small {
  filter: grayscale(0.6);
}

.comment-kind {
  align-self: start;
  border: 1px solid var(--highlight-border, var(--line));
  border-radius: 999px;
  color: var(--highlight-border, var(--brand));
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
  width: max-content;
}

.kind-style {
  background: #dcfce7;
}

.kind-review {
  background: #ede9fe;
}

.kind-spacing {
  background: #dbeafe;
}

.kind-typography {
  background: #fef3c7;
}

.kind-spelling {
  background: #fee2e2;
}

.dismiss-correction,
.refresh-proposal {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 17px;
  font-weight: 650;
  height: 26px;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  padding: 0;
  position: absolute;
  top: 8px;
  width: 26px;
}

.dismiss-correction {
  right: 8px;
}

.refresh-proposal {
  font-size: 15px;
  right: 40px;
}

.dismiss-correction:hover {
  background: #fff0ed;
  border-color: #fecaca;
  color: var(--danger);
}

.refresh-proposal:hover {
  background: #eef8f7;
  border-color: #b7e4e0;
  color: var(--brand-dark);
}

.refresh-proposal.is-loading {
  animation: refresh-spin 0.8s linear infinite;
  opacity: 0.9;
}

@keyframes refresh-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.comment-change {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comment-change ins::before {
  color: var(--muted);
  content: "→";
  margin-right: 6px;
}

.correction-comment small {
  color: var(--muted);
  line-height: 1.35;
}

.review-note {
  color: #4c1d95;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.error-highlight {
  border-radius: 4px;
  padding: 1px 4px;
}

.error-spelling,
.comment-spelling {
  --highlight: #fee2e2;
  --highlight-border: #ef4444;
}

.error-typography,
.comment-typography {
  --highlight: #fef3c7;
  --highlight-border: #f59e0b;
}

.error-spacing,
.comment-spacing {
  --highlight: #dbeafe;
  --highlight-border: #3b82f6;
}

.error-style,
.comment-style {
  --highlight: #dcfce7;
  --highlight-border: #22c55e;
}

.error-review,
.comment-review {
  --highlight: #ede9fe;
  --highlight-border: #8b5cf6;
}

.proposal-comment.comment-style {
  background: #f0fdf4;
}

.proposal-comment.comment-review {
  background: #f5f3ff;
}

.error-highlight {
  background: var(--highlight, #fee2e2);
}

.correction-comment {
  border-left-color: var(--highlight-border, var(--brand));
}

.correction-comment .error-highlight {
  background: var(--highlight, #fee2e2);
}

@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    padding-top: 24px;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .correction-comments {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }
}

.extracted-title {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  margin: 0 0 2.2rem;
  text-align: center;
  text-transform: uppercase;
}

.extracted-body {
  display: block;
  text-indent: 1.7em;
}

.active-paragraph .extracted-body {
  text-indent: 0;
}

.review-text-pane .inline-review-text {
  max-width: 72ch;
}

@media (max-width: 900px) {
  .document-sheet {
    max-width: 100%;
    padding: 20px;
  }

  .review-text-pane .inline-review-text {
    max-width: none;
  }

  .extracted-title {
    font-size: 21px;
    margin-bottom: 1.5rem;
  }
}


.documents-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 40, 55, 0.08);
  overflow: hidden;
}

.documents-panel + .documents-panel {
  margin-top: 26px;
}

.documents-panel-header {
  align-items: center;
  background: linear-gradient(90deg, #f8ffff, #ffffff);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.documents-panel-header h2 {
  font-size: 20px;
  margin-bottom: 2px;
}

.documents-panel-header p {
  color: var(--muted);
  margin-bottom: 0;
}

.panel-chip {
  border: 1px solid #b7e4e0;
  border-radius: 999px;
  background: #eef8f7;
  color: var(--brand-dark);
  font-weight: 750;
  padding: 6px 12px;
}

.documents-table {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.documents-table-head,
.document-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) 92px 104px 150px minmax(430px, 0.95fr);
  gap: 16px;
  align-items: center;
}

.documents-table-head {
  background: #f3f6f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  text-transform: uppercase;
}

.documents-table-head span:nth-child(5) {
  text-align: right;
}

.document-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.document-row:nth-child(odd) {
  background: #ffffff;
}

.document-row:nth-child(even) {
  background: #f6fbfb;
}

.document-row:hover {
  background: #eef8f7;
  border-color: #b7e4e0;
  box-shadow: inset 4px 0 0 var(--brand), 0 8px 20px rgba(28, 40, 55, 0.06);
}

.document-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.document-icon {
  align-items: center;
  background: var(--brand-dark);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 850;
  height: 42px;
  justify-content: center;
  width: 52px;
}

.document-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.document-info small,
.document-date {
  color: var(--muted);
}

.document-main {
  min-width: 0;
}

.document-mobile-meta {
  display: none;
}

.format-badge,
.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.format-badge {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-badge {
  background: #edfdf4;
  color: var(--success);
}

.document-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.open-button {
  min-height: 38px;
  border-radius: 8px;
  border: 0;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.open-button:hover {
  background: var(--brand-dark);
}

.danger-button {
  border: 1px solid #fecaca;
  background: #fff;
  color: var(--danger);
}

.danger-button:hover {
  background: #fff0ed;
}

.archive-button {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: var(--warning);
}

.archive-button:hover {
  background: #ffedd5;
}

.document-actions form {
  margin: 0;
}

.document-empty {
  border: 0;
  border-radius: 0;
}

@media (max-width: 900px) {
  .author-protection-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .protection-guide-button {
    width: 100%;
  }

  .documents-panel {
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  .documents-panel-header {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 14px;
  }

  .documents-panel-header h2 {
    font-size: 18px;
  }

  .documents-toolbar,
  .visitor-account-cta,
  .visitor-offers-note {
    align-items: stretch;
    flex-direction: column;
  }

  .pack-add-button,
  .visitor-account-actions .open-button,
  .visitor-account-actions .ghost-link {
    width: 100%;
  }

  .panel-chip {
    align-self: flex-start;
    font-size: 12px;
    padding: 5px 10px;
  }

  .documents-table {
    gap: 12px;
  }

  .documents-table-head {
    display: none;
  }

  .document-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(28, 40, 55, 0.07);
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .document-row:nth-child(odd),
  .document-row:nth-child(even) {
    background: #fff;
  }

  .document-row:hover {
    background: #fff;
    box-shadow: 0 10px 24px rgba(28, 40, 55, 0.07);
  }

  .document-info {
    align-items: flex-start;
  }

  .document-icon {
    height: 38px;
    width: 48px;
  }

  .document-title {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }

  .document-mobile-meta {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    font-size: 13px;
  }

  .document-format,
  .document-state,
  .document-date {
    display: none;
  }

  .document-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 10px;
    justify-content: stretch;
    width: 100%;
  }

  .document-actions form,
  .document-actions .open-button,
  .document-actions button {
    width: 100%;
  }

  .open-button,
  .danger-button {
    min-height: 40px;
  }

  .guide-grid,
  .method-list,
  .guide-link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .documents-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-actions {
    grid-template-columns: 1fr;
  }
}

.extracted-page-number {
  display: none;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.secondary-open-button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.secondary-open-button:hover {
  background: #f3f5f7;
}

.coherence-button,
.coherence-link {
  background: var(--warning-bg);
  border-color: #fed7aa;
  color: var(--warning);
}

.coherence-button:hover,
.coherence-link:hover {
  background: #ffedd5;
  color: #92400e;
}

.coherence-workspace {
  max-width: 1120px;
}

.guide-workspace {
  max-width: 1040px;
}

.guide-heading {
  align-items: center;
}

.guide-hero,
.guide-card,
.guide-section,
.guide-sources {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(28, 40, 55, 0.06);
}

.guide-hero {
  border-color: #fed7aa;
  margin-bottom: 16px;
  padding: 22px;
}

.guide-hero small {
  color: var(--muted);
  display: block;
  margin-top: 12px;
}

.guide-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.guide-card,
.guide-section,
.guide-sources {
  margin-bottom: 16px;
  padding: 18px;
}

.strong-card {
  background: #f6fbfb;
  border-color: #b7e4e0;
}

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

.method-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.method-list strong {
  color: var(--text);
}

.method-list a,
.guide-sources a {
  color: var(--brand-dark);
  font-weight: 750;
}

.guide-internal-links {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  font-size: 14px;
  padding: 12px;
}

.guide-internal-links a,
.guide-section p a {
  color: var(--brand-dark);
  font-weight: 750;
}

.guide-checklist {
  color: var(--muted);
  display: grid;
  gap: 9px;
  line-height: 1.5;
  margin: 0;
  padding-left: 22px;
}

.guide-sources {
  display: grid;
  gap: 9px;
}

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

.guide-link-grid a {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 14px;
  text-decoration: none;
}

.guide-link-grid strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.guide-link-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.coherence-hero,
.coherence-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(28, 40, 55, 0.06);
}

.coherence-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
}

.coherence-hero h2,
.coherence-section h2 {
  margin-bottom: 6px;
}

.coherence-hero p,
.coherence-section p {
  color: var(--muted);
  line-height: 1.55;
}

.coherence-hero small,
.coherence-alert small {
  color: var(--muted);
}

.coherence-section {
  margin-bottom: 16px;
  padding: 18px;
}

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

.coherence-alerts {
  display: grid;
  gap: 10px;
}

.coherence-alert {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px;
}

.coherence-alert.severity-fort {
  border-left-color: var(--danger);
}

.coherence-alert.severity-moyen {
  border-left-color: var(--warning);
}

.coherence-alert.severity-faible {
  border-left-color: var(--brand);
}

.coherence-onboarding {
  align-items: center;
  background: #f4f9fb;
  border: 1px solid #cfe3ea;
  border-left: 5px solid #3d8aa2;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(34, 63, 80, 0.05);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 16px 18px;
}

.coherence-onboarding.compact {
  background: #fff9ef;
  border-color: #efd7aa;
  border-left-color: #e6a63d;
}

.coherence-onboarding strong {
  color: var(--text);
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}

.coherence-onboarding p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.coherence-onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.coherence-onboarding form {
  margin: 0;
}

.coherence-onboarding button {
  white-space: nowrap;
}

.manuscript-constellation {
  overflow: hidden;
}

.constellation-head {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.constellation-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.constellation-filters button,
.constellation-tools button {
  background: #f6f9fb;
  border: 1px solid #d7e1e8;
  border-radius: 999px;
  color: #2c4251;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 10px;
}

.constellation-filters button.is-active {
  background: #fff3dd;
  border-color: #e6a63d;
  color: #7b4c04;
}

.constellation-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
}

.constellation-svgwrap {
  background:
    radial-gradient(circle at 50% 48%, rgba(230, 166, 61, 0.16), transparent 24%),
    radial-gradient(circle at 18% 22%, rgba(39, 124, 144, 0.12), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfb 55%, #f4f1e9 100%);
  border: 1px solid #dce5e8;
  border-radius: 8px;
  min-height: 420px;
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.constellation-svgwrap svg {
  cursor: grab;
  display: block;
  height: auto;
  min-width: 900px;
  width: 100%;
}

.constellation-svgwrap svg.is-dragging {
  cursor: grabbing;
}

.constellation-tools {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(38, 63, 78, 0.14);
  border-radius: 8px;
  display: flex;
  gap: 5px;
  padding: 5px;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.constellation-empty-banner {
  align-items: flex-start;
  background: rgba(255, 249, 239, 0.94);
  border: 1px solid #efd7aa;
  border-left: 4px solid #e6a63d;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(84, 58, 13, 0.08);
  color: #704807;
  display: flex;
  flex-direction: column;
  gap: 3px;
  left: 12px;
  max-width: min(430px, calc(100% - 86px));
  padding: 10px 12px;
  position: absolute;
  top: 12px;
  z-index: 2;
}

.constellation-empty-banner strong {
  color: #4c3308;
  font-size: 13px;
}

.constellation-empty-banner span {
  font-size: 12px;
  line-height: 1.35;
}

.constellation-tools button {
  border-radius: 6px;
  height: 30px;
  line-height: 1;
  padding: 0;
  width: 30px;
}

.constellation-edge {
  opacity: 0.42;
  stroke: #9ba8a9;
  stroke-width: 1.35;
  transition: opacity 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease;
}

.constellation-edge.is-active {
  opacity: 1;
  stroke: #d18922;
  stroke-width: 2.5;
}

.constellation-edge.is-muted {
  opacity: 0.08;
}

.constellation-node {
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.constellation-node circle,
.constellation-node rect {
  stroke: #233642;
  stroke-width: 1.25;
  transition: fill 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease;
}

.constellation-node.manuscrit circle {
  fill: #f0c46a;
}

.constellation-node.chapitre rect {
  fill: #e8f0f2;
}

.constellation-node.personnage circle {
  fill: #b8dccc;
}

.constellation-node.lieu rect {
  fill: #f3d1ba;
}

.constellation-node text {
  fill: #21323d;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}

.constellation-node.is-active circle,
.constellation-node.is-active rect {
  stroke: #d18922;
  stroke-width: 3;
}

.constellation-node.is-muted {
  opacity: 0.18;
}

.constellation-panel {
  background: #ffffff;
  border: 1px solid #dce5e8;
  border-radius: 8px;
  min-height: 100%;
  padding: 14px;
}

.constellation-panel h3 {
  color: var(--text);
  font-size: 18px;
  margin-bottom: 7px;
}

.constellation-panel p,
.constellation-panel li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.constellation-panel ul {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.constellation-panel strong {
  color: var(--text);
}

.constellation-legend {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.constellation-legend span {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
}

.constellation-legend .dot {
  border: 1px solid #233642;
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.constellation-legend .dot.manuscript {
  background: #f0c46a;
}

.constellation-legend .dot.chapter {
  background: #e8f0f2;
}

.constellation-legend .dot.character {
  background: #b8dccc;
}

.constellation-legend .dot.place {
  background: #f3d1ba;
  border-radius: 3px;
}

.dialogue-break-list {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.dialogue-break-card {
  display: grid;
  gap: 14px;
}

.dialogue-break-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dialogue-break-columns strong,
.dialogue-break-preview strong {
  display: block;
  margin-bottom: 4px;
}

.dialogue-break-text {
  background: var(--bg, #f7f8fa);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: Georgia, "Times New Roman", serif;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.dialogue-break-text.merged {
  border-color: var(--brand);
}

.dialogue-break-preview {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.dialogue-break-success {
  border-color: rgba(20, 122, 69, 0.45);
  background: rgba(20, 122, 69, 0.06);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.dialogue-break-success button {
  background: rgba(20, 122, 69, 0.85);
  border-color: rgba(20, 122, 69, 0.85);
  cursor: default;
}

.dialogue-break-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.dialogue-break-actions form {
  margin: 0;
}

.dialogue-break-actions .open-button,
.dialogue-break-actions .secondary-button {
  min-height: 40px;
  white-space: nowrap;
}

.dialogue-edit-form {
  display: block;
  width: 100%;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin-top: 4px;
}

.dialogue-edit-form[hidden] {
  display: none;
}

.dialogue-edit-form textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 220px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
}

.dialogue-edit-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.dialogue-edit-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.coherence-status {
  align-items: center;
  background: #f6fbff;
  border: 1px solid #cfe6f7;
  border-radius: 8px;
  color: #33556d;
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.coherence-status span {
  animation: coherence-spin 0.9s linear infinite;
  border: 2px solid #b9d8ef;
  border-top-color: #2475a8;
  border-radius: 999px;
  flex: 0 0 18px;
  height: 18px;
  width: 18px;
}

.coherence-status p {
  font-size: 13px;
  margin: 0;
}

@keyframes coherence-spin {
  to {
    transform: rotate(360deg);
  }
}

.editorial-note p {
  color: var(--muted);
}

@media (max-width: 760px) {
  .coherence-hero,
  .coherence-onboarding,
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .coherence-onboarding-actions {
    justify-content: stretch;
  }

  .coherence-onboarding-actions form,
  .coherence-onboarding form,
  .coherence-onboarding button {
    width: 100%;
  }

  .coherence-grid {
    grid-template-columns: 1fr;
  }

  .constellation-head {
    align-items: stretch;
    flex-direction: column;
  }

  .constellation-filters {
    justify-content: flex-start;
  }

  .constellation-stage {
    grid-template-columns: 1fr;
  }

  .constellation-svgwrap {
    min-height: 330px;
  }

  .heading-actions {
    justify-content: stretch;
  }
}

.chapter-report-list {
  display: grid;
  gap: 14px;
}

.chapter-report-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chapter-report-header small {
  color: var(--muted);
}

.chapter-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.chapter-facts-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 12px;
}

.chapter-facts-grid strong {
  color: var(--text);
  font-size: 13px;
}

.chapter-facts-grid span,
.chapter-facts-grid small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chapter-alerts {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .chapter-facts-grid {
    grid-template-columns: 1fr;
  }
}


.toast-stack {
  bottom: 22px;
  display: grid;
  gap: 10px;
  max-width: min(390px, calc(100vw - 28px));
  position: fixed;
  right: 22px;
  z-index: 80;
}

.analysis-toast {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(27, 36, 48, 0.18);
  color: var(--text);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  opacity: 0;
  padding: 12px 12px 12px 14px;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.analysis-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.analysis-toast.success {
  border-left-color: #2f8f5b;
}

.analysis-toast.warning {
  border-left-color: var(--warning);
}

.analysis-toast p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.analysis-toast button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}

@media (max-width: 760px) {
  .toast-stack {
    bottom: 14px;
    left: 14px;
    max-width: none;
    right: 14px;
  }
}
