/* Sarat. Basalt wadi. RTL-first newspaper. */

:root {
  --basalt: #1a1714;
  --grass: #c4b49a;
  --copper: #b56a3a;
  --paper: #f3ede2;
  --ink: #1c1814;
  --muted: #6e6253;
  --rule: #d4c7b3;
  --on-basalt: #f3ede2;
  --focus: #b56a3a;
  --font-display: "Aref Ruqaa", "Times New Roman", serif;
  --font-body: "Vazirmatn", "Segoe UI", system-ui, sans-serif;
  --measure: 36.5rem;
  --page: 68rem;
  --spine: 0.42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem;
}

html,
body,
main,
.site-header,
.consent {
  max-width: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  border-inline-start: var(--spine) solid var(--copper);
}

html[data-lang="ar"] [data-i18n="en"],
html[data-lang="en"] [data-i18n="ar"] {
  display: none !important;
}

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

a {
  color: var(--copper);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: -4rem;
  z-index: 90;
  background: var(--basalt);
  color: var(--on-basalt);
  padding: 0.6rem 0.9rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.7rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.folio {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--copper);
  margin: 0 0 0.55rem;
}

html[data-lang="en"] .folio {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.28;
  color: var(--ink);
  margin: 0 0 0.65rem;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--basalt);
  color: var(--on-basalt);
  border-top: 1px solid var(--copper);
  border-bottom: 1px solid color-mix(in srgb, var(--grass) 35%, var(--basalt));
}

.site-header__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.55rem 1rem 0.65rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand brand"
    "tools tools";
  gap: 0.4rem 0.75rem;
  align-items: center;
}

.wordmark {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  text-decoration: none;
  color: var(--on-basalt);
}

.wordmark:hover,
.wordmark:focus-visible {
  color: var(--on-basalt);
}

.wordmark__mark {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.wordmark__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wordmark__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.1;
}

.wordmark__tag {
  font-size: 0.68rem;
  color: var(--grass);
  margin-top: 0.08rem;
}

.dateline {
  display: none;
  margin: 0;
  font-size: 0.72rem;
  color: var(--grass);
  white-space: nowrap;
}

.site-header__tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  border: 1px solid color-mix(in srgb, var(--grass) 45%, transparent);
  padding: 0.08rem;
}

.lang-switch button {
  min-height: 40px;
  min-width: 44px;
  padding: 0 0.65rem;
  border: 0;
  background: transparent;
  color: var(--grass);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--copper);
  color: var(--on-basalt);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.7rem;
  border: 1px solid color-mix(in srgb, var(--grass) 45%, transparent);
  background: transparent;
  color: var(--on-basalt);
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1rem;
  height: 1px;
  background: currentColor;
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.site-nav {
  display: none;
  grid-column: 1 / -1;
  border-top: 1px solid color-mix(in srgb, var(--grass) 28%, transparent);
  padding-top: 0.35rem;
}

.site-nav.is-open {
  display: block;
}

.nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.15rem;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--on-basalt);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--grass);
  border-bottom-color: var(--copper);
}

.nav a[aria-current="page"] {
  color: var(--copper);
  border-bottom-color: var(--copper);
}

.masthead {
  display: flex;
  flex-direction: column-reverse;
  background: var(--basalt);
  color: var(--on-basalt);
}

.masthead__type {
  padding: 1.35rem 1.1rem 1.5rem;
  max-width: var(--page);
  margin: 0 auto;
  width: 100%;
  border-bottom: 1px solid var(--copper);
  box-shadow: inset 0 -3px 0 var(--grass);
}

.masthead__type .folio {
  color: var(--grass);
}

.masthead__type h1 {
  color: var(--on-basalt);
  margin-bottom: 0.45rem;
  overflow-wrap: anywhere;
}

.masthead__type .lede {
  color: color-mix(in srgb, var(--on-basalt) 78%, var(--grass));
  margin-bottom: 0;
}

.masthead__photo img {
  width: 100%;
  height: min(48vh, 22rem);
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.88) contrast(1.06);
}

.masthead--short .masthead__photo img {
  height: min(28vh, 12.5rem);
  min-height: 8.5rem;
}

.rule {
  height: 0.45rem;
  border-block: 1px solid var(--copper);
  background: repeating-linear-gradient(
    90deg,
    var(--grass) 0 0.7rem,
    var(--paper) 0.7rem 1.05rem
  );
}

.sheet {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.8rem 1.15rem 2.4rem;
}

.sheet--tight {
  padding-top: 1.2rem;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: var(--measure);
}

.article {
  max-width: var(--measure);
}

.article ul,
.article ol {
  margin: 0 0 1rem;
  padding-inline-start: 1.15rem;
}

.article li {
  margin-bottom: 0.35rem;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.timetable {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 0.4rem;
}

.timetable caption {
  caption-side: bottom;
  text-align: start;
  color: var(--muted);
  font-size: 0.82rem;
  padding-top: 0.55rem;
}

.timetable thead {
  display: none;
}

.timetable tr {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.timetable th,
.timetable td {
  display: block;
  text-align: start;
  padding: 0.12rem 0;
  border: 0;
  vertical-align: top;
}

.timetable tbody th {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.timetable tbody th a {
  color: var(--ink);
  text-decoration: none;
}

.timetable tbody th a:hover {
  color: var(--copper);
}

.timetable__region {
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 600;
}

.timetable__line {
  color: var(--muted);
}

.civic {
  background: var(--basalt);
  color: var(--grass);
  padding: 2.4rem 0 2.6rem;
  scroll-margin-top: 7.5rem;
}

.civic__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.15rem;
}

.civic__copy {
  max-width: var(--measure);
  border-inline-start: 3px solid var(--copper);
  padding-inline-start: 1rem;
}

.civic .folio {
  color: var(--copper);
}

.civic h2 {
  color: var(--on-basalt);
}

.civic p,
.civic li,
.civic dd {
  color: var(--grass);
}

.civic a,
.civic a:visited {
  color: var(--on-basalt);
  text-decoration-color: var(--copper);
}

.civic a:hover {
  color: var(--copper);
}

.civic figcaption {
  color: color-mix(in srgb, var(--grass) 80%, var(--on-basalt));
}

.civic-facts {
  margin: 0 0 1rem;
  padding: 0;
}

.civic-facts div {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 0.4rem 0.85rem;
  padding: 0.7rem 0;
  border-top: 1px solid color-mix(in srgb, var(--grass) 28%, transparent);
}

.civic-facts div:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--grass) 28%, transparent);
}

.civic-facts dt {
  margin: 0;
  color: var(--copper);
  font-weight: 600;
  font-size: 0.82rem;
}

.civic-facts dd {
  margin: 0;
}

.figure {
  margin: 1.2rem 0 1.45rem;
}

.figure img {
  width: 100%;
}

.figure figcaption {
  font-size: 0.84rem;
  color: var(--muted);
  padding-top: 0.4rem;
  border-top: 1px solid var(--rule);
  margin-top: 0.4rem;
}

.figure--narrow {
  max-width: 22rem;
}

.related {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--copper);
}

.related h2 {
  font-size: 1.15rem;
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related li {
  border-bottom: 1px solid var(--rule);
}

.related a {
  display: flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.related a:hover {
  color: var(--copper);
}

.split {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.form {
  max-width: 28rem;
}

.form__row {
  margin-bottom: 0.9rem;
}

.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form input,
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-inline-start: 3px solid var(--copper);
  padding: 0.55rem 0.65rem;
}

.form textarea {
  resize: vertical;
  min-height: 8rem;
}

.form__hint {
  font-size: 0.88rem;
  color: var(--muted);
}

.form__status {
  min-height: 1.4em;
}

.form__status.is-error {
  color: #8a2b1f;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  background: var(--copper);
  color: var(--on-basalt);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--text {
  background: transparent;
  color: var(--copper);
  padding-inline: 0.4rem;
}

.btn--text:hover {
  color: var(--ink);
  background: transparent;
}

.contact-card {
  background: var(--basalt);
  color: var(--grass);
  padding: 1.2rem 1.1rem;
  border-inline-start: var(--spine) solid var(--copper);
}

.contact-card .folio {
  color: var(--copper);
}

.contact-card a {
  color: var(--on-basalt);
}

.credits {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.credits li {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.credits img {
  width: 100%;
  max-width: 12rem;
  height: 7rem;
  object-fit: cover;
}

.credits p {
  margin-bottom: 0.35rem;
}

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--copper);
  box-shadow: inset 0 3px 0 var(--grass);
  padding: 2rem 0 1.2rem;
}

.site-footer__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.site-footer .wordmark {
  color: var(--ink);
}

.site-footer .wordmark:hover {
  color: var(--ink);
}

.site-footer .wordmark__tag,
.site-footer .wordmark__name {
  color: inherit;
}

.site-footer__about {
  max-width: 24rem;
  color: var(--muted);
}

.site-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.2rem;
}

.site-footer__cols h2 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.site-footer__cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__cols a {
  color: var(--ink);
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.site-footer__cols a:hover {
  color: var(--copper);
}

.site-footer__copy {
  max-width: var(--page);
  margin: 1.4rem auto 0;
  padding: 0.8rem 1.15rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--muted);
}

.consent {
  position: sticky;
  bottom: 0;
  z-index: 45;
  background: var(--paper);
  border-top: 1px solid var(--copper);
  box-shadow: 0 -8px 24px color-mix(in srgb, var(--basalt) 18%, transparent);
}

.consent__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.consent__title {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.3rem;
  overflow-wrap: anywhere;
}

.consent__text p {
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.consent-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.consent-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--basalt) 62%, transparent);
}

.consent-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(32rem, calc(100% - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  margin: 1rem auto;
  background: var(--paper);
  color: var(--ink);
  padding: 1.15rem 1.1rem 1.3rem;
  border-inline-start: var(--spine) solid var(--copper);
}

.consent-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.consent-dialog__close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}

.consent-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.7rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}

.consent-option__title {
  font-weight: 600;
  margin: 0;
}

.consent-option__title span {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8rem;
}

.consent-option__desc {
  grid-column: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.consent-option .switch {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.consent-option .switch input {
  width: 1.1rem;
  height: 1.1rem;
}

.consent-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.has-dialog {
  overflow: hidden;
}

.no-js .consent {
  display: none;
}

@media (min-width: 40rem) {
  .credits li {
    flex-direction: row;
    align-items: start;
  }

  .credits img {
    width: 10rem;
    flex: 0 0 10rem;
  }

  .consent__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .consent__actions {
    flex: 0 0 auto;
  }
}

@media (min-width: 58rem) {
  .sheet {
    padding-inline: 1.6rem;
  }

  .intro {
    display: grid;
    grid-template-columns: 11.5rem 1fr;
    gap: 1.4rem;
    max-width: none;
  }

  .timetable {
    display: table;
  }

  .timetable thead {
    display: table-header-group;
  }

  .timetable tbody {
    display: table-row-group;
  }

  .timetable tr {
    display: table-row;
    padding: 0;
    border: 0;
  }

  .timetable th,
  .timetable td {
    display: table-cell;
    padding: 0.7rem 0.65rem;
    border-bottom: 1px solid var(--rule);
  }

  .timetable thead th {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--copper);
    border-bottom: 1px solid var(--copper);
  }

  .timetable tbody th {
    width: 22%;
  }

  .timetable__region {
    width: 18%;
  }

  .split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: start;
  }

  .site-footer__inner {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
  }
}

@media (min-width: 64rem) {
  .site-header__inner {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "brand date tools"
      "nav nav nav";
    align-items: center;
    padding-block: 0.55rem 0.45rem;
  }

  .dateline {
    display: block;
    grid-area: date;
    align-self: center;
  }

  .site-header__tools {
    grid-area: tools;
    justify-content: flex-end;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    grid-area: nav;
    border-top: 1px solid color-mix(in srgb, var(--grass) 28%, transparent);
    padding-top: 0.2rem;
  }

  .masthead {
    flex-direction: column;
  }

  .masthead__type {
    padding: 2.1rem 1.6rem 1.7rem;
  }

  .masthead__photo img {
    height: min(52vh, 28rem);
  }

  .masthead--short .masthead__photo img {
    height: min(32vh, 14rem);
  }
}
