/* ==========================================================================
   Fuel Price Today — shared stylesheet (ONE file for the whole site)
   Design system v1 · 13 Nov 2026 · No frameworks, no webfonts, mobile-first.
   Colours: ORIGINAL green theme (hero solid #1a6b3c), restored 13 Nov 2026
   to match the pre-rebuild site. Variable names keep their legacy
   navy/amber labels; the values below are the green palette.
   ========================================================================== */

:root {
  --navy-900: #14532d;
  --navy-800: #166534;
  --navy-700: #15803d;
  --navy-600: #1a6b3c;
  --amber-500: #1a6b3c;
  --amber-600: #15803d;
  --amber-100: #dcfce7;
  --teal-600: #0e7490;
  --green-600: #15803d;
  --green-100: #dcfce7;
  --red-600: #b91c1c;
  --red-100: #fee2e2;
  --ink: #1a2433;
  --muted: #5c6b5e;
  --line: #dce8de;
  --bg: #f6faf7;
  --card: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(20, 83, 45, .08), 0 4px 14px rgba(20, 83, 45, .06);
  --shadow-lg: 0 6px 24px rgba(20, 83, 45, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --max: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--amber-600); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy-900); }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.2em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: .3em; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .65em .8em; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.section { padding: 2.5rem 0; }
.section--white { background: var(--card); }
.section--navy { background: var(--navy-800); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.lead { font-size: 1.1rem; color: var(--muted); }
.small { font-size: .875rem; color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* Skip link (accessibility) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--amber-500); color: #fff;
  padding: .6em 1em; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
/* White header so the logo (dark navy text) is fully readable. */
.site-header {
  background: #fff; color: var(--ink);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(20, 83, 45, .12);
  border-bottom: 1px solid var(--line);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; }
.site-logo { display: flex; align-items: center; }
.site-logo:hover { text-decoration: none; }
.site-logo img { height: 58px; width: auto; max-width: 260px; display: block; }

.nav-toggle {
  display: none; background: none; border: 1px solid #cbd5cb;
  color: #14532d; border-radius: var(--radius-sm); padding: .45em .7em;
  font-size: 1rem; cursor: pointer; line-height: 1;
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .55em .8em; color: var(--ink); border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #14532d; background: #dcfce7; text-decoration: none; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 #1a6b3c; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .875rem; color: var(--muted); padding: 1rem 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .4em; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: .4em; color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { background: #1a6b3c; color: #fff; padding: 2.5rem 0 2rem; }
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: .3em; }
.hero .lead { color: #dcfce7; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; color: #dcfce7; margin-top: 1rem; }
.hero-meta strong { color: #fff; }
.badge {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .03em;
  padding: .25em .7em; border-radius: 999px; background: var(--amber-100); color: #14532d;
}
.badge--green { background: var(--green-100); color: var(--green-600); }
.badge--navy { background: var(--navy-700); color: #fff; }

/* Live-price attribution (OilPrices.pk, CC BY 4.0) — shown next to the rates */
.live-attribution { font-size: .85rem; color: #dcfce7; margin-top: 1rem; }
.live-attribution a { color: #fff; text-decoration: underline; }
.live-attribution--light { color: var(--muted); }
.live-attribution--light a { color: var(--navy-600); }

/* ---------- Price cards ---------- */
.price-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow); position: relative;
}
.price-card__icon { font-size: 1.6rem; line-height: 1; }
.price-card__name { font-weight: 700; color: var(--navy-900); margin: .4em 0 .1em; }
.price-card__price { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.price-card__unit { font-size: .85rem; color: var(--muted); }
.price-card__meta { font-size: .85rem; color: var(--muted); margin-top: .6em; }
.price-card__meta strong { color: var(--ink); }
.change { font-weight: 700; font-size: .9rem; }
.change--down { color: var(--green-600); }
.change--up { color: var(--red-600); }
.change--flat { color: var(--muted); }

/* ---------- Rates table ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap table { min-width: 640px; }
.table-wrap thead th { background: var(--navy-800); color: #fff; }
.table-wrap tbody tr:hover { background: #f0fdf4; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 700; font-size: 1rem; text-align: center;
  padding: .65em 1.4em; border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--amber-500); color: #fff; }
.btn--primary:hover { background: var(--navy-900); color: #fff; }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-600); color: #fff; }
.btn--outline { border-color: var(--navy-800); color: var(--navy-800); background: transparent; }
.btn--outline:hover { background: var(--navy-800); color: #fff; }
.btn--white { background: #fff; color: var(--navy-900); }
.btn--white:hover { background: var(--amber-100); color: var(--navy-900); }
.btn--block { display: block; width: 100%; }

/* ---------- City / country grids ---------- */
.link-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.link-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow);
  color: var(--ink);
}
.link-card:hover { text-decoration: none; border-color: var(--amber-500); box-shadow: var(--shadow-lg); }
.link-card__title { font-weight: 700; color: var(--navy-900); font-size: 1.05rem; }
.link-card__sub { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.link-card__prices { font-size: .95rem; margin-top: .5em; }
.link-card__prices strong { color: var(--ink); }
.link-card__desc { font-size: .9rem; color: var(--muted); margin-top: .4em; }
.link-card__cta { font-size: .9rem; font-weight: 700; color: var(--navy-600); margin-top: .5em; }

/* ---------- Benchmark cards (crude oil) ---------- */
.bench-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.bench-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.bench-card__name { font-weight: 700; color: var(--navy-900); }
.bench-card__ticker { font-size: .8rem; color: var(--muted); }
.bench-card__price { font-size: 1.6rem; font-weight: 800; color: var(--ink); margin-top: .25em; }
.bench-card__unit { font-size: .85rem; color: var(--muted); }

/* ---------- Calculator ---------- */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.calc__grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.calc__results { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.calc__result { background: var(--navy-800); color: #fff; border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.calc__result--amber { background: var(--amber-100); color: var(--navy-900); }
.calc__result-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.calc__result-value { font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.calc__result-unit { font-size: .85rem; opacity: .85; }
.calc__note { font-size: .875rem; color: var(--muted); margin-top: 1rem; }
.calc__formula { background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; font-size: .9rem; margin-top: 1rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35em; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .65em .8em; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--amber-500); border-color: var(--amber-500); }
.field__hint { font-size: .85rem; color: var(--muted); margin-top: .3em; }
.radio-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.radio-pill { display: inline-flex; align-items: center; gap: .4em; border: 1px solid var(--line); border-radius: 999px; padding: .45em 1em; cursor: pointer; font-weight: 600; background: #fff; }
.radio-pill input { accent-color: var(--amber-600); }
.radio-pill:has(input:checked) { border-color: var(--amber-500); background: var(--amber-100); }

/* ---------- FAQ accordion (details/summary, no JS needed) ---------- */
.faq { max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .6rem; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy-900); padding: .9rem 1.1rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--amber-600); font-size: 1.2rem; line-height: 1; }
.faq details[open ] summary::after { content: "−"; }
.faq details p { padding: 0 1.1rem 1rem; margin: 0; color: var(--ink); }

/* ---------- Guide / prose content ---------- */
.prose { max-width: 820px; }
.prose h2 { border-bottom: 3px solid var(--amber-500); padding-bottom: .3em; display: inline-block; }
.callout { background: var(--amber-100); border-left: 4px solid var(--amber-500); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.callout--info { background: #e0f2fe; border-left-color: var(--teal-600); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #dcfce7; padding: 2.5rem 0 1.5rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.site-footer a { color: #dcfce7; }
.site-footer a:hover { color: #86efac; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .45em; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; text-align: center; color: #a7c8b4; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
  .bench-grid { grid-template-columns: repeat(2, 1fr); }
  .calc__grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  h1 { font-size: 2.3rem; }
  .hero h1 { font-size: 2.5rem; }
  .price-grid { grid-template-columns: repeat(4, 1fr); }
  .link-grid { grid-template-columns: repeat(3, 1fr); }
  .link-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .bench-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .calc__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; padding-bottom: .75rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .7em .8em; }
  .header-bar { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .site-logo img { height: 46px; max-width: 210px; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .calc { display: none; }
  body { background: #fff; }
}
