:root {
  --color-primary: #0b4c7a;
  --color-primary-dark: #06263f;
  --color-accent: #e3a94e;
  --color-bg: #0d1117;
  --color-surface: #161d2b;
  --color-surface-2: #101623;
  --color-border: rgba(255, 255, 255, 0.09);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-text: #e8edf4;
  --color-muted: #94a3b8;
  --color-danger: #ff6f5e;
  --color-danger-dim: rgba(255, 111, 94, 0.12);
  --color-success: #34c98e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(11, 76, 122, 0.28), transparent 60%),
    radial-gradient(900px 420px at -10% 8%, rgba(227, 169, 78, 0.07), transparent 55%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.75;
  min-height: 100vh;
  padding-bottom: 96px;
}

svg.icon {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.22em;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* ---------- Header ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  border-bottom: 1px solid rgba(227, 169, 78, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.header-logo {
  height: 118px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

.header-wordmark {
  margin: 0;
  display: flex;
  align-items: baseline;
  direction: ltr;
  color: rgba(232, 237, 244, 0.92);
  font-size: 15.8px;
  font-weight: 600;
  letter-spacing: 0.6px;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.header-wordmark .wm-accent {
  color: var(--color-accent);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 1.6px;
  line-height: 1;
}

.header-wordmark .wm-rest {
  color: #fff;
  font-weight: 600;
}

.header-wordmark .wm-sep {
  color: rgba(227, 169, 78, 0.55);
  font-weight: 400;
  margin: 0 8px;
}

/* ---------- Sections (single long page) ---------- */

.step-panel {
  display: block;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 2px dashed var(--color-border);
}

.step-panel:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* ---------- Draft banner ---------- */

.draft-banner {
  max-width: 1060px;
  margin: 18px auto 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(227, 169, 78, 0.08);
  border: 1px solid rgba(227, 169, 78, 0.45);
  border-radius: var(--radius);
}

.draft-banner span:first-child {
  flex: 1;
  font-size: 14px;
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------- Layout / panels ---------- */

.form-root {
  max-width: 1060px;
  margin: 22px auto 40px;
  padding: 0 20px;
}

.loading-box {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-muted);
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid var(--color-surface);
  border-top-color: var(--color-accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-lg {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid var(--color-surface-2);
  border-top-color: var(--color-accent);
  animation: spin 0.9s linear infinite;
}

.load-error,
.noscript-box {
  background: var(--color-surface);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius);
  padding: 26px;
  color: var(--color-danger);
}

.load-error h3 {
  margin: 8px 0;
}

.load-error p {
  color: var(--color-muted);
}

.noscript-box {
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
}

.step-panel.show {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes successPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.step-head {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 26px;
  padding-bottom: 16px;
}

.step-head::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to left, var(--color-accent), rgba(227, 169, 78, 0));
}

.step-num {
  width: auto;
  height: auto;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 0.14em;
  background: none;
  border: none;
  box-shadow: none;
  opacity: 0.9;
}

.step-title {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* ---------- Groups ---------- */

.sub-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.sub-group.nested {
  background: var(--color-surface-2);
  border-style: dashed;
  box-shadow: none;
  margin-top: 14px;
}

.sub-group-title {
  margin: 0 0 16px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--color-accent);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-group-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--color-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ---------- Fields ---------- */

.field {
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.field:last-child {
  border-bottom: none;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 15px;
}

.req-star {
  color: var(--color-danger);
  font-weight: 800;
}

.field-hint {
  font-size: 12.5px;
  color: var(--color-muted);
  margin: -4px 0 8px;
}

.control {
  position: relative;
}

.input,
textarea.input {
  width: 100%;
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.input {
  resize: vertical;
  min-height: 84px;
}

.input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(227, 169, 78, 0.18);
}

/* ---------- Native controls, identity-themed ---------- */

input[type="date"].input {
  color-scheme: dark;
  cursor: pointer;
}

input[type="date"].input:hover {
  border-color: var(--color-accent);
}

input[type="date"].input::-webkit-datetime-edit {
  color: var(--color-text);
  letter-spacing: 0.5px;
}

input[type="date"].input::-webkit-calendar-picker-indicator {
  filter: invert(72%) sepia(52%) saturate(620%) hue-rotate(350deg) brightness(102%) contrast(90%);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

input[type="date"].input:hover::-webkit-calendar-picker-indicator,
input[type="date"].input:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}

.result-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(227, 169, 78, 0.08);
  border: 1.5px dashed rgba(227, 169, 78, 0.55);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  font-weight: 800;
  padding: 9px 16px;
  min-width: 130px;
}

.note-box {
  background: var(--color-surface-2);
  border-inline-start: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--color-muted);
  font-size: 14px;
}

/* validation states */

.field.invalid .input,
.field.invalid .sel-btn {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px var(--color-danger-dim);
}

.err-msg {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 700;
}

.err-msg .icon {
  color: var(--color-danger);
}

.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(6px); }
  50% { transform: translateX(-6px); }
  75% { transform: translateX(4px); }
}

/* ---------- Choice cards ---------- */

.radio-grid,
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 9px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 14px;
  user-select: none;
}

.choice-card:hover {
  border-color: var(--color-accent);
}

.choice-card input {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  background: transparent;
  border: 2px solid var(--color-border-strong);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-card input[type="radio"] {
  border-radius: 50%;
}

.choice-card input[type="checkbox"] {
  border-radius: 5px;
}

.choice-card input::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--color-accent);
  transform: scale(0);
  transition: transform 0.14s ease-in-out;
}

.choice-card input[type="radio"]::before {
  border-radius: 50%;
}

.choice-card input[type="checkbox"]::before {
  width: 11px;
  height: 11px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.choice-card input:checked {
  border-color: var(--color-accent);
  background: rgba(227, 169, 78, 0.08);
}

.choice-card input:checked::before {
  transform: scale(1);
}

.choice-card input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(227, 169, 78, 0.25);
}

.choice-card:hover input:not(:checked) {
  border-color: var(--color-accent);
}

.choice-card:has(input:checked) {
  border-color: var(--color-accent);
  background: rgba(227, 169, 78, 0.1);
  color: var(--color-accent);
  font-weight: 700;
}

/* ---------- Searchable select ---------- */

.sel-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: right;
  transition: border-color 0.2s ease;
}

.sel-btn:hover {
  border-color: var(--color-accent);
}

.sel-btn .icon {
  color: var(--color-muted);
}

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

.sel-pop {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 0;
  z-index: 60;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sel-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
}

.sel-search .input {
  padding: 7px 10px;
  font-size: 14px;
}

.sel-opts {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.sel-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--color-text);
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: right;
}

.sel-opt:hover {
  background: rgba(255, 255, 255, 0.06);
}

.opt-dot,
.opt-box {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border-strong);
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.opt-box {
  border-radius: 5px;
}

.sel-opt.selected {
  color: var(--color-accent);
  font-weight: 700;
}

.sel-opt.selected .opt-dot,
.sel-opt.selected .opt-box {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: inset 0 0 0 2.5px var(--color-surface);
}

.sel-foot {
  padding: 7px 14px;
  font-size: 12px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

.sel-empty {
  padding: 16px;
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(11, 76, 122, 0.35);
  border: 1px solid rgba(227, 169, 78, 0.5);
  color: var(--color-text);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
}

.chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 111, 94, 0.15);
  color: var(--color-danger);
  cursor: pointer;
  padding: 0;
}

.chip-x .icon {
  width: 12px;
  height: 12px;
}

.chip-x:hover {
  background: var(--color-danger);
  color: #fff;
}

/* ---------- Image upload ---------- */

.image-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 10px;
  max-width: 340px;
}

.image-preview img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border-strong);
}

.image-preview.missing img {
  opacity: 0.25;
}

.image-meta {
  font-size: 12.5px;
  color: var(--color-muted);
  word-break: break-all;
  flex: 1;
}

/* ---------- Repeats ---------- */

.repeat-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-right: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.repeat-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.repeat-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--color-accent);
}

.repeat-badge {
  background: rgba(227, 169, 78, 0.14);
  border: 1px solid rgba(227, 169, 78, 0.5);
  color: var(--color-accent);
  border-radius: 999px;
  min-width: 34px;
  text-align: center;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 800;
}

.repeat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.repeat-pill {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border-strong);
  color: var(--color-muted);
  border-radius: 999px;
  padding: 5px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.repeat-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.repeat-pill.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.repeat-empty {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
}

.repeat-body {
  margin-top: 6px;
}

/* ---------- Buttons / actionbar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn .icon {
  width: 17px;
  height: 17px;
  vertical-align: middle;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-color: rgba(227, 169, 78, 0.55);
  color: #fff;
}

.btn-primary:not(:disabled):hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(227, 169, 78, 0.22);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-outline:not(:disabled):hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
}

.btn-ghost:not(:disabled):hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13.5px;
}

.actionbar {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
}

.actionbar-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.actionbar #btn-save-draft {
  margin-inline-end: auto;
}

.actionbar #btn-submit {
  min-width: 170px;
}

/* ---------- Toasts ---------- */

.toast-root {
  position: fixed;
  top: 178px;
  inset-inline-start: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 240px;
  max-width: 360px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast.out {
  opacity: 0;
  transform: translateX(-14px);
}

.toast-success {
  border-inline-start: 4px solid var(--color-success);
}

.toast-success .icon {
  color: var(--color-success);
}

.toast-error {
  border-inline-start: 4px solid var(--color-danger);
}

.toast-error .icon {
  color: var(--color-danger);
}

.toast-info {
  border-inline-start: 4px solid #5b9bd5;
}

.toast-info .icon {
  color: #5b9bd5;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---------- Success overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 12, 20, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay[hidden] {
  display: none;
}

.overlay-card {
  background: var(--color-surface);
  border: 1px solid rgba(227, 169, 78, 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px 34px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  animation: fadeUp 0.4s ease;
}

.success-icon .icon {
  width: 74px;
  height: 74px;
  color: var(--color-accent);
  animation: successPop 0.5s ease;
}

#success-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-accent);
}

/* ---------- Syncing banner (non-blocking) ---------- */

.syncing-banner {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  border-bottom: 1px solid rgba(227, 169, 78, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  animation: fadeDown 0.3s ease;
}

.syncing-banner[hidden] {
  display: none;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

.syncing-banner-icon {
  flex-shrink: 0;
  display: flex;
}

.syncing-banner-icon .icon {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  animation: spin 1.5s linear infinite;
}

.syncing-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.syncing-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.syncing-banner-sub {
  font-size: 12px;
  color: var(--color-muted);
}

.syncing-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-danger-text {
  color: var(--color-danger);
}

.btn-danger-text:hover {
  background: var(--color-danger-dim);
  color: var(--color-danger);
}

.overlay-hint {
  font-size: 12.5px;
  color: var(--color-accent);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .syncing-banner {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .syncing-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.overlay-card h2 {
  margin: 14px 0 4px;
  font-size: 22px;
}

.ref-line {
  margin: 10px 0 2px;
  color: var(--color-muted);
  font-size: 13px;
}

.ref-code {
  display: inline-block;
  background: var(--color-surface-2);
  border: 1.5px dashed var(--color-accent);
  color: var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 8px 22px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 1px;
}

.overlay-note {
  color: var(--color-muted);
  font-size: 13.5px;
  margin: 16px auto 20px;
  max-width: 400px;
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}


/* ---------- Submit overlays ---------- */

/* ---------- Scrollbars ---------- */

.sel-opts::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: 9px;
}

.sel-opts::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 999px;
}

.sel-opts::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  body {
    font-size: 14.5px;
    padding-bottom: 150px;
  }

  .header-inner {
    padding: 10px 14px 10px;
    gap: 6px;
  }

  .header-logo {
    height: 88px;
  }

  .header-wordmark {
    font-size: 12.2px;
  }

  .header-wordmark .wm-accent {
    font-size: 17.5px;
    letter-spacing: 1.2px;
  }

  .form-root {
    padding: 0 12px;
  }

  .sub-group {
    padding: 14px;
  }

  .radio-grid,
  .check-grid {
    grid-template-columns: 1fr 1fr;
  }

  .actionbar-inner {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .actionbar .btn {
    flex: 1;
  }

  .actionbar #btn-save-draft {
    margin-inline-end: 0;
    order: 2;
  }

  .actionbar #btn-submit {
    order: 1;
  }

  .toast-root {
    inset-inline: 12px;
  }

  .toast {
    max-width: none;
  }
}

/* ---------- Single long page: keep sticky actionbar from covering last fields ---------- */
body {
  padding-bottom: 110px;
}

@media (max-width: 640px) {
  body {
    padding-bottom: 140px;
  }
}
