/* Legacy component structure only. Active tokens and product styling live in zachetka.css. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.app-page {
  background:
    linear-gradient(180deg, #f6faf7 0%, #ffffff 46%, #f7faf8 100%),
    var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: #394454;
  font-size: 14px;
  font-weight: 720;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.status-pill.ready {
  border-color: rgba(8, 127, 111, 0.3);
  background: var(--green-soft);
  color: var(--teal-dark);
}

.status-pill.mock {
  border-color: rgba(154, 91, 0, 0.3);
  background: var(--amber-soft);
  color: var(--amber);
}

.marketing-page {
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.92), rgba(247, 250, 248, 0.8) 32%, #ffffff 100%),
    #f7faf8;
}

.marketing-header {
  background: rgba(247, 250, 248, 0.9);
}

.header-cta,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.header-cta {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(8, 127, 111, 0.22);
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-size: 14px;
  font-weight: 840;
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--teal-dark);
}

.link-button {
  width: auto;
  margin-top: 0;
}

.landing-hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 72px);
  align-items: center;
  padding: 72px 28px 86px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 54, 45, 0.95) 0%, rgba(7, 54, 45, 0.86) 52%, rgba(7, 54, 45, 0.24) 100%),
    url("/assets/product-preview.png") right -90px center / min(920px, 62vw) auto no-repeat,
    linear-gradient(135deg, #07362d, #0f766e);
  color: #ffffff;
}

.landing-hero::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.landing-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.landing-copy .eyebrow {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.11);
  color: #dffcf1;
}

.landing-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6.4vw, 76px);
  line-height: 0.94;
  letter-spacing: 0;
}

.landing-copy .hero-lead {
  color: rgba(255, 255, 255, 0.86);
}

.landing-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-actions {
  margin-top: 28px;
}

.landing-actions .ghost-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.landing-actions .ghost-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.landing-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.landing-proof span {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 820;
}

.landing-band,
.page-hero,
.feature-matrix,
.pricing-page-grid,
.pricing-notes,
.landing-cta {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.landing-band {
  padding-top: 70px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1,
.landing-cta h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p,
.page-hero p,
.landing-cta p {
  margin: 14px 0 0;
  color: #526071;
  font-size: 18px;
  line-height: 1.55;
}

.landing-step-grid,
.audience-grid,
.pricing-grid,
.feature-matrix,
.pricing-notes {
  display: grid;
  gap: 14px;
}

.landing-step-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-step-grid article,
.audience-grid article,
.feature-matrix article,
.pricing-card,
.pricing-notes article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.landing-step-grid article {
  min-height: 210px;
  padding: 18px;
}

.landing-step-grid article span,
.feature-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 920;
}

.landing-step-grid h3,
.audience-grid strong,
.feature-matrix h2,
.pricing-notes h2 {
  margin: 14px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.landing-step-grid p,
.audience-grid p,
.feature-matrix p,
.pricing-card p,
.pricing-notes p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.split-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 24px;
  align-items: start;
}

.product-story-grid,
.flow-demo-grid {
  display: grid;
  gap: 14px;
}

.product-story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-story-grid article,
.flow-demo-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.product-story-grid article {
  padding: 20px;
}

.product-story-grid h3,
.flow-demo-grid strong {
  margin: 14px 0 0;
  font-size: 22px;
  line-height: 1.15;
}

.product-story-grid p,
.flow-demo-grid span {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.preview-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1.28fr);
  gap: 28px;
  align-items: center;
}

.preview-copy h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.preview-copy p {
  margin: 14px 0 0;
  color: #526071;
  font-size: 18px;
  line-height: 1.55;
}

.preview-copy .primary-button {
  margin-top: 22px;
}

.product-preview-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(8, 127, 111, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 118, 110, 0.14);
}

.product-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.feature-flow {
  padding-bottom: 20px;
}

.flow-demo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flow-demo-grid article {
  display: grid;
  align-content: start;
  min-height: 130px;
  padding: 18px;
}

.flow-demo-grid strong {
  display: block;
  margin: 0;
  color: var(--ink);
}

.pricing-note-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 18px 28px;
  border-top: 1px solid rgba(8, 127, 111, 0.14);
  border-bottom: 1px solid rgba(8, 127, 111, 0.14);
  background: rgba(236, 253, 245, 0.72);
}

.pricing-note-band strong {
  color: var(--brand-deep);
  font-size: 18px;
}

.pricing-note-band span {
  color: var(--muted);
  line-height: 1.45;
}

.audience-grid {
  grid-template-columns: 1fr;
}

.audience-grid article {
  padding: 18px;
}

.audience-grid strong {
  display: block;
}

.pricing-preview {
  padding-bottom: 72px;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
}

.pricing-card.featured {
  border-color: rgba(8, 127, 111, 0.34);
  background:
    linear-gradient(180deg, rgba(231, 246, 238, 0.9), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.plan-label {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.pricing-card h2,
.pricing-card h3 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  color: #374151;
  line-height: 1.4;
}

.payment-readiness,
.legal-layout,
.legal-document {
  max-width: 1180px;
  margin: 32px auto;
  padding: 0 28px;
}

.payment-readiness-grid,
.legal-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payment-readiness-grid article,
.legal-card,
.legal-document article {
  padding: 22px;
  border: 1px solid rgba(8, 127, 111, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.payment-readiness-grid h3,
.legal-card h2,
.legal-document h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.18;
}

.payment-readiness-grid p,
.legal-card p,
.legal-document p {
  margin: 0;
  color: #465564;
  line-height: 1.55;
}

.legal-hero {
  padding-bottom: 28px;
}

.legal-document {
  display: grid;
  gap: 12px;
  max-width: 920px;
}

.legal-details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.legal-details div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.legal-details div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.legal-details dt {
  color: var(--muted);
  font-weight: 850;
}

.legal-details dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1280px;
  margin: 48px auto 0;
  padding: 24px 28px 34px;
  border-top: 1px solid rgba(8, 127, 111, 0.14);
  color: var(--muted);
}

.site-footer div,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.site-footer strong {
  color: var(--brand-deep);
  font-size: 18px;
}

.site-footer a {
  color: var(--brand-dark);
  font-weight: 850;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

@media (max-width: 760px) {
  .payment-readiness,
  .legal-layout,
  .legal-document {
    margin: 24px auto;
    padding: 0 16px;
  }

  .payment-readiness-grid,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    display: grid;
    margin-top: 32px;
    padding: 22px 16px 30px;
  }

  .site-footer div,
  .site-footer nav {
    display: grid;
    gap: 8px;
  }
}

.pricing-card li::before {
  content: "\2713";
  margin-right: 8px;
  color: var(--teal);
  font-weight: 900;
}

.billing-switch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1280px;
  margin: 22px auto 18px;
  padding: 18px 28px;
  border: 1px solid rgba(176, 172, 160, 0.34);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(41, 48, 43, 0.07);
}

.billing-switch-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.05;
}

.billing-switch-panel p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.billing-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(116px, 1fr));
  gap: 4px;
  min-width: min(100%, 310px);
  padding: 5px;
  border: 1px solid rgba(13, 139, 91, 0.18);
  border-radius: 999px;
  background: #edf8f2;
}

.billing-toggle button {
  min-height: 54px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.billing-toggle button span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 760;
  color: inherit;
  opacity: 0.8;
}

.billing-toggle button.active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 139, 91, 0.24);
}

.plan-price {
  display: grid;
  align-content: start;
  min-height: 98px;
  margin-top: 14px;
}

.plan-price h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0;
}

.plan-price .current-price {
  color: var(--ink);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  font-weight: 920;
}

.plan-price .old-price {
  color: #8a928d;
  font-size: 22px;
  line-height: 1;
  font-weight: 820;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.plan-price .old-price[hidden] {
  display: none;
}

.price-note {
  min-height: 28px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.price-note span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 900;
}

.center-actions {
  justify-content: center;
  margin-top: 22px;
}

.landing-cta {
  display: grid;
  justify-items: center;
  padding-top: 72px;
  padding-bottom: 82px;
  text-align: center;
}

.landing-cta p {
  max-width: 720px;
}

.landing-cta .primary-button {
  margin-top: 22px;
}

.page-hero {
  padding-top: 86px;
  padding-bottom: 42px;
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero p {
  max-width: 760px;
}

.feature-matrix {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 26px;
}

.feature-matrix article {
  min-height: 260px;
  padding: 22px;
}

.pricing-page-grid {
  padding-top: 10px;
  padding-bottom: 22px;
}

.pricing-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 14px;
}

.pricing-notes article {
  padding: 22px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(360px, 520px);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 42px 28px 30px;
}

.app-page .hero-section {
  align-items: start;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 10px;
  border: 1px solid rgba(8, 127, 111, 0.18);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 820;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: #394454;
  font-size: 19px;
  line-height: 1.55;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-points span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #2f3846;
  font-size: 14px;
  font-weight: 760;
}

.tool-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.import-panel {
  position: relative;
}

.import-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--brand), var(--teal));
}

.import-panel,
.result-panel,
.study-panel {
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.panel-heading p,
#packMeta,
#studyMeta,
.status-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.step-badge {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #edf5f3;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
}

.dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.68), rgba(255, 255, 255, 0.9)),
    #fbfcfd;
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--teal);
  background: #eef8f5;
}

.dropzone input {
  display: none;
}

.dropzone-icon {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-deep);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
}

.dropzone strong,
.dropzone small {
  display: block;
}

.dropzone small {
  margin-top: 3px;
  color: var(--muted);
}

.mic-recorder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 127, 111, 0.18);
  border-radius: 8px;
  background: #f4fbf8;
}

.mic-copy strong,
.mic-copy small {
  display: block;
}

.mic-copy strong {
  font-size: 14px;
  font-weight: 850;
}

.mic-copy small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.mic-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.small-button.danger {
  border-color: rgba(180, 35, 92, 0.26);
  background: var(--rose-soft);
  color: var(--rose);
}

.recording-meter {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  gap: 5px;
  height: 28px;
  padding-top: 2px;
}

.recording-meter span {
  display: block;
  width: 7px;
  height: 10px;
  border-radius: 999px;
  background: var(--rose);
  animation: mic-pulse 0.9s ease-in-out infinite;
}

.recording-meter span:nth-child(2) {
  animation-delay: 0.12s;
}

.recording-meter span:nth-child(3) {
  animation-delay: 0.24s;
}

.recording-meter span:nth-child(4) {
  animation-delay: 0.36s;
}

.url-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.url-import-row input {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.field-label {
  display: block;
  margin: 14px 0 7px;
  color: #38414b;
  font-size: 13px;
  font-weight: 800;
}

textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.45;
}

.source-ready {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 127, 111, 0.22);
  border-radius: 8px;
  background: #f2faf7;
}

.source-ready strong::before {
  content: "\2713";
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-size: 12px;
}

.source-ready span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.source-files-list {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(10, 143, 90, 0.18);
  border-radius: 16px;
  background: #f8fdf9;
}

.source-files-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.source-files-list ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
}

.source-files-list li {
  padding-left: 2px;
  color: var(--ink);
  font-weight: 780;
}

.source-files-list li::marker {
  color: var(--brand-deep);
  font-weight: 900;
}

.source-files-list span,
.source-files-list small {
  display: block;
}

.source-files-list span {
  overflow-wrap: anywhere;
  word-break: normal;
}

.source-files-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.language-choice {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 127, 111, 0.18);
  border-radius: 8px;
  background: #f4fbf8;
}

.language-choice strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.language-choice small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.language-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.language-options label:has(input:checked) {
  border-color: rgba(8, 127, 111, 0.42);
  background: #edf8f5;
  box-shadow: inset 0 0 0 1px rgba(8, 127, 111, 0.18);
}

.generation-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.generation-scope span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(8, 127, 111, 0.2);
  border-radius: 999px;
  background: #f2faf7;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

textarea:focus,
.api-key-row input:focus,
.url-import-row input:focus,
input[type="range"]:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(8, 127, 111, 0.2);
  outline-offset: 2px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mode-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  cursor: pointer;
}

.mode-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-card span {
  font-size: 15px;
  font-weight: 850;
}

.mode-card small {
  color: var(--muted);
  line-height: 1.35;
}

.mode-card:has(input:checked) {
  border-color: rgba(8, 127, 111, 0.48);
  background: #edf8f5;
  box-shadow: inset 0 0 0 1px rgba(8, 127, 111, 0.28);
}

.range-row {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.range-row label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #38414b;
  font-size: 13px;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin-top: 10px;
  color: #38414b;
  font-size: 13px;
  font-weight: 700;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.api-config {
  margin-top: 10px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.api-config summary {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.api-config p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.api-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}

.api-key-row input {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.primary-button,
.ghost-button,
.small-button,
.option-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 820;
  letter-spacing: 0;
}

.primary-button {
  width: 100%;
  margin-top: 14px;
  padding: 0 14px;
  background: var(--teal);
  color: #ffffff;
}

.primary-button.compact {
  width: auto;
  min-width: 170px;
  margin-top: 0;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.button-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

.primary-button:disabled,
.ghost-button:disabled,
.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ghost-button,
.small-button {
  padding: 0 12px;
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.ghost-button:hover,
.small-button:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.ghost-button.wide {
  width: 100%;
  margin-top: 9px;
}

.primary-button.link-button,
.ghost-button.link-button,
.small-button.link-button {
  width: auto;
  min-width: 178px;
  padding: 0 18px;
  margin-top: 0;
}

.generation-loader {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(8, 127, 111, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.94)),
    #f2faf7;
}

.loader-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.loader-row strong,
.loader-row small {
  display: block;
}

.loader-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.loader-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(8, 127, 111, 0.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 127, 111, 0.12);
}

.loader-bar span {
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  animation: loader-slide 1.45s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loader-slide {
  0% {
    transform: translateX(-110%);
  }
  50% {
    transform: translateX(65%);
  }
  100% {
    transform: translateX(240%);
  }
}

@keyframes mic-pulse {
  0%,
  100% {
    height: 8px;
    opacity: 0.5;
  }

  50% {
    height: 26px;
    opacity: 1;
  }
}

.status-line {
  min-height: 19px;
}

.status-line.error {
  color: #b42318;
}

.status-line.warning {
  color: var(--amber);
}

.status-line.success {
  color: var(--teal-dark);
}

.local-demo-strip,
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 28px 28px;
}

.local-demo-strip {
  max-width: 1280px;
  margin: -6px auto 18px;
  padding-top: 0;
}

.local-demo-strip div,
.trust-strip div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.local-demo-strip div {
  border-color: rgba(8, 127, 111, 0.16);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.local-demo-strip strong,
.local-demo-strip span,
.trust-strip strong,
.trust-strip span {
  display: block;
}

.local-demo-strip strong,
.trust-strip strong {
  font-size: 15px;
}

.local-demo-strip span,
.trust-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.flow-panel {
  display: grid;
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto 16px;
  padding: 0 28px;
}

.flow-panel-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.flow-panel-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.flow-panel-copy p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.flow-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.flow-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 220ms ease;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
}

.flow-step span {
  display: grid;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #526071;
  font-size: 14px;
  font-weight: 900;
}

.flow-step strong,
.flow-step small {
  display: block;
  min-width: 0;
}

.flow-step strong {
  color: var(--ink);
  font-size: 15px;
}

.flow-step small {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-step.current {
  border-color: rgba(8, 127, 111, 0.3);
  background: var(--blue-soft);
}

.flow-step.current span {
  background: var(--blue);
  color: #ffffff;
}

.flow-step.done {
  border-color: rgba(8, 127, 111, 0.28);
  background: var(--green-soft);
}

.flow-step.done span {
  background: var(--teal);
  color: #ffffff;
}

.today-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(260px, 0.55fr) minmax(320px, 1fr);
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto 16px;
  padding: 0 28px;
}

.today-main,
.today-metrics,
.library-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.today-main {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.section-kicker {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(8, 127, 111, 0.16);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 840;
}

.today-main h2 {
  margin: 12px 0 0;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.today-main p {
  margin: 12px 0 0;
  color: #394454;
  font-size: 15px;
  line-height: 1.5;
}

.today-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.today-metrics {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.today-metrics div {
  display: grid;
  align-content: center;
  min-height: 88px;
  padding: 16px;
  background: #ffffff;
}

.today-metrics strong,
.today-metrics span {
  display: block;
}

.today-metrics strong {
  font-size: 28px;
  line-height: 1;
}

.today-metrics span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.library-panel {
  padding: 16px;
}

.library-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.library-heading h3 {
  margin: 0;
  font-size: 18px;
}

.library-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.library-list {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding-right: 2px;
}

.library-card,
.library-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.library-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.library-card.due {
  border-color: rgba(8, 127, 111, 0.28);
  background: var(--green-soft);
}

.library-card-main {
  min-width: 0;
}

.library-status {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.library-card h3,
.library-card p,
.library-card small {
  margin: 0;
}

.library-card h3 {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-card p,
.library-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.library-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-danger-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(180, 35, 92, 0.25);
  border-radius: 8px;
  background: #ffffff;
  color: var(--rose);
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

.icon-danger-button:hover {
  background: var(--rose-soft);
}

.library-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  color: var(--muted);
}

.library-empty strong {
  color: var(--ink);
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px 34px;
}

.study-panel {
  position: static;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.72), rgba(255, 255, 255, 0.9)),
    #ffffff;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.tab-button.active {
  background: #edf5f3;
  color: var(--ink);
}

.empty-state {
  display: grid;
  min-height: 360px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 40px 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(8, 127, 111, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.44), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.empty-state h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.empty-state p {
  max-width: 480px;
  margin: 0;
  line-height: 1.5;
}

.compact-empty {
  min-height: 240px;
}

.result-content {
  padding-top: 16px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(8, 127, 111, 0.16);
  border-radius: 8px;
  background: var(--brand-soft);
}

.list-toolbar strong,
.list-toolbar span {
  display: block;
}

.list-toolbar strong {
  font-size: 16px;
}

.list-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.share-action {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.small-button.copied {
  border-color: rgba(8, 127, 111, 0.35);
  background: var(--brand);
  color: #ffffff;
}

.share-feedback {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 3;
  min-width: max-content;
  padding: 8px 10px;
  border: 1px solid rgba(8, 127, 111, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.share-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-editor-new,
.card-editor-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(8, 127, 111, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.card-editor-new {
  margin-bottom: 14px;
  background:
    linear-gradient(180deg, rgba(233, 248, 239, 0.72), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.card-editor-new h3 {
  margin: 0;
  font-size: 18px;
}

.card-editor-new label,
.card-editor-item label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.card-editor-new textarea,
.card-editor-item textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
}

.card-editor-new textarea:focus,
.card-editor-item textarea:focus {
  outline: 3px solid rgba(10, 143, 90, 0.14);
  border-color: rgba(10, 143, 90, 0.52);
}

.card-editor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}

.card-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-editor-source {
  color: var(--muted);
  font-weight: 760;
}

.legacy-preview {
  margin-top: 14px;
  color: var(--muted);
}

.legacy-preview summary {
  cursor: pointer;
  font-weight: 850;
}

.legacy-preview .item-list {
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

.summary-lead {
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid rgba(8, 127, 111, 0.18);
  border-radius: 8px;
  background: #f6fbf8;
  line-height: 1.55;
  font-size: 17px;
}

.bullet-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullet-list li {
  padding: 12px 14px;
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  background: #f5f9f8;
  line-height: 1.45;
}

.item-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.study-item {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.preview-card {
  display: grid;
  align-content: start;
  min-height: 240px;
  border-color: rgba(8, 127, 111, 0.15);
}

.preview-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: var(--brand);
}

.item-badge {
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
}

.study-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.34;
}

.study-item p {
  margin: 0 0 10px;
  color: #3d4652;
  line-height: 1.5;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.term-title {
  display: block;
  margin-bottom: 6px;
  color: var(--rose);
  font-weight: 850;
}

.notes-sections {
  display: grid;
  gap: 16px;
}

.notes-section {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.notes-section h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: 0;
}

.digest-panel {
  max-width: 920px;
}

.transcript-box {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.transcript-box summary {
  color: var(--blue);
  font-weight: 850;
  cursor: pointer;
}

.transcript-box pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #38414b;
  font-family: inherit;
  line-height: 1.45;
}

.source-box {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.source-box summary {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.source-box p {
  margin: 8px 0 0;
  color: var(--muted);
}

.source-box a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.quiz-options,
.study-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.option-button {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-color: var(--line);
  background: #fbfcfd;
  color: var(--ink);
  font-weight: 680;
  text-align: left;
  line-height: 1.38;
}

.option-button:hover:not(:disabled) {
  border-color: var(--blue);
}

.option-button.selected {
  border-color: rgba(8, 127, 111, 0.46);
  background: var(--blue-soft);
}

.option-button.correct {
  border-color: rgba(8, 127, 111, 0.45);
  background: var(--green-soft);
}

.option-button.wrong {
  border-color: rgba(180, 35, 92, 0.38);
  background: var(--rose-soft);
}

.option-button.static {
  cursor: default;
}

.study-stage {
  min-height: 0;
}

.study-empty {
  display: grid;
  min-height: 320px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.study-empty strong {
  color: var(--ink);
}

.study-card {
  display: grid;
  gap: 12px;
}

.study-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.restart-study-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue);
  font-size: 17px;
  font-weight: 900;
}

.restart-study-button:hover {
  border-color: rgba(8, 127, 111, 0.35);
  background: var(--brand-soft);
}

.prompt-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.prompt-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.4;
}

.answer-box {
  padding: 12px;
  border-radius: 8px;
  background: #edf5f3;
  line-height: 1.45;
}

.study-card textarea {
  min-height: 120px;
}

.feedback-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e8;
  color: #42320f;
  line-height: 1.45;
}

.practice-launch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.practice-launch-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(8, 127, 111, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.practice-launch-card.accent {
  border-color: rgba(8, 127, 111, 0.18);
  background: #f5fcf9;
}

.practice-launch-card.recommended {
  border-color: rgba(8, 127, 111, 0.22);
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.practice-launch-label {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
}

.practice-launch-card.accent .practice-launch-label {
  background: var(--green-soft);
  color: var(--teal-dark);
}

.practice-launch-card.recommended .practice-launch-label {
  background: var(--blue);
  color: #ffffff;
}

.practice-launch-card strong {
  font-size: 22px;
  line-height: 1.15;
}

.practice-launch-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

body.practice-open {
  overflow: hidden;
}

.practice-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: auto;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  color: var(--ink);
}

.practice-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  padding: 22px 24px 40px;
}

.practice-topbar {
  position: sticky;
  top: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: 52px minmax(280px, 820px) 52px;
  justify-content: center;
  gap: 14px;
  align-items: center;
}

.practice-icon-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font-size: 0;
  line-height: 0;
  font-weight: 760;
}

.practice-icon-button::before {
  content: attr(data-icon);
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-1px);
}

.practice-icon-button:hover {
  border-color: rgba(8, 127, 111, 0.32);
  color: var(--brand-dark);
}

.practice-progress-card {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 18px;
  border: 1px solid rgba(8, 127, 111, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 45px rgba(30, 41, 59, 0.12);
  backdrop-filter: blur(12px);
}

.practice-mode-pill,
.practice-xp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ink);
  font-weight: 850;
  white-space: nowrap;
}

.practice-mode-pill {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.practice-progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.practice-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.25s ease;
}

.practice-stage {
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 62px 0 20px;
}

.practice-empty {
  color: var(--muted);
  font-weight: 760;
}

.practice-card {
  display: grid;
  width: min(100%, 1120px);
  gap: 18px;
}

.flashcard-practice-frame {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
}

.card-nav-button {
  display: grid;
  width: 56px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(8, 127, 111, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: var(--shadow-soft);
  font-size: 42px;
  font-weight: 760;
  line-height: 1;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.card-nav-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(8, 127, 111, 0.36);
  background: var(--brand-soft);
}

.card-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.flip-study-card {
  display: block;
  width: 100%;
  min-height: clamp(360px, 52vh, 520px);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  perspective: 1200px;
  text-align: left;
}

.flip-card-inner {
  position: relative;
  display: block;
  min-height: clamp(360px, 52vh, 520px);
  transform-style: preserve-3d;
  transition: transform 0.54s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.flip-study-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  overflow: auto;
  padding: 38px 42px;
  border: 3px solid var(--brand);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(10, 143, 90, 0.08), transparent 32%),
    #ffffff;
  box-shadow: 0 18px 55px rgba(8, 127, 111, 0.12);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
  border-color: rgba(8, 127, 111, 0.58);
  background:
    radial-gradient(circle at 84% 20%, rgba(10, 143, 90, 0.12), transparent 34%),
    linear-gradient(180deg, #f4fbf7, #ffffff);
}

.flip-study-card:hover .flip-card-face {
  box-shadow: 0 22px 64px rgba(8, 127, 111, 0.16);
}

.flip-study-card:focus-visible {
  outline: 4px solid rgba(10, 143, 90, 0.22);
  outline-offset: 5px;
}

.flip-card-title {
  display: block;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.22;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.flip-card-title.text-density-md {
  font-size: 26px;
}

.flip-card-title.text-density-sm {
  font-size: 22px;
  line-height: 1.26;
}

.flip-card-title.text-density-xs {
  font-size: 19px;
  line-height: 1.3;
}

.flip-card-explanation {
  display: block;
  color: #3d4652;
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.flip-card-explanation.text-density-sm,
.flip-card-explanation.text-density-xs {
  font-size: 15px;
  line-height: 1.42;
}

.flip-card-hint,
.practice-flip-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
}

.practice-flip-note {
  margin: 0;
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid rgba(8, 127, 111, 0.16);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  text-align: center;
}

.practice-question-card {
  padding: 34px 40px;
  border: 3px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(8, 127, 111, 0.12);
}

.practice-question-card.success {
  border-color: rgba(8, 127, 111, 0.62);
}

.practice-question-card.error {
  border-color: rgba(180, 35, 92, 0.48);
}

.practice-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.practice-question-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.practice-question-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.practice-options {
  display: grid;
  gap: 12px;
}

.practice-option-button {
  width: 100%;
  min-height: 72px;
  padding: 16px 22px;
  border: 2px solid #dfe6f0;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 7px 0 #e5eaf2;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.practice-option-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(8, 127, 111, 0.5);
  box-shadow: 0 8px 0 #ccefe0;
}

.practice-option-button.selected {
  border-color: rgba(8, 127, 111, 0.55);
  background: var(--brand-soft);
  box-shadow: 0 7px 0 #c7eadc;
  color: var(--brand-dark);
}

.practice-option-button.correct {
  border-color: rgba(8, 127, 111, 0.35);
  background: #dff8e8;
  box-shadow: 0 7px 0 #b7ebca;
  color: #0f8a45;
}

.practice-option-button.wrong {
  border-color: rgba(180, 35, 92, 0.32);
  background: var(--rose-soft);
  box-shadow: 0 7px 0 #ffd5e3;
  color: var(--rose);
}

.practice-option-button:disabled {
  cursor: default;
}

.practice-actions {
  display: grid;
  gap: 12px;
}

.practice-actions:has(.practice-secondary-button) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.practice-primary-button,
.practice-secondary-button {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.practice-primary-button {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 0 var(--brand-dark);
}

.practice-primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.practice-primary-button.muted {
  border-color: rgba(6, 114, 70, 0.22);
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: 0 10px 26px rgba(6, 71, 50, 0.08);
}

.practice-primary-button.muted:hover:not(:disabled) {
  background: var(--brand-soft);
}

.practice-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.practice-secondary-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.practice-secondary-button:hover {
  border-color: rgba(8, 127, 111, 0.28);
  background: var(--brand-soft);
}

.practice-answer-card,
.practice-feedback,
.practice-complete {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  line-height: 1.5;
}

.practice-answer-card {
  background: #f3faf7;
  border-color: rgba(8, 127, 111, 0.18);
}

.practice-answer-card p,
.practice-feedback p,
.practice-complete p {
  margin: 8px 0 0;
  color: #3d4652;
}

.practice-feedback.success {
  border-color: rgba(8, 127, 111, 0.22);
  background: #f1fbf6;
}

.practice-feedback.error {
  border-color: rgba(180, 35, 92, 0.2);
  background: #fff5f8;
}

.practice-source-row .source-box {
  width: 100%;
  margin-top: 0;
  padding: 0;
  border-top: 0;
  text-align: center;
}

.practice-source-row .source-box summary {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 0;
  border: 2px solid #dfe6f0;
  border-radius: 8px;
  background: #ffffff;
  color: #536176;
}

.practice-source-row .source-box p {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.practice-complete {
  width: min(100%, 720px);
  justify-self: center;
  padding: 34px;
  text-align: center;
}

.practice-complete-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--teal-dark);
  font-size: 32px;
  font-weight: 950;
}

.practice-complete h2 {
  margin: 0;
  font-size: 32px;
}

@media (max-width: 1080px) {
  .hero-section,
  .workspace,
  .today-panel {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 82px;
    background:
      linear-gradient(180deg, rgba(7, 54, 45, 0.94) 0%, rgba(7, 54, 45, 0.84) 64%, rgba(7, 54, 45, 0.32) 100%),
      url("/assets/product-preview.png") center bottom / min(920px, 118vw) auto no-repeat,
      linear-gradient(135deg, #07362d, #0f766e);
  }

  .landing-step-grid,
  .product-story-grid,
  .feature-matrix,
  .pricing-grid,
  .pricing-notes,
  .split-band,
  .preview-section,
  .flow-demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-section {
    min-height: auto;
  }

  .study-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: stretch;
    padding: 14px;
  }

  .site-header {
    flex-direction: column;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .nav-links a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .status-pill {
    width: 100%;
  }

  .hero-section,
  .workspace,
  .today-panel,
  .flow-panel,
  .local-demo-strip,
  .landing-band,
  .page-hero,
  .feature-matrix,
  .pricing-page-grid,
  .pricing-notes,
  .landing-cta,
  .trust-strip {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-copy h1 {
    font-size: 40px;
    line-height: 1;
  }

  .hero-lead {
    font-size: 16px;
  }

  .mode-grid,
  .flow-steps,
  .landing-step-grid,
  .product-story-grid,
  .preview-section,
  .flow-demo-grid,
  .feature-matrix,
  .pricing-grid,
  .pricing-notes,
  .split-band,
  .language-options,
  .trust-strip,
  .term-grid,
  .mic-recorder,
  .list-toolbar,
  .practice-launch-grid,
  .api-key-row {
    grid-template-columns: 1fr;
  }

  .flow-panel-copy {
    grid-template-columns: 1fr;
  }

  .flow-panel-copy p {
    grid-column: auto;
  }

  .landing-hero {
    padding: 56px 12px 240px;
  }

  .landing-copy h1 {
    font-size: 42px;
    line-height: 1;
  }

  .landing-copy .hero-lead,
  .section-heading p,
  .page-hero p,
  .landing-cta p {
    font-size: 16px;
  }

  .landing-actions,
  .center-actions {
    display: grid;
  }

  .pricing-note-band {
    grid-template-columns: 1fr;
    margin-top: 12px;
    padding: 16px 12px;
  }

  .landing-actions .link-button,
  .center-actions .link-button,
  .landing-cta .link-button,
  .pricing-card .link-button,
  .header-cta {
    width: 100%;
  }

  .list-toolbar {
    align-items: stretch;
  }

  .primary-button.compact {
    width: 100%;
  }

  .today-actions,
  .library-card,
  .library-actions {
    grid-template-columns: 1fr;
  }

  .today-actions,
  .library-actions {
    display: grid;
  }

  .library-card {
    align-items: stretch;
  }

  .library-card h3 {
    white-space: normal;
  }

  .flow-step small {
    white-space: normal;
  }

  .icon-danger-button {
    width: 100%;
  }

  .mic-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .practice-shell {
    padding: 12px 12px 28px;
  }

  .practice-topbar {
    top: 10px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .practice-icon-button {
    width: 44px;
    height: 44px;
  }

  .practice-icon-button::before {
    font-size: 26px;
  }

  .practice-progress-card {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
    padding: 10px;
    border-radius: 8px;
  }

  .practice-mode-pill,
  .practice-xp {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .practice-stage {
    padding-top: 34px;
  }

  .practice-question-card {
    padding: 22px 18px;
  }

  .flashcard-practice-frame {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .card-nav-button {
    width: 44px;
    height: 58px;
    font-size: 34px;
  }

  .flip-study-card,
  .flip-card-inner {
    min-height: min(440px, 58vh);
  }

  .flip-card-face {
    padding: 24px 20px;
  }

  .flip-card-title {
    font-size: 22px;
  }

  .flip-card-title.text-density-md {
    font-size: 19px;
  }

  .flip-card-title.text-density-sm,
  .flip-card-title.text-density-xs {
    font-size: 16px;
    line-height: 1.32;
  }

  .practice-question-card h2 {
    font-size: 22px;
  }

  .practice-option-button {
    min-height: 60px;
    padding: 14px;
    font-size: 17px;
  }

  .practice-actions:has(.practice-secondary-button) {
    grid-template-columns: 1fr;
  }
}

/* Brand polish: Zachetka direction */
