/* Jawa Timur Sepekan — "Kertas dan tinta": paper and ink, like a printed weekly magazine. */

@font-face { font-family: "Source Serif 4"; src: url(fonts/serif-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/serif-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/serif-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/serif-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(fonts/sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(fonts/sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --tinta: #1B2230;      /* ink: text, rules */
  --bata: #C2552D;       /* brick: wordmark, accents */
  --bata-teks: #A9471F;  /* brick dark enough for small text on paper */
  --batu: #8A8478;       /* stone: thin rules, decoration */
  --kertas: #F5F0E6;     /* paper: background */
  --kertas-tua: #EAE3D5; /* darker paper: image placeholders, hover */
  --redup: #5C5850;      /* muted text */

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --wide: 70rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--kertas);
  color: var(--tinta);
  font: 400 1.0625rem/1.6 var(--serif);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--bata); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--tinta); color: var(--kertas); z-index: 10; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Masthead ---------- */
.masthead { max-width: var(--wide); margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.75rem) var(--gutter) 0; }
.masthead__top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem;
  padding-bottom: clamp(.9rem, 2vw, 1.25rem);
  border-bottom: 3px solid var(--tinta);
}
.wordmark { margin: 0; font-weight: 700; font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; }
.wordmark a { text-decoration: none; }
.wordmark span { color: var(--bata); font-weight: 400; font-style: italic; }
.masthead__side { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.edition { margin: 0; display: grid; justify-items: end; gap: .1rem; font: 600 .95rem/1.3 var(--sans); }
.edition__updated { font-weight: 400; font-size: .8rem; color: var(--redup); }

.controls {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem 2rem;
  border-bottom: 1px solid var(--batu);
}
.tabs {
  flex: 1 1 auto; min-width: 0;  /* the row takes the full width and scrolls sideways on phones */
  display: flex; gap: clamp(1rem, 2.6vw, 1.9rem);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; padding: .8rem 0 .7rem;
  font: 600 1rem/1 var(--sans); text-decoration: none; color: var(--redup); white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--tinta); }
.tabs a[aria-selected="true"] { color: var(--tinta); border-bottom-color: var(--bata); }
.tabs a:focus-visible { outline-offset: -2px; }

.lang { display: flex; gap: .15rem; flex: none; }
.lang button {
  font: 400 .85rem/1 var(--sans); color: var(--redup);
  background: none; border: 0; border-radius: 3px; padding: .45rem .6rem; cursor: pointer;
}
.lang button:hover { color: var(--tinta); background: var(--kertas-tua); }
.lang button[aria-pressed="true"] { color: var(--kertas); background: var(--tinta); }

/* ---------- Shared ---------- */
.page { max-width: var(--wide); margin: 0 auto; padding: clamp(1.75rem, 4vw, 3rem) var(--gutter) 3rem; }
.page:focus { outline: none; }

.rubric {
  margin: 0 0 1rem;
  font: 600 .78rem/1 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--bata-teks);
}
.meta { margin: 0; font: 400 .85rem/1.4 var(--sans); color: var(--redup); }
.meta b { font-weight: 600; color: var(--tinta); }
.official {
  display: inline-block; margin-left: .5rem; padding: .05rem .4rem; vertical-align: .05em;
  font-size: .75rem; font-weight: 600; color: var(--bata-teks);
  border: 1px solid currentColor; border-radius: 2px;
}

.title a { text-decoration: none; }
.title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--bata); }

.frame { overflow: hidden; background: var(--kertas-tua); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Laporan utama ---------- */
.lead { padding-bottom: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--batu); }
.lead__story { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 3vw, 2.75rem); align-items: start; }
.lead__story--noimage { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
.lead__story .frame { aspect-ratio: 3 / 2; }
.lead__story .title { margin: 0 0 1rem; font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.015em; }
.lead__summary { margin: 0 0 1.25rem; font-size: 1.15rem; line-height: 1.65; max-width: 34rem; }

/* ---------- Sorotan ---------- */
.highlights { padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid var(--batu); }
.highlights__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem); }
.highlight .frame { aspect-ratio: 3 / 2; margin-bottom: .9rem; }
.highlight .title { margin: 0 0 .6rem; font-size: 1.3rem; line-height: 1.25; font-weight: 600; }

/* ---------- Sepanjang pekan ---------- */
.week { padding-top: clamp(2rem, 4vw, 3rem); }
.day { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--batu); }
.day:first-of-type { border-top: 0; padding-top: .25rem; }
.day__name { margin: 0; font: 600 1.15rem/1.3 var(--serif); }
.day__date { display: block; font: 400 .85rem/1.4 var(--sans); color: var(--redup); }
.day__list { list-style: none; margin: 0; padding: 0; max-width: 44rem; }
.day__list li { padding: .7rem 0; border-bottom: 1px dotted var(--batu); }
.day__list li:first-child { padding-top: 0; }
.day__list .title { margin: 0 0 .2rem; font-size: 1.1rem; line-height: 1.35; font-weight: 600; }
.more {
  margin-top: .9rem; padding: .5rem .9rem;
  font: 600 .85rem/1 var(--sans); color: var(--tinta);
  background: none; border: 1px solid var(--tinta); border-radius: 3px; cursor: pointer;
}
.more:hover { background: var(--tinta); color: var(--kertas); }

.empty { font-size: 1.15rem; color: var(--redup); max-width: 36ch; margin: 0; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--wide); margin: 0 auto; padding: 2rem var(--gutter) 3rem;
  border-top: 3px solid var(--tinta);
  font: 400 .85rem/1.6 var(--sans); color: var(--redup);
}
.footer p { margin: 0 0 .5rem; max-width: 70ch; }
.footer__name { font: 700 1.25rem/1.2 var(--serif); color: var(--tinta); }
.footer__name span { color: var(--bata); font-weight: 400; font-style: italic; }

/* ---------- Smaller screens ---------- */
@media (max-width: 860px) {
  .highlights__grid { grid-template-columns: minmax(0, 1fr); }
  .highlight { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 0 1rem; }
  .highlight .frame { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin: 0; aspect-ratio: 1; }
  .highlight .title { font-size: 1.15rem; }
  .day { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .day__name { display: flex; gap: .6rem; align-items: baseline; }
}
@media (max-width: 640px) {
  .masthead__top { flex-direction: column; align-items: flex-start; }
  .edition { justify-items: start; }
  .controls { flex-direction: column; align-items: stretch; gap: 0; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .masthead__side { align-items: flex-start; }
  .tabs { padding-right: var(--gutter); }
  .tabs a { font-size: .95rem; }
  .lead__story { grid-template-columns: minmax(0, 1fr); }
  .lead__story .title { font-size: 1.6rem; }
  .lead__summary { font-size: 1.05rem; }
}

/* ---------- Story paragraphs: last words link to the source ---------- */
.para { margin: .5rem 0 0; font: 400 1rem/1.6 var(--serif); max-width: 40rem; }
.para a, .story__body a { color: inherit; text-decoration: underline; text-decoration-color: var(--bata); text-underline-offset: .18em; }
.para a:hover, .story__body a:hover { color: var(--bata-teks); }
.sources { margin: .45rem 0 0; font: 400 .8rem/1.4 var(--sans); color: var(--redup); }
.lead__story .para { font-size: 1.15rem; line-height: 1.65; }
.lead__story .sources { margin-bottom: 1rem; }

/* ---------- Article page (AI-written official releases) ---------- */
.masthead__top--small { border-bottom-width: 2px; }
.masthead__top--small .wordmark { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.story { max-width: 44rem; }
.story__title { margin: 0 0 .9rem; font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.015em; }
.story__image { margin: 1.5rem 0 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--kertas-tua); }
.story__image img { width: 100%; height: 100%; object-fit: cover; }
.story__body { margin: 1.75rem 0 2rem; }
.story__body p { margin: 0 0 1.1rem; font-size: 1.15rem; line-height: 1.75; }
.story__body .story__sources { margin-top: 1.75rem; font: 600 .9rem/1.4 var(--sans); }
.story__body .story__note { font: 400 .85rem/1.5 var(--sans); color: var(--redup); }
a.more { display: inline-block; text-decoration: none; }
.lead__story .para + .meta { margin-top: 1rem; }

/* ---------- Archive of wrap-ups ---------- */
.edition__archive { font: 600 .8rem/1.4 var(--sans); color: var(--bata-teks); text-decoration: underline; text-underline-offset: .18em; }
.footer a { color: inherit; }
.archive { max-width: 46rem; }
.archive__title { margin: 0 0 .75rem; font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.12; font-weight: 700; }
.archive__intro { margin: 0 0 2rem; font: 400 .95rem/1.6 var(--sans); color: var(--redup); max-width: 40rem; }
.archive__month { margin-bottom: 2.25rem; }
.archive__month-name { margin: 0 0 .25rem; padding-bottom: .5rem; font-size: 1.25rem; border-bottom: 2px solid var(--tinta); }
.archive__list { list-style: none; margin: 0; padding: 0; }
.archive__item { padding: 1.1rem 0; border-bottom: 1px dotted var(--batu); }
.archive__item .meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 0; }
.archive__item .title { margin: .35rem 0 .2rem; font-size: 1.2rem; line-height: 1.3; font-weight: 600; }
.archive__item--weekly { padding-left: 1rem; border-left: 3px solid var(--bata); }
.archive__item--weekly .title { font-size: 1.45rem; font-weight: 700; }

/* ---------- Catatan Sepekan (the editor's own column) ---------- */
.picks {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start;
  padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid var(--batu);
}
.picks:not(:has(> section:not([hidden]))) { display: none; }
.column { min-width: 0; }
.column__card { padding-left: 1.1rem; border-left: 3px solid var(--bata); }
.column__card .title { margin: 0 0 .4rem; font-size: clamp(1.4rem, 2.2vw, 1.7rem); line-height: 1.15; font-weight: 700; font-style: italic; }
.column__card .para { font-size: 1.02rem; line-height: 1.6; margin-bottom: 1rem; }
.column__card .more { margin-right: 1rem; }
.column__all { font: 600 .85rem/1 var(--sans); color: var(--bata-teks); }
.story__body h2 { margin: 2rem 0 .75rem; font-size: 1.4rem; line-height: 1.25; }
.story__body blockquote { margin: 1.5rem 0; padding-left: 1.1rem; border-left: 3px solid var(--bata); font-style: italic; }
.story__body ul { margin: 0 0 1.1rem; padding-left: 1.3rem; font-size: 1.15rem; line-height: 1.7; }

/* ---------- Editor's report (/laporan/) ---------- */
.report { max-width: 56rem; }
.report h2 { margin: 2.25rem 0 .75rem; font-size: 1.35rem; }
.report h3 { margin: 1.5rem 0 .5rem; font-size: 1.1rem; }
.report__table { width: 100%; border-collapse: collapse; font: 400 .9rem/1.4 var(--sans); }
.report__table th, .report__table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--garis, #DDD5C6); }
.report__table th { font-weight: 600; color: var(--redup); }
.report__table td:not(:first-child) { white-space: nowrap; }
.report__fail td { color: var(--bata-teks); font-weight: 600; }
.report__list { padding-left: 1.2rem; font: 400 .95rem/1.5 var(--sans); }
.report__list li { margin-bottom: .6rem; }
.report__list code { font-size: .75rem; color: var(--redup); word-break: break-all; }

/* ---------- Footer links (Tentang Kami, Kontak, ...) ---------- */
.footer__links { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
.footer__links a { color: inherit; }

/* ---------- Side panels: Jadwal Salat (left) and Cuaca (right) on wide screens ---------- */
/* Wide screens: a column on each side of the centred page. Narrower: both panels are cards
   under Sorotan pekan ini (#side-cards, inside the page). Each panel is one component. */
.side { display: none; }
.sidecards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid var(--batu); }
.sidecards:empty { display: none; }
@media (min-width: 1500px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--wide) minmax(0, 1fr); column-gap: 1.25rem; align-items: start; }
  .layout > .page { grid-column: 2; min-width: 0; }
  .side { display: block; position: sticky; top: 1.5rem; width: 100%; max-width: 16rem; }
  .side--left { grid-column: 1; justify-self: end; }
  .side--right { grid-column: 3; justify-self: start; }
  .sidecards { display: none; }
}
@media (max-width: 640px) {
  .sidecards { grid-template-columns: minmax(0, 1fr); }
}
.sidepanel { padding: 1.1rem 1.2rem 1.2rem; background: var(--kertas-tua); border-radius: 3px; }
.sidepanel .rubric { margin-bottom: .75rem; }
.sidepanel__date { margin: 0 0 .6rem; font: 600 .95rem/1.35 var(--sans); }
.sidepanel__note { margin-top: .9rem; }
.side__pick { display: grid; gap: .3rem; margin-bottom: .9rem; font: 600 .8rem/1.2 var(--sans); color: var(--redup); }
.side__select {
  width: 100%; padding: .45rem .5rem;
  font: 400 .95rem/1.3 var(--sans); color: var(--tinta);
  background: var(--kertas); border: 1px solid var(--batu); border-radius: 3px;
}
.prayers { list-style: none; margin: 0; padding: 0; font: 400 .95rem/1.3 var(--sans); }
.prayers__item { display: flex; justify-content: space-between; gap: 1rem; padding: .32rem 0; border-bottom: 1px dotted var(--batu); }
.prayers__item:last-child { border-bottom: 0; }
.prayers__time { font-variant-numeric: tabular-nums; }
.prayers__item.is-next { font-weight: 700; color: var(--bata-teks); }
.weather__now { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }  /* narrow sidebars (1500 px): the text moves under the temperature */
.weather__temp { font: 700 2.8rem/1 var(--serif); letter-spacing: -0.02em; }
.weather__desc { margin: 0 0 .25rem; font: 600 1rem/1.25 var(--sans); }
.weather__next {
  list-style: none; margin: 1rem 0 0; padding: .8rem 0 0; border-top: 1px solid var(--batu);
  display: grid; gap: .4rem; font: 400 .9rem/1.3 var(--sans);
}
/* Time and temperature side by side; the condition wraps under them in a narrow panel. */
.weather__next li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.weather__next li > span:first-child { width: 3.2rem; }
.weather__t { width: 2.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.weather__next li > span:last-child { flex: 1 1 5rem; min-width: 0; }

/* ---------- Ringkasan Harian box (next to Catatan Sepekan) ---------- */
.digest__card { padding: 1.25rem 1.4rem 1.4rem; background: var(--kertas-tua); border-radius: 3px; }
.digest__card .meta { margin-bottom: .35rem; }
.digest__card .title { margin: 0 0 .5rem; font-size: 1.35rem; line-height: 1.2; font-weight: 700; }
.digest__card .para { font-size: 1rem; line-height: 1.6; margin: 0 0 1rem; }
.digest__card .more { margin-right: 1rem; }
@media (max-width: 960px) {
  .picks { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); }
  .column__card .title { font-size: 1.6rem; }
}

/* ---------- Jelajah Jatim: the editor's own stories on top of the tab ---------- */
.own { margin-bottom: 2rem; }
.own__list { display: grid; gap: 1.5rem; }
.own__card { padding-left: 1.1rem; border-left: 3px solid var(--bata); max-width: 46rem; }
.own__card .title { margin: 0 0 .4rem; font-size: clamp(1.4rem, 2.2vw, 1.7rem); line-height: 1.15; font-weight: 700; }
.own__card .para { font-size: 1.02rem; line-height: 1.6; margin-bottom: .75rem; }
.story__credit { margin: .4rem 0 0; font: 400 .8rem/1.4 var(--sans); color: var(--redup, #5C5850); }
.story__credit a { color: inherit; text-decoration: underline; }

.own__card--photo { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1.25rem; align-items: start; }
.own__thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--kertas-tua); }
.own__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .own__card--photo { grid-template-columns: minmax(0, 1fr) 6.5rem; gap: .75rem; }
  .own__thumb { aspect-ratio: 1; }
}
