:root {
  color-scheme: light;
  --paper: #f5f3eb;
  --surface: #fffefa;
  --ink: #30362d;
  --muted: #6d7367;
  --olive: #495a39;
  --olive-hover: #3c4b2f;
  --line: #e4e5da;
  --soft: #eff1e7;
  --danger: #9a3f32;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
a { color: inherit; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, audio:focus-visible {
  outline: 3px solid #88986d;
  outline-offset: 4px;
}
button, a, input { transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
svg { display: block; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }

.recorder-shell { max-width: 540px; margin: 0 auto; padding: 0 22px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 92px; padding-top: env(safe-area-inset-top, 0px); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 17px; font-weight: 650; letter-spacing: -.6px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--olive); color: var(--surface); }
.brand-mark svg { width: 20px; height: 20px; stroke-width: 1.5; }
.brand-dot { color: var(--olive); }
.account-link { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 0 8px; color: var(--olive); font-size: 14px; font-weight: 600; text-decoration: none; }
.account-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 27px 3px 29px; }
.eyebrow { margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 1.45px; text-transform: uppercase; }
h1 { font-size: clamp(34px, 8.4vw, 42px); font-weight: 650; letter-spacing: -1.8px; line-height: 1.08; }
.balance { padding-bottom: 2px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: right; }
.balance strong { color: var(--ink); font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.recorder-card { padding: 24px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: 0 7px 25px #30362d04; }
.mode-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border: 1px solid #e9eadf; border-radius: 15px; background: var(--soft); }
.mode-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; }
.mode-button svg { width: 18px; height: 18px; }
.mode-button[aria-pressed="true"] { border-color: #e3e5d7; background: var(--surface); color: var(--olive); box-shadow: 0 2px 4px #30362d08; }
.mode-button:hover:not(:disabled):not([aria-pressed="true"]) { color: var(--olive); background: #ffffff60; }
.mode-description { margin: 17px 2px 0; color: var(--muted); font-size: 14px; line-height: 1.55; text-align: center; text-wrap: pretty; }
.language-note { margin: 7px 0 22px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.trial-intro { margin: -8px 0 22px; padding: 12px; border-radius: 12px; background: var(--soft); color: var(--olive); font-size: 13px; line-height: 1.6; text-align: center; }
.trial-result-note { margin: -8px 0 20px; padding: 12px 14px; border-radius: 12px; background: var(--soft); color: var(--olive); font-size: 13px; line-height: 1.6; }
.trial-summary-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.trial-summary-panel .consent-label { margin: 15px 0; }
.trial-summary-note { margin-top: 18px; }
.full-processing-action { display: flex; margin: 12px auto 0; }
.recorder-pricing { margin: -8px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: center; text-wrap: pretty; }
.recorder-pricing a { color: var(--olive); text-underline-offset: 3px; }
.record-button { display: flex; width: 100%; min-height: 166px; flex-direction: column; align-items: center; justify-content: center; gap: 17px; padding: 24px 12px; border: 0; border-radius: 21px; background: var(--olive); color: #fffff5; font-size: 17px; font-weight: 600; line-height: 1.35; text-align: center; }
.record-button:hover:not(:disabled), .button-primary:hover:not(:disabled) { background: var(--olive-hover); }
.record-button:active:not(:disabled) { box-shadow: inset 0 2px 12px #00000016; }
.record-icon { display: grid; place-items: center; width: 55px; height: 55px; border: 1px solid #ffffff32; border-radius: 50%; background: #ffffff08; }
.record-icon svg { width: 34px; height: 34px; stroke-width: 1.8; }
.import-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 52px; margin-top: 12px; padding: 10px 5px; border: 0; border-radius: 12px; background: transparent; color: var(--olive); font-size: 14px; font-weight: 550; }
.import-button svg { width: 19px; height: 19px; }
.import-button:hover:not(:disabled) { background: var(--soft); }
.browser-note { display: flex; align-items: flex-start; justify-content: center; gap: 10px; max-width: 380px; margin: 21px auto 0; padding: 0 11px; color: var(--muted); font-size: 12px; line-height: 1.6; text-wrap: pretty; }
.browser-note svg { flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; color: #8a9180; }
.page-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 34px 0 calc(25px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 11px; line-height: 1.6; }
.page-footer a { padding: 6px 0; text-decoration-color: #b4b8aa; text-underline-offset: 3px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 13px 17px; border: 1px solid transparent; border-radius: 13px; font-size: 15px; font-weight: 600; line-height: 1.45; text-align: center; }
.button-wide { width: 100%; }
.button-primary { background: var(--olive); color: #fffff5; }
.button-secondary { border-color: var(--line); background: var(--surface); color: var(--olive); }
.button-secondary:hover:not(:disabled) { background: var(--soft); border-color: #d4d9c7; }
.text-action { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 5px; border: 0; border-radius: 7px; background: transparent; color: var(--olive); font-size: 13px; font-weight: 550; line-height: 1.45; text-decoration: none; text-align: center; }
.text-action:hover:not(:disabled) { background: #eff1e780; text-decoration: underline; text-underline-offset: 3px; }
.text-action:not([href]):not(button) { cursor: default; }
.supporting-note { color: var(--muted); font-size: 13px; line-height: 1.65; text-wrap: pretty; }
.section-heading { margin-bottom: 22px; }
.step-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
h2 { font-size: 25px; font-weight: 600; letter-spacing: -.85px; line-height: 1.25; }
.notice { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #dce2cd; border-radius: 14px; background: #edf1e4; color: #46543a; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.notice-error { border-color: #eed6cb; background: #fff0e9; color: var(--danger); }

.recording-panel { padding: 21px 0 3px; text-align: center; }
.recording-state { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.recording-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9624c; box-shadow: 0 0 0 5px #b9624c0c; }
.recording-panel:has(#pause-recording[aria-pressed="true"]) .recording-dot { background: #929885; box-shadow: none; }
.recording-timer { margin-top: 24px; font-size: clamp(44px, 12vw, 60px); font-weight: 400; letter-spacing: -2.8px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.recording-hint { margin-top: 11px; color: var(--muted); font-size: 13px; }
.stream-disclosure { margin: 15px auto; max-width: 390px; text-align: center; }
.stream-panel { margin-top: 22px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; font-size: 13px; line-height: 1.6; }
.stream-panel .supporting-note { margin-top: 5px; font-size: 11px; }
.live-panel { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.live-panel h2 { font-size: 18px; }
.live-text, .live-partial { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.7; }
.live-text { margin-top: 13px; max-height: 280px; overflow-y: auto; }
.live-partial { color: var(--muted); font-style: italic; }
.live-panel .supporting-note { margin-top: 8px; font-size: 11px; }
.recording-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: 34px; }
.stop-icon { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.audio-card { padding: 17px 16px 6px; border: 1px solid var(--line); border-radius: 17px; background: #f8f9f2; }
.audio-details { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.audio-name { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.audio-duration { flex-shrink: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
audio { display: block; width: 100%; height: 44px; border-radius: 22px; }
.audio-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 8px; margin-top: 7px; }
#privacy-note { margin: 14px 2px 0; }
.process-actions { margin-top: 25px; }
.cost-note { margin: 11px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; text-wrap: pretty; }
.discard-action { display: flex; width: fit-content; margin: 12px auto -5px; color: var(--muted); }
.processing-panel { padding: 39px 0 42px; text-align: center; }
.processing-symbol { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; margin-bottom: 25px; }
.processing-symbol span { width: 6px; height: 22px; border-radius: 6px; background: #91a275; animation: processing 1.2s ease-in-out infinite; }
.processing-symbol span:nth-child(2) { height: 35px; animation-delay: .15s; }
.processing-symbol span:nth-child(3) { animation-delay: .3s; }
.processing-panel .supporting-note { max-width: 300px; margin: 13px auto 0; }
@keyframes processing { 0%, 100% { opacity: .4; transform: scaleY(.7); } 50% { opacity: 1; transform: scaleY(1); } }

.result-heading { margin-bottom: 23px; }
.result-text, .report-result { font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-text:empty { min-height: 90px; }
.report-result section, .report-result .report-section { margin-top: 22px; white-space: normal; }
.report-result section:first-child, .report-result .report-section:first-child { margin-top: 0; }
.report-result h3 { margin-bottom: 8px; color: var(--olive); font-size: 16px; font-weight: 650; letter-spacing: -.2px; line-height: 1.5; }
.report-result p + p { margin-top: 10px; }
.report-result ul, .report-result ol { margin: 9px 0 0; padding-left: 21px; }
.report-result li + li { margin-top: 7px; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 5px; margin-top: 23px; padding-top: 12px; border-top: 1px solid var(--line); }
.new-recording { margin-top: 24px; }
.report-consent-panel { margin: 22px 0 17px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #f7f8f1; }
.consent-label { display: flex; align-items: flex-start; gap: 11px; font-size: 12px; line-height: 1.6; cursor: pointer; }
.consent-label input { flex: 0 0 19px; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--olive); }
.auth-panel { margin-top: 23px; padding-top: 23px; border-top: 1px solid var(--line); }
.auth-panel h3 { margin-bottom: 7px; font-size: 18px; font-weight: 600; letter-spacing: -.35px; }
.auth-panel form { display: flex; flex-direction: column; margin-top: 19px; }
.auth-panel label { margin-bottom: 7px; font-size: 13px; font-weight: 550; }
.auth-panel input { width: 100%; min-height: 48px; margin-bottom: 16px; padding: 11px 12px; border: 1px solid #d8ddcc; border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; }
.auth-panel input::placeholder { color: #8d9387; }
.auth-panel input:focus { border-color: var(--olive); }
.auth-error { margin-bottom: 15px; color: var(--danger); font-size: 13px; line-height: 1.55; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 10px; margin-top: 6px; }
.install-recorder { display: flex; width: fit-content; gap: 7px; margin: 12px auto -10px; color: var(--muted); font-size: 12px; font-weight: 500; }
.install-recorder svg { width: 17px; height: 17px; }
.install-dialog { position: fixed; inset: 0; width: calc(100% - 36px); max-width: 440px; max-height: calc(100% - 44px); max-height: calc(100dvh - 44px); margin: auto; padding: 25px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 80px #20261d26; }
.install-dialog:not([open]) { display: none; }
.install-dialog::backdrop { background: #252b2369; }
.install-dialog[data-fallback-modal="true"] { z-index: 100; box-shadow: 0 0 0 100vmax #252b2369; }
.install-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.install-dialog-heading img { width: 48px; height: 48px; border-radius: 14px; }
.install-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; margin: -7px -10px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.install-close:hover { background: var(--soft); }
.install-close svg { width: 20px; height: 20px; }
#install-description { margin-top: 11px; }
#install-native { margin-top: 22px; }
#install-status { margin-top: 16px; }
.install-instructions { margin-top: 23px; }
.install-instructions h3 { font-size: 14px; font-weight: 650; line-height: 1.5; }
.install-instructions ol { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.install-instructions li + li { margin-top: 8px; }
.install-instructions strong { color: var(--ink); font-weight: 550; }
.install-footnote { margin-top: 23px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.skip-link { position: absolute; z-index: 10; top: -100px; left: 16px; padding: 12px 16px; border-radius: 10px; background: var(--olive); color: white; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 600px) {
  .recorder-shell { padding: 0 20px; }
  .site-header { min-height: 112px; }
  .page-heading { padding-top: 41px; padding-bottom: 33px; }
  .recorder-card { padding: 29px; }
  .record-button { min-height: 181px; }
  .page-footer { padding-top: 44px; }
}
@media (max-width: 359px) {
  .recorder-shell { padding: 0 15px; }
  .site-header { min-height: 79px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 27px; height: 27px; }
  .recorder-card { padding: 19px; border-radius: 23px; }
  .record-button { font-size: 15px; }
  .recording-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .recording-actions .button { padding: 12px 10px; font-size: 14px; }
  .result-actions .text-action { padding-right: 2px; padding-left: 2px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
