/*
Theme Name: Imrah
Theme URI: https://imrah.org
Author: Imrah
Description: A focused original-language Bible study experience for Imrah.
Version: 1.4.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: imrah
*/

:root {
  --ink: #0b211a;
  --deep: #0b211a;
  --on-deep: #ffffff;
  --ink-soft: #17352b;
  --forest: #164b3a;
  --forest-bright: #26775c;
  --sage: #9db4a4;
  --gold: #bd8b52;
  --gold-light: #e4c795;
  --paper: #f7f3ea;
  --paper-deep: #ece5d7;
  --white: #fffefa;
  --muted: #65736c;
  --line: rgba(11, 33, 26, 0.12);
  --shadow: 0 24px 70px rgba(5, 27, 19, 0.13);
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --content: 1180px;
}

html[data-theme="dark"] {
  --ink: #eee9de;
  --ink-soft: #d5ddd7;
  --deep: #07130f;
  --forest: #2f8467;
  --forest-bright: #78c7a4;
  --sage: #6f8d7c;
  --gold: #d5a66d;
  --gold-light: #efd19e;
  --paper: #101713;
  --paper-deep: #17221d;
  --white: #1b2822;
  --muted: #a8b5ae;
  --line: rgba(238, 233, 222, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  margin: 0;
  overflow-x: hidden;
}

body.admin-bar .site-header { top: 32px; }
a { color: inherit; }
img { height: auto; max-width: 100%; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}
.screen-reader-text:focus {
  background: white;
  clip: auto;
  clip-path: none;
  height: auto;
  left: 1rem;
  padding: 1rem;
  top: 1rem;
  width: auto;
  z-index: 9999;
}

.site-shell { margin: 0 auto; max-width: var(--content); padding-inline: 28px; }
.site-header {
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  z-index: 100;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(7, 30, 22, 0.06); }
.header-inner { align-items: center; display: flex; justify-content: space-between; min-height: 82px; }
.brand { align-items: center; display: inline-flex; gap: 12px; text-decoration: none; }
.brand-mark {
  align-items: center;
  background: var(--deep);
  border-radius: 50%;
  color: var(--gold-light);
  display: inline-flex;
  font-family: var(--serif);
  font-size: 25px;
  height: 44px;
  justify-content: center;
  width: 44px;
}
.brand-name { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: 0.06em; }
.brand-sub { color: var(--muted); display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.nav-menu { align-items: center; display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { font-size: 14px; font-weight: 650; text-decoration: none; }
.nav-menu a:hover { color: var(--forest-bright); }
.nav-cta { background: var(--deep); border-radius: 999px; color: var(--on-deep) !important; padding: 12px 19px; }
.menu-toggle { background: none; border: 0; cursor: pointer; display: none; padding: 8px; }
.menu-toggle span { background: var(--ink); display: block; height: 2px; margin: 5px; width: 24px; }

.eyebrow { color: var(--forest-bright); font-size: 12px; font-weight: 850; letter-spacing: 0.2em; text-transform: uppercase; }
.hero {
  background:
    radial-gradient(circle at 82% 30%, rgba(189, 139, 82, 0.18), transparent 24%),
    linear-gradient(145deg, var(--paper) 0%, #f3ecdf 100%);
  min-height: 700px;
  overflow: hidden;
  padding: 85px 0 100px;
  position: relative;
}
.hero::after {
  color: rgba(22, 75, 58, 0.035);
  content: "אמת";
  font-family: "SBL Hebrew", var(--serif);
  font-size: min(42vw, 580px);
  font-weight: 700;
  line-height: 0.75;
  position: absolute;
  right: -4vw;
  top: 12%;
}
.hero-grid { align-items: center; display: grid; gap: 70px; grid-template-columns: 1.05fr 0.95fr; position: relative; z-index: 1; }
.hero h1 { font-family: var(--serif); font-size: clamp(55px, 7vw, 96px); font-weight: 500; letter-spacing: -0.055em; line-height: 0.93; margin: 22px 0 28px; max-width: 740px; }
.hero h1 em { color: var(--forest-bright); font-style: italic; }
.hero-copy { color: var(--muted); font-family: var(--serif); font-size: 21px; line-height: 1.6; max-width: 610px; }
.button-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.button { border: 1px solid var(--ink); border-radius: 999px; display: inline-flex; font-size: 14px; font-weight: 750; justify-content: center; padding: 15px 23px; text-decoration: none; transition: 150ms ease; }
.button-primary { background: var(--deep); color: var(--on-deep); }
.button-primary:hover { background: var(--forest); transform: translateY(-2px); }
.button-secondary:hover { background: var(--white); transform: translateY(-2px); }
.hero-proof { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 12px; gap: 17px; margin-top: 26px; }
.hero-proof span::before { color: var(--gold); content: "◆"; font-size: 8px; margin-right: 7px; }

.ask-hero { min-height: 680px; padding: 105px 0 105px; }
.ask-hero::after { right: 1vw; top: 14%; }
.ask-hero-inner { position: relative; text-align: center; z-index: 1; }
.ask-hero .eyebrow { margin-bottom: 22px; }
.ask-hero h1 { margin: 0 auto 28px; max-width: 920px; }
.ask-hero .hero-copy { margin: 0 auto; max-width: 760px; }
.imrah-ask-form {
  align-items: center;
  background: rgba(255, 254, 250, 0.95);
  border: 1px solid rgba(11, 33, 26, 0.14);
  border-radius: 999px;
  box-shadow: 0 24px 70px rgba(5, 27, 19, 0.14);
  display: flex;
  gap: 10px;
  margin: 42px auto 0;
  max-width: 850px;
  padding: 9px 10px 9px 27px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.imrah-ask-form:focus-within { border-color: var(--forest-bright); box-shadow: 0 26px 76px rgba(5, 27, 19, 0.18); }
.imrah-ask-form input {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  font-family: var(--serif);
  font-size: 19px;
  min-width: 0;
  outline: 0;
  padding: 13px 0;
}
.imrah-ask-form input::placeholder { color: #748079; opacity: 1; }
.imrah-ask-form input::-webkit-search-cancel-button { display: none; }
.imrah-ask-form button {
  align-items: center;
  background: var(--deep);
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 13px;
  justify-content: center;
  min-width: 128px;
  padding: 17px 22px;
  transition: background 150ms ease, transform 150ms ease;
}
.imrah-ask-form button:hover { background: var(--forest); transform: translateY(-1px); }
.imrah-ask-form button:disabled { cursor: wait; opacity: 0.68; }
.ask-examples { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px auto 0; }
.ask-examples > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; margin-right: 3px; text-transform: uppercase; }
.ask-examples button {
  background: rgba(255, 254, 250, 0.65);
  border: 1px solid rgba(22, 75, 58, 0.2);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 13px;
  padding: 8px 13px;
  transition: 150ms ease;
}
.ask-examples button:hover { background: var(--white); border-color: var(--gold); transform: translateY(-1px); }
.ask-grounding { color: var(--muted); font-size: 11px; margin: 19px 0 0; }
.ask-grounding span { color: var(--gold); font-size: 8px; margin-right: 6px; }
.ask-status { color: var(--forest); font-family: var(--serif); font-size: 16px; min-height: 24px; padding-top: 24px; }
.ask-results {
  background: rgba(255, 254, 250, 0.94);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin: 24px auto 0;
  max-width: 920px;
  padding: 30px;
  text-align: left;
}
.ask-results-head { align-items: end; border-bottom: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; padding: 0 2px 22px; }
.ask-results-head h2 { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; margin: 7px 0 0; }
.ask-clear { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; padding: 7px; text-decoration: underline; }
.ask-clear:hover { color: var(--forest); }
.ask-result-list { display: grid; }
.ask-result-card { border-bottom: 1px solid var(--line); padding: 23px 2px; }
.ask-result-card:last-child { border-bottom: 0; }
.ask-result-card h3 { color: var(--forest-bright); font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0 0 8px; }
.ask-result-card p { color: var(--ink-soft); font-family: var(--serif); font-size: 17px; line-height: 1.65; margin: 0; }
.ask-result-link { color: var(--forest); display: inline-flex; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; margin-top: 11px; text-decoration: none; text-transform: uppercase; }
.ask-result-link:hover { color: var(--gold); }
.ask-source-note { border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; padding-top: 18px; }
.translation-toggle { align-items: center; display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.translation-toggle > span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; margin-right: 3px; text-transform: uppercase; }
.translation-toggle button { background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 850; padding: 6px 10px; }
.translation-toggle button.is-active { background: var(--deep); border-color: var(--deep); color: var(--on-deep); }

.word-window {
  background: rgba(255, 254, 250, 0.92);
  border: 1px solid rgba(11, 33, 26, 0.1);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 14px;
  position: relative;
  transform: rotate(1.5deg);
}
.word-window::before { border: 1px solid var(--gold-light); border-radius: 24px; content: ""; inset: -13px 17px 13px -17px; position: absolute; z-index: -1; }
.window-bar { align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; font-size: 11px; justify-content: space-between; padding: 10px 12px 17px; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { background: var(--paper-deep); border-radius: 50%; display: block; height: 7px; width: 7px; }
.word-content { padding: 28px; }
.script-word { font-family: Gentium, Georgia, serif; font-size: 68px; line-height: 1; margin: 5px 0 8px; text-align: center; }
.script-translit { color: var(--gold); font-family: var(--serif); font-size: 22px; font-style: italic; text-align: center; }
.word-definition { border-top: 1px solid var(--line); display: grid; gap: 0; margin-top: 26px; }
.definition-row { align-items: baseline; border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 110px 1fr; padding: 13px 2px; }
.definition-row dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.definition-row dd { font-family: var(--serif); font-size: 16px; margin: 0; }
.verified-pill { align-items: center; background: #e8f2ec; border-radius: 999px; color: var(--forest); display: inline-flex; font-size: 10px; font-weight: 800; gap: 6px; margin-top: 19px; padding: 8px 11px; }

.metric-band { background: var(--deep); color: var(--on-deep); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { border-right: 1px solid rgba(255,255,255,0.11); padding: 30px 24px; text-align: center; }
.metric:first-child { border-left: 1px solid rgba(255,255,255,0.11); }
.metric strong { color: var(--gold-light); display: block; font-family: var(--serif); font-size: 32px; font-weight: 500; }
.metric span { color: rgba(255,255,255,0.64); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }

.section { padding: 105px 0; }
.section-kicker { color: var(--forest-bright); font-size: 11px; font-weight: 850; letter-spacing: 0.2em; text-transform: uppercase; }
.section-title { font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; margin: 16px 0 22px; }
.section-lead { color: var(--muted); font-family: var(--serif); font-size: 19px; line-height: 1.65; max-width: 680px; }
.study-section { background: var(--white); }
.study-intro { align-items: end; display: flex; gap: 40px; justify-content: space-between; margin-bottom: 42px; }
.study-intro .section-lead { margin-bottom: 0; max-width: 500px; }
.study-frame { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 14px 26px 28px; }
.study-frame .imrah-interlinear { margin: 0; }

.feature-section { background: var(--paper-deep); }
.feature-head { margin-bottom: 55px; max-width: 700px; }
.feature-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.feature-card { background: var(--white); border: 1px solid rgba(11, 33, 26, 0.08); border-radius: 20px; min-height: 290px; padding: 32px; }
.feature-number { color: var(--gold); font-family: var(--serif); font-size: 14px; }
.feature-card h3 { font-family: var(--serif); font-size: 27px; font-weight: 500; margin: 55px 0 14px; }
.feature-card p { color: var(--muted); font-size: 14px; line-height: 1.75; }

.process-section { background: var(--deep); color: var(--on-deep); }
.process-section .section-kicker { color: var(--gold-light); }
.process-section .section-lead { color: rgba(255,255,255,0.62); }
.process-grid { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); margin-top: 55px; }
.process-step { border-left: 1px solid rgba(255,255,255,0.15); padding: 10px 36px 20px; }
.process-step:last-child { border-right: 1px solid rgba(255,255,255,0.15); }
.process-step b { color: var(--gold-light); font-family: var(--serif); font-size: 44px; font-weight: 400; }
.process-step h3 { font-family: var(--serif); font-size: 25px; font-weight: 500; margin: 25px 0 12px; }
.process-step p { color: rgba(255,255,255,0.58); font-size: 14px; line-height: 1.7; }

.source-strip { align-items: center; display: grid; gap: 60px; grid-template-columns: 0.75fr 1.25fr; }
.source-list { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.source-badge { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 19px; }
.source-badge strong { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 4px; }
.source-badge span { color: var(--muted); font-size: 11px; }

.final-cta { background: linear-gradient(145deg, #d9c49f, #efe4d1); padding: 85px 0; text-align: center; }
.final-cta h2 { font-family: var(--serif); font-size: clamp(42px, 6vw, 72px); font-weight: 500; letter-spacing: -0.04em; margin: 0 auto 20px; max-width: 850px; }
.final-cta p { color: #52625b; font-family: var(--serif); font-size: 19px; margin: 0 auto 30px; max-width: 600px; }

.page-hero { background: var(--deep); color: var(--on-deep); padding: 95px 0 85px; }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero h1 { font-family: var(--serif); font-size: clamp(52px, 7vw, 88px); font-weight: 500; letter-spacing: -0.05em; line-height: 0.98; margin: 18px 0; }
.page-hero p { color: rgba(255,255,255,0.65); font-family: var(--serif); font-size: 20px; line-height: 1.6; max-width: 700px; }
.page-content { font-family: var(--serif); font-size: 19px; line-height: 1.8; max-width: 820px; padding-block: 80px 110px; }
.page-content h2, .page-content h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; }
.page-content h2 { font-size: 42px; margin-top: 60px; }
.page-content a { color: var(--forest-bright); }
.source-record { border-bottom: 1px solid var(--line); padding: 28px 0; }
.source-record h2 { font-size: 27px; margin: 0 0 8px; }
.source-record p { color: var(--muted); font-family: var(--sans); font-size: 14px; margin: 8px 0; }
.source-record .license { color: var(--forest-bright); font-weight: 750; }

.site-footer { background: #071711; color: white; padding: 70px 0 28px; }
.footer-grid { display: grid; gap: 70px; grid-template-columns: 1.4fr 0.6fr 0.6fr; }
.footer-brand p { color: rgba(255,255,255,0.55); font-family: var(--serif); font-size: 17px; line-height: 1.7; max-width: 420px; }
.footer-heading { color: var(--gold-light); font-size: 10px; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; }
.footer-links { display: grid; gap: 12px; margin-top: 20px; }
.footer-links a { color: rgba(255,255,255,0.67); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); display: flex; font-size: 11px; justify-content: space-between; margin-top: 55px; padding-top: 24px; }
.esv-copyright { color: rgba(255,255,255,.38); font-size: 9px; line-height: 1.6; margin: 18px 0 0; max-width: 900px; }
.esv-copyright a { color: rgba(255,255,255,.62); }

.header-actions { align-items: center; display: flex; gap: 8px; margin-left: auto; }
.theme-toggle, .account-toggle {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  gap: 7px;
  justify-content: center;
  min-height: 39px;
  padding: 8px 13px;
}
.theme-toggle { font-size: 17px; min-width: 39px; padding: 7px; }
.theme-toggle:hover, .account-toggle:hover { border-color: var(--gold); }

.verse-open { cursor: pointer; }
.verse-open:hover { color: var(--forest-bright); }
.verse-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 15px; }
.verse-action {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  justify-content: center;
  min-height: 34px;
  min-width: 36px;
  padding: 7px 10px;
  transition: 140ms ease;
}
.verse-action:hover, .verse-action.is-active { background: var(--paper-deep); border-color: var(--gold); transform: translateY(-1px); }
.verse-action.context-action { color: var(--forest-bright); font-size: 11px; font-weight: 850; letter-spacing: 0.07em; margin-left: auto; text-transform: uppercase; }
.saved-library-action { margin-left: auto; }

body.modal-open { overflow: hidden; }
.imrah-modal[hidden] { display: none; }
.imrah-modal { inset: 0; position: fixed; z-index: 10000; }
.imrah-modal-backdrop { backdrop-filter: blur(7px); background: rgba(3, 15, 10, 0.68); inset: 0; position: absolute; }
.imrah-modal-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.42);
  display: flex;
  flex-direction: column;
  left: 50%;
  max-height: min(88vh, 920px);
  max-width: 760px;
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
}
.study-modal-panel { max-width: 880px; }
.modal-head { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 22px 26px; }
.modal-head h2 { font-family: var(--serif); font-size: 29px; font-weight: 500; margin: 5px 0 0; }
.modal-close { background: var(--white); border: 1px solid var(--line); border-radius: 50%; color: var(--ink); cursor: pointer; font-size: 22px; height: 39px; line-height: 1; width: 39px; }
.modal-body { overflow-y: auto; padding: 26px; }
.study-modal-verse { background: var(--white); border-left: 3px solid var(--gold); border-radius: 0 14px 14px 0; font-family: var(--serif); font-size: 21px; line-height: 1.75; margin: 0; padding: 20px 22px; }
.study-modal-verse mark { background: color-mix(in srgb, var(--gold) 42%, transparent); color: inherit; border-radius: .22em; padding: 0 .08em; box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 18%, transparent); }
.study-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.study-modal-actions button, .auth-tabs button, .rabbit-create-form button {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  padding: 10px 14px;
}
.study-modal-actions button:hover, .study-modal-actions button.is-active, .auth-tabs button.is-active { background: var(--deep); color: var(--on-deep); }
.study-modal-status { color: var(--muted); font-family: var(--serif); font-style: italic; min-height: 22px; }
.study-modal-content h3 { font-family: var(--serif); font-size: 25px; font-weight: 500; margin: 22px 0 10px; }
.study-modal-content p { color: var(--ink-soft); line-height: 1.75; }
.original-word-grid { display: grid; gap: 11px; grid-template-columns: 1fr 1fr; }
.original-word-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; padding: 17px; text-align: left; }
.original-word-card:hover, .original-word-card.is-open { border-color: var(--gold); }
.original-script { display: block; font-family: Gentium, Georgia, serif; font-size: 28px; margin-bottom: 4px; }
.word-transliteration { color: var(--gold); font-family: var(--serif); font-size: 15px; font-style: italic; }
.word-english { color: var(--muted); display: block; font-size: 11px; margin-top: 7px; text-transform: uppercase; }
.word-details { border-top: 1px solid var(--line); display: none; font-size: 13px; margin-top: 12px; padding-top: 12px; }
.original-word-card.is-open .word-details { display: block; }
.word-highlight-action { background: transparent; border: 0; color: var(--forest-bright); cursor: pointer; font-size: 11px; font-weight: 800; margin-top: 9px; padding: 0; text-transform: uppercase; }
.context-reader { display: grid; gap: 3px; }
.context-verse { border-radius: 9px; color: var(--ink-soft); font-family: var(--serif); line-height: 1.7; padding: 9px 11px; }
.context-verse.is-focus { background: color-mix(in srgb, var(--gold) 18%, var(--white)); border-left: 3px solid var(--gold); color: var(--ink); }
.verse-number { color: var(--gold); font-family: var(--sans); font-size: 10px; font-weight: 850; margin-right: 7px; vertical-align: super; }
.reference-list { display: grid; gap: 10px; }
.reference-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; padding: 15px 17px; }
.reference-card:hover { border-color: var(--gold); }
.reference-card strong { color: var(--forest-bright); display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 5px; }
.reference-card p { font-family: var(--serif); margin: 0; }
.background-block { background: var(--white); border: 1px solid var(--line); border-radius: 16px; margin-top: 11px; padding: 18px; }
.background-block h3 { margin-top: 0; }
.background-note { color: var(--muted) !important; font-size: 11px; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.imrah-auth-form { display: grid; gap: 14px; }
.imrah-auth-form label { color: var(--muted); display: grid; font-size: 11px; font-weight: 800; gap: 7px; letter-spacing: 0.08em; text-transform: uppercase; }
.imrah-auth-form input, .rabbit-create-form input {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font: 16px var(--sans);
  outline: 0;
  padding: 13px 14px;
}
.imrah-auth-form input:focus, .rabbit-create-form input:focus { border-color: var(--gold); }
.auth-submit { cursor: pointer; width: 100%; }
.auth-message, .rabbit-message { color: var(--forest-bright); min-height: 20px; }
.auth-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.library-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 18px; padding-bottom: 15px; }
.text-action { background: transparent; border: 0; color: var(--forest-bright); cursor: pointer; text-decoration: underline; }
.library-section { margin-bottom: 28px; }
.library-section h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.library-item, .rabbit-choice { align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: 13px; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 8px; padding: 13px 15px; }
.library-item strong, .rabbit-choice strong { font-family: var(--serif); }
.library-item small { color: var(--muted); display: block; margin-top: 4px; }
.library-delete { background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.rabbit-create-form { display: grid; gap: 9px; grid-template-columns: 1fr auto; margin-bottom: 18px; }
.rabbit-choice { cursor: pointer; width: 100%; }
.rabbit-choice:hover { border-color: var(--gold); }

html[data-theme="dark"] .hero { background: radial-gradient(circle at 82% 30%, rgba(213,166,109,.13), transparent 24%), linear-gradient(145deg, var(--paper), var(--paper-deep)); }
html[data-theme="dark"] .word-window, html[data-theme="dark"] .imrah-ask-form, html[data-theme="dark"] .ask-results { background: color-mix(in srgb, var(--white) 94%, transparent); }
html[data-theme="dark"] .final-cta { background: linear-gradient(145deg, #263b31, #1b2822); }
html[data-theme="dark"] .final-cta p { color: var(--muted); }
html[data-theme="dark"] .verified-pill { background: #17372a; color: #91d2b4; }

@media (max-width: 920px) {
  .hero-grid, .source-strip { grid-template-columns: 1fr; }
  .hero { padding-top: 55px; }
  .word-window { margin: 10px auto 0; max-width: 600px; transform: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .feature-card h3 { margin-top: 28px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3) { border-left: 1px solid rgba(255,255,255,0.11); }
  .process-grid { grid-template-columns: 1fr; }
  .process-step { border-bottom: 1px solid rgba(255,255,255,0.15); border-right: 0 !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body.admin-bar .site-header { top: 46px; }
  .site-shell { padding-inline: 19px; }
  .header-inner { min-height: 70px; }
  .account-toggle { min-width: 39px; padding: 7px; }
  .account-label { display: none; }
  .menu-toggle { display: block; }
  .site-nav { background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; left: 0; padding: 22px; position: absolute; right: 0; top: 70px; }
  .site-nav.is-open { display: block; }
  .nav-menu { align-items: stretch; flex-direction: column; gap: 10px; }
  .nav-menu a { display: block; padding: 10px; }
  .nav-cta { text-align: center; }
  .hero { min-height: auto; padding: 60px 0 75px; }
  .hero h1 { font-size: clamp(50px, 16vw, 72px); }
  .hero-copy { font-size: 18px; }
  .ask-hero { padding-bottom: 65px; padding-top: 70px; }
  .ask-hero h1 { font-size: clamp(48px, 15vw, 68px); }
  .imrah-ask-form { border-radius: 22px; display: grid; margin-top: 32px; padding: 10px; }
  .imrah-ask-form input { font-size: 17px; padding: 14px 10px 10px; text-align: center; }
  .imrah-ask-form button { width: 100%; }
  .ask-examples { align-items: stretch; flex-direction: column; }
  .ask-examples > span { margin-bottom: 3px; }
  .ask-results { border-radius: 20px; padding: 21px 18px; }
  .ask-results-head { align-items: start; flex-direction: column; gap: 8px; }
  .ask-results-head h2 { font-size: 25px; }
  .ask-clear { padding-left: 0; }
  .ask-result-card p { font-size: 16px; }
  .verse-action.context-action { margin-left: 0; }
  .imrah-modal-panel { border-radius: 20px 20px 0 0; bottom: 0; left: 0; max-height: 92vh; top: auto; transform: none; width: 100%; }
  .modal-head, .modal-body { padding: 19px; }
  .study-modal-verse { font-size: 18px; }
  .study-modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .original-word-grid { grid-template-columns: 1fr; }
  .rabbit-create-form { grid-template-columns: 1fr; }
  .word-content { padding: 22px 15px; }
  .script-word { font-size: 55px; }
  .definition-row { grid-template-columns: 90px 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 22px 10px; }
  .metric strong { font-size: 25px; }
  .section { padding: 75px 0; }
  .study-intro { align-items: start; flex-direction: column; }
  .study-frame { border-radius: 18px; padding: 8px 12px 20px; }
  .source-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
