@font-face {
  font-family: "Source Serif Pro";
  src: url("fonts/SourceSerifPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif Pro";
  src: url("fonts/SourceSerifPro-It.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif Pro";
  src: url("fonts/SourceSerifPro-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif Pro";
  src: url("fonts/SourceSerifPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f3eee5;
  --bg-elev: #fffdf8;
  --ink: #1c1612;
  --ink-soft: #5c534a;
  --line: #ddd2c3;
  --clove: #7a2e22;
  --clove-deep: #3a1c14;
  --header: #2a1812;
  --cream: #f4efe6;
  --gold: #b8944a;
  --hold-bg: #f3e5c4;
  --hold-ink: #4a3208;
  --alert-bg: #f8ece6;
  --alert-ink: #5c2618;
  --alert-line: #c45a3a;
  --stale: #8a7f72;
  --thead: #3a1c14;
  --row-alt: #f7f1e8;
  --max: 46rem;
  --max-wide: 66rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Noto Sans", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 430;
  -webkit-font-smoothing: antialiased;
}

/* Let the Google Translate bar reserve its own space so it does not cover the header. */
.goog-logo-link, .goog-te-gadget span { display: none !important; }
.goog-te-gadget { font-size: 0 !important; color: transparent !important; }
.goog-te-gadget .goog-te-combo,
.goog-te-gadget-simple {
  font-size: 0.8rem !important;
  font-family: "Source Sans 3", sans-serif !important;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--clove); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: #5c1f16; }
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--gold);
  color: var(--header);
  padding: 0.4rem 0.7rem;
  z-index: 20;
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

/* Header */
.site-header {
  background: var(--header);
  color: var(--cream);
  padding: 0.9rem 1.1rem 1rem;
  border-bottom: 3px solid var(--gold);
}
.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}
.brand-block { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
}
.brand {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #fffdf8;
  text-decoration: none;
}
.brand:hover { color: #fffdf8; }
.tagline {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.78);
}

.header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.site-nav { display: flex; gap: 0.9rem; }
.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 560;
  opacity: 0.88;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { opacity: 1; color: #fff; text-decoration: underline; }

.translate-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 253, 248, 0.08);
  border: 1px solid rgba(244, 239, 230, 0.28);
  border-radius: 4px;
  padding: 0.28rem 0.5rem;
  min-height: 2.1rem;
}
.translate-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.8);
  white-space: nowrap;
}
#google_translate_element { line-height: 1; min-width: 5.5rem; min-height: 1.4rem; }
.goog-te-gadget-simple {
  background: #fffdf8 !important;
  border: 0 !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
}

/* Layout */
.wrap {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.35rem 1.1rem 3.5rem;
}
.article-head { max-width: var(--max); margin: 0 auto 1.4rem; }
.kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clove);
}
.article-head h1 {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  line-height: 1.22;
  margin: 0 0 0.4rem;
  color: var(--clove-deep);
}
.meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Signal */
.signal {
  max-width: var(--max);
  margin: 0 auto 1.25rem;
  background: var(--hold-bg);
  border: 1px solid #e0c78a;
  border-left: 6px solid var(--gold);
  border-radius: 2px 6px 6px 2px;
  padding: 0.95rem 1.15rem 1rem;
}
.signal .label {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hold-ink);
}
.signal .call {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--hold-ink);
  margin: 0 0 0.3rem;
}
.signal .bias {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 560;
  color: var(--hold-ink);
}

/* Alerts */
.alerts {
  max-width: var(--max);
  margin: 0 auto 1.5rem;
  background: var(--alert-bg);
  border: 1px solid #e8c8ba;
  border-left: 6px solid var(--alert-line);
  border-radius: 2px 6px 6px 2px;
  padding: 0.95rem 1.15rem 1rem;
}
.alerts h2 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--alert-ink);
}
.alerts ul { margin: 0; padding: 0; list-style: none; }
.alerts li + li { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid #e8c8ba; }
.alerts li { color: var(--alert-ink); }
.alerts strong { color: var(--clove-deep); }

.prose, .section { max-width: var(--max); margin-left: auto; margin-right: auto; }
.prose p, .section p { margin: 0 0 0.85rem; }
.prose ul, .section ul { margin: 0 0 0.95rem; padding-left: 1.15rem; }
.prose li + li, .section li + li { margin-top: 0.35rem; }
.lead { font-size: 1.08rem; }

.timing {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 1.1rem 0.95rem;
  margin: 0 0 1.4rem;
}
.timing h2 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-family: "Source Serif Pro", Georgia, serif;
  color: var(--clove-deep);
}
.timing ul { margin: 0; }

/* Sections */
.section { margin: 1.85rem auto 0; }
.section h2 {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--clove-deep);
  margin: 0 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}
.section h3 {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 600;
  font-size: 1.08rem;
  margin: 1.15rem 0 0.45rem;
  color: var(--ink);
}
.section-wide { max-width: var(--max-wide); }

.note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-elev);
  -webkit-overflow-scrolling: touch;
}
.table-wrap + .note,
.note + .table-wrap { margin-top: 0.35rem; }
.scroll-hint {
  display: none;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .scroll-hint { display: block; }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
caption {
  text-align: left;
  font-weight: 650;
  padding: 0.55rem 0.7rem 0.35rem;
  color: var(--clove-deep);
  font-size: 0.88rem;
}
th, td {
  padding: 0.42rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--thead);
  color: #f4efe6;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.flag { font-size: 0.82rem; color: var(--ink-soft); }
.stale { color: var(--stale); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.03em; }

/* Map */
.figure {
  margin: 0.4rem 0 0.6rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem;
}
.figure img {
  width: 100%;
  background: #fff;
}
.figure figcaption {
  margin: 0.65rem 0.25rem 0.15rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Sources / footer */
.sources ol {
  padding-left: 1.25rem;
  margin: 0;
}
.sources li { margin: 0.25rem 0; }
.sources li::marker { font-weight: 600; color: var(--clove); }

.disclaimer {
  max-width: var(--max);
  margin: 1.75rem auto 0;
  padding: 0.85rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.disclaimer p { margin: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding: 1.2rem 1.1rem 2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer strong {
  font-family: "Source Serif Pro", Georgia, serif;
  color: var(--clove-deep);
  font-weight: 600;
}
.site-footer p { margin: 0.2rem 0; }

/* Archive */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.archive-list li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.9rem 1rem;
}
.archive-list a { font-weight: 650; text-decoration: none; }
.archive-list a:hover { text-decoration: underline; }
.archive-list .when { display: block; color: var(--ink-soft); font-weight: 430; font-size: 0.9rem; margin-top: 0.15rem; }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-header { padding: 0.8rem 0.85rem 0.9rem; }
  .brand { font-size: 1.35rem; }
  .wrap { padding: 1.05rem 0.8rem 2.5rem; }
  th, td { padding: 0.38rem 0.5rem; }
  .signal, .alerts, .timing { padding-left: 0.85rem; padding-right: 0.85rem; }
}

/* Wide sections: titles stay in the text column; tables and figures can use the full width. */
.section-wide h2,
.section-wide h3,
.section-wide > p,
.section-wide > ul {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.section-wide .table-wrap,
.section-wide .scroll-hint,
.section-wide .figure,
.section-wide .note,
.section-wide .top8 {
  max-width: var(--max-wide);
}

.figure-map {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.figure-map img {
  width: 52rem;
  max-width: none;
  min-width: 52rem;
  height: auto;
  background: #fff;
}
@media (min-width: 800px) {
  .figure-map img {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}
.map-actions {
  margin: 0.35rem 0.25rem 0;
  font-size: 0.88rem;
}
.top8 { margin: 0.7rem 0 0.2rem; }
.top8 h3 { margin-top: 0.4rem; }
@media (min-width: 800px) {
  .top8-mobile { display: none; }
}

/* Flowering report */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin: 0 auto 1.25rem;
  max-width: var(--max-wide);
}
@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .summary-grid { grid-template-columns: 1fr; }
}
.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.8rem 0.95rem 0.9rem;
}
.stat-card .stat-label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stat-card .stat-value {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.1;
  color: var(--clove-deep);
  margin: 0;
}
.stat-card .stat-sub {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.stat-card.placeholder .stat-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.nation-meter {
  max-width: var(--max-wide);
  margin: 0 auto 1.4rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 1rem 1rem;
}
.nation-meter .meter-caption {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin: 0 0 0.45rem;
  font-weight: 600;
  color: var(--clove-deep);
}
.bar {
  position: relative;
  height: 1.15rem;
  background: #efe6d8;
  border-radius: 999px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f4a261, #74a344 55%, #2d6a4f);
}
.bar.mini { height: 0.65rem; width: 3.6rem; display: inline-block; vertical-align: middle; margin-right: 0.35rem; }
.cond {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}
.cond-good { background: #e3f0e4; color: #1e5a32; }
.cond-fair { background: #f3e5c4; color: #6a4a10; }
.cond-poor { background: #f8e0da; color: #8a2418; }
.muted, .placeholder-cell {
  color: var(--ink-soft);
  font-style: italic;
}
.driver { font-size: 0.82rem; line-height: 1.4; color: #3a332c; }
table.flower th:first-child,
table.flower td:first-child {
  position: sticky;
  left: 0;
  background: var(--bg-elev);
  z-index: 1;
  box-shadow: 1px 0 0 var(--line);
}
table.flower tbody tr:nth-child(even) td:first-child { background: var(--row-alt); }
table.flower thead th:first-child { background: var(--thead); z-index: 2; }
.method-note {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.95rem 1.1rem 1rem;
  font-size: 0.95rem;
}
.method-note h2 { margin-top: 0; }
.method-note p:last-child { margin-bottom: 0; }

.figure-chart {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.figure-chart img {
  width: 52rem;
  max-width: none;
  min-width: 52rem;
  height: auto;
  background: #fff;
}
@media (min-width: 900px) {
  .figure-chart img {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* Android app download */
.app-download {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.app-download h2 { margin-top: 0; }
.download-btn {
  display: inline-block;
  background: var(--header);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 2px solid var(--gold);
}
.download-btn:hover, .download-btn:focus { background: var(--clove); color: #fff; }
.install-steps { padding-left: 1.3rem; margin: 0.6rem 0; }
.install-steps li { margin: 0.3rem 0; }
.install-note { font-size: 0.9rem; color: var(--stale); margin-bottom: 0; }
/* Inside the Android app the download block is not needed */
html.in-app .app-download { display: none; }
/* The app has its own top bar with the name and icon */
html.in-app .brand-block { display: none; }

/* iPhone Add to Home Screen */
.install-block {
  max-width: var(--max);
  margin: 1.85rem auto 0;
}
.install-block > .ios-install,
.install-block .install-pair > .section {
  margin-top: 0;
}
.install-pair {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  html:not(.is-ios) .install-pair {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}
html.is-ios .install-pair { margin-top: 1rem; }

.ios-install {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.ios-install h2 { margin-top: 0; }
.ios-install-featured { display: none; }
html.is-ios .ios-install-featured {
  display: block;
  border: 2px solid var(--gold);
  box-shadow: 0 1px 0 rgba(42, 24, 18, 0.06);
}
html.is-ios .ios-install-lower { display: none; }

.ios-steps {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0.9rem;
  display: grid;
  gap: 0.65rem;
}
.ios-steps li,
.section .ios-steps li + li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}
.ios-step-icon {
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--header);
  color: #e6c888;
  border-radius: 8px;
}
.ios-step-svg { display: block; }
.ios-step-text { padding-top: 0.35rem; }

/* Inside the Android app, iPhone install instructions are not needed */
html.in-app .ios-install { display: none !important; }

/* Wider "Pemicu utama" (main trigger) column so its text reads comfortably. */
table.flower td.driver,
table.flower th:last-child { min-width: 26rem; width: 26rem; white-space: normal; }
@media (max-width: 640px) {
  table.flower td.driver,
  table.flower th:last-child { min-width: 18rem; width: 18rem; }
}
