/* ==========================================================================
   Sustainability of Green Sciences and Technologies (SGST)
   Published by Al Qasim Green University

   Palette and typography derived from the journal cover artwork:
   deep navy-teal to forest-green gradient with an amber-gold accent.
   No inline styles are used anywhere in the markup, so a strict
   Content-Security-Policy (style-src 'self') holds without 'unsafe-inline'.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  /* sampled from the cover */
  --navy:        #072B43;
  --teal:        #0A2E35;
  --teal-mid:    #14544B;
  --forest:      #0E2F28;
  --gold:        #E1A038;
  --gold-soft:   #F0C378;

  /* derived working values */
  --gold-ink:    #85560F;   /* gold as text on a light background (AA) */
  --link:        #14544B;
  --ink:         #13211F;
  --muted:       #4F605C;
  --paper:       #FFFFFF;
  --tint:        #EBF2EF;
  --tint-warm:   #F4F8F6;
  --rule:        #CEDCD7;
  --rule-soft:   #E3ECE8;
  --pending:     #8A4B1F;

  --sans: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;

  --measure: 70ch;
  --shell: 1180px;
  --gutter: 2rem;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

/* --- Type scale --------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--teal);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.014em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.05rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.7vw, 1.95rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; letter-spacing: 0; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1.1em; }

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
}
a:hover { color: var(--teal); text-decoration-color: var(--gold); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

strong { font-weight: 600; }
abbr[title] { text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: help; }

/* --- Layout primitives -------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal); color: #fff; padding: 0.7rem 1.1rem; z-index: 100;
}
.skip:focus { left: 0; }

.band { padding-top: clamp(2.6rem, 6vw, 4.2rem); padding-bottom: clamp(2.6rem, 6vw, 4.2rem); }
.band-tint { background: var(--tint-warm); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }

/* The cover gradient, used for the hero and for emphasis bands. */
.band-deep {
  background: linear-gradient(135deg, var(--navy) 0%, #0B3A44 42%, var(--forest) 100%);
  color: #DCE7E3;
}
.band-deep h1, .band-deep h2, .band-deep h3, .band-deep h4 { color: #fff; }
.band-deep a { color: var(--gold-soft); text-decoration-color: rgba(240,195,120,.45); }
.band-deep a:hover { color: #fff; text-decoration-color: var(--gold); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: start;
}
.split-even {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: clamp(1.6rem, 3.5vw, 2.75rem);
}

/* --- Publisher strip ---------------------------------------------------- */
.strip { background: var(--forest); color: #BCCDC7; font-size: 0.82rem; }
.strip .shell {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem;
  align-items: center; justify-content: space-between;
  min-height: 2.6rem; padding-top: 0.45rem; padding-bottom: 0.45rem;
}
.strip a { color: #D7E4DF; text-decoration-color: rgba(215,228,223,.4); }
.strip a:hover { color: var(--gold-soft); }
.strip-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0; }

/* --- Masthead + navigation ---------------------------------------------- */
.masthead { border-bottom: 3px solid var(--teal); background: var(--paper); }
.masthead .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: 1.05rem; padding-bottom: 1.05rem;
}
.brand { display: flex; align-items: center; gap: 0.95rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 54px; height: 54px; flex: none; }
.brand-name {
  display: inline-block;
  background: var(--gold); color: var(--teal);
  font-size: 1.12rem; font-weight: 700; letter-spacing: 0.14em;
  padding: 0.12rem 0.6rem 0.1rem; border-radius: 2px;
}
.brand-sub { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.35; margin-top: 0.3rem; max-width: 30ch; }

.nav-toggle {
  display: none; align-items: center; gap: 0.5rem;
  background: var(--teal); color: #fff; border: 0; border-radius: 3px;
  font: inherit; font-size: 0.92rem; padding: 0.55rem 0.95rem; cursor: pointer;
}

.nav { border-top: 1px solid var(--rule-soft); background: var(--paper); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav li { max-width: none; }
.nav a {
  display: block; padding: 0.85rem 1.05rem;
  font-size: 0.945rem; font-weight: 500; color: var(--ink);
  text-decoration: none; border-bottom: 3px solid transparent;
}
.nav a:hover { background: var(--tint); border-bottom-color: var(--gold); }
.nav a[aria-current="page"] { color: var(--teal); font-weight: 600; border-bottom-color: var(--gold); }
.nav .nav-action { margin-left: auto; }
.nav .nav-action a { background: var(--teal); color: #fff; font-weight: 600; border-bottom-color: var(--teal); }
.nav .nav-action a:hover { background: var(--teal-mid); border-bottom-color: var(--gold); }

/* --- Hero --------------------------------------------------------------- */
.hero { padding-top: clamp(2.6rem, 6vw, 4.4rem); padding-bottom: clamp(2.6rem, 6vw, 4.4rem); }
.hero h1 { margin-bottom: 0.4em; }
.hero-abbr { font-size: 1rem; color: #A9C0B9; margin-bottom: 1.4rem; }
.hero-lede { font-size: 1.12rem; max-width: 58ch; }
.band-deep .hero-lede { color: #E8F0ED; }

.rule-gold { width: 92px; height: 5px; background: var(--gold); margin-bottom: 1.5rem; }

/* --- Record panel (recurring term/value device) -------------------------- */
.record {
  border: 1px solid var(--rule);
  border-top: 5px solid var(--gold);
  background: var(--tint-warm);
  color: var(--ink);
  padding: 1.5rem 1.6rem 1.1rem;
}
.record h2, .record h3 {
  font-size: 0.98rem; font-weight: 600; color: var(--teal);
  margin-bottom: 1rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule); letter-spacing: 0;
}
.band-deep .record { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.2); color: #DCE7E3; }
.band-deep .record h2, .band-deep .record h3 { color: #fff; border-bottom-color: rgba(255,255,255,.22); }
.band-deep .record dt { color: #A9C0B9; }
.band-deep .record dl.rows > div { border-bottom-color: rgba(255,255,255,.13); }

dl.rows { margin: 0; }
dl.rows > div {
  display: grid; grid-template-columns: minmax(8.5rem, 36%) 1fr;
  gap: 0.35rem 1.1rem; padding: 0.62rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
dl.rows > div:last-child { border-bottom: 0; }
dl.rows dt { font-size: 0.85rem; font-weight: 600; color: var(--muted); line-height: 1.45; }
dl.rows dd { margin: 0; font-size: 0.935rem; max-width: 46ch; }

.pending { color: var(--pending); font-style: italic; }
.band-deep .pending { color: var(--gold-soft); font-style: italic; }

/* --- Section headings --------------------------------------------------- */
.head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.6rem 1.5rem;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 0.55rem; margin-bottom: 1.8rem;
}
.head h2 { margin: 0; }
.head p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.band-deep .head { border-bottom-color: var(--gold); }
.band-deep .head p { color: #A9C0B9; }

/* --- Entry lists --------------------------------------------------------
   Reserved for the article archive. No page uses these yet because no
   article has been published; keep them so Issues.aspx can list articles
   without a stylesheet change. -------------------------------------------- */
.entries { list-style: none; margin: 0; padding: 0; }
.entries > li {
  max-width: none; padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule-soft);
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.4rem 1.6rem;
}
.entries > li:first-child { padding-top: 0; }
.entries > li:last-child { border-bottom: 0; }
.band-deep .entries > li { border-bottom-color: rgba(255,255,255,.13); }

.kind {
  font-size: 0.78rem; font-weight: 600; color: var(--teal-mid);
  border-left: 3px solid var(--gold); padding-left: 0.6rem;
  line-height: 1.5; align-self: start;
}
.band-deep .kind { color: var(--gold-soft); }
.entry-title { font-size: 1.1rem; font-weight: 600; line-height: 1.32; margin: 0 0 0.35rem; max-width: 58ch; }
.entry-title a { text-decoration: none; color: var(--teal); }
.band-deep .entry-title a { color: #fff; }
.entry-title a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.byline { font-size: 0.89rem; color: var(--muted); margin: 0 0 0.45rem; max-width: 62ch; }
.band-deep .byline { color: #A9C0B9; }
.excerpt { font-size: 0.93rem; margin: 0; max-width: 72ch; }

/* --- Issue list --------------------------------------------------------- */
.issues { list-style: none; margin: 0; padding: 0; }
.issues > li {
  max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1.5rem; align-items: center;
  padding: 1.1rem 0; border-bottom: 1px solid var(--rule-soft);
}
.issue-label { font-size: 1.08rem; font-weight: 600; color: var(--teal); margin: 0; }
.issue-note { font-size: 0.88rem; color: var(--muted); margin: 0.1rem 0 0; }

.status {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  padding: 0.25rem 0.65rem; border: 1px solid var(--rule);
  background: var(--tint); color: var(--teal);
  border-radius: 2px; white-space: nowrap;
}
.status-open { background: var(--gold); border-color: var(--gold); color: var(--teal); }
.status-planned { background: transparent; color: var(--muted); }

/* --- Board -------------------------------------------------------------- */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.15rem; }
.board > li { max-width: none; border-left: 3px solid var(--rule); padding: 0.15rem 0 0.15rem 1.05rem; }
.board > li.lead { border-left-color: var(--gold); }
.board .role { font-size: 0.82rem; font-weight: 600; color: var(--teal-mid); margin: 0; }
.board .person { font-size: 1.05rem; font-weight: 600; color: var(--teal); margin: 0.1rem 0; }
.board .affil { font-size: 0.89rem; color: var(--muted); margin: 0; max-width: 54ch; }

/* --- Prose -------------------------------------------------------------- */
.prose h2 { margin-top: 2.6rem; }
.prose h3 { margin-top: 1.9rem; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.45rem; }
.prose ol li::marker { font-weight: 600; color: var(--teal-mid); }
.band-deep .prose ol li::marker { color: var(--gold); }

.callout { border-left: 4px solid var(--gold); background: var(--tint); padding: 1.1rem 1.3rem; margin: 1.6rem 0; }
.callout > :last-child { margin-bottom: 0; }
.callout p { max-width: 62ch; }
.band-deep .callout { background: rgba(255,255,255,.06); }


/* --- Numbered sequence (used only for genuine sequences) ----------------- */
ol.flow { list-style: none; counter-reset: step; padding: 0; margin: 0; }
ol.flow > li {
  counter-increment: step; max-width: none; position: relative;
  padding: 0 0 1.5rem 3.1rem; border-left: 1px solid rgba(255,255,255,.22); margin-left: 1.05rem;
}
ol.flow > li::before {
  content: counter(step); position: absolute; left: -1.06rem; top: 0;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: var(--gold); color: var(--teal);
  font-size: 0.85rem; font-weight: 700; border-radius: 50%;
}
ol.flow > li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.flow h3 { margin: 0.15rem 0 0.35rem; font-size: 1.04rem; }
ol.flow p { margin-bottom: 0.4rem; font-size: 0.95rem; }
.band:not(.band-deep) ol.flow > li { border-left-color: var(--rule); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; background: var(--teal); color: #fff;
  font-weight: 600; font-size: 0.95rem; padding: 0.72rem 1.4rem;
  border: 2px solid var(--teal); border-radius: 3px;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--teal-mid); border-color: var(--teal-mid); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--teal); font-weight: 700; }
.btn-gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--teal); }
.btn-ghost { background: transparent; color: var(--teal); }
.btn-ghost:hover { background: var(--tint); color: var(--teal); border-color: var(--teal-mid); }
.band-deep .btn-ghost { color: #fff; border-color: var(--gold); }
.band-deep .btn-ghost:hover { background: var(--gold); color: var(--teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.5rem; }

/* --- Form --------------------------------------------------------------- */
.form { max-width: 34rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.95rem; padding: 0.62rem 0.75rem;
  border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal-mid); }
.field textarea { min-height: 8rem; resize: vertical; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 0.3rem 0 0; }
.band-deep .hint { color: #A9C0B9; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.9rem; padding: 0.8rem 1rem; border-left: 3px solid var(--gold); background: var(--tint); margin-top: 1.2rem; }
.form-note[hidden] { display: none; }

/* --- Tables ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 1.4rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
caption { text-align: left; font-size: 0.87rem; color: var(--muted); padding-bottom: 0.6rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
th { background: var(--tint); color: var(--teal); font-weight: 600; border-bottom: 1px solid var(--rule); }
td { max-width: 36ch; }
.band-deep .table-wrap { background: rgba(255,255,255,.05); }
.band-deep th { background: rgba(255,255,255,.1); color: #fff; border-bottom-color: rgba(255,255,255,.28); }
.band-deep td { border-bottom-color: rgba(255,255,255,.13); }
.band-deep caption { color: #A9C0B9; }

/* --- Key facts ---------------------------------------------------------- */
.metrics {
  list-style: none; margin: 2.6rem 0 0; padding: 1.6rem 0 0;
  border-top: 1px solid rgba(255,255,255,.22);
  display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem;
}
.metrics li { max-width: none; flex: 1 1 12rem; }
.metrics p { margin: 0; max-width: 22ch; }
.metrics .figure { font-size: 1.45rem; font-weight: 700; color: var(--gold); line-height: 1.15; }
.metrics .label { font-size: 0.85rem; color: #A9C0B9; }
.band:not(.band-deep) .metrics { border-top-color: var(--rule); }
.band:not(.band-deep) .metrics .figure { color: var(--teal); }
.band:not(.band-deep) .metrics .label { color: var(--muted); }

/* --- In-page link list -------------------------------------------------- */
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { padding: 0.45rem 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.94rem; max-width: none; }
.linklist li:last-child { border-bottom: 0; }
.linklist a { text-decoration: none; color: var(--teal); font-weight: 500; }
.linklist a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.band-deep .linklist li { border-bottom-color: rgba(255,255,255,.13); }
.band-deep .linklist a { color: #fff; }

/* --- Footer ------------------------------------------------------------- */
.foot {
  background: linear-gradient(135deg, var(--navy) 0%, #0B3A44 45%, var(--forest) 100%);
  color: #BCCDC7; font-size: 0.9rem; padding-top: 3rem; padding-bottom: 1.5rem;
}
.foot h2 {
  font-size: 0.93rem; color: #fff; font-weight: 600; margin-bottom: 0.85rem;
  padding-bottom: 0.45rem; border-bottom: 1px solid rgba(225,160,56,.4); letter-spacing: 0;
}
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 2rem 2.5rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.45rem; max-width: 34ch; }
.foot p { max-width: 34ch; margin-bottom: 0.6rem; }
.foot a { color: #D7E4DF; text-decoration-color: rgba(215,228,223,.35); }
.foot a:hover { color: var(--gold-soft); }
.foot address { font-style: normal; }
.colophon {
  margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; justify-content: space-between;
  font-size: 0.83rem; color: #9BAEA8;
}
.colophon p { margin: 0; max-width: 64ch; }

/* --- Error pages -------------------------------------------------------- */
.centered { min-height: 70vh; display: grid; place-items: center; text-align: left; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --gutter: 1.35rem; }
  .split { grid-template-columns: 1fr; }
  .entries > li { grid-template-columns: 1fr; }
  .kind { border-left: 0; border-top: 3px solid var(--gold); padding-left: 0; padding-top: 0.4rem; display: inline-block; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav ul { flex-direction: column; }
  .nav a { border-bottom: 1px solid var(--rule-soft); border-left: 3px solid transparent; }
  .nav a[aria-current="page"] { border-left-color: var(--gold); border-bottom-color: var(--rule-soft); }
  .nav .nav-action { margin-left: 0; }
  .nav[data-collapsed="true"] { display: none; }
  .issues > li { grid-template-columns: 1fr; }
  dl.rows > div { grid-template-columns: 1fr; gap: 0.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
@media print {
  .strip, .nav, .nav-toggle, .btn-row, .foot { display: none; }
  body { font-size: 11pt; color: #000; }
  .band-deep { background: none; color: #000; }
  .band-deep h1, .band-deep h2, .band-deep h3 { color: #000; }
  a { text-decoration: none; color: #000; }
}
