/* ACSGuide design bench.
   Palette is the PASGR/Mastercard Foundation system already used by the AYPS
   consent form and identity cards, so the tooling and the paperwork look like
   one programme. */
:root {
  --pasgr-green: #4A5E1A;
  --pasgr-green-d: #33420F;
  --pasgr-orange: #FF4221;
  --mcf-red: #EB011A;
  --mcf-amber: #F79E1C;
  --ink: #2B2728;
  --muted: #6f6f64;
  --faint: #9a9a8e;
  --line: #e2e2d8;
  --panel: #ffffff;
  --bg: #f7f7f1;
  --radius: 6px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 "Avenir Next", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: var(--pasgr-green); }

/* ---- chrome ---- */
header.top {
  background: var(--pasgr-green); color: #fff; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; height: 54px;
}
header.top .brand { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
header.top .brand small {
  display: block; font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  opacity: .72; font-weight: 600; margin-top: -3px;
}
header.top nav { display: flex; gap: 14px; margin-left: auto; font-size: 13.5px; }
header.top nav a { color: rgba(255,255,255,.9); text-decoration: none; }
header.top nav a:hover { color: #fff; text-decoration: underline; }
.rule { display: flex; height: 4px; }
.rule i { flex: 1; }
.rule i:nth-child(1) { background: var(--pasgr-green); flex: 3.2; }
.rule i:nth-child(2) { background: var(--pasgr-orange); }
.rule i:nth-child(3) { background: var(--mcf-red); }
.rule i:nth-child(4) { background: var(--mcf-amber); }

main { max-width: 1440px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 22px; margin: 0 0 3px; color: var(--pasgr-green-d); letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--pasgr-green); }
h3 { font-size: 12.5px; margin: 0 0 7px; text-transform: uppercase;
     letter-spacing: .1em; color: var(--faint); }
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

/* ---- layout ---- */
.split { display: grid; grid-template-columns: 1fr 400px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px; margin-bottom: 14px;
}
.panel.tight { padding: 12px 14px; }

/* ---- map ---- */
#map { height: 620px; border-radius: var(--radius); border: 1px solid var(--line); }
.maptools {
  display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap;
  font-size: 13px;
}
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block;
            border: 1px solid rgba(0,0,0,.15); }

/* ---- forms ---- */
label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em;
        color: var(--faint); font-weight: 700; margin: 10px 0 3px; }
input, select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px;
  font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pasgr-green); border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.hint { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

button, .btn {
  display: inline-block; padding: 8px 14px; border: 0; border-radius: 4px;
  background: var(--pasgr-green); color: #fff; font: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; text-decoration: none; margin-top: 12px;
}
button:hover, .btn:hover { background: var(--pasgr-green-d); }
button.alt, .btn.alt { background: #fff; color: var(--pasgr-green); border: 1px solid var(--line); }
button.warn, .btn.warn { background: var(--pasgr-orange); }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
     color: var(--faint); border-bottom: 1.5px solid var(--line); padding: 6px 8px; }
td { padding: 6px 8px; border-bottom: 1px solid #f0f0e8; }
tr:last-child td { border-bottom: 0; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }

/* ---- status chips ---- */
.chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px;
        font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.chip.draft { background: #eceae3; color: var(--muted); }
.chip.frozen { background: var(--pasgr-green); color: #fff; }
.chip.active { background: var(--mcf-amber); color: var(--ink); }
.chip.closed { background: #d8d5cc; color: var(--muted); }
.chip.purposive { background: var(--mcf-red); color: #fff; }
.chip.initial { background: var(--pasgr-orange); color: #fff; }
.chip.adaptive { background: var(--pasgr-green); color: #fff; }

/* ---- notices ---- */
.notice { border-left: 4px solid var(--pasgr-green); background: #f6f6f0;
          padding: 10px 13px; border-radius: 0 4px 4px 0; font-size: 13.5px; margin: 10px 0; }
.notice.warn { border-left-color: var(--mcf-amber); background: #fdf7ea; }
.notice.stop { border-left-color: var(--mcf-red); background: #fdeeee; }
.notice strong { color: var(--ink); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; }
.kv dt { color: var(--faint); font-size: 11.5px; text-transform: uppercase;
         letter-spacing: .07em; font-weight: 700; align-self: center; }
.kv dd { margin: 0; }

.htmx-request { opacity: .55; transition: opacity .15s; }
