/* ==========================================================================
   Notey – front end styles
   Everything is scoped to .cs-* classes so it plays nicely with any theme.
   ========================================================================== */

:root {
	--cs-ink: #14213d;
	--cs-ink-2: #23304f;
	--cs-paper: #fbf8f3;
	--cs-tint: #f3eee5;
	--cs-surface: #ffffff;
	--cs-line: #e6dfd2;
	--cs-muted: #5c6274;
	--cs-accent: #e5483a;
	--cs-accent-dark: #c63a2d;
	--cs-accent-soft: #fde8e4;
	--cs-ok: #1e7d6b;
	--cs-ok-soft: #e1f3ee;
	--cs-warn: #9a5b00;
	--cs-warn-soft: #fff3db;
	--cs-busy: #2f5fb3;
	--cs-busy-soft: #e6eefc;
	--cs-mark: #ffe08a;
	--cs-radius: 16px;
	--cs-radius-sm: 10px;
	--cs-shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px -8px rgba(20, 33, 61, .12);
	--cs-shadow-lg: 0 24px 60px -20px rgba(20, 33, 61, .35);
	--cs-font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--cs-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---------- Base (app template) ---------- */

body.cs-app {
	margin: 0;
	background: var(--cs-paper);
	color: var(--cs-ink);
	font-family: var(--cs-font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.cs-app *, .cs-app *::before, .cs-app *::after { box-sizing: border-box; }
.cs-app img { max-width: 100%; height: auto; }
.cs-app a { color: inherit; }
.cs-app p { margin: 0 0 1em; }
.cs-app h1, .cs-app h2, .cs-app h3, .cs-app h4 { margin: 0 0 .5em; line-height: 1.15; color: var(--cs-ink); }
.cs-app button, .cs-app input, .cs-app select, .cs-app textarea { font: inherit; color: inherit; }
.cs-app :focus-visible { outline: 3px solid rgba(229, 72, 58, .45); outline-offset: 2px; border-radius: 6px; }
.cs-app .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.cs-skip { position: absolute; left: -999px; top: 8px; background: var(--cs-ink); color: #fff !important; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.cs-skip:focus { left: 8px; }

.cs-main { min-height: 60vh; }

/* ---------- Layout ---------- */

.cs-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.cs-wrap--narrow { max-width: 760px; }
.cs-wrap--form { max-width: 480px; }

.cs-section { padding: 88px 0; }
.cs-section--first { padding-top: 48px; }
.cs-section--tint { background: var(--cs-tint); }
.cs-section__head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.cs-section--first .cs-section__head { margin-bottom: 36px; }

/* ---------- Typography ---------- */

.cs-display, .cs-h1, .cs-h2, .cs-h3 { font-family: var(--cs-serif); font-weight: 600; letter-spacing: -.015em; }
.cs-display { font-size: clamp(2.5rem, 5.5vw, 4.1rem); line-height: 1.04; margin-bottom: 20px; font-weight: 600; }
.cs-h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.cs-h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.cs-h3 { font-size: 1.3rem; }
.cs-lede { font-size: 1.15rem; color: var(--cs-muted); max-width: 40em; }
.cs-section__head .cs-lede { margin: 0 auto; }
.cs-muted { color: var(--cs-muted); }
.cs-muted-light { color: rgba(255, 255, 255, .6); }
.cs-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--cs-accent); margin-bottom: 14px;
}
.cs-optional { font-style: normal; font-weight: 400; color: var(--cs-muted); font-size: .85em; }
.cs-fineprint { text-align: center; color: var(--cs-muted); font-size: .9rem; margin-top: 24px; }
.cs-fineprint--left { text-align: left; margin: 16px 0 0; }

/* ---------- Header ---------- */

.cs-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(251, 248, 243, .86);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--cs-line);
}
.admin-bar .cs-header { top: 32px; }
.cs-header__inner { max-width: 1140px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.cs-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--cs-serif); font-weight: 700; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1; }
.cs-logo__mark { width: 34px; height: 34px; flex: none; display: block; transition: transform .2s ease; }
.cs-logo:hover .cs-logo__mark { transform: rotate(-6deg); }

.cs-nav { display: flex; align-items: center; gap: 6px; }
.cs-nav > a:not(.cs-btn) { text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; color: var(--cs-ink-2); }
.cs-nav > a:not(.cs-btn):hover { background: var(--cs-tint); }
.cs-nav > a[aria-current="page"] { color: var(--cs-accent); }
.cs-nav .cs-btn { margin-left: 8px; }

.cs-menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.cs-menu-toggle span[aria-hidden] { display: block; width: 22px; height: 2px; background: var(--cs-ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 800px) {
	.cs-menu-toggle { display: block; }
	.cs-nav {
		position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 2px;
		background: var(--cs-paper); border-bottom: 1px solid var(--cs-line);
		padding: 10px 20px 20px; display: none;
	}
	.cs-nav-open .cs-nav { display: flex; }
	.cs-nav > a:not(.cs-btn) { padding: 12px; }
	.cs-nav .cs-btn { margin: 10px 0 0; }
	.cs-nav-open .cs-menu-toggle span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
	.cs-nav-open .cs-menu-toggle span:nth-of-type(3) { opacity: 0; }
	.cs-nav-open .cs-menu-toggle span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Footer ---------- */

.cs-footer { border-top: 1px solid var(--cs-line); padding: 32px 0; color: var(--cs-muted); font-size: .92rem; }
.cs-footer__inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.cs-footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.cs-footer__brand .cs-logo__mark { width: 24px; height: 24px; }
.cs-footer__links { display: flex; gap: 20px; }
.cs-footer__links a { text-decoration: none; }
.cs-footer__links a:hover { color: var(--cs-ink); }

/* ---------- Buttons ---------- */

.cs-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
	font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none !important;
	cursor: pointer; transition: transform .12s ease, background .15s, box-shadow .15s, border-color .15s;
	white-space: nowrap;
}
.cs-btn:hover { transform: translateY(-1px); }
.cs-btn:active { transform: translateY(0); }
.cs-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cs-btn--sm { padding: 8px 16px; font-size: .92rem; }
.cs-btn--lg { padding: 15px 28px; font-size: 1.06rem; }
.cs-btn--block { width: 100%; }

.cs-btn--primary, .cs-btn--record { background: var(--cs-accent); color: #fff !important; box-shadow: 0 6px 18px -6px rgba(229, 72, 58, .6); }
.cs-btn--primary:hover, .cs-btn--record:hover { background: var(--cs-accent-dark); }
.cs-btn--dark { background: var(--cs-ink); color: #fff !important; }
.cs-btn--dark:hover { background: var(--cs-ink-2); }
.cs-btn--ghost { background: transparent; border-color: var(--cs-line); color: var(--cs-ink) !important; }
.cs-btn--ghost:hover { border-color: var(--cs-ink); background: var(--cs-surface); }
.cs-btn--light { background: rgba(255, 255, 255, .12); color: #fff !important; border-color: rgba(255, 255, 255, .25); }
.cs-btn--light:hover { background: rgba(255, 255, 255, .2); }
.cs-btn--danger { background: transparent; color: var(--cs-accent-dark) !important; border-color: #f2c4bd; }
.cs-btn--danger:hover { background: var(--cs-accent-soft); }

.cs-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.cs-btn--record .cs-dot, .cs-btn--primary .cs-dot { background: #fff; }
.cs-eyebrow .cs-dot { background: var(--cs-accent); animation: cs-blink 1.6s ease-in-out infinite; }
.cs-square { width: 11px; height: 11px; border-radius: 2px; background: #fff; display: inline-block; }

.cs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.cs-actions--center { justify-content: center; }

@keyframes cs-blink { 50% { opacity: .25; } }

/* ---------- Cards, badges, alerts ---------- */

.cs-card { background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: var(--cs-radius); padding: 32px; box-shadow: var(--cs-shadow); }
.cs-card--dark { background: var(--cs-ink); color: #fff; border-color: var(--cs-ink); box-shadow: var(--cs-shadow-lg); }

.cs-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.cs-badge--ok { background: var(--cs-ok-soft); color: var(--cs-ok); }
.cs-badge--busy { background: var(--cs-busy-soft); color: var(--cs-busy); }
.cs-badge--warn { background: var(--cs-warn-soft); color: var(--cs-warn); }
.cs-badge--muted { background: var(--cs-tint); color: var(--cs-muted); }
.cs-badge--accent { background: var(--cs-accent); color: #fff; }
.cs-pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: cs-blink 1.2s infinite; }

.cs-chip { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--cs-tint); font-size: .8rem; font-weight: 600; color: var(--cs-ink-2); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cs-alert { padding: 14px 18px; border-radius: var(--cs-radius-sm); margin: 0 0 20px; font-size: .96rem; border: 1px solid transparent; }
.cs-alert--error { background: var(--cs-accent-soft); color: #8a2018; border-color: #f6cbc4; }
.cs-alert--ok { background: var(--cs-ok-soft); color: #145446; border-color: #bfe3d8; }
.cs-alert--info { background: var(--cs-busy-soft); color: #1d3f7a; border-color: #cbdaf6; }
.cs-alert--warn { background: var(--cs-warn-soft); color: #6d4100; border-color: #f4dca7; }
.cs-alert .cs-btn { margin-left: 8px; }
.cs-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ---------- Hero ---------- */

.cs-hero { padding: 72px 0 96px; position: relative; overflow: hidden; }
.cs-hero::before {
	content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
	background: radial-gradient(closest-side, rgba(229, 72, 58, .14), transparent);
	pointer-events: none;
}
.cs-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; position: relative; }
.cs-hero__meta { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--cs-muted); font-size: .95rem; }
.cs-hero__meta li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.cs-hero__meta svg { width: 18px; height: 18px; color: var(--cs-ok); flex: none; }

.cs-mock {
	background: var(--cs-ink); color: #fff; border-radius: 24px; padding: 26px;
	box-shadow: var(--cs-shadow-lg); transform: rotate(1.5deg);
}
.cs-mock__top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.cs-mock__live { display: inline-flex; align-items: center; gap: 8px; color: #ff8a7a; font-size: .85rem; letter-spacing: .1em; }
.cs-mock__live .cs-dot { background: #ff6b57; animation: cs-blink 1.2s infinite; }
.cs-mock__time { font-variant-numeric: tabular-nums; font-size: 1.05rem; opacity: .9; }
.cs-mock__title { margin: 14px 0 8px; opacity: .7; font-size: .92rem; }
.cs-wave { display: flex; align-items: center; gap: 4px; height: 90px; margin: 6px 0 18px; }
.cs-wave span {
	flex: 1; height: var(--h); border-radius: 4px; background: linear-gradient(#ff8a7a, #e5483a);
	animation: cs-wave 1.1s ease-in-out infinite alternate; animation-delay: var(--d);
	transform-origin: center;
}
@keyframes cs-wave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.cs-mock__notes { background: #fff; color: var(--cs-ink); border-radius: 14px; padding: 16px 18px; font-size: .9rem; transform: rotate(-2deg) translateX(-24px); box-shadow: var(--cs-shadow); }
.cs-mock__notes p { margin: 0 0 6px; }
.cs-mock__notes p:last-child { margin: 0; }
.cs-mock__label { font-family: var(--cs-serif); font-weight: 600; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
	.cs-wave span, .cs-dot, .cs-pulse { animation: none !important; }
}

@media (max-width: 900px) {
	.cs-hero { padding: 40px 0 64px; }
	.cs-hero__grid { grid-template-columns: 1fr; gap: 40px; }
	.cs-mock { transform: none; max-width: 460px; }
	.cs-mock__notes { transform: none; }
}

/* ---------- Steps & features ---------- */

.cs-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cs-step { background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: var(--cs-radius); padding: 28px; }
.cs-step h3 { font-family: var(--cs-serif); font-size: 1.3rem; }
.cs-step p { color: var(--cs-muted); margin: 0; }
.cs-step__num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cs-accent-soft); color: var(--cs-accent-dark); font-weight: 700; margin-bottom: 18px; font-family: var(--cs-serif); font-size: 1.2rem; }

.cs-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.cs-feature h3 { font-size: 1.12rem; font-family: var(--cs-font); font-weight: 700; margin: 14px 0 6px; }
.cs-feature p { color: var(--cs-muted); margin: 0; }
.cs-feature__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--cs-surface); border: 1px solid var(--cs-line); color: var(--cs-accent); }

@media (max-width: 860px) {
	.cs-steps, .cs-features { grid-template-columns: 1fr; }
	.cs-section { padding: 64px 0; }
}
@media (min-width: 600px) and (max-width: 860px) {
	.cs-features { grid-template-columns: 1fr 1fr; }
}

/* ---------- Pricing ---------- */

.cs-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 24px; }
.cs-plan { background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; box-shadow: var(--cs-shadow); }
.cs-plan--featured { border: 2px solid var(--cs-ink); box-shadow: var(--cs-shadow-lg); }
.cs-plan__head { display: flex; justify-content: space-between; align-items: center; }
.cs-plan__name { font-family: var(--cs-font); font-size: 1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cs-muted); margin: 0; }
.cs-plan__price { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 4px; }
.cs-plan__price strong { font-family: var(--cs-serif); font-size: 3.2rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.cs-plan__price span { color: var(--cs-muted); }
.cs-plan__note { color: var(--cs-muted); font-size: .95rem; }
.cs-plan__trial { color: var(--cs-ok); font-weight: 600; font-size: .95rem; margin-top: -6px; }
.cs-plan__cta { margin-top: auto; padding-top: 12px; }
.cs-plan__cta form { margin: 0; }

.cs-checklist { list-style: none; margin: 8px 0 24px; padding: 0; }
.cs-checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.cs-checklist svg { color: var(--cs-ok); flex: none; width: 20px; height: 20px; margin-top: 3px; }

@media (max-width: 720px) {
	.cs-plans { grid-template-columns: 1fr; }
	.cs-plan--featured { order: -1; }
}

/* ---------- FAQ & CTA ---------- */

.cs-faq__item { border-bottom: 1px solid var(--cs-line); padding: 6px 0; }
.cs-faq__item summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font-weight: 600; font-size: 1.08rem; position: relative; }
.cs-faq__item summary::-webkit-details-marker { display: none; }
.cs-faq__item summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--cs-accent); transition: transform .2s; }
.cs-faq__item[open] summary::after { transform: rotate(45deg); }
.cs-faq__item p { color: var(--cs-muted); padding-right: 40px; }

.cs-cta { background: var(--cs-ink); color: #fff; border-radius: 28px; padding: 64px 32px; text-align: center; position: relative; overflow: hidden; }
.cs-cta::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(229, 72, 58, .35); filter: blur(30px); }
.cs-cta .cs-h2 { color: #fff; max-width: 640px; margin: 0 auto 28px; position: relative; z-index: 1; }
.cs-cta .cs-btn { position: relative; z-index: 1; }

/* ---------- Forms ---------- */

.cs-form { margin: 0; }
.cs-field { display: block; margin-bottom: 18px; }
.cs-field > span { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.cs-field__row { display: flex !important; justify-content: space-between; }
.cs-field__row a { font-weight: 500; color: var(--cs-accent-dark); text-decoration: none; }
.cs-field small { display: block; color: var(--cs-muted); margin-top: 6px; font-size: .85rem; }
.cs-app input[type="text"], .cs-app input[type="email"], .cs-app input[type="password"], .cs-app input[type="search"], .cs-app select, .cs-app textarea {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--cs-line); border-radius: var(--cs-radius-sm);
	background: var(--cs-surface); font-size: 1rem; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.cs-app select { width: auto; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2314213d' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.cs-app input:focus, .cs-app select:focus, .cs-app textarea:focus { outline: none; border-color: var(--cs-ink); box-shadow: 0 0 0 4px rgba(20, 33, 61, .08); }
.cs-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 22px; font-size: .94rem; cursor: pointer; }
.cs-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--cs-accent); flex: none; }
.cs-hp { position: absolute !important; left: -9999px; }

.cs-auth { padding: 40px; }
.cs-auth .cs-h2 { margin-bottom: 6px; }
.cs-auth > .cs-muted, .cs-auth__plan { margin-bottom: 26px; }
.cs-auth__plan { display: inline-block; background: var(--cs-tint); padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.cs-auth__plan a { color: var(--cs-accent-dark); }
.cs-auth__switch { text-align: center; margin: 22px 0 0; color: var(--cs-muted); }
.cs-auth__switch a { color: var(--cs-accent-dark); font-weight: 600; }

@media (max-width: 520px) {
	.cs-card, .cs-auth { padding: 24px 20px; }
}

/* ---------- Gate ---------- */

.cs-gate { text-align: center; padding: 48px 32px; margin-top: 48px; margin-bottom: 48px; }
.cs-section--first.cs-wrap { padding-top: 0; }
.cs-gate__icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--cs-accent-soft); color: var(--cs-accent-dark); margin-bottom: 18px; }
.cs-gate__icon svg { width: 28px; height: 28px; }

/* ---------- Recorder ---------- */

.cs-recorder .cs-rec-live, .cs-recorder .cs-rec-finishing { display: none; }
.cs-recorder[data-state="live"] .cs-rec-setup, .cs-recorder[data-state="finishing"] .cs-rec-setup { display: none; }
.cs-recorder[data-state="live"] .cs-rec-live { display: block; }
.cs-recorder[data-state="finishing"] .cs-rec-finishing { display: block; text-align: center; padding: 56px 32px; }

.cs-rec-setup .cs-h2 { margin-bottom: 6px; }
.cs-rec-form { margin-top: 24px; }
.cs-tips { margin: 26px 0 0; padding: 20px 0 0 18px; border-top: 1px solid var(--cs-line); color: var(--cs-muted); font-size: .92rem; }
.cs-tips li { margin: 6px 0; }

.cs-rec-live { padding: 32px; text-align: center; }
.cs-rec-live__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; text-align: left; }
.cs-rec-indicator { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; color: #ff8a7a; }
.cs-rec-indicator .cs-dot { width: 12px; height: 12px; background: #ff6b57; box-shadow: 0 0 0 0 rgba(255, 107, 87, .6); animation: cs-ring 1.6s infinite; }
.is-paused .cs-rec-indicator { color: rgba(255, 255, 255, .7); }
.is-paused .cs-rec-indicator .cs-dot { background: rgba(255, 255, 255, .6); animation: none; }
@keyframes cs-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 87, .6); } 70% { box-shadow: 0 0 0 12px rgba(255, 107, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 87, 0); } }

.cs-rec-upload { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.cs-rec-upload.is-ok { color: #8ee0c9; }
.cs-rec-upload.is-offline { color: #ffd27a; }
.cs-rec-title { margin: 28px 0 0; color: rgba(255, 255, 255, .72); font-size: 1.05rem; min-height: 1.4em; }
.cs-rec-timer { font-family: var(--cs-serif); font-size: clamp(3.4rem, 12vw, 5.6rem); font-weight: 500; line-height: 1; margin: 10px 0 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: #fff; }
.is-paused .cs-rec-timer { opacity: .5; }
.cs-rec-meter { width: 100%; height: 110px; display: block; }
.cs-rec-limit { min-height: 1.2em; margin: 10px 0 0; font-size: .9rem; }
.cs-rec-controls { display: flex; justify-content: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.cs-rec-controls .cs-btn { min-width: 150px; padding: 15px 26px; }
.cs-rec-warn { margin: 22px 0 0; text-align: left; }

.cs-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--cs-tint); border-top-color: var(--cs-accent); margin: 0 auto 20px; animation: cs-spin .9s linear infinite; }
@keyframes cs-spin { to { transform: rotate(360deg); } }

/* ---------- Dashboard ---------- */

.cs-dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.cs-dash-head .cs-eyebrow { margin-bottom: 4px; }
.cs-dash-head .cs-h1 { margin: 0; }
.cs-dash-tools { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.cs-search { position: relative; flex: 1 1 280px; display: block; }
.cs-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cs-muted); width: 20px; height: 20px; pointer-events: none; }
.cs-app .cs-search input { padding-left: 44px; }

.cs-rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cs-rec-card {
	display: flex; flex-direction: column; background: var(--cs-surface); border: 1px solid var(--cs-line);
	border-radius: var(--cs-radius); padding: 22px; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cs-rec-card:hover { border-color: var(--cs-ink); box-shadow: var(--cs-shadow); transform: translateY(-2px); }
.cs-rec-card__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.cs-rec-card__title { font-family: var(--cs-serif); font-size: 1.22rem; font-weight: 600; margin: 0 0 4px; }
.cs-rec-card__meta { color: var(--cs-muted); font-size: .88rem; margin: 0; }
.cs-rec-card__excerpt { color: var(--cs-muted); font-size: .92rem; margin: 12px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cs-dash-more { text-align: center; margin-top: 24px; }

.cs-empty { text-align: center; padding: 64px 24px; border: 2px dashed var(--cs-line); border-radius: var(--cs-radius); }
.cs-empty__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--cs-accent-soft); margin-bottom: 16px; }
.cs-empty__icon .cs-dot { width: 18px; height: 18px; background: var(--cs-accent); }
.cs-empty-search { text-align: center; color: var(--cs-muted); padding: 40px 0; }

.cs-skeleton { height: 150px; border-radius: var(--cs-radius); background: linear-gradient(90deg, var(--cs-tint), #f8f4ec, var(--cs-tint)); background-size: 200% 100%; animation: cs-shimmer 1.3s infinite; margin-bottom: 16px; }
.cs-skeleton--tall { height: 420px; }
@keyframes cs-shimmer { to { background-position: -200% 0; } }

/* Detail */
.cs-back { background: none; border: 0; padding: 6px 0; margin-bottom: 18px; color: var(--cs-muted); font-weight: 600; cursor: pointer; }
.cs-back:hover { color: var(--cs-ink); }
.cs-detail-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.cs-detail-head__main { flex: 1 1 420px; min-width: 0; }
.cs-app input.cs-detail-title, .cs-app input.cs-detail-course { border: 1.5px solid transparent; background: transparent; padding: 4px 8px; margin-left: -8px; border-radius: 8px; }
.cs-app input.cs-detail-title:hover, .cs-app input.cs-detail-course:hover { border-color: var(--cs-line); }
.cs-app input.cs-detail-title:focus, .cs-app input.cs-detail-course:focus { background: var(--cs-surface); }
.cs-app input.cs-detail-title { font-family: var(--cs-serif); font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.cs-app input.cs-detail-course { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cs-accent); width: auto; max-width: 100%; }
.cs-detail-meta { color: var(--cs-muted); margin: 6px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }

.cs-progress { background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: var(--cs-radius); padding: 18px 20px; margin-bottom: 20px; }
.cs-progress p { margin: 0 0 12px; font-weight: 500; }
.cs-meter { height: 10px; border-radius: 999px; background: var(--cs-tint); overflow: hidden; margin-bottom: 10px; }
.cs-meter span { display: block; height: 100%; background: var(--cs-accent); border-radius: 999px; transition: width .6s ease; }
.cs-meter--busy span { background-image: linear-gradient(90deg, var(--cs-accent), #ff8a7a, var(--cs-accent)); background-size: 200% 100%; animation: cs-shimmer 1.4s linear infinite; }

.cs-player { margin-bottom: 26px; }
.cs-player audio { width: 100%; height: 48px; }
.cs-parts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cs-part { border: 1px solid var(--cs-line); background: var(--cs-surface); border-radius: 999px; padding: 4px 12px; font-size: .85rem; cursor: pointer; }
.cs-part.is-active { background: var(--cs-ink); color: #fff; border-color: var(--cs-ink); }

.cs-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--cs-line); margin-bottom: 26px; overflow-x: auto; }
.cs-tab { background: none; border: 0; padding: 12px 16px; font-weight: 600; color: var(--cs-muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cs-tab:hover { color: var(--cs-ink); }
.cs-tab.is-active { color: var(--cs-ink); border-bottom-color: var(--cs-accent); }
.cs-panel__empty { padding: 32px 0; }

.cs-prose { max-width: 760px; font-size: 1.04rem; }
.cs-prose h2, .cs-prose h3, .cs-prose h4 { font-family: var(--cs-serif); margin: 1.6em 0 .5em; }
.cs-prose h2 { font-size: 1.55rem; padding-top: .6em; border-top: 1px solid var(--cs-line); }
.cs-prose > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.cs-prose h3 { font-size: 1.22rem; }
.cs-prose h4 { font-size: 1.06rem; font-family: var(--cs-font); }
.cs-prose ul, .cs-prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.cs-prose li { margin: .35em 0; }
.cs-prose code { background: var(--cs-tint); padding: 1px 6px; border-radius: 5px; font-size: .9em; }

.cs-transcript-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.cs-transcript-tools .cs-search { max-width: 420px; }
.cs-find__count { color: var(--cs-muted); font-size: .9rem; }
.cs-transcript { max-width: 760px; font-size: 1.02rem; line-height: 1.75; }
.cs-transcript p { margin: 0 0 1.1em; }
.cs-transcript mark { background: var(--cs-mark); color: inherit; padding: 0 2px; border-radius: 3px; }

.cs-mynotes { max-width: 760px; }
.cs-app .cs-mynotes__text { min-height: 320px; line-height: 1.65; resize: vertical; }
.cs-mynotes__status { color: var(--cs-muted); font-size: .88rem; margin-top: 8px; min-height: 1.3em; }

/* ---------- Account ---------- */

.cs-account-card { margin-top: 22px; }
.cs-account-card__row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cs-account-card__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.cs-account-card__actions form { margin: 0; }
.cs-plan-line { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 4px; }
.cs-account-card .cs-alert { margin: 12px 0 0; }

/* ---------- WordPress bits ---------- */

.cs-app .cs-main > p:empty { display: none; }

/* ---------- Study tools: summary, keywords, quiz, paraphrase ---------- */

.cs-tabs { scrollbar-width: none; }
.cs-tabs::-webkit-scrollbar { display: none; }
.cs-panel__intro { margin-bottom: 20px; }
.cs-progress__hint { margin: 8px 0 0 !important; font-weight: 400 !important; font-size: .9rem; }

/* Summary */
.cs-summary { max-width: 780px; }
.cs-summary__text p { font-size: 1.12rem; line-height: 1.75; margin-bottom: 1em; }
.cs-summary__text p:first-child::first-letter { font-family: var(--cs-serif); font-weight: 600; font-size: 3.1em; float: left; line-height: .9; margin: 6px 10px 0 0; color: var(--cs-accent); }
.cs-takeaways { background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: var(--cs-radius); padding: 22px 24px; margin: 24px 0; }
.cs-takeaways h3 { font-family: var(--cs-font); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cs-muted); margin-bottom: 12px; }
.cs-takeaways ul { list-style: none; margin: 0; padding: 0; }
.cs-takeaways li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--cs-tint); }
.cs-takeaways li:first-child { border-top: 0; }
.cs-takeaways svg { color: var(--cs-ok); flex: none; margin-top: 4px; }
.cs-summary__next { display: flex; gap: 10px; flex-wrap: wrap; }

/* Keywords */
.cs-kw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cs-kw { background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: var(--cs-radius-sm); padding: 18px 18px 14px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.cs-kw::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cs-accent); opacity: .85; }
.cs-kw__term { font-family: var(--cs-serif); font-size: 1.15rem; margin: 0 0 6px; }
.cs-kw__def { color: var(--cs-muted); font-size: .95rem; margin: 0 0 12px; flex: 1; }
.cs-app .cs-kw__find { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--cs-accent-dark); font-weight: 600; font-size: .88rem; cursor: pointer; }
.cs-kw__find:hover { text-decoration: underline; }

/* Quiz */
.cs-quiz { max-width: 780px; }
.cs-quiz__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cs-quiz__head p { margin: 0; }
.cs-quiz__score { font-weight: 700; color: var(--cs-ink); font-variant-numeric: tabular-nums; }
.cs-q { background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: var(--cs-radius); padding: 22px; margin-bottom: 16px; transition: border-color .2s; }
.cs-q.is-right { border-color: #9fd6c5; }
.cs-q.is-wrong { border-color: #f2c4bd; }
.cs-q__num { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cs-muted); margin: 0 0 6px; }
.cs-q__text { font-family: var(--cs-font); font-size: 1.1rem; font-weight: 600; line-height: 1.45; margin: 0 0 16px; }
.cs-q__opts { display: grid; gap: 8px; }
.cs-q__opt {
	display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
	background: var(--cs-paper); border: 1.5px solid var(--cs-line); border-radius: var(--cs-radius-sm);
	padding: 11px 14px; cursor: pointer; font-size: 1rem; line-height: 1.45; transition: border-color .15s, background .15s;
}
.cs-q__opt:hover:not(:disabled) { border-color: var(--cs-ink); background: var(--cs-surface); }
.cs-q__opt:disabled { cursor: default; }
.cs-q__letter { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--cs-surface); border: 1px solid var(--cs-line); font-weight: 700; font-size: .82rem; }
.cs-q__opt.is-correct { border-color: var(--cs-ok); background: var(--cs-ok-soft); }
.cs-q__opt.is-correct .cs-q__letter { background: var(--cs-ok); border-color: var(--cs-ok); color: #fff; }
.cs-q__opt.is-chosen-wrong { border-color: var(--cs-accent); background: var(--cs-accent-soft); }
.cs-q__opt.is-chosen-wrong .cs-q__letter { background: var(--cs-accent); border-color: var(--cs-accent); color: #fff; }
.cs-q__opt:disabled:not(.is-correct):not(.is-chosen-wrong) { opacity: .6; }
.cs-q__feedback { margin-top: 14px; padding: 12px 14px; border-radius: var(--cs-radius-sm); background: var(--cs-tint); font-size: .95rem; }
.is-right .cs-q__feedback strong { color: var(--cs-ok); }
.is-wrong .cs-q__feedback strong { color: var(--cs-accent-dark); }
.cs-quiz__result { display: flex; gap: 22px; align-items: center; background: var(--cs-ink); color: #fff; border-radius: var(--cs-radius); padding: 24px; margin-top: 8px; }
.cs-quiz__result h3 { color: #fff; font-family: var(--cs-serif); font-size: 1.4rem; margin-bottom: 4px; }
.cs-quiz__result .cs-muted { color: rgba(255, 255, 255, .72); }
.cs-quiz__result .cs-btn--dark { background: #fff; color: var(--cs-ink) !important; }
.cs-quiz__ring {
	--pct: 0; flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
	background: conic-gradient(#ff8a7a calc(var(--pct) * 1%), rgba(255, 255, 255, .14) 0);
}
.cs-quiz__ring span { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--cs-ink); font-weight: 700; font-size: 1.1rem; }
@media (max-width: 520px) {
	.cs-q { padding: 18px 16px; }
	.cs-quiz__result { flex-direction: column; text-align: center; }
}

/* Paraphrase */
.cs-para-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 780px; margin-bottom: 16px; }
.cs-para-style {
	display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
	background: var(--cs-surface); border: 1.5px solid var(--cs-line); border-radius: var(--cs-radius-sm); padding: 12px 14px;
	transition: border-color .15s, box-shadow .15s;
}
.cs-para-style strong { font-size: 1rem; }
.cs-para-style span { color: var(--cs-muted); font-size: .85rem; }
.cs-para-style:hover { border-color: var(--cs-ink); }
.cs-para-style.is-active { border-color: var(--cs-accent); box-shadow: 0 0 0 3px rgba(229, 72, 58, .15); }
.cs-para-actions { margin-bottom: 22px; }
.cs-para-result { max-width: 780px; border-top: 1px solid var(--cs-line); padding-top: 20px; }
.cs-para-result__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cs-para-result__tools { display: flex; gap: 8px; }
.cs-para-text { line-height: 1.75; }
@media (max-width: 600px) {
	.cs-para-styles { grid-template-columns: 1fr; }
}

/* Make the hidden attribute always win over display rules. */
.cs-app [hidden] { display: none !important; }
.cs-progress__stalled { margin: 14px 0 0; }
