/* =====================================================================
   100CARE public site + applicant portal
   Clean, neutral and professional: white and soft grey surfaces, one blue
   brand colour, rounded cards, pill buttons, Inter. Pastel tints are used
   only to tell categories and statuses apart.
   ===================================================================== */

:root {
  --bg: #ffffff;
  --soft: #f6f7f9;
  --soft-2: #eceff3;
  --ink: #16181d;
  --ink-2: #2b2f38;
  --muted: #566070;
  --line: #e3e6eb;
  --line-strong: #cdd2da;

  --primary: #1558d6;
  --primary-hover: #0f47b3;
  --primary-ink: #ffffff;
  --primary-tint: #e8f0fd;

  --green: #137333;     --green-tint: #e6f4ea;
  --amber: #8f5300;     --amber-tint: #fef3e0;
  --red: #b3261e;       --red-tint: #fce8e6;
  --violet: #5b3fc4;    --violet-tint: #efeafc;
  --teal: #0b6b6b;      --teal-tint: #e0f4f3;

  --dark: #0b1020;
  --dark-2: #151b30;
  --dark-ink: #e9ecf3;
  --dark-muted: #a7afc2;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --step-small: 0.875rem;
  --step-body: 1rem;
  --step-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --step-head: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --step-display: clamp(2.375rem, 1.5rem + 2.9vw, 3.75rem);

  --r-sm: 8px; --r: 12px; --r-lg: 20px; --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow: 0 12px 32px rgba(16, 24, 40, 0.1);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section: clamp(56px, 8vw, 112px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid rgba(21, 88, 214, 0.45); outline-offset: 2px; }
::selection { background: var(--primary-tint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip-link:focus { top: 8px; }
.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--soft { background: var(--soft); }
.small { font-size: var(--step-small); }
.muted { color: var(--muted); }
.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { font-size: var(--step-head); max-width: 20ch; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 52ch; }

/* ---------- buttons, fields, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.6em 1.3em; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); font-weight: 600; font-size: 0.9375rem; line-height: 1.2; white-space: nowrap;
  transition: background-color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--primary-hover); text-decoration: none; color: var(--primary-ink); }
.btn:active { transform: translateY(1px); }
.btn--quiet { background: var(--soft-2); color: var(--ink); }
.btn--quiet:hover { background: #dfe3e9; color: var(--ink); }
.btn--outline { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { background: var(--soft); color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--lg { min-height: 52px; padding-inline: 1.7em; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0.4em 1em; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.inline-form { display: inline; margin: 0; }
.link-arrow { font-weight: 600; display: inline-flex; gap: 0.35em; align-items: center; }
.link-arrow::after { content: "\2192"; transition: transform 0.2s var(--ease); }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(4px); }

.field { display: grid; gap: 6px; margin-bottom: 18px; align-content: start; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.field .hint { font-size: var(--step-small); color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0.65em 0.9em; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 140px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: #aab1bd; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); }
.input[type="file"] { padding: 0.5em 0.7em; background: var(--soft); }
.field-validation-error, .validation-summary-errors, .error-text { color: var(--red); font-size: var(--step-small); }
.validation-summary-errors ul { list-style: none; }
.input-validation-error { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.checkbox { display: flex; gap: 12px; align-items: start; padding: 12px 0; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.checkbox b { display: block; font-weight: 600; }
.checkbox span { color: var(--muted); font-size: var(--step-small); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; background: transparent; color: var(--primary); font-weight: 600; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { background: var(--primary-tint); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 0.2em 0.75em; background: var(--soft-2); color: var(--ink-2);
  font-size: 0.8125rem; font-weight: 600; border-radius: 999px; line-height: 1.5;
}
.chip--open { background: var(--green-tint); color: var(--green); }
.chip--closed { background: var(--soft-2); color: var(--muted); }
.chip--dark { background: var(--ink); color: #fff; }
.chip--blue { background: var(--primary-tint); color: var(--primary); }
.chip--amber { background: var(--amber-tint); color: var(--amber); }
.chip--red { background: var(--red-tint); color: var(--red); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 12px rgba(16, 24, 40, 0.05); }
.site-header__inner { max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 28px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.wordmark:hover { text-decoration: none; }
.wordmark__mark { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.wordmark__mark .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.nav { display: flex; gap: 4px; margin-left: 12px; align-items: center; }
.nav__link { padding: 8px 14px; color: var(--ink-2); font-weight: 500; font-size: 0.9375rem; border-radius: 999px; transition: background-color 0.15s, color 0.15s; }
.nav__link:hover { background: var(--soft-2); color: var(--ink); text-decoration: none; }
.nav__link.is-active { background: var(--primary-tint); color: var(--primary); }
.nav__actions-mobile { display: none; }
.site-header__actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .site-header__actions { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 44px; height: 44px;
    border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer;
  }
  .nav-toggle .icon-x { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-x { display: block; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; z-index: 40; flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; padding: 12px var(--gutter) 24px; margin: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform 0.22s var(--ease), opacity 0.18s, visibility 0.22s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 14px 12px; font-size: 1.0625rem; border-radius: 12px; }
  .nav__actions-mobile { display: grid; gap: 8px; margin-top: 12px; }
}

/* ---------- flash ---------- */
.flash { padding: 14px var(--gutter) 0; }
.flash__inner { max-width: var(--max); margin: 0 auto; padding: 14px 18px; font-weight: 500; border-radius: var(--r); }
.flash--ok .flash__inner { background: var(--green-tint); color: var(--green); }
.flash--error .flash__inner { background: var(--red-tint); color: var(--red); }

/* ---------- motion ---------- */
.reveal { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------- home: hero ---------- */
.hero { background: var(--soft); padding-block: clamp(40px, 6vw, 88px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__note { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 0.875rem; font-weight: 500; margin-bottom: 22px; color: var(--ink-2); }
.hero__note i { display: inline-grid; place-items: center; width: 24px; height: 24px; background: var(--green-tint); color: var(--green); border-radius: 50%; }
.hero__note .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.hero h1 { font-size: var(--step-display); letter-spacing: -0.035em; line-height: 1.06; max-width: 20ch; }
.hero .lead { margin: 20px 0 28px; max-width: 46ch; }
.hero__search { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow-sm); max-width: 560px; transition: box-shadow 0.2s, border-color 0.2s; }
.hero__search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); }
.hero__search .icon { color: var(--muted); }
.hero__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 4px; font-size: 1rem; }
.hero__checks { list-style: none; display: flex; gap: 10px 24px; flex-wrap: wrap; margin-top: 24px; color: var(--ink-2); font-size: 0.9375rem; }
.hero__checks li { display: inline-flex; gap: 8px; align-items: center; }
.hero__checks .icon { color: var(--green); width: 1.1em; height: 1.1em; stroke-width: 2.2; }
.hero__visual { position: relative; }
.hero__photo { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; border-radius: var(--r-xl); background: var(--soft-2); }
.float-card { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 6px; animation: drift 7s ease-in-out infinite; }
.float-card--a { left: -28px; bottom: 36px; width: min(290px, 78%); }
.float-card--b { right: -14px; top: 28px; animation-delay: -3.5s; min-width: 170px; }
.float-card__label { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.float-card__title { font-weight: 650; line-height: 1.25; }
.float-card__big { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.countdown { display: flex; gap: 14px; font-variant-numeric: tabular-nums; align-items: end; }
.countdown b { display: block; font-size: 1.5rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.countdown span { font-size: 0.75rem; color: var(--muted); }
.hero__credit { margin: 10px 4px 0; font-size: 0.75rem; color: var(--muted); }
.hero__credit a { color: inherit; text-decoration: underline; }
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__photo { aspect-ratio: 16 / 11; }
  .float-card--a { left: 12px; bottom: 12px; }
  .float-card--b { right: 12px; top: 12px; }
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { border-radius: var(--r-lg); padding: clamp(22px, 2.6vw, 32px); background: var(--tint, var(--soft)); display: grid; gap: 10px; align-content: start; min-height: 220px; transition: transform 0.25s var(--ease); }
.step:hover { transform: translateY(-4px); }
.step__icon { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--accent, var(--primary)); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.step h3 { font-size: 1.1875rem; margin-top: 10px; }
.step p { margin: 0; color: var(--ink-2); opacity: 0.85; }
.step--blue { --tint: var(--primary-tint); --accent: var(--primary); }
.step--violet { --tint: var(--violet-tint); --accent: var(--violet); }
.step--green { --tint: var(--green-tint); --accent: var(--green); }
.step--amber { --tint: var(--amber-tint); --accent: var(--amber); }
.step--teal { --tint: var(--teal-tint); --accent: var(--teal); }
.step--red { --tint: var(--red-tint); --accent: var(--red); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } .step { min-height: 0; } }

/* ---------- open posts list ---------- */
.search-bar { position: relative; max-width: 420px; flex: 1 1 280px; }
.search-bar .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-bar .input { padding-left: 44px; border-radius: 999px; }
.post-list { display: grid; gap: 10px; }
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 22px; color: inherit; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); }
.post-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.post-row__title { font-weight: 650; font-size: 1.0625rem; line-height: 1.3; color: var(--ink); }
.post-row__meta { color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }
.post-row__fee { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-row__end { text-align: right; font-size: 0.9375rem; color: var(--muted); white-space: nowrap; }
.post-row__end b { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 760px) {
  .post-row { grid-template-columns: 1fr auto; }
  .post-row__end { grid-column: 1 / -1; text-align: left; display: flex; gap: 8px; }
}
.empty { background: var(--soft); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); text-align: center; }
.empty h3 { font-size: 1.375rem; margin-bottom: 8px; }
.empty .btn { margin-top: 12px; }

/* ---------- figures band ---------- */
.band { background: var(--dark); color: var(--dark-ink); }
.band h2, .band h3 { color: #fff; }
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.figure { padding: 6px 0; }
.figure b { display: block; font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.figure span { display: block; margin-top: 8px; color: var(--dark-muted); }
@media (max-width: 760px) { .figures { grid-template-columns: repeat(2, 1fr); } }

/* ---------- test centres ---------- */
.centres { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.centre { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--soft-2); min-height: 260px; display: flex; align-items: end; color: #fff; grid-column: span 4; transition: transform 0.3s var(--ease); }
.centre:nth-child(1), .centre:nth-child(2) { grid-column: span 6; min-height: 340px; }
.centre:hover { text-decoration: none; transform: translateY(-3px); }
.centre img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.centre:hover img { transform: scale(1.04); }
.centre::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: rgba(8, 12, 24, 0.55); mask: linear-gradient(transparent, #000); -webkit-mask: linear-gradient(transparent, #000); }
.centre--plain { background: var(--primary-tint); color: var(--ink); }
.centre--plain::after { display: none; }
.centre__text { position: relative; z-index: 1; padding: 20px 22px; }
.centre h3 { font-size: 1.375rem; color: inherit; margin-bottom: 2px; }
.centre p { margin: 0; font-size: 0.9375rem; opacity: 0.92; }
.centre:last-child:nth-child(odd) { grid-column: span 12; }
@media (max-width: 760px) { .centre:nth-child(n) { grid-column: span 12; min-height: 220px; } }

/* ---------- news ---------- */
.newscols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.newscol { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 2.6vw, 28px); display: grid; align-content: start; gap: 4px; }
.newscol h3 { font-size: 1.125rem; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.newscol h3 .icon { color: var(--primary); }
.newsitem { display: grid; gap: 2px; padding: 12px 0; color: inherit; border-top: 1px solid var(--line); }
.newsitem:first-of-type { border-top: 0; }
.newsitem:hover { text-decoration: none; }
.newsitem:hover b { color: var(--primary); }
.newsitem time { font-size: 0.8125rem; color: var(--muted); }
.newsitem b { font-weight: 550; line-height: 1.35; transition: color 0.15s; }
@media (max-width: 960px) { .newscols { grid-template-columns: 1fr; } }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.2s, box-shadow 0.2s; }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 0.25s var(--ease); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .faq__body { padding: 0 22px 20px; color: var(--ink-2); }
.faq .faq__body p { margin: 0 0 10px; }

/* ---------- call to action ---------- */
.cta { background: var(--primary); color: #fff; border-radius: var(--r-xl); padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; }
.cta h2 { color: #fff; font-size: var(--step-head); max-width: 16ch; }
.cta p { margin: 12px 0 0; color: rgba(255, 255, 255, 0.85); max-width: 46ch; }
.cta .btn { background: #fff; color: var(--primary); }
.cta .btn:hover { background: var(--primary-tint); color: var(--primary); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-ink); padding: clamp(48px, 6vw, 80px) 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px 40px; }
.footer-grid h4 { color: #fff; font-size: 0.9375rem; margin-bottom: 14px; font-weight: 600; letter-spacing: 0; }
.footer-grid a, .footer-grid span { display: block; color: var(--dark-muted); padding: 4px 0; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-brand p { color: var(--dark-muted); max-width: 36ch; margin-top: 14px; }
.footer-brand .wordmark { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: var(--dark-muted); font-size: 0.875rem; }
.footer-bottom a { color: var(--dark-muted); margin-left: 18px; }
.footer-bottom a:hover { color: #fff; }
.credits { margin: 22px 0 0; font-size: 0.8125rem; color: var(--dark-muted); line-height: 1.55; max-width: 100ch; }
.credits a { color: inherit; text-decoration: underline; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- interior pages ---------- */
.page-head { background: var(--soft); border-bottom: 1px solid var(--line); padding-block: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: var(--step-head); max-width: 20ch; }
.page-head p { margin: 14px 0 0; font-size: var(--step-lead); color: var(--muted); max-width: 56ch; }
.page-head .counts { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 0.875rem; margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); text-decoration: none; }
.crumbs > * + *::before { content: "/"; margin-right: 8px; opacity: 0.5; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; background: var(--soft-2); padding: 4px; border-radius: 999px; }
.tab { padding: 9px 18px; color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; border-radius: 999px; transition: background-color 0.15s, color 0.15s; }
.tab:hover { text-decoration: none; background: rgba(255, 255, 255, 0.6); }
.tab.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.toolbar form { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; margin-left: auto; }
.toolbar .input { flex: 1; border-radius: 999px; }

.tickets { display: grid; gap: 12px; }
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 26px); color: inherit; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); }
.ticket:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.ticket h2, .ticket h3 { font-size: clamp(1.1875rem, 1rem + 0.7vw, 1.5rem); line-height: 1.25; margin-bottom: 4px; max-width: 48ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket p { margin: 0; color: var(--muted); max-width: 64ch; }
.ticket__client { font-size: 0.875rem; color: var(--muted); margin: 0 0 8px !important; }
.ticket__side { display: grid; align-content: space-between; justify-items: end; text-align: right; gap: 10px; min-width: 190px; }
.ticket__side b { font-weight: 650; }
.ticket__meta { font-size: 0.875rem; color: var(--muted); }
@media (max-width: 760px) { .ticket { grid-template-columns: 1fr; } .ticket__side { justify-items: start; text-align: left; } }

.pager { display: flex; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; min-height: 42px; display: inline-grid; place-items: center; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; color: var(--ink); }
.pager a:hover { background: var(--soft); text-decoration: none; }
.pager .is-current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* post / project detail */
.post { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.post__main h2 { font-size: 1.5rem; margin: 40px 0 14px; }
.post__main h2:first-child { margin-top: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 8px; }
.facts div { background: var(--soft); border-radius: var(--r); padding: 14px 16px; }
.facts dt { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.facts dd { margin: 2px 0 0; font-weight: 650; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.rules { list-style: none; display: grid; gap: 12px; }
.rules li { position: relative; padding-left: 30px; max-width: 66ch; }
.rules li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-tint) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231558d6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.5l4 4 8-9'/></svg>") center / 12px no-repeat; }
.rules--paper { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 28px); }
.apply-slip { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: clamp(20px, 2.6vw, 28px); display: grid; gap: 14px; }
.apply-slip__fee { font-size: clamp(2.25rem, 2rem + 1.4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.apply-slip__label { font-size: 0.875rem; color: var(--muted); margin-top: 4px; }
.apply-slip hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; }
.apply-note { font-size: 0.9375rem; color: var(--muted); margin: 0; }
.notice-box { background: var(--soft); border-radius: var(--r); padding: 14px 16px; margin-top: 4px; font-size: 0.9375rem; color: var(--ink-2); }
.notice-box--warn { background: var(--amber-tint); color: var(--amber); }
.notice-box--ok { background: var(--green-tint); color: var(--green); }
.notice-box--error { background: var(--red-tint); color: var(--red); }
.siblings { display: grid; gap: 8px; margin-top: 8px; }
.sibling { display: flex; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; color: var(--ink); font-weight: 550; transition: border-color 0.2s, transform 0.2s var(--ease); }
.sibling:hover { border-color: var(--line-strong); text-decoration: none; transform: translateX(3px); }
@media (max-width: 960px) { .post { grid-template-columns: 1fr; } .apply-slip { position: static; order: -1; } }

.news-list { display: grid; gap: 10px; }
.news-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px 24px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 22px; color: inherit; }
.news-row time { font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.news-row b { font-weight: 650; font-size: 1.0625rem; line-height: 1.3; }
.news-row p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 760px) { .news-row { grid-template-columns: 1fr; } }

.help-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.help-cats .tab { background: var(--soft-2); }
.help-cats .tab.is-active { background: var(--ink); color: #fff; box-shadow: none; }
.help-group { margin-bottom: 40px; }
.help-group h2 { font-size: 1.5rem; margin-bottom: 14px; }
.help-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; margin-bottom: 8px; color: inherit; transition: border-color 0.2s, transform 0.2s var(--ease); }
.help-item:hover { border-color: var(--line-strong); text-decoration: none; transform: translateX(3px); }
.help-item b { display: block; font-weight: 600; }
.help-item span { color: var(--muted); font-size: 0.9375rem; }
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; }
.prose h2 { font-size: 1.5rem; margin: 1.8em 0 0.6em; }
.prose h3 { font-size: 1.1875rem; margin: 1.5em 0 0.5em; }
.prose ul { margin: 0 0 1.1em 1.2em; display: grid; gap: 6px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.paper { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 36px); }
.address-block { display: grid; gap: 22px; font-size: 1.0625rem; }
.address-block dt { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.address-block dd { margin: 0; font-weight: 550; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 960px) { .split, .split--even { grid-template-columns: minmax(0, 1fr); } }

/* ---------- sign in / register ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: calc(100svh - 68px); }
.auth__side { background: var(--primary-tint); padding: clamp(32px, 6vw, 88px) var(--gutter); display: grid; align-content: center; gap: 22px; }
.auth__side h1 { font-size: var(--step-head); max-width: 14ch; }
.auth__side > p { font-size: var(--step-lead); color: var(--ink-2); max-width: 32ch; }
.auth__points { list-style: none; display: grid; gap: 12px; margin-top: 8px; }
.auth__points li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.auth__points .icon { background: #fff; color: var(--primary); border-radius: 50%; padding: 6px; width: 32px; height: 32px; box-shadow: var(--shadow-sm); }
.auth__panel { padding: clamp(28px, 5vw, 72px) var(--gutter); display: grid; align-content: center; justify-items: center; }
.auth__form { width: min(520px, 100%); }
.auth__form h2 { font-size: 1.875rem; margin-bottom: 6px; }
.auth__form > .muted { margin-bottom: 22px; }
.auth__alt { margin-top: 18px; font-size: 0.9375rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pw-meter { height: 6px; background: var(--soft-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width 0.25s var(--ease), background-color 0.25s; }
@media (max-width: 960px) { .auth { grid-template-columns: 1fr; min-height: 0; } .auth__side { padding-block: 32px; } .auth__points { display: none; } .grid-2 { grid-template-columns: 1fr; } }

/* ---------- applicant portal shell ---------- */
.portal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.portal__side { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.portal__who { display: flex; gap: 12px; align-items: center; padding: 8px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.portal__who b { display: block; font-weight: 650; line-height: 1.2; }
.portal__who span { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; color: var(--muted); }
.portal__group { margin: 12px 0 4px; padding: 0 10px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.portal__link { display: flex; gap: 12px; align-items: center; padding: 10px 12px; color: var(--ink-2); font-weight: 550; border-radius: 10px; transition: background-color 0.15s, color 0.15s; }
.portal__link:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.portal__link.is-active { background: var(--primary-tint); color: var(--primary); }
.portal__link .icon { color: inherit; }
.portal__main h1 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); margin-bottom: 6px; }
.portal__main > .lead { margin-bottom: 24px; }
.portal__banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--amber-tint); color: var(--amber); border-radius: var(--r); padding: 14px 18px; margin-bottom: 20px; font-weight: 500; }
.portal__banner .btn { background: var(--amber); color: #fff; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--soft-2); }
.avatar--lg { width: 88px; height: 88px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 4px; }
.stat b { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.9375rem; }
.app-list { display: grid; gap: 10px; }
.app-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; align-items: center; }
.app-row b { font-weight: 650; }
.toggle-list { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 22px; margin-bottom: 18px; }
.toggle-list h3 { font-size: 1.0625rem; padding-top: 16px; }
.toggle-list .checkbox + .checkbox { border-top: 1px solid var(--line); }
@media (max-width: 960px) {
  .portal { grid-template-columns: minmax(0, 1fr); }
  .portal__side { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .portal__side::-webkit-scrollbar { display: none; }
  .portal__who, .portal__group { display: none; }
  .portal__link { white-space: nowrap; }
  .cards-3 { grid-template-columns: 1fr; }
}

/* challan screen helpers */
@media print { .site-header, .site-footer, .flash { display: none !important; } body { background: #fff; } }

/* ---------- profile ---------- */
.form-h { font-size: 1.125rem; margin: 6px 0 14px; }
.form-h:not(:first-child) { margin-top: 26px; }
.meter-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; margin-bottom: 18px; }
.meter-card__top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.meter { height: 8px; background: var(--soft-2); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.6s var(--ease); }
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { padding: 9px 16px; border-radius: 999px; background: var(--soft-2); color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.subtab:hover { text-decoration: none; background: #dfe3e9; }
.subtab.is-active { background: var(--ink); color: #fff; }
.paper select.select[disabled], .input[disabled] { background: var(--soft); color: var(--muted); }

/* ---------- application timeline ---------- */
.timeline { list-style: none; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 22px 34px; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; } .timeline li:last-child::after { display: none; }
.timeline li.is-done::before { background: var(--green) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.5l4 4 8-9'/></svg>") center / 12px no-repeat; border-color: var(--green); }
.timeline span { color: var(--muted); font-size: 0.9375rem; }

/* ---------- bell ---------- */
.bell { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.bell:hover { background: var(--soft-2); text-decoration: none; }
.bell__n { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; }
.note-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; color: inherit; }
.note-row:hover { text-decoration: none; border-color: var(--line-strong); }
.note-row i { width: 10px; height: 10px; border-radius: 50%; background: transparent; margin-top: 7px; }
.note-row.is-unread i { background: var(--primary); }
.note-row.is-unread b { font-weight: 700; }
.bubble { max-width: 640px; padding: 12px 16px; border-radius: 16px; background: var(--soft-2); }
.bubble--staff { background: var(--primary-tint); }
.thread { display: grid; gap: 10px; margin: 16px 0; }
.thread .meta { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }

/* ---------- admin tables ---------- */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8125rem; padding: 12px 16px; background: var(--soft); white-space: nowrap; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fafbfc; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 160px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 16px; }
.check-grid .checkbox { padding: 4px 0; }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-actions h1 { margin: 0; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 960px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
