:root {
  --brand-blue: #0f4c81;
  --brand-blue-dark: #0a365c;
  --brand-accent: #21a179;
  --bg: #f4f7fb;
  --card-bg: #ffffff;
  --text-main: #1d2a3a;
  --text-muted: #586a82;
  --shadow: 0 12px 30px rgba(15,76,129,0.12);
  --radius: 14px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  line-height: 1.6;
  background: radial-gradient(circle at top, rgba(15,76,129,0.12), transparent 55%), var(--bg);
  color: var(--text-main);
  min-height: 100vh;
}
header {
  background: linear-gradient(140deg, #103459 0%, #1a5a8d 65%, #2a79b3 100%);
  color: #fff;
  padding: clamp(2.4rem, 5vw, 3.2rem) 0 clamp(3.6rem, 7vw, 4.6rem);
  position: relative;
  overflow: hidden;
}
header::before,
header::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
header::before {
  inset: 0;
  background: radial-gradient(circle at 18% 25%, rgba(255,255,255,0.2), transparent 55%),
  radial-gradient(circle at 85% 10%, rgba(255,255,255,0.18), transparent 50%);
}
header::after {
  left: 0;
  right: 0;
  bottom: -1px;
  height: 36px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f4f7fb" fill-opacity="1" d="M0,192L60,176C120,160,240,128,360,144C480,160,600,224,720,224C840,224,960,160,1080,144C1200,128,1320,160,1380,176L1440,192L1440,0L1380,0C1320,0,1200,0,1080,0C960,0,840,0,720,0C600,0,480,0,360,0C240,0,120,0,60,0L0,0Z"></path></svg>') center bottom/cover no-repeat;
}
.header__inner {
  position: relative;
  z-index: 1;
  width: min(96vw, 1360px);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.4rem);
}
.header__content {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.6rem);
}
.header__text {
  max-width: 720px;
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.1rem);
}
.header__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.22);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.header__text h1 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
}
.header__text p {
  margin: 0;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
}
.header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1rem);
}
.header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 0.85rem);
}
.header__actions .btn {
  margin-top: 0;
  box-shadow: 0 10px 25px rgba(15,76,129,0.25);
}
.header__actions .btn--ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.header__actions .btn--ghost:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
main.layout {
  width: min(96vw, 1600px);
  margin: clamp(-4rem, -5vw, -2.6rem) clamp(0.75rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem);
  padding: 0 clamp(1rem, 3vw, 2.75rem) clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(220px, min(26vw, 360px)) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
@media (max-width: 1200px) {
  main.layout { grid-template-columns: minmax(200px, min(30vw, 300px)) minmax(0, 1fr); }
}
@media (min-width: 1440px) {
  main.layout { grid-template-columns: minmax(260px, min(24vw, 380px)) minmax(0, 1fr); gap: clamp(1.5rem, 2.5vw, 3rem); }
}
.layout > * {
  min-width: 0;
}
.sidebar { grid-column: 1; }
.layout > section.card { grid-column: 2; }
.sidebar-toggle { grid-column: 1 / -1; }
.sidebar-toggle {
  position: static;
  z-index: 10;
  margin: 0 0 .75rem 0;
  align-self: flex-start;
  appearance: none;
  border: 1px solid rgba(15,76,129,0.18);
  background: rgba(15,76,129,0.08);
  color: var(--brand-blue-dark);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.sidebar-toggle:hover { background: rgba(15,76,129,0.12); }

/* Floating toggle visible when sidebar is collapsed */
.sidebar-fab {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 1000;
  appearance: none;
  border: 1px solid rgba(15,76,129,0.18);
  background: rgba(15,76,129,0.9);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15,76,129,0.28);
  cursor: pointer;
}
.sidebar-fab:hover { background: rgba(15,76,129,1); }
.sidebar {
  background: var(--card-bg);
  border: 1px solid rgba(15,76,129,0.08);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1rem, 2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 2vw, 0.9rem);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  position: sticky;
  top: clamp(1.25rem, 3vw, 2.5rem);
}
/* Collapsed state */
body.sidebar-collapsed main.layout { grid-template-columns: 0 minmax(0, 1fr); }
body.sidebar-collapsed .sidebar { display: none !important; }
body.sidebar-collapsed .sidebar-fab { display: inline-flex; }
body.sidebar-collapsed .sidebar-toggle { margin-left: 0; }
.sidebar nav {
  flex: 1;
  display: flex;
}
.sidebar nav ul {
  width: 100%;
}
.sidebar__header {
  font-weight: 700;
  margin: 0;
}
.sidebar__group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue-dark);
  font-size: 0.7rem;
  padding: 0.35rem 0.9rem;
  background: rgba(15, 76, 129, 0.12);
  border-radius: 999px;
  align-self: flex-start;
  margin: 0.4rem 0 0.25rem;
}
#operationNav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.25rem;
}
#operationNav button {
  border: none;
  background: transparent;
  color: var(--text-main);
  padding: 0.55rem 0.9rem 0.55rem 0.75rem;
  line-height: 1.2;
  border-radius: 10px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
#operationNav button:hover {
  background: rgba(15,76,129,0.08);
  color: var(--brand-blue);
}
#operationNav button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15,76,129,0.2);
}
#operationNav button.is-active {
  background: rgba(15,76,129,0.10);
  color: var(--brand-blue-dark);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(15,76,129,0.18);
  position: relative;
}
#operationNav button.is-active:hover {
  background: rgba(15,76,129,0.14);
}
#operationNav button.is-active::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand-blue);
}
.sidebar,
.sidebar__header,
#operationNav button {
  font-size: 0.95rem;
}
section.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(15,76,129,0.08);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 2.3vw, 2.1rem);
  padding-bottom: clamp(3.8rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 2.4vw, 1.6rem);
}
.card__meta-link {
  margin: 0;
  font-weight: 600;
  color: var(--brand-blue-dark);
}
.card__meta-link a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(15,76,129,0.25);
  padding-bottom: 0.1rem;
}
.card__meta-link a:hover {
  border-bottom-color: rgba(15,76,129,0.45);
}
h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.6rem;
}
label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}
input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(15,76,129,0.16);
  border-radius: 10px;
  margin-top: 0.35rem;
  font: inherit;
  background: rgba(255,255,255,0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
/* Small hint below a form field */
.form-field__hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
/* Mono-styled inputs, useful for IDs */
.input--mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(15,76,129,0.15);
}
textarea {
  resize: vertical;
  min-height: 240px;
  font-family: var(--mono);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.05rem;
  margin-top: 1rem;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}
.btn--primary {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 10px 18px rgba(15,76,129,0.2);
}
.btn--ghost {
  background: rgba(15,76,129,0.08);
  color: var(--brand-blue);
}
.btn--danger {
  background: rgba(222,22,59,0.12);
  color: #8a1c2f;
}
.btn--danger:hover {
  background: rgba(222,22,59,0.18);
  color: #681121;
}
.btn--pill {
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}
.btn:hover {
  transform: translateY(-1px);
}
.response__header {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.response__header h3 {
  margin: 0;
}
.response__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.response__links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.response__anchor {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(15,76,129,0.08);
  color: var(--brand-blue-dark);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.response__anchor:hover {
  background: rgba(15,76,129,0.16);
  color: var(--brand-blue);
}
.response__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.response-box {
  border: 1px solid rgba(15,76,129,0.12);
  border-radius: 12px;
  background: rgba(15,76,129,0.05);
  padding: 1.5rem;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-x: auto;
}
.response-tabs {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.response-tab {
  border: 1px solid rgba(15,76,129,0.18);
  background: rgba(15,76,129,0.06);
  color: var(--brand-blue-dark);
  padding: .3rem .7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
}
.response-tab.is-active {
  background: rgba(15,76,129,0.16);
  color: var(--brand-blue);
}
.response-placeholder {
  font-style: italic;
  color: var(--text-muted);
}
.response-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}
.response-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.response-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(15,76,129,0.12);
  min-width: 140px;
  box-shadow: 0 4px 12px rgba(15,76,129,0.08);
}
.response-chip__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.response-chip__value {
  font-weight: 600;
  color: var(--brand-blue-dark);
  font-size: 1rem;
  word-break: break-word;
}
.response-chip--danger {
  border-color: rgba(198,40,40,0.25);
  background: rgba(198,40,40,0.05);
}
.response-chip--danger .response-chip__value {
  color: #b71c1c;
}
.response-chip--success {
  border-color: rgba(33,161,121,0.28);
  background: rgba(33,161,121,0.12);
}
.response-chip--success .response-chip__value {
  color: #0f6649;
}
.response-highlights {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.response-highlight {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(15,76,129,0.12);
}
.response-highlight h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--brand-blue-dark);
  letter-spacing: 0.02em;
}
.response-highlight ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-muted);
}
.response-highlight li + li {
  margin-top: 0.35rem;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 16, 28, 0.38);
  display: grid;
  place-items: center;
  z-index: 2000;
  backdrop-filter: blur(1px);
}
.loading-overlay[hidden] {
  display: none;
}
.loading-overlay__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  background: #ffffff;
  border: 1px solid rgba(15,76,129,0.12);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 14px 34px rgba(15,76,129,0.18);
  min-width: 220px;
}
.loading-overlay__text {
  font-weight: 600;
  color: var(--brand-blue-dark);
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(15,76,129,0.18);
  border-top-color: var(--brand-blue);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

body.is-loading { cursor: progress; }
.response-table {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15,76,129,0.12);
  box-shadow: 0 8px 20px rgba(15,76,129,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.response-table__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(15,76,129,0.08);
  color: var(--brand-blue-dark);
  font-weight: 600;
  flex-wrap: wrap;
}
.response-table__title {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.response-table__title span:first-child {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.response-table__total {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.response-table__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.response-table__search input {
  border: 1px solid rgba(15,76,129,0.2);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  width: clamp(160px, 20vw, 240px);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.response-table__search input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15,76,129,0.18);
  border-color: var(--brand-blue);
}
.response-table__clear {
  border: none;
  background: rgba(15,76,129,0.1);
  color: var(--brand-blue-dark);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.response-table__clear:hover {
  background: rgba(15,76,129,0.18);
  color: var(--brand-blue);
}
.response-table__scroll {
  overflow: auto;
  max-height: clamp(320px, 55vh, 600px);
}
.response-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.response-table thead th {
  position: sticky;
  top: 0;
  background: rgba(15,76,129,0.15);
  color: var(--brand-blue-dark);
  box-shadow: inset 0 -1px 0 rgba(15,76,129,0.12);
  z-index: 1;
}
.response-table th,
.response-table td {
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(15,76,129,0.12);
  vertical-align: top;
  text-align: left;
}
.response-table tbody tr:nth-child(odd) {
  background: rgba(15,76,129,0.04);
}
.response-table__pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(15,76,129,0.12);
  background: rgba(15,76,129,0.06);
}
.response-table__pager button {
  border: none;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.15s ease;
}
.response-table__pager button:disabled {
  background: rgba(15,76,129,0.25);
  cursor: default;
}
.response-table__pager button:not(:disabled):hover {
  background: var(--brand-blue-dark);
}
.response-table__info {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}
.response-table__empty {
  padding: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
}
.status-banner {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-weight: 600;
  border: 1px solid rgba(15,76,129,0.18);
  background: rgba(15,76,129,0.08);
  color: var(--brand-blue-dark);
}
.status-banner[hidden] {
  display: none;
}
.status-banner--info {
  background: rgba(15,76,129,0.08);
  border-color: rgba(15,76,129,0.22);
  color: var(--brand-blue-dark);
}
.status-banner--success {
  background: rgba(33,161,121,0.12);
  border-color: rgba(33,161,121,0.4);
  color: #0d6147;
}
.status-banner--warning {
  background: rgba(255,189,67,0.2);
  border-color: rgba(255,189,67,0.4);
  color: #8a5705;
}
.status-banner--error {
  background: rgba(222,22,59,0.15);
  border-color: rgba(222,22,59,0.4);
  color: #741a2a;
}
/* Toasts */
.toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 2001;
}
.toast {
  background: #fff;
  border: 1px solid rgba(15,76,129,0.18);
  box-shadow: 0 10px 24px rgba(15,76,129,0.18);
  border-radius: 10px;
  padding: .55rem .8rem;
  font-weight: 600;
  color: var(--brand-blue-dark);
}
.toast--success { border-color: rgba(33,161,121,0.35); }
.toast--error { border-color: rgba(222,22,59,0.35); }
.toast--info { border-color: rgba(15,76,129,0.35); }
.toast--warning { border-color: rgba(255,189,67,0.4); }

/* Small status chips for list items */
.chip { display:inline-flex; align-items:center; gap:.35rem; padding:.1rem .5rem; border-radius:999px; font-weight:700; font-size:.75rem; border:1px solid rgba(15,76,129,0.2); background:#fff; color:#0a365c; }
.chip--pending { background: rgba(255,189,67,0.18); border-color: rgba(255,189,67,0.35); color:#8a5705; }
.chip--success { background: rgba(33,161,121,0.15); border-color: rgba(33,161,121,0.35); color:#0f6649; }
.chip--error { background: rgba(222,22,59,0.15); border-color: rgba(222,22,59,0.35); color:#741a2a; }
.response-raw details {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(15,76,129,0.12);
  padding: 1rem 1.25rem;
}
.response-raw summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-blue-dark);
}
.response-raw pre {
  margin: 1rem 0 0;
  max-height: 360px;
  overflow: auto;
  padding: 1rem;
  background: #0f1f33;
  color: #f5f7ff;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.response-box__pre {
  margin: 0;
  background: #0f1f33;
  color: #f5f7ff;
  border-radius: 8px;
  padding: 1rem;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
}
#payloadBody.collapsed textarea {
  display: none;
}
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  background: rgba(15,76,129,0.08);
  color: var(--text-main);
  border: 1px solid rgba(15,76,129,0.18);
}
section.card > .callout {
  margin: 0;
}
#paramPanel.callout {
  margin-top: 0.75rem;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.callout strong {
  display: block;
  margin-bottom: 0.25rem;
}
.callout--hint {
  background: rgba(33,161,121,0.1);
  border-color: rgba(33,161,121,0.32);
  margin-top: -0.75rem;
}
.summary {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  font-weight: 500;
  display: none;
}
.summary ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}
.summary--success {
  background: rgba(33,161,121,0.10);
  border-color: rgba(33,161,121,0.38);
  border-top: 3px solid rgba(33,161,121,0.55);
  color: #10553f;
}
.summary--info {
  background: rgba(15,76,129,0.10);
  border-color: rgba(15,76,129,0.35);
  border-top: 3px solid rgba(15,76,129,0.55);
  color: var(--brand-blue-dark);
}
.summary--warning {
  background: rgba(255,189,67,0.18);
  border-color: rgba(255,189,67,0.36);
  color: #8a5705;
}
.summary--error {
  background: rgba(222, 22, 59, 0.12);
  border-color: rgba(222, 22, 59, 0.4);
  color: #781726;
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 1.2rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,0.08);
}
.form-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(15,76,129,0.05);
  border: 1px solid rgba(15,76,129,0.12);
}
.form-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.form-section__title {
  font-weight: 700;
  color: var(--brand-blue-dark);
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.5rem;
}
.form-field--full { grid-column: 1 / -1; }
.form-field__error {
  color: #b71c1c;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.form-array-item {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(15,76,129,0.06);
  border: 1px solid rgba(15,76,129,0.12);
}
.form-array-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
a {
  color: var(--brand-blue);
}
.chat-assistant {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1.25rem) !important;
  right: calc(env(safe-area-inset-right, 0px) + 1.25rem) !important;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 1rem;
  pointer-events: none;
}
.chat-assistant__launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #0f4c81, #1a5a8d);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.05rem;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 36px rgba(15,76,129,0.28), 0 0 0 1px rgba(255,255,255,0.18) inset;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-assistant__launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(15,76,129,0.3), 0 0 0 2px rgba(255,255,255,0.22) inset;
}
.chat-assistant__launcher:focus-visible {
  outline: 2px solid rgba(33,161,121,0.4);
  outline-offset: 3px;
}
.chat-assistant__launcher-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand-accent);
  box-shadow: 0 0 0 4px rgba(33,161,121,0.22);
}
.chat-assistant__panel {
  width: min(420px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 5rem));
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.94));
  border-radius: 18px;
  border: 1px solid rgba(15,76,129,0.12);
  box-shadow: 0 28px 64px rgba(15,76,129,0.25);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  backdrop-filter: saturate(140%) blur(6px);
  overflow: hidden;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chat-assistant--open .chat-assistant__panel {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.chat-assistant--open .chat-assistant__launcher {
  display: none;
}
.chat-assistant__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(15,76,129,0.10);
  background: linear-gradient(135deg, rgba(15,76,129,0.09), rgba(33,161,121,0.10));
  position: sticky;
  top: 0;
  z-index: 2;
  -webkit-backdrop-filter: saturate(140%) blur(4px);
  backdrop-filter: saturate(140%) blur(4px);
  box-shadow: 0 2px 8px rgba(15,76,129,0.08);
}
.chat-assistant__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-blue-dark);
}
.chat-assistant__title::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #21a179, #1a5a8d);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9) inset, 0 2px 6px rgba(15,76,129,0.25);
  vertical-align: -5px;
}
.chat-assistant__subtitle {
  font-size: 0.85rem;
  color: rgba(29,42,58,0.65);
}
.chat-assistant__close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15,76,129,0.08);
  color: var(--brand-blue-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}
.chat-assistant__close::before {
  content: "✕";
  font-size: 1rem;
  line-height: 1;
}
.chat-assistant__close:hover {
  background: rgba(15,76,129,0.15);
}
.chat-assistant__close:focus-visible {
  outline: 2px solid rgba(33,161,121,0.4);
  outline-offset: 2px;
}
.chat-assistant__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(15,76,129,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.9));
}
.chat-assistant__suggestions[hidden] {
  display: none;
}
.chat-assistant__suggestion {
  appearance: none;
  border: 1px solid rgba(15,76,129,0.18);
  background: rgba(15,76,129,0.06);
  color: var(--brand-blue-dark);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}
.chat-assistant__suggestion:hover,
.chat-assistant__suggestion:focus-visible {
  background: rgba(33,161,121,0.14);
  border-color: rgba(33,161,121,0.6);
  color: var(--brand-blue);
  box-shadow: 0 6px 16px rgba(15,76,129,0.12);
  transform: translateY(-1px);
}
.chat-assistant__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(15,76,129,0.03), transparent 40%);
}
.chat-assistant__messages::-webkit-scrollbar {
  width: 6px;
}
.chat-assistant__messages::-webkit-scrollbar-thumb {
  background: rgba(15,76,129,0.22);
  border-radius: 999px;
}
.chat-assistant__message {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.chat-assistant__message--assistant .chat-assistant__bubble {
  background: linear-gradient(180deg, rgba(15,76,129,0.08), rgba(15,76,129,0.04));
  color: var(--brand-blue-dark);
  box-shadow: 0 6px 14px rgba(15,76,129,0.08);
}
.chat-assistant__message--user {
  justify-content: flex-end;
}
.chat-assistant__message--user .chat-assistant__bubble {
  background: var(--brand-accent);
  color: #fff;
}
.chat-assistant__bubble {
  max-width: 80%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(15,76,129,0.04);
}
.chat-assistant__bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.chat-assistant__dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 999px;
  opacity: 0.4;
  animation: chat-assistant-pulse 1s infinite;
}
.chat-assistant__dot:nth-child(2) {
  animation-delay: 0.2s;
}
.chat-assistant__dot:nth-child(3) {
  animation-delay: 0.4s;
}
.chat-assistant__composer {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 0.95rem;
  border-top: 1px solid rgba(15,76,129,0.08);
  background: rgba(255,255,255,0.96);
}
.chat-assistant__composer input {
  flex: 1;
  border: 1px solid rgba(15,76,129,0.18);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-assistant__composer input:focus {
  outline: none;
  border-color: rgba(33,161,121,0.8);
  box-shadow: 0 0 0 3px rgba(33,161,121,0.18);
}
.chat-assistant__send {
  white-space: nowrap;
  padding-inline: 1.1rem;
}
.chat-assistant__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
@keyframes chat-assistant-pulse {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-2px);
    opacity: 0.9;
  }
}
@media (max-width: 960px) {
  main.layout {
    margin: clamp(-3.5rem, -5vw, -2.5rem) clamp(0.75rem, 5vw, 2rem) clamp(2rem, 5vw, 3rem);
    padding-inline: clamp(1rem, 4vw, 2.25rem);
    grid-template-columns: 1fr;
  }
  .sidebar, .layout > section.card, .sidebar-toggle { grid-column: auto; }
  .sidebar-toggle { position: static; }
  /* Mobile: slide-in sidebar with backdrop */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    max-height: none;
    width: min(88vw, 360px);
    transform: translateX(-102%);
    transition: transform .25s ease;
    z-index: 1000;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.28);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    z-index: 900;
  }
}
@media (max-width: 780px) {
  .header__inner {
    padding-inline: clamp(1rem, 6vw, 2rem);
  }
  .header__actions {
    width: 100%;
  }
  .header__actions .btn {
    flex: 1 1 45%;
  }
  .response__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .response__actions {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  header {
    padding: clamp(2.2rem, 8vw, 2.8rem) 0 clamp(3rem, 9vw, 3.6rem);
  }
  .header__inner {
    padding-inline: clamp(1rem, 6vw, 1.4rem);
  }
  main.layout { width: min(98vw, 100%); padding: 0 clamp(1rem, 6vw, 1.5rem) clamp(2.5rem, 8vw, 3.5rem); }
  .btn {
    width: 100%;
  }
  .chat-assistant {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.5rem);
    right: calc(env(safe-area-inset-right, 0px) + 0.5rem);
  }
  .chat-assistant__panel { width: calc(100vw - 1.25rem); max-width: 520px; }
}

/* Assistant header final tweaks */
.chat-assistant__close::before {
  content: "×" !important;
}
.chat-assistant__close:hover {
  transform: rotate(90deg);
}



/* Motion preferences */@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===================== Additional UI polish ===================== */
/* Subheader toolbar under main section title */
.subheader {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.90));
  border: 1px solid rgba(15,76,129,.10);
  border-radius: 12px;
  padding: .5rem .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 6px 18px rgba(15,76,129,.08);
}
.subheader__label { font-weight: 700; color: var(--brand-blue-dark); }
.subheader__links { margin-left: auto; display: flex; gap: .35rem; }
.subheader__links a {
  text-decoration: none;
  font-weight: 600;
  font-size: .82rem;
  background: rgba(15,76,129,.06);
  color: var(--brand-blue);
  padding: .32rem .64rem;
  border-radius: 999px;
  border: 1px solid rgba(15,76,129,.18);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.subheader__links a:hover { background: rgba(15,76,129,.10); color: var(--brand-blue-dark); }
@media (max-width: 820px) {
  .subheader { flex-wrap: wrap; gap: .4rem .5rem; }
  .subheader__links { width: 100%; justify-content: flex-start; }
}

/* Tips callout spacing */
.callout ul { padding-left: 1.2rem; }
.callout li + li { margin-top: .25rem; }

/* Toolbar cohesion */
.toolbar .btn { margin-top: 0; }
.toolbar .btn--ghost:hover {
  background: rgba(15,76,129,.12);
  color: var(--brand-blue);
}

/* Response actions and box size */
.response__actions { margin-right: 9rem; }
@media (max-width: 1100px) { .response__actions { margin-right: 0; } }
.response-box { min-height: 120px; }

/* Sidebar scroll-shadow cue */
.sidebar nav { position: relative; }
.sidebar nav::after {
  content: "";
  position: sticky;
  bottom: 0; height: 18px; display: block;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(0,0,0,.06));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


