:root {
  --bg: #f6f7fb;
  --card: #fff;
  --text: #172033;
  --muted: #637083;
  --line: #dfe5ef;
  --primary: #203b73;
  --accent: #f4c542;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.embed {
  background: #fff;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 78px;
  padding: 12px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--primary);
  text-decoration: none;
}

.site-logo {
  height: 78px;
  width: auto;
  display: block;
}

nav a {
  margin-left: 18px;
  color: var(--text);
  text-decoration: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 28px 28px;
}

.hero {
  padding: 18px 0 14px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  margin: .15rem 0 10px;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 0.82rem;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(18, 35, 66, .06);
}

.narrow {
  max-width: 480px;
  margin: 40px auto;
}

.sticky {
  position: sticky;
  top: 96px;
}

details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

summary {
  cursor: pointer;
  font-size: 1.05rem;
}

.outcomes {
  padding-left: 0;
  list-style: none;
}

.outcomes li {
  margin: 10px 0;
}

.outcome-btn {
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 500;
}

.outcome-btn:hover,
.outcome-btn.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 59, 115, .12);
}

.outcome-btn span:last-child {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 500;
}

.number {
  font-weight: 700;
  color: var(--primary);
  min-width: 64px;
  font-size: 14px;
}

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

label {
  display: block;
  font-weight: 700;
  margin: 12px 0 5px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

.primary,
button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  background: var(--accent);
  color: #111;
}

.link-button {
  display: inline-block;
  text-decoration: none;
}

.notice {
  padding: 14px 18px;
  border-radius: 12px;
  background: #e7f7ee;
  border: 1px solid #b6e3c6;
  margin: 0 0 20px;
}

.error {
  padding: 12px;
  border-radius: 10px;
  background: #fee4e2;
  color: var(--danger);
}

.selected-text {
  font-size: .95rem;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 10px;
}

.adminbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
}

.feedback {
  margin: 16px 0;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 800;
  background: #e9edf5;
}

.badge.new {
  background: #fff4cc;
}

.badge.reviewed {
  background: #dbeafe;
}

.badge.actioned,
.badge.published {
  background: #dcfce7;
}

.badge.deferred,
.badge.archived {
  background: #f3e8ff;
}

.badge.draft {
  background: #f2f4f7;
}

blockquote {
  border-left: 4px solid var(--accent);
  margin-left: 0;
  padding-left: 14px;
  font-size: 1.05rem;
}

.versions li {
  margin: 10px 0;
}

.outcome-edit {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.outcome-edit > * {
  margin-top: 8px;
}

.module-goal {
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
}

.category-block {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.category-block h3,
.category-admin h4 {
  color: var(--primary);
  margin-bottom: 8px;
}

.category-admin {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 12px;
}

/* PATI module navigation cards */

.module-nav-card {
  padding: 18px 20px;
  margin-bottom: 20px;
}

.module-nav-head {
  max-width: 760px;
}

.module-nav-head h2 {
  font-size: 1.55rem;
  margin: .15rem 0 6px;
}

.module-nav-head .muted {
  margin: 0;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.module-tile {
  display: flex;
  flex-direction: column;
  min-height: 128px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.module-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 10px 26px rgba(18, 35, 66, .10);
}

.module-card-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.module-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
  color: var(--primary);
  flex: 0 0 auto;
}

.module-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .02em;
}

.module-tile strong {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
  margin-bottom: 6px;
}

.module-subtitle {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.2;
}

.module-section {
  scroll-margin-top: 110px;
}

.module-marker {
  display: inline-block;
  color: var(--primary);
  margin-right: 6px;
}

/* Feedback panel */

.card.sticky {
  border-top: 5px solid var(--accent);
  width: 360px;
  max-width: 360px;
  max-height: none;
  overflow: visible;
  padding-bottom: 18px;
}

.card.sticky h2 {
  display: inline-block;
  background: rgba(244, 196, 48, 0.12);
  border-left: 5px solid var(--accent);
  padding: 8px 14px;
  border-radius: 10px;
  margin: 0 0 18px;
  font-size: 1.35rem;
}

.feedback-tabs {
  display: flex;
  gap: 0;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin: 8px 0 18px;
}

.feedback-tab {
  flex: 1;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--primary);
  cursor: pointer;
}

.feedback-tab.active {
  background: var(--accent);
  color: #111;
  box-shadow: 0 2px 8px rgba(18, 35, 66, .16);
}

.card.sticky form {
  padding-bottom: 0;
}

.card.sticky button.primary {
  position: static;
  padding: 14px 34px;
  font-size: 17px;
  font-weight: 800;
  border-radius: 24px;
  min-width: 155px;
  margin-top: 12px;
}

#selected_label {
  font-weight: 600;
}

.card.sticky textarea {
  min-height: 82px;
  max-height: 100px;
}

/* Module selector inside feedback panel */

.module-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.module-choice {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 48px;
  padding: 7px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.module-choice:hover,
.module-choice.selected {
  border-color: var(--primary);
  background: var(--accent);
  color: #172033;
  font-weight: 800;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(244, 197, 66, .35);
}

.module-choice-icon {
  font-size: 1rem;
  line-height: 1;
}

.module-choice-code {
  font-weight: 800;
  color: var(--primary);
  font-size: 0.78rem;
}

/* Footer */

.site-footer {
  text-align: center;
  font-size: 0.85rem;
  color: #8a8a8a;
  padding: 32px 20px;
  border-top: 1px solid #efefef;
  background: #fafafa;
  margin-top: 50px;
}

/* Responsive */

@media (max-width: 980px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .sticky {
    position: static;
  }

  .card.sticky {
    width: auto;
    max-width: none;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 16px;
  }

  .site-header {
    padding: 12px 16px;
  }

  .site-logo {
    height: 58px;
  }
}

@media (max-width: 560px) {
  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-tile {
    min-height: auto;
  }
}.module-tile {
  min-height: 125px;
  padding: 12px;
}

.module-grid {
  gap: 10px;
}.outcome-btn {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.outcome-btn:hover,
.outcome-btn.selected {
  border-color: #d4a900;
  background: #fff8d8;
}

@media (max-width: 768px) {
  .card.sticky {
    scroll-margin-top: 90px;
  }

  .outcome-btn {
    touch-action: manipulation;
  }
}