:root {
  --bg: #eef0fb;
  --surface: rgba(248, 249, 255, 0.9);
  --surface-strong: #f5f6ff;
  --surface-ink: #1c1b3a;
  --accent: #4f46e5;
  --accent-deep: #3730a3;
  --line: rgba(28, 27, 58, 0.12);
  --ink: #1c1b3a;
  --muted: #565b80;
  --danger: #c0344d;
  --shadow: 0 24px 60px rgba(30, 27, 75, 0.12);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --heading-size: clamp(1.7rem, 2.8vw, 2.6rem);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f3f4fe 0%, var(--bg) 50%, #e7e8fb 100%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

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

.site-header {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 246, 255, 0.72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 12px;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.site-header .site-nav {
  justify-content: flex-end;
}

.site-nav a:not(.header-cta) {
  text-decoration: none;
  color: var(--muted);
}

.header-cta {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.88rem;
  color: #fff;
}

.site-nav a:not(.header-cta):hover,
.brand:hover {
  color: var(--accent-deep);
}

.header-cta,
.header-cta:hover {
  color: #fff;
}

main {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.hero,
.section,
.site-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 0.92fr 1.18fr;
  gap: 28px;
  padding: 32px;
}

.hero-copy h1,
.section-heading h2,
.legal-article h1,
.legal-article h2,
.legal-summary h2,
.legal-summary-lead {
  font-family: var(--font-display);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  margin: 0;
  font-size: var(--heading-size);
  max-width: 18ch;
}

.hero-text,
.avatar-line,
.section-heading,
.legal-copy p,
.legal-copy li {
  color: var(--muted);
}

.avatar-line {
  margin: 18px 0 0;
  max-width: 48ch;
  color: var(--surface-ink);
  font-size: 1.08rem;
  font-weight: 700;
}

.eyebrow,
.step-number {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: transform 0.12s ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--surface-ink);
}

.button-ghost {
  border-color: rgba(28, 27, 58, 0.16);
  background: transparent;
  color: var(--surface-ink);
}

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

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

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.hero-facts div {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.hero-facts dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.hero-facts dd {
  margin: 8px 0 0;
  font-weight: 700;
}

.hero-widget-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.08), rgba(245, 246, 255, 0.96)),
    var(--surface-strong);
  align-content: start;
}

.hero-widget-intro {
  margin: 0;
  font-weight: 700;
  color: var(--surface-ink);
}

.hero-widget-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section {
  padding: 28px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  max-width: 62ch;
}

.section-heading h2 {
  margin: 0;
  font-size: var(--heading-size);
}

.product-flow-grid,
.benefit-list {
  display: grid;
  gap: 18px;
}

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

.product-flow-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  min-width: 0;
}

.product-flow-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.product-flow-card p {
  margin: 0;
  color: var(--muted);
}

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

.benefit-list p {
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
}

.faq-list summary {
  color: var(--surface-ink);
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--muted);
}

.faq-list details:hover {
  border-color: rgba(79, 70, 229, 0.35);
}

.section-cta {
  text-align: center;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.cta-copy {
  max-width: 620px;
}

.cta-copy h2 {
  margin: 6px 0 10px;
  font-size: var(--heading-size);
}

.cta-copy p:last-child {
  color: var(--muted);
}

.button-lg {
  min-height: 56px;
  padding: 0 32px;
  font-size: 1.08rem;
}

.site-footer {
  margin-top: 28px;
  padding: 24px 28px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

/* ─── notes widget ─────────────────────────────────────────────────────────── */

.notes-input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notes-url-input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  color: var(--ink);
}

.notes-url-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.notes-submit-btn {
  flex: 0 0 auto;
}

.notes-input-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.notes-status-area {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 32px 18px;
  text-align: center;
}

.notes-status-label {
  margin: 0;
  font-weight: 700;
  color: var(--surface-ink);
}

.notes-status-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 36ch;
}

@keyframes notes-spin {
  to {
    transform: rotate(360deg);
  }
}

.notes-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(79, 70, 229, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: notes-spin 0.8s linear infinite;
}

.notes-result {
  display: grid;
  gap: 18px;
}

.notes-result-head {
  display: grid;
  gap: 4px;
}

.notes-result-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--surface-ink);
  line-height: 1.15;
}

.notes-result-source {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.notes-blocks {
  display: grid;
  gap: 18px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.notes-block {
  display: grid;
  gap: 8px;
}

.notes-block-title {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.notes-summary {
  margin: 0;
  color: var(--surface-ink);
}

.notes-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--surface-ink);
}

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

.notes-timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.notes-timeline-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent-deep);
  background: rgba(79, 70, 229, 0.1);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.notes-timeline-body {
  color: var(--surface-ink);
}

.notes-terms {
  margin: 0;
  display: grid;
  gap: 8px;
}

.notes-terms dt {
  font-weight: 700;
  color: var(--surface-ink);
}

.notes-terms dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.notes-transcript {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  padding: 12px 16px;
}

.notes-transcript summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--surface-ink);
}

.notes-transcript-text {
  margin: 12px 0 0;
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.notes-result-actions .button {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.notes-error-area {
  display: grid;
  gap: 16px;
}

.notes-error-msg {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(192, 52, 77, 0.18);
  border-radius: 14px;
  background: rgba(192, 52, 77, 0.05);
  color: var(--danger);
  font-weight: 700;
}

.notes-paste-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.07), rgba(245, 246, 255, 0.96)),
    var(--surface-strong);
}

.notes-paste-heading {
  margin: 0;
  font-size: 1.05rem;
  color: var(--surface-ink);
}

.notes-paste-body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.notes-paste-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  resize: vertical;
}

.notes-paste-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.notes-install-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(79, 70, 229, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.08), rgba(245, 246, 255, 0.96)),
    var(--surface-strong);
  text-align: center;
  justify-items: center;
}

.notes-install-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: var(--surface-ink);
}

.notes-install-body {
  margin: 0;
  color: var(--muted);
  max-width: 46ch;
}

/* ─── upload widget ────────────────────────────────────────────────────────── */

.upload-file-input {
  display: none;
}

.upload-dropzone {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 32px 20px;
  border: 2px dashed rgba(79, 70, 229, 0.4);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(79, 70, 229, 0.08);
  outline: none;
}

.upload-drop-title {
  margin: 0;
  font-weight: 700;
  color: var(--surface-ink);
}

.upload-drop-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 42ch;
}

.upload-browse-btn {
  margin-top: 4px;
}

.hero-widget-foot {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-widget-foot a {
  color: var(--accent-deep);
  font-weight: 700;
}

/* progress bar shown during extract / upload / transcribe */
.upload-progress-track {
  width: min(320px, 100%);
  height: 8px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.14);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  transition: width 0.2s ease;
}

@keyframes upload-indeterminate {
  0% { margin-left: -40%; width: 40%; }
  50% { width: 55%; }
  100% { margin-left: 100%; width: 40%; }
}

.upload-progress-fill.is-indeterminate {
  width: 40%;
  animation: upload-indeterminate 1.2s ease-in-out infinite;
}

/* range selection (start/end boxes) */
.range-card {
  display: grid;
  gap: 12px;
}

.range-heading {
  margin: 0;
  font-size: 1.05rem;
  color: var(--surface-ink);
}

.range-source {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.range-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.range-field {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.range-time-input {
  width: 7.5ch;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--ink);
}

.range-time-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.range-dash {
  align-self: center;
  padding-bottom: 10px;
  color: var(--muted);
  font-weight: 700;
}

.range-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.range-long-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.06);
  font-size: 0.88rem;
  color: var(--surface-ink);
}

/* ─── extension CTA section ────────────────────────────────────────────────── */

.section-extension {
  padding: 0;
  overflow: hidden;
}

.extension-card {
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.1), rgba(245, 246, 255, 0.96)),
    var(--surface-strong);
}

.extension-copy {
  display: grid;
  gap: 14px;
  max-width: 64ch;
}

.extension-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--heading-size);
  letter-spacing: -0.03em;
}

.extension-copy p {
  margin: 0;
  color: var(--muted);
}

.extension-points {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--surface-ink);
  font-weight: 600;
}

.extension-copy .button {
  justify-self: start;
  margin-top: 6px;
}

/* ─── legal pages ──────────────────────────────────────────────────────────── */

.legal-page .site-shell {
  max-width: 1040px;
}

.legal-main {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.legal-summary,
.legal-article {
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.legal-summary h2,
.legal-summary-lead,
.legal-article h1,
.legal-article h2 {
  margin: 0;
  font-size: var(--heading-size);
  overflow-wrap: anywhere;
}

.legal-summary p,
.legal-article p,
.legal-article li {
  margin: 0;
  overflow-wrap: anywhere;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-meta strong {
  color: var(--surface-ink);
}

.legal-breadcrumb {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 700;
}

.legal-breadcrumb:hover {
  color: var(--accent);
}

.legal-copy {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
}

.legal-copy h2 {
  font-size: 1.4rem;
}

.legal-copy h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--surface-ink);
}

.legal-copy ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.legal-copy a {
  color: var(--accent-deep);
  font-weight: 600;
}

/* ─── 404 ──────────────────────────────────────────────────────────────────── */

.notfound-main {
  display: grid;
  place-items: center;
  gap: 16px;
  margin-top: 60px;
  text-align: center;
}

.notfound-main h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--surface-ink);
}

/* ─── cookie banner ────────────────────────────────────────────────────────── */

.v2t-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 10000;
  width: min(920px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.v2t-cookie-message {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--surface-ink);
}

.v2t-cookie-message a {
  color: var(--accent-deep);
  font-weight: 700;
}

.v2t-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.v2t-cookie-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--surface-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.v2t-cookie-button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
}

.v2t-cookie-settings {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(245, 246, 255, 0.86);
  color: var(--surface-ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

/* ─── responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero,
  .product-flow-grid,
  .benefit-list,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer {
    border-radius: 28px;
  }

  .site-footer {
    display: grid;
    justify-items: start;
  }
}

@media (max-width: 860px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .site-header .brand {
    justify-content: center;
  }

  .site-header .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }

  .site-header .site-nav a:not(.header-cta) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
  }

  .site-header .header-cta {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .site-header,
  .hero,
  .section,
  .site-footer,
  .legal-summary,
  .legal-article {
    padding: 20px;
  }

  .site-header {
    position: static;
    border-radius: 24px;
  }
}

@media (max-width: 560px) {
  .site-header .site-nav {
    grid-template-columns: 1fr;
  }
}
