/* لُباب — page-specific styles. The frame (nav, hero, side menu, footer) comes from styles.css; everything here is prefixed lb-. */
.page-lubab { --lb-green: #172c27; --lb-green-2: #0f1d1a; --lb-gold: #e5c58d; --lb-ivory: #f5efe3; --lb-ar: "IBM Plex Sans Arabic", system-ui, sans-serif; --lb-word: "Amiri", "IBM Plex Sans Arabic", serif; --lb-head: "Reem Kufi", "IBM Plex Sans Arabic", serif; }
.page-lubab .site-footer { margin-top: 4rem; }
html[lang="ar"] .lockup-tab.lb-tab { font-family: var(--lb-head); letter-spacing: 0; text-transform: none; font-size: clamp(1.5rem, 6vw, 2.4rem); font-weight: 400; padding-inline-start: 0; margin-top: clamp(.6rem, 2vw, 1rem); line-height: 1.3; }
.page-lubab .mem-lede, .page-lubab .slogan { font-family: var(--lb-ar); }
.page-lubab[dir], html[lang="ar"] .page-lubab .mem-lede { font-family: var(--lb-ar); }
html[lang="en"] .page-lubab .slogan { font-family: "Bodoni Moda", serif; font-style: italic; }
html[lang="en"] .page-lubab .mem-lede { font-family: "Bodoni Moda", serif; font-size: 1.15rem; line-height: 1.55; }

.lb-wrap { max-width: 70rem; margin: 0 auto; padding: 2rem max(1rem, 4vw) 1rem; font-family: var(--lb-ar); }
.lb-wrap * { box-sizing: border-box; }
:where(.lb-wrap) button { font: inherit; color: inherit; cursor: pointer; border-radius: 0; }

/* daily */
.lb-daily { border: 1px solid #e5c58d59; background: linear-gradient(150deg, var(--lb-green), var(--lb-green-2)); padding: clamp(1.2rem, 4vw, 2.6rem); position: relative; direction: rtl; text-align: start; }
.lb-daily::before { content: ""; position: absolute; inset: 7px; border: 1px solid #e5c58d24; pointer-events: none; }
.lb-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; }
.lb-label { font-family: var(--lb-head); font-size: 1.25rem; color: var(--lb-gold); }
.lb-date { font-size: .85rem; color: #f5efe3b3; }
.lb-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.lb-tag { font-size: .78rem; padding: .1rem .6rem; border: 1px solid #e5c58d66; color: var(--lb-gold); line-height: 1.7; }
.lb-tag.form { border-color: #f5efe34d; color: #f5efe3cc; }
.lb-title { font-family: var(--lb-head); font-size: 1.3rem; color: var(--lb-ivory); margin: 1.4rem 0 0; font-weight: 400; }
.lb-title.word { font-family: var(--lb-word); font-size: clamp(2.4rem, 8vw, 3.6rem); color: var(--lb-gold); margin-top: 1rem; line-height: 1.3; }
.lb-text { font-size: clamp(1.5rem, 5vw, 2.4rem); line-height: 1.85; color: var(--lb-ivory); margin: .9rem 0 0; text-wrap: balance; white-space: pre-line; }
.lb-text.long { font-size: clamp(1.2rem, 3.6vw, 1.55rem); line-height: 1.95; text-wrap: pretty; }
.lb-use { margin: .9rem 0 0; font-size: 1rem; color: #f5efe3c7; line-height: 1.8; }
.lb-by { color: var(--lb-gold); margin: 1rem 0 0; font-size: 1.1rem; }
.lb-src { margin: .3rem 0 0; font-size: .9rem; color: #f5efe399; }
.lb-src a { color: inherit; text-underline-offset: 3px; }
.lb-src a:hover, .lb-src a:focus-visible { color: var(--lb-gold); }
.lb-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.lb-btn { min-height: 3rem; padding: .5rem 1.4rem; background: var(--paper); color: var(--ink); border: 1px solid var(--paper); font-family: var(--lb-head); font-size: 1rem; transition: background .2s; }
.lb-btn:hover { background: var(--accent-light); }
.lb-btn.out { background: transparent; color: var(--paper); border-color: #e9e3d759; }
.lb-btn.out:hover { border-color: var(--accent); color: var(--accent-light); }
.lb-btn.out[aria-pressed="true"] { border-color: var(--accent-light); color: var(--accent-light); background: #f0d9a91a; }

/* sections */
.lb-sec { padding-top: 3.2rem; }
.lb-sec h2 { font-family: var(--lb-head); font-weight: 400; font-size: 1.5rem; margin: 0; color: var(--paper); }
html[lang="en"] .lb-sec h2, html[lang="en"] .lb-sub, html[lang="en"] .lb-note { font-family: "Manrope", system-ui, sans-serif; }
html[lang="en"] .lb-sec h2 { font-size: 1.3rem; letter-spacing: .02em; }
.lb-sub { color: var(--paper-dim); margin: .2rem 0 0; font-size: 1rem; }
.lb-note { font-size: .8rem; color: var(--paper-dim); margin: .6rem 0 0; }
.lb-surprise { margin-top: 1rem; border: 1px solid var(--line); padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; background: linear-gradient(140deg, #ffffff09, transparent 55%); }
.lb-out { min-height: 2rem; color: var(--paper-dim); }
.lb-s-text { font-size: 1.4rem; line-height: 1.85; color: var(--paper); margin: 0; white-space: pre-line; }
.lb-s-by { color: var(--accent-light); margin: .3rem 0 0; font-size: 1rem; }
.lb-fade { animation: lb-fade .5s ease both; }
@keyframes lb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lb-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.lb-chip { background: transparent; border: 1px solid var(--line); color: var(--paper-dim); padding: .4rem .85rem; font-size: .85rem; line-height: 1.6; min-height: 2.4rem; }
.lb-chip:hover { color: var(--accent-light); border-color: var(--accent); }
.lb-chip[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.lb-chip em { font-style: normal; opacity: .6; margin-inline-start: .35rem; }
.lb-search { margin-top: 1rem; display: flex; gap: .5rem; }
.lb-search input { flex: 1; min-width: 0; min-height: 3rem; background: #ffffff08; border: 1px solid var(--line); color: var(--paper); padding: .4rem 1rem; font-family: var(--lb-ar); font-size: 1.05rem; border-radius: 0; }
.lb-search input::placeholder { color: #7c766b; }
.lb-grid { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: .9rem; }
.lb-card { border: 1px solid var(--line); background: linear-gradient(140deg, #ffffff09, transparent 55%); padding: 1.1rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; position: relative; }
.lb-card.today { border-color: #e5c58d80; }
.lb-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .76rem; color: var(--paper-dim); }
.lb-meta .tt { color: var(--accent-light); }
.lb-cat { font-size: .74rem; color: var(--accent); unicode-bidi: plaintext; }
.lb-c-title { font-family: var(--lb-word); font-size: 1.5rem; margin: .3rem 0 0; font-weight: 400; color: var(--accent-light); line-height: 1.4; }
.lb-c-text { margin: 0; font-size: 1.15rem; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.lb-c-by { margin: 0; color: var(--paper-dim); font-size: .95rem; line-height: 1.6; }
.lb-c-act { margin-top: auto; padding-top: .5rem; display: flex; gap: .4rem; align-items: center; }
.lb-icon { width: 2.6rem; height: 2.6rem; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; color: var(--paper-dim); }
.lb-icon:hover { border-color: var(--accent); color: var(--accent-light); }
.lb-icon[aria-pressed="true"] { color: var(--accent-light); border-color: var(--accent-light); }
.lb-icon[aria-pressed="true"] svg path { fill: currentColor; }
.lb-link { background: none; border: 0; border-bottom: 1px solid var(--accent); color: var(--accent-light); padding: .15rem 0; font-size: .85rem; margin-inline-start: auto; }
.lb-empty { border: 1px solid var(--line); padding: 2rem 1.2rem; color: var(--paper-dim); text-align: center; grid-column: 1 / -1; }
.lb-more { grid-column: 1 / -1; text-align: center; padding-top: .6rem; }
.lb-rules { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .5rem; max-width: 42rem; }
.lb-rules li { padding-inline-start: 1.1rem; position: relative; color: var(--paper-dim); line-height: 1.8; }
.lb-rules li::before { content: ""; position: absolute; inset-inline-start: 0; top: .8em; width: 5px; height: 5px; background: var(--accent); }
.lb-srcs { margin: 1.4rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); border: 1px solid var(--line); }
.lb-srcs li { margin: -1px 0 0 -1px; border: 1px solid var(--line); }
.lb-srcs a { display: block; padding: .8rem 1rem; color: inherit; text-decoration: none; }
.lb-srcs b { display: block; font-weight: 600; color: var(--paper); font-size: 1rem; }
.lb-srcs span { font-size: .8rem; color: var(--paper-dim); direction: ltr; unicode-bidi: plaintext; }
.lb-srcs a:hover b, .lb-srcs a:focus-visible b { color: var(--accent-light); }

/* detail */
.lb-veil { position: fixed; inset: 0; z-index: 60; background: #000000b8; display: grid; place-items: center; padding: max(1rem, 4vw); }
.lb-veil[hidden] { display: none; }
.lb-sheet { width: 100%; max-width: 40rem; max-height: 88vh; max-height: 88dvh; overflow-y: auto; background: var(--ink-soft); border: 1px solid var(--line); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; direction: rtl; font-family: var(--lb-ar); }
.lb-sheet h3 { font-family: var(--lb-head); font-weight: 400; font-size: 1.3rem; margin: 0; color: var(--accent-light); }
.lb-big { font-size: 1.5rem; line-height: 1.9; margin: 0; white-space: pre-line; }
.lb-sheet dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; font-size: 1rem; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 1rem; }
.lb-sheet dt { color: var(--paper-dim); font-size: .8rem; padding-top: .2rem; }
.lb-sheet dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lb-sheet dd a { color: var(--accent-light); text-underline-offset: 3px; }
.lb-warn { border: 1px dashed var(--line); padding: .6rem .8rem; font-size: .85rem; color: var(--paper-dim); margin: 0; }
.lb-toast { position: fixed; z-index: 80; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); inset-inline: 0; margin-inline: auto; width: fit-content; max-width: calc(100% - 2rem); background: var(--paper); color: var(--ink); padding: .55rem 1.1rem; font-size: .9rem; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .25s; }
.lb-toast.show { opacity: 1; transform: none; }
@media (max-width: 520px) { .lb-sheet dl { grid-template-columns: 1fr; gap: 0; } .lb-sheet dt { padding-top: .6rem; } }
@media (prefers-reduced-motion: reduce) { .lb-fade, .lb-toast { animation: none; transition: none; } }
