/* Piepo web v1.18.0 — "4 · Studio redesign" from the owner's Claude Design board: a top bar
   with navigation on desktop, a slide-in menu on phones, one central task card for Live and
   Import, then how it works, features, FAQ and a site footer. Values follow the board. Parts the
   board does not show (sheets, settings, feedback) use the same tokens and card style. Only the
   light theme is used for now (the board's dark values are in git history). The legal pages
   load this file too, then legal.css for their text. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Persian and Arabic text: Vazirmatn, under the same family name so it applies by script. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/vazirmatn-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f5f7f9;
  --ink: #14202b;
  --sub: #5b6b78;
  --line: rgba(20, 32, 43, .1);
  --line2: rgba(20, 32, 43, .22);
  --hover: rgba(20, 32, 43, .05);
  /* Brighter green for fills, borders and icons; a deeper shade for green text so it stays
     readable on white. */
  --acc: #1fa673;
  --acc2: #27bd84;
  --accbg: rgba(31, 166, 115, .12);
  --acc-ink: #15815a;
  --on-acc: #0b1a14;
  --danger: #c4323a;
  --rec: #e5484d;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* Names used by legal.css and older rules */
  --card: var(--panel);
  --sep: var(--line);
  --fill: var(--hover);
  --tint: var(--acc);
  --tintdeep: var(--acc2);
  --tintbg: var(--accbg);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, select, input, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .45; }
:is(button, select, input, textarea, a, summary, [tabindex]):focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
a { color: var(--acc-ink); }
a:hover { color: var(--acc); }
.hidden, [hidden] { display: none !important; }
html.i18n-pending body { visibility: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
h1, h2, h3, p { margin-top: 0; }
@keyframes pp-ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes pp-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@keyframes pp-fade { from { opacity: 0; } }
@keyframes pp-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pp-pop { from { opacity: 0; transform: scale(.96); } }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logo { width: 28px; flex: none; fill: var(--acc); }
.logo .logo-beak { fill: #f0a02c; }
.logo .logo-eye { fill: var(--bg); }
.signed-in-only { display: none !important; }
body.signed-in .signed-in-only { display: inline-flex !important; }
body.signed-in .signed-out-only { display: none !important; }

/* ---------- Menu (phones: slides in from the left) ---------- */
.menu-scrim { position: fixed; z-index: 40; inset: 0; background: rgba(0, 0, 0, .5); animation: pp-fade .2s ease both; }
.side-menu { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; display: flex; width: 260px; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); transform: translateX(-100%); transition: transform .3s var(--ease); }
body.menu-open .side-menu { transform: none; }
.side-head { display: flex; height: 56px; align-items: center; gap: 10px; padding: 0 14px; }
.side-head b { font-size: 19px; letter-spacing: -.02em; }
.side-cta { padding: 8px 14px; }
.cta-button { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; background: var(--acc); color: var(--on-acc); cursor: pointer; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .16s var(--ease); }
.cta-button:hover { color: var(--on-acc); }
.cta-button:active { transform: scale(.97); }
.side-nav { display: flex; flex: 1; flex-direction: column; gap: 2px; padding: 8px 14px; }
.side-link { display: flex; width: 100%; min-height: 42px; align-items: center; gap: 12px; padding: 0 11px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font-size: 15px; font-weight: 500; text-align: start; text-decoration: none; white-space: nowrap; transition: background .15s; }
.side-link:hover { background: var(--hover); color: var(--ink); }
.side-link.active { background: var(--accbg); color: var(--acc-ink); font-weight: 600; }
.side-foot { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 16px; border-top: 1px solid var(--line); }
.side-version { padding: 0 10px; color: var(--sub); font-size: 12px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; z-index: 20; top: 0; display: flex; height: 56px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--bg); }
.top-left, .top-right { display: flex; min-width: 0; align-items: center; }
.top-left { gap: 10px; }
.top-right { gap: 6px; }
.icon-btn { display: grid; width: 36px; height: 36px; flex: none; padding: 0; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--sub); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-btn:hover { background: var(--hover); }
.top-brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; text-decoration: none; }
.top-brand:hover { color: var(--ink); }
.top-brand b { font-size: 19px; letter-spacing: -.02em; }
.service-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--sub); font-size: 13px; white-space: nowrap; }
.service-badge i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #c9a227; }
.service-badge.online i { background: #30b070; }
.service-badge.offline i { background: var(--rec); }
/* Phones: the badge is only its coloured dot, so the logo, balance and Sign in fit; the text
   stays in the page for screen readers. */
@media (max-width: 899.98px) {
  .service-badge { position: relative; gap: 0; padding: 0; border: 0; }
  .service-badge i { width: 10px; height: 10px; }
  .service-badge span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .top-left { flex: none; }
  .top-right { flex: 0 1 auto; }
  body.signed-in .balance-pill { display: block !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
.top-nav, .lang-chip, .get-started { display: none !important; }
.top-nav { align-items: center; gap: 2px; margin-right: 6px; }
.top-link { min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--sub); cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s; display: inline-flex; align-items: center; }
.top-link:hover { background: var(--hover); color: var(--sub); }
.top-link.active { background: var(--hover); color: var(--ink); }
.lang-chip { align-items: center; gap: 6px; min-height: 36px; margin-right: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.lang-chip { position: relative; cursor: pointer; }
.lang-chip:hover { background: var(--hover); }
.lang-chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lang-select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
button.lang-chip { background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; }

/* Styled picker for long lists (select-menu.js); the native select stays hidden behind it. */
.pick-native { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0, 0, 0, 0); opacity: 0; pointer-events: none; }
.pick-trigger { display: inline-flex; min-width: 0; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: inherit; font-weight: 600; text-align: start; }
.pick-trigger .pick-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chevron { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--sub); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.pick-trigger[aria-expanded="true"] .pick-chevron { transform: rotate(180deg); }
.side-language .pick-trigger { flex: 1; font-size: 15px; font-weight: 500; }
.pick-panel { position: fixed; z-index: 90; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line2); border-radius: 16px; background: var(--bg); box-shadow: 0 18px 50px rgba(20, 32, 43, .18), 0 2px 8px rgba(20, 32, 43, .06); animation: pp-pick .18s var(--ease) both; }
.pick-panel[data-side="above"] { animation-name: pp-pick-up; }
@keyframes pp-pick { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes pp-pick-up { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.pick-search { display: flex; flex: none; align-items: center; gap: 8px; margin: 8px 8px 4px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--sub); }
.pick-search:focus-within { border-color: var(--acc); }
.pick-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pick-search input { min-width: 0; height: 38px; flex: 1; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; outline: none; }
.pick-search input::-webkit-search-cancel-button { display: none; }
.pick-list { overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 6px; }
.pick-item { display: flex; width: 100%; min-height: 40px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font-size: 15px; font-weight: 500; text-align: start; transition: background .12s; }
.pick-item:hover, .pick-item:focus-visible { background: var(--hover); outline: none; }
.pick-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--acc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.pick-item[aria-selected="true"] { background: var(--accbg); color: var(--acc-ink); font-weight: 700; }
.pick-item[aria-selected="true"] svg { opacity: 1; }
/* Phones: the picker opens as a bottom sheet over a dimmed page. */
.pick-scrim { position: fixed; z-index: 89; inset: 0; background: rgba(0, 0, 0, .35); animation: pp-fade .2s ease both; }
.pick-panel.pick-sheet { top: auto !important; left: 8px !important; right: 8px; width: auto !important; border-radius: 20px; animation: pp-up .3s var(--ease) both; }
.pick-sheet .pick-item { min-height: 48px; font-size: 16px; }
.pick-sheet .pick-search input { height: 44px; font-size: 16px; }
.pick-empty { margin: 0; padding: 14px 12px; color: var(--sub); font-size: 14px; }
.side-language select { min-width: 0; flex: 1; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 15px; font-weight: 500; outline: none; }
.side-language svg { pointer-events: none; }
.outline-btn, .accent-btn { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 16px; border-radius: 10px; cursor: pointer; font-size: 14px; text-decoration: none; white-space: nowrap; transition: transform .16s var(--ease), background .15s; }
.outline-btn { border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 500; }
.outline-btn:hover { background: var(--hover); color: var(--ink); }
.accent-btn { border: 0; background: var(--acc); color: var(--on-acc); font-weight: 700; }
.accent-btn:hover { background: var(--acc2); color: var(--on-acc); }
.accent-btn:active { transform: scale(.97); }
.accent-btn.large { min-height: 48px; padding: 0 28px; border-radius: 12px; font-size: 16px; font-weight: 600; }
.balance-pill { padding: 6px 12px; border-radius: 99px; background: var(--accbg); color: var(--acc-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }

@media (min-width: 900px) {
  .topbar { padding: 0 40px; }
  .menu-button, .service-badge, .side-menu, .menu-scrim { display: none !important; }
  .top-brand { display: flex; }
  .top-nav { display: flex !important; }
  .lang-chip { display: flex !important; }
  .get-started { display: inline-flex !important; }
  body.signed-in .get-started { display: none !important; }
}

/* ---------- Page ---------- */
.page { max-width: 960px; margin: 0 auto; padding: 0 18px 56px; }
@media (min-width: 900px) { .page { padding: 0 40px 56px; } }
.view { display: none; }
.view.active { display: block; }
.eyebrow { margin: 0 0 4px; color: var(--acc-ink); font-size: 13px; font-weight: 600; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 36px 0 18px; }
.page-heading h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.heading-side { display: flex; align-items: center; gap: 14px; color: var(--sub); font-size: 14px; }

/* ---------- Buttons ---------- */
.text-button { padding: 0; border: 0; background: none; color: var(--acc-ink); cursor: pointer; font-size: 15px; font-weight: 600; text-decoration: none; }
.danger-text { color: var(--danger) !important; }
.primary-button, .secondary-button { display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: transform .16s var(--ease), background .15s; }
.primary-button:active, .secondary-button:active { transform: scale(.98); }
.primary-button { width: 100%; min-height: 50px; margin-top: 14px; border: 0; border-radius: 12px; background: var(--acc); color: var(--on-acc); font-size: 16px; font-weight: 700; }
.primary-button:hover:not(:disabled) { background: var(--acc2); }
.secondary-button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; }
.secondary-button:hover:not(:disabled) { background: var(--hover); }
.compact-button { min-height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
.primary-button.compact-button { width: auto; margin-top: 0; }
.chip-button { padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600; }
.chip-button:hover { background: var(--hover); }

/* ---------- Home: hero and task card ---------- */
.hero { padding: 32px 0 28px; text-align: center; }
.hero-eyebrow { margin: 0 0 14px; color: var(--acc-ink); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0 auto 14px; font-size: 36px; font-weight: 700; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.hero-copy { max-width: 600px; margin: 0 auto; color: var(--sub); font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.hero-offer { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 7px 14px; border: 1px solid var(--acc); border-radius: 99px; background: var(--accbg); color: var(--acc-ink); font-size: 14px; font-weight: 700; }
.hero-offer-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--acc); }
body.signed-in .hero-offer { display: none; }
@media (min-width: 900px) { .hero { padding-top: 64px; } .hero h1 { font-size: 56px; } }

.task-card { padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); scroll-margin-top: 72px; }
@media (min-width: 900px) { .task-card { padding: 32px; } }
.task-card > h2 { margin: 0 0 16px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-align: center; }
.mode-switch { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 20px; padding: 4px; border-radius: 14px; background: var(--hover); }
.mode-switch button { display: flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 20px; border: 0; border-radius: 10px; background: transparent; color: var(--sub); cursor: pointer; font-size: 15px; font-weight: 600; transition: background .2s; }
.mode-switch button[aria-pressed="true"] { background: var(--panel); box-shadow: 0 0 0 1px var(--line2); color: var(--ink); }
.task-card[data-mode="live"] .import-only, .task-card[data-mode="import"] .live-only { display: none !important; }

.task-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.language-field { display: flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 15px; }
.language-field > span { color: var(--sub); }
.language-field select { max-width: 190px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-weight: 600; outline: none; }
.language-field select option { color: #111; }
.option-pill { display: flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 500; transition: background .2s, border-color .2s; }
.option-pill[aria-checked="true"] { border-color: var(--acc); background: var(--accbg); }
.option-dot { position: relative; width: 28px; height: 16px; flex: none; border: 1px solid var(--line2); border-radius: 99px; background: var(--hover); transition: background .2s var(--ease), border-color .2s; }
.option-dot::after { content: ""; position: absolute; top: 1px; inset-inline-start: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--sub); transition: transform .2s var(--ease), background .2s; }
.option-pill[aria-checked="true"] .option-dot { border-color: var(--acc); background: var(--acc); }
.option-pill[aria-checked="true"] .option-dot::after { background: #fff; transform: translateX(12px); }
html[dir="rtl"] .option-pill[aria-checked="true"] .option-dot::after { transform: translateX(-12px); }

/* Live */
.transcript-panel { min-height: 210px; margin: 22px 0 0; padding: 6px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.empty-copy { margin: 0; padding: 56px 0; color: var(--sub); font-size: 16px; text-align: center; }
@media (min-width: 900px) { .empty-copy { padding: 76px 0; } }
/* Empty live box: a faded sample result above the hint. It is only a picture of a result, so it
   cannot be selected or clicked. It reuses the live turn rows. */
.empty-copy.has-example { padding: 14px 0 22px; }
.live-example { text-align: start; }
.example-label { display: inline-block; margin-bottom: 2px; padding: 2px 9px; border: 1px solid var(--line2); border-radius: 99px; color: var(--sub); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.example-turns { opacity: .5; pointer-events: none; -webkit-user-select: none; user-select: none; }
.example-turns .turn { animation: none; }
.example-turns .turn:last-child { border-bottom: 0; }
.hide-speakers .example-turns .turn b { font-size: 13px; }
.hide-speakers .example-turns .turn b::after { content: none; }
.live-empty-line { margin: 12px 0 0; }
.turn { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.55; animation: pp-in .35s var(--ease) both; }
@media (min-width: 900px) { .turn { grid-template-columns: 90px 1fr; } }
.turn b { padding-top: 3px; color: var(--acc-ink); font-size: 13px; overflow-wrap: anywhere; }
.partial { color: var(--sub); }
.hide-speakers .turn b { font-size: 0; }
.hide-speakers .turn b::after { font-size: 13px; content: "Live"; }
.hide-speakers .transcript-turn > b { display: none; }
.live-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.transcript-panel:has(.empty-copy) + .live-tools { display: none; }
.live-tools .text-button { color: var(--sub); font-size: 13px; }
.timer, #liveConsumption:empty { display: none; }
.recorder-controls { display: flex; flex-direction: column; align-items: center; padding: 26px 0 4px; }
.mic-wrap { position: relative; display: grid; width: 84px; height: 84px; place-items: center; }
.mic-rings { position: absolute; inset: 0; display: none; border-radius: 50%; background: var(--rec); animation: pp-ring 1.6s ease-out infinite; }
.mic-wrap:has(.mic-button.recording) .mic-rings { display: block; }
.mic-button { position: relative; display: grid; width: 84px; height: 84px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: var(--acc); cursor: pointer; box-shadow: 0 10px 30px rgba(31, 166, 115, .32); transition: transform .16s var(--ease), background .25s; }
.mic-button:active { transform: scale(.94); }
.mic-button:disabled { cursor: wait; opacity: .55; }
.mic-button svg { width: 32px; height: 32px; fill: none; stroke: var(--on-acc); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mic-button.recording { background: var(--rec); box-shadow: 0 10px 30px rgba(229, 72, 77, .4); }
.mic-button.recording .mic-symbol { display: none; }
.stop-symbol { display: none; width: 22px; height: 22px; border-radius: 6px; background: #fff; }
.mic-button.recording .stop-symbol { display: block; }
.recorder-controls b { margin-top: 14px; font-size: 16px; }
.recorder-controls small { margin-top: 3px; color: var(--sub); font-size: 14px; font-variant-numeric: tabular-nums; text-align: center; }
/* Phones: a tighter hero, task card and empty transcript box, so the microphone shows without
   scrolling. Nothing is removed; desktop (900px and up) is unchanged. */
@media (max-width: 899.98px) {
  .hero { padding: 16px 0 16px; }
  .hero-eyebrow { margin-bottom: 8px; font-size: 12px; }
  .hero h1 { margin-bottom: 10px; font-size: 28px; }
  .hero-copy { font-size: 15px; line-height: 1.5; }
  .hero-offer { margin-top: 12px; }
  .task-card > h2 { margin-bottom: 12px; }
  .mode-switch { margin-bottom: 14px; }
  .transcript-panel { min-height: 120px; margin-top: 16px; padding: 4px 14px; }
  .empty-copy { padding: 36px 0; font-size: 15px; }
  .empty-copy.has-example { padding: 10px 0 16px; }
  .live-empty-line { margin-top: 10px; }
  .example-turns .turn { grid-template-columns: 68px 1fr; gap: 10px; padding: 6px 0; font-size: 14px; line-height: 1.45; }
  .example-turns .turn:nth-child(3) { display: none; }
  .example-turns .turn:nth-child(2) { border-bottom: 0; }
  .recorder-controls { padding-top: 16px; }
}

/* Import */
.drop-zone { display: flex; width: 100%; min-height: 250px; margin-top: 22px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px; border: 1.5px dashed var(--line2); border-radius: 18px; background: transparent; color: var(--ink); cursor: pointer; transition: background .2s; }
.drop-zone:hover, .drop-zone.dragging { background: var(--hover); }
.drop-zone:active { transform: scale(.99); }
.drop-zone b { font-size: 18px; }
.drop-zone > span:last-child { color: var(--sub); font-size: 14px; text-align: center; }
.upload-icon { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 16px; background: var(--accbg); color: var(--acc-ink); }
.upload-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.selected-file { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.selected-file > div:nth-child(2) { min-width: 0; flex: 1; }
.selected-file b { display: block; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.selected-file span:not(.file-note) { display: block; color: var(--sub); font-size: 13px; }
.file-note { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border-radius: 12px; background: var(--accbg); color: var(--acc-ink); }
.file-note svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.estimate-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.estimate-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 16px; font-size: 15px; }
.estimate-row + .estimate-row { border-top: 1px solid var(--line); }
.estimate-row span { color: var(--sub); }
.estimate-row b { font-weight: 600; }
.estimate-note { margin: 0; padding: 0 16px 12px; color: var(--sub); font-size: 13px; line-height: 1.45; }
.estimate-note:empty { display: none; }
.estimate-note.error { color: var(--danger); }
.toolbar-help { color: var(--sub); font-size: 13px; }
.progress-card { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.progress-card-top { display: flex; align-items: center; gap: 14px; }
.progress-card-top > div:last-child { min-width: 0; flex: 1; }
.progress-card-top b { display: block; }
.progress-card-top span { display: block; color: var(--sub); font-size: 13px; }
.progress-track { height: 6px; margin-top: 16px; overflow: hidden; border-radius: 99px; background: var(--hover); }
.progress-fill { width: 0%; height: 100%; border-radius: 99px; background: var(--acc); transition: width .6s var(--ease); }
.progress-fill.progress-fill-waiting { animation: progress-pulse 1.3s ease-in-out infinite; }
@keyframes progress-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.pause-note { display: block; margin-top: 10px; color: var(--sub); font-size: 13px; }
.progress-card .secondary-button { width: 100%; margin-top: 14px; }
.spinner { width: 28px; height: 28px; flex: none; border: 3px solid var(--line2); border-top-color: var(--acc); border-radius: 50%; animation: pp-spin .8s linear infinite; }
.result-card { margin-top: 22px; padding: 6px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.result-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.result-language { margin: 2px 0 0; color: var(--sub); font-size: 13px; }
.result-language:empty { display: none; }
.result-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.result-text { white-space: pre-wrap; font-size: 16px; line-height: 1.55; }
.import-another { margin: 12px 0; }
.task-note { margin: 18px 0 0; color: var(--sub); font-size: 13px; text-align: center; }

/* Transcript turns: import result and saved-transcript sheet */
.structured-transcript { display: block; white-space: normal; }
.transcript-turn { display: grid; width: 100%; grid-template-columns: 48px 1fr; gap: 0 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.55; text-align: start; }
.transcript-turn time { grid-row: 1 / span 2; padding-top: 4px; color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; }
.transcript-turn b { grid-column: 2; display: block; color: var(--acc-ink); font-size: 13px; }
.transcript-turn span, .transcript-turn .turn-editor { min-width: 0; grid-column: 2; white-space: pre-wrap; }
.transcript-turn.seekable { cursor: pointer; }
.turn-editor, .fallback-editor { width: 100%; resize: none; overflow: hidden; padding: 0; border: 0; background: transparent; color: var(--ink); line-height: 1.55; }
.fallback-editor { min-height: 260px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); resize: vertical; overflow: auto; }
.turn-editor:focus, .fallback-editor:focus { outline: none; }
mark { padding: 0 2px; border-radius: 3px; background: #f5d66d; color: #14202b; }
mark.current-match { background: #f0a02c; }

/* ---------- Home sections ---------- */
.home-section { padding: 48px 0 8px; scroll-margin-top: 72px; }
.home-section.first { padding-top: 56px; }
.home-section > h2, .cta-card h2 { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.section-copy { max-width: 620px; margin: 0 0 22px; color: var(--sub); line-height: 1.55; }
.faq-copy { margin-bottom: 18px; }
.steps-grid, .features-grid, .uses-grid { display: grid; gap: 14px; }
.steps-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.features-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.uses-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.step-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.step-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--accbg); color: var(--acc-ink); font-size: 14px; font-weight: 700; }
.step-card h3 { margin: 14px 0 6px; font-size: 18px; letter-spacing: -.01em; }
.step-card p { margin: 0; color: var(--sub); font-size: 15px; line-height: 1.5; }

/* Get started card (signed in): the three first steps, ticked off as they happen. */
.getting-started { padding: 28px 0 0; }
.gs-card { padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--bg); }
@media (min-width: 900px) { .gs-card { padding: 28px; } }
.gs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.getting-started .gs-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.gs-head .icon-btn { margin: -6px; }
.gs-count { margin: 6px 0 10px; color: var(--sub); font-size: 14px; }
.gs-bar { height: 6px; margin-bottom: 18px; overflow: hidden; border-radius: 99px; background: var(--hover); }
.gs-bar i { display: block; width: 0%; height: 100%; border-radius: 99px; background: var(--acc); transition: width .4s var(--ease); }
.gs-steps { margin: 0; padding: 0; list-style: none; }
.gs-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-content: start; column-gap: 14px; padding: 18px; }
.gs-step .step-number { grid-row: 1 / span 3; }
.gs-step h3 { grid-column: 2; margin: 3px 0 4px; font-size: 16px; }
.gs-step p { grid-column: 2; font-size: 14px; }
.gs-meta { grid-column: 2; display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.gs-time, .gs-done { color: var(--sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.gs-done { font-weight: 600; }
.gs-step[data-done="true"] .step-number { background: var(--acc); color: #fff; }
.gs-step[data-done="true"] .step-number .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.gs-step[data-done="true"] h3 { color: var(--sub); text-decoration: line-through; text-decoration-color: var(--line2); }
.gs-allset { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px; border-radius: 16px; background: var(--accbg); color: var(--acc-ink); font-weight: 700; }
.feature-card { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; }
.feature-icon { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border-radius: 12px; background: var(--accbg); color: var(--acc-ink); }
.feature-card b { display: block; font-size: 16px; }
.feature-card div > span { display: block; margin-top: 3px; color: var(--sub); font-size: 14px; line-height: 1.5; }
.uses-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 18px; }
.uses-grid h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.uses-grid p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.55; }
.faq-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; font-size: 16px; font-weight: 600; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { background: var(--hover); }
.faq-plus { color: var(--acc-ink); font-size: 22px; font-weight: 400; line-height: 1; transition: transform .25s var(--ease); }
.faq-list details[open] .faq-plus { transform: rotate(45deg); }
.faq-list details p { margin: 0; padding: 0 20px 18px; color: var(--sub); font-size: 15px; line-height: 1.6; text-wrap: pretty; animation: pp-in .3s ease both; }
.cta-card { margin-top: 48px; padding: 36px 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); text-align: center; }
.cta-card p { max-width: 480px; margin: 0 auto 20px; color: var(--sub); line-height: 1.55; }

/* ---------- Site footer ---------- */
.site-footer { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; }
.footer-about { min-width: 200px; grid-column: span 2; }
.footer-about b { font-size: 18px; letter-spacing: -.02em; }
.footer-about p { max-width: 300px; margin: 8px 0 0; color: var(--sub); font-size: 14px; line-height: 1.6; }
.footer-grid h3 { margin: 0 0 12px; color: var(--sub); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.footer-grid nav div { display: flex; flex-direction: column; gap: 9px; }
.footer-grid nav a { color: var(--ink); font-size: 14px; text-decoration: none; }
.footer-grid nav a:hover { color: var(--acc-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding: 18px 0 4px; border-top: 1px solid var(--line); color: var(--sub); font-size: 13px; }

/* ---------- Files ---------- */
.search-count { color: var(--sub); font-size: 14px; white-space: nowrap; }
.history-search-bar { display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--sub); }
.history-search-bar input { min-width: 0; height: 42px; flex: 1; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; outline: none; }
.history-search-bar input::placeholder, .dialog-search input::placeholder { color: var(--sub); opacity: 1; }
.history-search-bar input::-webkit-search-cancel-button { display: none; }
.history-search-bar:focus-within { border-color: var(--acc); }
.history-filters { margin-top: 12px; }
.history-filters label { display: none; }
.tag-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { min-height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 500; }
.tag-chip:hover { background: var(--hover); }
.tag-chip.selected { border-color: var(--acc); background: var(--accbg); color: var(--acc-ink); font-weight: 600; }
.history-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-top: 16px; }
.history-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: border-color .15s; }
.history-card:hover { border-color: var(--line2); }
.history-item { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: flex-start; padding: 18px 18px 14px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: start; transition: transform .16s var(--ease); }
.history-item:active { transform: scale(.99); }
.history-actions { display: flex; border-top: 1px solid var(--line); }
.history-action { display: flex; min-height: 42px; flex: 1; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 0; background: transparent; color: var(--sub); cursor: pointer; font-size: 13px; font-weight: 600; transition: background .15s, color .15s; }
.history-action + .history-action { border-inline-start: 1px solid var(--line); }
.history-action:hover, .history-action[aria-expanded="true"] { background: var(--hover); color: var(--acc-ink); }
.history-action .ico { width: 16px; height: 16px; }
.history-item .history-kind { color: var(--acc-ink); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.history-item b { width: 100%; margin-top: 8px; overflow: hidden; font-size: 17px; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.history-item small { margin-top: 2px; color: var(--sub); font-size: 13px; }
.history-labels { margin-top: 8px; color: var(--acc-ink); font-size: 13px; }
.history-snippet { display: -webkit-box; margin: 10px 0 0; overflow: hidden; color: var(--sub); font-size: 14px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.empty-state { display: flex; min-height: 280px; flex-direction: column; align-items: center; justify-content: center; color: var(--sub); text-align: center; }
.empty-state.compact { min-height: 200px; }
.empty-icon { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 16px; background: var(--accbg); color: var(--acc-ink); }
.empty-icon svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 16px 0 6px; color: var(--ink); font-size: 20px; }
.empty-state p { margin: 0; font-size: 15px; }

/* ---------- Account ---------- */
.account-card { padding: 40px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); text-align: center; }
.account-card h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.account-card p { max-width: 440px; margin: 0 auto 22px; color: var(--sub); line-height: 1.55; }
.google-button-slot { display: flex; min-height: 44px; justify-content: center; }
.account-card small { display: block; margin-top: 8px; color: var(--sub); font-size: 13px; }
#googleStatus:empty { display: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; }
.stat-card span { color: var(--sub); font-size: 13px; }
.stat-card strong { display: block; margin-top: 12px; font-size: 28px; letter-spacing: -.02em; }
.accent-stat { border-color: var(--acc); background: var(--accbg); }
.sign-out-button { display: grid; place-items: center; background: transparent; color: #ff6b6b; cursor: pointer; font-size: 16px; font-weight: 600; }
.sign-out-button:hover { background: var(--hover); }
.profile-card { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; }
.profile-card > div:nth-child(2) { min-width: 0; flex: 1; }
.profile-card h3 { margin: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.profile-card p { margin: 0; overflow: hidden; color: var(--sub); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.profile-initial { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border-radius: 50%; background: var(--accbg); color: var(--acc-ink); font-size: 18px; font-weight: 700; }
#refreshAccountButton { display: none; }
.group-label { margin: 32px 0 10px; color: var(--sub); font-size: 15px; font-weight: 600; }
.group-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.group-card.list { padding: 0; overflow: hidden; }
.settings-group { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.settings-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.settings-card + .settings-card { border-top: 1px solid var(--line); }
.settings-card > div { flex: 1; }
.settings-card b { display: block; font-size: 15px; font-weight: 600; }
.settings-card span { color: var(--sub); font-size: 13px; }
.toggle { position: relative; width: 48px; height: 28px; flex: none; padding: 0; border: 1px solid var(--line2); border-radius: 99px; background: var(--hover); cursor: pointer; transition: background .25s var(--ease), border-color .25s; }
.toggle i { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .25s var(--ease); }
.toggle[aria-checked="true"] { border-color: var(--acc); background: var(--acc); }
.toggle[aria-checked="true"] i { transform: translateX(20px); }
/* Recent online usage shows four rows at a time and scrolls for the rest. */
#usageHistory { max-height: 256px; overflow-y: auto; overscroll-behavior: contain; }
.usage-row { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.usage-row:last-child { border-bottom: 0; }
.usage-row > div { min-width: 0; }
.usage-row b { display: block; font-weight: 500; }
.usage-row small { color: var(--sub); font-size: 12px; }
.usage-row span { color: var(--sub); }
#usageHistory > .empty-copy { padding: 14px 18px; font-size: 15px; text-align: start; }
.feedback-intro { margin: 0 0 12px; color: var(--sub); font-size: 14px; line-height: 1.5; }
.segmented { display: flex; padding: 4px; border-radius: 14px; background: var(--hover); }
.segmented button { min-height: 36px; flex: 1; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--sub); cursor: pointer; font-size: 14px; font-weight: 600; transition: background .2s; }
.segmented button[aria-pressed="true"] { background: var(--panel); box-shadow: 0 0 0 1px var(--line2); color: var(--ink); }
.soft-field { display: block; width: 100%; min-height: 96px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 15px; resize: vertical; }
.soft-field::placeholder { color: var(--sub); opacity: 1; }
.soft-field:focus { border-color: var(--acc); outline: none; }
.feedback-meta { margin-top: 6px; color: var(--sub); font-size: 12px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.link-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.link-list a { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.link-list a:last-child { border-bottom: 0; }
.link-list a::after { color: var(--sub); content: "›"; }
.link-list a:hover { background: var(--hover); color: var(--ink); }
.admin-link { display: inline-block; margin-top: 16px; font-weight: 600; text-decoration: none; }

/* Fields used in the sheets */
.list-group { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 15px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row > span { flex: none; color: var(--sub); }
.row-select, .row-input { min-width: 0; flex: 1; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; text-align: end; text-align-last: end; }
.row-select { cursor: pointer; }
.row-select option { color: #111; }
.row-input::placeholder { color: var(--sub); font-weight: 400; opacity: 1; }
.row-input:focus, .row-select:focus { outline: none; }
.list-row:focus-within { box-shadow: inset 0 0 0 2px var(--acc); }
.field-caption { display: block; margin-bottom: 6px; color: var(--sub); font-size: 13px; }

/* ---------- Sheets (dialogs) and alerts ---------- */
dialog { color: var(--ink); font-family: var(--font); }
.sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; padding: 0; overflow-x: hidden; overflow-y: auto; border: 1px solid var(--line2); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--bg); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.sheet[open] { animation: pp-up .38s var(--ease) both; }
.sheet::backdrop, .confirm-dialog::backdrop { background: rgba(0, 0, 0, .5); animation: pp-fade .25s ease both; }
@media (min-width: 900px) { .sheet { width: 680px; max-height: 88vh; margin: auto; border-bottom: 1px solid var(--line2); border-radius: 22px; } }
.sheet-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--bg); }
.sheet-spacer { width: 60px; }
.sheet-title { font-size: 16px; }
.done-button { width: 60px; padding: 0; border: 0; background: none; color: var(--acc-ink); cursor: pointer; font-size: 15px; font-weight: 700; text-align: end; }
.sheet > :not(.sheet-bar) { margin-left: 20px; margin-right: 20px; }
.sheet > :last-child { margin-bottom: 24px; }
.sheet-heading { margin-top: 18px; margin-bottom: 4px; font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.title-row { display: flex; align-items: flex-start; gap: 6px; margin-top: 18px; margin-bottom: 4px; }
.title-row .sheet-heading { min-width: 0; flex: 1; margin: 0; padding: 2px 6px; margin-inline-start: -6px; border-radius: 8px; outline: none; overflow-wrap: anywhere; cursor: text; transition: background .15s, box-shadow .15s; }
.title-row .sheet-heading:hover { background: var(--hover); }
.title-row .sheet-heading:focus { background: var(--bg); box-shadow: 0 0 0 2px var(--acc); }
.rename-title { margin-top: 2px; color: var(--sub); }
.dialog-meta { margin-top: 0; margin-bottom: 14px; color: var(--sub); font-size: 13px; line-height: 1.5; }
.vocabulary-dialog .dialog-meta { font-size: 14px; }

.confirm-dialog { width: 340px; max-width: calc(100% - 36px); padding: 0; overflow: hidden; border: 1px solid var(--line2); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.confirm-dialog[open] { animation: pp-pop .28s var(--ease) both; }
.confirm-dialog .dialog-heading { padding: 20px 20px 0; }
.confirm-dialog .eyebrow, .confirm-dialog #closeConfirm { display: none; }
.confirm-dialog h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.confirm-dialog .dialog-meta { margin: 6px 20px 0; font-size: 14px; text-wrap: pretty; }
.confirm-dialog .estimate-panel { margin: 14px 20px 0; }
.confirm-dialog .estimate-row { padding: 10px 14px; font-size: 14px; }
.confirm-dialog .estimate-note { margin: 8px 20px 0; padding: 0; }
.confirm-actions { display: flex; gap: 8px; padding: 18px 20px 20px; }
.confirm-actions button { flex: 1; min-height: 44px; margin: 0; }
.confirm-actions .secondary-button { padding: 0 12px; }

/* "Where should Piepo listen?" before a live session */
.source-dialog { width: 440px; }
.source-dialog .dialog-heading { padding: 22px 20px 0; }
.source-options { display: grid; gap: 8px; margin: 16px 20px 0; }
.source-option { display: flex; width: 100%; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); cursor: pointer; text-align: start; transition: border-color .15s, background .15s, transform .16s var(--ease); }
.source-option:hover { border-color: var(--line2); }
.source-option:active { transform: scale(.98); }
.source-option[aria-pressed="true"] { border-color: var(--acc); background: var(--accbg); }
.source-icon { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border-radius: 12px; background: var(--accbg); color: var(--acc-ink); }
.source-option[aria-pressed="true"] .source-icon { background: var(--acc); color: var(--on-acc); }
.source-text b { display: block; font-size: 15px; }
.source-text small { display: block; margin-top: 2px; color: var(--sub); font-size: 13px; line-height: 1.4; }
.source-tip { margin: 14px 20px 0; padding: 10px 12px; border-radius: 10px; background: var(--accbg); color: var(--acc-ink); font-size: 13px; font-weight: 600; line-height: 1.45; }
.source-hint { margin: 14px 20px 0; color: var(--sub); font-size: 12px; line-height: 1.5; }
.source-dialog .confirm-actions { padding-top: 16px; }

/* Saved-transcript sheet */
.dialog-audio-panel { margin-bottom: 0; }
.player-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.player-play { display: grid; width: 34px; height: 34px; flex: none; padding: 0; place-items: center; border: 0; border-radius: 50%; background: var(--acc); color: var(--on-acc); cursor: pointer; font-size: 12px; }
.player-track { position: relative; height: 4px; flex: 1; border-radius: 9px; background: var(--line2); cursor: pointer; }
.player-track::before { position: absolute; inset: -10px 0; content: ""; }
.player-fill { width: 0; height: 100%; border-radius: 9px; background: var(--acc); }
.player-time { color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-speed { padding: 0; border: 0; background: none; color: var(--acc-ink); cursor: pointer; font-size: 13px; font-weight: 700; }
.player-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 4px 0; color: var(--sub); font-size: 12px; }
.player-meta > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-meta .text-button { font-size: 12px; }
.dialog-tools { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dialog-search { min-width: 0; flex: 1; }
.dialog-search > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.dialog-search input { width: 100%; height: 40px; padding: 0 64px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 15px; }
.dialog-search input::-webkit-search-cancel-button { display: none; }
.dialog-search input:focus { border-color: var(--acc); outline: none; }
.dialog-tools .search-count { position: absolute; right: 100px; font-size: 12px; pointer-events: none; }
.dialog-tools .icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--acc-ink); font-size: 15px; }
.dialog-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dialog-edit-actions .secondary-button { min-height: 36px; padding: 0 14px; border-radius: 99px; font-size: 14px; }
.dialog-edit-actions .secondary-button:is([aria-expanded="true"], [aria-pressed="true"]) { border-color: var(--acc); background: var(--accbg); color: var(--acc-ink); }
.speaker-manager, .find-replace-panel { margin-top: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.speaker-manager > div:first-child b { display: block; font-size: 15px; }
.speaker-manager > div:first-child span { display: block; margin: 2px 0 10px; color: var(--sub); font-size: 13px; line-height: 1.5; }
#sharePanel > div:first-child span { margin-bottom: 12px; }
.speaker-fields { display: block; }
.speaker-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 15px; }
.speaker-field + .speaker-field { border-top: 1px solid var(--line); }
.speaker-field span { flex: none; overflow: hidden; color: var(--sub); text-overflow: ellipsis; white-space: nowrap; }
.speaker-field input { min-width: 0; flex: 1; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; text-align: end; }
.speaker-field input:focus { outline: none; }
.find-replace-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.find-replace-field { display: grid; gap: 4px; }
.find-replace-field > span { color: var(--sub); font-size: 12px; }
.find-replace-field input { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 15px; }
.find-replace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.find-replace-actions .secondary-button { min-height: 34px; padding: 0 14px; border-radius: 99px; font-size: 14px; }
.find-replace-actions .icon-btn { border: 1px solid var(--line); }
#findCaseSensitive[aria-pressed="true"] { border-color: var(--acc); background: var(--accbg); color: var(--acc-ink); }
.share-link-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.share-link-list:empty { display: none; }
.share-link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 13px; }
.share-link-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-link-actions { display: flex; flex: none; gap: 10px; }
.share-link-actions button { min-height: 0; padding: 0; border: 0; background: none; color: var(--acc-ink); cursor: pointer; font-size: 13px; font-weight: 600; }
.dialog-save-status { margin: 8px 4px 0; color: var(--sub); font-size: 12px; }
.dialog-save-status:empty { display: none; }
.dialog-save-status.error { color: var(--danger); }
#dialogTranscript { margin-top: 10px; }
#dialogTranscript .transcript-turn { width: calc(100% + 20px); margin: 0 -10px; padding: 11px 10px; border: 0; border-radius: 10px; }
#dialogTranscript .transcript-turn.active-turn { background: var(--accbg); }
#dialogTranscript .transcript-turn:has(.turn-editor) { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
#dialogTranscript .transcript-turn + .transcript-turn:has(.turn-editor) { margin-top: 4px; }
.dialog-organize { margin-top: 18px; }
.dialog-actions + .dialog-tools { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.export-panel .group-label { margin: 22px 0 8px; font-size: 14px; }
.export-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.export-buttons .secondary-button { min-width: 64px; min-height: 36px; padding: 0 14px; border-radius: 99px; font-size: 14px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dialog-actions button { flex: 1 1 160px; }

/* Terms sheet */
.sheet > .field-label { display: block; margin: 18px 20px 8px; }
.terms-box { display: block; width: calc(100% - 40px); min-height: 140px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); font-size: 15px; line-height: 1.7; resize: vertical; }
.terms-box:focus { border-color: var(--acc); outline: none; }
.vocabulary-summary { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--sub); font-size: 12px; }
.vocabulary-summary span:first-child { color: var(--acc-ink); font-weight: 700; }
.vocabulary-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ---------- Transient UI ---------- */
.toast { position: fixed; z-index: 80; max-width: min(420px, calc(100% - 32px)); left: 50%; bottom: 24px; padding: 12px 16px; transform: translate(-50%, 12px); border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); color: var(--ink); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { color: var(--danger); }

/* Task 139: recording indicator — a dot and the word "Recording", not colour alone. */
.recording-bar { position: fixed; z-index: 60; top: max(10px, env(safe-area-inset-top)); left: 50%; display: flex; align-items: center; gap: 8px; padding: 8px 16px; transform: translateX(-50%); border-radius: 999px; background: var(--rec); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.recording-bar.hidden { display: none; }
.recording-bar { flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); }
.recording-bar:has(.recording-warning:not(.hidden)) { border-radius: 18px; }
.recording-warning { flex: 1 0 100%; text-align: center; }
.live-limit-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.live-limit-notice p { flex: 1 1 220px; margin: 0; }
.recording-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #fff; opacity: .9; }

/* Notice on an old address: slim, not sticky, so it never covers content on phones. */
.move-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--accbg); font-size: 13px; line-height: 1.4; text-align: center; }
.move-banner b { color: var(--acc-ink); unicode-bidi: isolate; }
.move-banner .text-button { min-height: 32px; padding: 0 4px; font-size: 13px; text-decoration: underline; }
.move-dialog { width: 400px; max-height: calc(100% - 36px); overflow-y: auto; }
.move-host-line { margin: 14px 20px 0; }
.move-host { font-size: 20px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; unicode-bidi: isolate; }
.move-dialog .move-status { padding: 10px 12px; border-radius: 10px; background: var(--accbg); color: var(--acc-ink); font-weight: 600; }
.move-dialog .confirm-actions { flex-direction: column; gap: 8px; }
.move-dialog .confirm-actions button { flex: none; width: 100%; }

/* Task 136: transcript quality flags use a shape, not colour alone. */
.quality-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; color: var(--sub); font-size: 12px; }
.quality-bar.hidden { display: none; }
.quality-bar .text-button { font-size: 12px; }
.quality-flag.quality-low-confidence { border-bottom: 2px dotted #f0a02c; }
.quality-flag.quality-repeated { border-radius: 3px; background: rgba(229, 72, 77, .14); }
.quality-badge { margin-left: 4px; color: #f0a02c; font-size: 12px; font-style: normal; }
.transcript-gap { margin: 4px 0; padding: 8px 10px; border-radius: 10px; background: var(--hover); color: var(--sub); font-size: 12px; text-align: center; }

/* Analytics consent banner (analytics.js). Both choices share one style so neither is favoured. */
.consent-banner { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: 16px; max-width: 460px; padding: 16px 18px; border: 1px solid var(--line2); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); color: var(--ink); }
.consent-banner p { margin: 0; font-size: 14px; line-height: 1.5; }
.consent-banner a { color: var(--acc-ink); font-weight: 600; text-decoration: none; }
.consent-actions { display: flex; gap: 8px; margin-top: 12px; }
.consent-button { min-height: 42px; flex: 1; border: 1px solid var(--line2); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 600; transition: background .15s; }
.consent-button:hover { background: var(--hover); }
@media (min-width: 900px) { .consent-banner { left: 40px; right: auto; } }

@media (max-width: 560px) {
  .find-replace-row { grid-template-columns: 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
/* Right-to-left interface (Persian, Arabic). Flex and grid mirror by themselves; these are the
   few physical positions, plus media controls, which stay left-to-right as is customary. */
html[dir="rtl"] .side-menu { right: 0; left: auto; border-right: 0; border-left: 1px solid var(--line); transform: translateX(100%); }
html[dir="rtl"] body.menu-open .side-menu { transform: none; }
html[dir="rtl"] .link-list a::after { content: "‹"; }
html[dir="rtl"] .toggle i { right: 2px; left: auto; }
html[dir="rtl"] .toggle[aria-checked="true"] i { transform: translateX(-20px); }
html[dir="rtl"] .dialog-search input { padding: 0 14px 0 64px; }
html[dir="rtl"] .dialog-tools .search-count { right: auto; left: 100px; }
html[dir="rtl"] .player-row, html[dir="rtl"] .progress-track { direction: ltr; }
html[dir="rtl"] * { letter-spacing: 0 !important; }
@media (min-width: 900px) { html[dir="rtl"] .consent-banner { right: 40px; left: auto; } }
/* Transcript text follows its own language's direction, whatever the interface language. */
.turn span, .transcript-turn span, .transcript-turn .turn-editor, .result-text, .history-item b, .history-snippet, .sheet-heading { unicode-bidi: plaintext; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
