:root {
  --pine: #173f35;
  --pine-2: #22584a;
  --teal: #247b7b;
  --gold: #c9972b;
  --coral: #c75c48;
  --ink: #15201d;
  --muted: #68746f;
  --line: #dbe3df;
  --panel: #ffffff;
  --paper: #f6f8f5;
  --soft: #eef4f1;
  --cream: #fffaf0;
  --blue-soft: #eef6fb;
  --danger: #b83232;
  --success: #247a4d;
  --shadow: 0 18px 50px rgba(21, 32, 29, 0.1);
  --radius: 8px;
  --max: 1320px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.78) 0%, rgba(246, 248, 245, 0.96) 34%, #f7f9f8 100%),
    linear-gradient(90deg, rgba(36, 123, 123, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36, 123, 123, 0.045) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

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

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--pine);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--soft);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(23, 63, 53, 0.12);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(21, 32, 29, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 240px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--pine), var(--teal));
  color: #f8dc86;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(23, 63, 53, 0.18);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--pine);
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.62rem 0.76rem;
  border-radius: var(--radius);
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--pine);
  background: var(--soft);
}

main {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.is-logged-out .app-header,
.is-logged-out .app-main {
  display: none;
}

.is-logged-in .login-screen {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: 1.2rem;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 1rem 0;
}

.login-hero,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(238, 244, 241, 0.92)),
    linear-gradient(135deg, rgba(36, 123, 123, 0.12), transparent);
}

.login-brand {
  align-self: start;
}

.login-hero h1 {
  max-width: 11ch;
  color: var(--pine);
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.02;
}

.login-image {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 1rem;
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem);
}

.login-heading {
  display: grid;
  gap: 0.35rem;
}

.login-heading h2 {
  color: var(--pine);
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.85rem;
}

.login-card {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7faf8);
}

.login-card > * {
  min-width: 0;
}

.login-card h3 {
  color: var(--pine);
  font-size: 1.05rem;
}

.login-card p,
.login-card small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.login-card small {
  font-size: 0.78rem;
}

.login-card .primary-button,
.login-card .secondary-button {
  width: 100%;
  min-height: 48px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.login-message {
  min-height: 28px;
  color: var(--coral);
  font-weight: 800;
}

.session-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 1.2rem;
  align-items: stretch;
  padding: 1.4rem 0 2rem;
}

.hero-copy {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.25rem;
  color: white;
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(23, 63, 53, 0.98), rgba(36, 123, 123, 0.9) 72%, rgba(199, 92, 72, 0.74)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.075) 0 1px, transparent 1px 20px);
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  max-width: 13.5ch;
  font-size: clamp(2.2rem, 4.2vw, 4.25rem);
  line-height: 1.01;
}

.hero-copy p {
  max-width: 70ch;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.hero-actions .secondary-button {
  color: white;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.hero-panel {
  display: grid;
  gap: 1rem;
  grid-template-rows: 1fr auto auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  padding: clamp(0.5rem, 1.5vw, 1rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(21, 32, 29, 0.06);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.obe-tagline {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(23, 63, 53, 0.14);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(21, 32, 29, 0.05);
}

.obe-tagline strong {
  color: var(--pine);
  font-size: 1.02rem;
}

.obe-tagline span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.hero-metrics > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(21, 32, 29, 0.06);
}

.metric-value {
  color: var(--pine);
  font-size: 2.35rem;
  font-weight: 850;
  line-height: 1;
}

.metric-label {
  margin-top: 0.45rem;
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 2rem 0;
}

.action-message {
  position: sticky;
  top: 74px;
  z-index: 18;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  color: white;
  background: var(--pine);
  box-shadow: var(--shadow);
  transition: max-height 180ms ease, margin 180ms ease, padding 180ms ease;
}

.action-message.is-visible {
  max-height: 120px;
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
}

.action-message.warning {
  background: var(--coral);
}

.action-message.success {
  background: var(--success);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2,
.status-band h2 {
  color: var(--pine);
  font-size: clamp(1.5rem, 2.5vw, 2.35rem);
}

.eyebrow {
  color: #ffe29c;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--teal);
}

.status-band {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(21, 32, 29, 0.05);
}

.validation-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 0.6rem;
}

.validation-pill {
  min-height: 64px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.validation-pill strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
}

.validation-pill span {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.validation-pill.pass {
  border-color: rgba(36, 122, 77, 0.24);
  background: #edf8f1;
}

.validation-pill.fail {
  border-color: rgba(184, 50, 50, 0.28);
  background: #fff0ee;
}

.two-column,
.program-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.program-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}

.panel {
  padding: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(21, 32, 29, 0.05);
}

.panel h3 {
  color: var(--pine);
  font-size: 1.05rem;
}

.panel-title,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.panel-title span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack.compact {
  gap: 0.75rem;
}

.form-grid,
.course-form,
.inline-form {
  display: grid;
  gap: 0.75rem;
}

.course-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.inline-form {
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1.3fr) auto;
  align-items: end;
  margin-bottom: 0.85rem;
}

.account-form {
  grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 0.8fr) minmax(150px, 0.9fr) minmax(190px, 1fr) minmax(150px, 0.8fr) auto;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--pine);
  font-size: 0.82rem;
  font-weight: 800;
}

.form-note {
  display: block;
  margin: -0.35rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0.65rem 0.7rem;
}

textarea {
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(36, 123, 123, 0.16);
  border-color: var(--teal);
}

.wide-field {
  grid-column: span 4;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.65rem 0.85rem;
  font-weight: 850;
  white-space: nowrap;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--pine), var(--teal));
  box-shadow: 0 10px 24px rgba(23, 63, 53, 0.14);
}

.secondary-button {
  color: var(--pine);
  border-color: rgba(23, 63, 53, 0.25);
  background: linear-gradient(180deg, #ffffff, var(--soft));
}

.ghost-button {
  color: var(--pine);
  border-color: var(--line);
  background: white;
}

.danger-button {
  color: white;
  background: var(--danger);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  filter: brightness(0.96);
}

.list,
.chip-list,
.report-grid,
.schema-grid,
.feature-grid {
  display: grid;
  gap: 0.65rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.8rem;
  align-items: start;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  text-align: left;
  box-shadow: 0 10px 26px rgba(21, 32, 29, 0.05);
}

.feature-card strong {
  color: var(--pine);
  font-size: 1rem;
}

.feature-card p {
  grid-column: 2;
  font-size: 0.86rem;
}

.feature-card.active {
  border-color: rgba(36, 123, 123, 0.5);
  background: linear-gradient(180deg, #ffffff, #eef7f4);
  box-shadow: 0 16px 34px rgba(23, 63, 53, 0.12);
}

.feature-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  grid-row: span 2;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--pine), var(--teal));
  box-shadow: 0 12px 24px rgba(23, 63, 53, 0.16);
}

.feature-icon::before,
.feature-icon::after {
  content: "";
  position: absolute;
  border-color: #f8dc86;
}

.icon-builder::before {
  width: 22px;
  height: 26px;
  border: 2px solid #f8dc86;
  border-radius: 3px;
}

.icon-builder::after {
  width: 14px;
  height: 2px;
  background: #f8dc86;
  box-shadow: 0 7px 0 #f8dc86;
}

.icon-syllabus::before {
  width: 22px;
  height: 28px;
  border: 2px solid #f8dc86;
  border-radius: 3px;
  background: linear-gradient(180deg, transparent 0 9px, rgba(248, 220, 134, 0.28) 9px 11px, transparent 11px 17px, rgba(248, 220, 134, 0.28) 17px 19px, transparent 19px);
}

.icon-syllabus::after {
  top: 12px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #f8dc86;
  border-right: 2px solid #f8dc86;
}

.icon-grading::before {
  bottom: 12px;
  left: 13px;
  width: 5px;
  height: 14px;
  background: #f8dc86;
  box-shadow: 8px -6px 0 #f8dc86, 16px -12px 0 #f8dc86;
}

.icon-grading::after {
  left: 11px;
  bottom: 10px;
  width: 26px;
  height: 2px;
  background: rgba(248, 220, 134, 0.74);
}

.icon-peo::before,
.icon-po::before,
.icon-faculty::before,
.icon-course::before,
.icon-approval::before,
.icon-plo::before,
.icon-curriculum::before,
.icon-quality::before,
.icon-rubric::before,
.icon-cqi::before,
.icon-program::before,
.icon-head::before,
.icon-institution::before,
.icon-reports::before {
  width: 24px;
  height: 24px;
  border: 2px solid #f8dc86;
  border-radius: 50%;
}

.icon-peo::after {
  width: 16px;
  height: 8px;
  border-left: 2px solid #f8dc86;
  border-bottom: 2px solid #f8dc86;
  transform: rotate(-45deg);
}

.icon-po::before {
  border-radius: 4px;
}

.icon-po::after {
  width: 18px;
  height: 2px;
  background: #f8dc86;
  box-shadow: 0 -7px 0 #f8dc86, 0 7px 0 #f8dc86;
}

.icon-faculty::before {
  top: 9px;
  width: 12px;
  height: 12px;
}

.icon-faculty::after {
  bottom: 9px;
  width: 26px;
  height: 13px;
  border: 2px solid #f8dc86;
  border-radius: 999px 999px 4px 4px;
}

.icon-course::before {
  width: 22px;
  height: 26px;
  border-radius: 3px;
}

.icon-course::after {
  width: 14px;
  height: 2px;
  background: #f8dc86;
  box-shadow: 0 -6px 0 #f8dc86, 0 6px 0 #f8dc86;
}

.icon-approval::before {
  border-radius: 4px;
}

.icon-approval::after {
  width: 17px;
  height: 9px;
  border-left: 3px solid #f8dc86;
  border-bottom: 3px solid #f8dc86;
  transform: rotate(-45deg);
}

.icon-plo::before {
  left: 11px;
  bottom: 11px;
  width: 6px;
  height: 12px;
  border: 0;
  border-radius: 2px;
  background: #f8dc86;
  box-shadow: 8px -6px 0 #f8dc86, 16px -12px 0 #f8dc86;
}

.icon-plo::after {
  right: 10px;
  top: 11px;
  width: 16px;
  height: 16px;
  border-top: 2px solid #f8dc86;
  border-right: 2px solid #f8dc86;
}

.icon-program::before {
  width: 26px;
  height: 22px;
  border-radius: 4px;
}

.icon-program::after {
  top: 13px;
  width: 18px;
  height: 2px;
  background: #f8dc86;
  box-shadow: 0 7px 0 #f8dc86;
}

.icon-head::before {
  top: 9px;
  width: 12px;
  height: 12px;
}

.icon-head::after {
  bottom: 9px;
  width: 28px;
  height: 14px;
  border: 2px solid #f8dc86;
  border-radius: 999px 999px 4px 4px;
}

.icon-institution::before {
  bottom: 12px;
  width: 28px;
  height: 18px;
  border-radius: 3px;
}

.icon-institution::after {
  top: 10px;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 12px solid #f8dc86;
}

.icon-reports::before {
  width: 22px;
  height: 26px;
  border-radius: 3px;
}

.icon-reports::after {
  bottom: 12px;
  left: 14px;
  width: 4px;
  height: 9px;
  background: #f8dc86;
  box-shadow: 7px -5px 0 #f8dc86, 14px -10px 0 #f8dc86;
}

.icon-curriculum::before {
  width: 28px;
  height: 28px;
}

.icon-curriculum::after {
  width: 28px;
  height: 2px;
  background: #f8dc86;
  box-shadow: 0 -9px 0 rgba(248, 220, 134, 0.85), 0 9px 0 rgba(248, 220, 134, 0.85);
  transform: rotate(35deg);
}

.icon-quality::before {
  border-radius: 4px;
}

.icon-quality::after {
  width: 17px;
  height: 9px;
  border-left: 3px solid #f8dc86;
  border-bottom: 3px solid #f8dc86;
  transform: rotate(-45deg);
}

.icon-rubric::before {
  width: 24px;
  height: 28px;
  border-radius: 3px;
}

.icon-rubric::after {
  width: 16px;
  height: 2px;
  background: #f8dc86;
  box-shadow: 0 -7px 0 #f8dc86, 0 7px 0 #f8dc86;
}

.icon-cqi::before {
  border-right-color: transparent;
  transform: rotate(30deg);
}

.icon-cqi::after {
  right: 10px;
  top: 11px;
  width: 10px;
  height: 10px;
  border-top: 3px solid #f8dc86;
  border-right: 3px solid #f8dc86;
}

.feature-panel {
  display: grid;
  gap: 1rem;
}

.list.horizontal {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.list-item,
.chip,
.report-card,
.schema-card,
.editor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  padding: 0.8rem;
}

button.report-card {
  display: grid;
  width: 100%;
  min-height: 138px;
  gap: 0.35rem;
  text-align: left;
  cursor: pointer;
}

button.report-card span {
  width: max-content;
  max-width: 100%;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

button.report-card.active {
  border-color: rgba(36, 123, 123, 0.45);
  background: linear-gradient(180deg, #ffffff, #eef7f4);
  box-shadow: 0 14px 30px rgba(23, 63, 53, 0.1);
}

button.subject-card {
  width: 100%;
  text-align: left;
}

button.subject-card.active {
  border-color: rgba(36, 123, 123, 0.45);
  background: linear-gradient(180deg, #ffffff, #eef7f4);
}

.list-item {
  display: grid;
  gap: 0.45rem;
}

.list-item strong,
.chip strong,
.report-card strong,
.schema-card strong {
  color: var(--pine);
}

.list-item p,
.report-card p,
.schema-card p {
  font-size: 0.88rem;
}

.item-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.chip {
  display: grid;
  gap: 0.35rem;
  background: linear-gradient(180deg, #ffffff, var(--soft));
}

.table-wrap {
  overflow-x: auto;
}

.mapping-select {
  min-width: 86px;
}

.toolbar {
  margin-bottom: 0;
}

.toolbar label {
  min-width: 260px;
}

.faculty-grid {
  margin-top: 1rem;
}

.course-summary {
  min-height: 100%;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.summary-grid > div {
  min-height: 76px;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbf9);
}

.summary-grid span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-grid strong {
  color: var(--pine);
}

.summary-grid .full {
  grid-column: 1 / -1;
}

.editor-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  background: #fbfcfa;
}

.editor-card h4 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--pine);
}

.editor-card .full {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  font-size: 0.82rem;
}

.checkbox-grid input {
  width: auto;
  min-height: auto;
}

.weight-total {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-weight: 850;
  background: var(--soft);
}

.weight-total.pass {
  color: var(--success);
  background: #edf8f1;
}

.weight-total.fail {
  color: var(--danger);
  background: #fff0ee;
}

.sticky-actions {
  position: sticky;
  top: 76px;
  z-index: 10;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.syllabus-preview {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.report-preview {
  display: grid;
  gap: 1rem;
  min-height: 420px;
  padding: clamp(0.9rem, 2vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.compact-report {
  min-height: 260px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: auto;
  font-weight: 750;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.syllabus-preview h2,
.syllabus-preview h3,
.report-preview h2,
.report-preview h3 {
  color: var(--pine);
}

.syllabus-preview h2,
.report-preview h2 {
  font-size: 1.8rem;
}

.syllabus-section {
  display: grid;
  gap: 0.7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

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

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  width: max-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--pine);
  font-size: 0.78rem;
  font-weight: 850;
}

.status-tag.approved {
  color: var(--success);
  background: #edf8f1;
}

.status-tag.draft,
.status-tag.returned {
  color: var(--coral);
  background: #fff1ed;
}

.schema-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.report-card {
  min-height: 118px;
}

@media (max-width: 1100px) {
  .app-header,
  .hero,
  .login-screen,
  .two-column,
  .program-layout,
  .status-band {
    grid-template-columns: 1fr;
  }

  .brand {
    min-width: 0;
  }

  .top-nav {
    justify-content: start;
  }

  .hero-image {
    max-height: 460px;
  }

  .validation-list,
  .login-grid,
  .feature-grid,
  .course-form,
  .account-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  main {
    width: min(calc(100% - 1rem), var(--max));
  }

  .app-header {
    position: static;
    padding: 0.75rem;
  }

  .top-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: start;
  }

  .hero-copy {
    min-height: 360px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-image {
    max-height: 320px;
  }

  .validation-list,
  .course-form,
  .inline-form,
  .account-form,
  .editor-card,
  .login-grid,
  .feature-grid,
  .report-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .login-screen {
    width: min(calc(100% - 1rem), var(--max));
    padding: 0.5rem 0;
  }

  .login-hero h1 {
    max-width: none;
  }

  .section-heading,
  .panel-title,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar label {
    min-width: 0;
  }

  .sticky-actions {
    position: static;
  }
}

@media print {
  .app-header,
  .hero,
  .status-band,
  .section:not(#syllabus),
  .sticky-actions {
    display: none !important;
  }

  main {
    width: 100%;
  }

  .syllabus-preview {
    border: 0;
    box-shadow: none;
  }
}
