/*
 * Talathi Jana Seva — the whole stylesheet.
 *
 * Hand-written, committed, and served as-is. There is no build step on
 * purpose: the deployment target is cPanel with no Node, and a compiled
 * stylesheet would reintroduce exactly the toolchain this port removes.
 *
 * The font stack carries no webfont request. Devanagari is served from
 * whatever the device already has — Noto on Android and most Linux, Nirmala
 * on Windows, Kohinoor on Apple. A Google Fonts link would be both a privacy
 * leak and the last Google dependency in a project that set out to drop them.
 *
 * Layout order: tokens, reset, primitives, public site, admin.
 */

:root {
    --navy:        #16284d;
    --navy-dark:   #0f1d39;
    --gold:        #e8b93d;
    --saffron:     #e67219;
    --green:       #2f8f5b;
    --red:         #c0392b;

    --bg:          #faf8f4;
    --surface:     #ffffff;
    --workspace:   #f4f3f0;
    --ink:         #1d2433;
    --ink-soft:    #5a6475;
    --line:        #e3ded4;

    --radius:      10px;
    --radius-sm:   6px;
    --shadow:      0 1px 2px rgba(20, 30, 60, .06), 0 2px 8px rgba(20, 30, 60, .04);

    --rail-w:      230px;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari",
                 Mangal, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

h1, h2, h3 { line-height: 1.3; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--navy); }

/* Marathi digits read badly when proportional; application numbers and
   amounts are tabular everywhere they appear. */
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }

/* ---------------------------------------------------------------- primitives */

.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .55rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn:hover { background: #f7f5f1; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-dark); }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; color: inherit; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-size: .8rem; color: var(--ink-soft); margin: .3rem 0 0; }
.field .err  { font-size: .8rem; color: var(--red); margin: .3rem 0 0; }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=file], select, textarea {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: inherit;
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--navy);
    outline-offset: 1px;
    border-color: var(--navy);
}
textarea { min-height: 5rem; resize: vertical; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem;
    margin-bottom: 1.25rem;
}
.card__title { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.card__sub   { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.card--gold  { border-top: 3px solid var(--gold); }

.messages { margin: 0 0 1rem; }
.msg {
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    padding: .7rem 1rem;
    margin-bottom: .6rem;
    font-size: .92rem;
}
.msg--success { border-left-color: var(--green);   background: #f0f9f4; }
.msg--error   { border-left-color: var(--red);     background: #fdf2f1; }
.msg--warning { border-left-color: var(--saffron); background: #fef6ef; }
.msg--notice  { border-left-color: var(--navy);    background: #f2f5fa; }

.badge {
    display: inline-block;
    padding: .18rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge--new      { background: #eceff4; color: #46506a; }
.badge--progress { background: #fdf0db; color: #8a5b00; }
.badge--done     { background: #e6f5ec; color: #1d6b42; }
.badge--stop     { background: #fbe9e7; color: #9c2c1e; }

table.grid { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.grid th, table.grid td { padding: .65rem .8rem; text-align: start; border-bottom: 1px solid var(--line); }
table.grid th { background: #f7f5f1; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
table.grid tbody tr:hover { background: #fafaf8; }
table.grid tr.clickable { cursor: pointer; }
.grid-wrap { overflow-x: auto; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0 0; font-size: .9rem; }
.pager__pages { display: flex; gap: .25rem; }
.pager__pages a, .pager__pages span { padding: .3rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; }
.pager__pages .is-current { background: var(--navy); border-color: var(--navy); color: #fff; }

.notfound { max-width: 40rem; margin: 0 auto; padding: 5rem 1rem; text-align: center; }
.notfound__code { font-weight: 700; letter-spacing: .2em; color: var(--saffron); margin: 0; }
.notfound__actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ------------------------------------------------------------- public site */

.site__main { max-width: 70rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.masthead { background: linear-gradient(135deg, var(--navy), var(--navy-dark)); }
.masthead__inner {
    max-width: 70rem; margin: 0 auto; padding: .8rem 1rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.masthead__brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.masthead__emblem { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); object-fit: contain; }
.masthead__names { display: flex; flex-direction: column; line-height: 1.2; }
.masthead__office { color: #fff; font-weight: 700; font-size: .95rem; }
.masthead__place  { color: var(--gold); font-size: .8rem; }
.masthead__nav { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.masthead__nav a {
    color: rgba(255,255,255,.85); text-decoration: none;
    padding: .4rem .8rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600;
}
.masthead__nav a:hover { color: var(--gold); background: rgba(255,255,255,.07); }
.masthead__account { background: var(--gold); color: var(--navy) !important; }
.masthead__account:hover { background: #f1c75a; }

.sitefoot { background: var(--navy); color: rgba(255,255,255,.8); margin-top: 3rem; }
.sitefoot__inner { max-width: 70rem; margin: 0 auto; padding: 1.8rem 1rem; font-size: .85rem; }
.sitefoot__office { color: #fff; font-weight: 600; margin-bottom: .4rem; }
.sitefoot__note { margin-bottom: .6rem; }
.sitefoot__year { margin: 0; color: rgba(255,255,255,.5); }

/* ------------------------------------------------------------------- admin */

body.admin { background: var(--workspace); }

.rail {
    position: fixed; inset-block: 0; inset-inline-start: 0;
    width: var(--rail-w);
    background: var(--navy); color: rgba(255,255,255,.82);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.rail__brand { padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.rail__office { color: #fff; font-weight: 700; margin: 0; line-height: 1.2; }
.rail__sub { font-size: .75rem; opacity: .7; margin: 0; }
.rail__nav { flex: 1; padding: .5rem 0; }
.rail__link {
    display: block; padding: .6rem 1.25rem;
    color: inherit; text-decoration: none; font-size: .92rem;
    border-inline-start: 3px solid transparent;
}
.rail__link:hover { background: rgba(255,255,255,.06); }
.rail__link.is-active {
    background: rgba(255,255,255,.1); color: #fff; font-weight: 700;
    border-inline-start-color: var(--gold);
}
.rail__foot { padding: .8rem 1.25rem; font-size: .72rem; opacity: .55; border-top: 1px solid rgba(255,255,255,.1); margin: 0; }

.topbar {
    position: fixed; inset-block-start: 0; inset-inline-end: 0;
    inset-inline-start: var(--rail-w);
    height: 54px; background: var(--surface); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.25rem; gap: 1rem;
}
.topbar__name { font-weight: 600; font-size: .9rem; }
.topbar__actions { display: flex; align-items: center; gap: .3rem; }
.topbar__actions .btn--ghost { color: var(--ink-soft); }
.topbar__actions .btn--ghost:hover { background: #f2f1ee; color: var(--ink); }
.topbar__logout { margin: 0; }

.admin__workspace { margin-inline-start: var(--rail-w); padding-block-start: 54px; min-height: 100vh; display: flex; flex-direction: column; }
.admin__main { flex: 1; padding: 1.5rem; max-width: 1200px; width: 100%; }
.admin__footer { padding: 1rem 1.5rem; font-size: .78rem; color: var(--ink-soft); border-top: 1px solid var(--line); }

/* The signed-out admin screens draw no rail, so the workspace must not be
   indented past one that is not there. */
body.admin--guest .admin__workspace { margin-inline-start: 0; padding-block-start: 0; }
body.admin--guest .admin__main { max-width: 26rem; margin: 0 auto; padding-block: 4rem; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.crumbs { font-size: .82rem; color: var(--ink-soft); margin-bottom: .3rem; }
.crumbs a { color: inherit; }

.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .9rem 1.5rem; margin: 0; font-size: .92rem; }
.dl dt { font-size: .78rem; color: var(--ink-soft); margin: 0; }
.dl dd { margin: 0; font-weight: 600; }

@media (max-width: 860px) {
    .rail { inset-inline-start: calc(var(--rail-w) * -1); transition: inset-inline-start .2s; z-index: 40; }
    .rail.is-open { inset-inline-start: 0; }
    .topbar { inset-inline-start: 0; }
    .admin__workspace { margin-inline-start: 0; }
    .admin__main { padding: 1rem; }
}

/* ------------------------------------------------- signed-out admin screens */

.authhead { text-align: center; margin-bottom: 1.5rem; }
.authhead h1 { font-size: 1.4rem; margin: 0; }
.authhead p  { color: var(--ink-soft); font-size: .88rem; margin: .2rem 0 0; }

.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.field__aside { font-size: .78rem; color: var(--ink-soft); text-decoration: none; }
.field__aside:hover { color: var(--navy); text-decoration: underline; }

.btn--block { width: 100%; justify-content: center; margin-top: .5rem; }

/* ------------------------------------------------------------- dashboard */

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.stat__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin: 0; }
.stat__value { font-size: 1.8rem; font-weight: 700; margin: .2rem 0 0; }
.authfoot { text-align: center; font-size: .88rem; margin-top: 1.25rem; }
.authfoot a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.authfoot a:hover { color: var(--navy); text-decoration: underline; }

/* ------------------------------------------------- intake, tracking, queue */

.hero { padding: 1rem 0 1.75rem; }
.hero__title { font-size: 1.9rem; margin-bottom: .4rem; }
.hero__text { max-width: 46rem; color: var(--ink-soft); margin: 0; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem; }
.service { display: flex; flex-direction: column; }
/* Pushes the button to the card's floor so two cards of unequal prose still
   line their actions up, which is what makes the pair read as one choice. */
.service .btn { margin-top: auto; align-self: flex-start; }

.applyform { max-width: 44rem; }
.applyform h2.card__title { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.applyform h2.card__title:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* The asterisk is not the only marker of a required field -- every one also
   carries the required attribute and says so in its error -- because colour
   and a small glyph alone are not an accessible signal. */
.req { color: var(--red); }

.mt { margin-top: 1rem; }

/* Progress strip. Numbered through a counter rather than with markup, so the
   template stays a list of stage labels and nothing has to renumber when a
   stage is added. */
.progress { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: .5rem; }
.progress__step {
    counter-increment: step;
    position: relative;
    padding: .55rem .8rem .55rem 2.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: .92rem;
}
.progress__step::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: .7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.4rem; height: 1.4rem;
    display: grid; place-items: center;
    border-radius: 999px;
    background: #eceff4; color: #46506a;
    font-size: .75rem; font-weight: 700;
}
.progress__step.is-done { color: var(--ink); }
.progress__step.is-done::before { background: var(--green); color: #fff; }
.progress__step.is-current {
    border-color: var(--gold);
    background: #fffbf1;
    color: var(--ink);
    font-weight: 600;
}
.progress__step.is-current::before { background: var(--gold); color: var(--navy-dark); }

.gridfilter { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0 1rem; align-items: end; }
.gridfilter .btn { margin-bottom: 1.1rem; }
@media (max-width: 760px) {
    .gridfilter { grid-template-columns: 1fr; }
    .gridfilter .btn { margin-bottom: 0; }
}

/* A digest is for comparing, not reading: it must not wrap mid-hash or widen
   the row it sits in. */
.hash { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }

/* --------------------------------------------- certificates and verification */

.certpanel .steps { list-style: none; counter-reset: cstep; margin: 0; padding: 0; }
.certpanel__links { margin-top: 1.5rem; }

.steps__item {
    counter-increment: cstep;
    border-inline-start: 2px solid var(--line);
    padding: 0 0 1.4rem 1.2rem;
    margin-inline-start: .4rem;
}
.steps__item:last-child { padding-bottom: 0; }
.steps__item h3 { font-size: .95rem; margin-bottom: .4rem; }
/* Done is marked on the rail rather than by grabbing the heading, so a step
   that is complete still reads at full contrast -- these are instructions
   somebody is working through, not a checklist to skim. */
.steps__item.is-done { border-inline-start-color: var(--green); }
.steps__item form { margin-top: .6rem; }
.steps__item .dl { margin-top: .6rem; }

/* The verification page is the one screen in this system read by a stranger,
   on a phone, in a bank queue. One answer, large, above everything else. */
.verify {
    max-width: 34rem;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.verify__mark {
    width: 3.2rem; height: 3.2rem;
    margin: 0 auto .8rem;
    display: grid; place-items: center;
    border-radius: 999px;
    font-size: 1.7rem; line-height: 1;
    color: #fff;
}
/* The glyph carries the answer as well as the colour, and the heading says it
   in words besides: a red circle and a green circle are the same circle to a
   colour-blind reader. */
.verify--good .verify__mark { background: var(--green); }
.verify--bad  .verify__mark { background: var(--red); }
.verify--good { border-top: 3px solid var(--green); }
.verify--bad  { border-top: 3px solid var(--red); }

.verify__title { font-size: 1.35rem; margin-bottom: .6rem; }
.verify__text  { color: var(--ink-soft); margin: 0 auto 1rem; max-width: 28rem; }
.verify__facts { text-align: start; margin: 1.5rem 0; }
.verify__note  { font-size: .82rem; color: var(--ink-soft); margin: 1.5rem 0 0; }

/* ------------------------------------------------------------ citizen portal */

.authform { max-width: 26rem; margin-inline: auto; }

.accountnav { display: flex; gap: 1rem; font-size: .88rem; }

/* The timeline is the office's own audit rows. Flat and dated rather than
   decorated: it is read to answer "when did this move", not admired. */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item {
    display: flex; flex-wrap: wrap; gap: .5rem 1rem;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: 0; }
.timeline__label { font-weight: 600; }
.timeline__at { color: var(--ink-soft); font-size: .88rem; }

.filelist { list-style: none; margin: 0; padding: 0; }
.filelist li {
    display: flex; flex-wrap: wrap; gap: .5rem 1rem;
    justify-content: space-between;
    padding: .45rem 0;
    border-bottom: 1px solid var(--line);
}
.filelist li:last-child { border-bottom: 0; }

/* A disabled input still has to be readable: the email on the profile form is
   shown precisely so somebody can check it, and the browser default greys it
   to roughly the contrast of the background. */
input:disabled {
    background: var(--workspace);
    color: var(--ink-soft);
    -webkit-text-fill-color: var(--ink-soft);
    opacity: 1;
}

/* ------------------------------------------------------ configuration screen */

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.tabs__tab {
    padding: .55rem .9rem;
    text-decoration: none;
    color: var(--ink-soft);
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-bottom: -1px;
}
.tabs__tab:hover { color: var(--ink); }
.tabs__tab.is-active {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
    font-weight: 600;
}

.configform { max-width: 40rem; }

/* Two buttons that do very different things should not sit in one row with no
   gap: suspending an account is beside sending a routine email. */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ------------------------------------------------ admin: application page */
/* Laid out as the previous React admin: details beside documents, then the
   three-step certificate workflow, then answers beside history. */

.appmeta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

.appgrid { display: grid; gap: 1.25rem; grid-template-columns: 2fr 1fr; align-items: start; margin-bottom: 1.25rem; }
.appgrid--halves { grid-template-columns: 1fr 1fr; }
.appgrid > .card { margin-bottom: 0; }
@media (max-width: 1000px) { .appgrid, .appgrid--halves { grid-template-columns: 1fr; } }

.appgrid .card__title { margin-bottom: 1rem; }
.dl--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .dl--two { grid-template-columns: 1fr; } }
.dl dd { overflow-wrap: anywhere; }

.appcitizen { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .9rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.callout { border: 1px solid; border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .9rem; margin: 1rem 0 0; }
.callout--stop { background: #fdf2f1; border-color: #f2c4bd; color: #7d2216; }
.callout--warn { background: #fef8ec; border-color: #f0d494; color: #6e4b00; margin: 0 0 1.25rem; }

.btn--sm { padding: .3rem .65rem; font-size: .82rem; }
.btn--quiet { background: transparent; border-color: transparent; }
.btn--quiet:hover { background: #f1eee8; }
.btn--success { background: var(--green); border-color: var(--green); color: #fff; }
.btn--success:hover { background: #267a4c; }
.btn--danger-outline { background: var(--surface); border-color: var(--line); color: var(--red); }
.btn--danger-outline:hover { background: #fdf2f1; }

/* Reject: a <details> so it works with no script at all. */
.reject { position: relative; }
.reject > summary { list-style: none; }
.reject > summary::-webkit-details-marker { display: none; }
.reject__panel {
    position: absolute; inset-inline-end: 0; top: calc(100% + .4rem); z-index: 20;
    width: min(24rem, calc(100vw - 2rem));
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(20, 30, 60, .18); padding: 1rem;
}
.reject__title { font-weight: 700; margin: 0 0 .2rem; }
.reject__panel textarea { width: 100%; margin-top: .5rem; }
.reject__actions { display: flex; justify-content: flex-end; margin-top: .6rem; }

/* Documents */
.doclist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.doclist__row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .6rem; }
.doclist__info { min-width: 0; }
.doclist__name { margin: 0; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doclist__meta { margin: 0; font-size: .75rem; color: var(--ink-soft); }
.doclist__actions { display: flex; gap: .25rem; flex-shrink: 0; }
.docdecision { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.docdecision .hint { font-size: .8rem; color: var(--ink-soft); margin-bottom: .5rem; }
.docdecision__done { margin: 0; color: var(--green); font-weight: 700; font-size: .9rem; }

/* Workflow */
.workflow { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.25rem; }
.workflow__head { background: #f7f5f1; border-bottom: 1px solid var(--line); padding: .8rem 1.25rem; }
.workflow__title { font-size: .95rem; margin: 0; }
.workflow__sub { font-size: .8rem; color: var(--ink-soft); margin: 0; }
.workflow__msg { margin: 1rem 1.25rem 0; }
.workflow__links { border-top: 1px solid var(--line); padding: 1rem 1.25rem; }
.wsteps { list-style: none; margin: 0; padding: 0; }
.wstep { display: flex; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.wstep:last-child { border-bottom: 0; }
.wstep--todo { opacity: .6; }
.wstep__n {
    flex-shrink: 0; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    display: grid; place-items: center; font-size: .8rem; font-weight: 700;
    background: #eceae5; color: var(--ink-soft);
}
.wstep--current .wstep__n { background: var(--navy); color: #fff; }
.wstep--done .wstep__n { background: var(--green); color: #fff; }
.wstep__body { flex: 1; min-width: 0; display: grid; gap: .55rem; justify-items: start; }
.wstep__body > * { margin: 0; }
.wstep__title { font-weight: 700; font-size: .92rem; margin: 0; }
.wstep__hint { font-size: .8rem; color: var(--ink-soft); margin: -.45rem 0 0; }
.wstep__body .wstep__hint ~ .wstep__hint { margin-top: 0; }
.wstep__locked { font-size: .85rem; color: #8a5b00; background: #fdf6e7; border: 1px solid #f0dcae; border-radius: var(--radius-sm); padding: .4rem .7rem; }

.pdfcard { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; border: 1px solid var(--line); background: #f7f5f1; border-radius: var(--radius-sm); padding: .7rem .8rem; }
.pdfcard--good { border-color: #a7dcbd; background: #effaf3; }
.pdfcard--warn { border-color: #f0d494; background: #fef8ec; }
.pdfcard__info { min-width: 0; }
.pdfcard__title { margin: 0; font-size: .88rem; font-weight: 600; }
.pdfcard__sub { margin: 0; font-size: .78rem; color: var(--ink-soft); }
.pdfcard__actions { display: flex; gap: .3rem; }

.uploadrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.uploadrow input[type="file"] { max-width: 100%; font-size: .85rem; }
.replace > summary { list-style: none; display: inline-flex; }
.replace > summary::-webkit-details-marker { display: none; }
.replace[open] > summary { margin-bottom: .5rem; }
.sentrow { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.sentrow__ok { margin: 0; color: #1d6b42; font-size: .88rem; }

/* Answers and history */
.answers { margin: 0; font-size: .88rem; }
.answers > div { display: grid; grid-template-columns: 1fr 1.2fr; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.answers > div:last-child { border-bottom: 0; }
.answers dt { color: var(--ink-soft); }
.answers dd { margin: 0; overflow-wrap: anywhere; }
.atimeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.atimeline li { position: relative; padding-inline-start: 1.1rem; }
.atimeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); }
.atimeline__action { margin: 0; font-weight: 600; font-size: .88rem; }
.atimeline__meta { margin: 0; font-size: .75rem; color: var(--ink-soft); }

/* In-page document viewer */
.docviewer {
    width: min(64rem, calc(100vw - 2rem)); height: 88vh; max-height: 88vh;
    padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.docviewer[open] { display: flex; flex-direction: column; }
.docviewer::backdrop { background: rgba(15, 29, 57, .55); }
.docviewer__head { display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.docviewer__title { flex: 1; min-width: 0; margin: 0; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docviewer__newtab { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.docviewer__body { flex: 1; min-height: 0; overflow: auto; background: #ecebe7; }
.docviewer__body iframe { display: block; width: 100%; height: 100%; border: 0; }
.docviewer__body img { display: block; max-width: 100%; margin: 0 auto; }

/* ------------------------------------------------------ admin: dashboard */
/* Series colours are validated (dataviz validator, light, on #fff): blue then
   orange, CVD ΔE 24.7. Text never wears a series colour. */
.page-backend-dashboard, .admin {
    --series-1: #2a78d6;
    --series-2: #eb6834;
    --chart-grid: #ece9e2;
    --chart-axis: #c9c4b8;
}

.dash-todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.todo {
    display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: .85rem 1rem; box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.todo:hover { border-color: var(--navy); transform: translateY(-1px); }
.todo__n {
    flex-shrink: 0; min-width: 2.6rem; height: 2.6rem; padding: 0 .5rem; border-radius: 10px;
    display: grid; place-items: center; font-size: 1.25rem; font-weight: 700;
    background: #eceae5; color: var(--ink-soft);
}
.todo--hot .todo__n { background: var(--navy); color: #fff; }
.todo__text { flex: 1; min-width: 0; display: grid; }
.todo__label { font-weight: 700; font-size: .9rem; }
.todo__hint { font-size: .78rem; color: var(--ink-soft); }
.todo__go { color: var(--ink-soft); font-size: 1.1rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.kpi__label { margin: 0; font-size: .8rem; color: var(--ink-soft); }
.kpi__value { margin: .15rem 0 .1rem; font-size: 2rem; font-weight: 700; line-height: 1.15; }
.kpi__unit { font-size: .9rem; font-weight: 600; color: var(--ink-soft); margin-inline-start: .25rem; }
.kpi__foot { margin: 0; font-size: .78rem; color: var(--ink-soft); }
.kpi__delta { font-weight: 700; color: var(--ink); }
.kpi__delta--up::first-letter { color: var(--green); }
.kpi__delta--down::first-letter { color: var(--red); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
.dash-grid > .card { margin-bottom: 0; height: 100%; }
@media (max-width: 1050px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

.chart__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .75rem; }
.chart__title { font-size: 1rem; margin: 0; }
.chart__sub { font-size: .8rem; color: var(--ink-soft); margin: 0; }
.chart__subhead { font-size: .8rem; font-weight: 700; color: var(--ink-soft); margin: 1.25rem 0 .5rem; }
.chart__more { font-size: .85rem; }
.chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart__axis { stroke: var(--chart-axis); stroke-width: 1; }
.chart__tick { font-size: 11px; fill: var(--ink-soft); }
.chart__value { font-size: 12px; font-weight: 700; fill: var(--ink); }
.chart__hit { fill: transparent; }
.chart__bar--s1, .chart__fill--s1 { fill: var(--series-1); background: var(--series-1); }
.chart__bar--s2, .chart__fill--s2 { fill: var(--series-2); background: var(--series-2); }
.chart__mark { cursor: default; }
.chart__mark:hover .chart__hit { fill: rgba(22, 40, 77, .05); }
.chart__mark:hover .chart__bar { filter: brightness(.9); }
.chart__table { margin-top: .5rem; font-size: .85rem; }
.chart__table summary { cursor: pointer; color: var(--ink-soft); font-size: .8rem; }
.chart__table table { margin-top: .5rem; }

.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--ink-soft); }
.legend li { display: inline-flex; align-items: center; gap: .4rem; }
.legend__key { width: .7rem; height: .7rem; border-radius: 3px; display: inline-block; }
.legend--rows { display: grid; gap: .35rem; margin-top: .6rem; }
.legend--rows strong { margin-inline-start: auto; color: var(--ink); }
.legend--rows li { display: flex; }

.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.hbar {
    display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr 2rem; align-items: center; gap: .6rem;
    padding: .3rem .4rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-size: .84rem;
}
a.hbar:hover, .hbar:hover { background: #f4f2ee; }
.hbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { height: .7rem; background: #f1efea; border-radius: 4px; overflow: hidden; }
.hbar__fill { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar__fill--s1 { background: var(--series-1); }
.hbar__fill--muted { background: #b9b4aa; }
.hbar__n { text-align: end; font-weight: 700; }

.split { display: flex; gap: 2px; height: .9rem; border-radius: 4px; overflow: hidden; background: #f1efea; }
.split__seg { display: block; min-width: 4px; }

.charttip {
    position: fixed; z-index: 50; pointer-events: none;
    background: var(--navy-dark); color: #fff; font-size: .8rem; line-height: 1.4;
    padding: .35rem .6rem; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    max-width: 18rem; transform: translate(-50%, calc(-100% - 10px));
}

/* ======================================================================
   Public site, matching the previous (React) site
   ====================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.text-gold {
    background: linear-gradient(135deg, var(--gold), #f0b93a);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 5.5rem; }

/* Header ---------------------------------------------------------------- */
.masthead {
    position: sticky; top: 0; z-index: 40;
    background: linear-gradient(135deg, #16284d, #0e1a33);
    box-shadow: 0 4px 16px rgba(10, 20, 45, .25);
}
.masthead__inner { max-width: 80rem; min-height: 4rem; padding: .6rem 1rem; flex-wrap: nowrap; }
@media (min-width: 768px) { .masthead__inner { min-height: 5rem; } }
.masthead__emblemwrap {
    width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--gold);
    display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
}
@media (min-width: 768px) { .masthead__emblemwrap { width: 3rem; height: 3rem; } }
.masthead__emblem { width: 2rem; height: 2rem; object-fit: contain; background: none; border-radius: 0; }
@media (min-width: 768px) { .masthead__emblem { width: 2.5rem; height: 2.5rem; } }
.masthead__office { font-size: .9rem; }
@media (min-width: 768px) { .masthead__office { font-size: 1rem; } .masthead__place { font-size: .85rem; } }
@media (max-width: 420px) { .masthead__names { display: none; } }

.masthead__nav { flex-wrap: nowrap; gap: .15rem; }
.masthead__nav a { font-size: .875rem; font-weight: 500; color: rgba(250, 248, 244, .8); padding: .5rem .9rem; border-radius: 8px; white-space: nowrap; }
.masthead__nav a:hover { color: var(--gold); background: rgba(250, 248, 244, .05); }
.masthead__sep { width: 1px; height: 1.5rem; background: rgba(250, 248, 244, .2); margin: 0 .5rem; }
.masthead__account {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(232, 185, 61, .9) !important; color: #1d2433 !important; font-weight: 700 !important;
}
.masthead__account:hover { background: var(--gold) !important; }
.masthead__accountname { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }

.masthead__toggle {
    display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: #fff;
}
.masthead__burger, .masthead__burger::before, .masthead__burger::after {
    display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, opacity .2s;
}
.masthead__burger::before, .masthead__burger::after { content: ""; position: absolute; left: 0; }
.masthead__burger::before { top: -7px; }
.masthead__burger::after { top: 7px; }
.masthead.is-open .masthead__burger { background: transparent; }
.masthead.is-open .masthead__burger::before { transform: translateY(7px) rotate(45deg); }
.masthead.is-open .masthead__burger::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1023px) {
    .masthead__toggle { display: block; }
    .masthead__nav {
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: .25rem;
        padding: .75rem 1rem 1rem;
        background: linear-gradient(135deg, #16284d, #0e1a33);
        border-top: 1px solid rgba(250, 248, 244, .1);
        display: none;
    }
    .masthead.is-open .masthead__nav { display: flex; }
    .masthead__nav a { padding: .75rem 1rem; }
    .masthead__sep { display: none; }
    /* Without script the toggle cannot work, so the links simply show. */
    html:not(.js) .masthead__toggle { display: none; }
    html:not(.js) .masthead__nav { display: flex; position: static; }
    html:not(.js) .masthead__inner { flex-wrap: wrap; }
}

/* Footer ---------------------------------------------------------------- */
.sitefoot { background: #1d2433; margin-top: 0; }
.sitefoot__inner { text-align: center; padding: 2rem 1rem; }
.sitefoot__office { color: rgba(250, 248, 244, .6); font-weight: 400; font-size: .875rem; margin: 0; }
.sitefoot__note { color: rgba(250, 248, 244, .4); font-size: .75rem; margin: .5rem 0 0; }

/* Shared buttons -------------------------------------------------------- */
.lbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .6rem 1.2rem; border-radius: 10px; border: 1px solid transparent;
    font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: opacity .15s, background .15s, border-color .15s, transform .15s;
}
.lbtn--lg { padding: .8rem 1.4rem; font-size: 1rem; }
.lbtn--sm { padding: .35rem .75rem; font-size: .8rem; border-radius: 8px; }
.lbtn--block { width: 100%; }
.lbtn--saffron { background: linear-gradient(135deg, #e67219, #f2a23a); color: #fff; padding: .8rem 2rem; border-radius: 12px; box-shadow: 0 10px 25px -8px rgba(230, 114, 25, .6); }
.lbtn--saffron:hover { opacity: .9; }
.lbtn--ghost { border: 2px solid rgba(250, 248, 244, .3); color: #fff; padding: .75rem 2rem; border-radius: 12px; }
.lbtn--ghost:hover { background: rgba(250, 248, 244, .1); }
.lbtn--navy { background: var(--navy); color: #faf8f4; }
.lbtn--navy:hover { background: var(--navy-dark); }
.lbtn--outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.lbtn--outline:hover { background: #f6f3ec; border-color: var(--gold); }
.lbtn--gold { background: var(--gold); color: #1d2433; }
.lbtn--gold:hover { background: #f1c75a; }
.lbtn[disabled], .lbtn.is-busy { opacity: .6; cursor: progress; }

/* Home: full-bleed sections --------------------------------------------- */
.page-home .site__main { max-width: none; padding: 0; }
.page-home .messages { max-width: 70rem; margin: 1rem auto; padding: 0 1rem; }

.lhero { position: relative; min-height: 85vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lhero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lhero__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(12, 24, 49, .85), rgba(18, 36, 73, .7) 50%, rgba(12, 24, 49, .9)); }
.lhero__content { position: relative; z-index: 1; text-align: center; padding: 8rem 1rem; max-width: 64rem; }
.lhero__rule { display: block; width: 6rem; height: 4px; background: var(--gold); border-radius: 999px; margin: 0 auto 2rem; animation: rule-in .8s .2s both ease-out; }
.lhero__title { color: #faf8f4; font-size: clamp(2.25rem, 7vw, 4.5rem); line-height: 1.15; margin-bottom: 1.5rem; animation: rise .7s .3s both ease-out; }
.lhero__place { color: rgba(250, 248, 244, .8); font-size: clamp(1.05rem, 2vw, 1.25rem); margin: 0 auto 1rem; animation: rise .7s .5s both ease-out; }
.lhero__welcome {
    max-width: 42rem; margin: 2rem auto 0; padding: 1.5rem 2rem;
    background: rgba(250, 248, 244, .1); border: 1px solid rgba(250, 248, 244, .2); border-radius: 1rem;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    animation: rise .7s .7s both ease-out;
}
.lhero__welcome p { margin: 0; color: rgba(250, 248, 244, .9); font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.7; }
.lhero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; animation: fade .7s .9s both; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lsection { padding: 5rem 0; background: var(--bg); }
@media (min-width: 768px) { .lsection { padding: 7rem 0; } }
.lsection--muted { background: #f1eee6; }
.lsection--navy { background: linear-gradient(135deg, #16284d, #0e1a33); }
.lwrap { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.lwrap--narrow { max-width: 50rem; }
.lwrap--mid { max-width: 58rem; }

.lhead { text-align: center; margin-bottom: 4rem; }
.lhead__eyebrow { color: var(--saffron); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .5rem; }
.lhead__title { font-size: clamp(1.9rem, 4vw, 2.25rem); margin: 0 0 1rem; color: var(--ink); }
.lhead__rule { display: block; width: 4rem; height: 4px; background: var(--gold); border-radius: 999px; margin: 0 auto; }
.lhead--light .lhead__eyebrow { color: var(--gold); }
.lhead--light .lhead__title { color: #faf8f4; }

.lservices { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lservices { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lservices { grid-template-columns: repeat(4, 1fr); } }
.lservice {
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    background: var(--surface); border-radius: 1rem; padding: 1.5rem; border-top: 3px solid var(--gold);
    box-shadow: 0 1px 3px rgba(20, 30, 60, .06); transition: transform .3s, box-shadow .3s;
}
.lservice:hover { transform: translateY(-4px); box-shadow: 0 12px 40px -12px rgba(22, 40, 77, .15); }
.lservice__icon {
    width: 3.5rem; height: 3.5rem; border-radius: .75rem; margin-bottom: 1.25rem;
    display: grid; place-items: center; color: var(--gold); background: linear-gradient(135deg, #16284d, #0e1a33);
}
.lservice__title { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; color: var(--ink); }
.lservice__text { color: var(--ink-soft); font-size: .875rem; line-height: 1.6; }
.lservice__cta { color: #c99a1f; font-size: .75rem; font-weight: 700; margin-top: .75rem; }

.lnotices { display: grid; gap: 1.5rem; }
.lnotice { display: flex; gap: 1.25rem; align-items: flex-start; background: var(--surface); border-radius: 1rem; padding: 1.5rem; border-left: 4px solid var(--saffron); box-shadow: 0 1px 3px rgba(20, 30, 60, .06); }
.lnotice__icon { flex-shrink: 0; margin-top: .25rem; }
.lnotice__icon--warn { color: var(--saffron); }
.lnotice__icon--leaf { color: var(--green); }
.lnotice__title { font-size: 1.125rem; margin: 0 0 .5rem; }
.lnotice__text { color: var(--ink-soft); font-size: .875rem; line-height: 1.7; margin: 0; }

.labout { background: var(--surface); border-radius: 1rem; padding: 2rem; border-top: 3px solid var(--gold); box-shadow: 0 1px 3px rgba(20, 30, 60, .06); color: var(--ink-soft); line-height: 1.75; }
@media (min-width: 768px) { .labout { padding: 2.5rem; } }
.labout strong { color: var(--ink); }
.labout__stats { display: grid; gap: 1rem; grid-template-columns: 1fr; padding-top: 1rem; }
@media (min-width: 768px) { .labout__stats { grid-template-columns: repeat(3, 1fr); } }
.labout__stat { text-align: center; padding: 1rem; border-radius: .75rem; background: #f1eee6; }
.labout__n { font-size: 1.9rem; font-weight: 700; color: var(--saffron); margin: 0; }
.labout__label { font-size: .875rem; margin: .25rem 0 0; }

.lcontact { max-width: 48rem; margin: 0 auto; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .lcontact { grid-template-columns: repeat(3, 1fr); } }
.lcontact__card { text-align: center; padding: 1.5rem; border-radius: 1rem; background: rgba(250, 248, 244, .05); border: 1px solid rgba(250, 248, 244, .1); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lcontact__icon { width: 3rem; height: 3rem; border-radius: 50%; background: rgba(232, 185, 61, .2); color: var(--gold); display: grid; place-items: center; margin: 0 auto 1rem; }
.lcontact__title { color: #faf8f4; font-size: .875rem; margin: 0 0 .75rem; }
.lcontact__line { color: rgba(250, 248, 244, .7); font-size: .875rem; margin: 0; line-height: 1.6; }

/* Schemes dialog */
.ldialog { width: min(28rem, calc(100vw - 2rem)); border: 0; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 25px 60px rgba(0, 0, 0, .3); }
.ldialog::backdrop { background: rgba(10, 18, 36, .6); }
.ldialog[open] { animation: rise .25s ease-out; }
.ldialog__close { position: absolute; top: .75rem; right: .75rem; background: none; border: 0; font-size: 1rem; cursor: pointer; color: var(--ink-soft); padding: .25rem .5rem; border-radius: 6px; }
.ldialog__close:hover { background: #f1eee6; }
.ldialog__title { text-align: center; font-size: 1.25rem; margin: 0 0 1rem; }
.ldialog__list { display: grid; gap: .75rem; }
.ldialog__link {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem;
    padding: .8rem 1rem; border: 1px solid rgba(232, 185, 61, .35); border-radius: 8px;
    color: var(--ink); font-weight: 600; font-size: .875rem; text-decoration: none;
}
.ldialog__link:hover { background: rgba(232, 185, 61, .1); border-color: var(--gold); }

/* Scroll reveal: only hidden once script has marked the page, so nothing is
   ever invisible without JS; and never animated for reduced motion. */
html.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .5s ease-out var(--d, 0s), transform .5s ease-out var(--d, 0s); }
html.js [data-reveal="left"] { transform: translateX(-30px); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
    .lhero__rule, .lhero__title, .lhero__place, .lhero__welcome, .lhero__actions { animation: none; }
}

/* Aawak-jawak register ----------------------------------------------------- */
.page-aawak-jawak .masthead, .page-aawak-jawak .sitefoot { display: none; }
.page-aawak-jawak .site__main { max-width: none; padding: 0; }
.regbar { position: sticky; top: 0; z-index: 40; background: linear-gradient(135deg, #16284d, #0e1a33); color: #faf8f4; box-shadow: 0 4px 16px rgba(10, 20, 45, .25); }
.regbar__inner { max-width: 80rem; margin: 0 auto; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.regbar__btn { flex-shrink: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 8px; color: #faf8f4; }
.regbar__btn:hover { background: rgba(250, 248, 244, .1); }
.regbar__titles { flex: 1; min-width: 0; }
.regbar__title { font-size: clamp(1.1rem, 2.5vw, 1.25rem); margin: 0; color: #faf8f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.regbar__place { color: var(--gold); font-size: .8rem; margin: 0; }
.regwrap { max-width: 80rem; margin: 0 auto; padding: 1.5rem .75rem 3rem; }
@media (min-width: 640px) { .regwrap { padding-inline: 1rem; } }
.regcount { color: var(--ink-soft); font-size: .85rem; margin-bottom: 1rem; }
.regcount strong { color: var(--ink); }
.regcount__stale { color: #8a5b00; }
.regempty { text-align: center; padding: 5rem 1rem; color: var(--ink-soft); }
.regempty__err { color: var(--red); font-weight: 600; }
.regempty__icon { display: block; margin-bottom: 1rem; opacity: .6; }
.regcards { display: grid; gap: .75rem; }
.regcard { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: .75rem; padding: 1rem; box-shadow: 0 1px 3px rgba(20, 30, 60, .06); }
.regcard__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .5rem; }
.regcard__no { font-size: .75rem; font-weight: 700; color: #a87d10; background: rgba(232, 185, 61, .12); padding: .2rem .5rem; border-radius: 4px; }
.regcard__date { font-size: .75rem; color: var(--ink-soft); }
.regcard__subject { font-size: .9rem; font-weight: 500; margin: 0 0 .75rem; line-height: 1.6; }
.regtable { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; box-shadow: 0 1px 3px rgba(20, 30, 60, .06); }
.regtable table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.regtable th { background: linear-gradient(135deg, #16284d, #0e1a33); color: #faf8f4; font-weight: 700; text-align: start; padding: .8rem 1rem; }
.regtable td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.regtable tbody tr:hover { background: #f6f3ec; }
.regtable .center { text-align: center; }
.regtable__no { font-weight: 600; color: #a87d10; white-space: nowrap; }
.regtable__date { color: var(--ink-soft); white-space: nowrap; }
@media (min-width: 640px) { .regcards { display: none; } .regtable { display: block; } }

/* Forms, tracking, auth: the centred card pages --------------------------- */
.applypage { max-width: 42rem; margin: 0 auto; padding: 1rem 0 2rem; }
.applypage--narrow { max-width: 32rem; }
.applypage--auth { max-width: 28rem; }
.applypage--auth.applypage--wide { max-width: 36rem; }
.applypage--center { max-width: 32rem; min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.backlink { display: inline-flex; align-items: center; gap: .3rem; font-size: .875rem; color: var(--ink-soft); text-decoration: none; margin-bottom: 1rem; }
.backlink:hover { color: var(--ink); }
.applycard { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: .75rem; padding: 1.5rem; box-shadow: 0 1px 3px rgba(20, 30, 60, .06); }
@media (min-width: 640px) { .applycard { padding: 1.75rem 2rem 2rem; } }
.applycard--center { text-align: center; }
.applycard__head { margin-bottom: 1.25rem; }
.applycard__head--center { text-align: center; }
.applycard__title { font-size: 1.5rem; margin: 0 0 .35rem; }
.applycard__sub { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.authemblem { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--gold); display: grid; place-items: center; margin: 0 auto .5rem; overflow: hidden; }
.authemblem img { height: 2.5rem; width: auto; }
.authnote { font-size: .78rem; color: var(--ink-soft); text-align: center; border-top: 1px solid var(--line); padding-top: 1rem; margin: 1.25rem 0 0; }
.belowcard { text-align: center; font-size: .875rem; color: var(--ink-soft); margin-top: 1rem; }
.belowcard a { color: var(--navy); font-weight: 600; }

.applybanner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; border: 1px solid var(--line); background: #f6f3ec; border-radius: .5rem; padding: .75rem; margin-bottom: 1.25rem; }
.applybanner p { margin: 0; font-size: .875rem; color: var(--ink-soft); flex: 1; min-width: 12rem; }
.applybanner--in { align-items: flex-start; justify-content: flex-start; border-color: rgba(47, 143, 91, .3); background: rgba(47, 143, 91, .06); }
.applybanner--in .ico { color: var(--green); margin-top: .2rem; flex-shrink: 0; }
.applybanner--in p { color: var(--ink); }

.applyform { display: grid; gap: 1.25rem; }
.fgrid { display: grid; gap: 1.25rem 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fgrid { grid-template-columns: 1fr 1fr; } }
.ffield { display: grid; gap: .45rem; align-content: start; min-width: 0; }
.ffield > label { font-weight: 600; font-size: .875rem; }
.ffield input, .ffield select, .ffield textarea { border-radius: 8px; min-height: 2.6rem; }
.ffield input[disabled] { background: #f3f1ec; color: var(--ink-soft); }
.ffield.has-error input, .ffield.has-error select, .ffield.has-error textarea { border-color: var(--red); }
.ffield .err { color: var(--red); font-size: .78rem; margin: 0; }
.ffield__row { display: flex; justify-content: space-between; align-items: baseline; }
.ffield__aside { font-size: .75rem; color: var(--ink-soft); text-decoration: none; }
.ffield__aside:hover { color: var(--navy); }
.fhint { font-size: .75rem; color: var(--ink-soft); margin: 0; }

.dropzone {
    display: flex; align-items: center; justify-content: center; gap: .5rem; height: 5rem;
    border: 2px dashed var(--line); border-radius: .5rem; cursor: pointer; color: var(--ink-soft); font-size: .875rem;
    transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--gold); background: rgba(232, 185, 61, .05); }
/* With script the real input is hidden behind the zone; without, it shows. */
html.js .dropzone__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
html:not(.js) .dropzone { display: none; }
.pickedfiles { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pickedfiles li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border: 1px solid var(--line); border-radius: 6px; padding: .45rem .75rem; font-size: .875rem; }
.pickedfiles span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickedfiles button { background: none; border: 0; color: var(--ink-soft); cursor: pointer; padding: .1rem .3rem; border-radius: 4px; flex-shrink: 0; }
.pickedfiles button:hover { color: var(--red); background: #fdf2f1; }

.success__icon { color: var(--green); display: block; margin-bottom: .5rem; }
.success__box { background: #f1eee6; border-radius: .5rem; padding: 1rem; margin: 1.25rem 0; }
.success__label { font-size: .75rem; color: var(--ink-soft); margin: 0; }
.success__no { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: .03em; margin: .1rem 0; }
.success__hint { font-size: .75rem; color: var(--ink-soft); margin: .5rem 0 0; }
.success__actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.success__actions--fill .lbtn:first-child { flex: 1; }

.trackerr { color: var(--red); text-align: center; font-size: .875rem; margin: 1.25rem 0 0; }
.trackresult { border: 1px solid var(--line); border-radius: .5rem; padding: 1rem; margin-top: 1.25rem; display: grid; gap: .35rem; }
.trackresult p { margin: 0; }
.trackresult__no { font-size: .75rem; color: var(--ink-soft); }
.trackresult__name { font-weight: 600; }
.trackresult__service { font-size: .8rem; color: var(--ink-soft); }
.trackresult__status { font-size: 1.125rem; font-weight: 700; color: var(--navy); }
.trackresult__detail { font-size: .875rem; color: var(--ink-soft); }
.trackresult__reason { font-size: .875rem; color: var(--red); }
.trackresult__progress { margin-top: .75rem; }

/* Four-step tracker */
.cprogress { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; }
.cprogress__step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.cprogress__step + .cprogress__step::before {
    content: ""; position: absolute; top: .875rem; right: 50%; left: -50%; height: 2px; background: var(--line);
}
.cprogress__step--done + .cprogress__step::before, .cprogress__step--done::before, .cprogress__step--active::before { background: var(--navy); }
.cprogress__dot {
    position: relative; z-index: 1; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    display: grid; place-items: center; font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums;
    border: 2px solid var(--line); background: var(--surface); color: var(--ink-soft);
}
.cprogress__step--done .cprogress__dot { border-color: var(--navy); background: var(--navy); color: #fff; }
.cprogress__step--active .cprogress__dot { border-color: var(--navy); color: var(--navy); }
.cprogress__label { margin-top: .4rem; text-align: center; font-size: .7rem; line-height: 1.3; padding: 0 .25rem; color: var(--ink-soft); }
.cprogress__step--active .cprogress__label { font-weight: 700; color: var(--ink); }
.cprogress-rejected { display: flex; align-items: center; gap: .5rem; background: #fdf0ee; color: var(--red); border-radius: .5rem; padding: .6rem .75rem; }
.cprogress-rejected p { margin: 0; font-weight: 700; font-size: .875rem; }

/* Citizen badges, as the previous site coloured them */
.cbadge { display: inline-flex; align-items: center; border-radius: 999px; padding: .25rem .65rem; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.cbadge--received { background: #efece4; color: var(--ink-soft); }
.cbadge--under_review { background: rgba(232, 185, 61, .2); color: #6e5200; }
.cbadge--signing, .cbadge--signed { background: rgba(230, 114, 25, .14); color: #b0540c; }
.cbadge--approved, .cbadge--delivered { background: rgba(47, 143, 91, .15); color: #23704a; }
.cbadge--rejected { background: #fdeceb; color: var(--red); }

/* Account --------------------------------------------------------------- */
.accountpage { max-width: 56rem; margin: 0 auto; }
.accounthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.accounthead .backlink { margin-bottom: .5rem; }
.accounthead__title { font-size: 1.5rem; margin: 0; }
.accounthead__sub { font-size: .875rem; color: var(--ink-soft); margin: .25rem 0 0; }
.accountstatus { margin: -.5rem 0 1rem; }
.tabs { display: inline-flex; gap: .25rem; padding: .25rem; background: #efece4; border-radius: .5rem; margin-bottom: 1.25rem; }
.tabs__tab { padding: .4rem .9rem; border-radius: .35rem; font-size: .875rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.tabs__tab.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.accountactions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.acards { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: 1.25rem; box-shadow: 0 1px 3px rgba(20, 30, 60, .06); display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.acards .acard { margin-bottom: 0; }
.acard--empty { text-align: center; padding: 3rem 1rem; gap: .25rem; }
.acard__emptyicon { opacity: .3; }
.acard__emptytitle { font-weight: 700; margin: 0; }
.acard__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.acard__no { font-size: .75rem; color: var(--ink-soft); margin: 0; }
.acard__title { font-size: 1.125rem; margin: 0; }
.acard__date { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.acard__detail { font-size: .875rem; color: var(--ink-soft); margin: 0; }
.acard__reason { border: 1px solid rgba(192, 57, 43, .3); background: rgba(192, 57, 43, .05); border-radius: .5rem; padding: .75rem; }
.acard__reason p { margin: 0; font-size: .875rem; }
.acard__reasonlabel { font-size: .75rem !important; font-weight: 700; color: var(--red); }
.acard__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.acard__sectiontitle { font-size: 1rem; margin: 0; }
.acard > .muted { margin: -.75rem 0 0; font-size: .85rem; }
.claimrow { display: flex; flex-wrap: wrap; gap: .5rem; }
.claimrow input { flex: 1 1 10rem; width: auto; }
.accountpage .card { border-radius: .75rem; }

/* Verify ---------------------------------------------------------------- */
.verifymark { display: block; margin: 0 auto .5rem; }
.verifymark--good { color: var(--green); }
.verifymark--bad { color: var(--red); }
.vrows { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: .5rem; font-size: .875rem; }
.vrows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.vrows > div:last-child { border-bottom: 0; }
.vrows dt { color: var(--ink-soft); }
.vrows dd { margin: 0; font-weight: 600; text-align: end; }
.vrows dd.mono { font-size: .8rem; }
.applycard--verify .fhint { margin-bottom: 1rem; }

/* Income for three financial years (उत्पन्नाचा दाखला form). */
.incomeyears { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1rem 1.25rem; margin: 0; min-width: 0; display: grid; gap: 1rem; }
.incomeyears > legend { font-weight: 600; font-size: .9rem; padding: 0 .4rem; }
.incomeyears > .fhint { margin: 0; }
.incomeyears > .fgrid + .fgrid { padding-top: 1rem; border-top: 1px dashed var(--line); }
