/* Keystone Infrastructure Group — site styles
   Dark theme matched to the Keystone logo set: near-black, amber #D48E39, topographic contours. */

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

/* Dark theme: KIG navy with gold line work */
:root {
  --bg: #0D0E10;
  --bg-2: #131417;
  --panel: #1B1C20;
  --ink: #F0EDE7;
  --ink-2: #A9ABB0;
  --gold: #D48E39;
  --gold-text: #E3A257;
  --line: rgba(240,237,231,0.11);
  --line-strong: rgba(240,237,231,0.24);
  --measure: 68ch;
  --wrap: 1120px;
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Source Sans", "Segoe UI", Calibri, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: #0D0E10; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--bg); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(13,14,16,0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 58px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; letter-spacing: 0.01em; }
.brand small { font-size: 0.8rem; color: var(--ink-2); }
.nav { display: flex; gap: 26px; align-items: center; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.05rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
.label { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; font-weight: 600; color: var(--gold-text); margin-bottom: 14px; letter-spacing: 0.02em; }
.label::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.lede { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }

/* ---------- Sections ---------- */
section { padding: 88px 0; border-top: 1px solid var(--line); position: relative; }
section.tint { background: var(--bg-2); }
.section-head { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.section-head p { margin: 0; color: var(--ink-2); }

/* Gold line work */
.geo { position: relative; overflow: hidden; }
.geo::before { content: ""; position: absolute; inset: 0; background: url("geo-lines.svg") center / cover no-repeat; pointer-events: none; }
.geo > .wrap { position: relative; }
.geo-corner::after { content: ""; position: absolute; inset: 0; background: url("geo-lines.svg") center / cover no-repeat; opacity: 0.4; pointer-events: none; }
.geo-corner > .wrap { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 104px; border-top: 0; background: radial-gradient(ellipse at 80% 40%, rgba(212,142,57,0.07), transparent 60%), var(--bg); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.hero h1 { margin-bottom: 24px; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--gold-text); }
.hero .lede { margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.btn { display: inline-block; font: 600 1rem var(--sans); padding: 13px 22px; border: 1px solid var(--gold); background: var(--gold); color: #0D0E10; text-decoration: none; cursor: pointer; }
.btn:hover { background: #E3A257; color: #0D0E10; }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.link-arrow::after { content: " \2192"; }

.glance { border: 1px solid var(--line-strong); border-top: 2px solid var(--gold); background: rgba(19,20,23,0.88); padding: 26px 28px 10px; }
.glance h2 { font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--gold-text); margin-bottom: 14px; letter-spacing: 0.02em; }
.glance dl { margin: 0; }
.glance div { padding: 12px 0; border-top: 1px solid var(--line); }
.glance dt { font-size: 0.85rem; color: var(--ink-2); }
.glance dd { margin: 2px 0 0; font-weight: 600; }

/* ---------- Two column text ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 64px; }
.split .prose p:last-child { margin-bottom: 0; }

/* ---------- Comparison table ---------- */
.compare { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 16px 20px; border: 1px solid var(--line-strong); }
.compare thead th { font-weight: 600; font-size: 0.95rem; }
.compare thead th:first-child { background: var(--panel); color: var(--ink-2); }
.compare thead th:last-child { background: var(--gold); color: #0D0E10; }
.compare td:first-child { color: var(--ink-2); width: 46%; background: rgba(27,28,32,0.6); }

/* ---------- Deliverable list (mobilisation) ---------- */
.deliverables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 0; }
.deliverables div { padding: 20px 0; border-top: 1px solid var(--line); }
.deliverables dt { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; margin-bottom: 4px; }
.deliverables dd { margin: 0; color: var(--ink-2); }
.callout { margin-top: 40px; padding: 22px 26px; border-left: 2px solid var(--gold); background: var(--panel); font-family: var(--serif); font-size: 1.15rem; max-width: 820px; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.service { padding: 28px 0 8px; border-top: 1px solid var(--gold); }
.service h3 { margin-bottom: 6px; }
.service .intro { color: var(--ink-2); font-style: italic; font-family: var(--serif); margin-bottom: 12px; }
.service ul, .plain-list { margin: 0 0 20px; padding: 0; list-style: none; }
.service li, .plain-list li { position: relative; padding: 6px 0 6px 20px; }
.service li::before, .plain-list li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 8px; height: 1px; background: var(--gold); }

/* ---------- Experience table ---------- */
.projects { width: 100%; border-collapse: collapse; }
.projects th, .projects td { text-align: left; vertical-align: top; padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); }
.projects thead th { font-size: 0.85rem; font-weight: 700; color: var(--gold-text); border-bottom: 1px solid var(--gold); padding-top: 0; }
.projects td:first-child { font-family: var(--serif); font-weight: 600; width: 27%; }
.projects td:nth-child(2) { color: var(--ink-2); width: 19%; white-space: nowrap; font-size: 0.95rem; }
.footnote { font-size: 0.92rem; color: var(--ink-2); margin-top: 20px; }

/* ---------- Associates / how we work ---------- */
.disciplines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin: 0; }
.disciplines div { padding: 18px 0; border-top: 1px solid var(--line); }
.disciplines dt { font-weight: 700; margin-bottom: 2px; }
.disciplines dd { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.steps li { counter-increment: step; padding: 20px 0 20px 46px; border-top: 1px solid var(--line); position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 18px; font-family: var(--serif); font-size: 1.5rem; color: var(--gold-text); line-height: 1; }

/* ---------- Procurement ---------- */
.proc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.facts { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 11px 14px; border: 1px solid var(--line-strong); }
.facts th { background: var(--panel); color: var(--ink-2); font-weight: 600; width: 40%; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 64px; }
.contact-details { margin: 28px 0 0; }
.contact-details div { padding: 12px 0; border-top: 1px solid var(--line); }
.contact-details dt { font-size: 0.85rem; color: var(--ink-2); }
.contact-details dd { margin: 2px 0 0; font-weight: 600; }
form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 6px; }
input, textarea, select { width: 100%; font: inherit; color: var(--ink); padding: 12px 14px; border: 1px solid var(--line-strong); background: var(--bg); border-radius: 0; }
select { color-scheme: dark; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.88rem; color: var(--ink-2); margin: 0; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: #08090A; color: var(--ink-2); padding: 52px 0 36px; font-size: 0.92rem; border-top: 1px solid var(--gold); }
.site-footer a { color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-grid h2 { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; color: var(--gold-text); margin-bottom: 10px; }
.footer-grid p { margin: 0 0 6px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-logo { width: 190px; margin-bottom: 14px; }
.legal { padding-top: 22px; font-size: 0.84rem; color: #7F8893; }
.legal p { max-width: none; margin: 0 0 4px; }
.tagline { font-family: var(--serif); font-style: italic; color: var(--ink); font-size: 1.05rem; }

/* ---------- Simple pages ---------- */
.page { padding: 72px 0 96px; }
.page .wrap > * { max-width: 760px; }
.page h1 { margin-bottom: 22px; }
.page h2 { font-size: 1.35rem; margin: 38px 0 10px; }
.page ul { padding-left: 20px; }
.page li { margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap, .split, .contact, .proc { grid-template-columns: 1fr; gap: 40px; }
  .disciplines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  section { padding: 64px 0; }
  .wrap { padding: 0 22px; }
  .site-header .wrap { flex-wrap: wrap; gap: 6px 16px; padding-top: 10px; padding-bottom: 8px; }
  .brand img { width: 46px; }
  .nav { width: 100%; flex-wrap: wrap; gap: 4px 18px; padding-bottom: 2px; font-size: 0.92rem; }
  .deliverables, .services, .steps, .disciplines, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100% !important; }
  .compare tr { margin-bottom: 14px; border: 1px solid var(--line); }
  .compare td { border: 0; padding: 12px 16px; }
  .compare td:first-child { background: var(--panel); font-size: 0.95rem; }
  .compare td:first-child::before { content: "Traditional model"; display: block; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
  .compare td:last-child::before { content: "The Keystone model"; display: block; font-size: 0.78rem; font-weight: 700; color: var(--gold-text); }
  .projects thead { display: none; }
  .projects, .projects tbody, .projects tr, .projects td { display: block; width: 100% !important; }
  .projects tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .projects td { border: 0; padding: 2px 0; white-space: normal !important; }
}

@media print {
  .site-header, .site-footer, form, .actions { display: none; }
  section { padding: 24px 0; border: 0; }
}

@media (max-width: 760px) {
  .geo::before { opacity: 0.5; }
  .geo-corner::after { opacity: 0.25; }
}

/* ---------- Project slider ---------- */
.slider-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; }
.slider-head .section-head { margin-bottom: 0; }
.slider-controls { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.slider-count { font-family: var(--serif); color: var(--ink-2); font-size: 1rem; min-width: 64px; text-align: right; }
.slider-count strong { color: var(--gold-text); font-weight: 600; }
.slider-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.slider-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-text); }
.slider-btn:disabled { opacity: 0.3; cursor: default; }
.slider-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 28px) / 2.15); gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 0 22px; margin: 0; list-style: none; scrollbar-width: none; overscroll-behavior-x: contain; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.project-card { scroll-snap-align: start; position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 380px; padding: 30px 30px 28px; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--gold); }
.project-card::after { content: ""; position: absolute; right: -40%; bottom: -30%; width: 120%; height: 120%; background: url("geo-lines.svg") center / cover no-repeat; opacity: 0.22; pointer-events: none; transform: rotate(8deg); }
.project-card > * { position: relative; z-index: 1; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.chip.sector { border-color: var(--gold); color: var(--gold-text); }
.project-card h3 { font-size: 1.45rem; margin-bottom: 14px; }
.project-card p { color: var(--ink-2); margin: 0; }
.figure { margin-top: auto; padding-top: 24px; display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--line); }
.figure strong { font-family: var(--serif); font-size: 2.4rem; font-weight: 600; color: var(--gold-text); line-height: 1; }
.figure span { color: var(--ink-2); font-size: 0.95rem; }
.slider-progress { height: 2px; background: var(--line); position: relative; }
.slider-progress span { position: absolute; left: 0; top: 0; height: 100%; width: 12.5%; background: var(--gold); transition: left 0.3s ease, width 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .slider-track { scroll-behavior: auto; } .slider-progress span { transition: none; } }
@media (max-width: 980px) { .slider-track { grid-auto-columns: 78%; } }
@media (max-width: 760px) {
  .slider-head { flex-direction: column; align-items: flex-start; }
  .slider-track { grid-auto-columns: 88%; gap: 16px; }
  .project-card { min-height: 0; padding: 24px 22px; }
  .project-card h3 { font-size: 1.25rem; }
  .figure strong { font-size: 2rem; }
}

/* ======================================================================
   Multi-page additions: hub tiles, page heroes, tools
   ====================================================================== */
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]:not(.nav-cta) { border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
section.tight { padding: 56px 0 80px; }
.hero-short { display: block !important; max-width: 820px; }
.hero { padding: 88px 0 80px; }

.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 85% 30%, rgba(212,142,57,0.07), transparent 60%), var(--bg); }
.page-hero h1 { margin-bottom: 18px; max-width: 820px; }
.page-hero .lede { max-width: 72ch; margin-bottom: 0; }
.data-note { font-size: 0.92rem; color: var(--ink-2); margin-top: 22px; max-width: 80ch; }
.mini-head { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; color: var(--gold-text); letter-spacing: 0.02em; margin-bottom: 14px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 176px; padding: 22px 22px 48px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s, background .2s; }
.tile:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); background: #202126; }
.tile-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.tile-title small { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; color: var(--gold-text); margin-left: 6px; border: 1px solid var(--gold); padding: 1px 6px; vertical-align: middle; }
.tile-text { color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.tile-go { position: absolute; left: 22px; bottom: 18px; color: var(--gold-text); font-size: 1.1rem; transition: transform .2s; }
.tile:hover .tile-go { transform: translateX(4px); }
.tile-cta { background: var(--gold); border-color: var(--gold); color: #0D0E10; }
.tile-cta .tile-text, .tile-cta .tile-go { color: #2A1B08; }
.tile-cta:hover { background: #E3A257; color: #0D0E10; }
@media (prefers-reduced-motion: reduce) { .tile, .tile-go { transition: none; } .tile:hover { transform: none; } }

/* Shared filter controls */
.filters, .lib-tools, .cal-tools { display: flex; flex-wrap: wrap; gap: 16px 18px; align-items: flex-end; margin: 26px 0 18px; }
.filters > div { min-width: 160px; flex: 1 1 160px; }
.filters .filter-search, .lib-tools .filter-search { flex: 2 1 260px; }
.filters input, .filters select, .lib-tools input { padding: 10px 12px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 0.95rem; color: var(--ink-2); margin: 0 0 10px; cursor: pointer; }
.check input { width: auto; accent-color: var(--gold); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); }
.seg button { font: 600 0.9rem var(--sans); background: transparent; color: var(--ink-2); border: 0; border-right: 1px solid var(--line-strong); padding: 10px 14px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--gold); color: #0D0E10; }
.seg button:hover:not(.on) { color: var(--ink); }

/* Tracker */
.stage-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.stage-btn { text-align: left; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); color: var(--ink); cursor: pointer; font: inherit; }
.stage-btn strong { display: block; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.stage-btn span { font-size: 0.85rem; color: var(--ink-2); }
.stage-btn.on { border-color: var(--gold); background: #22201C; }
.stage-btn:hover { border-color: var(--gold); }
.st-pre-application { --st: #7C8796; } .st-acceptance { --st: #9AA8B8; } .st-pre-examination { --st: #B9A27A; }
.st-examination { --st: #D48E39; } .st-recommendation { --st: #E3B04F; } .st-decision { --st: #F0C969; } .st-post-decision { --st: #7FB08A; }
.stage-btn[class*="st-"] { border-top-color: var(--st); }
.deadlines { margin-top: 28px; padding: 22px 24px; border: 1px solid var(--line); border-left: 2px solid var(--gold); background: var(--bg-2); }
.deadline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.deadline-list li { display: grid; grid-template-columns: 92px 150px 1fr auto; gap: 14px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.deadline-list li:first-child { border-top: 0; }
.dl-days { color: var(--ink-2); font-size: 0.9rem; }
.dl-days strong { font-family: var(--serif); font-size: 1.3rem; color: var(--gold-text); margin-right: 4px; }
.dl-what { color: var(--ink-2); font-size: 0.92rem; }
.dl-date { color: var(--ink-2); font-size: 0.92rem; white-space: nowrap; }
.result-count { color: var(--ink-2); font-size: 0.95rem; margin: 6px 0 12px; }
.projects-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.proj { padding: 22px 22px 18px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.proj-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge { font-size: 0.78rem; font-weight: 700; padding: 3px 9px; background: var(--st, var(--gold)); color: #0D0E10; }
.proj h3 { font-size: 1.18rem; margin-bottom: 4px; }
.proj h3 a { text-decoration: none; }
.proj h3 a:hover { text-decoration: underline; }
.proj-applicant { font-size: 0.88rem; color: var(--ink-2); margin: 0 0 10px; }
.proj-desc { font-size: 0.93rem; color: var(--ink-2); margin: 0 0 14px; }
.proj-next { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); font-size: 0.92rem; }
.proj-next span { color: var(--ink-2); }
.proj-next.statutory { border-color: rgba(212,142,57,0.55); }
.proj-next.statutory strong { color: var(--gold-text); }
.proj-next.overdue { border-style: dashed; }
.tl { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.tl::before { content: ""; position: absolute; left: 6px; right: 6px; top: 5px; height: 1px; background: var(--line-strong); }
.tl li { position: relative; display: flex; flex-direction: column; gap: 3px; font-size: 0.68rem; color: var(--ink-2); padding-right: 4px; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); position: relative; z-index: 1; }
.tl li.done .tl-dot { background: var(--gold); border-color: var(--gold); }
.tl li.now .tl-dot { background: var(--bg); border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(212,142,57,0.25); }
.tl li.now .tl-label { color: var(--ink); font-weight: 700; }
.tl-date { color: #7F838B; }
.empty { padding: 24px; border: 1px dashed var(--line-strong); color: var(--ink-2); grid-column: 1 / -1; }
.method { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.method summary { cursor: pointer; font-weight: 600; color: var(--gold-text); }
.method ul { margin-top: 12px; }

/* Library */
.lib-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 0.93rem; }
.lib-toc a { color: var(--ink-2); text-decoration: none; }
.lib-toc a:hover { color: var(--gold-text); }
.lib-group { padding: 34px 0 6px; border-top: 0; }
.lib-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 10px; }
.lib-head h2 { font-size: 1.45rem; }
.lib-head p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.lib-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--gold); }
.lib-item { display: flex; justify-content: space-between; gap: 22px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lib-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lib-title { font-weight: 600; }
.lib-title a { text-decoration-color: rgba(212,142,57,0.6); }
.lib-note { color: var(--ink-2); font-size: 0.93rem; }
.lib-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.kind { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line-strong); padding: 2px 8px; }
.jurs { display: flex; gap: 4px; }
.jur { width: 22px; height: 22px; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; border: 1px solid var(--line-strong); color: var(--ink-2); }
.jur-E { border-color: #D48E39; color: #E3A257; } .jur-W { border-color: #7FB08A; color: #9CCBA6; } .jur-S { border-color: #7DA3C8; color: #A3C2E0; }

/* Calendar */
.now-panel { padding: 22px 24px; background: var(--bg-2); border: 1px solid var(--line); border-left: 2px solid var(--gold); }
.now-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.now-cols h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.now-cols ul { list-style: none; margin: 0; padding: 0; font-size: 0.93rem; color: var(--ink-2); }
.now-cols li { padding: 4px 0; }
.now-cols strong { color: var(--ink); font-weight: 600; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.88rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.sw { width: 16px; height: 12px; display: inline-block; }
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.cal { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.9rem; }
.cal th, .cal td { border-bottom: 1px solid var(--line); }
.cal thead th { position: sticky; top: 0; background: var(--panel); font-size: 0.8rem; font-weight: 700; color: var(--ink-2); padding: 10px 2px; text-align: center; }
.cal thead th.act { text-align: left; padding-left: 14px; }
.cal th.act { text-align: left; font-weight: 400; color: var(--ink-2); padding: 8px 12px 8px 26px; width: 34%; position: sticky; left: 0; background: var(--bg); z-index: 1; }
.cal thead th.act { background: var(--panel); z-index: 2; }
.cal td { position: relative; padding: 0; height: 30px; border-left: 1px solid rgba(240,237,231,0.05); }
.cal td.now, .cal th.now { box-shadow: inset 2px 0 0 var(--gold), inset -2px 0 0 var(--gold); }
.cal thead th.now { color: var(--gold-text); }
.m-o { background: #D48E39; } .m-s { background: rgba(212,142,57,0.32); }
.m-w { background: repeating-linear-gradient(135deg, #7FB08A 0 4px, rgba(127,176,138,0.45) 4px 8px); }
.m-c { background: repeating-linear-gradient(135deg, #B5574B 0 4px, rgba(181,87,75,0.45) 4px 8px); }
.sp-head th { padding: 0; background: var(--panel); position: sticky; left: 0; }
.sp-toggle { width: 100%; display: flex; align-items: baseline; gap: 12px; padding: 12px 14px; background: transparent; border: 0; color: var(--ink); font: 600 1rem var(--serif); cursor: pointer; text-align: left; }
.sp-toggle::before { content: "+"; font-family: var(--sans); color: var(--gold-text); width: 12px; }
.sp-toggle[aria-expanded="true"]::before { content: "\2212"; }
.sp-grp { font: 600 0.75rem var(--sans); color: var(--ink-2); }
.sp-note td { padding: 12px 14px 16px 26px; background: var(--bg-2); }
.sp-note p { margin: 0 0 6px; font-size: 0.93rem; color: var(--ink-2); max-width: 90ch; }
.sp-links a { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1080px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .projects-list { grid-template-columns: 1fr; }
  .deadline-list li { grid-template-columns: 80px 1fr; }
  .deadline-list .dl-what, .deadline-list .dl-date { grid-column: 2; }
  .deadline-list a { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; padding-bottom: 44px; }
  .page-hero { padding: 48px 0 40px; }
  .now-cols { grid-template-columns: 1fr; gap: 16px; }
  .lib-item { flex-direction: column; gap: 8px; }
  .lib-meta { flex-direction: row; align-items: center; }
  .tl li { font-size: 0; } .tl li.now { font-size: 0.68rem; }
  .tl li.now .tl-label, .tl li.now .tl-date { white-space: nowrap; }
  .seg button { padding: 9px 11px; font-size: 0.85rem; }
  .cal th.act { width: 46%; padding-left: 14px; font-size: 0.82rem; }
}
.swipe-hint { display: none; font-size: 0.85rem; color: var(--ink-2); margin: 0 0 8px; }
@media (max-width: 760px) {
  .swipe-hint { display: block; }
  .cal { min-width: 590px; font-size: 0.8rem; }
  .cal th.act { width: 140px; min-width: 140px; max-width: 140px; padding: 6px 8px 6px 10px; font-size: 0.76rem; line-height: 1.3; }
  .cal thead th { font-size: 0.72rem; }
  .sp-toggle { font-size: 0.92rem; padding: 10px; }
  .sp-note td { padding-left: 10px; }
}
.filter-head { margin-top: 30px; }
.result-count { scroll-margin-top: 96px; font-weight: 600; color: var(--ink); }
.active-filters { margin: -6px 0 14px; font-size: 0.92rem; color: var(--ink-2); }
.active-filters button { margin-left: 10px; font: 600 0.85rem var(--sans); background: transparent; color: var(--gold-text); border: 1px solid var(--gold); padding: 3px 10px; cursor: pointer; }
.active-filters button:hover { background: var(--gold); color: #0D0E10; }
.stage-btn { transition: border-color .15s, background .15s; }
.stage-btn.on { box-shadow: inset 0 0 0 1px var(--gold); }

.lib-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 0; font-size: 0.95rem; color: var(--ink-2); scroll-margin-top: 96px; }
.lib-status strong { color: var(--ink); }
.lib-status button { font: 600 0.85rem var(--sans); background: transparent; color: var(--gold-text); border: 1px solid var(--gold); padding: 3px 10px; cursor: pointer; }
.lib-status button:hover { background: var(--gold); color: #0D0E10; }
.lib-empty { padding: 22px; border: 1px dashed var(--line-strong); color: var(--ink-2); margin-top: 18px; }
