/* Buggins — site.css
   Consistent vertical rhythm: every band is a .section (72px block padding),
   content lives in .wrap (max 1180, 28px inline padding). Alternating .alt
   bands use a slightly raised surface so sections read as distinct. */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 760px; }

.section { padding: 72px 0; }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent), var(--surface); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.025em; margin: 0; }
.section-head p { font-size: 15.5px; color: var(--muted); line-height: 1.6; margin: 12px 0 0; }
.eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--violet); font-weight: 700; }

/* ------------------------------- header ---------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px; background: rgba(10, 11, 18, 0.72);
  backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--border);
}
.site-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.site-brand .brand-text { display: flex; flex-direction: column; line-height: 1; }
.site-brand .wordmark { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.site-brand .tagline { font-size: 10.5px; color: var(--muted); margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 8px; transition: color 0.15s ease, background 0.15s ease; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }

.site-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-user { display: flex; align-items: center; gap: 10px; }
.site-user img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); object-fit: cover; background: var(--surface-3); }
.site-user .email { font-size: 12.5px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Google buttons */
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; font-size: 15px; font-weight: 700; border: none; border-radius: var(--radius-sm); background: #fff; color: #1f2330; cursor: pointer; font-family: var(--font); box-shadow: 0 12px 30px -12px rgba(0,0,0,0.7); }
.gbtn:hover { background: #f1f2f6; }
.gbtn-sm { padding: 9px 14px; font-size: 13.5px; box-shadow: none; }
.btn.ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { display: block; width: 100%; text-align: center; }

/* -------------------------------- hero ----------------------------------- */
.hero { text-align: center; padding-top: 84px; padding-bottom: 64px; }
.hero-ring { width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center; background: var(--accent-grad); box-shadow: 0 18px 50px -16px rgba(var(--violet-rgb), 0.8), inset 0 0 0 1px rgba(255,255,255,0.18); }
.hero h1 { font-size: clamp(46px, 8vw, 88px); font-weight: 900; letter-spacing: -0.04em; line-height: 0.95; margin: 14px 0 0; }
.hero .lede { font-size: clamp(17px, 2.4vw, 22px); color: var(--text); margin: 22px auto 6px; max-width: 640px; line-height: 1.5; }
.hero .lede b { font-weight: 700; }
.hero .sub { font-size: 15px; color: var(--muted); margin: 0 auto 30px; max-width: 540px; line-height: 1.6; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn { padding: 13px 20px; font-size: 14.5px; }

/* ------------------------------ features --------------------------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature .fi { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; font-size: 19px; background: var(--accent-grad-soft); border: 1px solid var(--border); }
.feature h3 { margin: 0 0 7px; font-size: 16px; font-weight: 700; }
.feature p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ------------------------------- steps ----------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.step { position: relative; background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-family: var(--mono); font-weight: 700; color: #fff; background: var(--accent-grad); margin-bottom: 14px; }
.step h3 { margin: 0 0 7px; font-size: 16px; font-weight: 700; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.step p b { color: var(--text); }

/* ------------------------------ pricing ---------------------------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 16px; background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; }
.price-card.popular { border-color: rgba(var(--violet-rgb), 0.55); box-shadow: 0 22px 60px -28px rgba(var(--violet-rgb), 0.75); }
.price-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 12px; border-radius: 999px; color: #fff; background: var(--accent-grad); box-shadow: 0 8px 20px -8px rgba(var(--violet-rgb),0.8); white-space: nowrap; }
.price-name { font-size: 14px; font-weight: 700; letter-spacing: 0.02em; color: var(--violet); }
.price-tag { display: flex; align-items: baseline; gap: 6px; }
.price-tag .amt { font-size: 38px; font-weight: 900; letter-spacing: -0.03em; }
.price-tag .per { font-size: 13px; color: var(--muted); }
.price-blurb { margin: -6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.price-feats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price-feats li { position: relative; padding-left: 26px; font-size: 13.5px; color: var(--text); line-height: 1.45; }
.price-feats li b { font-weight: 700; }
.price-feats li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700; }
.price-note { text-align: center; font-size: 12.5px; color: var(--faint); margin: 26px 0 0; }

/* -------------------------------- docs ----------------------------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.two-col h2 { font-size: clamp(24px, 3.4vw, 31px); font-weight: 800; letter-spacing: -0.02em; margin: 12px 0 0; }
.muted-p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 14px 0 22px; }
.link-row { display: flex; gap: 10px; flex-wrap: wrap; }
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); text-decoration: none; transition: transform 0.12s ease, border-color 0.2s ease; }
.doc-item:hover { transform: translateY(-2px); border-color: rgba(var(--violet-rgb),0.4); }
.doc-item b { font-size: 14.5px; color: var(--text); }
.doc-item span { font-size: 12.5px; color: var(--muted); }

/* -------------------------------- blog ----------------------------------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.blog-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); text-decoration: none; transition: transform 0.12s ease, border-color 0.2s ease; }
.blog-card:hover { transform: translateY(-2px); border-color: rgba(var(--violet-rgb),0.4); }
.blog-tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cyan); background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.28); padding: 3px 9px; border-radius: 999px; }
.blog-card h3 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.blog-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.blog-meta { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-top: 2px; }

/* --------------------------------- faq ----------------------------------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font-size: 14.5px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--violet); font-size: 20px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* --------------------------------- cta ----------------------------------- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.025em; margin: 0; }
.cta .sub { font-size: 15px; color: var(--muted); margin: 12px 0 28px; }
.cta .gbtn { margin: 0 auto; }

/* ------------------------------ dashboard -------------------------------- */
#dash { padding-top: 40px; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.dash-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.dash-head .count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tales-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tale-card { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: transform 0.12s ease, border-color 0.2s ease; }
.tale-card:hover { transform: translateY(-2px); border-color: rgba(var(--violet-rgb),0.4); }
.tale-card .tc-top { display: flex; align-items: center; gap: 8px; }
.tale-card .tc-title { font-size: 15px; font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tale-card .tc-url { font-family: var(--mono); font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tale-card .tc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tale-card .tc-actions { display: flex; gap: 8px; margin-top: 4px; }
.tale-card .tc-actions .btn { flex: 1; text-align: center; padding: 8px; font-size: 12.5px; text-decoration: none; }
.mode-chip { font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.mode-chip.tab { color: var(--info); background: rgba(56,189,248,0.12); border: 1px solid rgba(56,189,248,0.3); }
.mode-chip.screen { color: var(--violet); background: rgba(var(--violet-rgb),0.12); border: 1px solid rgba(var(--violet-rgb),0.3); }
.issue-chip { font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #ffb4c0; background: rgba(251,113,133,0.12); border: 1px solid rgba(251,113,133,0.3); }
.public-chip { font-family: var(--mono); font-size: 10.5px; padding: 2px 8px; border-radius: 999px; color: var(--ok); background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); }
.dash-empty { text-align: center; color: var(--muted); padding: 70px 20px; line-height: 1.6; }

/* ------------------------------- footer ---------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 0; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.footer-about { max-width: 340px; }
.footer-about .site-brand { margin-bottom: 14px; }
.footer-about p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0 0 16px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); transition: color 0.15s ease, border-color 0.2s ease; }
.socials a:hover { color: var(--text); border-color: var(--border-strong); }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 0 0 14px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--muted); text-decoration: none; padding: 5px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--faint); }
.footer-tag { font-style: italic; }

/* -------------------------------- toast ---------------------------------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; }

/* ------------------------------ responsive ------------------------------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-about { grid-column: 1 / -1; max-width: none; }
  .site-user .email { display: none; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Instant tale chip on dashboard */
.mode-chip.instant { background: rgba(var(--violet-rgb),0.16); color: #5eead4; border-color: rgba(var(--violet-rgb),0.34); }
.mode-chip.screenshot { background: rgba(34,197,94,0.16); color: #86efac; border-color: rgba(34,197,94,0.34); }

/* Plan badge (reused in sidebar + settings) */
.plan-badge { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); }
.plan-badge.tier-premium { background: rgba(var(--violet-rgb),0.18); border-color: rgba(var(--violet-rgb),0.4); color: #5eead4; }
.plan-badge.tier-plus { background: linear-gradient(135deg, rgba(var(--indigo-rgb),0.25), rgba(var(--pink-rgb),0.25)); border-color: rgba(var(--pink-rgb),0.4); color: #99f6e4; }

/* ============================ APP SHELL (logged in) ===================== */
body.logged-in .site-header,
body.logged-in .site-footer { display: none; }

.app:not([hidden]) { display: flex; min-height: 100vh; background: var(--bg); }

/* Sidebar */
.side {
  width: 248px; flex: 0 0 248px; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; text-decoration: none; color: var(--text); }
.side-brand .wordmark { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
}
.side-link svg { opacity: 0.8; flex: 0 0 auto; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--accent-grad-soft); color: var(--text); }
.side-link.active svg { opacity: 1; color: var(--violet); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.side-ext { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 8px; border-radius: var(--radius-sm); }
.side-ext:hover { color: var(--text); background: var(--surface-2); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px; }
.side-user img { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); object-fit: cover; flex: 0 0 34px; }
.su-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.su-email { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; flex: 0 0 auto; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 16px 28px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
  background: rgba(10, 11, 18, 0.82); backdrop-filter: blur(10px);
}
.topbar h1 { font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.search { margin-left: auto; display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; width: min(360px, 42vw); color: var(--faint); }
.search:focus-within { border-color: var(--border-strong); }
.search input { background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 13.5px; width: 100%; }
.search input::placeholder { color: var(--faint); }
.side-toggle { display: none; background: transparent; border: 0; color: var(--text); cursor: pointer; padding: 4px; }

.view { padding: 24px 28px 64px; }

/* Tales toolbar + chips */
.tales-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-transform: capitalize; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent-grad); color: #fff; border-color: transparent; }
.tales-toolbar .count { margin-left: auto; color: var(--faint); font-size: 13px; font-family: var(--mono); }

/* Empty / no-results */
.empty-state { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-state h3 { color: var(--text); margin: 16px 0 6px; font-size: 17px; }
.empty-state p { max-width: 400px; margin: 0 auto; font-size: 14px; line-height: 1.6; }
.es-ring { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--accent-grad); box-shadow: 0 8px 30px rgba(var(--violet-rgb), 0.3); }

/* Settings */
.settings-grid { display: flex; flex-direction: column; gap: 18px; max-width: 1040px; }
.set-account-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.set-account-card h3 { width: 100%; margin: 0 0 2px; }
.set-account-card .set-account { flex: 1; min-width: 220px; margin: 0; }
.set-account-card .set-actions { margin: 0; }
.integ-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-top: 14px; }
.integ-grid .integ-row { margin-top: 0; height: 100%; }
@media (max-width: 820px) { .integ-grid { grid-template-columns: 1fr; } }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.set-card h3 { margin: 0 0 14px; font-size: 15px; }
.set-plan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.set-plan-sum { color: var(--muted); font-size: 13px; line-height: 1.5; flex: 1; min-width: 180px; }
.set-feats { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.set-feats li { color: var(--muted); font-size: 13px; padding-left: 21px; position: relative; line-height: 1.45; }
.set-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--violet); font-weight: 700; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.set-account { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.set-account img { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-3); object-fit: cover; flex: 0 0 46px; }
.sa-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sa-meta b { font-size: 14px; }
.sa-meta span { color: var(--muted); font-size: 13px; word-break: break-all; }
.set-note { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0 0 14px; }

/* "Coming soon" tag in pricing */
.soon { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 999px; background: var(--surface-3); color: var(--faint); margin-left: 6px; vertical-align: middle; }

/* Responsive: sidebar becomes a drawer */
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  .app.side-open .side { transform: none; }
  .app.side-open::before { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 30; }
  .side-toggle { display: inline-flex; }
  .topbar { padding: 13px 16px; }
  .topbar h1 { font-size: 17px; }
  .view { padding: 18px 16px 52px; }
  .search { width: auto; flex: 1; min-width: 0; }
}

/* Plan & billing view */
.plan-hero { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; }
.plan-hero-now { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 220px; }
.ph-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; }
.plan-hero .plan-badge { align-self: flex-start; font-size: 14px; padding: 6px 14px; }
.plan-hero .set-plan-sum { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.plan-hero .set-actions { align-self: center; }

.plan-cards.pricing-grid { margin: 0; }
.plan-cards .price-card.current { border-color: var(--ring); background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: 0 18px 50px -30px var(--glow); }
.plan-cards .pc-action { margin: 2px 0 4px; }
.plan-cards .pc-action .btn { width: 100%; }
.plan-cards .pc-action .btn:disabled { opacity: 0.7; cursor: default; }
.cur-badge { background: var(--accent-grad); color: #fff; border: 0; }
.plan-foot { color: var(--faint); font-size: 12.5px; text-align: center; margin-top: 22px; line-height: 1.6; }

@media (max-width: 860px) {
  .plan-hero { padding: 18px; }
}

/* ============================ LANDING ANIMATIONS ======================== */
@media (prefers-reduced-motion: no-preference) {
  @keyframes bgFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  .hero .hero-ring { animation: bgFadeUp 0.7s 0.02s both; }
  .hero .eyebrow { animation: bgFadeUp 0.7s 0.10s both; }
  .hero h1 { animation: bgFadeUp 0.7s 0.18s both; }
  .hero .lede { animation: bgFadeUp 0.7s 0.26s both; }
  .hero .sub { animation: bgFadeUp 0.7s 0.34s both; }
  .hero .hero-cta { animation: bgFadeUp 0.7s 0.42s both; }

  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.in { opacity: 1; transform: none; }
  .reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
  .reveal-stagger.in > * { opacity: 1; transform: none; }
  .reveal-stagger.in > *:nth-child(2) { transition-delay: 0.06s; }
  .reveal-stagger.in > *:nth-child(3) { transition-delay: 0.12s; }
  .reveal-stagger.in > *:nth-child(4) { transition-delay: 0.18s; }
  .reveal-stagger.in > *:nth-child(5) { transition-delay: 0.24s; }
  .reveal-stagger.in > *:nth-child(6) { transition-delay: 0.30s; }

  .feature, .price-card { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
  .feature:hover { transform: translateY(-3px); border-color: var(--ring); }
}

/* ===================== Recording links (Council) ======================= */
.mode-chip.guest { background: rgba(var(--cyan-rgb), 0.16); color: #7dd3fc; }

.links-intro { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.links-intro p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.links-intro b { color: var(--text); }

.link-create { margin-bottom: 24px; }
.link-create .rec-fields { display: flex; flex-direction: column; gap: 13px; margin-bottom: 16px; }
.link-create .rec-field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.link-create .rec-field i { color: var(--faint); font-style: normal; }
.link-create .rec-field input, .link-create .rec-field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font: inherit; font-size: 14px; resize: vertical;
}
.link-create .rec-field input:focus, .link-create .rec-field textarea:focus { outline: none; border-color: var(--ring); }

.link-fresh { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.lf-label { display: block; font-size: 12.5px; color: var(--ok); margin-bottom: 8px; font-weight: 600; }
.lf-row { display: flex; gap: 8px; }
.lf-row input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 13px; }

.links-list-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.links-list-head h3 { margin: 0; font-size: 15px; }
.links-list-head .count { color: var(--faint); font-size: 13px; font-family: var(--mono); }
.links-list { display: flex; flex-direction: column; gap: 10px; }
.link-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; flex-wrap: wrap; }
.link-row.off { opacity: 0.6; }
.lr-main { flex: 1; min-width: 200px; }
.lr-title { font-size: 14px; font-weight: 600; }
.lr-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.lr-url { font-size: 12px; color: var(--faint); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-top: 3px; }
.lr-actions { display: flex; gap: 8px; }
.lr-actions .btn { padding: 7px 12px; font-size: 12.5px; }

@media (max-width: 620px) { .lr-actions { width: 100%; } .lr-actions .btn { flex: 1; } }

/* Integrations */
.integ-row { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-top: 14px; }
.integ-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.integ-name { font-weight: 700; font-size: 14px; }
.integ-status { font-size: 12px; color: var(--faint); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.integ-status.on { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.integ-row .rec-fields { display: flex; flex-direction: column; gap: 11px; margin-bottom: 14px; }
.integ-row .rec-field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.integ-row .rec-field i { color: var(--faint); font-style: normal; }
.integ-row .rec-field input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; color: var(--text); font: inherit; font-size: 13.5px; }
.integ-row .rec-field input:focus { outline: none; border-color: var(--ring); }

/* Issue badge on tale cards */
.issue-chip2 { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong); }
.issue-chip2.open { color: #86efac; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.issue-chip2.closed { color: var(--faint); }

/* Display typeface (Space Grotesk) for headings + wordmark */
h1, h2, h3, .hero h1, .wordmark, .brand-text, .gradient-text, .section-title, .plan-hero h2 { font-family: var(--font-display); }

/* ============================ Privacy modal ============================ */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 11, 15, 0.66); backdrop-filter: blur(6px); animation: modalIn 0.18s ease; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { position: relative; width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; padding: 28px 28px 24px; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.85); animation: modalCardIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes modalCardIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.modal-x:hover { color: var(--text); border-color: var(--border-strong); }
.modal-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-grad-soft); color: var(--cyan); border: 1px solid rgba(var(--violet-rgb), 0.3); margin-bottom: 14px; }
.modal-card h2 { font-family: var(--font-display); font-size: 21px; margin: 0 0 7px; letter-spacing: -0.01em; }
.modal-lede { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.privacy-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.privacy-list li { position: relative; padding-left: 26px; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.privacy-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-grad-soft); border: 1px solid rgba(var(--violet-rgb), 0.45); }
.privacy-list li::after { content: ""; position: absolute; left: 5px; top: 7px; width: 6px; height: 3.5px; border-left: 1.6px solid var(--cyan); border-bottom: 1.6px solid var(--cyan); transform: rotate(-45deg); }
.privacy-list b { color: var(--text); font-weight: 700; }
.modal-note { font-size: 12.5px; color: var(--faint); line-height: 1.55; margin: 0; padding-top: 16px; border-top: 1px solid var(--border); }
