/* Ledger Blue */
:root {
  --primary: #133B6E;
  --primary-dark: #0E2C52;
  --accent: #F2A900;
  --on-accent: #1A1A1A;
  --ground: #F5F7FA;
  --surface: #FFFFFF;
  --text: #17202B;
  --text-2: #3F4955;
  --muted: #556070;
  --border: #D9DEE5;
  --border-soft: #E6EAEF;
  --info-bg: #E3ECF7;
  --warn-bg: #FDF0CC; --warn-fg: #6B4A00;
  --muted-bg: #ECEEF1; --muted-fg: #4A525C;
  --radius: 12px;
  --font-body: 'Hind', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Mukta', 'Hind', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
a { color: var(--primary); }
a:hover { color: var(--text); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 840px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 14px; }

/* header */
.site-header { background: var(--primary); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: #fff; text-decoration: none; }
.header-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.header-nav a { color: #fff; text-decoration: none; }
.header-nav a:hover { text-decoration: underline; color: #fff; }
.lang { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.lang [aria-current] { font-weight: 600; }
.lang span { opacity: .7; }

/* search */
.search-band { background: var(--surface); border-bottom: 1px solid var(--border); }
.search-band .wrap { padding-top: 32px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.search-band h1 { font-size: 34px; }
.search { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.search label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search input { flex: 1 1 280px; height: 52px; border: 1px solid #C7CED8; border-radius: 8px; padding: 0 16px; font: inherit; font-size: 16px; background: var(--surface); color: var(--text); }
.search input:focus, .btn:focus-visible, .card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; border: 0; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: #D99800; color: var(--on-accent); }
.btn-outline { background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--info-bg); color: var(--primary); }

/* feed */
.feed-section { padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.feed-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.feed-head h2 { font-size: 22px; }
#feed { display: flex; flex-direction: column; gap: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.grid-narrow { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.feed-more { display: flex; justify-content: center; }
.empty { color: var(--muted); font-size: 17px; padding: 40px 0; text-align: center; }

/* card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(19, 59, 110, .08); color: var(--text); }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.card-org { font-size: 13px; color: var(--muted); font-weight: 500; }
.card-title { font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.3; }
.card-meta { margin-top: auto; display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--muted); }

/* badges */
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-info { background: var(--info-bg); color: var(--primary); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-muted { background: var(--muted-bg); color: var(--muted-fg); }

/* ads: fixed height so the page never jumps when an ad loads */
.ad-slot { min-height: 110px; border: 1.5px dashed #C7CED8; border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }

/* job page */
.detail { padding-top: 20px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.panel h2 { font-size: 22px; }
.job-main { padding: 28px; gap: 16px; }
.job-main h1 { font-size: 32px; }
.job-org-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.job-org { font-size: 15px; color: var(--muted); font-weight: 500; }
.expired-note { margin: 0; background: var(--muted-bg); color: var(--muted-fg); padding: 10px 14px; border-radius: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 0; }
.facts div { background: var(--surface); padding: 14px 16px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; font-size: 17px; }
.job-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.job-actions .btn { flex: 1 1 220px; min-height: 52px; }
.date-list { margin: 0; display: flex; flex-direction: column; }
.date-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.date-list div:last-child { border-bottom: 0; }
.date-list dt { color: var(--text-2); }
.date-list dd { margin: 0; font-weight: 600; }
.prose { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.notice-box { background: #EEF2F7; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.notice-box p { margin: 0; flex: 1 1 360px; color: var(--text-2); font-size: 15px; }
.related { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.related h2 { font-size: 22px; }

/* SEO links + footer */
.seo-links { background: var(--surface); border-top: 1px solid var(--border); }
.seo-links .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 24px; }
.seo-links h2 { font-size: 22px; }
.seo-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.seo-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.seo-col h3 { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.site-footer { background: var(--primary-dark); color: #D6E1F0; }
.footer-row { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-row p { margin: 0; font-size: 14px; line-height: 1.6; flex: 1 1 420px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.footer-nav a { color: #fff; }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .search-band h1 { font-size: 28px; }
  .job-main h1 { font-size: 26px; }
  .panel, .job-main { padding: 20px; }
}
.auto-note { margin: 0; background: var(--info-bg); color: var(--primary); padding: 10px 14px; border-radius: 8px; font-size: 15px; }
[data-batch] { display: flex; flex-direction: column; gap: 24px; }
.to-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: inline-flex; align-items: center;
  justify-content: center; box-shadow: 0 4px 14px rgba(19, 59, 110, .25); cursor: pointer; z-index: 20; }
.to-top:hover { background: var(--primary-dark); }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.to-top[hidden] { display: none; }
/* sector colours: government = navy, private = teal */
:root { --govt: #133B6E; --govt-soft: #C9D6E8; --private: #0F766E; --private-soft: #BFE0DA; }
.card-govt { border-color: var(--govt-soft); border-left: 4px solid var(--govt); }
.card-private { border-color: var(--private-soft); border-left: 4px solid var(--private); }
.card-govt:hover { border-color: var(--govt); }
.card-private:hover { border-color: var(--private); box-shadow: 0 2px 10px rgba(15, 118, 110, .10); }
.badge-private { background: #DDF1EE; color: #0F5F59; }
.job-govt { border-top: 4px solid var(--govt); }
.job-private { border-top: 4px solid var(--private); }
/* organisation pages */
.org-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.org-head h1 { font-size: 32px; }
.search-band .crumbs { margin-bottom: -4px; }
.expired-list ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.org-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 20px; }
.org-list li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 8px 0 8px 12px; border-bottom: 1px solid var(--border-soft); }
.org-list li.org-govt { border-left: 3px solid var(--govt); }
.org-list li.org-private { border-left: 3px solid var(--private); }
.org-link { margin: 0; font-weight: 600; }
/* sector colours v2: complete outline instead of a side stripe */
:root { --govt-mid: #8FA9CF; --private-mid: #7CC0B6; }
.card-govt, .card-private { border-width: 1.5px; border-style: solid; }
.card-govt { border-color: var(--govt-mid); border-left-width: 1.5px; border-left-color: var(--govt-mid); }
.card-private { border-color: var(--private-mid); border-left-width: 1.5px; border-left-color: var(--private-mid); }
.card-govt:hover, .card-govt:focus-visible { border-color: var(--govt); }
.card-private:hover, .card-private:focus-visible { border-color: var(--private); }
.job-govt { border: 1.5px solid var(--govt-mid); border-top-width: 1.5px; }
.job-private { border: 1.5px solid var(--private-mid); border-top-width: 1.5px; }
.org-list li.org-govt, .org-list li.org-private { border-left: 0; padding-left: 0; }
.org-list li.org-govt a::before, .org-list li.org-private a::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.org-list li.org-govt a::before { background: var(--govt); }
.org-list li.org-private a::before { background: var(--private); }
.expired-list li .badge { margin-right: 6px; vertical-align: 1px; }
/* sector + status badges, category chips */
.card-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge-psu { background: #E4E9F2; color: #2B3F63; }
.badge-new { background: #E3F1E6; color: #1E5A3A; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 38px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip[aria-current] { background: var(--primary); border-color: var(--primary); color: #fff; }
.badge-state { background: #EEE7F6; color: #4B2E83; }
/* initials badge + card facts */
.card-org { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: .2px; font-family: var(--font-body); }
.card-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--text-2); }
.fact { display: inline-flex; align-items: center; gap: 5px; }
.fact::before { content: ""; width: 14px; height: 14px; flex: 0 0 auto; background-color: currentColor; opacity: .75;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.fact-qual { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 10 12 5 2 10l10 5 10-5z'/%3E%3Cpath d='M6 12v5c3 2 9 2 12 0v-5'/%3E%3C/svg%3E"); }
.fact-exp { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E"); }
.fact-pay { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12M6 8h12M6 13l8.5 8M6 13h3a5 5 0 0 0 0-10'/%3E%3C/svg%3E"); }
/* logos (only with permission) */
.avatar-logo { background: #fff; border: 1px solid var(--border); overflow: hidden; border-radius: 8px; }
.avatar-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.org-logo { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 4px; }
/* card v3: table of tiles */
.card { gap: 12px; min-height: 0; }
.card-top { align-items: flex-start; }
.card-org-name { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-table { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; background: var(--border-soft); gap: 1px; }
.card-table .tile { background: var(--surface); padding: 8px 10px; min-width: 0; }
.card-table .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.card-table dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.card-table dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.card-table dd.muted { font-weight: 500; color: var(--muted); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding-top: 2px; }
.card-cta { color: var(--primary); font-weight: 600; }
.card-private .card-cta { color: var(--private); }
.card-facts { display: none; }
.tile-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.link-only { align-items: flex-start; }
.link-only p { margin: 0; font-size: 16px; }
.org-list li a.small { font-weight: 500; white-space: nowrap; }
/* organisations directory v2: tiles */
.org-tabs .chip { cursor: pointer; font: inherit; font-size: 14px; }
.org-tabs .chip span { margin-left: 6px; font-size: 12px; opacity: .7; }
.org-tabs .chip[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.org-tile { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; min-height: 76px; }
.org-tile[hidden] { display: none; }
.org-tile-govt:hover { border-color: var(--govt); box-shadow: 0 2px 10px rgba(19, 59, 110, .08); color: var(--text); }
.org-tile-private:hover { border-color: var(--private); box-shadow: 0 2px 10px rgba(15, 118, 110, .08); color: var(--text); }
.avatar-md { width: 40px; height: 40px; font-size: 13px; }
.org-tile-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.org-tile-name { font-weight: 600; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.org-tile-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.org-tile-type { color: var(--muted); }
.pill { padding: 2px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.pill-open { background: #E3F1E6; color: #1E5A3A; }
.pill-quiet { background: #EEF0F3; color: #5B6472; font-weight: 500; }
.pill-link { background: #DDF1EE; color: #0F5F59; }
/* tidy notice rows */
.notices-panel { gap: 6px; }
.notice-rows { list-style: none; margin: 4px 0 0; padding: 0; }
.notice-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.notice-row:first-child { border-top: 0; }
.nr-date { font-size: 13.5px; font-weight: 600; color: var(--text-2); line-height: 1.25; text-align: left; }
.nr-date small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.nr-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nr-title { color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nr-title:hover { color: var(--primary); text-decoration: underline; }
.nr-meta { font-size: 12.5px; color: var(--muted); }
.nr-meta a { color: var(--muted); text-decoration: none; }
.nr-meta a:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 560px) { .notice-row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; } }
