:root {
  --ink: #111827;
  --muted: #667085;
  --paper: #fffaf1;
  --surface: #ffffff;
  --wash: #f4eee4;
  --line: #e7ded1;
  --teal: #2f6f68;
  --teal-dark: #174f49;
  --copper: #b36b38;
  --plum: #6b4d65;
  --blue: #1f4d74;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes soft-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes quiet-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(255, 250, 241, 0.92), rgba(255, 250, 241, 0.92)),
    repeating-linear-gradient(0deg, rgba(31, 77, 116, 0.06) 0 1px, transparent 1px 34px),
    #fbf6ed;
  animation: page-in 480ms var(--ease-standard) both;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(3.2rem, 6.4vw, 6.8rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 3.6vw, 4rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(255, 250, 241, 0.86);
  border-bottom: 1px solid rgba(231, 222, 209, 0.86);
  backdrop-filter: blur(18px);
  transition:
    background-color 300ms var(--ease-standard),
    border-color 300ms var(--ease-standard),
    box-shadow 300ms var(--ease-standard);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  transition: transform 320ms var(--ease-premium);
}

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

.brand-mark {
  width: 64px;
  height: 48px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-3px);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav a,
.text-link {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 760;
  transition: color 220ms var(--ease-standard);
}

.main-nav a::after,
.text-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 320ms var(--ease-premium);
}

.main-nav a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
}

.main-nav a:hover,
.text-link:hover,
.output-card a:hover {
  color: var(--teal-dark);
}

.header-actions,
.hero-actions,
.auth-actions,
.generator-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.inline-button,
.ghost-link,
.price-card button,
.text-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 820;
  transition:
    transform 300ms var(--ease-premium),
    background-color 260ms var(--ease-standard),
    border-color 260ms var(--ease-standard),
    box-shadow 300ms var(--ease-premium),
    color 220ms var(--ease-standard),
    opacity 220ms var(--ease-standard);
}

.primary-button,
.inline-button,
.price-card button {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 14px 28px rgba(47, 111, 104, 0.22);
}

.primary-button:hover,
.inline-button:hover,
.price-card button:hover:not(:disabled) {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(47, 111, 104, 0.26);
}

.ghost-button:hover,
.ghost-link:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 111, 104, 0.3);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.primary-button:active,
.ghost-button:active,
.inline-button:active,
.ghost-link:active,
.price-card button:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.primary-button.large {
  min-height: 54px;
  padding: 0 24px;
}

.primary-button:disabled,
.price-card button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
  transform: none;
  box-shadow: none;
}

.ghost-button,
.ghost-link {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.ghost-button.full {
  width: 100%;
  margin-top: 16px;
}

.inline-button,
.ghost-link,
.primary-button.full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button.full {
  width: 100%;
  margin-top: 16px;
}

.text-button {
  height: auto;
  min-height: 0;
  padding: 0;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.66);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(58px, 7vw, 110px) clamp(18px, 5vw, 76px) clamp(40px, 5vw, 72px);
}

.hero-copy {
  max-width: 780px;
  animation: soft-rise 760ms var(--ease-premium) both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-text,
.section-heading p,
.placeholder-page p,
.dashboard-intro p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.72;
}

.hero-logo-card {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 420px;
  padding: clamp(26px, 4vw, 44px);
  text-align: center;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  animation: soft-rise 840ms 90ms var(--ease-premium) both;
  transition:
    transform 520ms var(--ease-premium),
    border-color 340ms var(--ease-standard),
    box-shadow 520ms var(--ease-premium),
    background-color 340ms var(--ease-standard);
}

.hero-logo-card img {
  width: min(100%, 390px);
  margin-bottom: 22px;
  transform: translateX(16px);
  transition: transform 700ms var(--ease-premium);
}

.hero-logo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 111, 104, 0.18);
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.08);
}

.hero-logo-card:hover img {
  transform: translateX(16px) scale(1.018);
}

.hero-logo-card p {
  margin-bottom: 8px;
  color: var(--copper);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-logo-card strong {
  max-width: 360px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1;
}

.paper-preview,
.extracted-card,
.feature-card,
.price-card,
.dashboard-shell,
.auth-card,
.output-card,
.page-preview-card,
.history-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition:
    transform 420ms var(--ease-premium),
    box-shadow 420ms var(--ease-premium),
    border-color 260ms var(--ease-standard);
}

.feature-card:hover,
.price-card:hover,
.faq-card:hover,
.page-preview-card:hover,
.history-card:hover,
.output-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 104, 0.22);
  box-shadow: 0 30px 76px rgba(17, 24, 39, 0.11);
}

.split-section,
.workflow-section,
.pricing-section,
.dashboard-page,
.placeholder-page,
.faq-page {
  padding: clamp(58px, 7vw, 96px) clamp(18px, 5vw, 76px);
}

#sample-lab {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.96), rgba(246, 239, 229, 0.96)),
    #f8f1e8;
  border-top: 1px solid rgba(205, 191, 170, 0.58);
  border-bottom: 1px solid rgba(205, 191, 170, 0.58);
}

#sample-lab::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 42%),
    linear-gradient(90deg, rgba(47, 111, 104, 0.05) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 111, 104, 0.04) 0 1px, transparent 1px);
  background-size: auto, 116px 116px, 116px 116px;
  mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.18));
}

#sample-lab > * {
  position: relative;
}

#sample-lab .section-heading {
  display: grid;
  max-width: 1640px;
  margin: 0 auto clamp(32px, 5vw, 64px);
  text-align: left;
  justify-items: start;
}

#sample-lab .section-heading h2 {
  max-width: 980px;
  text-wrap: balance;
}

#sample-lab .section-heading p:not(.eyebrow) {
  margin-bottom: 0;
}

.section-heading {
  margin-bottom: 28px;
  animation: quiet-reveal 680ms var(--ease-premium) both;
}

.sample-lab {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.sample-flow {
  --sample-card-height: clamp(520px, 44vw, 680px);
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(260px, 0.56fr) minmax(340px, 1fr);
  max-width: 1640px;
  margin: 0 auto;
  gap: clamp(20px, 3vw, 42px);
  align-items: start;
  animation: soft-rise 760ms 70ms var(--ease-premium) both;
}

.sample-flow > .flow-card {
  height: var(--sample-card-height);
}

.flow-card {
  min-height: 0;
  max-height: none;
  padding: clamp(20px, 2.2vw, 34px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 249, 0.98));
  border: 1px solid rgba(205, 191, 170, 0.72);
  border-radius: 8px;
  box-shadow:
    0 32px 84px rgba(54, 40, 24, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
  transition:
    transform 500ms var(--ease-premium),
    box-shadow 500ms var(--ease-premium),
    border-color 280ms var(--ease-standard);
}

.flow-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 104, 0.2);
  box-shadow:
    0 38px 92px rgba(54, 40, 24, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.text-source {
  position: relative;
  padding: clamp(24px, 2.6vw, 38px) clamp(24px, 2.7vw, 44px);
  background:
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(31, 77, 116, 0.075) 35px 36px),
    linear-gradient(180deg, #ffffff, #fffdf9);
}

.text-source::before,
.image-result::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 8px;
  border-top: 2px solid rgba(47, 111, 104, 0.24);
  border-bottom: 2px solid rgba(47, 111, 104, 0.16);
  opacity: 0.9;
}

.text-source::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  height: 140px;
  margin: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 253, 249, 0), #fffdf9 78%);
}

.flow-card span {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 18px;
  padding: 0 12px;
  color: #9a5b2e;
  background: rgba(255, 250, 241, 0.86);
  border: 1px solid rgba(179, 107, 56, 0.22);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.flow-card p {
  color: #293445;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.9rem, 0.78vw, 1rem);
  line-height: 1.74;
}

.flow-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 4px;
  background: transparent;
  transition:
    transform 700ms var(--ease-premium),
    filter 420ms var(--ease-standard);
}

.image-result img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center top;
  padding: 0;
  box-shadow: 0 26px 58px rgba(17, 24, 39, 0.16);
}

.image-result:hover img {
  transform: scale(1.018);
  filter: saturate(1.03) contrast(1.01);
}

.style-bridge {
  display: grid;
  min-height: var(--sample-card-height);
  grid-template-columns: auto minmax(168px, 1fr) auto;
  gap: 14px;
  justify-items: center;
  align-items: center;
  padding: 0;
}

.style-bridge::before {
  content: none;
}

.style-bridge > * {
  grid-row: 1;
}

.style-bridge .flow-plus:first-child {
  grid-column: 1;
}

.style-pill {
  grid-column: 2;
}

.style-bridge .flow-plus:last-child {
  grid-column: 3;
}

.style-pill {
  display: grid;
  gap: 12px;
  place-items: center;
  width: min(188px, 100%);
  min-height: 198px;
  padding: 20px 16px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 241, 0.96));
  border: 1px solid rgba(205, 191, 170, 0.82);
  border-radius: 8px;
  box-shadow:
    0 22px 50px rgba(54, 40, 24, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(12px);
  transition:
    transform 420ms var(--ease-premium),
    box-shadow 420ms var(--ease-premium),
    border-color 280ms var(--ease-standard);
}

.style-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 104, 0.2);
  box-shadow:
    0 28px 60px rgba(54, 40, 24, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.style-pill span {
  margin: 0;
  color: #4f321f;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.22;
  text-transform: uppercase;
}

.image-result {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(14px, 1.4vw, 22px);
  padding: clamp(20px, 2.4vw, 36px);
  background:
    linear-gradient(180deg, #ffffff, #faf7f1);
  max-height: none;
  overflow: hidden;
}

.image-result span {
  margin-bottom: 0;
}

.blank-sample-page {
  width: 100%;
  min-height: 440px;
  border: 1px dashed #cdbfaa;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 0 58px, rgba(239, 178, 162, 0.7) 58px 61px, transparent 61px),
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(191, 219, 254, 0.7) 37px 39px),
    #fffdf8;
}

.flow-plus {
  align-self: center;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fffdf8;
  background: #2f6f68;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(47, 111, 104, 0.24);
  transition:
    transform 360ms var(--ease-premium),
    box-shadow 360ms var(--ease-premium);
}

.style-bridge:hover .flow-plus {
  transform: scale(1.04);
  box-shadow: 0 20px 42px rgba(47, 111, 104, 0.28);
}

.paper-preview {
  overflow: hidden;
}

.paper-preview img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.extracted-card {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 4vw, 46px);
  box-shadow: none;
}

.extracted-card span,
.price-card span,
.feature-card span,
.mini-status span {
  color: var(--copper);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.extracted-card p,
.feature-card p,
.price-card p,
.panel-header p,
.account-panel p,
.form-message {
  color: var(--muted);
  line-height: 1.65;
}

.workflow-section {
  background: rgba(255, 255, 255, 0.38);
  border-top: 1px solid rgba(231, 222, 209, 0.8);
  border-bottom: 1px solid rgba(231, 222, 209, 0.8);
}

.difference-section {
  padding: clamp(58px, 7vw, 96px) clamp(18px, 5vw, 76px);
}

.difference-section .section-heading {
  max-width: 860px;
}

.feature-grid,
.pricing-grid,
.outputs-grid,
.difference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.price-card,
.difference-card {
  padding: 24px;
  box-shadow: none;
  animation: quiet-reveal 660ms var(--ease-premium) both;
}

.feature-card:nth-child(2),
.price-card:nth-child(2),
.faq-card:nth-child(2),
.difference-card:nth-child(2) {
  animation-delay: 80ms;
}

.feature-card:nth-child(3),
.price-card:nth-child(3),
.faq-card:nth-child(3),
.difference-card:nth-child(3) {
  animation-delay: 140ms;
}

.faq-card:nth-child(4),
.faq-card:nth-child(5),
.faq-card:nth-child(6) {
  animation-delay: 180ms;
}

.feature-card:nth-child(2) {
  border-color: rgba(47, 111, 104, 0.34);
}

.feature-card:nth-child(3) {
  border-color: rgba(107, 77, 101, 0.28);
}

.difference-card {
  min-height: 240px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 241, 0.82));
  border: 1px solid rgba(205, 191, 170, 0.78);
  border-radius: 8px;
  box-shadow: 0 22px 62px rgba(17, 24, 39, 0.08);
  transition:
    transform 420ms var(--ease-premium),
    box-shadow 420ms var(--ease-premium),
    border-color 260ms var(--ease-standard);
}

.difference-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 104, 0.24);
  box-shadow: 0 30px 76px rgba(17, 24, 39, 0.11);
}

.difference-card span {
  display: block;
  margin-bottom: 18px;
  color: var(--copper);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.difference-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.coming-soon-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.72fr);
  align-items: center;
  gap: clamp(24px, 5vw, 76px);
  overflow: hidden;
  margin: clamp(44px, 6vw, 76px) clamp(18px, 5vw, 76px);
  padding: clamp(30px, 5vw, 58px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(31, 77, 116, 0.97), rgba(107, 77, 101, 0.96)),
    var(--blue);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: soft-rise 720ms var(--ease-premium) both;
  transition:
    transform 520ms var(--ease-premium),
    box-shadow 520ms var(--ease-premium);
}

.coming-soon-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 34px 90px rgba(17, 24, 39, 0.16);
}

.coming-soon-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.28;
}

.coming-soon-section::after {
  content: "x² + 5x + 6 = 0\A(x + 2)(x + 3) = 0\Ax = -2 or x = -3";
  position: relative;
  z-index: 1;
  justify-self: end;
  max-width: 390px;
  color: rgba(255, 255, 255, 0.86);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1rem, 1.55vw, 1.45rem);
  font-weight: 800;
  line-height: 1.8;
  white-space: pre;
}

.coming-soon-section > div {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.coming-soon-section h2 {
  margin-bottom: 10px;
  font-size: clamp(2.6rem, 5vw, 5.5rem);
}

.coming-soon-section p {
  max-width: 740px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.15vw, 1.18rem);
  line-height: 1.65;
}

.coming-soon-section .eyebrow {
  color: #f1c89f;
}

.coming-soon-section .ghost-link {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.price-card.featured {
  border-color: rgba(47, 111, 104, 0.42);
  box-shadow: 0 18px 48px rgba(47, 111, 104, 0.14);
}

.price-card h3 {
  margin: 12px 0 6px;
  font-size: 3.1rem;
}

.price-card button {
  width: 100%;
  margin-top: 16px;
}

.price-card button:disabled {
  color: var(--muted);
  background: #eee7dc;
  box-shadow: none;
}

.pricing-status {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 780;
}

.dashboard-intro {
  margin-bottom: 26px;
}

.dashboard-intro h1,
.placeholder-page h1 {
  font-size: clamp(3rem, 5vw, 5rem);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  animation: soft-rise 720ms var(--ease-premium) both;
}

.account-panel {
  min-height: 100%;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: #f8f1e8;
}

.account-panel h2,
.panel-header h2 {
  font-size: 2rem;
}

.credit-pill,
.mini-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.credit-pill span {
  font-size: 3rem;
  font-weight: 900;
}

.mini-status {
  display: grid;
  align-items: start;
}

.generator-panel {
  padding: clamp(22px, 3vw, 32px);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

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

.upload-box {
  display: grid;
  min-height: 340px;
  padding: 18px;
  align-content: start;
  gap: 12px;
  color: var(--muted);
  font-weight: 820;
  background: #fbf8f2;
  border: 1px dashed #cdbfaa;
  border-radius: 8px;
  transition:
    transform 360ms var(--ease-premium),
    border-color 240ms var(--ease-standard),
    background-color 240ms var(--ease-standard);
}

.upload-box:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 111, 104, 0.34);
  background: #fffdf8;
}

.upload-box img {
  display: none;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.input-stack {
  display: grid;
  gap: 10px;
}

.input-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
}

.input-divider::before,
.input-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.input-divider span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.input-stack label,
.auth-card label {
  color: #344054;
  font-weight: 820;
}

input,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    border-color 220ms var(--ease-standard),
    box-shadow 260ms var(--ease-standard),
    background-color 220ms var(--ease-standard);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(47, 111, 104, 0.45);
  box-shadow: 0 0 0 4px rgba(47, 111, 104, 0.10);
}

input {
  min-height: 44px;
  padding: 10px 12px;
}

textarea {
  min-height: 306px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

.confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0;
  color: #344054;
}

.confirm-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

#statusText {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
}

.page-preview-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.page-preview-heading h3 {
  margin-bottom: 0;
}

.page-preview-heading span,
.page-preview-empty,
.page-preview-note {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.page-preview-empty {
  margin-bottom: 0;
}

.page-preview-note {
  margin: -4px 0 14px;
  padding: 12px 14px;
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
}

.page-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.page-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 280px;
  padding: 14px;
  background: #fff;
  box-shadow: none;
}

.page-preview-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-left: 28px;
}

.page-preview-meta span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
}

.page-preview-card p {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding-left: 28px;
  color: #293445;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.warning-box {
  margin-top: 18px;
  padding: 14px 16px;
  color: #6c4320;
  background: #fff5dd;
  border: 1px solid #efd39a;
  border-radius: 8px;
  line-height: 1.55;
}

.cost-note {
  margin-top: 20px;
  padding: 18px;
  color: #173f3b;
  background: #eef8f5;
  border: 1px solid #b9dcd5;
  border-radius: 8px;
}

.cost-note h3 {
  margin-bottom: 6px;
}

.cost-note p {
  margin-bottom: 0;
  line-height: 1.6;
}

.outputs-grid {
  margin-top: 22px;
}

.output-card {
  padding: 12px;
  box-shadow: none;
}

.output-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid #e1eaf4;
  border-radius: 6px;
  background: #fbf8f2;
}

.output-card a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--teal);
  font-weight: 850;
  text-decoration: none;
}

.history-panel {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.history-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.history-heading h3 {
  margin-bottom: 0;
}

.history-heading span,
.history-empty {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.history-empty {
  margin-bottom: 0;
}

.history-grid {
  display: grid;
  gap: 12px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 190px);
  gap: 14px;
  align-items: center;
  padding: 12px;
  box-shadow: none;
}

.history-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.history-meta span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 8px;
}

.history-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid #e1eaf4;
  border-radius: 6px;
}

.placeholder-page {
  display: grid;
  min-height: calc(100vh - 72px);
  align-items: center;
}

.placeholder-page > div {
  max-width: 760px;
}

.faq-page h1 {
  font-size: clamp(3rem, 5vw, 5rem);
}

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

.faq-card {
  padding: clamp(22px, 3vw, 30px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: quiet-reveal 660ms var(--ease-premium) both;
}

.faq-card h2 {
  margin-bottom: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  line-height: 1.2;
}

.faq-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.faq-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  text-decoration: none;
}

.auth-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-dialog::backdrop {
  background: rgba(17, 24, 39, 0.36);
  backdrop-filter: blur(8px);
  animation: page-in 220ms var(--ease-standard) both;
}

.auth-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 26px;
  box-shadow: none;
  animation: soft-rise 360ms var(--ease-premium) both;
}

.auth-card label {
  display: grid;
  gap: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: #f8f1e8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-tabs button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 850;
}

.auth-tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 900;
}

.form-message {
  min-height: 20px;
  margin-bottom: 0;
  padding: 12px 14px;
  background: #f8f1e8;
  border-radius: 8px;
}

.form-message:empty {
  display: none;
}

.form-message.error {
  color: #8a1f1f;
  background: #fff0f0;
  border: 1px solid #f0b4b4;
}

.form-message.success {
  color: #235c45;
  background: #eefaf4;
  border: 1px solid #a9dec2;
}

.hidden {
  display: none !important;
}

@media (max-width: 1040px) {
  .main-nav {
    display: none;
  }

  .hero-section,
  .sample-lab,
  .sample-flow,
  .coming-soon-section,
  .dashboard-shell,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .coming-soon-section::after {
    justify-self: start;
    max-width: 100%;
  }

  .style-bridge {
    min-height: auto;
    grid-template-rows: auto;
    gap: 12px;
    padding: 4px 0;
  }

  .style-bridge::before {
    grid-row: 1 / 4;
    width: min(100%, 320px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47, 111, 104, 0.28), transparent);
  }

  .style-bridge .flow-plus:first-child,
  .style-pill,
  .style-bridge .flow-plus:last-child {
    grid-row: auto;
  }

  .style-pill {
    min-height: auto;
    width: min(220px, 100%);
  }

  .text-source {
    height: 520px;
  }

  .image-result img {
    height: auto;
  }

  .flow-plus {
    margin: 0 auto;
  }

  .hero-section {
    min-height: auto;
  }

  .dashboard-shell {
    overflow: visible;
  }

  .account-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-grid,
  .pricing-grid,
  .outputs-grid,
  .difference-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

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

  .brand span {
    overflow-wrap: anywhere;
  }

  .header-actions,
  .hero-actions,
  .panel-header,
  .page-preview-heading,
  .history-heading,
  .history-card {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  h1 {
    font-size: 3.25rem;
  }

  .paper-preview img {
    min-height: 360px;
  }

  .history-meta span {
    white-space: normal;
  }
}

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