/**
 * RuntimeBuzz site styles - Markdown typography and custom overrides.
 * Most layout and component styling is handled by Tailwind CSS.
 * Palette: light surfaces + teal/mint accents (matches RTBuzz logo).
 */

/* CSS Variables for color consistency */
:root {
  --ed-bg: #f4fbfb;
  --ed-surface: #ffffff;
  --ed-text: #0f172a;
  --ed-muted: #64748b;
  --ed-accent: #14b8a6;
  --ed-accent-hover: #0d9488;
  --ed-accent-light: #2dd4bf;
  --ed-accent-soft: #ccfbf1;
  --ed-border: #e2e8f0;
  --chrome-bg: #ffffff;
  --chrome-bg-subtle: #f0fdfa;
  --chrome-bg-muted: #f8fafc;
  --chrome-border: #e2e8f0;
  --chrome-text: #0f172a;
  --chrome-text-muted: #64748b;
  /* Legacy aliases used by embed + brand-navy utilities */
  --header-bg: var(--chrome-bg);
  --header-bg-mid: var(--chrome-bg-subtle);
  --header-text: var(--chrome-text);
  --header-muted: var(--chrome-text-muted);
}

.text-accent {
  color: var(--ed-accent);
  font-weight: 600;
}

.text-accent:hover {
  color: var(--ed-accent-hover);
}

/* Site chrome + brand utilities (fallback when Tailwind CDN misses custom tokens) */
.site-header {
  background-color: var(--chrome-bg);
  color: var(--chrome-text);
  border-bottom: 1px solid var(--chrome-border);
}

.site-footer {
  background-color: var(--chrome-bg-muted);
  color: var(--chrome-text-muted);
  border-top: 1px solid var(--chrome-border);
}

.bg-brand-navy {
  background-color: var(--chrome-bg);
}

.bg-brand-navy-mid {
  background-color: var(--chrome-bg-subtle);
}

.recent-ticker {
  --recent-ticker-duration: 105s;
  background-color: var(--chrome-bg-subtle);
  border-top: 1px solid var(--chrome-border);
}

.bg-brand-50 {
  background-color: var(--ed-bg);
}

.bg-brand-100 {
  background-color: var(--ed-accent-soft);
}

.bg-brand-500 {
  background-color: var(--ed-accent);
}

.bg-brand-600 {
  background-color: var(--ed-accent-hover);
}

.text-brand-200 {
  color: #99f6e4;
}

.text-brand-300 {
  color: #5eead4;
}

.text-brand-400 {
  color: #2dd4bf;
}

.text-brand-500 {
  color: var(--ed-accent);
}

.text-brand-600 {
  color: var(--ed-accent-hover);
}

.text-brand-800 {
  color: #115e59;
}

.border-brand-500 {
  border-color: var(--ed-accent);
}

.border-brand-800\/60 {
  border-color: rgb(17 94 89 / 0.6);
}

.ring-brand-400,
.focus\:ring-brand-400:focus {
  --tw-ring-color: #2dd4bf;
}

.focus\:border-brand-400:focus {
  border-color: #2dd4bf;
}

.hover\:bg-brand-50:hover {
  background-color: var(--ed-bg);
}

.hover\:bg-brand-100:hover {
  background-color: var(--ed-accent-soft);
}

.hover\:bg-brand-400:hover {
  background-color: #2dd4bf;
}

.hover\:bg-brand-600:hover {
  background-color: var(--ed-accent-hover);
}

.hover\:text-brand-300:hover {
  color: #5eead4;
}

.hover\:text-brand-500:hover {
  color: var(--ed-accent);
}

.hover\:text-brand-600:hover {
  color: var(--ed-accent-hover);
}

.group:hover .group-hover\:text-brand-500 {
  color: var(--ed-accent);
}

.group:hover .group-hover\:bg-brand-100 {
  background-color: var(--ed-accent-soft);
}

/* Hero overlay: white copy on image gradients */
.hero-overlay {
  color: #f8fafc;
}

.hero-overlay a {
  color: #fff;
  font-weight: 600;
}

.hero-overlay a:hover {
  color: #ccfbf1;
}

.hero-overlay .text-accent {
  color: #fff;
}

.hero-overlay .text-accent:hover {
  color: #ccfbf1;
}

/* Base styles - minimal reset */
* {
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

html,
body {
  background-color: var(--ed-bg);
  color: var(--ed-text);
}

/* Blog post content typography (for .prose compatibility) */
.blog-post-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.blog-post-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.blog-post-content h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  font-weight: 400;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.blog-post-content h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.25rem 0 0.375rem;
}

.blog-post-content p {
  margin: 0 0 1rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.blog-post-content li {
  margin: 0.5rem 0;
}

.blog-post-content pre {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  background: #ecfdf9;
  border-left: 4px solid var(--ed-accent);
  border-radius: 0 0.375rem 0.375rem 0;
}

.blog-post-content :not(pre) > code {
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: #ecfdf9;
  border-radius: 0.25rem;
}

.blog-post-content a {
  color: var(--ed-accent);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.blog-post-content a:hover {
  text-decoration: underline;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
  border-radius: 0.5rem;
}

.blog-post-content blockquote {
  font-style: italic;
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--ed-accent);
  color: #64748b;
  background: #f8fafc;
  border-radius: 0 0.375rem 0.375rem 0;
}

.blog-post-content strong {
  font-weight: 700;
  color: var(--ed-text);
}

.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95em;
}

.blog-post-content caption {
  caption-side: top;
  text-align: left;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--ed-text);
  margin-bottom: 0.5rem;
}

.blog-post-content th,
.blog-post-content td {
  border: 1px solid var(--ed-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.blog-post-content thead th {
  background: #f8fafc;
  font-weight: 700;
}

.blog-post-content tbody th[scope='row'] {
  font-weight: 600;
  background: #fafafa;
  min-width: 7.5rem;
}

/* Article Section Styling - for Takeaway and News sections */
.article-takeaway,
.article-news {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--ed-accent);
  background: #f8fafc;
  border-radius: 0 0.5rem 0.5rem 0;
}

.article-takeaway {
  background: #f0fdfa;
  border-left-color: #14b8a6;
}

.article-takeaway h2,
.article-news h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid;
  display: inline-block;
}

.article-takeaway h2 {
  color: #0d9488;
  border-bottom-color: #14b8a6;
}

.article-news h2 {
  color: #0891b2;
  border-bottom-color: #22d3ee;
}

.article-news {
  background: #ecfeff;
  border-left-color: #22d3ee;
}

.article-takeaway ul {
  margin: 0;
  padding-left: 1.25rem;
}

.article-takeaway li {
  margin: 0.75rem 0;
  line-height: 1.6;
}

.article-takeaway li strong {
  color: #0f766e;
}

.article-news p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

/* Brave editorial pipeline: external Sources list (inserted before Original Press Release) */
.blog-post-content .article-sources {
  max-width: 100%;
}

.blog-post-content .article-sources__link {
  color: #0d9488;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-post-content .article-sources__link:hover {
  color: #0f766e;
}

/* Legacy: Industry Relevance Box - kept for backward compatibility */
.industry-relevance-box {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--ed-accent);
  background: #f8fafc;
  border-radius: 0 0.5rem 0.5rem 0;
}

.industry-relevance-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ed-accent);
  display: inline-block;
}

.industry-relevance-box p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  color: #334155;
}

.industry-relevance-box p + p {
  margin-top: 1rem;
}

/* Line clamp utility for consistent truncation */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
  background: rgba(45, 212, 191, 0.28);
  color: inherit;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ed-accent);
  outline-offset: 2px;
}

/* Remove default button styles while keeping accessibility */
button {
  font-family: inherit;
}

/* Legacy image placeholder - used in some edge cases */
.article-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.875rem;
  background: #f1f5f9;
}

/* Recent headlines ticker (under main nav; markup from templates/blog-layout.js) */
@keyframes recent-ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.recent-ticker-viewport {
  overflow: hidden;
  width: 100%;
}

.recent-ticker-track {
  display: flex;
  width: max-content;
  animation: recent-ticker-scroll var(--recent-ticker-duration) linear infinite;
  will-change: transform;
}

.recent-ticker:hover .recent-ticker-track {
  animation-play-state: paused;
}

.recent-ticker-segment {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 1.25rem;
}

.recent-ticker-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  max-width: min(22rem, 72vw);
  text-decoration: none;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
}

.recent-ticker-link:hover {
  color: var(--ed-accent-hover);
}

.recent-ticker-section {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--header-muted);
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-ticker-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-ticker-sep {
  color: #94a3b8;
  padding: 0 0.35rem;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .recent-ticker-track {
    animation: none;
    transform: none;
  }

  /* One static row; second copy exists only for seamless loop when motion is allowed */
  .recent-ticker-segment:last-of-type {
    display: none;
  }

  .recent-ticker-viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Capacitor WebView: no site header/footer; respect safe areas under native chrome */
html.bevwire-embed-html {
  /* 100% first: some WebViews treat dvh inconsistently; avoid % max-height on root (bad in some WebViews) */
  min-height: 100%;
}

/* Lock document to the WebView viewport so only .bevwire-embed-main scrolls (ticker stays put) */
.bevwire-embed-app {
  /* Do not rely on Tailwind alone — if utilities load late, inner scroll never gets a bounded height */
  min-height: 100%;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Recent ticker sits directly under native top bar; drop top border (no dark nav above) */
.bevwire-embed-ticker-host {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--header-bg);
}

.bevwire-embed-ticker-host .recent-ticker {
  border-top-width: 0;
  border-bottom: 1px solid var(--chrome-border);
}

.bevwire-embed-main {
  /* auto basis + min-height:0 — avoids flex:1 1 0 collapsing <main> to 0px in some WebViews */
  min-height: 0;
}

.bevwire-embed-share {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  z-index: 40;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--ed-accent);
  border: none;
  box-shadow: 0 4px 14px rgba(6, 24, 32, 0.35);
  cursor: pointer;
}

.bevwire-embed-share:active {
  opacity: 0.9;
}

/* Newsletter prompt (public/newsletter-prompt.js): layout in CSS so it works without Tailwind scanning dynamic DOM */
.bevwire-nl-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(15 23 42 / 0.4);
  padding: 0;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .bevwire-nl-overlay {
    align-items: center;
    padding: 1rem;
  }
}

.bevwire-nl-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  border-radius: 1rem 1rem 0 0;
  background: #fff;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .bevwire-nl-panel {
    border-radius: 1rem;
    padding: 2rem;
  }
}

.bevwire-nl-title {
  font-family: 'Bebas Neue', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ed-text);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.bevwire-nl-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 1.5rem;
}

.bevwire-nl-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .bevwire-nl-actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

.bevwire-nl-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bevwire-nl-btn--primary {
  color: #fff;
  background: var(--ed-accent);
  border-color: var(--ed-accent);
}

.bevwire-nl-btn--primary:hover {
  background: var(--ed-accent-hover);
  border-color: var(--ed-accent-hover);
}

.bevwire-nl-btn--secondary {
  color: #475569;
  background: #fff;
  border-color: #e2e8f0;
}

.bevwire-nl-btn--secondary:hover {
  color: var(--ed-text);
  background: #f0fdfa;
}

/* Motion only when allowed */
@media (prefers-reduced-motion: no-preference) {
  @keyframes bevwire-nl-slide-up {
    from {
      transform: translateY(100%);
      opacity: 0.92;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .bevwire-nl-panel--animate {
    animation: bevwire-nl-slide-up 0.28s ease-out;
  }
}

@media (min-width: 640px) and (prefers-reduced-motion: no-preference) {
  @keyframes bevwire-nl-fade-in {
    from {
      opacity: 0;
      transform: scale(0.98);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  .bevwire-nl-panel--animate {
    animation: bevwire-nl-fade-in 0.22s ease-out;
  }
}

/* Email-gated report lead magnet */
.lead-magnet-preview-block {
  position: relative;
  margin: 0.5rem 0 0;
}

.lead-magnet-preview {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  padding-bottom: 0.25rem;
}

.lead-magnet-preview p:last-child {
  margin-bottom: 2.5rem;
}

/* Keep gate UI out of article prose typography */
.blog-post-content .lead-magnet-wrap input,
.blog-post-content .lead-magnet-wrap button {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.lead-magnet-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5.5rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 72%);
}

.lead-magnet-wrap {
  position: relative;
  margin-top: 1.25rem;
  z-index: 1;
}

.lead-magnet-card {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.lead-magnet-headline {
  font-family: 'Bebas Neue', 'Bebas_Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--ed-text);
  margin: 0 0 1rem;
  line-height: 1.25;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.lead-magnet-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 28rem;
  margin: 0 auto;
  align-items: stretch;
}

@media (min-width: 520px) {
  .lead-magnet-form {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
  }
}

.lead-magnet-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  height: 2.75rem;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0 0.75rem;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--ed-text);
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}

.lead-magnet-input:focus {
  outline: 2px solid var(--ed-accent);
  outline-offset: 1px;
  border-color: var(--ed-accent);
}

.lead-magnet-submit {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 2.75rem;
  margin: 0;
  border: none;
  border-radius: 0.375rem;
  background: var(--ed-accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25;
  padding: 0 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

@media (min-width: 520px) {
  .lead-magnet-submit {
    width: auto;
    min-width: 9.5rem;
  }
}

.lead-magnet-submit:hover:not(:disabled) {
  background: var(--ed-accent-hover);
}

.lead-magnet-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lead-magnet-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.lead-magnet-status {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: #15803d;
}

.lead-magnet-status--error {
  color: #b91c1c;
}

.lead-magnet-disclaimer {
  margin: 0.75rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #94a3b8;
}

.lead-magnet-form--done .lead-magnet-input,
.lead-magnet-form--done .lead-magnet-submit {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Read finder (Fuse.js) — floating wizard */
@keyframes read-finder-fab-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(6, 24, 32, 0.12) inset,
      0 4px 14px rgba(6, 24, 32, 0.28),
      0 12px 28px rgba(6, 24, 32, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(6, 24, 32, 0.16) inset,
      0 4px 18px rgba(6, 24, 32, 0.34),
      0 14px 34px rgba(13, 148, 136, 0.28);
  }
}

.read-finder-root {
  position: relative;
  z-index: 60;
}

.read-finder-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 61;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  max-width: min(20rem, calc(100vw - 2rem));
  padding: 0.8rem 1rem 0.8rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-align: left;
  color: #fff;
  text-shadow: 0 1px 2px rgb(6 24 32 / 0.2);
  background: linear-gradient(165deg, #5eead4 0%, #14b8a6 45%, #0d9488 100%);
  border: 2px solid rgba(204, 251, 241, 0.55);
  border-radius: 0.85rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 4px 14px rgba(20, 184, 166, 0.45),
    0 12px 28px rgba(6, 24, 32, 0.28);
  cursor: pointer;
  animation: read-finder-fab-glow 2.8s ease-in-out infinite;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.read-finder-fab:hover {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px) scale(1.02);
}

.read-finder-fab:active {
  transform: translateY(0) scale(0.99);
}

.read-finder-fab:focus-visible {
  outline: 3px solid #99f6e4;
  outline-offset: 4px;
}

.read-finder-fab-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.read-finder-fab-icon {
  flex-shrink: 0;
  opacity: 0.95;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.read-finder-fab-text {
  display: block;
  flex: 1;
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .read-finder-fab {
    animation: none;
  }
}

.read-finder-layer[hidden] {
  display: none !important;
}

.read-finder-layer:not([hidden]) {
  display: block;
}

.read-finder-backdrop {
  position: fixed;
  inset: 0;
  z-index: 62;
  background: rgba(15, 23, 42, 0.35);
}

.read-finder-panel {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: auto;
  top: auto;
  z-index: 63;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(85vh, calc(100dvh - env(safe-area-inset-bottom) - 5rem));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.2);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.read-finder-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.read-finder-panel-title {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ed-text);
  line-height: 1.15;
}

.read-finder-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
}

.read-finder-close:hover {
  color: var(--ed-text);
  background: #f0fdfa;
}

.read-finder-panel-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.read-finder-lead {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.45;
}

.read-finder-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}

.read-finder-hint {
  font-weight: 400;
  color: #94a3b8;
}

.read-finder-textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  resize: vertical;
  min-height: 4.5rem;
  font-family: inherit;
}

.read-finder-textarea:focus {
  outline: none;
  border-color: var(--ed-accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.22);
}

.read-finder-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.read-finder-actions-row {
  flex-direction: column;
}

.read-finder-btn {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  border-radius: 0.5rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.read-finder-btn-primary {
  color: #fff;
  background: var(--ed-accent);
  border-color: var(--ed-accent);
}

.read-finder-btn-primary:hover {
  background: var(--ed-accent-hover);
}

.read-finder-btn-secondary {
  color: var(--ed-text);
  background: #f8fafc;
  border-color: #e2e8f0;
}

.read-finder-btn-secondary:hover {
  background: #f1f5f9;
}

.read-finder-back {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
}

.read-finder-back:hover {
  color: var(--ed-accent);
}

.read-finder-empty {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #64748b;
}

.read-finder-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.read-finder-card {
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

.read-finder-card-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.read-finder-card-title a {
  color: var(--ed-text);
  text-decoration: none;
}

.read-finder-card-title a:hover {
  color: var(--ed-accent);
}

.read-finder-card-meta {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: #64748b;
}

.read-finder-card-excerpt {
  margin: 0;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.4;
}
