:root {
  --teal: #01696f;
  --teal-dark: #014a4e;
  --teal-soft: #e6f1f2;
  --coral: #ef6b53;
  --coral-soft: #fde7e0;
  --sun: #f3a738;
  --mint: #d6efe2;
  --peach: #fde2cf;
  --sky: #d8e8f5;
  --lilac: #e9ddf3;
  --ink: #28251d;
  --muted: #6f6b62;
  --line: #ece6d8;
  --bg: #fcf8ef;
  --card: #ffffff;
  --danger: #b3261e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(40, 37, 29, 0.05), 0 12px 28px rgba(40, 37, 29, 0.06);
  --shadow-soft: 0 6px 18px rgba(40, 37, 29, 0.05);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(1, 105, 111, 0.06) 0, transparent 24%),
    radial-gradient(circle at 92% 14%, rgba(239, 107, 83, 0.08) 0, transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(243, 167, 56, 0.06) 0, transparent 26%);
  background-attachment: fixed;
}

a {
  color: var(--teal);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero decorative shapes */
.hero-shapes {
  position: absolute;
  inset: 0 0 auto 0;
  height: 260px;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.shape {
  position: absolute;
  opacity: 0.55;
}
.shape-a {
  top: 38px;
  left: 6%;
  width: 36px;
  height: 36px;
  fill: var(--coral);
}
.shape-b {
  top: 110px;
  left: 18%;
  width: 80px;
  height: 80px;
  stroke: var(--teal);
}
.shape-c {
  top: 30px;
  right: 14%;
  width: 28px;
  height: 28px;
  fill: var(--sun);
  transform: rotate(15deg);
}
.shape-d {
  top: 140px;
  right: 6%;
  width: 50px;
  height: 50px;
  fill: var(--mint);
  transform: rotate(-10deg);
}

/* Header */
.site-header {
  position: relative;
  padding: 64px 0 28px;
  z-index: 1;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-soft);
}
.site-header h1 {
  font-family: "Fraunces", "DM Sans", serif;
  margin: 0 0 16px;
  font-size: clamp(34px, 5.5vw, 52px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.site-header h1 .hl {
  position: relative;
  white-space: nowrap;
  color: var(--teal-dark);
}
.site-header h1 .hl::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 4%;
  height: 38%;
  background: var(--coral-soft);
  z-index: -1;
  border-radius: 4px;
}
.lede {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
}

/* Tabs */
.tabs {
  position: sticky;
  top: 0;
  background: rgba(252, 248, 239, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
  margin-top: 20px;
}
.tabs-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 24px;
  scrollbar-width: none;
}
.tabs-row::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: none;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s;
}
.tab svg {
  width: 18px;
  height: 18px;
}
.tab:hover {
  color: var(--ink);
  background: rgba(1, 105, 111, 0.06);
}
.tab.active {
  background: var(--ink);
  color: white;
}
.tab.active:hover {
  background: var(--ink);
}
.badge {
  display: inline-block;
  min-width: 20px;
  text-align: center;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  font-weight: 700;
}
.tab:not(.active) .badge {
  background: var(--coral-soft);
  color: var(--coral);
}

/* Panels */
main {
  padding: 28px 0 80px;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
}

/* Tool intro card */
.tool-intro {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--mint);
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
}
.tool-intro.hue-mint {
  background: var(--mint);
}
.tool-intro.hue-peach {
  background: var(--peach);
}
.tool-intro.hue-sky {
  background: var(--sky);
}
.tool-intro.hue-lilac {
  background: var(--lilac);
}
.tool-intro h2 {
  font-family: "Fraunces", "DM Sans", serif;
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tool-intro p {
  margin: 0;
  color: var(--ink);
  opacity: 0.78;
  font-size: 15px;
  max-width: 640px;
}
.tool-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: white;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  box-shadow: var(--shadow-soft);
}
.tool-icon svg {
  width: 22px;
  height: 22px;
}

/* Forms */
.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}
.form .optional {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.form .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 0;
}
.form .grid label {
  margin-bottom: 0;
}
.form input[type="text"],
.form input[type="search"],
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form textarea {
  resize: vertical;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}
.form input::placeholder,
.form textarea::placeholder {
  color: #b3ad9f;
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.hint {
  color: var(--muted);
  font-size: 13px;
}

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.04s ease, background 0.15s ease, box-shadow 0.15s;
  letter-spacing: -0.005em;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 4px 12px rgba(1, 105, 111, 0.25);
}
.btn.primary:hover {
  background: var(--teal-dark);
  box-shadow: 0 6px 16px rgba(1, 105, 111, 0.3);
}
.btn.ghost {
  background: white;
  color: var(--muted);
  border: 1.5px solid var(--line);
}
.btn.ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.btn.danger {
  background: white;
  color: var(--danger);
  border: 1.5px solid var(--line);
}
.btn.danger:hover {
  background: rgba(179, 38, 30, 0.06);
  border-color: rgba(179, 38, 30, 0.3);
}
.btn.small {
  padding: 7px 14px;
  font-size: 13px;
}

/* Output */
.output {
  margin-top: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.output-toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.output h2 {
  font-family: "Fraunces", "DM Sans", serif;
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.output h3 {
  font-family: "Fraunces", "DM Sans", serif;
  font-weight: 700;
  font-size: 18px;
  margin: 26px 0 8px;
  color: var(--teal-dark);
}
.output h4 {
  font-size: 15px;
  margin: 18px 0 4px;
  color: var(--ink);
}
.output p {
  margin: 8px 0;
}
.output ul,
.output ol {
  margin: 8px 0;
  padding-left: 22px;
}
.output li {
  margin: 5px 0;
}
.output code {
  background: var(--teal-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}

/* Flashcards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.flashcard {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  page-break-inside: avoid;
  transition: transform 0.15s, box-shadow 0.15s;
}
.flashcard:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.flashcard .word {
  font-family: "Fraunces", "DM Sans", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.2;
}
.flashcard .pos {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.flashcard .sentence {
  font-size: 14px;
  margin-top: 10px;
  color: var(--ink);
}

/* Library */
.library-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}
.library-toolbar input[type="search"] {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: white;
}
.library-toolbar input[type="search"]:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}
.library-list {
  display: grid;
  gap: 12px;
}
.library-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-soft);
}
.library-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.library-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.library-item-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.library-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.library-item-body {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.library-item.expanded .library-item-body {
  display: block;
}
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 50px 20px;
  background: white;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

/* Inline button spinner */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: -2px;
}
.btn[disabled] {
  opacity: 0.75;
  cursor: progress;
}

/* Inline output loading state */
.output-loading {
  margin-top: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 15px;
}
.output-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--teal-soft);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
}

/* Error */
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}
.site-footer p {
  margin: 0;
}

/* Print */
@media print {
  .site-header,
  .tabs,
  .hero-shapes,
  .site-footer,
  .form,
  .tool-intro,
  .output-toolbar,
  .actions,
  .output-loading,
  .toast {
    display: none !important;
  }
  body {
    background: white;
    background-image: none;
  }
  .output {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .flashcard {
    background: white;
    border: 2px solid #000;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 40px;
  }
  .site-header h1 {
    font-size: 32px;
  }
  .form,
  .output {
    padding: 18px;
  }
  .tool-intro {
    padding: 18px;
  }
  .tool-intro h2 {
    font-size: 20px;
  }
  .tab span {
    display: none;
  }
  .tab {
    padding: 9px 11px;
  }
  .tab.active span {
    display: inline;
  }
  .shape {
    display: none;
  }
}


/* Commercial MVP: account and pricing */
.account-strip {
  background: white;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
#account-status {
  display: block;
}
#usage-status {
  color: var(--muted);
  font-size: 13px;
}
.account-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.account-actions input[type="email"] {
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  min-width: 220px;
  font: inherit;
}
.pricing-section {
  margin: 38px 0 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.price-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.price-card.featured {
  border: 2px solid var(--teal);
}
.price-card h3 {
  margin: 0 0 8px;
  font-family: "Fraunces", "DM Sans", serif;
}
.price {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--teal-dark);
}


/* Branding */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.brand-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex: none;
}

.account-actions input[type="password"],
.account-actions input[type="email"] {
  min-width: 190px;
}
.btn.google {
  background: white;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn.google:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-soft);
}
.visual-supports {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 22px;
}
.visual-card {
  background: var(--teal-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.visual-card strong {
  display: block;
  color: var(--teal-dark);
  margin-bottom: 6px;
}
.visual-card p,
.visual-card ul {
  margin-top: 6px;
}
.visual-card code {
  display: inline-block;
  margin: 2px 0;
  background: white;
  white-space: normal;
}
.image-prompt {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 8px;
}
@media (max-width: 640px) {
  .brand-lockup { align-items: flex-start; }
  .brand-logo { width: 74px; height: 74px; }
}

/* ===== Professional redesign patch: hero, account system and logo ===== */
body {
  background: #fffaf0;
  background-image:
    radial-gradient(circle at 15% 5%, rgba(0, 191, 255, 0.16) 0, transparent 26%),
    radial-gradient(circle at 90% 8%, rgba(255, 83, 97, 0.16) 0, transparent 24%),
    linear-gradient(180deg, #fff8e9 0%, #fffaf0 38%, #ffffff 100%);
}
.app-shell-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 22%, rgba(255, 214, 73, 0.22), transparent 16rem),
    radial-gradient(circle at 85% 24%, rgba(1, 105, 111, 0.13), transparent 18rem);
  z-index: -1;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 250, 240, 0.86);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(40, 37, 29, 0.08);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 22px;
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.topbar-brand img {
  width: 172px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(40,37,29,.08));
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 800;
}
.topbar-links a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  opacity: .76;
}
.topbar-links a:not(.btn):hover { opacity: 1; color: var(--teal); }
.hero-pro {
  padding: 54px 0 34px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .78fr);
  gap: 36px;
  align-items: center;
}
.hero-copy h1 {
  font-family: "Fraunces", "DM Sans", serif;
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: .96;
  letter-spacing: -0.045em;
  margin: 14px 0 18px;
  max-width: 760px;
}
.spark-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(1, 105, 111, .15);
  box-shadow: var(--shadow-soft);
}
.hero-copy .lede {
  font-size: 19px;
  max-width: 650px;
  color: #565148;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.trust-row span {
  font-size: 13px;
  font-weight: 800;
  color: var(--teal-dark);
  background: white;
  border: 1px solid rgba(1, 105, 111, .13);
  border-radius: 999px;
  padding: 8px 12px;
}
.auth-card {
  position: relative;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(40,37,29,.10);
  box-shadow: 0 24px 70px rgba(40,37,29,.13);
  border-radius: 30px;
  padding: 28px;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, #00bfff, #ff5361, #ffd649);
}
.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 16px;
}
.auth-logo {
  width: min(260px, 82%);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.10));
}
.auth-status-box {
  display: grid;
  gap: 5px;
  text-align: center;
  background: #fff7e1;
  border: 1px solid rgba(243, 167, 56, .28);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.auth-status-box strong {
  font-size: 20px;
}
.auth-status-box span {
  color: var(--muted);
  font-size: 14px;
}
.account-actions {
  display: grid;
  gap: 12px;
}
.auth-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ink);
}
.auth-field input,
.account-actions input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 13px 14px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(40,37,29,.03);
}
.auth-field input:focus,
.account-actions input:focus {
  outline: none;
  border-color: #00bfff;
  box-shadow: 0 0 0 4px rgba(0, 191, 255, .15);
}
.auth-button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn.google {
  background: #ffffff;
  color: var(--ink);
  border: 1.5px solid #dadce0;
  box-shadow: var(--shadow-soft);
}
.btn.google::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 50%;
  font-weight: 900;
  color: #4285f4;
  background: #fff;
}
.btn.full { width: 100%; justify-content: center; }
.text-link {
  border: 0;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0 0;
}
.tabs {
  margin-top: 0;
  background: rgba(255, 250, 240, .9);
}
.tabs-row {
  justify-content: center;
}
.tab.active {
  background: var(--teal);
  box-shadow: 0 8px 20px rgba(1,105,111,.18);
}
main.container {
  max-width: 1040px;
}
.tool-intro,
.form,
.output,
.price-card,
.library-item {
  border-radius: 24px;
}
.form {
  border-color: rgba(40,37,29,.08);
}
.pricing-section {
  max-width: 1040px;
  margin: 0 auto 40px;
  padding: 0 24px;
}
.price-card.featured {
  transform: translateY(-8px);
  box-shadow: 0 22px 60px rgba(1,105,111,.16);
}
.site-footer {
  background: #fff;
}
@media (max-width: 860px) {
  .topbar-inner { min-height: 72px; }
  .topbar-brand img { width: 138px; }
  .topbar-links a:not(.btn) { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-pro { padding-top: 30px; }
  .auth-card { padding: 22px; }
  .auth-logo { width: min(230px, 86%); }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .topbar-links .btn { padding: 8px 12px; }
  .hero-copy h1 { font-size: 42px; }
  .auth-button-grid { grid-template-columns: 1fr; }
  .trust-row span { width: 100%; text-align: center; }
}


/* === FINAL: flashcard images + PDF export === */
.visual-flashcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flashcard-image-wrap,
.flashcard-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #f7fbfb;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
}

.flashcard-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flashcard-image-placeholder span {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.image-failed span {
  color: var(--danger);
}

.flashcard-image-status {
  min-height: 20px;
  margin-top: -4px;
}

.image-prompt {
  font-size: 12px;
  color: var(--muted);
  background: var(--teal-soft);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 4px;
}

.pdf-page {
  position: fixed;
  left: -99999px;
  top: 0;
  width: 794px;
  background: #ffffff;
  color: var(--ink);
  padding: 28px;
  z-index: -1;
}

.pdf-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.pdf-brand img {
  width: 86px;
  height: auto;
}

.pdf-brand strong {
  display: block;
  font-size: 22px;
  color: var(--teal-dark);
}

.pdf-brand span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.pdf-export {
  margin-top: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}

.pdf-export .flashcard,
.pdf-export .stage,
.pdf-export .visual-card {
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-export .cards-grid {
  grid-template-columns: repeat(2, 1fr);
}

.pdf-export .image-prompt,
.pdf-export .flashcard-image-status {
  display: none;
}

@media print {
  .image-prompt,
  .flashcard-image-status {
    display: none !important;
  }
}
