/* Policy Field Notes: site styles (matches the Squarespace design: cream paper, warm ink,
   Libre Baskerville headings, Almarai text). build_site.py copies this to Site/assets/. */
:root {
  --paper: #f6f3ec;
  --band: #ece4da;
  --ink: #36302a;
  --ink-soft: #5c544b;
  --line: rgba(54, 48, 42, .18);
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Almarai", "Segoe UI", Arial, sans-serif;
  --content: 872px;
  --wide: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.88rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.45rem, 2.6vw, 2.15rem); margin-top: 1.4em; }
h4 { font-size: 1.35rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; padding: 10px 16px 0; }
.hdr { max-width: 1500px; margin: 0 auto; background: var(--paper); border: .8px solid var(--ink);
  box-shadow: 0 8px 14px rgba(54, 48, 42, .18); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 24px; }
.hdr-social { display: flex; gap: 12px; }
.ring { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink); display: grid; place-items: center; color: var(--ink); }
.ring:hover, .ring:focus-visible { background: var(--ink); color: var(--paper); }
.hdr-center { text-align: center; }
.site-title { font: 400 1.38rem/1.2 var(--serif); letter-spacing: -.02em; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 26px; max-width: 520px; margin: 8px auto 0; }
.site-nav a { text-decoration: none; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 0 1px; padding-bottom: 1px; }
.site-nav a:hover, .site-nav a[aria-current] { background-size: 100% 1px; }
.menu-btn { display: none; }

/* shared */
.band { background: var(--band); }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 56px 24px; }
.btn { display: inline-block; background: var(--ink); color: #f6f3ec; border: 0; border-radius: 999px; padding: 18px 30px;
  font: 400 1rem/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover, .btn:focus-visible { background: #000; }
.meta, .meta-line { font-size: .95rem; }
.meta-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0 0 14px; }
.meta-line a { text-decoration: none; }
.meta-line a:hover { text-decoration: underline; }
.more { display: inline-block; margin-top: 4px; }
.empty { text-align: center; }

/* text blocks (Squarespace text styles) */
.tb p { margin: 0 0 1em; }
.tb .lg, .tb p.lg { font-size: 1.384rem; line-height: 1.5; }
.tb .sm { font-size: .9rem; }
.tb blockquote { margin: 1.2em 0; padding: 0 0 0 1.1em; border-left: 3px solid var(--line); font-style: italic; }
.tb ul, .tb ol { padding-left: 1.4em; }
.tb li > p { margin: 0 0 .4em; }

/* home */
.hero { text-align: center; padding: 64px 24px 56px; }
.hero .tb { max-width: 980px; margin: 0 auto; }
.hero h1, .hero h2 { margin-bottom: .45em; }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 56px; margin-top: 28px; }
/* Images always show whole (they carry title text near the edges). */
.image-band img { width: 100%; max-width: 1536px; margin: 0 auto; }
.sec-h { text-align: center; }
.home-list { padding-top: 40px; padding-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px 32px; }
.card { text-align: center; }
.card img { aspect-ratio: 3 / 2; object-fit: contain; width: 100%; margin-bottom: 16px; }
.card h3 { font: 400 1.2rem/1.35 var(--sans); letter-spacing: 0; margin: 0 0 8px; }
.card h3 a { text-decoration: none; }
.card .excerpt p { margin: 0 0 8px; font-size: .95rem; }
.card .meta { margin: 10px 0 0; font-size: .85rem; opacity: .8; }

/* collection lists: alternating image / text rows */
.intro { text-align: center; padding: 48px 24px; }
.intro .tb { max-width: 760px; margin: 0 auto; font: 1.2rem/1.5 var(--serif); }
.intro .tb p { margin: 0; }
.intro h1 { margin: 4px 0 10px; }
.rows { display: grid; gap: 72px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.row:nth-child(even) .row-img { order: 2; }
.row-img img { width: 100%; }
.row-text { text-align: center; }
.row-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.row-text h2 a { text-decoration: none; }
.row-text .excerpt { font-size: 1.05rem; }

/* posts */
.post { max-width: calc(var(--content) + 48px); margin: 0 auto; padding: 64px 24px 48px; }
.post-head { text-align: center; margin-bottom: 40px; }
.post-head h1 { margin-bottom: 18px; }
.byline { margin: 0; font-size: .95rem; }
.post-body > * + * { margin-top: 16px; }
.post-body .tb p { margin: 16px 0; }
.post-body .tb p.lg { margin: 0 0 16px; }
figure.img { margin: 32px 0; }
figure.img img { margin: 0 auto; }
figcaption { margin-top: 12px; }
figcaption p { margin: 0; }
.accordion { border-top: 1px solid var(--ink); margin: 24px 0; }
.accordion details { border-bottom: 1px solid var(--ink); }
.accordion summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 2px; font: 400 1.3rem/1.3 var(--serif); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font: 300 1.8rem/1 var(--sans); }
.accordion details[open] summary::after { content: "\2212"; }
.acc-body { padding: 0 2px 18px; }
.acc-body p { margin: 0 0 .5em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: .9rem; }
.tags span { margin-right: 6px; font-weight: 700; }
.tags a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.tags a:hover { border-color: var(--ink); }
.pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; max-width: 48%; font-family: var(--serif); line-height: 1.35; }
.pager a span { display: block; font: .85rem var(--sans); margin-bottom: 4px; }
.pager .next { text-align: right; margin-left: auto; }

/* about / why / 404 */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about h1, .about h2 { text-align: center; }
.about-photo figure { margin: 0; }
.prose { max-width: 1040px; }
.prose h1, .prose h2 { text-align: center; }
.notfound { text-align: center; padding: 96px 24px; }

/* newsletter + footer */
.newsletter { text-align: center; padding: 56px 24px 40px; }
.nl-kicker { font: 700 clamp(1.15rem, 2vw, 1.55rem)/1.3 var(--serif); margin: 0 0 8px; }
.newsletter h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 12px; }
.nl-form { display: grid; justify-items: center; gap: 18px; margin: 28px auto 0; max-width: 360px; }
.nl-form input { width: 100%; padding: 16px; border: 1px solid var(--line); background: #fff; font: 1rem var(--sans); color: var(--ink); }
.nl-msg { margin: 0; font-size: .95rem; }
.site-footer { padding: 8px 24px 48px; }
.ft { max-width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; font-size: .9rem; }
.ft p { margin: 0 0 10px; }
.ft-h { font-weight: 700; }
.ft-social { display: flex; gap: 14px; align-items: flex-start; }
.plain { color: var(--ink); }
.plain svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .hdr { grid-template-columns: 1fr; padding: 12px 16px; }
  .hdr-social { display: none; }
  .hdr-center { display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; }
  .menu-btn { display: inline-block; background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 8px 16px; font: 1rem var(--sans); color: var(--ink); }
  .site-nav { display: none; grid-column: 1 / -1; flex-direction: column; align-items: flex-start; gap: 12px; margin: 14px 0 4px; }
  .nav-open .site-nav { display: flex; }
  .wrap { padding: 40px 16px; }
  .row, .about { grid-template-columns: 1fr; gap: 24px; }
  .row:nth-child(even) .row-img { order: 0; }
  .rows { gap: 56px; }
  .post { padding: 40px 16px 32px; }
  .hero { padding: 48px 16px 40px; }
  .ft { grid-template-columns: 1fr; }
  .btns { gap: 16px; }
}
