/* ============================================================
   Hanuman Chalisa Lyrics — Global Stylesheet
   Design system: DESIGN.md (Google Blog / blog.google)
   Utilitarian clarity, high contrast, information first.
   ============================================================ */

:root {
  /* Colors */
  --accent: #1a73e8;
  --accent-hover: #1557b0;
  --accent-light: #e8f0fe;
  --accent-dark: #174ea6;
  --saffron: #d3820b;
  --saffron-light: #fdf3e3;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8f9fa;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-muted: #80868b;
  --border: #dadce0;
  --border-light: #e8eaed;
  --success: #188038;
  --error: #c5221f;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.08);
  --shadow-md: 0 2px 8px rgba(60, 64, 67, 0.12);
  --shadow-lg: 0 4px 16px rgba(60, 64, 67, 0.15);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s ease;
  --transition-slow: 0.6s ease;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-dev: "Noto Sans Devanagari", "Mangal", "Nirmala UI", "Lohit Devanagari", var(--font-family);
  --font-size-base: 15px;
  --line-height-base: 1.8;

  /* Layout */
  --container-max: 1120px;
  --navbar-height: 64px;
}

/* ---------- Base reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--navbar-height) + 16px);
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
}

/* ---------- Container / layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-sm {
  padding: 32px 0;
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  color: var(--text-primary);
}

h1 {
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
}

h2 {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin-bottom: var(--space-md);
}

.lead {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.dev {
  font-family: var(--font-dev);
}

.verse-text {
  font-family: var(--font-dev);
  font-size: 17px;
  line-height: 2.1;
}

.small,
.muted {
  font-size: 13px;
  color: var(--text-muted);
}

.center {
  text-align: center;
}

.om-symbol {
  color: var(--saffron);
  font-family: var(--font-dev);
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

/* ---------- Focus styles ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-md);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: baseline;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.3px;
}

.logo:hover {
  text-decoration: none;
}

.logo-scanning {
  color: var(--text-primary);
}

.logo-job {
  color: var(--accent);
}

.logo-tag {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.btn-secondary {
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #137333;
  color: white;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  padding: 64px 24px 72px;
}

.hero-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.10), rgba(211, 130, 11, 0.04) 55%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 780px;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-lg);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-inner:has(.hero-figure) {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-figure {
  position: relative;
  margin: 0;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.hero-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-saffron {
  background: var(--saffron-light);
  color: var(--saffron);
}

.badge-neutral {
  background: white;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  padding: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--border);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* ---------- Byline / Author ---------- */
.byline {
  padding: 14px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.byline-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.byline img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.byline a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.byline a:hover {
  text-decoration: underline;
}

.byline-sep {
  color: var(--text-muted);
}

.author-role {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 0;
}

.author-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin: 8px 0 28px;
}

.author-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.author-card-hero img {
  width: 140px;
  height: 140px;
}

.author-card-body {
  min-width: 0;
}

.author-card-body p:first-of-type {
  margin-top: 4px;
}

@media (max-width: 600px) {
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-highlight {
  border-left: 3px solid var(--accent);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Quick answer ---------- */
.quick-answer {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: var(--space-xl);
}

.quick-answer .qa-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.quick-answer p {
  margin: 0;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-alt);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-primary);
}

tr:nth-child(even) td {
  background: var(--surface-alt);
}

/* ---------- Detail grid ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: var(--space-lg);
}

.detail-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.detail-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Check list ---------- */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--space-lg);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e6f4ea;
  border: 1px solid var(--success);
  border-radius: 50%;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

.check-icon svg {
  pointer-events: none;
}

/* ---------- Benefits grid ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: var(--space-lg);
}

.benefit-item {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
}

.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 50%;
  color: var(--accent);
  margin-bottom: 16px;
}

.benefit-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.benefit-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Verse cards (lyrics) ---------- */
.verses {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.verse-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.verse-card .verse-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-light);
  border-radius: var(--radius-full);
}

.verse-card .verse-dev {
  font-family: var(--font-dev);
  font-size: 17px;
  line-height: 2.1;
  margin-bottom: 6px;
}

.verse-card .verse-roman {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.verse-card .verse-meaning {
  font-size: 14px;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
}

.verse-card.verse-doha {
  background: var(--saffron-light);
  border-color: var(--saffron);
}

.verse-hr {
  margin: var(--space-2xl) 0 var(--space-lg);
  border: 0;
  border-top: 1px dashed var(--border);
}

/* ---------- FAQ ---------- */
.faq-list {
  border-top: 1px solid var(--border-light);
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-toggle {
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item[open] .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 0 20px 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ---------- TOC ---------- */
.toc {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: var(--space-xl);
}

.toc-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc ol {
  list-style: decimal;
  list-style-position: inside;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 24px;
}

.toc a {
  font-size: 14px;
  color: var(--text-secondary);
}

.toc a:hover {
  color: var(--accent);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--text-primary);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ---------- Copy button ---------- */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.copy-btn.copied {
  background: #e6f4ea;
  color: var(--success);
  border-color: var(--success);
}

/* ---------- Callout ---------- */
.callout {
  background: var(--saffron-light);
  border: 1px solid var(--saffron);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: var(--space-lg);
  font-size: 14px;
}

.callout-info {
  background: var(--accent-light);
  border-color: var(--accent);
}

.callout-warn {
  background: #fce8e6;
  border-color: var(--error);
}

/* ---------- Steps ---------- */
.steps {
  margin: var(--space-lg) 0 var(--space-xl);
}

.step {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.step:last-child {
  border-bottom: none;
}

.step h2 {
  font-size: 19px;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.step p {
  margin: 0;
  color: var(--text-secondary);
}

/* ---------- Pronunciation sections ---------- */
.pron-section {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: var(--space-md);
}

.pron-section ul,
.pron-section li {
  list-style: disc;
  list-style-position: inside;
  margin-bottom: 6px;
}

/* ---------- Print text block (PDF page) ---------- */
.print-h {
  font-family: var(--font-dev);
  font-size: 22px;
  text-align: center;
  margin-bottom: 16px;
}

.print-verse {
  margin-bottom: 14px;
  font-family: var(--font-dev);
  font-size: 15px;
  line-height: 1.9;
}

.print-verse .small {
  font-family: var(--font-family);
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.print-foot {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ---------- Try/simple table ---------- */
.try-table {
  margin-bottom: var(--space-lg);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border-light);
  padding: 56px 0 40px;
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-heading {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Floating CTA ---------- */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  padding: 12px 16px;
  gap: 8px;
  z-index: 90;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-hover);
}

@media (max-width: 768px) {
  .floating-cta {
    display: flex;
  }

  .back-to-top {
    right: 16px;
    bottom: calc(76px + 12px);
  }

  body {
    padding-bottom: 76px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .navbar-inner nav {
    margin-left: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    padding: 40px 24px 48px;
  }

  .hero-inner:has(.hero-figure) {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }
}

/* ---------- Verse search ---------- */
.verse-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}

.verse-search {
  max-width: 420px;
  width: 100%;
}

.verse-search-count {
  font-size: 13px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* ---------- Listen (TTS) button ---------- */
.verse-card {
  position: relative;
}

.listen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.listen-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.listen-btn.speaking {
  background: var(--saffron);
  border-color: var(--saffron);
  color: #fff;
}

.listen-btn.no-voice {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: dashed;
}

/* ---------- Japa counter ---------- */
.japa {
  margin: var(--space-xl) 0;
}

.japa-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  max-width: 520px;
}

.japa-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.japa-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.japa-count {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.japa-target-counter {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.japa-progress {
  height: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 18px;
}

.japa-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width var(--transition-normal);
}

.japa-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.japa-tap {
  min-width: 120px;
}

.japa-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.japa-target-select {
  padding: 6px 8px;
  font-family: var(--font-family);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
}

.japa-malas {
  font-weight: 600;
  color: var(--accent-dark);
}

.japa-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.japa-msg {
  display: none;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #e6f4ea;
  color: var(--success);
  font-size: 14px;
  font-weight: 600;
}

.japa-msg.show {
  display: block;
  animation: japa-pop var(--transition-fast);
}

@keyframes japa-pop {
  from { transform: translateY(-4px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .navbar,
  .mobile-menu-btn,
  .floating-cta,
  .back-to-top,
  .copy-btn,
  .breadcrumbs,
  .hero,
  .footer,
  .quick-answer,
  .callout,
  .toc,
  .hero-glow,
  .verse-search-wrap,
  .listen-btn,
  .japa,
  .byline {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }

  .section {
    padding: 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card,
  .verse-card,
  .pron-section,
  .step,
  .print-verse {
    box-shadow: none;
    break-inside: avoid;
  }

  h1,
  h2 {
    break-after: avoid;
  }

  a {
    color: var(--text-primary);
    text-decoration: underline;
  }
}