/* Font families */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/font-f37e033d6024.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/font-013a968c7d3b.woff2") format("woff2");
  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: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/font-6298a11af055.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-cf65f680c0c9.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-4e183d488cda.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-33ff57e97518.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-466e6a68c4ee.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-efbd4e0b7034.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-9d44a92983ac.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-cf65f680c0c9.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-4e183d488cda.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-33ff57e97518.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-466e6a68c4ee.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-efbd4e0b7034.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-9d44a92983ac.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-cf65f680c0c9.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-4e183d488cda.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-33ff57e97518.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-466e6a68c4ee.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-efbd4e0b7034.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-9d44a92983ac.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-cf65f680c0c9.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-4e183d488cda.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-33ff57e97518.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-466e6a68c4ee.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-efbd4e0b7034.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/font-9d44a92983ac.woff2") format("woff2");
  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 {
  --color-bg: #f2f2ec;
  --color-bg-muted: #eceee7;
  --color-surface: #fffefb;
  --color-surface-strong: #f8f7f2;
  --color-text: #17212b;
  --color-text-muted: #445464;
  --color-border: #b7c1cc;
  --color-accent: #0f4c81;
  --color-accent-hover: #0b3c66;
  --color-accent-soft: #dcecff;
  --color-focus: #005fcc;
  --color-success: #1c7b45;
  --color-success-bg: #e6f6ed;
  --color-error: #9e1d1d;
  --color-error-bg: #fceaea;
  --color-info: #0f516f;
  --color-info-bg: #e6f5fb;
  --color-shadow: rgba(23, 33, 43, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --font-sans: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
  --font-serif: "Fraunces", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.6;
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 76, 129, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 88% 15%, rgba(67, 102, 70, 0.11) 0%, transparent 36%),
    linear-gradient(145deg, var(--color-bg) 0%, #f7f7f4 52%, #f3f2ec 100%);
}

.site {
  min-height: 100vh;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-accent-hover);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-4);
  z-index: 100;
  background: #022f53;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  transform: translateY(-180%);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) clamp(1rem, 2.2vw, 2rem);
  background: rgba(255, 254, 251, 0.93);
  border-bottom: 1px solid rgba(83, 98, 112, 0.28);
  backdrop-filter: blur(10px);
}

.brand {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.12rem, 1.6vw, 1.4rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.topbar-nav a,
.topbar-nav button,
.topbar-nav input[type="submit"] {
  min-height: 2.5rem;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid transparent;
  font-weight: 600;
}

.topbar-link:hover,
.topbar-link:focus-visible,
.topbar-link.active {
  background: var(--color-accent-soft);
  border-color: rgba(15, 76, 129, 0.45);
  color: #0b304d;
}

.container {
  width: min(1180px, 94vw);
  margin: clamp(1.4rem, 3vw, 2.3rem) auto clamp(2rem, 4vw, 3.4rem);
}

.page-header {
  margin-bottom: var(--space-5);
}

.page-header h1,
.page-header h2 {
  margin: 0;
  line-height: 1.2;
  font-family: var(--font-serif);
}

.page-header h1 {
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
}

.page-header .lead {
  max-width: 72ch;
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: 1.03rem;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #2f5b7e;
  margin: 0 0 var(--space-2);
}

.card {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-strong) 100%);
  border: 1px solid var(--color-border);
  box-shadow: 0 16px 42px -24px var(--color-shadow);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 2vw, 1.45rem);
  margin-bottom: var(--space-5);
}

.narrow-card {
  max-width: 710px;
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.mb-1 {
  margin-bottom: var(--space-4);
}

label,
legend {
  display: block;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.field {
  margin-bottom: var(--space-4);
}

.field-help {
  margin-top: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.field-error {
  margin-top: 0.3rem;
  color: var(--color-error);
  font-size: 0.93rem;
  font-weight: 600;
}

input,
select,
textarea,
button,
input[type="submit"] {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  border: 1.5px solid #8192a2;
  border-radius: 12px;
  background: #ffffff;
  color: var(--color-text);
  padding: 0.68rem 0.82rem;
}

input::placeholder,
textarea::placeholder {
  color: #66788a;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #567086;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.2);
}

[aria-invalid="true"] {
  border-color: #a31c1c;
  box-shadow: 0 0 0 2px rgba(163, 28, 28, 0.18);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  min-height: auto;
  margin: 0;
  accent-color: #0f4c81;
  flex: 0 0 auto;
}

.checkbox-row,
.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.45rem;
}

.choice-option label {
  margin: 0;
  font-weight: 500;
}

button,
.button-link,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  min-height: 2.6rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  background: var(--color-accent);
  color: #ffffff;
}

button:hover,
.button-link:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
  background: var(--color-accent-hover);
  box-shadow: 0 10px 18px -10px rgba(15, 76, 129, 0.62);
  color: #ffffff;
}

button:active,
.button-link:active,
input[type="submit"]:active {
  transform: translateY(0);
}

button:disabled,
input[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.secondary,
.button-link.secondary,
input[type="submit"].secondary {
  background: #2f475f;
  color: #ffffff;
}

button.secondary:hover,
.button-link.secondary:hover,
input[type="submit"].secondary:hover {
  background: #24374b;
}

button.danger,
input[type="submit"].danger {
  background: #b22323;
  color: #ffffff;
}

button.danger:hover,
input[type="submit"].danger:hover {
  background: #8e1919;
}

.inline {
  display: inline;
}

.inline button,
.inline input[type="submit"] {
  width: auto;
}

.actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.actions form {
  margin: 0;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  font-family: var(--font-serif);
  line-height: 1.2;
}

.section-header p {
  margin: 0.35rem 0 0;
}

.status-pill,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  border: 1px solid transparent;
}

.pill,
.status-pill.info {
  background: var(--color-info-bg);
  color: #0f516f;
  border-color: rgba(15, 81, 111, 0.3);
}

.status-pill.published,
.status-pill.success {
  background: var(--color-success-bg);
  color: #155f35;
  border-color: rgba(28, 123, 69, 0.32);
}

.status-pill.draft,
.status-pill.muted {
  background: #eef2f5;
  color: #384957;
  border-color: rgba(56, 73, 87, 0.3);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.table caption {
  text-align: left;
  padding: 0.8rem 0.85rem;
  font-weight: 700;
  border-bottom: 1px solid var(--color-border);
  background: #f7fafc;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid #d4dde6;
}

.table.table-vcenter th,
.table.table-vcenter td {
  vertical-align: middle;
}

.table th {
  color: #203547;
  font-size: 0.93rem;
  font-weight: 700;
  background: #f6f8fa;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:nth-child(even) {
  background: #f9fbfc;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.muted {
  color: var(--color-text-muted);
}

.flash-stack {
  margin-bottom: var(--space-4);
}

.flash {
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 0.65rem;
  padding: 0.72rem 0.85rem;
  font-weight: 600;
}

.flash.error {
  background: var(--color-error-bg);
  color: #7f1a1a;
  border-color: rgba(158, 29, 29, 0.3);
}

.flash.success {
  background: var(--color-success-bg);
  color: #1a6338;
  border-color: rgba(28, 123, 69, 0.3);
}

.flash.info {
  background: var(--color-info-bg);
  color: #0f516f;
  border-color: rgba(15, 81, 111, 0.3);
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

.survey-form {
  display: grid;
  gap: var(--space-4);
}

.question-card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: #ffffff;
}

.question-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.question-card .field-help {
  margin-bottom: 0.6rem;
}

.choices {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.choices legend {
  margin-bottom: 0.45rem;
}

.survey-form button[type="submit"] {
  width: min(100%, 21rem);
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 1.1rem;
  margin: 1.3rem 0;
}

.builder-sidebar,
.builder-editor {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 1rem;
}

.builder-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.builder-title {
  margin: 0;
  font-size: 1.05rem;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.question-item {
  border: 1px solid #c2cfda;
  border-radius: 12px;
  padding: 0.7rem;
  background: #fdfefe;
}

.question-item.active {
  border-color: #2b6597;
  box-shadow: inset 0 0 0 1px #2b6597;
}

.question-item-select {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  border-radius: 8px;
  padding: 0.15rem;
  display: block;
}

.question-item-select:hover,
.question-item-select:focus-visible {
  background: #edf4fa;
}

.question-item-select h4 {
  margin: 0;
  font-size: 0.97rem;
}

.question-meta {
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
  color: #425667;
  font-size: 0.84rem;
  gap: var(--space-3);
}

.question-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 0.55rem;
}

.question-item-actions button {
  padding: 0.35rem 0.6rem;
  min-height: 2rem;
  font-size: 0.82rem;
}

.builder-tip {
  background: #eef5fb;
  border: 1px solid rgba(15, 81, 111, 0.22);
  border-radius: 12px;
  margin-bottom: 1rem;
  padding: 0.55rem 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.editor-empty {
  padding: 1.4rem 0;
  color: var(--color-text-muted);
}

.question-editor {
  display: grid;
  gap: 0.9rem;
}

.editor-section {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.9rem;
  background: #fbfcfd;
}

.editor-section h4 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.field-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.required-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.required-toggle .checkbox-row {
  margin-top: 0;
}

.schema-json {
  display: none;
}

.builder-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.chart {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.8rem;
  background: #ffffff;
  position: relative;
}

.chart-figure {
  margin: 0;
}

.chart-canvas {
  margin-top: 0.8rem;
  position: relative;
}

.chart-summary {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
}

.chart-summary li {
  margin-bottom: 0.3rem;
}

#analytics-root {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

#analytics-root .analytics-version {
  padding: 0.75rem;
}

#analytics-root .analytics-version > h2 {
  margin-bottom: 0.5rem;
}

#analytics-root .chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}

#analytics-root .chart-grid .chart {
  margin-bottom: 0;
  padding: 0.7rem;
  padding-right: 2.6rem;
  padding-left: 2.6rem;
  border-radius: 10px;
  background: #fbfcfe;
  text-align: center;
}

#analytics-root .chart-grid .chart.has-actions {
  padding-top: 2.3rem;
}

#analytics-root .chart-grid .chart.has-expand {
  padding-top: 2.3rem;
}

#analytics-root .chart-canvas {
  margin-top: 0.55rem;
}

#analytics-root svg text {
  font-size: 0.7rem;
  fill: #3a5166;
}

#analytics-root .chart-legend {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.35rem 0.8rem;
  margin: 0.65rem 0 0;
  justify-items: center;
}

#analytics-root .chart-legend li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #2d3f52;
}

#analytics-root .chart-expand {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.35rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  box-shadow: none;
  display: grid;
  place-items: center;
}

#analytics-root .chart-download {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  padding: 0.35rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  box-shadow: none;
  display: grid;
  place-items: center;
}

#analytics-root .chart-expand:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

#analytics-root .chart-download:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

#analytics-root .chart-expand svg,
#analytics-root .chart-download svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

#analytics-root .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #e1e7ef;
  flex: 0 0 auto;
}

body.modal-open {
  overflow: hidden;
}

.chart-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}

.chart-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.chart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 18, 32, 0.68);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.chart-modal.is-open .chart-modal-backdrop {
  opacity: 1;
}

.chart-modal-panel {
  position: relative;
  width: min(1100px, 80vw);
  max-height: 80vh;
  overflow: auto;
  background: linear-gradient(135deg, #ffffff, #f4f7fb);
  border-radius: 18px;
  padding: 1.8rem 1.8rem 1.6rem;
  box-shadow: 0 28px 60px -40px rgba(10, 20, 35, 0.72);
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1;
}

.chart-modal.is-open .chart-modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.chart-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  z-index: 2;
}

.chart-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-modal-card {
  background: transparent;
  border: 1px solid #d7e1ec;
  padding: 1rem 1.2rem 1.2rem;
}

.chart-modal .chart-canvas {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
}

.chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -110%);
  background: #1f2d3a;
  color: #ffffff;
  font-size: 0.72rem;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  z-index: 2;
}

.chart-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -140%);
}

.chart-modal svg text {
  font-size: 0.8rem;
}

.chart-modal .chart-legend li {
  font-size: 1rem;
}

.analytics-error {
  color: #7f1a1a;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-nav {
    width: 100%;
  }

  .builder-shell {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(1180px, 95vw);
    margin-top: 1.1rem;
  }

  .actions {
    align-items: stretch;
  }

  .actions > *,
  .actions form,
  .actions button,
  .actions input[type="submit"],
  .actions .button-link {
    width: 100%;
  }

  .table {
    min-width: 0;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border-top: 1px solid #d4dde6;
    padding: 0.5rem 0;
  }

  .table tr:first-child {
    border-top: none;
  }

  .table td {
    border-bottom: none;
    padding: 0.35rem 0.55rem;
    display: grid;
    grid-template-columns: minmax(7.5rem, 45%) minmax(0, 1fr);
    gap: 0.6rem;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #374f64;
  }

  .table tbody tr:nth-child(even) {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
