@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f4efe8;
  --paper: rgba(255, 251, 245, 0.9);
  --paper-strong: #fffaf4;
  --ink: #1e1914;
  --muted: #6e665d;
  --line: rgba(88, 65, 38, 0.14);
  --accent: #c85b28;
  --accent-strong: #9e3f16;
  --accent-soft: #f4c9ad;
  --shadow: 0 24px 70px rgba(69, 42, 15, 0.09);
  --shadow-soft: 0 14px 30px rgba(69, 42, 15, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(200, 91, 40, 0.2), transparent 24%),
    radial-gradient(circle at 85% 12%, rgba(231, 201, 171, 0.6), transparent 22%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(12px);
}

body::before {
  top: 72px;
  right: 7vw;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(200, 91, 40, 0.08);
  animation: floatOrb 14s ease-in-out infinite;
}

body::after {
  bottom: 12vh;
  left: 6vw;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(82, 116, 94, 0.08);
  animation: floatOrb 18s ease-in-out infinite reverse;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  margin: 40px auto 56px;
}

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

.brand-lockup {
  display: grid;
  gap: 6px;
}

.brand-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.auth-panel,
.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hidden {
  display: none !important;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-hero {
  display: block;
  margin: 30px 0 48px;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  margin-left: auto;
}

.public-nav a,
.text-link {
  color: #42584e;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.public-nav a:hover,
.text-link:hover {
  color: #b74f24;
}

.app-mode .public-nav {
  display: none;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  align-items: center;
  gap: clamp(34px, 6vw, 76px);
  padding: 48px 0 78px;
}

.public-hero-copy h1 {
  max-width: 14ch;
  margin: 18px 0;
  color: #193b32;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.public-hero-copy h1 span {
  color: #bc5529;
}

.public-hero-copy .lede {
  max-width: 54ch;
  color: #596b61;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.75;
}

.public-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 26px;
}

.public-hero-actions .primary-cta,
.public-bottom-cta .primary-cta {
  background: #193b32;
  box-shadow: 0 12px 24px rgba(25, 59, 50, 0.14);
}

.public-hero-actions .primary-cta:hover,
.public-bottom-cta .primary-cta:hover {
  background: #285347;
}

.public-note {
  margin: 14px 0 0;
  color: #69756f;
  font-size: 0.86rem;
}

.public-hero-copy .proof-row {
  margin-top: 24px;
}

.public-hero-copy .proof-pill {
  border-color: #dbe5dd;
  background: rgba(255, 255, 255, 0.72);
  color: #42584e;
}

.public-product-card {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid #e2e9e3;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(25, 59, 50, 0.12);
  transform: rotate(1.2deg);
}

.product-card-top,
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #76867c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.product-wave {
  color: #c85b28;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
}

.product-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf5ed;
  color: #285347;
}

.public-product-card > .eyebrow {
  margin-top: 32px;
  color: #6b8274;
}

.public-product-card h2 {
  margin: 8px 0 12px;
  color: #193b32;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.9rem;
}

.product-summary,
.product-line {
  color: #586960;
  font-size: 0.92rem;
  line-height: 1.65;
}

.product-divider {
  height: 1px;
  margin: 22px 0;
  background: #e8eee9;
}

.product-label {
  margin: 18px 0 8px;
  color: #7d8c82;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.product-line {
  display: flex;
  gap: 10px;
  margin: 7px 0;
}

.product-check,
.product-date {
  color: #2e7058;
  font-weight: 800;
}

.product-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e8eee9;
  color: #69756f;
  letter-spacing: 0;
  text-transform: none;
}

.public-section {
  padding: 58px 0;
  border-top: 1px solid rgba(25, 59, 50, 0.1);
  scroll-margin-top: 24px;
}

.public-section-heading {
  max-width: 660px;
  margin-bottom: 26px;
}

.public-section-heading .eyebrow,
.public-value .eyebrow,
.public-bottom-cta .eyebrow {
  color: #a64a24;
}

.public-section-heading h2,
.public-value h2,
.public-bottom-cta h2 {
  margin: 8px 0 12px;
  color: #193b32;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.public-section-heading > p:last-child {
  line-height: 1.6;
}

.steps-grid,
.public-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-card,
.public-price-card {
  padding: 24px;
  border: 1px solid #e0e8e1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
}

.step-number {
  color: #bf592e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.step-card h3 {
  margin: 24px 0 8px;
  color: #193b32;
  font-size: 1.12rem;
}

.step-card p,
.public-price-card > p:last-child,
.public-value > p {
  margin-bottom: 0;
  color: #627168;
  line-height: 1.65;
}

.public-value {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: center;
  gap: 34px;
  margin: 10px 0;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 26px;
  background: #193b32;
  color: #fff;
}

.public-value .eyebrow,
.public-value h2,
.public-value > p {
  color: #fff;
}

.public-value .eyebrow {
  color: #f0b58e;
}

.public-price-card .eyebrow {
  color: #5f786a;
}

.public-price-card h3 {
  margin: 14px 0 12px;
  color: #193b32;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.public-price-card h3 small {
  font-size: 0.67em;
}

.public-price-featured {
  border-color: #9fb9a7;
  background: linear-gradient(145deg, #edf5ed, #fff 76%);
}

.public-price-footnote {
  margin: 18px 0 0;
  color: #69756f;
  font-size: 0.88rem;
}

.public-secondary-cta {
  margin-top: 18px;
  background: #193b32;
  box-shadow: none;
}

.public-faq details {
  padding: 18px 0;
  border-top: 1px solid #e0e8e1;
}

.public-faq summary {
  color: #193b32;
  font-weight: 800;
  cursor: pointer;
}

.public-faq details p {
  max-width: 70ch;
  margin: 12px 0 0;
  color: #627168;
  line-height: 1.65;
}

.public-bottom-cta {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 24px;
  border-radius: 26px;
  background: #eaf1e9;
  text-align: center;
}

.public-bottom-cta h2 {
  max-width: 18ch;
}

body.auth-mode {
  background: #f6f7f3;
}

body.auth-mode::before,
body.auth-mode::after {
  display: none;
}

body.app-mode {
  --bg: #f6f7f3;
  --paper: #fff;
  --paper-strong: #fff;
  --ink: #193b32;
  --muted: #69756f;
  --line: #dfe5df;
  --accent: #285347;
  --accent-strong: #193b32;
  --accent-soft: #dce9df;
  --shadow: 0 18px 60px rgba(25, 59, 50, 0.06);
  --shadow-soft: 0 12px 28px rgba(25, 59, 50, 0.07);
  background: #f6f7f3;
}

body.app-mode::before,
body.app-mode::after {
  display: none;
}

.app-mode .topbar {
  padding-bottom: 22px;
  border-bottom: 1px solid #dfe5df;
}

.app-mode .brand-lockup .eyebrow,
.app-mode .plan-card .eyebrow {
  color: #285347;
}

.app-mode .card {
  border-color: #dfe5df;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(25, 59, 50, 0.06);
  backdrop-filter: none;
}

.app-mode button:not(.ghost-button) {
  background: #193b32;
  box-shadow: none;
}

.app-mode button:not(.ghost-button):hover {
  background: #285347;
}

.app-mode .ghost-button {
  border-color: #dfe5df;
  background: #fff;
  color: #193b32;
}

.app-mode .ghost-button:hover {
  border-color: #9fb4a9;
  color: #285347;
}

.auth-mode .topbar {
  padding-bottom: 22px;
  border-bottom: 1px solid #dfe5df;
}

.auth-mode .brand-lockup .eyebrow {
  color: #193b32;
}

.login-card {
  min-width: 0;
  width: 100%;
  padding: 48px;
  border: 1px solid #dfe5df;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(25, 59, 50, 0.06);
  text-align: center;
  align-items: center;
}

.login-symbol {
  margin-bottom: 24px;
}

.login-card .eyebrow {
  color: #69756f;
  font-size: 0.72rem;
}

.login-card h1 {
  margin: 14px 0 20px;
  max-width: none;
  color: #193b32;
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.login-card .lede {
  width: 100%;
  color: #69756f;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 38ch;
}

.login-card .proof-row {
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.login-card .proof-pill {
  padding: 7px 10px;
  border: 1px solid #e4e9e3;
  background: #f6f7f3;
  color: #496056;
  font-size: 0.72rem;
}

.login-card .login-actions {
  width: 100%;
  margin-top: 32px;
}

.login-card .primary-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
  border-radius: 12px;
  background: #193b32;
  box-shadow: none;
}

.login-card .primary-cta:hover {
  background: #285347;
}

.login-card .primary-cta::after {
  content: none;
}

.login-card .login-footnote {
  color: #69756f;
  font-size: 0.8rem;
  line-height: 1.6;
}

.login-card,
.login-preview,
.layout,
.topbar {
  animation: riseIn 680ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-copy {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-copy::after {
  content: none;
  position: absolute;
  inset: -20% auto auto 55%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 201, 173, 0.55), transparent 68%);
  pointer-events: none;
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}

.proof-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(200, 91, 40, 0.18);
  background: rgba(255, 255, 255, 0.66);
  color: #6f442a;
  font-size: 0.88rem;
}

.login-actions {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  max-width: 440px;
}

.login-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.login-preview {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.94), rgba(254, 245, 235, 0.94)),
    radial-gradient(circle at top right, rgba(200, 91, 40, 0.16), transparent 26%);
}

.preview-window {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(88, 65, 38, 0.08);
  background: #fffdfa;
  box-shadow: var(--shadow-soft);
  animation: driftCard 9s ease-in-out infinite;
}

.preview-top {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(245, 237, 227, 0.85);
  border-bottom: 1px solid rgba(88, 65, 38, 0.08);
}

.preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dfc8b3;
}

.preview-body {
  padding: 22px;
}

.preview-kicker {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(200, 91, 40, 0.1);
  color: var(--accent-strong);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-body h2 {
  margin: 18px 0 16px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.preview-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.preview-list li + li {
  margin-top: 10px;
}

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

.preview-metrics article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: #f8f1e8;
  border: 1px solid rgba(88, 65, 38, 0.08);
}

.preview-metrics strong {
  font-size: 1.5rem;
}

.preview-metrics span {
  color: var(--muted);
  font-size: 0.88rem;
}

.layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.95fr);
  align-items: start;
}

.pricing-card {
  grid-column: 1 / -1;
}

.main-column,
.side-column {
  display: grid;
  gap: 24px;
}

.side-column {
  align-content: start;
}

.eyebrow {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

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

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.72rem, 3vw, 2.55rem);
  line-height: 1.06;
  margin: 10px 0 8px;
  max-width: 16ch;
  text-wrap: balance;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.62;
  font-weight: 500;
  margin-bottom: 0;
}

.upload-card .upload-title {
  max-width: 22ch;
  font-size: clamp(1.56rem, 2.35vw, 2.02rem);
  line-height: 1.08;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

.field span {
  font-weight: 700;
  font-size: 0.95rem;
}

.output-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.output-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.choice-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 16px;
  border: 1px solid rgba(88, 65, 38, 0.13);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.92);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.choice-card:hover,
.choice-card:has(input:checked) {
  border-color: rgba(200, 91, 40, 0.48);
  box-shadow: 0 0 0 4px rgba(200, 91, 40, 0.08);
}

.choice-card input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--accent);
}

.choice-card span {
  display: grid;
  gap: 5px;
}

.choice-card strong {
  font-size: 0.94rem;
}

.choice-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(88, 65, 38, 0.13);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #8c8378;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(200, 91, 40, 0.55);
  box-shadow: 0 0 0 4px rgba(200, 91, 40, 0.1);
}

.file-input {
  padding: 12px;
  border-style: dashed;
  border-color: rgba(200, 91, 40, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.96), rgba(250, 242, 233, 0.92));
  cursor: pointer;
}

.file-input:hover {
  border-color: rgba(200, 91, 40, 0.48);
  box-shadow: 0 0 0 4px rgba(200, 91, 40, 0.08);
}

.file-input::file-selector-button {
  margin-right: 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(200, 91, 40, 0.16), rgba(217, 119, 69, 0.26));
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  box-shadow: inset 0 0 0 1px rgba(200, 91, 40, 0.12);
}

.file-input::file-selector-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(200, 91, 40, 0.2), rgba(217, 119, 69, 0.32));
}

.file-input::-webkit-file-upload-button {
  margin-right: 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(200, 91, 40, 0.16), rgba(217, 119, 69, 0.26));
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(200, 91, 40, 0.12);
}

button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #d97745 100%);
  color: white;
  padding: 14px 20px;
  font-weight: 700;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
  box-shadow: 0 12px 24px rgba(158, 63, 22, 0.18);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(158, 63, 22, 0.22);
}

button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.primary-cta {
  position: relative;
  overflow: hidden;
  padding-inline: 24px;
}

.primary-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.26) 44%, transparent 68%);
  transform: translateX(-110%);
  animation: ctaSweep 2.8s ease-in-out infinite;
}

.ghost-button {
  border: 1px solid rgba(88, 65, 38, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.6);
  color: var(--ink);
  padding: 11px 16px;
  box-shadow: none;
}

.ghost-button:hover {
  border-color: rgba(200, 91, 40, 0.4);
  color: var(--accent-strong);
  box-shadow: none;
}

.auth-pending .login-card,
.auth-pending .login-preview {
  opacity: 0.72;
  transform: scale(0.99);
}

.status {
  min-height: 24px;
  margin-top: 20px;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.result.hidden {
  display: none;
}

.result {
  position: relative;
}

.result.result-busy > :not(.result-loading) {
  opacity: 0.38;
  pointer-events: none;
  filter: blur(1px);
  transition: opacity 180ms ease, filter 180ms ease;
}

.result-head,
.history-head,
.history-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-loading {
  position: absolute;
  inset: 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(200, 91, 40, 0.18);
  border-radius: 22px;
  background: rgba(255, 249, 242, 0.92);
  box-shadow: 0 18px 42px rgba(69, 42, 15, 0.12);
  backdrop-filter: blur(10px);
}

.result-loading strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.result-loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(200, 91, 40, 0.18);
  border-top-color: var(--accent);
  animation: spinnerTurn 900ms linear infinite;
}

.history-card h2 {
  margin-top: 8px;
}

.plan-stats {
  margin-top: 10px;
}

.plan-stats p + p {
  margin-top: 6px;
}

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

.user-view-control {
  margin: 18px 0 12px;
  padding: 16px;
  border: 1px solid #cbd8ce;
  border-radius: 18px;
  background: #f6f7f3;
}

.user-view-control small {
  color: var(--muted);
  line-height: 1.45;
}

.preview-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #dfc893;
  border-radius: 14px;
  background: #fff8e8;
  color: #5e4820;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.audio-estimate {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
}

.audio-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px dashed #b8cbc0;
  border-radius: 18px;
  background: #f6f7f3;
}

.audio-picker-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #e5eee7;
  color: #285347;
  font-size: 1.6rem;
  font-weight: 800;
}

.audio-picker-content {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.audio-file-name {
  overflow: hidden;
  color: #193b32;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-picker-content small {
  color: var(--muted);
  line-height: 1.4;
}

.audio-picker-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 11px 16px;
  border-color: #cbd8ce;
  background: #fff;
  color: #193b32;
  font-weight: 800;
  white-space: nowrap;
}

.audio-picker-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.audio-picker-button:focus-within {
  outline: 3px solid rgba(40, 83, 71, 0.25);
  outline-offset: 2px;
}

.app-mode .audio-estimate {
  border-color: #b8cbc0;
  background: #f6f7f3;
  color: #193b32;
  box-shadow: inset 4px 0 #285347;
}

.demo-result {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(58, 125, 82, 0.24);
  border-radius: 18px;
  background: #f2faf3;
}

.demo-result pre {
  margin: 12px 0 0;
  font: 500 1rem/1.7 "Manrope", "Segoe UI", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.plan-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid rgba(88, 65, 38, 0.1);
  border-radius: 22px;
  padding: 20px;
  background: rgba(255, 252, 247, 0.88);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.demo-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.demo-help {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.demo-progress-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(40, 83, 71, 0.18);
  border-top-color: #285347;
  border-radius: 50%;
  animation: spinnerTurn 900ms linear infinite;
}

.plan-card.featured-plan {
  border-color: #9fb4a9;
  background: linear-gradient(145deg, #f1f6f1, #fff 70%);
}

.app-mode .plan-card,
.app-mode .history-item,
.app-mode .choice-card,
.app-mode .file-input {
  border-color: #e4e9e3;
  background: #fff;
}

.app-mode .plan-card.active,
.app-mode .choice-card:has(input:checked) {
  border-color: #9fb4a9;
  background: #f6f7f3;
  box-shadow: 0 0 0 3px rgba(40, 83, 71, 0.08);
}

.app-mode input:focus,
.app-mode textarea:focus {
  border-color: #69897b;
  box-shadow: 0 0 0 4px rgba(40, 83, 71, 0.1);
}

.app-mode .file-input {
  border-style: dashed;
}

.app-mode .audio-picker {
  border-color: #a9c0b0;
  background: linear-gradient(120deg, #f5f8f4, #fff 72%);
}

.app-mode .audio-picker-button {
  border-color: #b8cbc0;
  background: #fff;
  color: #193b32;
}

.app-mode .file-input::file-selector-button,
.app-mode .file-input::-webkit-file-upload-button {
  background: #e9f0eb;
  color: #193b32;
  box-shadow: inset 0 0 0 1px #d5e0d8;
}

.app-mode .demo-result {
  border-color: #b8cbc0;
  background: #f6f7f3;
}

.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.plan-card.active {
  border-color: rgba(200, 91, 40, 0.45);
  box-shadow: 0 18px 34px rgba(69, 42, 15, 0.1);
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.96), rgba(255, 252, 247, 0.9));
}

.plan-card h3 {
  margin: 10px 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.plan-card h3 small {
  font-size: 0.72em;
  font-weight: 600;
}

.plan-card .meta {
  margin-top: 8px;
}

.minutes-selector {
  margin: 10px 0 2px;
}

.minutes-selector input {
  width: 100%;
}

.plan-button {
  width: 100%;
  margin-top: auto;
  padding-top: 13px;
  padding-bottom: 13px;
}

.history-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.history-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(88, 65, 38, 0.1);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.92);
  padding: 14px;
  cursor: pointer;
  box-shadow: none;
}

.history-item:hover,
.history-item.active {
  border-color: rgba(200, 91, 40, 0.4);
  box-shadow: 0 14px 28px rgba(69, 42, 15, 0.08);
}

.history-item p,
.history-item small {
  color: var(--muted);
}

.history-item p {
  margin: 8px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #efe6d7;
  color: #5e4b33;
}

.pill-completed {
  background: #dfeede;
  color: #1d5c2c;
}

.pill-in_progress,
.pill-queued {
  background: #f8ebc9;
  color: #7a5600;
}

.pill-failed {
  background: #f5d8d8;
  color: #8a2626;
}

.block + .block {
  margin-top: 24px;
}

.literal-notice {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-left: 4px solid rgba(200, 91, 40, 0.55);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 248, 240, 0.92);
  color: #5e4b3b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.literal-plain-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.75;
}

.rich-text {
  display: grid;
  gap: 14px;
}

.rich-text p {
  margin: 0;
  line-height: 1.68;
  color: #32291f;
}

.qa-list,
.quote-list,
.transcript-segments {
  display: grid;
  gap: 14px;
}

.qa-card,
.segment-card {
  border: 1px solid rgba(88, 65, 38, 0.1);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 253, 249, 0.88);
}

.qa-card h4 {
  margin: 8px 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.04rem;
}

.qa-card p:last-child,
.segment-card p:last-child {
  margin-bottom: 0;
}

.qa-label {
  margin: 14px 0 6px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.highlight-quote {
  margin: 0;
  padding: 16px 18px;
  border-left: 4px solid rgba(200, 91, 40, 0.45);
  border-radius: 0 18px 18px 0;
  background: rgba(255, 248, 240, 0.92);
  color: #4b3828;
  line-height: 1.7;
}

.transcript-panel {
  border: 1px solid rgba(88, 65, 38, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.88);
  padding: 14px 16px 16px;
}

.transcript-panel summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.transcript-panel summary::-webkit-details-marker {
  display: none;
}

.transcript-panel[open] summary {
  margin-bottom: 16px;
}

.segment-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.segment-top span {
  color: var(--muted);
  font-size: 0.88rem;
}

ul {
  padding-left: 20px;
}

pre {
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(88, 65, 38, 0.1);
  border-radius: 16px;
  padding: 16px;
  max-height: 360px;
  overflow: auto;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -16px, 0) scale(1.04);
  }
}

@keyframes driftCard {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(-0.4deg);
  }
}

@keyframes ctaSweep {
  0%,
  100% {
    transform: translateX(-110%);
  }
  55%,
  65% {
    transform: translateX(110%);
  }
}

@keyframes spinnerTurn {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .login-hero,
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  h1 {
    max-width: 17ch;
  }

  .upload-card .upload-title {
    max-width: 24ch;
  }

  .public-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
  }

  .public-hero-copy h1 {
    max-width: 18ch;
  }

  .public-product-card {
    width: min(100%, 620px);
    justify-self: center;
    transform: none;
  }

  .public-value {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .audio-picker {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audio-picker-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .card.login-card {
    padding: 32px 22px;
  }

  .shell {
    width: min(100% - 20px, 1160px);
    margin: 20px auto 36px;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
  }

  .brand-lockup {
    flex: 1 0 60%;
  }

  .public-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 0;
  }

  .public-nav a {
    font-size: 0.82rem;
  }

  .login-hero {
    margin-top: 18px;
  }

  .public-hero {
    gap: 28px;
    padding: 28px 0 44px;
  }

  .public-hero-copy h1 {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
  }

  .public-hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .public-hero-actions .primary-cta,
  .public-bottom-cta .primary-cta {
    width: 100%;
    justify-content: center;
  }

  .public-product-card {
    padding: 23px;
    border-radius: 22px;
  }

  .public-section {
    padding: 42px 0;
  }

  .steps-grid,
  .public-price-grid {
    grid-template-columns: 1fr;
  }

  .step-card,
  .public-price-card {
    padding: 21px;
  }

  .public-value {
    padding: 28px 24px;
    border-radius: 22px;
  }

  .public-bottom-cta {
    padding: 36px 20px;
  }

  .plans-grid,
  .preview-metrics,
  .output-choice {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 22px;
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(1.58rem, 7vw, 2.15rem);
    line-height: 1.08;
    max-width: 17ch;
  }

  .upload-card .upload-title {
    max-width: 20ch;
    font-size: clamp(1.46rem, 6.2vw, 1.95rem);
  }

  .proof-row {
    gap: 8px;
  }

  .result-loading {
    inset: 18px;
    grid-template-columns: 1fr;
    text-align: left;
  }
}

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

  .plan-button {
    margin-top: 16px;
  }
}

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