:root {
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  color: #263642;
  background: #f5f9fc;
  line-height: 1.5;
  font-size: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.shell { width: min(100% - 2rem, 58rem); margin-inline: auto; }
header { background: #fff; border-bottom: 1px solid #d8e3ec; }
.head-inner, .brand, .toolbar, .actions {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
}
.head-inner { justify-content: space-between; min-height: 5rem; padding-block: .7rem; }
.brand { gap: .5rem; font-size: .93rem; color: #283645; text-decoration: none; letter-spacing: .023em; }
.brand svg { width: 2.4rem; height: 2.4rem; }
a { color: #005d9b; text-underline-offset: .17em; }
.shop-link { font-size: .9rem; }
main { padding: clamp(2rem, 5vw, 4rem) 0 5rem; }
.kicker { color: #0067ab; font-weight: 700; margin: 0 0 .4rem; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); letter-spacing: -.035em; line-height: 1.2; margin: 0 0 1.75rem; }
#message:not(:empty), .empty {
  border: 1px solid #c9deed; background: #fff; padding: 1rem 1.15rem;
  border-radius: .65rem; margin: 0 0 1.1rem;
}
#message p { margin: 0; }
#message .actions { margin-top: .65rem; }
.toolbar { justify-content: space-between; margin: 1rem 0; }
.toolbar label, .fields label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 650; }
.toolbar label { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
input, select, button, .action { font: inherit; }
button, .action {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: .5rem .95rem; color: #005d9b; border: 1px solid #abc9dd;
  background: #fff; border-radius: .5rem; text-decoration: none; cursor: pointer; font-weight: 650;
}
button:hover, .action:hover { background: #edf7ff; }
button.primary, .action.primary { background: #006bbe; color: white; border-color: #006bbe; }
button.primary:hover, .action.primary:hover { background: #005899; }
button:disabled, select:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #0077d9; outline-offset: 3px; }
button.decline { color: #8c3c36; border-color: #dbb9b6; }
input, select {
  border: 1px solid #aec5d5; background: #fff; color: #263642; border-radius: .45rem;
  padding: .55rem .65rem; min-height: 2.75rem; width: 100%;
}
#status-filter { width: auto; }
details { margin: .65rem 0; border: 1px solid #d1e1ed; border-radius: .65rem; background: #fff; }
summary { padding: 1rem; cursor: pointer; }
summary strong, dd { overflow-wrap: anywhere; }
summary small { margin-left: .6rem; color: #526b80; }
.details-body { border-top: 1px solid #e0e9ef; padding: 1rem; }
dl, .fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem 1.4rem; }
dl { margin: 0; }
dt { color: #556a79; font-size: .85rem; }
dd { margin: .15rem 0 0; }
form, .notification { margin: 1.1rem 0 0; border-top: 1px solid #e0e9ef; padding-top: 1rem; }
.fields { margin-bottom: .9rem; }
.confirmation { margin: .75rem 0 0; padding: .85rem; border-radius: .45rem; background: #eef5fa; }
.confirmation p, .notification p { margin: 0 0 .65rem; }
#more { margin-top: .6rem; }
@media (max-width: 36rem) {
  .shell { width: calc(100% - 1.5rem); }
  .head-inner { gap: .4rem; }
  .shop-link { font-size: .83rem; }
  .toolbar { align-items: end; }
  .toolbar label { display: grid; }
  .toolbar, .actions { gap: .5rem; }
  .fields, dl { grid-template-columns: 1fr; gap: .65rem; }
  summary small { display: block; margin: .15rem 0 0 1rem; }
}
.invitation { margin-bottom: 1.1rem; }
.must-reconciliation { margin: 1rem 0; padding: .9rem 1rem; border-left: 3px solid #46788b; background: #f2f7f8; }
.must-reconciliation h3 { margin: 0 0 .4rem; font-size: 1rem; }
.must-reconciliation p { margin: .45rem 0; }
.must-reconciliation small { display: block; color: #485f70; }
.must-reconciliation button { margin-top: .6rem; }
.must-summary { color: #174c71; font-weight: 650; }
.must-procedure { margin: 0 0 1rem; }
.must-procedure summary { color: #174c71; font-weight: 650; }
.must-procedure ol { padding: 0 1.25rem 0 2.5rem; margin: 0; }
.must-procedure li + li { margin-top: .55rem; }
.must-procedure p { padding: 0 1rem; }

.agency-nav { display:flex; flex-wrap:wrap; gap:.4rem 1.3rem; border-bottom:1px solid #c9dce9; margin-bottom:1.3rem; }
.agency-nav a { padding:.6rem .2rem; text-decoration:none; }
.agency-nav [aria-current="page"] { border-bottom:3px solid #0077d9; color:#163e59; font-weight:700; }
#agency-orders h2, #workspace h2 { font-size:1.3rem; }
.order-lines { overflow-x:auto; margin-top:1.2rem; }
.order-lines table { width:100%; border-collapse:collapse; text-align:left; font-size:.95rem; }
.order-lines caption { text-align:left; margin-bottom:.5rem; font-weight:700; }
.order-lines :is(th,td) { padding:.55rem .4rem; border-bottom:1px solid #d6e1e9; vertical-align:top; }
.order-lines th { color:#354e62; }
.order-lines td small { display:block; }
.order-total { text-align:right; font-weight:700; }
.order-review { padding:.6rem .8rem; background:#f4f6ec; }
@media print {
  :root, body, .shell, .agency-order { color:#101820; background:white; }
  header, main > :not(#agency-orders), #agency-orders > :not(#order-list), .agency-order:not(.to-print), .agency-order .actions { display:none !important; }
  .shell { width:100%; padding:0; }
  .agency-order { border:none; }
  .agency-order summary { list-style:none; font-size:1.2rem; }
  .agency-order .order-lines { overflow:visible; }
  .order-lines tr { break-inside:avoid; }
}
.order-summary { margin:1rem 0; padding:1rem; border-block:1px solid #d1e1ed; }
.order-summary div:last-child dd { font-weight:700; }

/* Agency desk */
:root { background:#f5f8fb; color:#213746; }
.shell {width:min(calc(100% - 3rem),87rem)}
.head-inner {min-height:4.65rem}
header {border-bottom-color:#d1dfeb}
.header-actions {display:flex;align-items:center;gap:1.5rem}
.shop-link {font-weight:650;text-decoration:none}
.shop-link span {margin-left:.15rem}
#staff-identity {display:grid;align-content:center;gap:.08rem;border-left:1px solid #dae5ed;padding-left:1.25rem;font-size:.8rem}
#staff-identity span {font-weight:650}
#staff-identity a {justify-self:start}
.skip {position:absolute;left:1rem;top:-10rem;padding:.7rem 1rem;background:white;z-index:5}
.skip:focus {top:1rem}
.admin-layout {padding-top:1.75rem;padding-bottom:4rem}
.admin-layout.signed-in {display:grid;grid-template-columns:14.75rem minmax(0,1fr);gap:clamp(1.25rem,3vw,3rem)}
#agency-sidebar {align-self:start;position:sticky;top:1rem;padding:.8rem;background:#fff;border:1px solid #d9e5ef;border-radius:1rem}
#agency-main {min-width:0;padding:1rem 0 4rem}
.admin-layout:not(.signed-in) #agency-main {max-width:43rem;margin:clamp(1rem,8vh,5rem) auto;padding:clamp(1.2rem,4vw,3rem);background:#fff;border:1px solid #d9e5ef;border-radius:1rem}
#page-heading {font-size:clamp(1.75rem,3vw,2.55rem);margin:0 0 1.5rem;font-weight:750}
#page-heading:focus:not(:focus-visible) {outline:none}
#scope-label {font-size:.85rem;font-weight:650;color:#466379}
.agency-nav {display:grid;gap:.16rem;border:0;margin:0}
.nav-group {margin:.85rem .6rem .2rem;padding-top:.7rem;border-top:1px solid #e4edf4;color:#53697b;font-size:.76rem;font-weight:700}
.agency-nav a {display:flex;align-items:center;gap:.65rem;padding:.55rem .65rem;min-height:2.6rem;font-size:.9rem;color:#2e495d;border-radius:.5rem}
.agency-nav svg {width:1.1rem;height:1.1rem;flex:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;fill:none}
.agency-nav a:hover {background:#f2f7fb}
.agency-nav a[aria-current=page] {border:0;background:#e5f2ff;color:#005c9c;font-weight:700}
#menu-toggle {display:none}
#activity-queue .activity-counts,.desk-shortcuts {display:grid;gap:.85rem}
#activity-queue .activity-counts {grid-template-columns:repeat(4,minmax(0,1fr))}
#activity-queue a,.desk-shortcuts a {position:relative;display:flex;flex-direction:column;align-items:flex-start;background:#fff;border:1px solid #cedfea;border-radius:.85rem;color:#183e58;text-decoration:none;padding:1rem 1.1rem;gap:.45rem}
#activity-queue a {border-top:3px solid #5bc0f6}
#activity-queue a strong {font-size:2rem;line-height:1.15}
#activity-queue a span {font-size:.88rem}
#activity-queue a:hover,.desk-shortcuts a:hover {border-color:#0077d9;background:#f6fbff}
#agency-home h2 {font-size:1.2rem;margin:0 0 .8rem}
#agency-home .shortcuts-heading {margin-top:2.25rem}
.desk-shortcuts {grid-template-columns:repeat(3,minmax(0,1fr))}
.desk-shortcuts a {padding-right:1.8rem}
.desk-shortcuts a:after {position:absolute;right:.7rem;top:.9rem;content:'›';color:#0077d9;font-size:1.4rem;line-height:1}
.desk-shortcuts span {font-weight:700}
.desk-shortcuts small {color:#4e697c;line-height:1.45}
.section-intro {margin-top:-.45rem;color:#466074}
#workspace .toolbar {justify-content:flex-end}
#agency-main .toolbar select:not([multiple]) {width:auto;max-width:100%}
@media (max-width:64rem) {
 .admin-layout.signed-in {grid-template-columns:13.25rem minmax(0,1fr);gap:1.2rem}
 #activity-queue .activity-counts {grid-template-columns:repeat(2,minmax(0,1fr))}
 .desk-shortcuts {grid-template-columns:1fr}
}
@media (max-width:47rem) {
 .shell {width:calc(100% - 1.5rem)}
 .head-inner {align-items:flex-start;gap:.5rem}
 .header-actions {gap:.35rem;align-items:flex-end;flex-direction:column}
 #staff-identity {border:0;padding:0;text-align:right;font-size:.72rem}
 #staff-identity a {justify-self:end}
 .admin-layout {padding-top:.75rem}
 .admin-layout.signed-in {display:block}
 #agency-sidebar {position:static;padding:.4rem;border-radius:.65rem}
 #menu-toggle {display:flex;justify-content:space-between;width:100%;border:0;font-weight:700;color:#194665}
 #agency-sidebar:not(.menu-open) nav {display:none}
 #agency-main {padding:1.3rem 0 2rem}
 #page-heading {margin-bottom:1rem}
 .brand {font-size:.78rem}
 .brand svg {width:1.85rem;height:1.85rem}
 #agency-home .shortcuts-heading {margin-top:1.5rem}
 #activity-queue .activity-counts,.desk-shortcuts {gap:.5rem}
 #activity-queue a {padding:.85rem}
}
@media print {
 .admin-layout.signed-in {display:block}
 #agency-sidebar,.skip,#page-heading,#scope-label {display:none!important}
}

/* The workspace already presents the current desk as its page heading. */
#directory-title,#agency-catalogue .bc-head>h2,#agency-statistics .bm-stat>header>h2,#callbacks-title {
 position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
 clip-path:inset(50%);white-space:nowrap;border:0;
}
#agency-statistics .bm-stat>header {border:none;background:none}

.promo-admin-head,.promo-list li {display:flex;align-items:center;flex-wrap:wrap;gap:.65rem}
.promo-editor {display:grid;gap:1rem;max-width:45rem;padding:1.25rem;border:1px solid #bed4e5;border-radius:.65rem;background:white}
.promo-editor label {display:block;font-weight:600}
.promo-editor input:not([type=checkbox]),.promo-editor select {display:block;width:100%;max-width:26rem;padding:.6rem;border:1px solid #97aec0;border-radius:.35rem;font:inherit}
.promo-list {list-style:none;padding:0;max-width:50rem}
.promo-list li {justify-content:space-between;border-bottom:1px solid #d8e4ec;padding:.75rem 0}
.promo-list small {display:block}

.order-reference-attachments figure {display:flex;align-items:center;gap:1rem;margin:.6rem 0;break-inside:avoid}
.order-reference-attachments img {width:8rem;max-height:8rem;object-fit:contain}
.order-reference-attachments figcaption {overflow-wrap:anywhere}

.agency-login:not([hidden]) { display:grid; gap:1rem; max-width:24rem; margin:1rem 0; }
.agency-login label { display:grid; gap:.4rem; font-weight:600; }
.agency-login input { width:100%; box-sizing:border-box; padding:.7rem; border:1px solid #9cb6c9; border-radius:.4rem; font:inherit; }
.agency-login [role=alert] { margin:0; color:#92231c; }
