/* MaD site. One family (Archivo, variable width and weight), one accent job: the lamps. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --paper: #F4F6F8; --sheet: #FFFFFF; --ink: #15233F; --slate: #4B5B73;
  --rule: #D5DCE4; --rule-strong: #9FACBD;
  --red: #C0362C; --amber: #EDA200; --green: #1C7F47;
  --radius: 6px; --w: 68rem;
  --step-1: 1.25rem; --step-2: 1.6rem; --step-3: 2.1rem;
  --step-4: clamp(2.5rem, 9vw, 4.6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Archivo", "Noto Sans Gujarati", "Noto Sans Devanagari", system-ui, sans-serif;
  font-size: 1.0625rem; line-height: 1.55;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.progress-bar { display: block; width: 100%; max-width: 30rem; height: 10px; margin: .5rem 0 .3rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .7rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 1.1rem; }
.num { font-variant-numeric: tabular-nums; }
.slate { color: var(--slate); }
.small { font-size: .9rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.6rem; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 .6rem; }
h1 { font-stretch: 118%; font-weight: 800; font-size: var(--step-3); letter-spacing: -.012em; }
h2 { font-stretch: 112%; font-weight: 750; font-size: var(--step-2); letter-spacing: -.008em; }
h3 { font-stretch: 100%; font-weight: 700; font-size: 1.1rem; }
p { margin: 0 0 1rem; max-width: 42rem; }
ul, ol { max-width: 42rem; padding-left: 1.25rem; }
li { margin-bottom: .35rem; }

/* ---------- header and footer ---------- */
.site-head { background: var(--sheet); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1.5rem; padding-top: .8rem; padding-bottom: .5rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); padding-bottom: .3rem; }
.brand-lamps { display: flex; gap: 4px; }
.brand-lamps svg { width: 16px; height: 16px; display: block; }
.brand-name { font-stretch: 125%; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { display: block; font-stretch: 100%; font-weight: 500; font-size: .8rem; letter-spacing: 0; color: var(--slate); }
.brand-logo { height: 36px; width: auto; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.2rem; font-weight: 600; font-stretch: 92%; }
.main-nav a { color: var(--ink); text-decoration: none; padding: .55rem 0; border-bottom: 3px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--rule-strong); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.main-nav .btn { margin-left: .2rem; min-height: 40px; padding: 0 1rem; border-bottom: 2px solid var(--ink); }
.site-foot { border-top: 1px solid var(--rule); margin-top: 3.5rem; padding: 1.6rem 0 2.6rem; font-size: .9rem; color: var(--slate); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.site-foot a { color: var(--slate); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: 0 1.3rem; background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: var(--radius); font: inherit; font-weight: 650; font-stretch: 100%; text-decoration: none; cursor: pointer; }
.btn:hover { background: #0B1730; text-decoration: none; }
.btn:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); outline: none; }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.3rem 0; }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #FBEDEB; }
.btn-small { min-height: 38px; padding: 0 .85rem; font-size: .95rem; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* ---------- lamps ---------- */
.lamp { width: 28px; height: 28px; display: block; flex: none; }
.lamp-sm { width: 20px; height: 20px; }
.lamp-lg { width: 56px; height: 56px; }
.lamp-xl { width: 92px; height: 92px; }
.lamps { display: flex; gap: .4rem; }
.legend { display: grid; gap: .6rem; margin: 1rem 0 1.4rem; padding: 0; list-style: none; max-width: 44rem; }
.legend li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; margin: 0; }
.legend b { font-weight: 700; }
.state { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }

/* ---------- report title block ---------- */
.report { display: grid; gap: 1.6rem 3rem; padding: 2.4rem 0 1.4rem; }
.report h1 { font-size: var(--step-4); font-stretch: 125%; line-height: 1.02; letter-spacing: -.02em; margin-bottom: 1.1rem; max-width: 11ch; }
.report .lead { font-size: 1.22rem; line-height: 1.45; max-width: 34rem; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.2rem; margin: 1.3rem 0 0; font-size: .95rem; max-width: 40rem; }
.meta dt { font-weight: 650; font-stretch: 90%; color: var(--slate); }
.meta dd { margin: 0; }
.hero-lamps { display: grid; gap: .9rem; align-content: start; }
.hero-lamp { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.hero-lamp .name { font-stretch: 118%; font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; }
.hero-lamp .what { color: var(--slate); font-size: .95rem; }
.hero-lamp svg { position: relative; }
.stack { position: relative; width: 92px; height: 92px; }
.stack svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stack .amber, .stack .green { opacity: 0; animation: lamp-on .45s ease-out forwards; }
.hero-lamp:nth-child(1) .amber { animation-delay: .5s; } .hero-lamp:nth-child(1) .green { animation-delay: 1.4s; }
.hero-lamp:nth-child(2) .amber { animation-delay: 1.0s; } .hero-lamp:nth-child(2) .green { animation-delay: 1.9s; }
.hero-lamp:nth-child(3) .amber { animation-delay: 1.5s; } .hero-lamp:nth-child(3) .green { animation-delay: 2.4s; }
@keyframes lamp-on { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .stack .amber, .stack .green { animation: none; opacity: 1; } }
@media (min-width: 60rem) {
  .report { grid-template-columns: 1.25fr .75fr; align-items: center; padding-top: 3.4rem; }
}

/* ---------- blocks ---------- */
.block { padding: 2.2rem 0; border-top: 1px solid var(--rule); }
.block > h2 { margin-bottom: 1rem; }
.cols { display: grid; gap: 1.6rem 2.5rem; }
@media (min-width: 52rem) { .cols-2 { grid-template-columns: 1fr 1fr; } .cols-3 { grid-template-columns: repeat(3, 1fr); } }
.step { display: grid; grid-template-columns: 2.4rem 1fr; gap: .2rem .8rem; }
.step .n { font-stretch: 125%; font-weight: 800; font-size: 1.6rem; line-height: 1.1; }
.step p { margin: 0; }
.lane-card h3 { display: flex; align-items: center; gap: .6rem; }
.fact { font-size: .9rem; color: var(--slate); border-left: 3px solid var(--rule-strong); padding-left: .8rem; margin: .8rem 0 0; }

/* measures (status at a glance) */
.measures { border-top: 2px solid var(--ink); }
.measure { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.measure .k { font-weight: 600; }
.measure .v { font-stretch: 112%; font-weight: 800; font-size: 1.55rem; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.1; }
.measure .b { grid-column: 1 / -1; color: var(--slate); font-size: .875rem; }
@media (min-width: 52rem) {
  .measure { grid-template-columns: minmax(15rem, 1.1fr) minmax(8rem, .55fr) 2fr; }
  .measure .v { text-align: left; }
  .measure .b { grid-column: auto; }
}
.progress { height: 10px; background: var(--rule); border-radius: 5px; overflow: hidden; margin: .5rem 0 .3rem; max-width: 30rem; }
.progress > span { display: block; height: 100%; background: var(--ink); }

/* ---------- wall ---------- */
.wall-tools { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.search { max-width: 22rem; width: 100%; }
.wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 46rem) { .wall { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 62rem) { .wall { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; gap: .5rem; min-height: 8.2rem; padding: .9rem .9rem 1rem; background: var(--sheet); color: var(--ink); text-decoration: none; }
.tile:hover { background: #F9FAFB; }
.tile[hidden] { display: none; }
.tile .name { font-weight: 700; font-stretch: 96%; line-height: 1.2; overflow-wrap: anywhere; }
.tile .city { color: var(--slate); font-size: .875rem; }
.tile .lamps { margin-top: auto; }
.tile .full { font-size: .8rem; font-weight: 650; color: var(--green); }
.tile-empty { grid-column: 1 / -1; background: var(--sheet); padding: 1.6rem 1.2rem; }
.tile-empty h3 { margin-bottom: .4rem; }

.chart { width: 100%; max-width: 44rem; height: auto; display: block; }
.chart text { font-family: inherit; font-size: 11px; fill: var(--slate); }

/* ---------- forms ---------- */
.form { max-width: 34rem; }
.field { margin: 0 0 1.2rem; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 650; margin-bottom: .3rem; padding: 0; }
.hint { color: var(--slate); font-size: .9rem; margin: 0 0 .45rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=url], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: .55rem .75rem; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--rule-strong); border-radius: var(--radius);
}
input[type=file] { width: 100%; font: inherit; padding: .6rem; background: #fff; border: 2px dashed var(--rule-strong); border-radius: var(--radius); }
textarea { min-height: 6.5rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; box-shadow: none; }
.invalid > input, .invalid > textarea, .invalid > select { border-color: var(--red); }
.err { color: var(--red); font-weight: 650; margin: .35rem 0 0; font-size: .95rem; }
.err-box { border: 2px solid var(--red); background: #fff; padding: .9rem 1.1rem; margin: 0 0 1.4rem; border-radius: var(--radius); max-width: 34rem; }
.err-box p { margin: 0 0 .3rem; font-weight: 650; }
.err-box ul { margin: 0; }
.err-box a { color: var(--red); }
.choice { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .85rem; background: #fff; border: 2px solid var(--rule); border-radius: var(--radius); margin: 0 0 .5rem; cursor: pointer; }
.choice input { width: 1.3rem; height: 1.3rem; margin: .18rem 0 0; accent-color: var(--ink); flex: none; }
.choice:has(input:checked) { border-color: var(--ink); }
.choice b { display: block; font-weight: 650; }
.choice span { color: var(--slate); font-size: .9rem; }
.trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.pair { display: grid; gap: 0 1rem; }
@media (min-width: 40rem) { .pair { grid-template-columns: 1fr 1fr; } }
details.more { margin: 0 0 1.2rem; background: #fff; border: 2px solid var(--rule); border-radius: var(--radius); padding: .2rem 1rem; max-width: 34rem; }
details.more summary { cursor: pointer; font-weight: 650; padding: .7rem 0; }
.estimate { background: #fff; border-left: 4px solid var(--ink); padding: .7rem 1rem; margin: 0 0 1.2rem; font-weight: 600; max-width: 34rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .8rem; }
.thumbs figure { margin: 0; width: 7.5rem; }
.thumbs img { width: 100%; height: 5.6rem; object-fit: cover; border: 1px solid var(--rule-strong); border-radius: 4px; display: block; }
.thumbs figcaption { font-size: .85rem; }

.flashes { margin-top: 1rem; }
.flash { background: #fff; border-left: 5px solid var(--ink); padding: .8rem 1rem; margin: 0 0 .6rem; max-width: 46rem; overflow-wrap: anywhere; }

/* ---------- desk ---------- */
.desk-head { padding: 2rem 0 1rem; }
.desk-head h1 { max-width: 20ch; }
.lane-buttons { display: grid; gap: .8rem; margin: 1rem 0 1.6rem; }
@media (min-width: 52rem) { .lane-buttons { grid-template-columns: repeat(3, 1fr); } }
.lane-btn { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; align-items: center; padding: 1rem; background: #fff; border: 2px solid var(--rule-strong); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.lane-btn:hover { border-color: var(--ink); }
.lane-btn .lamp { grid-row: 1 / span 3; }
.lane-btn b { font-stretch: 112%; font-weight: 800; font-size: 1.2rem; }
.lane-btn .st { font-weight: 600; font-size: .95rem; }
.lane-btn .go { font-size: .9rem; color: var(--slate); }
.copybox { display: flex; gap: .5rem; max-width: 38rem; }
.copybox input { flex: 1; min-width: 0; }
.card-preview { max-width: 15rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); display: block; }
.notice { background: #fff; border-left: 5px solid var(--amber); padding: .8rem 1rem; margin: 0 0 1.2rem; max-width: 42rem; }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font-stretch: 90%; font-weight: 700; border-bottom: 2px solid var(--ink); padding: .5rem .8rem .5rem 0; white-space: nowrap; }
.tbl td { padding: .65rem .8rem .65rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl form { display: inline; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0 0 1.2rem; }
.kv dt { color: var(--slate); font-weight: 600; font-stretch: 92%; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- statement (printable) ---------- */
.statement { background: #fff; border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 1.6rem 1.4rem; margin: 1.4rem 0; }
.statement h2 { font-size: 1.3rem; margin-top: 1.8rem; }
.statement .tbl td, .statement .tbl th { padding-right: 1rem; }
.stmt-id { color: var(--slate); font-size: .9rem; }

/* ---------- admin ---------- */
.admin-nav { background: var(--ink); }
.admin-nav .wrap { display: flex; flex-wrap: wrap; gap: 0 1.2rem; align-items: center; }
.admin-nav a, .admin-nav button { color: #fff; text-decoration: none; padding: .7rem 0; font-weight: 600; font-stretch: 92%; background: none; border: 0; font-size: 1rem; cursor: pointer; font-family: inherit; }
.admin-nav a[aria-current="page"] { border-bottom: 3px solid #fff; padding-bottom: calc(.7rem - 3px); }
.admin-nav form { margin-left: auto; }
.flags { margin: 0 0 1rem; padding: 0; list-style: none; }
.flags li { background: #fff; border-left: 5px solid var(--amber); padding: .55rem .9rem; margin-bottom: .4rem; font-weight: 600; }
.proof-imgs { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin: 0 0 1.2rem; }
.proof-imgs img { width: 100%; border: 1px solid var(--rule-strong); border-radius: 4px; display: block; }
.decision { max-width: 34rem; }
.decision .btn-row { margin-top: .5rem; }
.filter { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0 0 1rem; }
.filter a { padding: .3rem 0; text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.filter a[aria-current="true"] { border-bottom-color: var(--ink); }

/* review fixes: selectors that were cancelling each other (.main-nav a vs .btn, .field > label vs .choice) */
.main-nav a.btn { color: #fff; padding: 0 1rem; border-bottom: 2px solid var(--ink); }
.main-nav a.btn:hover { background: #0b1730; color: #fff; border-bottom-color: #0b1730; }
.field > label.choice { display: flex; font-weight: 400; margin: 0 0 .5rem; }
.choice > span { color: var(--ink); font-size: 1rem; }
.choice > span > b { display: block; font-weight: 650; }
.choice > span > span { display: block; color: var(--slate); font-size: .9rem; }
@media (max-width: 51.99rem) {
  .hero-lamps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem .9rem; }
  .hero-lamp { grid-template-columns: 1fr; gap: .45rem; justify-items: start; }
  .hero-lamp .stack { width: 64px; height: 64px; }
  .hero-lamp .name { font-size: 1.05rem; }
  .hero-lamp .what { display: none; }
  .hero-lamps > p { grid-column: 1 / -1; margin: .2rem 0 0; }
}

@media (max-width: 40rem) {
  .tbl th { white-space: normal; }
  .statement .tbl td .small { display: none; }
  .statement .tbl th, .statement .tbl td { padding-right: .6rem; }
}

/* admin additions (no inline styles: the site's CSP forbids them) */
.form-wide { max-width: 44rem; }
.factor { border: 2px solid var(--rule); border-radius: var(--radius); padding: 1rem; }
.factor legend { padding: 0 .4rem; font-weight: 700; }
.btn-row.tight { margin: 0; }
.desk-head .lead { max-width: 44rem; }

@media print {
  .site-head, .site-foot, .no-print, .flashes, .admin-nav { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .statement { border: 0; padding: 0; margin: 0; }
  @page { size: A4; margin: 16mm; }
  a { text-decoration: none; }
}
