:root {
  color-scheme: light;
  --ink: #18342e;
  --muted: #687973;
  --cream: #f5f3eb;
  --paper: #fffefa;
  --line: #dfe3dc;
  --sage: #dbe7d7;
  --green: #276a57;
  --dark: #173c34;
  --coral: #e1795c;
  --amber: #a66a16;
  --red: #a84234;
  --shadow: 0 8px 22px rgba(29, 54, 45, 0.07);
  --bg: var(--cream);
  --panel: var(--paper);
  --accent: var(--green);
  --accent-dark: var(--dark);
  --warn: var(--amber);
  --warn-bg: #fff4df;
  --danger: var(--red);
  --danger-bg: #fff0f2;
  --ok-bg: #eaf7f1;
  --radius: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.app-shell {
  min-height: 100vh;
}

.authenticated-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.authenticated-main {
  min-width: 0;
}

.authenticated-main .topbar {
  position: static;
}

.sidebar-static {
  background: #214F46;
  color: #eaf0e8;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 14px 18px;
  position: sticky;
  top: 0;
}

.sidebar-brand-static {
  align-items: center;
  display: flex;
  gap: 10px;
  padding: 0 8px 4px;
}

.logo-wrap {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
}

.brand-logo,
.sidebar-logo-static,
.page-logo {
  object-fit: contain;
}

.brand-logo {
  height: 44px;
  width: 60px;
}

.sidebar-logo-static {
  height: 66px;
  width: 88px;
}

.page-logo {
  height: 58px;
  width: 78px;
}

.logo-fallback-static {
  color: inherit;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.login-shell {
  background: var(--cream);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.login-story {
  background: #214F46;
  color: #eef4ef;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 6vw, 58px);
  position: relative;
}

.login-story::after {
  bottom: -12vw;
  color: #fff;
  content: "A&R";
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(150px, 28vw, 420px);
  font-weight: 700;
  line-height: 0.8;
  opacity: 0.025;
  position: absolute;
  right: -10vw;
}

.login-brand {
  align-items: center;
  display: flex;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-brand strong {
  color: #fff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 21px;
  line-height: 1.1;
}

.login-logo {
  height: 82px;
  object-fit: contain;
  width: 110px;
}

.login-copy {
  margin-top: clamp(74px, 13vh, 150px);
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.login-copy .eyebrow,
.login-card .eyebrow {
  color: var(--coral);
  letter-spacing: 1.8px;
}

.login-copy h1 {
  color: #fff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 600;
  line-height: 0.98;
  margin: 14px 0 22px;
}

.login-copy p {
  color: #bed0c9;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

.login-private {
  color: #8da9a0;
  font-size: 12px;
  margin: 32px 0 0;
  position: relative;
  z-index: 1;
}

.login-form-side {
  display: grid;
  place-items: center;
  padding: 30px;
}

.login-card {
  width: min(410px, 100%);
}

.login-form-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.login-form-logo {
  height: auto;
  max-width: 42vw;
  object-fit: contain;
  width: 156px;
}

.login-card h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.08;
  margin: 10px 0 5px;
}

.login-sub {
  color: var(--muted);
  margin: 0 0 30px;
}

.login-card .field {
  margin-top: 18px;
}

.login-card .field label {
  font-size: 12px;
  font-weight: 800;
}

.login-card input {
  background: var(--paper);
  border: 1px solid #cad2cb;
  border-radius: 8px;
  margin-top: 8px;
  min-height: 46px;
  outline: none;
  padding: 13px;
}

.login-card input:focus {
  border-color: #4f8a77;
  box-shadow: 0 0 0 3px #dfece6;
}

.login-submit {
  justify-content: center;
  margin-top: 20px;
  width: 100%;
}

.login-help {
  color: #71807b;
  font-size: 12px;
  line-height: 1.45;
  margin: 18px 0 0;
  text-align: center;
}

.sidebar-brand-static strong,
.sidebar-profile-static strong {
  color: #ffffff;
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.sidebar-brand-static strong {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 16px;
}

.sidebar-brand-static span,
.sidebar-profile-static span {
  color: #a9bcb5;
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.sidebar-static-nav {
  display: grid;
  gap: 13px;
}

.sidebar-section {
  display: grid;
  gap: 3px;
}

.sidebar-section-label {
  color: #8eaaa0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
  padding: 0 10px 4px;
}

.sidebar-static-nav a {
  border-radius: 8px;
  color: #b9cac4;
  display: block;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  text-decoration: none;
}

.sidebar-static-nav a:hover,
.sidebar-static-nav a.active {
  background: #2c574c;
  color: #ffffff;
}

.nav-status {
  color: #9fb7ae;
  display: block;
  font-size: 10px;
  font-weight: 800;
  margin-top: 2px;
  text-transform: uppercase;
}

.participant-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(23, 43, 36, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 24px;
}

.participant-nav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
}

.participant-nav a:hover,
.participant-nav a.active {
  background: #e8f0eb;
  color: var(--green);
}

.sidebar-profile-static {
  align-items: center;
  border-top: 1px solid #31594f;
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding: 14px 8px 0;
}

.mini-avatar-static {
  align-items: center;
  background: #d7b184;
  border-radius: 50%;
  color: #183e35;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.topbar {
  align-items: center;
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(29, 54, 45, 0.02);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 60px;
  padding: 10px clamp(16px, 3vw, 32px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 190px;
}

.brand strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.08;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

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

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.button,
button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  font-size: 13px;
  min-height: 36px;
  padding: 8px 12px;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.button:hover,
button:hover {
  border-color: #93b2a5;
  box-shadow: 0 4px 12px rgba(29, 54, 45, 0.06);
}

.nav a {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 11px;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav a:hover {
  background: #f7faf6;
  border-color: #d8e5db;
  color: var(--ink);
}

.nav a.active,
.button.primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:hover,
button.primary:hover {
  background: var(--dark);
  border-color: var(--dark);
}

.button.danger,
button.danger {
  background: #fff0ed;
  border-color: #eccac3;
  color: var(--danger);
}

.layout {
  margin: 0 auto;
  max-width: 1120px;
  padding: 22px clamp(14px, 3vw, 32px) 40px;
}

.panel,
.loading-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(25, 52, 46, 0.02);
  padding: clamp(16px, 2.3vw, 22px);
}

.loading-panel {
  margin: 20vh auto 0;
  max-width: 440px;
}

.page-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.page-head h1 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form {
  display: grid;
  gap: 16px;
  max-width: 480px;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
  display: grid;
  gap: 5px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select,
.role-controls select,
.quiz-question textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.check-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  line-height: 1.45;
}

.check-row input {
  margin-top: 3px;
}

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

.quiz-question {
  display: grid;
  gap: 8px;
}

.quiz-question label {
  display: grid;
  gap: 6px;
}

.quiz-question textarea {
  line-height: 1.5;
  min-height: 132px;
  resize: vertical;
}

.notice {
  background: #f7faf6;
  border: 1px solid #d8e5db;
  border-left: 3px solid #9bb6ab;
  border-radius: 6px;
  color: #334d45;
  font-size: 13px;
  line-height: 1.45;
  padding: 11px 13px;
}

.scope-check-result.safe {
  background: var(--ok-bg);
  border-color: #b9dfcf;
  border-left-color: var(--green);
  color: var(--ink);
}

.scope-check-result.warning {
  background: var(--danger-bg);
  border-color: #efc0c7;
  border-left-color: var(--red);
  color: var(--danger);
}

.error {
  background: var(--danger-bg);
  border: 1px solid #efc0c7;
  border-left: 3px solid var(--red);
  border-radius: 6px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
  padding: 11px 13px;
}

.status-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.status-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(25, 52, 46, 0.02);
  display: grid;
  gap: 6px;
  padding: 14px;
}

.status-item strong {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.15;
}

.status-item.safe {
  background: #eaf3ec;
  border-color: #cfe1d3;
}

.status-item.blocked {
  background: #fff0ed;
  border-color: #eccac3;
}

.workspace-hero {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: clamp(16px, 2.5vw, 22px);
}

.workspace-title-group {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.workspace-title-group h1 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  line-height: 1.06;
  margin: 3px 0 4px;
}

.workspace-stats {
  margin-bottom: 14px;
}

.workspace-section {
  margin-top: 14px;
}

.workspace-section-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.workspace-section-head h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  margin: 4px 0 0;
}

.workspace-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.workspace-card {
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 13px;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.workspace-card:hover {
  border-color: #b7cbc1;
  box-shadow: 0 5px 16px rgba(29, 54, 45, 0.07);
  transform: translateY(-1px);
}

.workspace-card strong {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.18;
}

.workspace-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.service-card {
  gap: 12px;
}

.service-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.service-meta div {
  align-items: baseline;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-top: 8px;
}

.service-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.service-meta dd {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

.workspace-safety-note {
  margin-top: 12px;
}

.today-page-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.today-page-head .page-title-group {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.today-page-head h1 {
  max-width: 780px;
}

.today-stats {
  margin-bottom: 14px;
}

.today-stat {
  min-height: 104px;
}

.today-stat small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.today-training-banner {
  align-items: center;
  background: #214F46;
  border-radius: 12px;
  color: #eef4ef;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 26px);
  position: relative;
}

.today-training-banner::after {
  color: #fff;
  content: "A&R";
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(80px, 13vw, 170px);
  font-weight: 700;
  line-height: 0.8;
  opacity: 0.035;
  position: absolute;
  right: 18px;
  top: 8px;
}

.today-training-banner > * {
  position: relative;
  z-index: 1;
}

.today-training-banner .eyebrow {
  color: #edaa90;
}

.today-training-banner h2 {
  color: #fff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.08;
  margin: 6px 0 8px;
}

.today-training-banner p {
  color: #bed0c9;
  line-height: 1.55;
  margin: 0;
  max-width: 720px;
}

.today-training-banner .button {
  background: #fffefa;
  border-color: #fffefa;
  color: var(--dark);
  flex: 0 0 auto;
}

.today-dashboard-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.today-quick-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.today-quick {
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 12px;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.today-quick:hover {
  border-color: #b7cbc1;
  box-shadow: 0 4px 14px rgba(29, 54, 45, 0.05);
  transform: translateY(-1px);
}

.today-quick span {
  align-items: center;
  background: #e3eee8;
  border-radius: 8px;
  color: var(--dark);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  padding: 0 8px;
  width: fit-content;
}

.today-quick b {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.15;
}

.today-quick small,
.today-status-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.today-status-list {
  display: grid;
  gap: 8px;
}

.today-status-row {
  align-items: center;
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 11px;
}

.today-status-row div {
  display: grid;
  gap: 3px;
}

.today-safety-note,
.today-admin-panel {
  margin-top: 14px;
}

.start-session-page-head {
  margin-bottom: 12px;
}

.start-session-page-head .page-title-group {
  align-items: center;
  display: flex;
  gap: 12px;
}

.start-session-notices {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.start-session-steps {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content 1fr max-content 1fr max-content;
  margin-bottom: 14px;
}

.step-pill {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
}

.step-pill i {
  align-items: center;
  background: #e3eee8;
  border-radius: 50%;
  color: var(--dark);
  display: inline-flex;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.step-pill span {
  font-size: 12px;
  font-weight: 800;
}

.step-pill.active {
  border-color: #b7cbc1;
  color: var(--ink);
}

.step-line {
  background: var(--line);
  height: 1px;
}

.start-session-workflow {
  display: grid;
  gap: 14px;
}

.start-step-card {
  display: grid;
  gap: 12px;
}

.location-step-card .workspace-section-head,
.state-card-step .workspace-section-head {
  align-items: end;
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.location-step-card .field,
.state-card-step .field {
  max-width: 720px;
}

.location-step-card h2,
.state-card-step h2,
.readiness-step-card h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  margin: 4px 0 5px;
}

.start-session-state-slot {
  margin-top: 2px;
}

.start-session-state-card {
  background: var(--ok-bg);
  border: 1px solid #b9dfcf;
  border-left: 3px solid var(--green);
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.start-session-state-card.warning {
  background: var(--danger-bg);
  border-color: #efc0c7;
  border-left-color: var(--red);
  color: var(--danger);
}

.start-session-state-card h3 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

.start-session-state-card p {
  line-height: 1.5;
  margin: 0;
}

.start-session-support-card {
  margin-top: 14px;
}

.scope-page-head {
  margin-bottom: 12px;
}

.scope-notice-row {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.scope-assistant-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
}

.scope-check-card,
.scope-scenario-card {
  display: grid;
  gap: 14px;
}

.scope-wording-form {
  display: grid;
  gap: 12px;
}

.scope-wording-form textarea {
  min-height: 160px;
  resize: vertical;
}

.scope-result-slot {
  min-height: 0;
}

.compact-notice {
  padding: 9px 11px;
}

.script-grid {
  display: grid;
  gap: 8px;
}

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

.script-btn {
  align-items: flex-start;
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-content: stretch;
  min-height: 74px;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}

.script-btn:hover {
  background: #eef5ef;
  border-color: #b7cbc1;
  box-shadow: 0 4px 14px rgba(29, 54, 45, 0.05);
}

.script-btn span {
  font-weight: 800;
}

.script-btn small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.scope-reminders {
  margin-top: 14px;
}

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

.compact-module-list .module-item {
  padding: 11px;
}

.reporting-page-head {
  margin-bottom: 12px;
}

.reporting-notice-row {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.reporting-selector-panel {
  margin-bottom: 14px;
}

.reporting-selector-panel .form-grid {
  align-items: end;
}

.reporting-card-panel .workspace-section-head {
  margin-bottom: 10px;
}

.reporting-selected-card {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.reporting-card-section {
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.reporting-card-section h3 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.reporting-card-section p {
  line-height: 1.52;
  margin: 0;
}

.reporting-notes-card {
  grid-column: 1 / -1;
}

.state-facts {
  display: grid;
  gap: 8px;
}

.fact {
  background: var(--paper);
  border: 1px solid #e3e7df;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

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

.fact b {
  line-height: 1.35;
}

.profile-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pill {
  background: #e3eee8;
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 4px 8px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.policy-search-form .action-row input {
  flex: 1 1 260px;
}

.training-summary {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.training-summary strong {
  display: block;
  font-size: 19px;
  line-height: 1.25;
  margin-top: 4px;
}

.module-list {
  display: grid;
  gap: 8px;
}

.module-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  padding: 13px;
}

.module-row:hover {
  border-color: #b7cbc1;
  box-shadow: 0 4px 14px rgba(29, 54, 45, 0.05);
}

.module-row h2,
.module-detail h2 {
  font-size: 17px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.module-row p,
.module-detail p {
  line-height: 1.55;
}

.module-detail h2 {
  margin-top: 18px;
}

.training-media-card {
  align-items: stretch;
  background: #f7faf6;
  border: 1px solid #d8e5db;
  border-radius: 10px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  margin: 14px 0 18px;
  padding: 14px;
}

.training-media-card h2 {
  margin-top: 4px;
}

.training-media-frame {
  align-items: center;
  background: #e9f1ec;
  border: 1px dashed #aac2b7;
  border-radius: 9px;
  color: var(--accent-dark);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 116px;
  padding: 14px;
  text-align: center;
}

.training-video-frame {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: #10261f;
  border: 1px solid #aac2b7;
  border-radius: 9px;
  color: #f8f4e8;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-align: center;
  width: 100%;
}

.training-video-player {
  background: #10261f;
  display: block;
  height: 100%;
  width: 100%;
}

.training-video-controls {
  align-items: center;
  background: rgba(16, 38, 31, 0.86);
  border-top: 1px solid rgba(248, 244, 232, 0.18);
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  left: 0;
  padding: 10px;
  position: absolute;
  right: 0;
}

.training-video-controls .button {
  background: #f8f4e8;
  border-color: rgba(248, 244, 232, 0.3);
  color: #10261f;
  min-height: 36px;
  padding: 8px 12px;
}

.compact {
  margin: 14px 0 0;
}

.script-box {
  background: #f7faf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px;
}

.scenario-choices {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.choice {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr;
  padding: 11px 12px;
}

.choice:hover {
  background: #fbfcf8;
  border-color: #93b2a5;
}

.choice input {
  margin-top: 3px;
}

.feedback {
  border-radius: 9px;
  margin-top: 14px;
  padding: 12px;
}

.feedback h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.feedback.safe {
  background: var(--ok-bg);
  border: 1px solid #b9dfcf;
}

.feedback.needs-review {
  background: var(--warn-bg);
  border: 1px solid #ecd3a5;
}

.dashboard-panel {
  margin-top: 14px;
}

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

.dashboard-table {
  border-collapse: collapse;
  min-width: 960px;
  width: 100%;
}

.dashboard-table th,
.dashboard-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

.dashboard-table th {
  background: #f2f3ed;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-transform: uppercase;
}

.dashboard-table td {
  font-size: 13px;
  line-height: 1.4;
}

.dashboard-table tr:hover td {
  background: #fbfcf8;
}

.dashboard-table summary {
  cursor: pointer;
  font-weight: 700;
}

.detail-panel {
  background: #f7faf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 8px;
  max-width: 520px;
  padding: 11px;
}

.detail-panel ul {
  margin: 8px 0 12px;
  padding-left: 18px;
}

.safe-pill {
  background: #eaf3ec;
  color: var(--dark);
}

.warn-pill {
  background: var(--warn-bg);
  color: var(--warn);
}

.role-controls {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.role-controls form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.printable-report {
  line-height: 1.48;
}

.printable-report h1,
.printable-report h2 {
  margin-top: 0;
}

.panel + .panel,
.panel + .status-grid,
.status-grid + .panel {
  margin-top: 14px;
}

.panel p:first-child,
.notice p:first-child {
  margin-top: 0;
}

.panel p:last-child,
.notice p:last-child {
  margin-bottom: 0;
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .print-hidden,
  .action-row {
    display: none !important;
  }

  .layout {
    max-width: none;
    padding: 0;
  }

  .panel,
  .printable-report {
    border: 0;
    padding: 0;
  }
}

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

  .login-story {
    min-height: 300px;
    padding: 28px;
  }

  .login-copy {
    margin-top: 42px;
  }

  .login-copy h1 {
    font-size: 40px;
  }

  .login-private {
    display: none;
  }

  .login-form-side {
    padding: 42px 22px;
  }

  .login-logo {
    height: 58px;
    width: 78px;
  }

  .authenticated-shell {
    display: block;
  }

  .sidebar-static {
    height: auto;
    max-height: none;
    padding: 18px 14px;
    position: static;
  }

  .sidebar-static-nav {
    gap: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
  }

  .nav a,
  .nav button {
    flex: 1;
    justify-content: center;
  }

  .module-row {
    grid-template-columns: 1fr;
  }

  .training-media-card {
    grid-template-columns: 1fr;
  }

  .today-page-head,
  .today-training-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .start-session-steps {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .step-line {
    display: none;
  }

  .location-step-card .workspace-section-head,
  .state-card-step .workspace-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .scope-assistant-grid {
    grid-template-columns: 1fr;
  }

  .reporting-selected-card {
    grid-template-columns: 1fr;
  }

  .workspace-card {
    min-height: auto;
  }
}
