/* Bahr design tokens and shared functional layout. */
:root {
  --color-ivory: #F5F1E8;
  --color-sand: #E5DCCC;
  --color-charcoal: #262923;
  --color-olive: #626D53;
  --color-gold: #B49A65;
  --color-brick-red: #831402;
  --font-body: system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-ivory);
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--color-charcoal); color: var(--color-ivory); border-bottom: 2px solid var(--color-gold); }
.nav { max-width: 1200px; margin: auto; padding: 1rem 1.5rem; display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.brand { color:var(--color-ivory); text-decoration:none; display:grid; gap:.1rem; }
.brand-name { font: 700 1.9rem/1.1 var(--font-heading); }
.brand small { font-size:.72rem; color:var(--color-sand); }
.nav-actions,.actions,.heading { display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; }
.heading { justify-content:space-between; }
.module-nav { max-width:1200px; margin:auto; padding:0 1.5rem; display:flex; flex-wrap:wrap; gap:.25rem; }
.module-nav a { padding:.65rem .7rem; color:var(--color-ivory); text-decoration:none; border-bottom:3px solid transparent; font-size:.9rem; }
.module-nav a.active { background:var(--color-brick-red); border-bottom-color:var(--color-gold); }
.module-nav a:hover { text-decoration:underline; }
main { max-width:1200px; margin:auto; padding:1.5rem; }
h1,h2,h3 { line-height:1.25; font-family:var(--font-heading); }
h1 { font-size:2rem; } h3 { margin-top:0; }
[lang=ar] h1,[lang=ar] h2,[lang=ar] h3 { font-family:var(--font-body); }
a { color:var(--color-brick-red); }
button,.button { background:var(--color-brick-red); color:white; border:1px solid transparent; border-radius:5px; padding:.6rem 1rem; font:inherit; cursor:pointer; text-decoration:none; display:inline-block; }
.secondary { background:var(--color-sand); color:var(--color-charcoal); }
.danger { background:transparent; color:var(--color-brick-red); border-color:var(--color-brick-red); }
button:disabled { opacity:.6; cursor:default; }
.panel { background:#fffdf7; border:1px solid var(--color-sand); border-radius:8px; padding:1.2rem; }
.login { max-width:420px; margin:3rem auto; }
.stack { display:grid; gap:1rem; } .form { max-width:760px; }
label { display:grid; gap:.35rem; font-weight:600; }
input,select,textarea { font:inherit; width:100%; border:1px solid #9a9c8c; border-radius:5px; background:#fffdf7; padding:.55rem; color:inherit; }
textarea { min-height:100px; } input[type=checkbox] { width:auto; accent-color:var(--color-brick-red); }
.check { display:flex; align-items:center; gap:.6rem; font-weight:400; }
.filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:1rem; align-items:end; }
.wide { grid-column:1/-1; } .cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:1rem; }
.muted { color:var(--color-olive); } .edition { margin-block:1rem; }
.metrics { display:flex; gap:1.2rem; flex-wrap:wrap; padding:.8rem; background:var(--color-sand); border-radius:6px; margin-bottom:1rem; }
.table-wrap { overflow-x:auto; } table { border-collapse:collapse; width:100%; }
th,td { padding:.65rem; border-bottom:1px solid var(--color-sand); text-align:start; vertical-align:top; }
th { background:var(--color-sand); }
.notice { background:#e5ebdf; padding:.8rem; border-radius:5px; border-inline-start:3px solid var(--color-olive); }
.notice.error { background:#f8e5df; color:var(--color-brick-red); border-color:var(--color-brick-red); }
fieldset { border:1px solid #9a9c8c; border-radius:5px; } fieldset label { margin:.5rem 0; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid var(--color-olive); outline-offset:2px; }
header a:focus-visible,header button:focus-visible { outline-color:var(--color-gold); }
.inline-form { display:flex; align-items:center; gap:.35rem; } .inline-form input,.qty { width:5.5rem; }
@media (max-width:640px) { main,.nav,.module-nav { padding-inline:.8rem; } .panel { padding:.8rem; } h1 { font-size:1.6rem; } }
/* Reporting layout. */
.report-kicker { margin-bottom:0; font-size:.85rem; }
.report-kicker + h1 { margin-top:.3rem; }
.report-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); gap:1rem; }
.stat { display:grid; gap:.4rem; border-top:3px solid var(--color-gold); }
.stat strong { font:700 1.8rem/1.2 var(--font-heading); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.report-section { margin-block:1.2rem; }
.report-section h2 { margin-top:0; }
.report-filters .wide { margin:0; font-size:.85rem; }
.report-bar { margin-block:1rem; }
.bar-track { height:12px; background:var(--color-sand); border-radius:6px; overflow:hidden; margin-top:.4rem; }
.bar-fill { height:100%; background:var(--color-olive); border-radius:6px; }

/* Editorial identity and responsive workspace. */
:root { --surface: #fffdf8; --border: #d4cbb9; --ocean-deep: #132d37; --radius: 18px; }
body { min-height:100vh; display:flex; flex-direction:column; }
header { background:var(--color-ivory); color:var(--color-charcoal); border-bottom:1px solid var(--border); }
.nav { padding-block:1.15rem; max-width:1440px; }
.brand { grid-template-columns:auto 1fr; align-items:center; column-gap:.75rem; color:var(--color-charcoal); }
.brand-mark { width:43px; height:43px; grid-row:1/3; color:var(--color-olive); }
.brand-name { font-size:2rem; font-weight:400; letter-spacing:-.045em; }
.brand small { color:var(--color-olive); font-size:.7rem; text-transform:uppercase; letter-spacing:.07em; }
.nav-actions { font-size:.85rem; color:var(--color-olive); }
.module-nav { max-width:1440px; gap:.2rem; padding-block:.35rem; border-top:1px solid var(--border); }
.module-nav a { color:var(--color-charcoal); border:0; border-radius:7px; padding:.55rem .75rem; }
.module-nav a.active { color:#fff; background:var(--color-brick-red); }
.module-nav a:hover:not(.active) { background:var(--color-sand); text-decoration:none; }
main { width:100%; flex:1; max-width:1440px; padding:clamp(1rem,3vw,2.6rem) clamp(1rem,3vw,3rem); }
main:focus { outline:none; }
.site-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:1rem; padding:1.4rem clamp(1rem,4vw,3rem); border-top:1px solid var(--border); color:var(--color-olive); font-size:.84rem; }
.skip-link { position:absolute; inset-inline-start:1rem; top:-6rem; z-index:10; padding:.8rem 1rem; background:var(--color-charcoal); color:white; }
.skip-link:focus { top:1rem; }
h1,h2,h3 { font-weight:500; letter-spacing:-.025em; overflow-wrap:anywhere; }
h1 { font-size:clamp(1.8rem,3vw,2.8rem); margin-block:.25rem .8rem; }
h2 { font-size:clamp(1.25rem,2vw,1.65rem); }
[lang=ar] h1,[lang=ar] h2,[lang=ar] h3,[lang=ar] .brand-name { letter-spacing:0; }
.eyebrow { color:var(--color-brick-red); font-size:.75rem; font-weight:700; letter-spacing:.105em; text-transform:uppercase; margin:0 0 .7rem; }
[lang=ar] .eyebrow { letter-spacing:0; }
.panel { border-color:var(--border); border-radius:var(--radius); background:var(--surface); padding:clamp(1rem,2vw,1.5rem); min-width:0; }
button,.button { border-radius:9px; padding:.7rem 1.1rem; font-weight:600; transition:background-color .16s ease,box-shadow .16s ease; }
button:not(.secondary):not(.danger):not(:disabled):hover,.button:not(.secondary):hover { background:#681001; }
.secondary { background:transparent; border:1px solid var(--border); color:var(--color-charcoal); }
.secondary:hover { background:var(--color-sand); }
.danger:hover { background:#f8e5df; }
input,select,textarea { background:var(--surface); border-color:#a69e8e; border-radius:8px; min-width:0; }
input:not([type=checkbox]),select { min-height:44px; }
input[type=checkbox] { width:1.1rem; height:1.1rem; }
label { font-size:.9rem; }
a { text-underline-offset:.2em; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid var(--color-olive); outline-offset:3px; }
header a:focus-visible,header button:focus-visible { outline-color:var(--color-olive); }
.filters { background:var(--color-sand); border-color:var(--border); }
.filters .wide input { font-size:1.05rem; }
.cards { grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr)); }
.catalogue-card,.scholar-card { display:flex; flex-direction:column; align-items:flex-start; gap:.65rem; }
.catalogue-card h3,.scholar-card h2 { margin:0; }
.catalogue-card p,.scholar-card p { margin:0; }
.catalogue-card > a,.scholar-card > a { margin-top:auto; font-weight:600; padding-block:.5rem 0; }
.book-symbol,.scholar-mark { width:64px; height:64px; display:grid; place-items:center; border-radius:14px; background:var(--color-sand); color:var(--color-olive); }
.scholar-mark { font:2rem var(--font-heading); }
.chips { display:flex; flex-wrap:wrap; gap:.4rem; }
.chips span { border:1px solid var(--border); border-radius:99px; padding:.2rem .65rem; font-size:.78rem; color:var(--color-olive); }
th { font-size:.82rem; font-weight:700; background:#eae2d4; }
td { font-size:.9rem; }
tr:last-child td { border-bottom:0; }
.table-wrap { overscroll-behavior-inline:contain; }
.table-wrap:focus-visible { outline:3px solid var(--color-olive); }
.metrics { border:1px solid var(--border); border-radius:10px; }
.stat { border-top:1px solid var(--border); border-inline-start:3px solid var(--color-gold); }
.stat strong { font-size:clamp(1.6rem,2.7vw,2.5rem); font-weight:500; }
.report-section { margin-block:1.4rem; }
.report-section .bar-track { height:14px; }
.notice { margin-block:0 1rem; }
/* Reflective pages: a single local, original ocean illustration. */
.ocean-art { background-color:var(--ocean-deep); background-image:linear-gradient(145deg,rgba(13,33,39,.08),rgba(13,33,39,.2)),url('ocean.webp'); background-size:cover; background-position:center; border-radius:24px; color:var(--color-ivory); overflow:hidden; }
.hero { display:grid; grid-template-columns:1fr 1fr; gap:clamp(1rem,4vw,4.5rem); align-items:center; padding-block:1rem 2rem; }
.hero-copy { padding-block:1.5rem; }
.hero h1 { font-size:clamp(2.6rem,5.1vw,5.4rem); line-height:1.04; max-width:12ch; margin-block:.7rem 1.25rem; }
.hero-description { max-width:43ch; font-size:clamp(1rem,1.5vw,1.2rem); color:var(--color-olive); line-height:1.7; }
.hero-actions { display:flex; gap:1.2rem; flex-wrap:wrap; align-items:center; margin-top:1.6rem; }
.hero-actions .primary { border-radius:999px; padding:.85rem 1.35rem; }
.text-link { color:var(--color-olive); font-weight:600; }
.hero-art { min-height:clamp(340px,44vw,550px); position:relative; display:flex; align-items:flex-end; justify-content:flex-end; padding:2rem; }
.art-mark { font:400 3.6rem/1.3 var(--font-heading); color:#f5f1e8; opacity:.9; }
.home-section { border-top:1px solid var(--color-gold); padding-block:1.4rem 1.7rem; }
.home-section h2 { margin-block:.4rem 1rem; }
.subject-grid,.overview-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:.8rem; }
.subject-card { min-height:155px; display:grid; place-items:center; align-content:center; gap:.45rem; background:var(--color-sand); border:1px solid transparent; padding:1.1rem; border-radius:16px; color:var(--color-charcoal); text-decoration:none; text-align:center; }
.subject-card svg,.subject-card small,.subject-card span { color:var(--color-olive); }
.subject-card strong { font-size:1.35rem; font-weight:500; }
.subject-card:hover { border-color:var(--color-olive); }
.overview-card { display:grid; gap:.5rem; padding:1.4rem; border:1px solid var(--border); border-radius:16px; }
.overview-card strong { font:2.6rem var(--font-heading); color:var(--color-olive); }
.overview-card span { font-size:.92rem; color:var(--color-olive); }
.sign-in-prompt { display:flex; justify-content:space-between; gap:1rem; align-items:center; flex-wrap:wrap; }
.reflection { border-top:1px solid var(--color-gold); text-align:center; padding:clamp(1.5rem,4vw,3rem) clamp(.2rem,4vw,4rem); margin-top:1.5rem; }
.reflection .ayah { font-family:'Traditional Arabic','Noto Naskh Arabic','Times New Roman',serif; font-size:clamp(1.55rem,3vw,2.45rem); line-height:2.1; max-width:38ch; margin:1rem auto; color:var(--color-charcoal); }
.meaning { max-width:70ch; margin:1rem auto .4rem; color:var(--color-olive); line-height:1.8; }
.translation-label { color:var(--color-olive); font-size:.74rem; margin:.4rem 0; }
.verse-reference { font-size:.85rem; color:var(--color-brick-red); }
.auth-layout { display:grid; grid-template-columns:1fr 1fr; min-height:550px; border:1px solid var(--border); border-radius:25px; padding:10px; background:var(--surface); }
.auth-art { display:grid; place-items:center; min-height:340px; }
.auth-art-label { display:grid; text-align:center; gap:.5rem; padding:1rem; text-shadow:0 2px 16px #132d37; }
.auth-art-label span { font:clamp(4rem,8vw,8rem)/1.25 var(--font-heading); }
.auth-art-label small { font:1.3rem var(--font-heading); letter-spacing:.3em; }
.auth-content { align-self:center; width:100%; max-width:460px; margin:auto; padding:clamp(1.5rem,4vw,3.5rem); }
.auth-content .stack { margin-block:1.8rem; }
.auth-content button { min-height:48px; }
.farewell { min-height:460px; display:grid; place-items:center; text-align:center; background-image:linear-gradient(rgba(13,33,39,.45),rgba(13,33,39,.65)),url('ocean.webp'); padding:2rem; }
.farewell .eyebrow,.farewell .light-link { color:var(--color-ivory); }
.farewell h1 { font-size:clamp(2.5rem,6vw,5.5rem); }
.farewell .hero-actions { justify-content:center; }
.farewell a:focus-visible { outline-color:var(--color-gold); }
@media(max-width:760px) { .hero,.auth-layout { grid-template-columns:1fr; gap:1rem; } .hero h1 { max-width:18ch; } .hero-copy { padding-block:1rem 0; } .hero-art { min-height:310px; } .auth-layout { min-height:0; } .auth-art { min-height:210px; } .auth-content { max-width:100%; } .module-nav { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; } .module-nav a { white-space:nowrap; flex-shrink:0; } .nav-actions { gap:.5rem; } .nav-actions > span { flex-basis:100%; } }
@media(max-width:420px) { .hero-actions { align-items:flex-start; flex-direction:column; } .hero-actions .primary { width:100%; text-align:center; } .subject-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .nav { gap:.5rem; } .brand-name { font-size:1.65rem; } .brand-mark { width:36px;height:36px; } .auth-art { min-height:180px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; } }

/* Full-bleed photographic landing and reflective pages. */
.home-stage {
  display:flex; flex-direction:column; min-height:100svh; color:var(--color-ivory);
  background:linear-gradient(180deg,rgba(9,24,43,.70),rgba(12,32,52,.53) 45%,rgba(5,23,36,.76)),url('ocean-hero.webp') center 64%/cover no-repeat;
}
.page-home header { background:transparent; color:var(--color-ivory); border-bottom:1px solid #f5f1e82b; }
.page-home .brand,.page-home .brand-mark,.page-home .brand small,.page-home .nav-actions { color:var(--color-ivory); }
.page-home header .secondary { color:var(--color-ivory); border-color:#f5f1e86b; }
.page-home header .secondary:hover,.page-home .module-nav a:hover:not(.active) { background:#ffffff1c; }
.page-home .module-nav { border-color:#f5f1e82b; }
.page-home .module-nav a { color:var(--color-ivory); }
.ocean-hero { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:clamp(1.1rem,2.4vh,2rem); padding:clamp(1.7rem,4vh,3rem) clamp(1rem,5vw,5rem) 1.4rem; width:100%; }
.hero-verse { width:min(100%,1000px); margin-inline:auto; }
.hero-verse .reflection { margin:0; padding:0 0 clamp(1rem,2vh,1.6rem); border:0; position:relative; }
.hero-verse .reflection::after { content:''; position:absolute; inset-inline:calc(50% - 34px); bottom:0; height:1px; background:var(--color-gold); }
.hero-verse .eyebrow { display:none; }
.hero-verse .reflection .ayah { color:#fffaf0; font-size:clamp(1.5rem,2.65vw,2.45rem); line-height:1.95; max-width:35em; margin:0 auto .65rem; }
.hero-verse .meaning { color:#f5f1e8; font-size:clamp(.83rem,1.12vw,1rem); line-height:1.65; max-width:76ch; margin:.3rem auto; }
.hero-verse .translation-label { color:#e5dccce0; font-size:.69rem; }
.hero-verse .verse-reference { color:#e5d2a6; font-size:.79rem; }
.hero-identity { display:grid; gap:.2rem; justify-items:center; }
.hero-arabic { font:400 clamp(2.8rem,6vw,4.5rem)/1.3 'Traditional Arabic','Noto Naskh Arabic','Times New Roman',serif; }
.hero-wordmark { font:400 clamp(1.2rem,2.2vw,1.65rem)/1.2 var(--font-heading); letter-spacing:.40em; padding-inline-start:.40em; }
.hero-kicker { font-size:.7rem; letter-spacing:.20em; text-transform:uppercase; color:#e5d2a6; }
[lang=ar] .hero-kicker { letter-spacing:0; }
.hero-message h1 { font-size:clamp(2.4rem,5.6vw,5.1rem); line-height:1.12; margin:0; color:#fffaf0; }
.hero-message p { max-width:55ch; margin:.8rem auto 0; color:#f5f1e8; font-size:clamp(.95rem,1.5vw,1.15rem); }
.ocean-hero .hero-actions,.ocean-farewell .hero-actions { justify-content:center; margin:0; gap:.8rem; }
.ocean-secondary { color:var(--color-ivory); background:rgba(255,255,255,.06); border:1px solid #f5f1e88c; border-radius:999px; padding:.85rem 1.35rem; }
.button.ocean-secondary:hover { background:#ffffff24; }
.discover-link { display:grid; gap:.2rem; color:#e5d2a6; text-decoration:none; font-size:.71rem; letter-spacing:.18em; text-transform:uppercase; margin-top:.4rem; }
.discover-link span { font-size:1.3rem; line-height:1; }
[lang=ar] .discover-link { letter-spacing:0; }
.home-stage a:focus-visible,.home-stage button:focus-visible,.ocean-farewell a:focus-visible { outline-color:#e5d2a6; }
.page-home main { padding-top:2.2rem; }
.page-home main:focus,.ocean-hero:focus { outline:none; }
/* Local photographs can be added using the provided asset retrieval script.
   The supplied seascape remains the offline fallback. */
.ocean-login { background-image:linear-gradient(155deg,#071e36a0,#09283dc0),url('ocean-login.jpg'),url('ocean-hero.webp'); background-position:center,center,center 96%; background-size:cover; }
.ocean-farewell { min-height:75svh; background-image:linear-gradient(180deg,#11253bb5,#071c31c9),url('ocean-farewell.jpg'),url('ocean-hero.webp'); background-position:center,center,center 78%; background-size:cover; padding:clamp(1.5rem,5vw,4rem); }
.ocean-farewell .farewell-copy { max-width:940px; width:100%; }
.ocean-farewell .hero-verse { margin-bottom:2rem; }
.ocean-farewell h1 { margin-block:.4rem 1.6rem; }
@media(max-width:600px) {
 .home-stage { background-position:center 75%; }
 .ocean-hero { gap:1.25rem; padding:1.5rem 1rem; }
 .hero-verse .reflection .ayah { font-size:1.45rem; line-height:1.9; }
 .ocean-hero .hero-actions,.ocean-farewell .hero-actions { width:100%; flex-direction:column; align-items:stretch; }
 .ocean-hero .hero-actions a,.ocean-farewell .hero-actions a { text-align:center; }
 .hero-message h1 { font-size:clamp(2.25rem,9vw,3.6rem); }
}
.ocean-hero .button.ocean-secondary:hover,.ocean-farewell .button.ocean-secondary:hover { background:#ffffff24; }

.hero-verse .ayah { text-wrap:balance; }
