:root {
  --bg: #f8faff;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e5eaf3;
  --line-strong: #d5ddec;
  --purple: #6d5dfc;
  --purple-dark: #5a49e8;
  --purple-soft: #f0edff;
  --blue-soft: #eaf3ff;
  --green: #21a66d;
  --green-soft: #e8f9f0;
  --amber: #f59e0b;
  --amber-soft: #fff3d8;
  --red: #ef4444;
  --red-soft: #ffe7e9;
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.12);
  --radius: 8px;
  --button-radius: var(--radius);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #050816;
  --surface: #0b1020;
  --surface-soft: #11182a;
  --ink: #f8fafc;
  --ink-soft: #d5deea;
  --muted: #98a6ba;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(203, 213, 225, 0.34);
  --purple-soft: rgba(109, 93, 252, 0.18);
  --blue-soft: rgba(14, 165, 233, 0.16);
  --green-soft: rgba(33, 166, 109, 0.16);
  --amber-soft: rgba(245, 158, 11, 0.16);
  --red-soft: rgba(239, 68, 68, 0.16);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  background: #111827;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] body {
  background: #050816;
}

:root[data-theme="light"] body {
  background: #eef3ff;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(105, 64, 255, 0.2), transparent 30rem),
    radial-gradient(circle at 78% 28%, rgba(132, 60, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 48% 78%, rgba(50, 20, 130, 0.28), transparent 38rem),
    linear-gradient(180deg, #040512 0%, #08071d 48%, #040512 100%);
}

.site-backdrop::before,
.site-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-backdrop::before {
  opacity: 0.42;
  background:
    radial-gradient(circle at 8% 31%, rgba(155, 81, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 34% 59%, rgba(155, 81, 255, 0.82) 0 1.5px, transparent 3px),
    radial-gradient(circle at 63% 11%, rgba(155, 81, 255, 0.85) 0 1.5px, transparent 3px),
    radial-gradient(circle at 86% 25%, rgba(155, 81, 255, 0.78) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 77%, rgba(155, 81, 255, 0.72) 0 1.5px, transparent 3px),
    radial-gradient(circle at 16% 72%, rgba(155, 81, 255, 0.72) 0 1.5px, transparent 3px),
    radial-gradient(circle at 42% 16%, rgba(155, 81, 255, 0.22) 0 1px, transparent 2px);
  filter: drop-shadow(0 0 12px rgba(155, 81, 255, 0.7));
}

.site-backdrop::after {
  background:
    radial-gradient(circle, rgba(128, 69, 255, 0.8) 0 1px, transparent 1.6px) 35% 17% / 18px 18px,
    radial-gradient(circle, rgba(128, 69, 255, 0.72) 0 1px, transparent 1.6px) 91% 43% / 18px 18px,
    radial-gradient(circle, rgba(128, 69, 255, 0.52) 0 1px, transparent 1.6px) 50% 92% / 18px 18px,
    linear-gradient(180deg, rgba(3, 4, 13, 0.08), rgba(3, 4, 13, 0.42));
  opacity: 0.08;
}

:root[data-theme="light"] .site-backdrop {
  background:
    radial-gradient(circle at 16% 18%, rgba(120, 99, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 82% 26%, rgba(80, 164, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 48% 82%, rgba(181, 144, 255, 0.18), transparent 38rem),
    linear-gradient(180deg, #f8fbff 0%, #eef3ff 50%, #f7f4ff 100%);
}

:root[data-theme="light"] .site-backdrop::before {
  opacity: 0.22;
  background:
    radial-gradient(circle at 8% 31%, rgba(109, 93, 252, 0.72) 0 1.5px, transparent 3px),
    radial-gradient(circle at 34% 59%, rgba(14, 165, 233, 0.52) 0 1.2px, transparent 3px),
    radial-gradient(circle at 63% 11%, rgba(109, 93, 252, 0.55) 0 1.2px, transparent 3px),
    radial-gradient(circle at 86% 25%, rgba(14, 165, 233, 0.5) 0 1.5px, transparent 3px),
    radial-gradient(circle at 82% 77%, rgba(109, 93, 252, 0.45) 0 1.2px, transparent 3px),
    radial-gradient(circle at 16% 72%, rgba(14, 165, 233, 0.42) 0 1.2px, transparent 3px);
  filter: drop-shadow(0 0 10px rgba(109, 93, 252, 0.35));
}

:root[data-theme="light"] .site-backdrop::after {
  background:
    radial-gradient(circle, rgba(109, 93, 252, 0.42) 0 1px, transparent 1.6px) 35% 17% / 18px 18px,
    radial-gradient(circle, rgba(14, 165, 233, 0.34) 0 1px, transparent 1.6px) 91% 43% / 18px 18px,
    radial-gradient(circle, rgba(109, 93, 252, 0.28) 0 1px, transparent 1.6px) 50% 92% / 18px 18px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(244, 247, 255, 0.32));
  opacity: 0.05;
}

.backdrop-mail-layer {
  position: absolute;
  inset: -8vh 0;
  overflow: hidden;
}

.mail-flight {
  position: absolute;
  top: var(--top);
  left: 0;
  width: 100%;
  height: 0;
  color: rgba(151, 78, 255, 0.92);
  opacity: var(--opacity);
  transform: translateY(var(--lane-shift));
}

:root[data-theme="light"] .mail-flight {
  color: rgba(99, 91, 255, 0.48);
}

.mail-trail {
  position: absolute;
  top: 0;
  left: -10%;
  width: 120%;
  height: calc(var(--trail-width) * 1.25px);
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 5px,
    transparent 5px 16px
  );
  opacity: 0.78;
  filter: drop-shadow(0 0 6px rgba(151, 78, 255, 0.55));
  transform: translateY(-50%);
}

.mail-runner {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform: translateX(var(--from));
  animation: mail-straight var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

.mail-icon {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: var(--mail-size);
  height: var(--mail-size);
  place-items: center;
  color: #9b51ff;
  filter:
    drop-shadow(0 0 7px rgba(151, 78, 255, 0.9))
    drop-shadow(0 0 22px rgba(151, 78, 255, 0.48));
  transform: translate(var(--anchor-x), -50%);
}

:root[data-theme="light"] .mail-icon {
  color: #655bff;
  filter:
    drop-shadow(0 0 6px rgba(101, 91, 255, 0.38))
    drop-shadow(0 0 16px rgba(14, 165, 233, 0.2));
}

.mail-icon svg {
  stroke-width: 1.55;
}

.mail-glow {
  position: absolute;
  top: 0;
  width: calc(var(--mail-size) * 2.3);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(151, 78, 255, 0.32), transparent);
  filter: blur(2px);
  transform: translateY(-50%);
}

:root[data-theme="light"] .mail-glow {
  background: linear-gradient(90deg, transparent, rgba(101, 91, 255, 0.2), transparent);
}

.mail-flight[data-direction="ltr"] .mail-glow {
  right: calc(var(--mail-size) * 0.6);
}

.mail-flight[data-direction="rtl"] .mail-glow {
  left: calc(var(--mail-size) * 0.6);
}

@keyframes mail-straight {
  from {
    transform: translateX(var(--from));
  }

  to {
    transform: translateX(var(--to));
  }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop-mail-layer {
    display: none;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input[type="number"] {
  min-height: 44px;
}

button,
a {
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    color 180ms var(--ease);
}

button {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
}

button:hover,
a:hover {
  transform: translateY(-1px);
}

button:active,
a:active {
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(109, 93, 252, 0.18);
  outline-offset: 2px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.lucide-icon {
  display: inline-grid;
  width: var(--icon-size, 20px);
  height: var(--icon-size, 20px);
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
  line-height: 0;
}

.lucide-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: var(--icon-stroke, 2);
}

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

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1850px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 54px 40px;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  justify-items: stretch;
  align-items: flex-start;
}

.brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-self: start;
  gap: 6px;
  min-height: 44px;
}

.brand:focus-visible {
  outline: 0;
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 44vw;
  height: auto;
}

.brand-logo-light {
  display: none;
}

.brand-tagline {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  justify-self: end;
  align-items: center;
  width: 68px;
  min-height: 36px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  margin-top: 4px;
  backdrop-filter: blur(18px);
  transition:
    background 180ms var(--ease),
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    transform 180ms var(--ease);
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.toggle-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.toggle-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.3;
}

.sun-icon,
.moon-icon {
  transition: color 180ms var(--ease), opacity 180ms var(--ease);
}

:root[data-theme="dark"] .sun-icon,
:root[data-theme="light"] .moon-icon {
  opacity: 0.58;
}

:root[data-theme="dark"] .moon-icon,
:root[data-theme="light"] .sun-icon {
  opacity: 1;
}

:root[data-theme="dark"] .moon-icon svg {
  transform: translateX(3.5px);
}

:root[data-theme="light"] .theme-toggle {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.48);
  color: rgba(15, 23, 42, 0.62);
}

:root[data-theme="dark"] .theme-toggle::before {
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(32px);
}

:root[data-theme="light"] .theme-toggle::before {
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(0);
}

:root[data-theme="light"] .hero h1 {
  color: #ffffff;
}

:root[data-theme="light"] .brand-logo-dark {
  display: none;
}

:root[data-theme="light"] .brand-logo-light {
  display: block;
}

:root[data-theme="light"] .brand-tagline {
  color: rgba(255, 255, 255, 0.84);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #42b5ff, #7c5cff);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(109, 93, 252, 0.22);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.hero {
  display: grid;
  justify-items: center;
  padding: 40px 0 42px;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 3.2vw, 52px);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-shadow: 0 16px 46px rgba(0, 0, 0, 0.3);
}

.hero p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 1.4vw, 22px);
  font-weight: 650;
  line-height: 1.35;
}

.status-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}

.status-help {
  position: relative;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: help;
  opacity: 0.88;
  transition: opacity 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.status-help::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 12px);
  right: -12px;
  z-index: 8;
  width: min(310px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}

.status-help:hover,
.status-help:focus-visible {
  border-color: rgba(109, 93, 252, 0.34);
  color: var(--purple);
  opacity: 1;
}

.status-help:hover::after,
.status-help:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.input-tabs .status-pill {
  margin-left: auto;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.status-pill[data-state="ready"]::before {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(33, 166, 109, 0.14);
}

.status-pill[data-state="warning"]::before {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.status-pill[data-state="error"]::before {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.status-pill[data-state="loading"]::before {
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.15);
  animation: pulse 1.2s var(--ease) infinite;
}

@keyframes pulse {
  50% {
    transform: scale(0.72);
    opacity: 0.72;
  }
}

.app-main {
  display: grid;
  gap: 36px;
  transition: gap 320ms var(--ease);
}

.content-reveal {
  animation: reveal-section 520ms var(--ease) both;
  animation-delay: var(--reveal-delay, 0ms);
}

.controls-card.content-reveal {
  --reveal-delay: 60ms;
}

.preview-grid.content-reveal {
  --reveal-delay: 120ms;
}

.analysis-summary-card.content-reveal {
  --reveal-delay: 180ms;
}

.full-analysis-section.content-reveal {
  --reveal-delay: 240ms;
}

body.is-empty .app-main {
  gap: 0;
}

body.is-empty .content-reveal,
body.is-empty .footer-actions {
  display: none;
}

body.is-empty .input-tabs .status-pill {
  display: none;
}

body.is-empty .input-tabs .status-pill[data-state="loading"],
body.is-empty .input-tabs .status-pill[data-state="warning"] {
  display: inline-flex;
}

body.is-empty .source-panel {
  max-width: 1320px;
  margin-inline: auto;
}

body.is-empty .hero {
  padding-bottom: 30px;
}

body.is-empty .input-grid {
  align-items: stretch;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.76fr);
  padding-top: 30px;
}

body.is-empty .dropzone {
  min-height: 360px;
}

body.is-empty .input-footer {
  justify-content: center;
  padding-top: 0;
}

body.is-empty .tip {
  justify-content: center;
  width: 100%;
  text-align: center;
}

@keyframes reveal-section {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.input-card,
.preview-pane,
.controls-card,
.analysis-summary-card,
.health-summary-card,
.results-section {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.input-card {
  overflow: hidden;
}

.input-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 42px;
  border-bottom: 1px solid var(--line);
}

.input-token {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.input-token svg {
  width: 18px;
  height: 18px;
  color: var(--purple);
}

.mjml-logo path:first-child {
  stroke-width: 2.25;
}

.url-loader {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 24px 42px 0;
}

.url-loader label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.url-field {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.url-field:focus-within {
  border-color: rgba(109, 93, 252, 0.45);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.1);
}

.url-field svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
  flex: 0 0 auto;
}

.url-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.url-field input::placeholder {
  color: #aab4c3;
}

.url-button {
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid rgba(109, 93, 252, 0.22);
  background: var(--purple);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 14px 28px rgba(109, 93, 252, 0.22);
}

.url-button:hover:not(:disabled) {
  background: var(--purple-dark);
  box-shadow: 0 18px 34px rgba(109, 93, 252, 0.28);
}

.url-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button,
.export-button,
.share-button {
  min-height: 50px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1f2937;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

.input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.88fr);
  gap: clamp(28px, 3vw, 48px);
  padding: 32px 42px 24px;
}

.paste-panel {
  display: grid;
  gap: 18px;
}

.panel-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.panel-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.editor-shell {
  position: relative;
  height: 285px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.editor-shell:focus-within {
  border-color: rgba(109, 93, 252, 0.45);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.1);
}

.source-highlight,
#sourceInput {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 28px 30px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.source-highlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  overflow: auto;
  color: #182033;
  pointer-events: none;
  scrollbar-width: none;
}

.source-highlight::-webkit-scrollbar {
  display: none;
}

#sourceInput {
  position: relative;
  z-index: 2;
  display: block;
  resize: none;
  overflow: auto;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #182033;
}

.editor-shell.has-code #sourceInput {
  color: transparent;
  caret-color: var(--ink);
  -webkit-text-fill-color: transparent;
}

#sourceInput::placeholder {
  color: #c9d1dd;
  -webkit-text-fill-color: #c9d1dd;
}

.syntax-comment {
  color: #8a98ad;
  font-style: italic;
}

.syntax-doctype,
.syntax-punctuation {
  color: #7f8da3;
}

.syntax-tag-name {
  color: #5b4de8;
  font-weight: 800;
}

.syntax-attribute {
  color: #0f7ea8;
}

.syntax-operator {
  color: #8a98ad;
}

.syntax-string {
  color: #b15f00;
}

.dropzone {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 340px;
  padding: 34px;
  border: 3px dashed rgba(109, 93, 252, 0.48);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(109, 93, 252, 0.03), rgba(255, 255, 255, 0.72));
  color: var(--ink);
  text-align: center;
}

.dropzone:hover,
.source-panel.is-dragging .dropzone {
  border-color: var(--purple);
  background: var(--purple-soft);
  box-shadow: 0 18px 42px rgba(109, 93, 252, 0.12);
}

.dropzone-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  place-items: center;
  color: var(--purple);
}

.dropzone-icon svg {
  width: 72px;
  height: 72px;
  stroke-width: 1.7;
}

.dropzone strong {
  font-size: 21px;
}

.dropzone span:not(.dropzone-icon) {
  margin-top: 6px;
  color: var(--purple);
  font-size: 18px;
}

.dropzone small {
  margin-top: 28px;
  color: #64748b;
  font-size: 16px;
  font-weight: 800;
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 42px 30px;
}

.tip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.tip svg {
  width: 22px;
  height: 22px;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.secondary-button,
.export-button {
  padding: 0 22px;
}

.icon-button-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  border-color: rgba(109, 93, 252, 0.22);
  background: #ffffff;
  color: var(--purple);
}

.share-button svg {
  width: 19px;
  height: 19px;
}

.share-button[data-state="loading"] {
  cursor: wait;
  opacity: 0.72;
}

.share-privacy-note {
  max-width: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.asset-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(33, 166, 109, 0.22);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.asset-summary[hidden] {
  display: none;
}

.asset-summary svg {
  width: 15px;
  height: 15px;
}

.secondary-button:hover,
.export-button:hover,
.share-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

#sourceMeta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.preview-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 0 62px;
  background: linear-gradient(180deg, #745cff, #604be6);
  color: #ffffff;
  font-size: 19px;
  box-shadow: 0 18px 34px rgba(109, 93, 252, 0.28);
}

.preview-button:hover {
  box-shadow: 0 22px 44px rgba(109, 93, 252, 0.34);
}

.preview-button svg {
  width: 24px;
  height: 24px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 56px);
}

.preview-pane {
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 98px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.preview-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.preview-header h2 svg {
  width: 28px;
  height: 28px;
}

.preview-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.preview-tools span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(109, 93, 252, 0.25);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.preview-tools .preview-mode-badge {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  color: var(--ink-soft);
}

.preview-tools .preview-width-badge {
  justify-content: center;
  min-width: 92px;
}

.frame-stage {
  max-height: 815px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px;
  background: #ffffff;
}

.frame-stage::-webkit-scrollbar {
  width: 14px;
}

.frame-stage::-webkit-scrollbar-track {
  background: #edf1f7;
}

.frame-stage::-webkit-scrollbar-thumb {
  border: 3px solid #edf1f7;
  border-radius: 999px;
  background: #c6cfdd;
}

.dark-stage {
  background: #111317;
}

.dark-stage::-webkit-scrollbar-track {
  background: #25272d;
}

.dark-stage::-webkit-scrollbar-thumb {
  border-color: #25272d;
  background: #5b606b;
}

.frame-shell {
  max-width: 100%;
  margin: 0 auto;
}

.frame-shell iframe {
  display: block;
  width: 640px;
  height: 360px;
  border: 0;
  border-radius: var(--radius);
  background: #ffffff;
  pointer-events: none;
  transform-origin: top left;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.dark-stage iframe {
  background: #111111;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38);
}

.controls-card {
  display: grid;
  gap: 14px;
  padding: 22px 28px;
}

.control-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.control-group label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.width-control {
  display: grid;
  gap: 8px;
}

.control-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.width-segmented {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.width-option {
  display: grid;
  min-width: 0;
  min-height: 54px;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  text-align: center;
  box-shadow: none;
}

.width-option strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: none;
}

.width-option span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: none;
}

.width-option:hover {
  background: rgba(109, 93, 252, 0.07);
  transform: none;
}

.width-option.is-active {
  border-color: rgba(109, 93, 252, 0.24);
  background: #ffffff;
  color: var(--purple);
  box-shadow: 0 10px 24px rgba(109, 93, 252, 0.12);
}

.width-option.is-active strong {
  color: var(--purple);
}

.control-group select,
.control-group input {
  width: 170px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0 13px;
  box-shadow: var(--shadow-sm);
}

.control-group input:disabled {
  color: #94a3b8;
  background: #f2f5fa;
}

.dark-model-control {
  min-width: 210px;
}

.control-help,
.control-disclaimer {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.control-help {
  max-width: 240px;
}

.control-disclaimer {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.analysis-summary-card {
  display: grid;
  gap: 18px;
  padding: 22px 28px;
}

.analysis-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.analysis-summary-heading > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analysis-summary-heading h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.analysis-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}

.analysis-toggle:hover {
  border-color: rgba(109, 93, 252, 0.26);
  background: rgba(109, 93, 252, 0.08);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.analysis-toggle-chevron {
  transition: transform 180ms var(--ease);
}

.analysis-toggle[aria-expanded="true"] .analysis-toggle-chevron {
  transform: rotate(180deg);
}

.analysis-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analysis-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.analysis-pill.good {
  border-color: rgba(33, 166, 109, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.analysis-pill.warning {
  border-color: rgba(245, 154, 35, 0.24);
  background: var(--amber-soft);
  color: var(--amber);
}

.analysis-pill.error {
  border-color: rgba(239, 70, 70, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.full-analysis-section {
  display: grid;
}

.full-analysis-body {
  display: grid;
  gap: 24px;
  animation: reveal-section 420ms var(--ease) both;
}

.full-analysis-body[hidden] {
  display: none;
}

.health-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(240px, auto);
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
}

.summary-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.summary-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #2885ef;
}

.health-summary-card[data-state="good"] .summary-icon {
  background: var(--green-soft);
  color: var(--green);
}

.health-summary-card[data-state="warning"] .summary-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.health-summary-card[data-state="error"] .summary-icon {
  background: var(--red-soft);
  color: var(--red);
}

.summary-eyebrow,
.client-presets > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-intro h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.summary-intro p {
  max-width: 590px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 10px;
}

.summary-metric {
  display: grid;
  min-width: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.summary-metric strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.summary-metric small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-metric.pass strong {
  color: var(--green);
}

.summary-metric.warning strong {
  color: var(--amber);
}

.summary-metric.issue strong {
  color: var(--red);
}

.client-presets {
  display: grid;
  gap: 8px;
}

.client-presets > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.client-preset {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.client-preset.is-active {
  border-color: rgba(109, 93, 252, 0.28);
  background: var(--purple-soft);
  color: var(--purple);
}

.results-section {
  padding: 34px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.results-header > div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.results-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
}

.results-icon svg {
  width: 25px;
  height: 25px;
}

.results-header h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.results-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.export-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.export-button svg {
  width: 20px;
  height: 20px;
}

.diagnostics {
  display: grid;
  gap: 24px;
}

.results-panel h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 16px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.section-title-row h3 {
  margin: 0;
}

.section-info {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: help;
  box-shadow: var(--shadow-sm);
}

.section-info::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 4;
  width: 240px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}

.section-info:hover::after,
.section-info:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

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

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

.result-card {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 0;
  min-height: 235px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}

.result-info {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: help;
  box-shadow: var(--shadow-sm);
}

.result-info::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 3;
  width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}

.result-info:hover::after,
.result-info:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.result-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.result-icon {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #2885ef;
  font-size: 18px;
  font-weight: 950;
}

.result-icon svg {
  width: var(--icon-size, 28px);
  height: var(--icon-size, 28px);
}

.result-info svg {
  width: var(--icon-size, 13px);
  height: var(--icon-size, 13px);
}

.result-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.result-card p {
  max-width: 210px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.result-card.good .result-icon {
  background: var(--green-soft);
  color: var(--green);
}

.result-card.warn .result-icon,
.result-card.warning .result-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.result-card.bad .result-icon,
.result-card.error .result-icon {
  background: var(--red-soft);
  color: var(--red);
}

.result-card.neutral .result-icon {
  background: var(--blue-soft);
  color: #2885ef;
}

.full-analysis-body .health-summary-card {
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
}

.full-analysis-body .results-section {
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.full-analysis-body .results-header {
  margin-bottom: 22px;
}

.full-analysis-body .diagnostics {
  gap: 20px;
}

.full-analysis-body .result-grid {
  gap: 14px;
}

.full-analysis-body .result-card {
  min-height: 175px;
  padding: 20px 18px;
  border-radius: 20px;
}

.full-analysis-body .result-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
}

.full-analysis-body .result-card strong {
  font-size: 16px;
}

.full-analysis-body .result-card p {
  margin-top: 7px;
  font-size: 13px;
}

.tracking-check-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  justify-items: stretch;
  min-height: 0;
  gap: 22px;
  padding: 30px;
  text-align: left;
}

.tracking-check-card .result-icon {
  width: 64px;
  height: 64px;
  margin: 0;
}

.full-analysis-body .tracking-check-card {
  gap: 18px;
  padding: 24px;
}

.tracking-check-card .result-icon svg {
  width: var(--icon-size, 28px);
  height: var(--icon-size, 28px);
}

.tracking-card-body {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.tracking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.tracking-check-card strong {
  font-size: 20px;
}

.tracking-check-card p {
  max-width: none;
  margin: 0;
  color: var(--muted);
}

.tracking-status {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.tracking-status[data-state="good"] {
  background: var(--green-soft);
  color: var(--green);
}

.tracking-status[data-state="warning"] {
  background: var(--amber-soft);
  color: var(--amber);
}

.tracking-status[data-state="error"] {
  background: var(--red-soft);
  color: var(--red);
}

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

.tracking-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tracking-stat strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.tracking-stat small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.tracking-expander {
  display: grid;
  gap: 14px;
}

.tracking-expander summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  box-shadow: var(--shadow-sm);
}

.tracking-expander summary::-webkit-details-marker {
  display: none;
}

.tracking-expander summary svg {
  transition: transform 180ms var(--ease);
}

.tracking-expander[open] summary svg {
  transform: rotate(180deg);
}

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

.tracking-detail {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 250, 255, 0.72);
}

.tracking-detail h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.tracking-chip-list,
.tracking-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracking-chip-list li {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.tracking-list {
  display: grid;
  gap: 7px;
}

.tracking-list li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.tracking-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.55;
}

.tracking-detail-wide {
  grid-column: 1 / -1;
}

.affected-link-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.affected-link-list li {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.affected-link-list strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affected-link-list span {
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affected-link-list small {
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.affected-links-more {
  display: grid;
  gap: 10px;
}

.affected-links-more summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  box-shadow: var(--shadow-sm);
}

.affected-links-more summary::-webkit-details-marker {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.share-modal[hidden] {
  display: none;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 22, 0.66);
  backdrop-filter: blur(14px);
}

.share-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 620px);
  gap: 18px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.share-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.share-close svg {
  width: 18px;
  height: 18px;
}

.share-dialog-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
}

.share-dialog-icon svg {
  width: 27px;
  height: 27px;
}

.share-dialog h2 {
  margin: 0;
  padding-right: 48px;
  font-size: 28px;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.share-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.share-url-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.share-url-card label,
.share-expiry span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-url-control {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.share-url-card input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 750;
}

.share-url-card input:focus {
  outline: none;
}

.share-url-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  padding: 6px;
}

.share-url-action {
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--purple);
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    color 160ms var(--ease),
    transform 160ms var(--ease);
}

.share-url-action:hover,
.share-url-action:focus-visible {
  background: rgba(109, 93, 252, 0.14);
  color: var(--purple-dark);
}

.share-url-action:focus-visible {
  outline: 2px solid rgba(109, 93, 252, 0.38);
  outline-offset: 2px;
}

.share-url-action:active {
  transform: translateY(1px);
}

.share-url-action.is-copied {
  background: var(--green-soft);
  color: var(--green);
}

.zip-dialog {
  width: min(100%, 680px);
}

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

.zip-choice-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 76px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.zip-choice-button:hover {
  border-color: rgba(109, 93, 252, 0.34);
  background: var(--purple-soft);
  box-shadow: var(--shadow-md);
}

.zip-choice-button strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.zip-choice-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.share-expiry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(109, 93, 252, 0.2);
  border-radius: var(--radius);
  background: var(--purple-soft);
}

.share-expiry strong {
  font-size: 15px;
}

.share-warning {
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: #9a5b05 !important;
}

.feedback-dialog {
  width: min(100%, 560px);
}

.feedback-form {
  display: grid;
  gap: 16px;
  margin-top: 4px;
  text-align: left;
}

.feedback-field {
  display: grid;
  gap: 8px;
}

.feedback-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.feedback-field label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.feedback-field input,
.feedback-field select {
  min-height: 52px;
  padding: 0 15px;
}

.feedback-field textarea {
  min-height: 132px;
  padding: 15px;
  line-height: 1.45;
  resize: vertical;
}

.feedback-field input:hover,
.feedback-field select:hover,
.feedback-field textarea:hover,
.feedback-field input:focus,
.feedback-field select:focus,
.feedback-field textarea:focus {
  border-color: rgba(109, 93, 252, 0.34);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.12);
  outline: none;
}

.feedback-field textarea::placeholder,
.feedback-field input::placeholder {
  color: #98a2b3;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.feedback-actions .secondary-button,
.feedback-actions .share-button {
  min-height: 50px;
}

.shared-shell {
  max-width: 1500px;
}

.shared-header {
  grid-template-columns: 1fr auto;
}

.shared-hero {
  padding-bottom: 28px;
}

.shared-main {
  gap: 28px;
}

.shared-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.shared-toolbar-copy {
  display: grid;
  gap: 3px;
  max-width: 210px;
}

.shared-toolbar-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.shared-toolbar-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.shared-toolbar-controls {
  display: grid;
  grid-template-areas:
    "width width"
    "dark view";
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 14px;
  width: 100%;
}

.shared-width-segmented {
  grid-area: width;
  min-width: 0;
}

.shared-dark-model-control {
  display: grid;
  grid-area: dark;
  gap: 8px;
  min-width: 0;
}

.shared-dark-model-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shared-dark-model-control select {
  width: 100%;
  min-height: 46px;
  padding: 0 42px 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  box-shadow: var(--shadow-sm);
}

.shared-dark-model-control small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.shared-view-switch {
  display: inline-flex;
  grid-area: view;
  gap: 6px;
  justify-self: end;
  min-width: 292px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.shared-view-option {
  flex: 1;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

.shared-view-option:hover,
.shared-view-option.is-active {
  background: rgba(109, 93, 252, 0.07);
  color: var(--purple);
  transform: none;
}

.shared-view-option.is-active {
  border-color: rgba(109, 93, 252, 0.24);
  box-shadow: 0 10px 24px rgba(109, 93, 252, 0.12);
}

.shared-notice {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px;
}

.shared-notice-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
}

.shared-notice strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.shared-privacy-line {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.shared-notice p:not(.shared-privacy-line) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.shared-preview-grid .frame-stage {
  max-height: 760px;
}

.shared-preview-grid[data-view="light"],
.shared-preview-grid[data-view="dark"] {
  grid-template-columns: 1fr;
}

.shared-preview-grid[data-view="light"] .preview-pane:nth-child(2),
.shared-preview-grid[data-view="dark"] .preview-pane:nth-child(1) {
  display: none;
}

@media (max-width: 1180px) {
  .shared-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .shared-toolbar-copy {
    max-width: none;
  }
}

.expired-preview {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
}

.expired-card {
  display: grid;
  justify-items: center;
  width: min(100%, 560px);
  padding: 42px;
  text-align: center;
}

.expired-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 950;
}

.expired-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  letter-spacing: -0.04em;
}

.expired-card p {
  max-width: 420px;
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.expired-home {
  display: inline-flex;
  min-height: 54px;
  padding: 0 24px;
}

.shared-expired-state {
  margin: 0 auto;
}

:root[data-theme="dark"] .input-card,
:root[data-theme="dark"] .preview-pane,
:root[data-theme="dark"] .controls-card,
:root[data-theme="dark"] .analysis-summary-card,
:root[data-theme="dark"] .health-summary-card,
:root[data-theme="dark"] .results-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(8, 13, 27, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

:root[data-theme="dark"] .input-tabs,
:root[data-theme="dark"] .preview-header {
  border-color: var(--line);
}

:root[data-theme="dark"] .input-token,
:root[data-theme="dark"] .panel-copy h2,
:root[data-theme="dark"] .dropzone,
:root[data-theme="dark"] .preview-header h2 strong,
:root[data-theme="dark"] .analysis-summary-heading h2,
:root[data-theme="dark"] .results-header h2,
:root[data-theme="dark"] .results-panel h3,
:root[data-theme="dark"] .summary-intro h2,
:root[data-theme="dark"] .result-card strong,
:root[data-theme="dark"] .summary-metric strong,
:root[data-theme="dark"] .affected-link-list strong,
:root[data-theme="dark"] .share-dialog h2,
:root[data-theme="dark"] .feedback-field label,
:root[data-theme="dark"] .share-expiry strong,
:root[data-theme="dark"] .shared-notice strong,
:root[data-theme="dark"] .expired-card h1 {
  color: var(--ink);
}

:root[data-theme="dark"] .panel-copy p,
:root[data-theme="dark"] .tip,
:root[data-theme="dark"] #sourceMeta,
:root[data-theme="dark"] .share-privacy-note,
:root[data-theme="dark"] .summary-eyebrow,
:root[data-theme="dark"] .analysis-summary-heading > div > span,
:root[data-theme="dark"] .summary-intro p,
:root[data-theme="dark"] .summary-metric small,
:root[data-theme="dark"] .client-presets > span,
:root[data-theme="dark"] .results-header p,
:root[data-theme="dark"] .result-card p,
:root[data-theme="dark"] .dropzone small,
:root[data-theme="dark"] .control-group label,
:root[data-theme="dark"] .control-label,
:root[data-theme="dark"] .control-help,
:root[data-theme="dark"] .control-disclaimer p,
:root[data-theme="dark"] .url-loader label,
:root[data-theme="dark"] .shared-dark-model-control span,
:root[data-theme="dark"] .shared-dark-model-control small,
:root[data-theme="dark"] .share-dialog p,
:root[data-theme="dark"] .feedback-field label span,
:root[data-theme="dark"] .share-url-card label,
:root[data-theme="dark"] .share-expiry span,
:root[data-theme="dark"] .shared-privacy-line,
:root[data-theme="dark"] .shared-notice p,
:root[data-theme="dark"] .expired-card p {
  color: var(--muted);
}

:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .status-help,
:root[data-theme="dark"] .status-help::after,
:root[data-theme="dark"] .url-field,
:root[data-theme="dark"] .editor-shell,
:root[data-theme="dark"] .shared-view-switch,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .export-button,
:root[data-theme="dark"] .analysis-toggle,
:root[data-theme="dark"] .analysis-pill,
:root[data-theme="dark"] .share-button,
:root[data-theme="dark"] .share-dialog,
:root[data-theme="dark"] .share-close,
:root[data-theme="dark"] .zip-choice-button,
:root[data-theme="dark"] .summary-metric,
:root[data-theme="dark"] .client-preset,
:root[data-theme="dark"] .tracking-expander summary,
:root[data-theme="dark"] .affected-links-more summary,
:root[data-theme="dark"] .affected-link-list li,
:root[data-theme="dark"] .share-url-card,
:root[data-theme="dark"] .share-url-control,
:root[data-theme="dark"] .share-url-card input,
:root[data-theme="dark"] .preview-header,
:root[data-theme="dark"] .preview-tools span,
:root[data-theme="dark"] .width-segmented,
:root[data-theme="dark"] .shared-dark-model-control select,
:root[data-theme="dark"] .control-group select,
:root[data-theme="dark"] .control-group input,
:root[data-theme="dark"] .feedback-field input,
:root[data-theme="dark"] .feedback-field select,
:root[data-theme="dark"] .feedback-field textarea,
:root[data-theme="dark"] .result-card,
:root[data-theme="dark"] .result-info,
:root[data-theme="dark"] .result-info::after {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.88);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

:root[data-theme="dark"] .width-option {
  color: var(--muted);
}

:root[data-theme="dark"] .width-option strong {
  color: var(--ink-soft);
}

:root[data-theme="dark"] .width-option.is-active {
  border-color: rgba(129, 140, 248, 0.36);
  background: rgba(109, 93, 252, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .width-option.is-active strong {
  color: #b8b1ff;
}

:root[data-theme="dark"] .shared-view-option {
  color: var(--muted);
}

:root[data-theme="dark"] .shared-view-option:hover,
:root[data-theme="dark"] .shared-view-option.is-active {
  background: rgba(109, 93, 252, 0.18);
  color: #b8b1ff;
}

:root[data-theme="dark"] .asset-summary {
  border-color: rgba(33, 166, 109, 0.28);
  background: rgba(33, 166, 109, 0.15);
}

:root[data-theme="dark"] .analysis-pill.good {
  border-color: rgba(33, 166, 109, 0.3);
  background: rgba(33, 166, 109, 0.16);
  color: var(--green);
}

:root[data-theme="dark"] .analysis-pill.warning {
  border-color: rgba(245, 154, 35, 0.32);
  background: rgba(245, 154, 35, 0.16);
  color: var(--amber);
}

:root[data-theme="dark"] .analysis-pill.error {
  border-color: rgba(239, 70, 70, 0.32);
  background: rgba(239, 70, 70, 0.16);
  color: var(--red);
}

:root[data-theme="dark"] .zip-choice-button:hover {
  border-color: rgba(129, 140, 248, 0.38);
  background: rgba(109, 93, 252, 0.18);
}

:root[data-theme="dark"] .tracking-stat,
:root[data-theme="dark"] .tracking-detail,
:root[data-theme="dark"] .tracking-chip-list li,
:root[data-theme="dark"] .tracking-status,
:root[data-theme="dark"] .shared-notice-icon {
  border-color: var(--line);
  background: rgba(8, 13, 27, 0.58);
}

:root[data-theme="dark"] .client-preset.is-active {
  border-color: rgba(129, 140, 248, 0.38);
  background: rgba(109, 93, 252, 0.18);
  color: #b8b1ff;
}

:root[data-theme="dark"] .affected-link-list span {
  color: var(--muted);
}

:root[data-theme="dark"] .summary-metric.pass strong {
  color: var(--green);
}

:root[data-theme="dark"] .summary-metric.warning strong {
  color: var(--amber);
}

:root[data-theme="dark"] .summary-metric.issue strong {
  color: var(--red);
}

:root[data-theme="dark"] .url-field input,
:root[data-theme="dark"] #sourceInput,
:root[data-theme="dark"] .share-url-card input,
:root[data-theme="dark"] .share-url-control input,
:root[data-theme="dark"] .feedback-field input,
:root[data-theme="dark"] .feedback-field select,
:root[data-theme="dark"] .feedback-field textarea {
  color: var(--ink);
}

:root[data-theme="dark"] .share-url-control input {
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .url-field input::placeholder,
:root[data-theme="dark"] #sourceInput::placeholder {
  color: #64748b;
  -webkit-text-fill-color: #64748b;
}

:root[data-theme="dark"] .editor-shell.has-code #sourceInput {
  caret-color: var(--ink);
}

:root[data-theme="dark"] .source-highlight {
  color: var(--ink);
}

:root[data-theme="dark"] .syntax-comment {
  color: #71809a;
}

:root[data-theme="dark"] .syntax-doctype,
:root[data-theme="dark"] .syntax-punctuation,
:root[data-theme="dark"] .syntax-operator {
  color: #8190a8;
}

:root[data-theme="dark"] .syntax-tag-name {
  color: #a89cff;
}

:root[data-theme="dark"] .syntax-attribute {
  color: #66d3f3;
}

:root[data-theme="dark"] .syntax-string {
  color: #f1b36d;
}

:root[data-theme="dark"] .control-group input:disabled {
  background: rgba(30, 41, 59, 0.76);
  color: #64748b;
}

:root[data-theme="dark"] .dropzone {
  border-color: rgba(129, 140, 248, 0.5);
  background: linear-gradient(180deg, rgba(109, 93, 252, 0.08), rgba(15, 23, 42, 0.42));
}

:root[data-theme="dark"] .dropzone:hover,
:root[data-theme="dark"] .source-panel.is-dragging .dropzone {
  background: rgba(109, 93, 252, 0.16);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .frame-stage {
  background: #111827;
}

:root[data-theme="dark"] .frame-stage::-webkit-scrollbar-track {
  background: #1f2937;
}

:root[data-theme="dark"] .frame-stage::-webkit-scrollbar-thumb {
  border-color: #1f2937;
  background: #475569;
}

:root[data-theme="dark"] .frame-shell iframe {
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .preview-mode-badge {
  background: rgba(15, 23, 42, 0.92);
}

:root[data-theme="dark"] .share-expiry {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(109, 93, 252, 0.16);
}

:root[data-theme="dark"] .share-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.13);
  color: #f8d490 !important;
}

:root[data-theme="dark"] .section-info,
:root[data-theme="dark"] .section-info::after {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.92);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .result-info::after {
  color: var(--ink-soft);
}

.site-footer {
  display: grid;
  gap: 24px;
  padding: 16px 14px 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  font-weight: 700;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.footer-link {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  box-shadow: none;
}

.footer-link:hover {
  color: #ffffff;
}

:root[data-theme="light"] .site-footer {
  color: rgba(255, 255, 255, 0.78);
}

.footer-signup {
  display: grid;
  grid-template-areas:
    "copy form"
    "helper helper"
    "message message";
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 18px 24px;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(8, 13, 27, 0.44);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.footer-signup-copy {
  grid-area: copy;
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
}

.footer-signup-copy strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.footer-signup-copy span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 750;
}

.footer-signup-form {
  grid-area: form;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.footer-signup-form input {
  min-width: 0;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.footer-signup-form input::placeholder {
  color: #98a2b3;
}

.footer-signup-form input:hover,
.footer-signup-form input:focus {
  border-color: rgba(129, 140, 248, 0.48);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.14), 0 14px 34px rgba(0, 0, 0, 0.14);
  outline: none;
}

.footer-signup-form input[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.72);
}

.footer-signup-form button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #1f1b54;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.footer-signup-form button:hover {
  background: var(--purple);
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-signup-message {
  grid-area: message;
  min-height: 18px;
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.footer-signup-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-signup-message[data-state="error"] {
  color: #f8d490;
}

.footer-signup-message[data-state="success"] {
  color: var(--green);
}

:root[data-theme="light"] .footer-signup {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 18px 54px rgba(80, 92, 140, 0.16);
}

:root[data-theme="light"] .footer-signup-copy strong {
  color: #ffffff;
}

:root[data-theme="light"] .footer-signup-copy span,
:root[data-theme="light"] .footer-signup-message {
  color: rgba(255, 255, 255, 0.76);
}

@media (max-width: 1320px) {
  .health-summary-card {
    grid-template-areas:
      "intro metrics"
      "presets presets";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }

  .summary-intro {
    grid-area: intro;
  }

  .summary-metrics {
    grid-area: metrics;
  }

  .client-presets {
    grid-area: presets;
  }

  .client-presets > div {
    justify-content: flex-start;
  }

  .input-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-actions {
    justify-content: flex-start;
  }

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

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

@media (max-width: 1100px) {
  .input-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  body.is-empty .input-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 24px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    justify-items: stretch;
    gap: 18px;
  }

  .hero {
    padding: 30px 0 34px;
  }

  .input-footer,
  .results-header,
  .site-footer,
  .footer-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-signup {
    grid-template-areas:
      "copy"
      "form"
      "message";
    grid-template-columns: 1fr;
    width: 100%;
  }

  .input-tabs {
    flex-wrap: wrap;
    gap: 12px;
    padding: 22px 24px;
  }

  .input-tabs .status-pill {
    margin-left: 0;
  }

  .input-token {
    font-size: 13px;
  }

  .url-loader {
    grid-template-columns: 1fr;
    padding: 22px 24px 0;
  }

  .url-button {
    width: 100%;
  }

  .input-grid,
  .input-footer,
  .analysis-summary-card,
  .results-section {
    padding-right: 24px;
    padding-left: 24px;
  }

  .footer-actions,
  .control-group {
    justify-content: flex-start;
  }

  .width-control {
    width: 100%;
  }

  .width-segmented {
    flex-wrap: wrap;
  }

  .width-option {
    flex: 1 1 150px;
  }
  .summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .shared-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .shared-toolbar-controls {
    grid-template-areas:
      "width"
      "dark"
      "view";
    grid-template-columns: 1fr;
  }

  .shared-view-switch {
    justify-self: stretch;
    min-width: 0;
    width: 100%;
  }

  .shared-width-segmented {
    width: 100%;
  }

  .shared-view-option {
    flex: 1;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 16px;
  }

  .brand {
    min-height: 40px;
  }

  .brand-logo {
    width: 170px;
    max-width: 58vw;
  }

  .theme-toggle {
    width: 64px;
  }

  .footer-actions,
  .control-group,
  .site-footer nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .preview-button,
  .share-button {
    justify-content: center;
    text-align: center;
  }

  .footer-signup-form {
    grid-template-columns: 1fr;
  }

  .footer-signup-form button {
    width: 100%;
  }

  .preview-button,
  .secondary-button,
  .share-button,
  .export-button,
  .width-control,
  .dark-model-control,
  .control-group label,
  .control-group select,
  .control-group input {
    width: 100%;
  }

  .control-help,
  .control-disclaimer {
    max-width: none;
    text-align: left;
  }

  .width-segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .width-option {
    min-width: 0;
    text-align: center;
  }

  .input-grid {
    gap: 24px;
    padding: 24px 18px;
  }

  body.is-empty .dropzone {
    min-height: 300px;
  }

  .health-summary-card {
    grid-template-areas:
      "intro"
      "metrics"
      "presets";
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .summary-intro {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .client-presets > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-preset {
    width: 100%;
  }

  .client-preset:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .analysis-summary-card {
    padding: 20px 18px;
  }

  .analysis-summary-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-toggle {
    width: 100%;
  }

  .analysis-pill-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analysis-pill {
    justify-content: center;
    width: 100%;
  }

  .share-privacy-note,
  .asset-summary,
  #sourceMeta {
    width: 100%;
    max-width: none;
    text-align: center;
  }

  .asset-summary {
    justify-content: center;
  }

  .input-footer,
  .results-section {
    padding: 0 18px 24px;
  }

  .preview-header,
  .results-header > div,
  .tip {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-header {
    padding: 18px;
  }

  .preview-tools {
    justify-content: flex-start;
    width: 100%;
  }

  .share-dialog {
    padding: 28px 20px;
  }

  .share-url-control {
    align-items: stretch;
  }

  .share-expiry {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .feedback-actions .secondary-button,
  .feedback-actions .share-button {
    justify-content: center;
    width: 100%;
  }

  .result-grid,
  .warning-grid {
    grid-template-columns: 1fr;
  }

  .tracking-check-card {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

  .tracking-check-card .result-icon {
    width: 56px;
    height: 56px;
  }

  .tracking-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tracking-detail-grid {
    grid-template-columns: 1fr;
  }

  .affected-link-list strong,
  .affected-link-list span {
    white-space: normal;
  }

  #sourceInput {
    height: 240px;
    font-size: 14px;
  }

  .editor-shell {
    height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* MailMode branded footer redesign */
.site-footer {
  width: 100%;
  max-width: 1620px;
  margin: clamp(46px, 6vw, 84px) auto 0;
  padding: 0 0 18px;
  color: rgba(238, 241, 255, 0.72);
  font-size: 14px;
  font-weight: 720;
}

.footer-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3.4vw, 46px);
  border: 1px solid rgba(184, 166, 255, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 0%, rgba(109, 93, 252, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(12, 13, 36, 0.84), rgba(7, 9, 24, 0.86));
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.34),
    0 0 58px rgba(109, 93, 252, 0.08);
  backdrop-filter: blur(22px);
}

.footer-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 34%, rgba(109, 93, 252, 0.06));
  opacity: 0.45;
}

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

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}

.footer-brand-block {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 96px;
  padding-right: clamp(24px, 3vw, 52px);
  border-right: 1px solid rgba(184, 166, 255, 0.22);
}

.footer-logo {
  display: block;
  width: 210px;
  max-width: 100%;
  height: auto;
}

.footer-logo-light {
  display: none;
}

.footer-brand-block p {
  margin: 0;
  color: rgba(238, 241, 255, 0.7);
  font-size: 15px;
  font-weight: 760;
}

.footer-signup {
  display: grid;
  grid-template-areas:
    "copy form"
    "helper helper"
    "message message";
  grid-template-columns: minmax(220px, 0.75fr) minmax(360px, 1fr);
  align-items: center;
  gap: 14px clamp(24px, 4vw, 56px);
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.footer-signup-copy {
  gap: 7px;
}

.footer-signup-copy strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 940;
  letter-spacing: -0.01em;
}

.footer-signup-copy span {
  max-width: 360px;
  color: rgba(238, 241, 255, 0.68);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.45;
}

.footer-signup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.footer-signup-form input {
  min-height: 54px;
  padding: 0 19px;
  border: 1px solid rgba(184, 166, 255, 0.18);
  border-radius: 14px;
  background: rgba(10, 12, 34, 0.62);
  color: #eef1ff;
  font-size: 15px;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-signup-form input::placeholder {
  color: rgba(238, 241, 255, 0.44);
}

.footer-signup-form input:hover,
.footer-signup-form input:focus {
  border-color: rgba(155, 81, 255, 0.5);
  background: rgba(13, 15, 42, 0.78);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.13);
  outline: none;
}

.footer-signup-form button {
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #a14dff 0%, #762dff 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 930;
  box-shadow: 0 16px 34px rgba(118, 45, 255, 0.28);
}

.footer-signup-form button:hover {
  background: linear-gradient(180deg, #ad63ff 0%, #8142ff 100%);
  color: #ffffff;
  box-shadow: 0 20px 42px rgba(118, 45, 255, 0.34);
}

.footer-signup-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.footer-signup-message {
  min-height: 18px;
  margin: 0;
  color: rgba(238, 241, 255, 0.72);
  font-size: 12px;
  font-weight: 760;
}

.footer-signup-message[data-state="success"] {
  color: var(--green);
}

.footer-signup-helper {
  grid-area: helper;
  margin: -4px 0 0;
  color: rgba(238, 241, 255, 0.5);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.45;
}

.footer-signup-helper a {
  color: rgba(187, 157, 255, 0.92);
  font-weight: 850;
  text-decoration: none;
}

.footer-signup-helper a:hover,
.footer-signup-helper a:focus-visible {
  color: #ffffff;
}

.footer-divider {
  height: 1px;
  margin: clamp(22px, 2.8vw, 34px) 0;
  background: linear-gradient(90deg, transparent, rgba(184, 166, 255, 0.2), transparent);
}

.footer-middle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  align-items: start;
  gap: clamp(28px, 4vw, 64px);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: clamp(28px, 5vw, 96px);
}

.footer-column {
  display: grid;
  gap: 18px;
}

.footer-column h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 910;
  letter-spacing: -0.01em;
}

.footer-column h2 .lucide-icon {
  color: #a955ff;
}

.footer-column nav {
  display: grid;
  gap: 13px;
}

.footer-link {
  display: inline-flex;
  width: fit-content;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(238, 241, 255, 0.68);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.35;
  text-align: left;
  box-shadow: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-status-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(184, 166, 255, 0.16);
  border-radius: 14px;
  background: rgba(14, 16, 43, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-status-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-status-heading strong {
  color: rgba(238, 241, 255, 0.84);
  font-size: 15px;
  font-weight: 880;
}

.footer-status-dot {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #20d183;
  box-shadow: 0 0 12px rgba(32, 209, 131, 0.38);
  animation: statusDotPulse 4.8s var(--ease) infinite;
}

.footer-status-dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(32, 209, 131, 0.34) 0 18%, rgba(32, 209, 131, 0.16) 34%, rgba(32, 209, 131, 0.06) 52%, transparent 72%),
    radial-gradient(circle, rgba(109, 93, 252, 0.14) 0 40%, transparent 74%);
  opacity: 0.42;
  transform: scale(0.76);
  transform-origin: center;
  animation: statusDotGlow 4.8s var(--ease) infinite;
}

@keyframes statusDotPulse {
  0%, 100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.05);
  }
}

@keyframes statusDotGlow {
  0%, 100% {
    opacity: 0.24;
    transform: scale(0.58);
  }
  45% {
    opacity: 1;
    transform: scale(1);
  }
}

.footer-status-card p {
  margin: 0;
  color: rgba(238, 241, 255, 0.66);
  font-size: 14px;
  font-weight: 700;
}

.footer-status-card a {
  width: fit-content;
  color: #b264ff;
  font-size: 14px;
  font-weight: 850;
}

.footer-status-card a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(238, 241, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.footer-bottom strong {
  color: #b264ff;
  font-weight: 850;
}

.footer-bottom nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.footer-middle,
.footer-bottom {
  width: min(100%, 1280px);
  margin-inline: auto;
}

:root[data-theme="light"] .footer-panel {
  background:
    radial-gradient(circle at 18% 0%, rgba(109, 93, 252, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(12, 13, 36, 0.86), rgba(7, 9, 24, 0.88));
}

@media (max-width: 1100px) {
  .footer-top,
  .footer-middle {
    grid-template-columns: 1fr;
  }

  .footer-brand-block {
    min-height: 0;
    padding-right: 0;
    padding-bottom: 26px;
    border-right: 0;
    border-bottom: 1px solid rgba(184, 166, 255, 0.18);
  }

  .footer-signup {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  }

  .footer-status-card {
    max-width: 420px;
  }

}

@media (max-width: 780px) {
  .site-footer {
    margin-top: 40px;
  }

  .footer-panel {
    padding: 26px;
    border-radius: var(--radius);
  }

  .footer-signup {
    grid-template-areas:
      "copy"
      "form"
      "helper"
      "message";
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-items: stretch;
    gap: 14px;
  }

  .footer-signup-copy span {
    max-width: none;
  }

  .footer-signup-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .footer-signup-form button {
    width: 100%;
  }

  .footer-signup-helper {
    width: 100%;
    margin: 0;
    text-align: left;
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 44px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-bottom nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .footer-panel {
    padding: 22px;
    border-radius: var(--radius);
  }

  .footer-logo {
    width: 178px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-status-card {
    padding: 20px;
  }

  .footer-bottom nav {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

}


/* MailMode shared glass card treatment */
:root[data-theme="dark"] .input-card,
:root[data-theme="dark"] .preview-pane,
:root[data-theme="dark"] .controls-card,
:root[data-theme="dark"] .analysis-summary-card,
:root[data-theme="dark"] .health-summary-card,
:root[data-theme="dark"] .results-section {
  position: relative;
  overflow: hidden;
  border-color: rgba(184, 166, 255, 0.18);
  background:
    radial-gradient(circle at 18% 0%, rgba(109, 93, 252, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(12, 13, 36, 0.84), rgba(7, 9, 24, 0.86));
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.32),
    0 0 48px rgba(109, 93, 252, 0.07);
  backdrop-filter: blur(22px);
}

:root[data-theme="dark"] .input-card::before,
:root[data-theme="dark"] .preview-pane::before::before,
:root[data-theme="dark"] .controls-card::before,
:root[data-theme="dark"] .analysis-summary-card::before,
:root[data-theme="dark"] .health-summary-card::before,
:root[data-theme="dark"] .results-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent 36%, rgba(109, 93, 252, 0.055));
  opacity: 0.45;
}

:root[data-theme="dark"] .input-card > *,
:root[data-theme="dark"] .preview-pane > * > *,
:root[data-theme="dark"] .controls-card > *,
:root[data-theme="dark"] .analysis-summary-card > *,
:root[data-theme="dark"] .health-summary-card > *,
:root[data-theme="dark"] .results-section > * {
  position: relative;
  z-index: 1;
}

:root[data-theme="dark"] .input-tabs,
:root[data-theme="dark"] .preview-header {
  background: rgba(9, 11, 31, 0.34);
  border-color: rgba(184, 166, 255, 0.16);
}

:root[data-theme="dark"] .url-loader,
:root[data-theme="dark"] .input-footer {
  position: relative;
  z-index: 1;
}

:root[data-theme="dark"] .url-field,
:root[data-theme="dark"] .editor-shell,
:root[data-theme="dark"] .dropzone,
:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .export-button,
:root[data-theme="dark"] .share-button,
:root[data-theme="dark"] .analysis-toggle,
:root[data-theme="dark"] .analysis-pill,
:root[data-theme="dark"] .summary-metric,
:root[data-theme="dark"] .client-preset,
:root[data-theme="dark"] .result-card,
:root[data-theme="dark"] .tracking-check-card,
:root[data-theme="dark"] .tracking-stat,
:root[data-theme="dark"] .tracking-expander summary,
:root[data-theme="dark"] .affected-links-more summary,
:root[data-theme="dark"] .affected-link-list li,
:root[data-theme="dark"] .width-segmented,
:root[data-theme="dark"] .shared-dark-model-control select,
:root[data-theme="dark"] .control-group select,
:root[data-theme="dark"] .control-group input,
:root[data-theme="dark"] .preview-tools span {
  border-color: rgba(184, 166, 255, 0.16);
  background: rgba(10, 12, 34, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
}

:root[data-theme="dark"] .dropzone {
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 93, 252, 0.12), transparent 22rem),
    rgba(10, 12, 34, 0.5);
}

:root[data-theme="dark"] .dropzone:hover,
:root[data-theme="dark"] .source-panel.is-dragging .dropzone {
  border-color: rgba(169, 85, 255, 0.54);
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 93, 252, 0.2), transparent 22rem),
    rgba(14, 16, 43, 0.7);
}

:root[data-theme="dark"] .width-option.is-active,
:root[data-theme="dark"] .client-preset.is-active,
:root[data-theme="dark"] .shared-width-option.is-active,
:root[data-theme="dark"] .shared-view-option.is-active {
  border-color: rgba(169, 85, 255, 0.36);
  background: linear-gradient(180deg, rgba(109, 93, 252, 0.24), rgba(118, 45, 255, 0.16));
  box-shadow: 0 12px 28px rgba(109, 93, 252, 0.16);
}

:root[data-theme="dark"] .frame-stage {
  background: rgba(5, 7, 20, 0.46);
}

:root[data-theme="light"] .input-card,
:root[data-theme="light"] .preview-pane,
:root[data-theme="light"] .controls-card,
:root[data-theme="light"] .analysis-summary-card,
:root[data-theme="light"] .health-summary-card,
:root[data-theme="light"] .results-section {
  border-color: rgba(109, 93, 252, 0.14);
  background:
    radial-gradient(circle at 18% 0%, rgba(109, 93, 252, 0.11), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 247, 255, 0.84));
  box-shadow:
    0 22px 58px rgba(80, 92, 140, 0.14),
    0 0 42px rgba(109, 93, 252, 0.06);
}


/* MailMode light footer theme */
:root[data-theme="light"] .site-footer {
  color: rgba(31, 41, 55, 0.72);
}

:root[data-theme="light"] .footer-panel {
  border-color: rgba(109, 93, 252, 0.16);
  background:
    radial-gradient(circle at 18% 0%, rgba(109, 93, 252, 0.14), transparent 30rem),
    radial-gradient(circle at 86% 12%, rgba(14, 165, 233, 0.1), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(241, 245, 255, 0.76));
  box-shadow:
    0 26px 70px rgba(80, 92, 140, 0.18),
    0 0 52px rgba(109, 93, 252, 0.08);
}

:root[data-theme="light"] .footer-panel::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.78), transparent 38%, rgba(109, 93, 252, 0.08));
  opacity: 0.7;
}

:root[data-theme="light"] .footer-logo-dark {
  display: none;
}

:root[data-theme="light"] .footer-logo-light {
  display: block;
}

:root[data-theme="light"] .footer-brand-block {
  border-color: rgba(109, 93, 252, 0.16);
}

:root[data-theme="light"] .footer-brand-block p,
:root[data-theme="light"] .footer-signup-copy span,
:root[data-theme="light"] .footer-status-card p,
:root[data-theme="light"] .footer-link,
:root[data-theme="light"] .footer-bottom,
:root[data-theme="light"] .footer-signup-helper,
:root[data-theme="light"] .footer-signup-message {
  color: rgba(51, 65, 85, 0.72);
}

:root[data-theme="light"] .footer-signup-message[data-state="success"] {
  color: var(--green);
}

:root[data-theme="light"] .footer-signup-copy strong,
:root[data-theme="light"] .footer-column h2,
:root[data-theme="light"] .footer-status-heading strong {
  color: #111827;
}

:root[data-theme="light"] .footer-divider {
  background: linear-gradient(90deg, transparent, rgba(109, 93, 252, 0.18), transparent);
}

:root[data-theme="light"] .footer-signup-form input {
  border-color: rgba(109, 93, 252, 0.17);
  background: rgba(255, 255, 255, 0.72);
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 14px 30px rgba(80, 92, 140, 0.1);
}

:root[data-theme="light"] .footer-signup-form input::placeholder {
  color: rgba(71, 85, 105, 0.48);
}

:root[data-theme="light"] .footer-signup-form input:hover,
:root[data-theme="light"] .footer-signup-form input:focus {
  border-color: rgba(109, 93, 252, 0.42);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.12), 0 16px 34px rgba(80, 92, 140, 0.12);
}

:root[data-theme="light"] .footer-link:hover,
:root[data-theme="light"] .footer-link:focus-visible {
  color: #5a49e8;
}

:root[data-theme="light"] .footer-status-card {
  border-color: rgba(109, 93, 252, 0.14);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 42px rgba(80, 92, 140, 0.12);
}

:root[data-theme="light"] .footer-status-card a {
  color: #6d5dfc;
}

:root[data-theme="light"] .footer-status-card a:hover {
  color: #111827;
}

:root[data-theme="light"] .footer-bottom strong,
:root[data-theme="light"] .footer-column h2 .lucide-icon {
  color: #6d5dfc;
}

@media (max-width: 1100px) {
  :root[data-theme="light"] .footer-brand-block {
    border-bottom-color: rgba(109, 93, 252, 0.16);
  }
}


/* MailMode header breathing room */
.app-main {
  margin-top: clamp(18px, 2.2vw, 32px);
}

@media (max-width: 680px) {
  .app-main {
    margin-top: 16px;
  }
}

/* MailMode full analysis reveal animation */
.analysis-toggle {
  position: relative;
  overflow: hidden;
}

.analysis-toggle::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(110deg, transparent 0%, rgba(169, 85, 255, 0.18) 38%, rgba(255, 255, 255, 0.22) 50%, rgba(169, 85, 255, 0.18) 62%, transparent 100%);
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
}

.analysis-toggle.is-preparing::after {
  opacity: 1;
  animation: analysis-button-sheen 620ms var(--ease) both;
}

.analysis-toggle.is-preparing .lucide-icon:first-child {
  animation: analysis-icon-pulse 620ms var(--ease) both;
}

.full-analysis-body.is-revealing .health-summary-card,
.full-analysis-body.is-revealing .results-header,
.full-analysis-body.is-revealing .results-panel,
.full-analysis-body.is-revealing .tracking-check-card,
.full-analysis-body.is-revealing .result-card {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  animation: analysis-card-rise 520ms var(--ease) forwards;
  animation-delay: calc(var(--analysis-reveal-index, 0) * 58ms);
}

@keyframes analysis-button-sheen {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

@keyframes analysis-icon-pulse {
  0%, 100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.12) rotate(-8deg);
  }
}

@keyframes analysis-card-rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .analysis-toggle.is-preparing::after,
  .analysis-toggle.is-preparing .lucide-icon:first-child,
  .full-analysis-body.is-revealing .health-summary-card,
  .full-analysis-body.is-revealing .results-header,
  .full-analysis-body.is-revealing .results-panel,
  .full-analysis-body.is-revealing .tracking-check-card,
  .full-analysis-body.is-revealing .result-card {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* MailMode source editor line numbers and expanded editor */
.editor-shell {
  --source-gutter-width: 56px;
}

.source-line-numbers,
.source-modal-line-numbers {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  width: var(--source-gutter-width, 56px);
  margin: 0;
  padding: 28px 12px 28px 0;
  overflow: hidden;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.76);
  color: #94a3b8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
  user-select: none;
  pointer-events: none;
}

.editor-expand-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.editor-expand-button:hover,
.editor-expand-button:focus-visible {
  border-color: rgba(109, 93, 252, 0.34);
  color: var(--purple);
  background: #ffffff;
}

.source-highlight,
#sourceInput {
  padding-left: calc(var(--source-gutter-width, 56px) + 18px);
  padding-right: 62px;
  white-space: pre;
  overflow-wrap: normal;
}

.source-modal .share-modal-backdrop {
  background: rgba(3, 6, 20, 0.72);
}

.source-dialog {
  width: min(1200px, calc(100vw - 40px));
  max-height: min(860px, calc(100vh - 40px));
  padding: 24px;
}

.source-dialog-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 44px;
  text-align: left;
}

.source-dialog-header h2 {
  margin: 0;
}

.source-dialog-header p {
  margin: 4px 0 0;
}

.source-modal-editor {
  --source-gutter-width: 62px;
  position: relative;
  min-height: min(62vh, 590px);
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-sm);
}

.source-modal-line-numbers {
  padding: 20px 13px 20px 0;
  font-size: 13px;
  line-height: 1.55;
}

#sourceModalInput {
  width: 100%;
  height: min(62vh, 590px);
  min-height: min(62vh, 590px);
  padding: 20px 22px 20px calc(var(--source-gutter-width, 62px) + 18px);
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  resize: none;
  white-space: pre;
}

#sourceModalInput:focus {
  outline: none;
}

.source-modal-actions {
  margin-top: 18px;
}

.affected-link-list em {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  padding: 3px 8px;
  border: 1px solid rgba(109, 93, 252, 0.22);
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

:root[data-theme="dark"] .source-line-numbers,
:root[data-theme="dark"] .source-modal-line-numbers {
  border-right-color: rgba(184, 166, 255, 0.14);
  background: rgba(5, 7, 20, 0.58);
  color: rgba(203, 213, 225, 0.54);
}

:root[data-theme="dark"] .editor-expand-button {
  border-color: rgba(184, 166, 255, 0.18);
  background: rgba(10, 12, 34, 0.72);
  color: var(--muted);
}

:root[data-theme="dark"] .editor-expand-button:hover,
:root[data-theme="dark"] .editor-expand-button:focus-visible {
  color: #ffffff;
  background: rgba(109, 93, 252, 0.22);
}

:root[data-theme="dark"] .source-modal-editor {
  border-color: rgba(184, 166, 255, 0.16);
  background: rgba(10, 12, 34, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
}

:root[data-theme="dark"] #sourceModalInput {
  color: var(--ink);
}

:root[data-theme="dark"] .affected-link-list em {
  border-color: rgba(169, 85, 255, 0.26);
  background: rgba(109, 93, 252, 0.18);
  color: #c4b5fd;
}

@media (max-width: 680px) {
  .editor-shell {
    --source-gutter-width: 46px;
  }

  .source-line-numbers {
    padding-top: 18px;
    padding-bottom: 18px;
    font-size: 12px;
  }

  .source-highlight,
  #sourceInput {
    padding-left: calc(var(--source-gutter-width, 46px) + 12px);
    padding-right: 56px;
  }

  .source-dialog {
    width: calc(100vw - 24px);
    padding: 18px;
  }

  .source-modal-editor {
    --source-gutter-width: 48px;
  }

  #sourceModalInput {
    font-size: 13px;
  }
}

/* MailMode footer light signup cleanup */
:root[data-theme="light"] .footer-panel .footer-signup {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

/* MailMode desktop canvas width option */
.width-segmented {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.shared-width-segmented {
  flex: 0 1 820px;
}

@media (min-width: 981px) {
  .width-option[data-viewport="1440"],
  .width-option[data-shared-width="1440"] {
    min-width: 0;
  }
}


/* MailMode focused polish fixes */
.app-main,
.source-panel,
.input-card,
.input-grid,
.paste-panel,
.editor-shell,
.source-highlight,
#sourceInput {
  min-width: 0;
  max-width: 100%;
}

.app-main {
  width: 100%;
}

.source-panel,
.editor-shell {
  overflow: hidden;
}

.source-highlight,
#sourceInput {
  box-sizing: border-box;
  contain: inline-size;
}

.affected-links-more[open] {
  gap: 0;
}

.affected-links-more[open] > summary {
  display: none;
}

:root[data-theme="dark"] .theme-toggle {
  border-color: rgba(184, 166, 255, 0.18);
  background:
    radial-gradient(circle at 18% 0%, rgba(109, 93, 252, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(12, 13, 36, 0.84), rgba(7, 9, 24, 0.86));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 32px rgba(109, 93, 252, 0.08);
}

.dark-model-control {
  width: 230px;
  min-width: 230px;
}

.dark-model-control select {
  width: 100%;
}

.dark-model-control .control-help {
  min-height: 34px;
}

#shareButton {
  border-color: rgba(169, 85, 255, 0.34);
  background: linear-gradient(180deg, #a955ff 0%, #6d5dfc 100%);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(109, 93, 252, 0.28);
}

#shareButton:hover:not(:disabled),
#shareButton:focus-visible {
  border-color: rgba(203, 186, 255, 0.52);
  background: linear-gradient(180deg, #b665ff 0%, #7968ff 100%);
  color: #ffffff;
  box-shadow: 0 22px 48px rgba(109, 93, 252, 0.34);
}

:root[data-theme="light"] .brand-tagline {
  color: #0f172a;
}

.analysis-toggle.is-preparing::after {
  animation-duration: 1000ms;
}

@media (max-width: 760px) {
  .dark-model-control {
    width: 100%;
    min-width: 0;
  }

  .dark-model-control .control-help {
    min-height: 0;
  }
}


/* MailMode layout and action polish */
.app-main {
  width: 100%;
  max-width: 1620px;
  margin-inline: auto;
}

body.is-empty .source-panel {
  max-width: 100%;
}

.url-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-color: rgba(169, 85, 255, 0.34);
  background: linear-gradient(180deg, #a955ff 0%, #6d5dfc 100%);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(109, 93, 252, 0.28);
}

.url-button:hover:not(:disabled),
.url-button:focus-visible {
  border-color: rgba(203, 186, 255, 0.52);
  background: linear-gradient(180deg, #b665ff 0%, #7968ff 100%);
  color: #ffffff;
  box-shadow: 0 22px 48px rgba(109, 93, 252, 0.34);
}

.url-button .lucide-icon {
  flex: 0 0 auto;
}

.width-segmented,
.shared-width-segmented {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
}

.width-option {
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.affected-links-more {
  margin-top: 10px;
}

@media (max-width: 980px) {
  .width-segmented,
  .shared-width-segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .width-segmented,
  .shared-width-segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Align source panel with footer width */
:root {
  --mailmode-section-width: 1620px;
}

.app-main,
.site-footer,
.source-panel.input-card {
  width: 100%;
  max-width: var(--mailmode-section-width);
  margin-inline: auto;
}

body.is-empty .source-panel.input-card {
  max-width: var(--mailmode-section-width);
}

/* Match source modal primary action to Load URL styling */
#sourceApplyButton {
  border-color: rgba(169, 85, 255, 0.34);
  background: linear-gradient(180deg, #a955ff 0%, #6d5dfc 100%);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(109, 93, 252, 0.28);
}

#sourceApplyButton:hover:not(:disabled),
#sourceApplyButton:focus-visible {
  border-color: rgba(203, 186, 255, 0.52);
  background: linear-gradient(180deg, #b665ff 0%, #7968ff 100%);
  color: #ffffff;
  box-shadow: 0 22px 48px rgba(109, 93, 252, 0.34);
}

/* React Email compatibility messaging */
.react-email-compatibility {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: stretch;
  align-items: start;
  min-height: 0;
  padding: 24px;
  border-color: rgba(245, 158, 11, 0.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.14), transparent 22rem),
    rgba(255, 250, 241, 0.92);
  text-align: left;
}

.react-email-compatibility .result-icon {
  width: 54px;
  height: 54px;
  margin: 0 18px 0 0;
  background: var(--amber-soft);
  color: var(--amber);
}

.react-email-compatibility strong {
  font-size: 20px;
}

.react-email-compatibility p {
  max-width: 860px;
}

.react-email-detail {
  margin-top: 14px !important;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  color: #7c4a03 !important;
  font-weight: 800;
}

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

.react-email-next {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}

.react-email-compatibility h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.react-email-compatibility ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.react-email-compatibility li + li {
  margin-top: 4px;
}

.react-email-compatibility a {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.react-email-compatibility a:hover,
.react-email-compatibility a:focus-visible {
  color: var(--purple-dark);
  text-decoration: underline;
}

:root[data-theme="dark"] .react-email-compatibility {
  border-color: rgba(245, 158, 11, 0.26);
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.14), transparent 22rem),
    rgba(31, 24, 12, 0.62);
}

:root[data-theme="dark"] .react-email-detail {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.12);
  color: #f8d38b !important;
}

@media (max-width: 720px) {
  .react-email-compatibility {
    grid-template-columns: 1fr;
  }

  .react-email-compatibility .result-icon {
    margin: 0 0 16px;
  }

  .react-email-columns {
    grid-template-columns: 1fr;
  }
}

/* Subject and inbox preview health check */
.subject-inbox-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  justify-items: stretch;
  min-height: 0;
  gap: 22px;
  padding: 30px;
  text-align: left;
}

.subject-inbox-card .result-icon {
  width: 64px;
  height: 64px;
  margin: 0;
}

.full-analysis-body .subject-inbox-card {
  gap: 18px;
  padding: 24px;
}

.subject-inbox-body {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.subject-inbox-card strong {
  font-size: 20px;
}

.subject-inbox-card p {
  max-width: none;
  margin: 0;
  color: var(--muted);
}

.inbox-preview-sim {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 255, 0.86));
  box-shadow: var(--shadow-sm);
}

.inbox-preview-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #6d5dfc, #a855f7);
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.inbox-preview-sim span:not(.inbox-preview-avatar) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.inbox-preview-sim strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-preview-sim p {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.subject-inbox-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.subject-inbox-field h4 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subject-inbox-field p {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.subject-inbox-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

:root[data-theme="dark"] .subject-inbox-card,
:root[data-theme="dark"] .subject-inbox-field,
:root[data-theme="dark"] .inbox-preview-sim {
  border-color: rgba(184, 166, 255, 0.16);
  background: rgba(10, 12, 34, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
}

:root[data-theme="dark"] .inbox-preview-sim {
  background: linear-gradient(180deg, rgba(15, 18, 46, 0.78), rgba(9, 11, 30, 0.72));
}

.full-analysis-body.is-revealing .subject-inbox-card {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  animation: analysis-card-rise 520ms var(--ease) forwards;
  animation-delay: calc(var(--analysis-reveal-index, 0) * 58ms);
}

@media (max-width: 760px) {
  .subject-inbox-card {
    grid-template-columns: 1fr;
  }

  .subject-inbox-card .result-icon {
    width: 54px;
    height: 54px;
  }

  .subject-inbox-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .full-analysis-body.is-revealing .subject-inbox-card {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* Keep the source editor expand control clear of native scrollbars. */
.editor-shell {
  --editor-scrollbar-reserve: 18px;
}

.editor-expand-button {
  right: calc(12px + var(--editor-scrollbar-reserve));
}

#sourceInput {
  scrollbar-gutter: stable;
}

@media (max-width: 680px) {
  .editor-shell {
    --editor-scrollbar-reserve: 14px;
  }
}

/* Legal pages */
.legal-page .app-shell {
  max-width: var(--mailmode-section-width, 1620px);
}

.legal-shell {
  display: grid;
  gap: clamp(28px, 4vw, 54px);
}

.legal-header {
  align-items: center;
}

.legal-main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.legal-card {
  padding: clamp(30px, 5vw, 64px);
}

.legal-hero {
  display: grid;
  gap: 12px;
  padding-bottom: clamp(24px, 4vw, 38px);
  border-bottom: 1px solid var(--line);
}

.legal-eyebrow {
  color: var(--purple);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.legal-content {
  display: grid;
  gap: clamp(24px, 4vw, 34px);
  padding-top: clamp(26px, 4vw, 42px);
}

.legal-content section {
  display: grid;
  gap: 10px;
}

.legal-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.legal-content p,
.legal-content li {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
}

.legal-content ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.legal-content a,
.legal-footer a {
  color: #a955ff;
  font-weight: 900;
}

.legal-content a:hover,
.legal-footer a:hover {
  color: #c084fc;
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 4px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.legal-footer strong {
  color: var(--purple);
}

@media (max-width: 680px) {
  .legal-card {
    padding: 26px 20px;
  }

  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* MailMode microcopy */
.brand-tagline {
  display: block;
  min-height: 1.35em;
  max-width: min(560px, 72vw);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
  will-change: opacity, transform;
}

.brand-tagline.is-changing {
  opacity: 0;
  transform: translateY(3px);
}

.legal-content h3 {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 920;
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .brand-tagline {
    transition: none;
  }

  .brand-tagline.is-changing {
    opacity: 1;
    transform: none;
  }
}

/* Header tagline refinement */
.brand:hover,
.brand:active {
  transform: none;
}

.brand-rotating-tagline {
  display: block;
  min-height: 1.35em;
  max-width: min(620px, 76vw);
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
}

.brand-rotating-tagline.is-typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.95em;
  margin-left: 2px;
  background: currentColor;
  opacity: 0.65;
  vertical-align: -0.1em;
}

:root[data-theme="light"] .brand-rotating-tagline {
  color: rgba(15, 23, 42, 0.66);
}

@media (prefers-reduced-motion: reduce) {
  .brand-rotating-tagline.is-typing::after {
    display: none;
  }
}

/* Single rotating brand line */
.brand-rotating-tagline {
  margin-left: 4px;
}


/* Footer spacing adjustment */
.site-footer {
  margin-top: calc(clamp(46px, 6vw, 84px) - 30px);
}

@media (max-width: 780px) {
  .site-footer {
    margin-top: 30px;
  }
}

/* Footer column alignment after link cleanup */
.footer-columns {
  align-items: start;
}

.footer-column {
  align-content: start;
  align-items: start;
  grid-template-rows: auto auto;
  gap: 22px;
}

.footer-column nav {
  align-content: start;
  gap: 18px;
}

/* Footer brand tagline alignment */
.footer-brand-block {
  gap: 8px;
}

.footer-brand-block p {
  margin-top: -2px;
  margin-left: 4px;
}

/* Footer top row vertical alignment */
.footer-top {
  align-items: center;
}

.footer-brand-block {
  align-self: center;
  align-content: center;
}

.footer-signup {
  align-self: center;
  transform: translateY(4px);
}

@media (max-width: 1100px) {
  .footer-signup {
    transform: none;
  }
}

/* Footer top divider-centred alignment */
.footer-top {
  align-items: stretch;
}

.footer-brand-block,
.footer-signup {
  min-height: 96px;
}

.footer-signup {
  align-self: stretch;
  transform: none;
}

.footer-signup-copy,
.footer-signup-form {
  align-self: start;
}

.footer-signup-form {
  padding-top: 30px;
}

@media (max-width: 1100px) {
  .footer-brand-block,
  .footer-signup {
    min-height: 0;
  }

  .footer-signup-form {
    padding-top: 0;
  }
}

/* Dropzone headline line break */
.dropzone strong {
  display: grid;
  gap: 2px;
  line-height: 1.22;
}

/* Keep source header height stable when status changes */
.input-tabs {
  min-height: 96px;
  box-sizing: border-box;
}

.status-pill {
  min-width: 152px;
  justify-content: center;
}

#statusText {
  display: inline-block;
  min-width: 72px;
  text-align: left;
}

body.is-empty .input-tabs .status-pill {
  display: inline-flex;
  visibility: hidden;
}

body.is-empty .input-tabs .status-pill[data-state="loading"],
body.is-empty .input-tabs .status-pill[data-state="warning"] {
  visibility: visible;
}

@media (max-width: 680px) {
  .input-tabs {
    min-height: 88px;
  }

  .status-pill {
    min-width: 142px;
  }
}

/* Restore dropzone headline emphasis */
.dropzone strong {
  color: var(--ink);
  font-size: clamp(24px, 1.9vw, 34px);
  font-weight: 950;
  letter-spacing: -0.025em;
}

:root[data-theme="dark"] .dropzone strong {
  color: #ffffff;
}

.dropzone span:not(.dropzone-icon) {
  color: var(--purple);
  font-size: clamp(20px, 1.45vw, 28px);
  font-weight: 920;
}

/* Keep only browse prompt purple */
.dropzone strong span {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.dropzone > span:not(.dropzone-icon) {
  color: var(--purple);
  font-size: clamp(18px, 1.25vw, 24px);
  font-weight: 920;
}

/* Stabilise source/upload panel sizing */
:root {
  --mailmode-input-box-height: 360px;
}

.input-grid {
  align-items: end;
}

.paste-panel {
  grid-template-rows: auto var(--mailmode-input-box-height);
}

.editor-shell,
.dropzone {
  height: var(--mailmode-input-box-height);
  min-height: var(--mailmode-input-box-height);
  max-height: var(--mailmode-input-box-height);
  box-sizing: border-box;
}

.dropzone {
  overflow: hidden;
}

@media (max-width: 900px) {
  .input-grid {
    align-items: stretch;
  }
}

@media (max-width: 680px) {
  :root {
    --mailmode-input-box-height: 320px;
  }
}

/* Dropzone headline copy colour */
.dropzone strong,
.dropzone strong span {
  color: var(--ink);
}

:root[data-theme="dark"] .dropzone strong,
:root[data-theme="dark"] .dropzone strong span {
  color: #ffffff;
}

/* Prevent source/upload width changes between empty and rendered states */
html {
  scrollbar-gutter: stable;
}

body.is-empty .input-grid,
body.has-email-content .input-grid,
.input-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.88fr);
}

@media (max-width: 1100px) {
  body.is-empty .input-grid,
  body.has-email-content .input-grid,
  .input-grid {
    grid-template-columns: 1fr;
  }
}

/* Align upload box with editor box, not left heading */
.input-grid {
  grid-template-areas: "paste drop";
  align-items: start;
}

.paste-panel {
  grid-area: paste;
}

.dropzone-panel {
  display: none;
  grid-area: drop;
}

.dropzone {
  grid-area: drop;
  align-self: end;
}

@media (max-width: 1100px) {
  .input-grid {
    grid-template-areas:
      "paste"
      "drop";
  }

  .dropzone {
    align-self: stretch;
  }
}

/* Input privacy note refinement */
.tip {
  font-size: 14px;
  font-weight: 680;
}

.tip .lucide-icon,
.tip svg {
  width: 18px;
  height: 18px;
}

.tip a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(169, 85, 255, 0.52);
  text-underline-offset: 3px;
}

.tip a:hover,
.tip a:focus-visible {
  color: var(--purple);
}

/* MailMode docs pages */
.docs-shell {
  gap: clamp(30px, 4vw, 56px);
}

.docs-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 22px;
}

.docs-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(160, 150, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 10, 28, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.docs-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 880;
  text-decoration: none;
  transition: color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease);
  white-space: nowrap;
}

.docs-nav a:hover,
.docs-nav a:focus-visible {
  background: rgba(109, 93, 252, 0.16);
  color: var(--ink);
  transform: translateY(-1px);
}

.docs-main {
  max-width: 1120px;
}

.docs-card {
  overflow: hidden;
}

.docs-hero h1 {
  max-width: 800px;
}

.docs-hero p {
  max-width: 760px;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
}

.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: clamp(24px, 4vw, 36px);
}

.docs-link-card,
.docs-callout {
  border: 1px solid rgba(160, 150, 255, 0.18);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(18, 19, 50, 0.84), rgba(7, 9, 28, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 48px rgba(0, 0, 0, 0.18);
}

.docs-link-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}

.docs-link-card:hover,
.docs-link-card:focus-visible {
  border-color: rgba(169, 85, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 22px 58px rgba(82, 55, 185, 0.2);
  transform: translateY(-2px);
}

.docs-link-card strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.docs-link-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.55;
}

.docs-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: clamp(22px, 4vw, 34px);
  padding: 18px 20px;
  color: var(--muted);
}

.docs-callout .lucide-icon,
.docs-callout svg {
  flex: 0 0 auto;
  color: var(--purple);
  margin-top: 3px;
}

.docs-callout p {
  margin: 0;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.6;
}

.docs-content {
  gap: clamp(22px, 3vw, 30px);
}

.docs-section {
  padding-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid rgba(160, 150, 255, 0.14);
}

.docs-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.docs-section h2 {
  font-size: clamp(22px, 2.3vw, 30px);
}

.docs-section p,
.docs-section li {
  max-width: 840px;
}

.docs-inline-link,
.docs-content a {
  color: #a955ff;
  font-weight: 920;
  text-decoration: none;
}

.docs-inline-link:hover,
.docs-content a:hover {
  color: #c084fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-timeline ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-timeline li {
  position: relative;
  padding-left: 24px;
}

.docs-timeline li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a955ff, #6d5dfc);
  box-shadow: 0 0 16px rgba(169, 85, 255, 0.5);
}

.docs-footer {
  max-width: 1120px;
}

:root[data-theme="light"] .docs-nav,
:root[data-theme="light"] .docs-link-card,
:root[data-theme="light"] .docs-callout {
  border-color: rgba(109, 93, 252, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(242, 246, 255, 0.72));
  box-shadow: 0 18px 48px rgba(79, 70, 229, 0.08);
}

:root[data-theme="light"] .docs-nav a:hover,
:root[data-theme="light"] .docs-nav a:focus-visible {
  color: #0f172a;
  background: rgba(109, 93, 252, 0.12);
}

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

  .docs-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

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

@media (max-width: 620px) {
  .docs-card-grid {
    grid-template-columns: 1fr;
  }

  .docs-nav a {
    min-height: 36px;
    padding: 0 12px;
  }
}

/* MailMode changelog */
.changelog-main {
  max-width: 1120px;
}

.changelog-card {
  padding-bottom: clamp(34px, 5vw, 68px);
}

.changelog-hero {
  position: relative;
}

.changelog-helper {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(169, 85, 255, 0.2);
  border-radius: 999px;
  background: rgba(109, 93, 252, 0.12);
  color: #bda6ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.changelog-content {
  gap: clamp(26px, 4vw, 42px);
}

.changelog-release {
  display: grid;
  gap: clamp(22px, 3vw, 30px);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(160, 150, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(19, 20, 55, 0.82), rgba(7, 9, 28, 0.78)),
    radial-gradient(circle at 12% 0%, rgba(169, 85, 255, 0.14), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 24px 70px rgba(0, 0, 0, 0.2);
}

.changelog-release-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(160, 150, 255, 0.14);
}

.changelog-release-header > div {
  display: grid;
  gap: 8px;
}

.changelog-version,
.changelog-release-header time {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(169, 85, 255, 0.22);
  border-radius: 999px;
  background: rgba(109, 93, 252, 0.14);
  color: #bda6ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.changelog-release-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.changelog-release-header time {
  margin-top: 2px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.changelog-release-intro {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 760;
  line-height: 1.7;
}

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

.changelog-group {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(160, 150, 255, 0.14);
  border-radius: 20px;
  background: rgba(5, 7, 24, 0.42);
}

.changelog-group-wide {
  grid-column: 1 / -1;
}

.changelog-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.changelog-group ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog-group li {
  position: relative;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 740;
  line-height: 1.55;
}

.changelog-group li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a955ff, #6d5dfc);
  box-shadow: 0 0 14px rgba(169, 85, 255, 0.45);
}

.changelog-group li ul {
  gap: 7px;
  margin-top: 8px;
}

.changelog-group li li {
  font-size: 13px;
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
}

.changelog-group li li::before {
  width: 5px;
  height: 5px;
  background: rgba(189, 166, 255, 0.78);
  box-shadow: none;
}

.changelog-coming-next {
  background:
    linear-gradient(145deg, rgba(16, 17, 47, 0.76), rgba(7, 9, 28, 0.72)),
    radial-gradient(circle at 82% 0%, rgba(109, 93, 252, 0.16), transparent 36%);
}

.docs-nav a[aria-current="page"] {
  background: rgba(109, 93, 252, 0.18);
  color: var(--ink);
}

:root[data-theme="light"] .changelog-helper,
:root[data-theme="light"] .changelog-version,
:root[data-theme="light"] .changelog-release-header time {
  border-color: rgba(109, 93, 252, 0.18);
  background: rgba(109, 93, 252, 0.1);
  color: #6d5dfc;
}

:root[data-theme="light"] .changelog-release,
:root[data-theme="light"] .changelog-coming-next,
:root[data-theme="light"] .changelog-group {
  border-color: rgba(109, 93, 252, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(242, 246, 255, 0.72));
  box-shadow: 0 18px 48px rgba(79, 70, 229, 0.08);
}

@media (max-width: 760px) {
  .changelog-release-header {
    flex-direction: column;
  }

  .changelog-group-grid {
    grid-template-columns: 1fr;
  }

  .changelog-group-wide {
    grid-column: auto;
  }
}

/* MailMode about page */
.about-main {
  max-width: 1120px;
}

.about-card {
  display: grid;
  gap: clamp(34px, 5vw, 58px);
}

.about-hero h1 {
  max-width: 820px;
}

.about-hero p {
  max-width: 740px;
}

.about-story {
  display: grid;
  gap: 18px;
  max-width: 860px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(160, 150, 255, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(18, 19, 50, 0.72), rgba(7, 9, 28, 0.62)),
    radial-gradient(circle at 10% 0%, rgba(169, 85, 255, 0.12), transparent 40%);
}

.about-story p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 18px);
  font-weight: 740;
  line-height: 1.75;
}

.about-section {
  display: grid;
  gap: 20px;
}

.about-section-heading {
  display: grid;
  gap: 8px;
}

.about-section-heading h2,
.about-cta h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.about-feature-card,
.about-split-card,
.about-cta {
  border: 1px solid rgba(160, 150, 255, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(19, 20, 55, 0.78), rgba(7, 9, 28, 0.72)),
    radial-gradient(circle at 20% 0%, rgba(109, 93, 252, 0.12), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 18px 54px rgba(0, 0, 0, 0.16);
}

.about-feature-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 174px;
  padding: 20px;
}

.about-feature-card .lucide-icon,
.about-feature-card svg {
  color: var(--purple);
}

.about-feature-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.about-feature-card p,
.about-split-card p,
.about-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 730;
  line-height: 1.62;
}

.about-split-card {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 4vw, 32px);
}

.about-split-card strong {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  min-width: 190px;
  padding: 12px 16px;
  border: 1px solid rgba(169, 85, 255, 0.22);
  border-radius: 999px;
  background: rgba(109, 93, 252, 0.14);
  color: #bda6ff;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

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

.about-future-list span {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 16px;
  border: 1px solid rgba(160, 150, 255, 0.14);
  border-radius: 20px;
  background: rgba(5, 7, 24, 0.42);
  color: var(--muted);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.45;
}

.about-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 36px);
}

.about-cta > div:first-child {
  display: grid;
  gap: 10px;
  max-width: 680px;
}

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

.about-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(169, 85, 255, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, #a955ff, #6d5dfc);
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(109, 93, 252, 0.26);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}

.about-button-secondary {
  background: rgba(109, 93, 252, 0.12);
  color: var(--ink);
  box-shadow: none;
}

.about-button:hover,
.about-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(109, 93, 252, 0.32);
}

:root[data-theme="light"] .about-story,
:root[data-theme="light"] .about-feature-card,
:root[data-theme="light"] .about-split-card,
:root[data-theme="light"] .about-cta,
:root[data-theme="light"] .about-future-list span {
  border-color: rgba(109, 93, 252, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(242, 246, 255, 0.72));
  box-shadow: 0 18px 48px rgba(79, 70, 229, 0.08);
}

:root[data-theme="light"] .about-split-card strong {
  border-color: rgba(109, 93, 252, 0.18);
  background: rgba(109, 93, 252, 0.1);
  color: #6d5dfc;
}

@media (max-width: 1050px) {
  .about-feature-grid,
  .about-future-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-split-card,
  .about-cta {
    grid-template-columns: 1fr;
  }

  .about-cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .about-feature-grid,
  .about-future-list {
    grid-template-columns: 1fr;
  }

  .about-feature-card {
    min-height: 0;
  }

  .about-cta-actions,
  .about-button {
    width: 100%;
  }
}

/* Docs overview disclosure */
.docs-link-card {
  border: 1px solid rgba(160, 150, 255, 0.18);
  text-align: left;
  cursor: pointer;
}

.docs-link-card.is-active,
.docs-link-card[aria-expanded="true"] {
  border-color: rgba(169, 85, 255, 0.56);
  background:
    linear-gradient(145deg, rgba(31, 25, 78, 0.86), rgba(10, 12, 34, 0.82)),
    radial-gradient(circle at 12% 0%, rgba(169, 85, 255, 0.16), transparent 44%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 26px 70px rgba(82, 55, 185, 0.22);
  transform: translateY(-2px);
}

.docs-overview-panel {
  display: none;
  margin-top: clamp(22px, 4vw, 34px);
}

.docs-overview-panel.has-active {
  display: grid;
}

.docs-overview-detail {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(160, 150, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(19, 20, 55, 0.84), rgba(7, 9, 28, 0.78)),
    radial-gradient(circle at 12% 0%, rgba(169, 85, 255, 0.14), transparent 38%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 24px 70px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(14px) scale(0.99);
}

.docs-overview-detail.is-active {
  animation: docs-panel-reveal 260ms var(--ease) forwards;
}

.docs-overview-detail[hidden] {
  display: none;
}

.docs-overview-detail h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.docs-overview-detail p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 760;
  line-height: 1.7;
}

.docs-overview-detail ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-overview-detail li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.55;
}

.docs-overview-detail li::before {
  content: "";
  position: absolute;
  top: 0.74em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a955ff, #6d5dfc);
  box-shadow: 0 0 14px rgba(169, 85, 255, 0.45);
}

.docs-overview-detail .docs-inline-link {
  width: fit-content;
}

@keyframes docs-panel-reveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

:root[data-theme="light"] .docs-link-card.is-active,
:root[data-theme="light"] .docs-link-card[aria-expanded="true"],
:root[data-theme="light"] .docs-overview-detail {
  border-color: rgba(109, 93, 252, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(242, 246, 255, 0.76));
  box-shadow: 0 20px 58px rgba(79, 70, 229, 0.1);
}

@media (max-width: 760px) {
  .docs-overview-detail ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-overview-detail.is-active {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Docs rendering status guide */
.render-status-docs .docs-status-preview {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 14px;
}

.render-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.render-status-card,
.status-message-list article {
  border: 1px solid rgba(160, 150, 255, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(18, 19, 50, 0.72), rgba(7, 9, 28, 0.64)),
    radial-gradient(circle at 12% 0%, rgba(109, 93, 252, 0.1), transparent 38%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 44px rgba(0, 0, 0, 0.14);
}

.render-status-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.render-status-card .status-pill {
  width: fit-content;
  margin: 0 0 4px;
}

.render-status-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.render-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 730;
  line-height: 1.6;
}

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

.status-message-list article {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
}

.status-message-list strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 940;
  letter-spacing: -0.01em;
}

.status-message-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.55;
}

.status-message-list-warning article {
  border-color: rgba(245, 158, 11, 0.18);
}

:root[data-theme="light"] .render-status-card,
:root[data-theme="light"] .status-message-list article {
  border-color: rgba(109, 93, 252, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(242, 246, 255, 0.72));
  box-shadow: 0 16px 42px rgba(79, 70, 229, 0.08);
}

:root[data-theme="light"] .status-message-list-warning article {
  border-color: rgba(245, 158, 11, 0.22);
}

@media (max-width: 980px) {
  .render-status-grid,
  .status-message-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .render-status-grid,
  .status-message-list {
    grid-template-columns: 1fr;
  }
}

/* Health report docs visual guide */
.health-docs-content code {
  padding: 2px 6px;
  border: 1px solid rgba(160, 150, 255, 0.16);
  border-radius: 8px;
  background: rgba(109, 93, 252, 0.1);
  color: var(--ink);
  font-size: 0.88em;
  font-weight: 850;
}

.health-doc-flow,
.health-doc-status-grid,
.health-doc-definition-grid,
.health-doc-mini-grid {
  display: grid;
  gap: 14px;
}

.health-doc-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.health-doc-status-grid,
.health-doc-mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.health-doc-definition-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.health-doc-flow article,
.health-doc-status-card,
.health-doc-definition-grid article,
.health-doc-report-preview,
.health-doc-inbox-demo,
.health-doc-tracking-demo,
.health-doc-mini-card {
  border: 1px solid rgba(160, 150, 255, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(18, 19, 50, 0.72), rgba(7, 9, 28, 0.64)),
    radial-gradient(circle at 14% 0%, rgba(109, 93, 252, 0.1), transparent 38%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 44px rgba(0, 0, 0, 0.14);
}

.health-doc-flow article,
.health-doc-status-card,
.health-doc-definition-grid article,
.health-doc-mini-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.health-doc-flow .lucide-icon,
.health-doc-status-card .lucide-icon,
.health-doc-mini-card .lucide-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: rgba(109, 93, 252, 0.14);
  color: var(--purple);
}

.health-doc-flow .lucide-icon svg,
.health-doc-status-card .lucide-icon svg,
.health-doc-mini-card .lucide-icon svg {
  width: 24px;
  height: 24px;
}

.health-doc-status-card.good .lucide-icon,
.health-doc-mini-card.good .lucide-icon,
.health-doc-card-header.good > .lucide-icon {
  background: var(--green-soft);
  color: var(--green);
}

.health-doc-status-card.warning .lucide-icon,
.health-doc-mini-card.warning .lucide-icon,
.health-doc-card-header.warning > .lucide-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.health-doc-status-card.error .lucide-icon,
.health-doc-mini-card.error .lucide-icon,
.health-doc-card-header.error > .lucide-icon {
  background: var(--red-soft);
  color: var(--red);
}

.health-doc-status-card.neutral .lucide-icon,
.health-doc-mini-card.neutral .lucide-icon {
  background: var(--blue-soft);
  color: #2885ef;
}

.health-doc-flow strong,
.health-doc-status-card strong,
.health-doc-definition-grid strong,
.health-doc-mini-card strong,
.health-doc-report-header strong,
.health-doc-card-header strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.health-doc-flow p,
.health-doc-status-card p,
.health-doc-definition-grid p,
.health-doc-mini-card p,
.health-doc-report-header p,
.health-doc-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.58;
}

.health-doc-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.health-doc-report-preview,
.health-doc-inbox-demo,
.health-doc-tracking-demo {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.health-doc-report-header,
.health-doc-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.health-doc-card-header {
  justify-content: space-between;
}

.health-doc-card-header > .lucide-icon,
.health-doc-large-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: rgba(109, 93, 252, 0.16);
  color: var(--purple);
}

.health-doc-card-header > .lucide-icon svg,
.health-doc-large-icon .lucide-icon,
.health-doc-large-icon .lucide-icon svg {
  width: 28px;
  height: 28px;
}

.health-doc-card-header > span:last-child {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(160, 150, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.health-doc-card-header.good > span:last-child {
  background: var(--green-soft);
  color: var(--green);
}

.health-doc-card-header.error > span:last-child {
  background: var(--red-soft);
  color: var(--red);
}

.health-doc-tracking-demo .tracking-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

:root[data-theme="light"] .health-doc-flow article,
:root[data-theme="light"] .health-doc-status-card,
:root[data-theme="light"] .health-doc-definition-grid article,
:root[data-theme="light"] .health-doc-report-preview,
:root[data-theme="light"] .health-doc-inbox-demo,
:root[data-theme="light"] .health-doc-tracking-demo,
:root[data-theme="light"] .health-doc-mini-card {
  border-color: rgba(109, 93, 252, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(242, 246, 255, 0.72));
  box-shadow: 0 16px 42px rgba(79, 70, 229, 0.08);
}

@media (max-width: 980px) {
  .health-doc-flow,
  .health-doc-status-grid,
  .health-doc-mini-grid,
  .health-doc-definition-grid,
  .health-doc-tracking-demo .tracking-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .health-doc-flow,
  .health-doc-status-grid,
  .health-doc-mini-grid,
  .health-doc-definition-grid,
  .health-doc-tracking-demo .tracking-stat-grid {
    grid-template-columns: 1fr;
  }

  .health-doc-card-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Match health docs icon proportions to report cards */
.health-doc-flow .lucide-icon,
.health-doc-status-card .lucide-icon,
.health-doc-mini-card .lucide-icon,
.health-doc-card-header > .lucide-icon,
.health-doc-large-icon {
  --icon-size: 24px;
}

.health-doc-flow .lucide-icon svg,
.health-doc-status-card .lucide-icon svg,
.health-doc-mini-card .lucide-icon svg,
.health-doc-card-header > .lucide-icon svg,
.health-doc-large-icon svg {
  width: var(--icon-size, 24px);
  height: var(--icon-size, 24px);
  stroke-width: 2.35;
}

.health-doc-mini-card .lucide-icon,
.health-doc-status-card .lucide-icon,
.health-doc-flow .lucide-icon {
  width: 54px;
  height: 54px;
}

.health-doc-card-header > .lucide-icon,
.health-doc-large-icon {
  width: 64px;
  height: 64px;
}

/* MailMode logo click animation */
.brand-logo-inline {
  display: block;
  width: 190px;
  max-width: 44vw;
  height: auto;
  line-height: 0;
  color: #eef1ff;
}

.footer-brand-block .brand-logo-inline {
  width: min(230px, 100%);
  cursor: pointer;
}

.footer-brand-block .brand-logo-inline:focus-visible {
  outline: 3px solid rgba(139, 92, 246, 0.45);
  outline-offset: 5px;
  border-radius: 14px;
}

.mailmode-logo-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.mailmode-logo-svg .logo-blob,
.mailmode-logo-svg .logo-card-left,
.mailmode-logo-svg .logo-card-right,
.mailmode-logo-svg .logo-word-mail,
.mailmode-logo-svg .logo-word-mode {
  transform-box: fill-box;
  transform-origin: center;
}

.mailmode-logo-svg .logo-blob {
  fill: #6d73ff;
  stroke: none;
}

.mailmode-logo-svg .logo-card-light,
.mailmode-logo-svg .logo-check-right,
.mailmode-logo-svg .logo-word-mail {
  fill: #eef1ff;
}

.mailmode-logo-svg .logo-card-dark,
.mailmode-logo-svg .logo-word-mail-light,
.mailmode-logo-svg .logo-word-mode {
  fill: #111827;
}

.mailmode-logo-svg .logo-card-light,
.mailmode-logo-svg .logo-card-dark {
  stroke: none;
}

.mailmode-logo-svg .logo-word-mail {
  fill: #eef1ff;
}

.mailmode-logo-svg .logo-word-mode {
  fill: #6d73ff;
}

.mailmode-logo-svg .logo-check-left,
.mailmode-logo-svg .logo-check-right {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2px;
  stroke-dasharray: 14;
  stroke-dashoffset: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.mailmode-logo-svg .logo-check-left {
  stroke: #111827;
}

.mailmode-logo-svg .logo-check-right {
  stroke: #eef1ff;
}

.mailmode-logo-svg .logo-word {
  font-family: Inter-Black, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.05em;
  stroke: none;
  stroke-width: 0;
  paint-order: normal;
}

.mailmode-logo-svg .logo-word tspan {
  stroke: none;
  stroke-width: 0;
}

.mailmode-logo-svg .logo-spark {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  fill: #eef1ff;
}

:root[data-theme="light"] .mailmode-logo-svg .logo-word-mail {
  fill: #111827;
}

.is-logo-clicking .brand-logo-inline {
  animation: mailmodeLogoPress 760ms cubic-bezier(.2, .9, .2, 1) both;
}

.is-logo-clicking .logo-blob {
  animation: mailmodeLogoBlobConfirm 760ms cubic-bezier(.2, .9, .2, 1) both;
}

.is-logo-clicking .logo-card-left {
  animation: mailmodeLogoCardLeft 760ms cubic-bezier(.2, .9, .2, 1) both;
}

.is-logo-clicking .logo-card-right {
  animation: mailmodeLogoCardRight 760ms cubic-bezier(.2, .9, .2, 1) both;
}

.is-logo-clicking .logo-check-left,
.is-logo-clicking .logo-check-right {
  animation: mailmodeLogoRedrawCheck 760ms ease both;
}

.is-logo-clicking .logo-word-mail {
  animation: mailmodeLogoWordNudge 760ms ease both;
}

.is-logo-clicking .logo-word-mode {
  animation: mailmodeLogoModeGlow 760ms ease both;
}

.is-logo-clicking .logo-spark {
  animation: mailmodeLogoSparkPop 760ms ease both;
}

.is-logo-clicking .logo-spark.two {
  animation-delay: 55ms;
}

.is-logo-clicking .logo-spark.three {
  animation-delay: 90ms;
}

@keyframes mailmodeLogoPress {
  0% { transform: scale(1); }
  18% { transform: scale(.982); }
  48% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

@keyframes mailmodeLogoBlobConfirm {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(109, 115, 255, 0)); }
  22% { transform: scaleX(.985) scaleY(1.035); }
  52% { transform: scaleX(1.025) scaleY(.985); filter: drop-shadow(0 8px 16px rgba(109, 115, 255, .20)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(109, 115, 255, 0)); }
}

@keyframes mailmodeLogoCardLeft {
  0% { transform: translateY(0) rotate(0deg); }
  18% { transform: translateY(1.5px) rotate(-1deg); }
  45% { transform: translateY(-3px) rotate(-1.5deg); }
  70% { transform: translateY(.8px) rotate(.4deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes mailmodeLogoCardRight {
  0% { transform: translateY(0) rotate(0deg); }
  22% { transform: translateY(1.5px) rotate(1deg); }
  50% { transform: translateY(-3.5px) rotate(1.6deg); }
  74% { transform: translateY(.6px) rotate(-.4deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes mailmodeLogoRedrawCheck {
  0%, 22% { stroke-dashoffset: 0; transform: scale(1); }
  28% { stroke-dashoffset: 14; transform: scale(.96); }
  58% { stroke-dashoffset: 0; transform: scale(1.06); }
  100% { stroke-dashoffset: 0; transform: scale(1); }
}

@keyframes mailmodeLogoWordNudge {
  0%, 100% { transform: translateX(0); opacity: 1; }
  35% { transform: translateX(1px); opacity: .92; }
}

@keyframes mailmodeLogoModeGlow {
  0%, 100% { transform: translateX(0); filter: drop-shadow(0 0 0 rgba(109, 115, 255, 0)); }
  48% { transform: translateX(1.5px); filter: drop-shadow(0 0 8px rgba(109, 115, 255, .22)); }
}

@keyframes mailmodeLogoSparkPop {
  0%, 35%, 100% { opacity: 0; transform: scale(.5) translateY(0); }
  50% { opacity: 1; transform: scale(1) translateY(-1px); }
  72% { opacity: 0; transform: scale(.85) translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .footer-status-dot,
  .footer-status-dot::after,
  .is-logo-clicking .brand-logo-inline,
  .is-logo-clicking .logo-blob,
  .is-logo-clicking .logo-card-left,
  .is-logo-clicking .logo-card-right,
  .is-logo-clicking .logo-check-left,
  .is-logo-clicking .logo-check-right,
  .is-logo-clicking .logo-word-mail,
  .is-logo-clicking .logo-word-mode,
  .is-logo-clicking .logo-spark {
    animation: none;
  }
}


/* Launch QA polish */
.footer-columns {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.dropzone strong {
  display: block;
  max-width: min(560px, 92%);
  margin: 0 auto;
  color: var(--ink);
  font-size: clamp(23px, 1.75vw, 32px);
  line-height: 1.22;
  text-wrap: balance;
  box-shadow: none;
  backdrop-filter: none;
}

@media (max-width: 560px) {
  .dropzone strong {
    max-width: 18rem;
    font-size: 22px;
  }
}


/* Status page */
.status-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.status-service-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(160, 150, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(18, 19, 50, 0.72), rgba(7, 9, 28, 0.64));
}

.status-service-grid .footer-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #20d183;
  box-shadow: 0 0 12px rgba(32, 209, 131, 0.38);
}

.status-service-grid strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 920;
}

.status-service-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.55;
}

:root[data-theme="light"] .status-service-grid article {
  border-color: rgba(109, 93, 252, 0.14);
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 780px) {
  .footer-columns,
  .status-service-grid {
    grid-template-columns: 1fr;
  }
}

/* Internal lab */
.lab-page {
  min-height: 100vh;
}

.lab-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding-block: clamp(36px, 8vw, 96px);
}

.lab-main {
  display: grid;
  width: min(100%, 960px);
  gap: 22px;
}

.lab-card,
.lab-panel,
.lab-stat-card {
  position: relative;
  border: 1px solid rgba(184, 166, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(11, 16, 32, 0.95)),
    var(--surface);
  box-shadow: var(--shadow-lg);
}

.lab-card {
  padding: clamp(26px, 4vw, 42px);
}

.lab-login-card {
  width: min(100%, 430px);
  margin-inline: auto;
}

.lab-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(184, 166, 255, 0.24);
  border-radius: 999px;
  background: rgba(109, 93, 252, 0.14);
  color: #cfc7ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.lab-logo-wrap {
  margin: 28px 0 18px;
}

.lab-logo {
  display: block;
  width: 190px;
  max-width: 68vw;
  height: auto;
}

.lab-logo-light {
  display: none;
}

.lab-card h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lab-card p,
.lab-panel p,
.lab-session-note {
  margin: 10px 0 0;
  color: rgba(213, 222, 234, 0.74);
  font-size: 15px;
}

.lab-login-form {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.lab-login-form label {
  color: #eef1ff;
  font-size: 13px;
  font-weight: 850;
}

.lab-login-form input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(184, 166, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(5, 8, 22, 0.72);
  color: #f8fafc;
  font: inherit;
  outline: none;
}

.lab-login-form input:focus {
  border-color: rgba(169, 85, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.16);
}

.lab-login-form .share-button {
  justify-content: center;
  margin-top: 8px;
  background: var(--purple);
  color: #ffffff;
}

.lab-login-card small,
.lab-session-note {
  display: block;
  color: rgba(152, 166, 186, 0.78);
  font-size: 12px;
  font-weight: 760;
}

.lab-login-card small {
  margin-top: 16px;
}

.lab-error {
  padding: 11px 13px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-weight: 800;
}

.lab-dashboard {
  width: min(100%, 1180px);
}

.lab-dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.lab-dashboard-hero h1 {
  margin-top: 20px;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.lab-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  color: inherit;
  text-decoration: none;
}

.lab-panel-link {
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.lab-panel-link:hover,
.lab-panel-link:focus-visible {
  border-color: rgba(169, 85, 255, 0.48);
  box-shadow: 0 22px 60px rgba(109, 93, 252, 0.2);
  transform: translateY(-2px);
  outline: none;
}

.lab-panel-inactive {
  border-color: rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.58), rgba(11, 16, 32, 0.64)),
    var(--surface);
  box-shadow: none;
  opacity: 0.72;
}

.lab-panel-inactive > span {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.74);
}

.lab-panel-inactive h2,
.lab-panel-inactive p {
  color: rgba(203, 213, 225, 0.7);
}

.lab-planned-grid {
  margin-top: 4px;
}

.lab-planned-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: rgba(203, 213, 225, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lab-panel > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: rgba(109, 93, 252, 0.16);
  color: #cfc7ff;
}

.lab-panel h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.lab-panel p {
  margin: 0;
  line-height: 1.55;
}

.lab-card code {
  color: #eef1ff;
  font-size: 0.95em;
}

.lab-actions {
  display: grid;
  grid-template-columns: repeat(2, 156px);
  justify-content: end;
  gap: 10px;
  width: max-content;
}

.lab-actions form {
  margin: 0;
  display: contents;
}

.lab-actions .secondary-button {
  display: inline-flex;
  width: 156px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: var(--button-radius) !important;
  background: rgba(5, 8, 22, 0.34);
  color: #eef1ff;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.lab-stats {
  gap: 18px;
}

.lab-stats-hero {
  align-items: center;
}

.lab-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.lab-stat-card {
  display: grid;
  min-height: 164px;
  align-content: start;
  gap: 6px;
  padding: 20px;
}

.lab-stat-card span,
.lab-stat-card small {
  color: rgba(190, 203, 222, 0.72);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lab-stat-card strong {
  margin-top: 8px;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 0.98;
}

.lab-stat-card p {
  margin: 8px 0 0;
  color: rgba(213, 222, 234, 0.72);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.lab-stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
}

.lab-chart-card {
  grid-row: span 2;
}

.lab-card-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.lab-card-heading-with-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.lab-card-heading h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
}

.lab-range-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lab-range-filters a {
  display: grid;
  min-width: 76px;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid rgba(184, 166, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 8, 22, 0.36);
  color: rgba(213, 222, 234, 0.72);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.lab-range-filters a.is-active {
  border-color: rgba(168, 85, 255, 0.76);
  background: rgba(109, 73, 255, 0.24);
  color: #f8fafc;
}

.lab-range-filters small {
  color: rgba(190, 203, 222, 0.62);
  font-size: 9px;
  font-weight: 850;
  text-transform: none;
}

.lab-chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: -8px 0 16px;
}

.lab-chart-summary span {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(184, 166, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(5, 8, 22, 0.3);
  color: rgba(213, 222, 234, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lab-chart-summary strong {
  color: #f8fafc;
  font-size: 26px;
  line-height: 1;
}

.lab-bar-chart {
  display: grid;
  grid-template-columns: repeat(var(--lab-chart-columns, 7), minmax(44px, 1fr));
  gap: 10px;
  min-height: 320px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(184, 166, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(5, 8, 22, 0.38);
  overflow-x: auto;
}

.lab-day-bar {
  display: grid;
  min-width: 0;
  gap: 8px;
  align-items: end;
  text-align: center;
}

.lab-day-total {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 950;
}

.lab-day-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 4px;
  height: 205px;
}

.lab-day-columns span {
  position: relative;
  display: block;
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
}

.lab-day-columns b {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(50%);
  color: rgba(248, 250, 252, 0.92);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.lab-day-columns .renders {
  background: linear-gradient(180deg, #a855ff, #6d73ff);
}

.lab-day-columns .shares {
  background: linear-gradient(180deg, #20d183, #45e0f4);
}

.lab-day-columns .errors {
  background: linear-gradient(180deg, #f59e0b, #ef4444);
}

.lab-day-bar strong {
  color: rgba(213, 222, 234, 0.72);
  font-size: 12px;
}

.lab-day-bar small {
  color: rgba(152, 166, 186, 0.78);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.lab-chart-key {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: rgba(213, 222, 234, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.lab-chart-key span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: #a855ff;
}

.lab-chart-key span:nth-child(2)::before {
  background: #20d183;
}

.lab-chart-key span:nth-child(3)::before {
  background: #ef4444;
}

.lab-breakdown-list {
  display: grid;
  gap: 14px;
}

.lab-breakdown-row {
  display: grid;
  grid-template-columns: minmax(108px, 0.8fr) minmax(90px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.lab-breakdown-row strong,
.lab-breakdown-row b {
  display: block;
  color: #f8fafc;
  font-size: 14px;
}

.lab-breakdown-row span {
  display: block;
  margin-top: 3px;
  color: rgba(190, 203, 222, 0.72);
  font-size: 12px;
  font-weight: 760;
}

.lab-breakdown-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.lab-breakdown-track span {
  height: 100%;
  margin: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d73ff, #a855ff);
}

.lab-empty-stat {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(184, 166, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(5, 8, 22, 0.34);
}

.lab-tool-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lab-table-card {
  padding: 0;
  overflow: hidden;
}

.lab-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.lab-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.lab-table th,
.lab-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(184, 166, 255, 0.12);
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
  font-weight: 760;
  text-align: left;
  white-space: nowrap;
}

.lab-table th {
  color: #f8fafc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lab-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 760px) {
  .lab-dashboard-hero,
  .lab-grid,
  .lab-stat-grid,
  .lab-stats-layout,
  .lab-system-grid {
    grid-template-columns: 1fr;
  }

  .lab-dashboard-hero {
    flex-direction: column;
  }

  .lab-actions {
    justify-content: flex-start;
  }

  .lab-card-heading-with-actions {
    grid-template-columns: 1fr;
  }

  .lab-range-filters {
    justify-content: flex-start;
  }

  .lab-bar-chart {
    gap: 6px;
    padding: 12px;
  }

  .lab-day-columns {
    height: 150px;
  }

  .lab-breakdown-row {
    grid-template-columns: 1fr;
  }

  .lab-table {
    min-width: 560px;
  }
}

/* Button radius consistency */
button,
.preview-button,
.about-button,
[role="button"] {
  border-radius: var(--button-radius) !important;
}

.theme-toggle {
  border-radius: 999px !important;
}
