:root {
  --primary: #244A7C;
  --primary-dark: #1b3c66;
  --dark: #172B3F;
  --blue: #2B63A3;
  --border: #D5D9DE;
  --light-gray: #F5F6F7;
  --text: #17202A;
  --muted: #5F6B76;
  --danger: #C83B3B;
  --success: #23845B;
  --footer: #22364c;
  --disabled: #d5dde5;
  --shadow: 0 1px 2px rgba(23, 32, 42, 0.05);
  --shell: 960px;
  --shell-wide: 1180px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
}

body.modal-open { overflow: hidden; }

main { flex: 1 0 auto; }

h1, h2, h3, p { color: var(--text); }

h1 {
  margin: 28px 0 18px;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2, h3 { font-weight: 700; }

p { margin: 0 0 14px; }

button, input, select, textarea { font-family: inherit; font-size: 16px; }

img, svg { max-width: 100%; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
}

.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

body[data-page="applications"] .shell,
body[data-page="details"] .shell {
  width: min(var(--shell-wide), calc(100% - 40px));
}

/* Header */

.site-header {
  background: #fff;
  border-bottom: 1px solid #e1e5ea;
  box-shadow: var(--shadow);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
}

.brand-text strong { font-size: 16px; color: var(--text); }

.brand-text span { font-size: 13px; color: var(--muted); }

.language-link {
  background: none;
  border: 0;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  padding: 8px 0 8px 8px;
}

.language-link:hover { text-decoration: underline; }

/* Toolbar */

.app-toolbar { background: #fff; border-bottom: 1px solid #e3e7eb; }

.toolbar-inner {
  min-height: 52px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.toolbar-tab {
  display: inline-flex;
  align-items: center;
  height: 52px;
  margin-bottom: -1px;
  padding: 0 2px;
  border-bottom: 4px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.toolbar-tab.is-active { border-bottom-color: #17a2b4; }

.toolbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  color: #4d5964;
  font-size: 15px;
}

.user-email { color: #243140; overflow-wrap: anywhere; }

/* Page content */

.page { padding: 8px 0 72px; }

.prose { max-width: 700px; }

.lede {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
}

.section-heading {
  margin: 28px 0 16px;
  font-size: 22px;
  line-height: 1.3;
}

.bullet-list { margin: 6px 0 16px; padding-left: 22px; }

.bullet-list li { margin: 3px 0; }

main a:not(.btn):not(.side-link):not(.toolbar-tab) {
  color: var(--blue);
  text-underline-offset: 2px;
}

main a:not(.btn):not(.side-link):not(.mini-download):hover { text-decoration-thickness: 2px; }

.ext::after {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.28em;
  background-color: currentColor;
  vertical-align: -0.1em;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field { margin: 0 0 18px; }

.field-label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
}

.asterisk { color: #d3080c; margin-right: 4px; }

.form-control {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #c5ccd3;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

body[data-page="create"] .form-control,
body[data-page="create"] .field-control { max-width: 560px; }

.form-control:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.form-control.is-invalid { border-color: var(--danger); }

.form-control.is-invalid:focus { outline-color: var(--danger); }

select.form-control {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235F6B76' d='M0 0h12L6 8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field-control { position: relative; max-width: 420px; }

.field-control .form-control { max-width: none; padding-right: 46px; }

.toggle-visibility {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #5c6974;
  cursor: pointer;
  border-radius: 4px;
}

.toggle-visibility:hover { color: var(--text); }

.toggle-visibility svg { display: block; }

.field-error {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.fine-print,
.support-note {
  max-width: 560px;
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.45;
  color: #243140;
}

.support-note { margin-top: 22px; }

.forgot { margin-top: 8px; font-size: 14.5px; }

.text-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.account-prompt { margin: 26px 0 12px; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 680px;
  margin: 22px 0 18px;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
  flex: none;
}

.requirements {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-width: 680px;
}

.requirements li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 9px 0;
  color: #4c5964;
  font-size: 14.5px;
  line-height: 1.45;
}

.rule-dot {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #c5cad1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
}

.requirements li.is-met { color: #1d7a4e; }

.requirements li.is-met .rule-dot {
  background: var(--success);
  border-color: var(--success);
}

.requirements li.is-met .rule-dot::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0, -1px);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--primary); color: #fff; }

.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-primary:disabled,
.btn-primary[disabled] {
  background: var(--disabled);
  color: #fff;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: #243140;
  border-color: #6d7882;
}

.btn-secondary:hover:not(:disabled) { background: #f4f6f8; }

.btn-danger { background: var(--danger); color: #fff; }

.btn-danger:hover:not(:disabled) { background: #a82f2f; }

.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }

.btn-block { width: 100%; max-width: 420px; }

.stack-btn { margin-top: 18px; }

.btn-create { margin: 0 0 26px; }

.btn-view {
  min-width: 78px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.btn-view:hover:not(:disabled) { background: var(--primary-dark); }

.btn-view:disabled {
  background: #e4e9ee;
  color: #9aa6b2;
  cursor: not-allowed;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #b0b8c0;
  cursor: pointer;
}

.icon-btn:hover { color: var(--danger); background: #fdeeee; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--danger);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Info block */

.info-block { max-width: 760px; margin-top: 56px; }

.info-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 26px;
}

.info-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
}

.info-list { margin: 8px 0 0; padding-left: 20px; }

.info-list li { margin: 8px 0; }

/* Applications */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin: 0 0 16px;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.filter span { font-weight: 700; }

.filter select {
  height: 42px;
  min-width: 180px;
  padding: 0 36px 0 12px;
  border: 1px solid #c5ccd3;
  border-radius: 4px;
  background-color: #fff;
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235F6B76' d='M0 0h12L6 8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e1e6eb;
  border-radius: 2px;
  background: #fff;
}

.apps-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.apps-table th,
.apps-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e6eaee;
  border-right: 1px solid #e6eaee;
  text-align: left;
  vertical-align: middle;
  font-size: 14.5px;
}

.apps-table th:last-child,
.apps-table td:last-child { border-right: 0; }

.apps-table tr:last-child td { border-bottom: 0; }

.apps-table th {
  background: #f6f7f8;
  font-size: 14px;
  font-weight: 700;
  vertical-align: bottom;
}

.apps-table tbody tr:hover { background: #fbfcfd; }

.apps-table tr.is-new { animation: rowFlash 1.6s ease; }

@keyframes rowFlash {
  from { background: #e5f6ee; }
  to { background: transparent; }
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sort-icon { flex: none; transition: transform 0.15s ease; }

.app-title { font-weight: 700; }

.mini-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 168px;
  margin-top: 4px;
  color: var(--blue);
  font-size: 13px;
  text-decoration: none;
}

.mini-download span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-download:hover { text-decoration: underline; }

.row-actions { display: flex; align-items: center; gap: 8px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 2px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-returned { background: #fff7f7; color: #c83b3b; border-color: #e7b4b4; }

.status-submitted { background: #e8f3fc; color: #1f5f9f; border-color: #9ec4ea; }

.status-initiated,
.status-unpaid { background: #fff4e8; color: #c56a10; border-color: #f0c08a; }

.status-paid { background: #e7f6ef; color: #1d7a4e; border-color: #9ed4b8; }

.empty-state {
  margin: 16px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--light-gray);
}

.pager { display: flex; justify-content: center; margin: 28px 0 4px; }

.pager-current {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* Application workspace */

.workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
  padding: 8px 0 32px;
  border-right: 1px solid #e3e7eb;
  background: #fff;
}

.sidebar-head { display: none; }

.side-label {
  margin: 16px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a7681;
}

.side-link {
  display: block;
  padding: 7px 14px 7px 18px;
  border-left: 3px solid transparent;
  color: #1e2a34;
  font-size: 13.5px;
  line-height: 1.35;
  text-decoration: none;
}

.side-link.sub { padding-left: 30px; font-size: 13px; color: #3d4b57; }

.side-link:hover { background: #f4f7fa; }

.side-link.is-active {
  border-left-color: var(--primary);
  background: #e7f0f8;
  color: var(--primary);
  font-weight: 700;
}

.sidebar-toggle { display: none; margin: 18px 0 12px; }

.workspace-main { min-width: 0; padding: 22px 0 64px 32px; }

.app-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6eaee;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta-name { margin: 0; font-size: 18px; font-weight: 700; }

.meta-cat { margin: 2px 0 0; color: #3e4c59; }

.meta-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

body[data-page="details"] h1 { margin-top: 0; }

.lead { max-width: 72ch; color: #243140; }

.note-card {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f8fafb;
}

.note-card h2 { margin: 0 0 8px; font-size: 18px; }

.note-card ul { margin: 0; padding-left: 18px; }

.note-card li { margin: 4px 0; }

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 28px;
  padding: 14px 16px;
  border: 1px solid #f0c9c9;
  border-radius: 4px;
  background: #fdf1f1;
  color: #8a3030;
}

.alert p { margin: 0; color: inherit; }

.alert svg { flex: none; margin-top: 1px; }

.alert.is-success {
  border-color: #b7e0cb;
  background: #eef8f3;
  color: #1d5c3d;
}

.block { margin: 8px 0 30px; scroll-margin-top: 16px; }

.block-title { margin: 8px 0 8px; font-size: 24px; }

.req { color: var(--danger); font-size: 0.72em; font-weight: 700; }

.group-label {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f6f7f8;
  font-size: 16px;
}

.doc-group {
  margin: 12px 0 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e8ecef;
}

.doc-row:last-child { border-bottom: 0; }

.doc-title { margin: 0 0 4px; font-size: 16px; overflow-wrap: anywhere; }

.doc-desc { margin: 0; color: var(--muted); font-size: 14px; }

.doc-flags { margin: 6px 0 0; font-size: 13px; font-weight: 700; }

.flag-required { color: var(--danger); }

.flag-optional { color: var(--muted); }

.doc-state { margin: 0; font-size: 14px; font-weight: 700; }

.doc-state.is-muted { color: #8a949e; font-weight: 600; }

.doc-state.is-progress { color: var(--blue); }

.doc-state.is-done { color: var(--success); }

.doc-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.file-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 0;
  font-size: 14px;
}

.file-line span { font-weight: 700; overflow-wrap: anywhere; }

.fee-table { width: 100%; border-collapse: collapse; }

.fee-table th,
.fee-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6eaee;
  text-align: left;
}

.fee-table th { background: #f6f7f8; font-size: 14px; }

.fee-table tr:last-child td { border-bottom: 0; }

.fee-total td { font-weight: 700; }

#pay-fees { margin-top: 14px; }

.declaration {
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 42, 0.55);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 26px 24px 20px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.modal-dialog.is-wide { width: min(640px, 100%); }

.modal-dialog h2 { margin: 0 36px 12px 0; font-size: 22px; }

.modal-body p:last-child { margin-bottom: 0; }

.modal-body ul { margin: 8px 0 12px; padding-left: 20px; }

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.modal-form label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

.modal-dialog .form-control,
.modal-dialog .field-control { max-width: none; width: 100%; }

/* Footer */

.site-footer { margin-top: auto; }

.footer-main { background: var(--footer); color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 24px;
  padding: 26px 0 8px;
}

.footer-main ul { list-style: none; margin: 0; padding: 0; }

.footer-main li { margin: 9px 0; }

.footer-main a {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.footer-main a:visited { color: #fff; }

.footer-main a:hover { text-decoration: underline; }

.demo-note {
  margin: 0;
  padding: 8px 0 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.footer-bottom { background: #fff; border-top: 1px solid #fff; }

.footer-bottom-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0 22px;
}

.legal-nav { display: flex; flex-wrap: wrap; align-items: center; }

.legal-nav a,
.legal-nav a:visited {
  color: var(--blue);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dot { margin: 0 8px; color: #17202A; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--text);
}

.footer-canada {
  display: block;
  height: 48px;
  width: auto;
}

@media (max-width: 1100px) {
  .doc-row { grid-template-columns: minmax(0, 1fr); }
  .doc-actions { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .workspace-main { padding: 8px 0 48px; }
  .sidebar-toggle { display: inline-flex; }
  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    width: min(300px, 88vw);
    height: 100vh;
    max-height: none;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    border-right: 0;
    box-shadow: none;
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.2);
  }
  .sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-close {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(23, 32, 42, 0.45);
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .shell,
  body[data-page="applications"] .shell,
  body[data-page="details"] .shell { width: calc(100% - 32px); }
  h1 { font-size: 28px; }
  .lede, .info-heading { font-size: 22px; }
  .header-inner { min-height: 62px; }
  .brand-logo { height: 26px; }
  .toolbar-inner { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 8px; }
  .toolbar-user { padding-top: 0; }
  .filters, .app-meta, .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
  .filter, .filter select, .btn-block, .form-control, .field-control { max-width: none; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; padding-top: 18px; }
  .footer-logo { margin-left: 0; }
  .legal-nav { flex-direction: column; align-items: flex-start; gap: 8px; }
  .legal-nav .dot { display: none; }
  .modal { padding: 12px; }
  .modal-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
