/* Olive Palestine — what the CMS adds to the theme's op.css (loaded after it).
   op.css stays the prototype's own file; every rule here answers something the
   prototype never had to: real data, pages it did not draw, or a defect
   measured in the prototype itself. Only the identity's tokens are used. */

/* ---------- the loader shows only while op.js lays the walls ----------
   op.css draws .loader as a fixed sheet over the page and leaves it to op.js
   to remove; without JavaScript (or on a page that never loads op.js) the
   sheet stayed over everything. html.loading is set in <head> exactly when
   the walls are to be laid; .out keeps it through its own fade. */
html:not(.loading) .loader:not(.out){display:none}

/* ---------- a logo uploaded in Settings stands where the wordmark stood ---------- */
.brand img{display:block;width:100%;height:auto}
footer img.wm{display:block;width:300px;max-width:100%;height:auto}

/* ---------- a picture that failed to load leaves the stone, not a broken icon ---------- */
.ph.none{aspect-ratio:3/2}
.lead figure.none{display:none}
.lead .wrap:has(> figure.none){grid-template-columns:minmax(0,1fr)}

/* ---------- a terrace row the desk left without a link ---------- */
.step li .row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 14px;align-items:baseline;padding:11px 0;min-height:48px}

/* ---------- the top bar's links say where you are ---------- */
.topbar .links a[aria-current="page"]{color:var(--soil)}

/* ---------- a desk name is the way to its page ---------- */
.trio .col h2 a:hover{color:var(--soil)}
.ahead p a{background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;transition:background-size .45s var(--ease-out)}
.ahead p a:hover{background-size:100% 1px}

/* ---------- inner pages: built from the home's own pieces ---------- */
.page-desk{padding-top:40px}
.page-desk .desk-head h1{font-family:var(--devlo-font,var(--serif));font-weight:430;font-size:clamp(40px,4.4vw,64px);line-height:.95;letter-spacing:-.025em}
.page-desk .desk-head .by{text-align:right;margin-top:6px}
.page-desk .grid-olives{margin-bottom:36px}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px 32px}
.cards .st{border-top:1px solid var(--rule);padding-top:16px}
.cards .st .ph{aspect-ratio:3/2}
.empty{font-style:italic;color:var(--ink-2);font-size:18px;padding:12px 0 24px}
.results{margin-bottom:18px}

.pager{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:40px;border-top:1.5px solid var(--ink);padding-top:16px}

/* the months, on limestone (the footer draws them on black olive) */
.months.on-stone{margin:4px 0 22px}
.months.on-stone ul{grid-template-columns:repeat(12,minmax(0,1fr))}
.months.on-stone a{border-color:var(--rule);color:var(--ink);min-width:0}
.months.on-stone a:hover{border-color:var(--ink)}
.months.on-stone a[aria-current="page"]{background:var(--ink);color:var(--stone);border-color:var(--ink)}
.months.on-stone a.later{color:var(--ink-3)}

/* a form: the label in the identity's small capitals, the field on limestone */
.field{display:flex;flex-direction:column;gap:8px;max-width:640px;margin-bottom:24px}
.field .lbl{color:var(--ink-3)}
.field-row{display:flex;gap:10px}
.field input{flex:1;min-width:0;min-height:48px;padding:0 14px;font:500 16px var(--devlo-font,var(--sans));color:var(--ink);background:var(--stone);border:1px solid var(--rule);border-radius:2px}
.field input::placeholder{color:var(--ink-3)}
.field input:focus-visible{outline:2px solid var(--soil);outline-offset:1px;border-color:var(--ink)}
.field .note{font:600 14px var(--devlo-font,var(--sans));color:var(--leaf);min-height:1.4em}
.field .note.bad{color:var(--soil)}
.field .by a{text-decoration:underline;text-underline-offset:2px}
.letter-body{max-width:640px}
.letter-body .dek{margin-bottom:24px}

/* About, Privacy: the desk's prose («محتوى الصفحات») */
.page-body{max-width:720px}
.page-body > .dek{margin-bottom:26px}
.pc-prose{font-size:18px;line-height:1.7;color:var(--ink)}
.pc-prose h2{font-family:var(--devlo-font,var(--serif));font-weight:480;font-size:28px;line-height:1.15;letter-spacing:-.015em;margin:34px 0 10px}
.pc-prose h3{font-family:var(--devlo-font,var(--serif));font-weight:560;font-size:21px;line-height:1.25;margin:26px 0 8px}
.pc-prose p,.pc-prose ul,.pc-prose ol{margin:0 0 16px}
.pc-prose ul{list-style:disc;padding-left:1.3em}
.pc-prose ol{list-style:decimal;padding-left:1.3em}
.pc-prose a{color:var(--soil);text-decoration:underline;text-underline-offset:3px}

/* ---------- a story ----------
   The identity's own pieces at reading size: the kicker and the headline
   over a measured column, the standfirst in Literata, the photograph with
   its honest caption, the text at 19/1.72 on a 680px measure, and a rail of
   the story's figures and the latest stories. Terra rossa stays for «now». */
.story-head{padding:34px 0 0}
.story-head .wrap{display:grid;grid-template-columns:minmax(0,8fr) minmax(0,4fr);gap:0 56px}
.story-head .head{display:flex;flex-direction:column;gap:16px;min-width:0}
.crumb{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font:600 13px var(--devlo-font,var(--sans));color:var(--ink-3)}
.crumb a{color:var(--ink-2)}
.crumb a:hover{color:var(--soil)}
.crumb span[aria-hidden]{color:var(--rule)}
.story-head .h-xl{font-size:clamp(34px,4.2vw,58px);line-height:1.04;max-width:20ch}
.story-head .dek{font-size:21px;line-height:1.5;max-width:40ch}
.meta{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px 24px;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);padding:12px 0;margin-top:8px}
.meta .who{display:flex;align-items:center;gap:12px;font:500 13.5px/1.4 var(--devlo-font,var(--sans));color:var(--ink-3)}
.meta .who img{width:38px;height:38px}
.meta .who b{display:block;color:var(--ink);font-weight:650}
.shares{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;font:650 13px var(--devlo-font,var(--sans))}
.shares .lbl{color:var(--ink-3);margin-right:2px}
.shares a,.shares button{display:inline-flex;align-items:center;gap:6px;min-height:40px;color:var(--ink-2);transition:color .2s}
.shares a:hover,.shares button:hover{color:var(--soil)}
.shares svg{width:15px;height:15px}
.shares .note{font-weight:600;color:var(--leaf);min-width:0}

.story-grid{display:grid;grid-template-columns:minmax(0,8fr) minmax(0,4fr);gap:0 56px;align-items:start;padding-top:28px;padding-bottom:56px}
.story-main{min-width:0}
.story-main > figure{margin-bottom:30px}
.story-main > figure .ph{aspect-ratio:3/2}
.story-main > figure .ph img{height:100%}
.story-main .body,.story-main .after{max-width:680px}

.body{font-size:19px;line-height:1.72;color:var(--ink)}
.body > p:first-child{font-size:20.5px;line-height:1.62}
.body > p:first-child::first-letter{float:left;font-size:4.1em;line-height:.82;font-weight:450;margin:.06em .1em 0 0;color:var(--ink)}
.body p,.body ul,.body ol,.body blockquote,.body figure,.body table{margin:0 0 20px}
.body ul{list-style:none;padding:0;border-top:1px solid var(--rule)}
.body ul li{position:relative;padding:10px 0 10px 22px;border-bottom:1px solid var(--rule-2);margin:0;font-size:17.5px;line-height:1.55}
.body ul li::before{content:"";position:absolute;left:2px;top:.95em;width:8px;height:5.5px;border-radius:50%;background:var(--leaf);transform:rotate(-30deg)}
.body ol{counter-reset:s;list-style:none;padding:0}
.body ol li{counter-increment:s;display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;padding:6px 0;margin:0}
.body ol li::before{content:counter(s);font-style:italic;font-size:21px;line-height:1.35;color:var(--soil)}
.body h2{font-weight:480;font-size:30px;line-height:1.12;letter-spacing:-.015em;margin:40px 0 14px}
.body h3{font-weight:560;font-size:22px;line-height:1.25;margin:30px 0 10px}
.body a{color:var(--soil);text-decoration:underline;text-underline-offset:3px}
.body blockquote{border-left:3px solid var(--ink);padding:4px 0 4px 22px;font-style:italic;font-size:24px;line-height:1.42;color:var(--ink)}
.body blockquote p{margin:0}
.body img{max-width:100%;height:auto}
.body figcaption{margin-top:8px}
.body table{width:100%;border-collapse:collapse;font:500 15px var(--devlo-font,var(--sans))}
.body th,.body td{border-bottom:1px solid var(--rule);padding:8px 10px 8px 0;text-align:left}
.body iframe{max-width:100%}

.after{display:flex;flex-direction:column;gap:22px;margin-top:10px}
.srcbox{background:var(--stone-2);border-top:1.5px solid var(--ink);padding:18px 22px 20px;display:grid;gap:6px}
.srcbox .lbl{color:var(--ink-3)}
.srcbox p{font-size:16.5px;line-height:1.5;color:var(--ink-2)}
.srcbox b{color:var(--ink);font-weight:600}
.srcbox a.more{min-height:36px}
.after .shares{border-top:1px solid var(--rule);padding-top:10px}

.story-side{position:sticky;top:20px;display:flex;flex-direction:column;gap:30px;min-width:0}
.story-side h2{font:650 12.5px var(--devlo-font,var(--sans));letter-spacing:.075em;text-transform:uppercase;color:var(--ink-3);border-top:1.5px solid var(--ink);padding-top:12px}
.story-side .facts{grid-template-columns:minmax(0,1fr);border-top:0;margin:0}
.story-side .facts li,.story-side .facts li+li{padding:14px 0;border-left:0;border-bottom:1px solid var(--rule)}
.story-side .also{border-top:0;padding-top:0}

.more-desk{border-top:1px solid var(--rule)}
.more-desk .cards{grid-template-columns:repeat(4,minmax(0,1fr))}

@media (max-width:1180px){
  .story-head .wrap,.story-grid{grid-template-columns:minmax(0,1fr)}
  .story-side{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px}
  .more-desk .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .story-head{padding-top:22px}
  .story-head .h-xl{font-size:31px;line-height:1.08}
  .story-head .dek{font-size:17.5px}
  .meta{flex-direction:column;align-items:flex-start}
  .shares{gap:0 14px;font-size:12.5px}
  .shares > .lbl{display:none}
  .body > p:first-child::first-letter{font-size:3.4em}
  .story-grid{padding-top:20px}
  .story-main > figure{margin:0 calc(var(--gut) * -1) 24px}
  .story-main > figure figcaption{padding:0 var(--gut)}
  .body{font-size:17.5px}
  .body > p:first-child{font-size:18.5px}
  .body h2{font-size:25px}
  .story-side{grid-template-columns:minmax(0,1fr)}
  .more-desk .cards{grid-template-columns:minmax(0,1fr)}
}

/* ---------- the 404 ---------- */
.nf{padding:64px 0 80px}
.nf .wrap{display:flex;flex-direction:column;align-items:flex-start;gap:16px;max-width:calc(760px + var(--gut) * 2);margin-left:0}
.nf-mark{width:96px;height:auto}
.nf .lbl{color:var(--soil)}
.nf .acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}

/* ---------- tablet ---------- */
@media (max-width:900px){
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .months.on-stone ul{grid-template-columns:repeat(6,minmax(0,1fr))}
}

/* ---------- phone ---------- */
@media (max-width:640px){
  .page-desk{padding-top:28px}
  .page-desk .desk-head .by{text-align:left}
  .cards{grid-template-columns:minmax(0,1fr);gap:22px}
  .months.on-stone ul{grid-template-columns:repeat(4,minmax(0,1fr))}
  .field-row{flex-direction:column}
  .field-row .btn{justify-content:center}
  .nf{padding:40px 0 56px}
}
