:root {
  --deep-blue: #132a4c;
  --deep-sapphire: #0d1b32;
  --ink-dark: #0b1220;
  --bright-orange: #f28a63;
  --dark-orange: #d06b47;
  --gold: #ffd166;
  --cream: #fff8f4;
  --light-bg: #f7efeb;
  --white: #ffffff;
  --text-dark: #1d2433;
  --text-muted: #5c6678;
  --text-light: #e8eefb;
  --border-soft: rgba(21, 43, 76, 0.12);
  --border-light: rgba(255, 255, 255, 0.2);
  --shadow-soft: 0 14px 32px rgba(10, 22, 41, 0.12);
  --shadow-md: 0 20px 42px rgba(10, 22, 41, 0.17);
  --container-max: 1150px;
  --gutter: 1rem;
  --container: min(var(--container-max), calc(100% - (var(--gutter) * 2)));
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.6rem;
  --space-6: 2rem;
  --radius-card: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  line-height: 1.55;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 520px at 86% -6%, rgba(242, 138, 99, 0.23), transparent 64%),
    radial-gradient(1200px 760px at -8% -6%, rgba(19, 42, 76, 0.18), transparent 72%),
    linear-gradient(160deg, var(--cream), #fcf6f2 44%, #f5ece7 100%);
}

body.page-loading {
  overflow: hidden;
}

body,
body * {
  -webkit-user-select: none;
  user-select: none;
}

.page-loader {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  background: rgba(255, 248, 244, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#page-loader {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100dvh !important;
}

html.dark-mode .page-loader {
  background: rgba(16, 24, 37, 0.98);
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-gif {
  max-width: 80px;
  width: 100%;
  height: auto;
  display: block;
}

img,
svg {
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
}

main,
footer,
.hero-block,
.section {
  position: relative;
  z-index: 0;
  overflow-x: clip;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.7rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.82rem, 7.6vw, 3.2rem);
  color: #0f2240;
}

h2 {
  font-size: clamp(1.4rem, 6.3vw, 2.15rem);
  color: #0f2240;
}

h3 {
  font-size: clamp(1.02rem, 3.8vw, 1.24rem);
  color: #162f56;
}

p {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.55rem;
  color: #2c3c58;
  overflow-wrap: anywhere;
}

a {
  color: inherit;
}

a,
button,
[role="button"],
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.hero-block {
  padding: 5.2rem 0 2.1rem;
}

.hero-grid {
  display: grid;
  gap: var(--space-4);
}

.the-app-preview-shell {
  margin: 0;
  padding: 0.58rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 20px 42px rgba(15, 35, 66, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.the-app-hero-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
}

.the-app-hero-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.glass-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.58rem;
}

.glass-icon-tile {
  margin: 0;
  padding: 0.4rem;
  min-height: clamp(88px, 11vw, 124px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-icon-tile img {
  display: block;
  width: min(100%, clamp(28px, 7.2vw, 72px));
  height: auto;
  border-radius: 10px;
  margin-inline: auto;
}

.glass-icon-tile figcaption {
  margin-top: 0.45rem;
  font-size: clamp(0.58rem, 2.1vw, 0.76rem);
  font-weight: 700;
  text-align: center;
  color: #17345d;
  line-height: 1.15;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.74rem;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--dark-orange);
}

.lead {
  max-width: 56ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.cta-row.center {
  justify-content: center;
}

.btn {
  border: 0;
  text-decoration: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  min-height: 46px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(130deg, var(--bright-orange), var(--dark-orange));
  box-shadow: 0 8px 14px rgba(208, 107, 71, 0.23);
}

.btn-secondary {
  color: #102443;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(19, 42, 76, 0.18);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 40px 30px;
  border-radius: 16px;
  max-width: 700px;
  width: 90%;
  max-height: 88vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  color: var(--text-dark);
}

.modal-content::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 200px;
  height: 180px;
  background: var(--mockup-accent2, rgba(19, 42, 76, 0.5));
  border-radius: 50%;
  filter: blur(35px);
  z-index: -1;
  will-change: transform;
  animation: blobFloat1 8s ease-in-out infinite;
}

.modal-content::after {
  content: '';
  position: absolute;
  bottom: -70px;
  left: -50px;
  width: 180px;
  height: 160px;
  background: var(--mockup-accent1, rgba(242, 138, 99, 0.5));
  border-radius: 50%;
  filter: blur(35px);
  z-index: -1;
  will-change: transform;
  animation: blobFloat2 10s ease-in-out infinite reverse;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.8rem;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

.feedback-btn {
  background-color: var(--bright-orange);
  color: var(--white);
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.3s ease;
}

.feedback-btn:hover {
  background-color: var(--dark-orange);
}

#mobileOkBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.24s ease;
  -webkit-tap-highlight-color: transparent;
}

#mobileOkBtn.is-hidden {
  opacity: 0;
  pointer-events: none;
}

#mobileOkBtn.is-gone {
  display: none;
}

#mobileOkBtn:focus,
#mobileOkBtn:focus-visible,
#mobileOkBtn:active {
  outline: none;
  box-shadow: none;
  background-color: var(--bright-orange);
}

.mobile-reminder-form {
  display: grid;
  gap: 10px;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height 0.28s ease, opacity 0.24s ease, transform 0.28s ease, margin-top 0.28s ease;
}

.mobile-reminder-form[hidden] {
  display: none !important;
}

.mobile-reminder-form.is-visible {
  margin-top: 14px;
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
}

.mobile-reminder-email {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(19, 42, 76, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  font: inherit;
}

.mobile-reminder-email:focus {
  outline: none;
  border-color: var(--bright-orange);
  box-shadow: 0 0 0 3px rgba(242, 138, 99, 0.2);
}

.mobile-reminder-submit {
  width: 100%;
}

.mobile-reminder-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.86rem;
  color: inherit;
}

.mobile-reminder-status.success {
  color: #16a34a;
}

.mobile-reminder-status.error {
  color: #b3473d;
}

.modal-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-top: 24px;
}

.icon-link img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  transition: transform 0.2s ease, filter 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.icon-link img[src*="download-windows"] {
  border: 1px solid #000;
  border-radius: 8px;
  padding: 8px;
}

.icon-link img:hover {
  transform: scale(1.1);
  filter: brightness(1.05);
}

.download-modal-large {
  max-width: 700px !important;
  padding: 50px 40px !important;
  background: rgba(255, 255, 255, 0.8) !important;
}

#downloadModal .modal-close {
  color: white !important;
  opacity: 0.6;
}

#downloadModal .modal-close:hover {
  opacity: 1;
}

.version-history-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.version-history-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}

.version-section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c2c2e;
  margin-bottom: 20px;
  text-align: left;
}

.version-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.version-header {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.version-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.version-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c2c2e;
  margin: 0;
}

.toggle-icon {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  color: #2c2c2e;
  opacity: 0.6;
}

.version-header.active .toggle-icon {
  transform: rotate(180deg);
}

.version-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.version-badge.current {
  background: linear-gradient(135deg, var(--bright-orange), #ff8c42);
  color: white;
}

.version-description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
  color: #2c2c2e;
  opacity: 0.85;
  line-height: 1.6;
}

.version-description.expanded {
  padding: 0 20px 16px 20px;
}

.version-description p {
  margin: 0;
  font-size: 0.95rem;
  text-align: left;
}

@keyframes blobFloat1 {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  25% {
    transform: translate(-15px, -10px) scale(1.05);
  }
  50% {
    transform: translate(-8px, 5px) scale(0.95);
  }
  75% {
    transform: translate(10px, -5px) scale(1.02);
  }
}

@keyframes blobFloat2 {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  25% {
    transform: translate(12px, -8px) scale(1.08);
  }
  50% {
    transform: translate(6px, 10px) scale(0.92);
  }
  75% {
    transform: translate(-10px, 6px) scale(1.05);
  }
}

.section {
  padding: 1.55rem 0 2rem;
}

.section-feature {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.35));
  border-top: 1px solid rgba(19, 42, 76, 0.08);
}

.section-inner {
  display: grid;
  gap: var(--space-4);
}

.section-heading {
  max-width: 68ch;
}

.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--dark-orange);
  margin-bottom: 0.55rem;
}

.feature-highlight,
.feature-split {
  display: grid;
  gap: var(--space-3);
  padding: 0.82rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.image-grid {
  display: grid;
  gap: 0.78rem;
}

.editorial-assist-showcase {
  gap: 1.1rem;
}

.editorial-assist-showcase figure {
  margin: 0;
}

.placeholder-image {
  width: 100%;
  min-height: 170px;
  border-radius: 14px;
  border: 1px dashed rgba(19, 42, 76, 0.34);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(255, 209, 102, 0.24), transparent 50%),
    radial-gradient(120% 120% at 100% 100%, rgba(242, 138, 99, 0.2), transparent 50%),
    repeating-linear-gradient(
      -45deg,
      rgba(19, 42, 76, 0.04),
      rgba(19, 42, 76, 0.04) 10px,
      rgba(19, 42, 76, 0.09) 10px,
      rgba(19, 42, 76, 0.09) 20px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2b4169;
}

.research-chat-panel {
  position: relative;
  width: 100%;
  min-height: 170px;
  border-radius: 14px;
  border: 1px solid rgba(141, 166, 196, 0.5);
  background: #ffffff;
  padding: 1rem;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 18px rgba(43, 99, 173, 0.2);
}

.research-chat-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  background: radial-gradient(75% 60% at 50% 50%, rgba(76, 140, 228, 0.35), rgba(76, 140, 228, 0));
  filter: blur(14px);
  z-index: 0;
  pointer-events: none;
}

.research-chat-panel > * {
  position: relative;
  z-index: 1;
}

.research-chat-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.research-chat-input-shell {
  position: relative;
  flex: 1;
  min-height: 50px;
  border-radius: 23px;
  border: 2px solid #7d9fca;
  background: #edf2f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 2px 6px rgba(25, 48, 82, 0.25);
  padding: 0.7rem 5.8rem 0.7rem 1rem;
  display: flex;
  align-items: center;
}

.research-chat-placeholder {
  color: #4d5a6d;
  font-size: 1.08rem;
  line-height: 1.2;
}

.research-chat-count {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #303c4b;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.research-chat-send {
  height: 50px;
  padding: 0 1.3rem;
  border-radius: 20px;
  border: 2px solid #88a6cd;
  background: linear-gradient(180deg, #f8fbff, #dce7f4);
  color: #2a2f39;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.feature-panel-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(19, 42, 76, 0.12);
  box-shadow: 0 10px 26px rgba(10, 22, 41, 0.12);
}

#character .image-grid.two-up figure {
  margin: 0;
  display: grid;
  grid-template-rows: auto auto;
  width: 100%;
  justify-self: center;
  overflow: visible;
  border-radius: 0;
}

#character .image-grid.two-up .feature-panel-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 6;
  min-height: clamp(150px, 20vw, 210px);
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  background: transparent;
}

@supports (-webkit-touch-callout: none) {
  #character .image-grid.two-up figure {
    display: flex;
    flex-direction: column;
  }
}

#plotting .image-grid.two-up figure {
  margin: 0;
  display: grid;
  grid-template-rows: auto auto;
  width: 100%;
  justify-self: center;
  overflow: visible;
  border-radius: 0;
}

#plotting .image-grid.two-up .feature-panel-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7.5;
  min-height: clamp(150px, 20vw, 210px);
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  background: #ffffff;
}

#research .image-grid.two-up figure {
  margin: 0;
  display: grid;
  grid-template-rows: auto auto;
  width: 100%;
  justify-self: center;
  overflow: visible;
  border-radius: 0;
}

#research .image-grid.two-up .feature-panel-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 6;
  min-height: clamp(150px, 20vw, 210px);
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  background: transparent;
}

.tokens-usage-card {
  width: 100%;
  aspect-ratio: 16 / 6;
  border-radius: 14px;
  border: 1px solid rgba(120, 157, 204, 0.25);
  background: #ffffff;
  padding: 0.55rem 0.75rem 0.55rem;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.35rem;
  box-shadow: 0 6px 14px rgba(32, 73, 134, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.tokens-usage-ring {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(20, 44, 84, 0.16);
}

.tokens-usage-ring span,
.tokens-usage-ring small {
  grid-area: 1 / 1;
}

.tokens-usage-ring::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff, #f7fbff);
  grid-area: 1 / 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.tokens-usage-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tokens-usage-ring-track {
  fill: none;
  stroke: #dbe4f1;
  stroke-width: 12;
}

.tokens-usage-ring-fill {
  fill: none;
  stroke: #2f67bf;
  stroke-width: 12;
  stroke-linecap: butt;
  stroke-dasharray: 203.3 263.9;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.tokens-usage-ring span {
  z-index: 1;
  font-size: 0.94rem;
  font-weight: 800;
  color: #1e4f9f;
  transform: translateY(-4px);
}

.tokens-usage-ring small {
  z-index: 1;
  font-size: 0.47rem;
  font-weight: 700;
  color: #556a8b;
  letter-spacing: 0.08em;
  transform: translateY(11px);
}

.tokens-usage-title {
  margin: 0;
  color: #214fa5;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.score-visual-card {
  width: 100%;
  min-height: 0;
  aspect-ratio: 343 / 99;
  border-radius: 14px;
  border: 1px solid rgba(122, 149, 187, 0.3);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: 0.45rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow: hidden;
}

.score-visual-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(#9dbd41 0deg 292deg, #d8e5b2 292deg 360deg);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.score-visual-ring span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #2152b6;
  font-size: 1.3rem;
  font-weight: 800;
}

.score-visual-content {
  min-width: 0;
  width: 100%;
}

.score-visual-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.score-visual-status {
  color: #8ea83a;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
}

.score-visual-info {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #5a8ad8;
  color: #5a8ad8;
  display: inline-grid;
  place-items: center;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1;
}

.score-visual-metrics {
  margin-top: 0.12rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1rem;
  row-gap: 0;
  width: 100%;
}

.score-metric {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.score-metric-value {
  color: #2c5cb8;
  font-size: 0.94rem;
  font-weight: 500;
}

.score-metric-label {
  margin-top: 0.05rem;
  color: #4d6897;
  font-size: 0.89rem;
  font-weight: 500;
}

.weak-wording-card {
  width: 100%;
  min-height: 0;
  aspect-ratio: 343 / 99;
  border-radius: 14px;
  border: 1px solid #b8c2cd;
  background: #ffffff;
  padding: 0.5rem 0.62rem 0.46rem;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 0.22rem;
  overflow: hidden;
}

.weak-wording-badge {
  margin: 0;
  display: inline-block;
  width: fit-content;
  background: #f3f5f8;
  border: 1px solid #d0d5db;
  border-radius: 999px;
  padding: 0.07rem 0.44rem;
  color: #ea5d00;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.weak-wording-line {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.2;
  color: #2d3138;
  overflow-wrap: anywhere;
}

.weak-wording-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  justify-self: start;
  margin-top: 0.02rem;
  background: #d7dce2;
  border: 1px solid #b5bcc6;
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  color: #535962;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.assist-toggle-card {
  width: 100%;
  min-height: 0;
  aspect-ratio: 343 / 99;
  border-radius: 14px;
  border: 1px solid rgba(122, 149, 187, 0.3);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  display: grid;
  place-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  overflow: hidden;
}

.assist-toggle-title {
  margin: 0;
  text-align: center;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4d71ad;
}

.assist-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.assist-toggle-label-off,
.assist-toggle-label-on {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4d71ad;
}

.assist-toggle-switch {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d7dbe2;
  border: 1px solid rgba(74, 92, 123, 0.24);
  display: inline-flex;
  align-items: center;
  padding: 2px;
  justify-content: flex-start;
}

.assist-toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f5f7fa;
  border: 1px solid rgba(102, 120, 150, 0.3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.image-grid figcaption {
  margin-top: 0.6rem;
  color: #5a6b84;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.final-cta {
  padding-bottom: 4.2rem;
}

.cta-panel {
  text-align: center;
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(440px 200px at 92% 2%, rgba(242, 138, 99, 0.22), transparent 70%),
    linear-gradient(175deg, rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.78));
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}

footer {
  border-top: 1px solid rgba(19, 42, 76, 0.1);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.footer-container {
  width: var(--container);
  margin: 0 auto;
  padding: 1.35rem 0 1.2rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-nav a {
  text-decoration: none;
  color: #4b5f80;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--bright-orange);
}

.footer-separator {
  color: #8aa0c0;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.84rem;
  color: #6f7f96;
}

.mobile-nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
  color: #152f54;
  margin-bottom: 1rem;
}

.mobile-nav-logo img {
  width: 31px;
  height: auto;
}

.hamburger-container {
  position: absolute;
  top: 1.25rem;
  right: 1.1rem;
  width: 26px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 2001;
}

.hamburger-bar {
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: #17345d;
}

/* Mobile-first behavior */
.research-chat-row {
  flex-wrap: wrap;
}

.research-chat-send {
  width: 100%;
  padding: 0.55rem 1rem;
}

.research-chat-input-shell {
  padding-right: 5.2rem;
}

.footer-separator {
  display: inline;
}

@media (min-width: 640px) {
  :root {
    --gutter: 1.2rem;
  }

  .glass-icons-grid {
    gap: 0.66rem;
  }

  .btn {
    min-height: 48px;
    padding: 0.72rem 1.12rem;
  }
}

@media (max-width: 640px) {
  .loader-gif {
    max-width: 60px;
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 1.4rem;
  }

  .hero-block {
    padding-top: 6.4rem;
  }

  .hero-grid {
    grid-template-columns: 1.12fr 1fr;
    gap: 1.2rem;
    align-items: center;
  }

  .feature-highlight,
  .feature-split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem;
  }

  .two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-assist-showcase {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .glass-icons-grid {
    gap: 0.72rem;
  }

  .glass-icon-tile {
    padding: 0.48rem;
  }

  .glass-icon-tile figcaption {
    font-size: 0.82rem;
  }

  #character .image-grid.two-up figure {
    width: min(100%, 520px);
  }

  #plotting .image-grid.two-up figure,
  #research .image-grid.two-up figure {
    width: min(100%, 420px);
  }

  .research-chat-row {
    flex-wrap: nowrap;
  }

  .research-chat-send {
    width: auto;
    padding: 0 1.3rem;
  }

  .research-chat-input-shell {
    padding-right: 5.8rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 1.6rem;
  }

  .hero-block {
    padding-top: 7.5rem;
  }

  .section {
    padding-top: 2.35rem;
  }

  .feature-highlight,
  .feature-split,
  .cta-panel {
    padding: 1.25rem;
  }

  .three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .editorial-assist-showcase {
    gap: 0.72rem;
  }
}

@media (max-width: 767px) {
  .editorial-assist-showcase {
    --composition-card-width: min(88vw, 360px);
  }

  #character .image-grid.two-up,
  #plotting .image-grid.two-up,
  #research .image-grid.two-up {
    --section-card-width: min(88vw, 360px);
  }

  .editorial-assist-showcase figure {
    margin-inline: auto;
    justify-items: center;
  }

  #character .image-grid.two-up figure,
  #plotting .image-grid.two-up figure,
  #research .image-grid.two-up figure {
    margin-inline: auto;
    justify-items: center;
  }

  .editorial-assist-showcase .feature-panel-image {
    width: var(--composition-card-width);
    margin-inline: auto;
  }

  #character .image-grid.two-up .feature-panel-image,
  #plotting .image-grid.two-up .feature-panel-image,
  #research .image-grid.two-up .feature-panel-image {
    width: var(--section-card-width);
    margin-inline: auto;
  }

  .editorial-assist-showcase figcaption {
    width: var(--composition-card-width);
    text-align: center;
  }

  #character .image-grid.two-up figcaption,
  #plotting .image-grid.two-up figcaption,
  #research .image-grid.two-up figcaption {
    width: var(--section-card-width);
    text-align: center;
    margin-inline: auto;
  }
}

@media (max-width: 1025px) {
  .hero-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    gap: 1.35rem;
  }

  .hero-copy {
    max-width: 760px;
    text-align: center;
    margin-inline: auto;
    align-self: center;
  }

  .hero-copy .cta-row {
    justify-content: center;
  }

  .hero-copy .lead {
    margin-inline: auto;
    text-align: center;
  }

  .the-app-preview-shell {
    width: min(760px, 100%);
  }
}

@media (max-width: 420px) {
  .the-app-preview-shell {
    padding: clamp(0.3rem, 1.5vw, 0.5rem);
    border-radius: 14px;
  }

  .glass-icons-grid {
    gap: clamp(0.2rem, 1.1vw, 0.4rem);
  }

  .glass-icon-tile {
    min-height: 0;
    padding: 0.2rem 0.24rem;
    border-radius: 10px;
  }

  .glass-icon-tile figcaption {
    margin-top: 0.28rem;
    font-size: clamp(0.52rem, 2vw, 0.64rem);
  }
}

@media (max-width: 640px) {
  .glass-icon-tile {
    min-height: 0;
    padding: 0.28rem 0.3rem;
  }
}

@media (min-width: 1280px) {
  :root {
    --container-max: 1220px;
  }
}

.mobile-header-hamburger,
.hamburger-container {
  min-width: 44px;
  min-height: 44px;
}

.hamburger-container {
  border: 0;
  background: transparent;
  padding: 0;
}

.mobile-sticky-header {
  z-index: 3100;
}

#sideNav.side-nav {
  position: fixed;
  z-index: 5001;
}

.nav-overlay {
  z-index: 5000;
}

.mobile-header-hamburger {
  border-radius: 10px;
  width: 26px;
  height: 20px;
  justify-content: center;
  gap: 5px;
  margin-right: -10px;
  position: relative;
  z-index: 3102;
}

.hero-block {
  overflow: visible;
}

.mobile-header-hamburger .bar {
  width: 24px;
  height: 2.5px;
  flex: 0 0 2.5px;
  display: block;
  border-radius: 2px;
}

.mobile-header-hamburger:focus-visible,
.hamburger-container:focus-visible,
.btn:focus-visible,
.side-nav a:focus-visible {
  outline: 2px solid rgba(47, 103, 191, 0.9);
  outline-offset: 2px;
}

html.dark-mode body {
  background:
    radial-gradient(1000px 420px at 85% -8%, rgba(242, 138, 99, 0.15), transparent 65%),
    radial-gradient(1200px 650px at -10% 0%, rgba(67, 118, 214, 0.14), transparent 70%),
    linear-gradient(180deg, #0e1625, #131f34 48%, #0f1729);
  color: #e6edf8;
}

html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3 {
  color: #edf3ff;
}

html.dark-mode .desktop-nav-logo span,
html.dark-mode .mobile-sticky-logo span,
html.dark-mode .mobile-nav-logo span {
  color: #ffffff !important;
}

html.dark-mode .mobile-header-hamburger .bar,
html.dark-mode .hamburger-bar {
  background-color: #ffffff !important;
}

html.dark-mode p,
html.dark-mode li,
html.dark-mode .image-grid figcaption {
  color: #b3c1d9;
}

html.dark-mode .section-feature {
  background: linear-gradient(180deg, rgba(16, 27, 46, 0.74), rgba(12, 21, 37, 0.66));
  border-top-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode .feature-highlight,
html.dark-mode .feature-split,
html.dark-mode .cta-panel {
  background: rgba(14, 26, 44, 0.72);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 38px rgba(4, 8, 16, 0.36);
}

html.dark-mode .research-chat-panel {
  border-color: rgba(141, 166, 196, 0.5);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(43, 99, 173, 0.22);
}

html.dark-mode .research-chat-input-shell {
  border-color: #7897c1;
  background: #e9eff7;
}

html.dark-mode .the-app-preview-shell {
  border-color: rgba(172, 200, 245, 0.26);
  background: rgba(23, 38, 62, 0.42);
}

html.dark-mode .glass-icon-tile {
  border-color: rgba(172, 200, 245, 0.2);
  background: rgba(28, 47, 76, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark-mode .glass-icon-tile figcaption {
  color: #dbe8ff;
}

html.dark-mode .modal-content {
  background: rgba(36, 36, 36, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

html.dark-mode .download-modal-large {
  background: rgba(36, 36, 36, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

html.dark-mode #downloadModal h2,
html.dark-mode #downloadModal h3,
html.dark-mode #downloadModal h4 {
  color: #f0f0f0;
}

html.dark-mode #downloadModal p {
  color: #ffffff;
}

html.dark-mode .icon-link img[src*="download-windows"] {
  filter: brightness(0) invert(1);
  border-color: rgba(255, 255, 255, 0.3);
}

html.dark-mode .version-section-title {
  color: #f0f0f0;
}

html.dark-mode .version-item {
  background: rgba(45, 45, 45, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

html.dark-mode .version-history-section {
  border-top-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .version-header h4,
html.dark-mode .toggle-icon,
html.dark-mode .version-description {
  color: #f0f0f0;
  opacity: 1;
}

html.dark-mode .mobile-reminder-email {
  background: rgba(24, 24, 24, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f0f0f0;
}

html.dark-mode .mobile-reminder-status {
  color: inherit;
}

html.dark-mode .mobile-reminder-status.success {
  color: #4ade80;
}

html.dark-mode .mobile-reminder-status.error {
  color: #ff9c95;
}

html.dark-mode .score-visual-card {
  border-color: rgba(122, 149, 187, 0.3);
  background: #ffffff;
}

html.dark-mode .score-visual-ring span {
  background: #ffffff;
  color: #2152b6;
}

html.dark-mode .score-visual-status {
  color: #8ea83a;
}

html.dark-mode .score-visual-info {
  border-color: #5a8ad8;
  color: #5a8ad8;
}

html.dark-mode .score-metric-value {
  color: #2c5cb8;
}

html.dark-mode .score-metric-label {
  color: #4d6897;
}

html.dark-mode .weak-wording-card {
  border-color: #b8c2cd;
  background: #ffffff;
}

html.dark-mode .assist-toggle-card {
  border-color: rgba(122, 149, 187, 0.3);
  background: #ffffff;
}

html.dark-mode .placeholder-image {
  border-color: rgba(157, 183, 225, 0.45);
  color: #d6e4ff;
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(255, 209, 102, 0.16), transparent 50%),
    radial-gradient(120% 120% at 100% 100%, rgba(242, 138, 99, 0.14), transparent 50%),
    repeating-linear-gradient(
      -45deg,
      rgba(174, 198, 238, 0.05),
      rgba(174, 198, 238, 0.05) 10px,
      rgba(174, 198, 238, 0.1) 10px,
      rgba(174, 198, 238, 0.1) 20px
    );
}

html.dark-mode footer {
  background: rgba(14, 23, 39, 0.72);
  border-top-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .footer-nav a {
  color: #b9c8e2;
}

html.dark-mode .footer-nav a:hover {
  color: var(--bright-orange);
}

html.dark-mode .footer-separator,
html.dark-mode .footer-bottom p {
  color: #93a8ca;
}

html.dark-mode .mobile-nav-logo {
  color: #e7efff;
}

html.dark-mode .hamburger-container {
  background: rgba(19, 32, 52, 0.8);
  border-color: rgba(255, 255, 255, 0.14);
}

html.dark-mode .hamburger-bar {
  background: #d2e2ff;
}
