:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --ink: #0f1720;
  --text: #17202a;
  --muted: #5d6b7a;
  --line: #d8dee4;
  --green: #1f7a5c;
  --green-dark: #135f48;
  --green-soft: #dff3eb;
  --blue: #2563eb;
  --blue-soft: #e7efff;
  --amber: #b45309;
  --amber-soft: #fff4df;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --shadow: 0 22px 64px rgba(31, 42, 55, 0.12);
  --shadow-soft: 0 10px 28px rgba(31, 42, 55, 0.08);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(15, 23, 32, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 23, 32, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.10), transparent 25rem),
    radial-gradient(circle at 88% 18%, rgba(31, 122, 92, 0.10), transparent 23rem),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 48%, #ffffff 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body[dir="rtl"] {
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.topbar-inner,
.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
.topbar-note,
.topbar-link,
.pill,
.button,
.choice,
.success-title,
.mini-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand {
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(31, 122, 92, 0.28);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, var(--green-soft));
  color: var(--green-dark);
  flex: 0 0 auto;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.topbar-note {
  color: var(--muted);
  font-size: 14px;
}

.topbar-note strong {
  color: var(--green-dark);
}

.topbar-link {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.hero {
  padding: 58px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: 48px;
  align-items: center;
}

.kicker {
  width: fit-content;
  margin: 0 0 16px;
  padding: 7px 11px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background: rgba(231, 239, 255, 0.88);
  color: #174ea6;
  font-size: 14px;
  font-weight: 820;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  color: #101828;
  font-size: 43px;
  line-height: 1.14;
  font-weight: 860;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 17px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pill {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(216, 222, 228, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.80);
  color: var(--muted);
  box-shadow: 0 2px 10px rgba(31, 42, 55, 0.08);
  font-size: 13px;
  font-weight: 780;
}

.pill strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.button {
  min-height: 48px;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(180deg, #218564, var(--green-dark));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(31, 122, 92, 0.24);
  cursor: pointer;
  font-weight: 820;
}

.button.secondary {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 2px 10px rgba(31, 42, 55, 0.08);
}

.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.assurance-strip,
.grid-3,
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.assurance-card,
.info-card,
.privacy-card,
.rule-card,
.survey-shell,
.success-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.assurance-card,
.info-card,
.privacy-card {
  padding: 18px;
}

.assurance-card h3,
.info-card h3,
.privacy-card h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.assurance-card p,
.info-card p,
.privacy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-panel {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(15, 23, 32, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbf9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head,
.survey-sticky {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.panel-body {
  padding: 18px;
}

.protocol-card,
.boundary-mini,
.reward-mini,
.risk-map {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(31, 42, 55, 0.08);
}

.protocol-top,
.rule-row,
.boundary-row,
.risk-title,
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.protocol-id {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #174ea6;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.audit-list,
.rule-list,
.boundary-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-list li,
.rule-list li,
.boundary-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.check-dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.audit-list em {
  color: var(--green-dark);
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(150px, 0.48fr);
  gap: 12px;
}

.boundary-row {
  padding: 8px 0;
  border-top: 1px solid #edf1f4;
  color: var(--muted);
  font-size: 13px;
}

.boundary-row:first-of-type {
  border-top: 0;
}

.boundary-row strong {
  color: var(--green-dark);
}

.boundary-row.danger strong {
  color: var(--danger);
}

.reward-mini strong {
  display: block;
  margin: 4px 0;
  color: var(--green-dark);
  font-size: 30px;
  line-height: 1;
}

.reward-mini p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.risk-row {
  display: grid;
  grid-template-columns: 96px 1fr 42px;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

section {
  padding: 36px 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 1.22;
}

.section-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.boundary-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 32, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(31, 122, 92, 0.08), transparent 34%), #ffffff;
  box-shadow: var(--shadow);
}

.boundary-statement {
  padding: 18px;
  border: 1px solid rgba(31, 122, 92, 0.18);
  border-radius: 8px;
  background: rgba(223, 243, 235, 0.56);
}

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.boundary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.boundary-card.blocked {
  border-color: rgba(180, 35, 24, 0.18);
  background: #fffbfa;
}

.boundary-card h3 {
  margin-bottom: 11px;
  font-size: 16px;
}

.rules-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.5fr);
  gap: 16px;
}

.rule-card {
  padding: 22px;
}

.reward-box {
  padding: 22px;
  border: 1px solid rgba(31, 122, 92, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.reward-box .amount {
  margin: 6px 0 10px;
  color: var(--green-dark);
  font-size: 42px;
  line-height: 1.08;
  font-weight: 850;
}

.survey-sticky {
  position: sticky;
  top: 50px;
  z-index: 20;
}

.progress-wrap {
  width: min(100%, 720px);
}

.progress-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 180ms ease;
}

form {
  margin: 0;
}

.form-section {
  padding: 26px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.form-section h3 {
  margin-bottom: 3px;
  font-size: 22px;
}

.form-section > p {
  margin-bottom: 18px;
  color: var(--muted);
}

fieldset {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

legend,
.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 780;
}

.required {
  color: var(--danger);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.choice:hover {
  border-color: #b8c2cc;
  background: #fbfcfe;
}

.choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.choice:has(input:checked) {
  border-color: rgba(31, 122, 92, 0.48);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(31, 122, 92, 0.10);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.text-input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

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

.field-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.safe-note,
.error-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.safe-note {
  border: 1px solid rgba(31, 122, 92, 0.18);
  background: var(--green-soft);
  color: var(--green-dark);
}

.error-note {
  display: none;
  margin: 0 24px 16px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
}

.submit-area {
  padding: 22px 24px 26px;
  background: #fbfcfe;
}

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.submit-hint {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.success-panel {
  display: none;
  margin-top: 18px;
  padding: 22px;
}

.success-panel.active {
  display: block;
}

.success-title {
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 850;
}

.submission-id {
  display: inline-flex;
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

footer {
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 980px) {
  .hero-grid,
  .rules-layout,
  .boundary-panel {
    grid-template-columns: 1fr;
  }

  .assurance-strip,
  .grid-3,
  .privacy-grid,
  .boundary-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    width: min(100% - 24px, var(--max));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 8px 0;
  }

  .topbar-note {
    grid-column: 1 / -1;
    font-size: 13px;
    line-height: 1.45;
  }

  .brand {
    font-size: 15px;
  }

  .topbar-link {
    padding: 5px 8px;
    font-size: 12px;
  }

  .container {
    width: min(100% - 24px, var(--max));
  }

  .hero {
    padding: 36px 0 28px;
  }

  h1 {
    font-size: 34px;
  }

  .hero-actions,
  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .submit-row .button {
    width: 100%;
  }

  .assurance-strip,
  .console-grid,
  .metric-strip,
  .grid-3,
  .privacy-grid,
  .boundary-columns,
  .choice-grid,
  .choice-grid.two,
  .field-row {
    grid-template-columns: 1fr;
  }

  .survey-sticky {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-section,
  .submit-area {
    padding-left: 16px;
    padding-right: 16px;
  }

  .error-note {
    margin-left: 16px;
    margin-right: 16px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
