:root {
  --page: #f6f3ec;
  --surface: #fffdf8;
  --surface-soft: #f0eadf;
  --ink: #22251f;
  --muted: #62665d;
  --line: #ded6c8;
  --green: #0f6a5c;
  --green-dark: #084d45;
  --gold: #f3b43f;
  --red: #8a174a;
  --navy: #10283b;
  --shadow: 0 18px 60px rgba(34, 37, 31, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.02;
}

.eyebrow {
  margin: 0;
  color: #7b7367;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(16, 40, 59, 0.94), rgba(15, 106, 92, 0.78)),
    linear-gradient(135deg, #18364b, #0f6a5c);
  color: white;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 28px;
}

.brand-strip {
  display: block;
  width: min(100%, 760px);
  height: 72px;
  padding: 12px 16px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
}

.brand-strip.small {
  width: 100%;
  height: 64px;
  padding: 10px 14px;
  margin-bottom: 22px;
}

.brand-strip.app-brand {
  width: min(100%, 680px);
  height: 58px;
  padding: 8px 12px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero .eyebrow,
.hero .accent {
  color: var(--gold);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
}

.topbar,
.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--page);
  color: var(--ink);
  padding: 7px;
  font-size: 12px;
  font-weight: 700;
}

.user-pill span {
  overflow-wrap: anywhere;
}

.user-pill a,
.primary-action,
.actions a,
.actions button {
  display: inline-flex;
  width: auto;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.primary-action,
.primary-action.compact,
.user-pill a {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.primary-action:hover,
.user-pill a:hover {
  background: var(--green-dark);
}

.primary-action.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.headline {
  max-width: 660px;
}

.accent {
  margin: 0;
  color: var(--red);
  font-size: 15px;
  font-weight: 800;
}

.headline h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.headline p:last-child,
.how-it-works > div > p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.hero .headline p:last-child {
  color: rgba(255, 255, 255, 0.84);
}

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

.steps article {
  min-height: 74px;
  border-left: 4px solid var(--green);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 12px;
}

.steps article:nth-child(2) {
  border-color: var(--gold);
}

.steps article:nth-child(3) {
  border-color: var(--red);
}

.steps strong {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.steps span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.dashboard,
.content-panel,
.panel,
.workflow-card,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard {
  align-self: center;
  padding: 14px;
  color: var(--ink);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 12px;
  color: var(--ink);
}

.dashboard-header span,
.module-title span,
.section-title span {
  border-radius: 4px;
  background: #e0eadf;
  color: var(--green);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.module-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.module-card {
  display: block;
  border: 1px solid #e3dacb;
  border-radius: 6px;
  background: #fffaf0;
  color: var(--ink);
  padding: 14px;
}

.module-link {
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.module-link:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.module-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.module-title p {
  margin: 0;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-title h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.module-card > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.how-it-works,
.builder-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 28px;
}

.builder-panel {
  border-top: 1px solid var(--line);
}

.how-it-works h2,
.builder-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
}

.builder-panel > div > p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.builder-form {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr auto;
  align-self: center;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.builder-form input,
.builder-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffaf0;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 600;
}

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

.workflow-card,
.panel {
  padding: 20px;
}

.workflow-card > strong,
.roadmap strong {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--green);
  color: white;
  font-size: 13px;
}

.workflow-card h3,
.panel h3 {
  margin: 12px 0 0;
  font-size: 18px;
}

.workflow-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.line-item {
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
}

.roadmap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.login-body {
  min-height: 100vh;
  display: block;
  border-top: 8px solid #8f0000;
  border-bottom: 8px solid #8f0000;
  background: #f4f4f4;
}

.login-hero {
  overflow: hidden;
  border-bottom: 14px solid white;
  background: white;
}

.login-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.login-shell {
  display: grid;
  width: min(100%, 430px);
  min-height: calc(100vh - 252px);
  place-items: center;
  margin: 0 auto;
  padding: 34px 20px;
}

.login-panel {
  width: 100%;
  border-radius: 15px;
  padding: 26px 30px;
  text-align: center;
}

.login-panel h1 {
  margin-top: 0;
  color: #8f0000;
  font-size: 28px;
  line-height: 1.15;
}

.login-panel .primary-action {
  width: 100%;
  min-height: 48px;
  gap: 14px;
  border-color: #d8d8d8;
  border-radius: 9px;
  background: white;
  color: #2d2d2d;
  font-size: 15px;
  box-shadow: none;
}

.login-panel .primary-action:hover {
  border-color: #b8b8b8;
  background: #fafafa;
}

.lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.small-copy {
  color: var(--muted);
  font-size: 13px;
}

.small-copy strong {
  display: block;
  margin-top: 2px;
}

.google-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: #4285f4;
  font-weight: 900;
}

.notice {
  margin-bottom: 16px;
  border-left: 4px solid var(--red);
  border-radius: 5px;
  background: var(--surface-soft);
  padding: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.creator-box {
  display: grid;
  gap: 2px;
  margin-bottom: 16px;
  border: 1px solid #e3dacb;
  border-radius: 6px;
  background: #fffaf0;
  padding: 12px;
}

.creator-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.creator-box strong {
  color: var(--ink);
  font-size: 15px;
}

.creator-box small {
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.app-header h1 {
  max-width: 760px;
  font-size: clamp(26px, 3vw, 34px);
}

.app-header p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.content-panel {
  margin-top: 20px;
  padding: 20px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.section-title h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.print-options {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) 1fr auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffaf0;
  padding: 16px;
}

.print-options h2 {
  margin: 5px 0 0;
  font-size: 18px;
}

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

.print-checks label,
.check-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.check-option {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf0;
  padding: 10px 12px;
}

.print-checks input,
.check-option input {
  flex: 0 0 auto;
  width: auto;
  min-width: 16px;
  min-height: 16px;
  margin-top: 1px;
  accent-color: var(--green);
}

.document-form .check-option input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.empty-state {
  max-width: 560px;
}

.empty-state h2,
.record-row h2 {
  margin: 0;
  font-size: 20px;
}

.empty-state p,
.record-row p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.table-list {
  display: grid;
  gap: 10px;
}

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e3dacb;
  border-radius: 6px;
  background: #fffaf0;
  padding: 14px;
}

.document-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
  color: #3d403a;
  font-size: 13px;
  font-weight: 900;
}

.document-form input,
.document-form textarea,
.document-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf0;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
}

.document-form textarea {
  min-height: 104px;
  resize: vertical;
}

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

.form-actions {
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.document-preview {
  border: 1px solid #e3dacb;
  border-radius: 6px;
  background: #fffaf0;
  padding: 18px;
  color: #34372f;
  font-size: 14px;
  line-height: 1.7;
}

.print-only {
  display: none;
}

.instrument-background {
  display: none;
}

.student-space {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: end;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 14px;
}

.student-space span {
  min-height: 28px;
  border-bottom: 1px solid #34372f;
}

.observation-box {
  min-height: 130px;
  border: 1px solid #cfc5b5;
  border-radius: 5px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 31px,
      rgba(98, 102, 93, 0.22) 32px
    );
}

.letterhead {
  border-bottom: 3px solid var(--red);
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.letterhead img {
  display: block;
  width: 100%;
  max-height: 24mm;
  object-fit: contain;
  object-position: left center;
}

.letterhead div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.meta-grid-creator {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.meta-grid article {
  border: 1px solid #e3dacb;
  border-radius: 6px;
  background: #fffaf0;
  padding: 12px;
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.document-preview h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.2;
}

.document-preview h3 {
  margin: 22px 0 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 16px;
}

.document-preview p {
  margin: 8px 0;
  color: #44483f;
}

.bullet-list,
.check-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.bullet-list li,
.check-list li {
  border: 1px solid #e8dfcf;
  border-radius: 5px;
  background: var(--surface);
  padding: 9px 10px;
}

.bullet-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: 2px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-list span {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid var(--green);
  border-radius: 4px;
  background: white;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.content-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}

.content-table th,
.content-table td {
  border: 1px solid #e3dacb;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.content-table th {
  background: #e0eadf;
  color: var(--green-dark);
}

@media (max-width: 900px) {
  .hero-grid,
  .how-it-works,
  .builder-panel,
  .workflow-grid,
  .form-grid,
  .meta-grid,
  .print-options,
  .builder-form {
    grid-template-columns: 1fr;
  }

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

  .topbar,
  .app-header,
  .section-title,
  .record-row {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .hero-grid,
  .how-it-works,
  .app-shell {
    padding: 18px;
  }

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

  .content-panel,
  .login-panel {
    padding: 16px;
  }

  .login-hero {
    min-height: 0;
  }

  .print-checks {
    grid-template-columns: 1fr;
  }

  .user-pill {
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }
}

@media print {
  @page {
    size: letter;
    margin: 40mm 14mm 24mm;
  }

  body {
    background: white;
    color: #111;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-shell {
    max-width: none;
    padding: 0;
  }

  .app-header,
  .actions,
  .section-title span,
  .screen-only {
    display: none;
  }

  .print-only {
    display: block;
  }

  .instrument-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
  }

  .content-panel,
  .document-preview,
  .meta-grid article {
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .content-panel {
    margin-top: 0;
    padding: 0;
  }

  .meta-grid {
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid #bbb;
    padding-bottom: 10px;
  }

  .document-preview {
    padding: 0;
  }

  .letterhead {
    margin-bottom: 12mm;
    padding-bottom: 5mm;
  }

  .letterhead img {
    width: 100%;
    max-height: 22mm;
  }

  .document-preview h2 {
    font-size: 17pt;
  }

  .document-preview h3 {
    border-top: 1px solid #bbb;
    font-size: 13pt;
  }

  .bullet-list li,
  .check-list li {
    border: 0;
    background: white;
    padding: 4px 0;
  }

  .content-table th,
  .content-table td {
    border: 1px solid #999;
  }
}
