:root {
  --navy: #0b2a45;
  --navy-light: #1a2332;
  --teal: #1f6f7a;
  --gold: #f2c14e;
  --bg: #0b2a45;
  --paper: #ffffff;
  --paper-dark: #f3f6f8;
  --ink: #111827;
  --muted: #4b5563;
  --red: #1f6f7a;
  --red-light: #2a8a96;
  --stamp: #1f6f7a;
  --mark: #0b2a45;
  --mark-bg: #dceef0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(31, 111, 122, 0.35), transparent 45%),
    radial-gradient(ellipse at 85% 100%, rgba(242, 193, 78, 0.12), transparent 40%),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-light) 55%, #0a1f33 100%);
  color: var(--ink);
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

header.site-header {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-bottom: 0.85rem;
}

.brand:hover {
  opacity: 0.9;
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  display: block;
}

.wordmark {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.wordmark .harbor {
  color: #fff;
}

.wordmark .vane {
  color: var(--teal);
}

header.site-header h1,
header.site-header .product-name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}

header.site-header .subtitle {
  margin: 0 auto;
  max-width: 36rem;
  opacity: 0.88;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

nav.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 1.15rem 0 0.25rem;
}

nav.top-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
}

nav.top-nav a:hover,
nav.top-nav a.active {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

.panel {
  background: var(--paper);
  border: 1px solid rgba(11, 42, 69, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  padding: 1.35rem 1.4rem;
}

.stamp {
  display: inline-block;
  border: 1px solid var(--teal);
  color: var(--teal);
  background: var(--mark-bg);
  padding: 0.2rem 0.65rem;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(11, 42, 69, 0.25);
  background: var(--paper-dark);
  color: var(--ink);
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 560;
  border-radius: 4px;
}

button.primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

button:hover {
  filter: brightness(1.05);
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 0 auto;
}

.cell {
  aspect-ratio: 1;
  min-height: 72px;
  border: 1px solid rgba(11, 42, 69, 0.2);
  border-radius: 4px;
  background: #fff;
  padding: 0.35rem;
  font-size: clamp(0.55rem, 1.6vw, 0.72rem);
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  position: relative;
}

.cell-label {
  padding: 0 0.75rem 0 0.2rem;
}

.cell-info {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  font-size: 0.65rem;
  font-weight: bold;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper-dark);
  color: var(--ink);
  flex-shrink: 0;
}

.cell-info:hover {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
}

body.modal-open {
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid rgba(11, 42, 69, 0.15);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 1.25rem 1.5rem 1.5rem;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  background: transparent;
  border: none;
}

.modal-section {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stamp);
}

.modal-title {
  margin: 0 2rem 1rem 0;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--red);
}

.modal-block {
  margin-bottom: 1.1rem;
}

.modal-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.modal-quote {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-left: 4px solid var(--red);
  background: #fffef8;
  font-size: 0.85rem;
  line-height: 1.55;
  font-style: italic;
}

.modal-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

.modal-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  line-height: 1.55;
}

.modal-list li + li {
  margin-top: 0.4rem;
}

.modal-footer-note {
  margin: 0.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--stamp);
  font-size: 0.78rem;
  color: var(--stamp);
  text-align: center;
}

.modal-case-wrap {
  margin: 0.75rem 0 0;
  text-align: center;
}

.modal-case-link {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border: 1px solid var(--teal);
  border-radius: 4px;
  padding: 0.5rem 0.85rem;
  background: var(--teal);
}

.modal-case-link:hover {
  filter: brightness(1.08);
}

.case-page {
  max-width: 100%;
}

.case-back {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.case-back a {
  color: var(--red);
  font-weight: bold;
}

.case-section {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stamp);
}

.case-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--red);
}

.case-block {
  margin-bottom: 1.25rem;
}

.case-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.case-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.case-list li + li {
  margin-top: 0.35rem;
}

.case-steps {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.case-steps li {
  margin-bottom: 0.75rem;
}

.case-role-block {
  padding: 0.85rem 1rem;
  border: 1px solid var(--stamp);
  background: #fffef8;
}

.case-role-manager {
  border-color: var(--red);
  border-left-width: 4px;
}

.case-role-note {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--stamp);
  line-height: 1.45;
}

.resolution-script {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  padding: 0.65rem 0.85rem;
  border-left: 4px solid var(--stamp);
  background: var(--paper-dark);
}

.confrontation-approach {
  padding: 0.85rem 1rem;
  border: 2px solid var(--stamp);
  background: #fffef8;
}

.modal-case-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--stamp);
  text-align: center;
}

.modal-case-hint[hidden] {
  display: none;
}

.cell:hover:not(.free) {
  background: var(--paper-dark);
}

.cell.marked {
  background: var(--mark-bg);
  text-decoration: line-through;
  color: var(--mark);
}

.cell.free {
  background: var(--red);
  color: var(--paper);
  font-weight: bold;
  cursor: default;
  font-size: clamp(0.65rem, 2vw, 0.85rem);
}

.status-bar {
  margin-top: 1rem;
  text-align: center;
  min-height: 1.5rem;
  font-weight: bold;
  color: var(--red);
}

.win-banner {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--teal);
  border-radius: 6px;
  background: var(--mark-bg);
  color: var(--navy);
  text-align: center;
}

.win-banner.show {
  display: block;
}

.site-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.purpose {
  margin-top: 1.5rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.65;
}

.purpose h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.purpose p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.purpose p:last-child {
  margin-bottom: 0;
}

.disclaimer {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
  line-height: 1.5;
}

.manual-body {
  font-size: 0.88rem;
  line-height: 1.65;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--stamp);
  background: #fffef8;
}

.manual-body h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
}

.manual-body h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.manual-body h2:first-child {
  margin-top: 0;
}

.manual-body p {
  margin: 0 0 0.85rem;
}

.manual-body hr {
  border: none;
  border-top: 1px solid var(--stamp);
  margin: 1.25rem 0;
}

.manual-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.manual-body th,
.manual-body td {
  border: 1px solid var(--stamp);
  padding: 0.35rem 0.6rem;
  text-align: left;
}

.manual-body th {
  background: var(--paper-dark);
  font-weight: bold;
}

.manual-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.manual-links a {
  color: var(--red);
  font-weight: bold;
}

.manual-jump {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.manual-jump-link {
  display: inline-block;
  color: var(--red);
  font-weight: bold;
  text-decoration: none;
  border: 2px solid var(--red);
  padding: 0.45rem 0.75rem;
  background: var(--mark-bg);
}

.manual-jump-link:hover {
  background: #b8d88a;
}

.manual-jump-note {
  display: block;
  margin-top: 0.35rem;
  color: var(--stamp);
  font-size: 0.78rem;
}

.manual-highlight {
  scroll-margin-top: 1rem;
  margin: 1.5rem -0.5rem;
  padding: 1rem 1rem 0.5rem;
  border: 3px double var(--red);
  border-left-width: 8px;
  background: linear-gradient(135deg, #fff9e6 0%, var(--mark-bg) 100%);
  box-shadow: inset 0 0 0 1px rgba(139, 26, 26, 0.15);
}

.manual-section-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  line-height: 1.35;
}

.manual-highlight p {
  border-left: 2px solid rgba(139, 26, 26, 0.2);
  padding-left: 0.65rem;
}

@media (max-width: 600px) {
  .cell {
    min-height: 58px;
    font-size: 0.52rem;
  }
}

/* Quiz — Slack-style scenario player */
.quiz-block {
  border: 2px double var(--red);
  background: linear-gradient(180deg, #fffef8 0%, var(--paper) 100%);
}

.quiz-root {
  margin-top: 0.75rem;
}

.quiz-prompt {
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.quiz-profile-bar {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--stamp);
}

.quiz-profile-edit {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--red);
  text-decoration: underline;
  cursor: pointer;
}

.quiz-profile-setup {
  max-width: 28rem;
}

.quiz-profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quiz-profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.quiz-profile-field span:first-child {
  font-weight: bold;
}

.quiz-profile-field input[type="text"] {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--stamp);
  border-radius: 4px;
  font: inherit;
  background: #fff;
}

.quiz-profile-photo-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.quiz-profile-preview {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stamp);
}

.quiz-profile-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quiz-profile-preview-empty {
  font-size: 1.5rem;
  color: var(--stamp);
}

.quiz-profile-upload input[type="file"] {
  font-size: 0.78rem;
}

.quiz-profile-hint {
  font-size: 0.72rem;
  color: var(--stamp);
}

.quiz-profile-error {
  margin: 0;
  color: var(--red);
  font-size: 0.82rem;
}

.quiz-meta {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--stamp);
  margin-bottom: 0.5rem;
}

.quiz-scene-header {
  margin-bottom: 0.5rem;
}

.quiz-role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.quiz-role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  border: 2px solid var(--stamp);
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.quiz-role-card:hover {
  background: var(--paper-dark);
  border-color: var(--red);
}

.quiz-role-face {
  font-size: 2rem;
  line-height: 1;
}

.quiz-role-card strong {
  font-size: 0.9rem;
}

.quiz-role-card span:last-child {
  font-size: 0.75rem;
  color: var(--stamp);
  line-height: 1.35;
}

.slack-workspace {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  border: 1px solid #5c2d5e;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  min-height: 22rem;
}

.slack-sidebar {
  background: #3f0e40;
  color: #eceaec;
  padding: 0.65rem 0.5rem;
  font-size: 0.78rem;
  overflow-y: auto;
}

.slack-sidebar-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  margin-bottom: 0.5rem;
  padding: 0 0.35rem;
}

.slack-member {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  margin-bottom: 0.2rem;
}

.slack-member-you {
  background: rgba(255, 255, 255, 0.12);
}

.slack-member-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #2bac76;
  flex-shrink: 0;
  margin-top: 0.55rem;
}

.slack-member-avatar-wrap {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--avatar-color, #ddd);
}

.slack-member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slack-member-avatar {
  font-size: 0.85rem;
  line-height: 1;
}

.slack-member-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.slack-member-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.slack-member-role {
  font-size: 0.62rem;
  opacity: 0.72;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slack-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.slack-channel-bar {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.slack-channel-hash {
  color: #616061;
  font-weight: bold;
}

.slack-channel-name {
  font-weight: bold;
  font-size: 0.95rem;
}

.slack-channel-meta {
  margin-left: auto;
  font-size: 0.72rem;
  color: #616061;
}

.slack-thread {
  flex: 1;
  overflow-y: auto;
  max-height: 16rem;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #fff;
}

.slack-msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.slack-msg-avatar {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--avatar-color, #ddd);
  font-size: 1.1rem;
  overflow: hidden;
}

.slack-msg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slack-msg-face {
  line-height: 1;
}

.slack-msg-body {
  min-width: 0;
  flex: 1;
}

.slack-msg-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.1rem;
}

.slack-msg-name {
  font-weight: bold;
  font-size: 0.85rem;
}

.slack-msg-role {
  font-size: 0.72rem;
  color: #616061;
}

.slack-msg-role::before {
  content: "·";
  margin-right: 0.35rem;
  color: #ababad;
}

.slack-msg-time {
  font-size: 0.68rem;
  color: #616061;
}

.slack-msg-dm-badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1264a3;
  background: #e8f5fd;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}

.slack-msg-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #1d1c1d;
  white-space: pre-wrap;
}

.slack-msg-you .slack-msg-name {
  color: #1264a3;
}

.slack-msg-sent {
  animation: slack-fade-in 0.25s ease;
}

.slack-msg-ok .slack-msg-text {
  border-left: 3px solid #2bac76;
  padding-left: 0.5rem;
}

.slack-msg-bad .slack-msg-text {
  border-left: 3px solid var(--red);
  padding-left: 0.5rem;
}

.slack-footer {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid #ddd;
  background: #f8f8f8;
}

.slack-compose-label {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: bold;
  color: #616061;
}

.slack-compose-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.slack-draft {
  text-align: left;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #868686;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.slack-draft:hover {
  border-color: #1264a3;
  box-shadow: 0 0 0 1px #1264a3;
}

.slack-draft:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.slack-waiting {
  margin: 0;
  font-size: 0.78rem;
  color: #616061;
  letter-spacing: 0.12em;
}

.slack-msg-typing .slack-msg-meta {
  margin-bottom: 0.2rem;
}

.slack-typing-label {
  font-size: 0.68rem;
  color: #616061;
  font-style: italic;
}

.slack-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.65rem;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 1rem;
  min-width: 2.5rem;
}

.slack-typing-bubble span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #868686;
  animation: slack-typing-dot 1.2s infinite ease-in-out;
}

.slack-typing-bubble span:nth-child(2) {
  animation-delay: 0.15s;
}

.slack-typing-bubble span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes slack-typing-dot {
  0%, 60%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.slack-draft-label {
  display: block;
  font-size: 0.62rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #616061;
  margin-bottom: 0.2rem;
}

.slack-draft-text {
  display: block;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #1d1c1d;
}

.slack-continue {
  align-self: flex-end;
}

.slack-msg-new {
  animation: slack-fade-in 0.35s ease;
}

.slack-channel-divider {
  text-align: center;
  font-size: 0.72rem;
  color: #616061;
  padding: 0.35rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin: 0.25rem 0;
}

.quiz-debrief-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--stamp);
  background: var(--paper);
}

.quiz-debrief-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--red);
}

.quiz-debrief-panel h4:not(:first-child) {
  margin-top: 1rem;
}

.quiz-debrief-outcome {
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.quiz-debrief-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-debrief-item {
  line-height: 1.45;
}

.quiz-debrief-you {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.quiz-debrief-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink);
}

.quiz-debrief-good .quiz-debrief-note {
  border-left: 3px solid #2bac76;
  padding-left: 0.5rem;
}

.quiz-debrief-miss .quiz-debrief-note {
  border-left: 3px solid var(--red);
  padding-left: 0.5rem;
}

.quiz-debrief-panel .quiz-results {
  margin-top: 1rem;
  border: none;
  padding: 0.75rem 0 0;
  background: transparent;
}

@keyframes slack-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-results {
  padding: 0.75rem;
  border: 1px solid var(--stamp);
}

.quiz-pass {
  border-color: #2d6a2d;
  background: #eef6ee;
}

.quiz-fail {
  border-color: var(--red);
  background: #fff5f5;
}

.quiz-result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .quiz-role-cards {
    grid-template-columns: 1fr;
  }

  .slack-workspace {
    grid-template-columns: 1fr;
  }

  .slack-sidebar {
    display: none;
  }

  .slack-thread {
    max-height: 14rem;
  }
}

/* Certification */
.cert-progress {
  margin: 0.25rem 0 0.5rem;
}

.cert-bar {
  height: 0.5rem;
  background: var(--paper-dark);
  border: 1px solid var(--stamp);
  margin-bottom: 1rem;
}

.cert-bar-fill {
  height: 100%;
  background: var(--red);
}

.cert-printable {
  margin: 1rem 0;
}

.cert-border {
  padding: 2rem 1.5rem;
  border: 4px double var(--red);
  text-align: center;
  background: #fffef8;
}

.cert-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stamp);
}

.cert-heading {
  margin: 0.5rem 0 1rem;
  font-size: 1.5rem;
  color: var(--red);
}

.cert-body {
  margin: 0 0 1rem;
  line-height: 1.6;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.cert-date,
.cert-foot {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--stamp);
}

.cert-print-btn {
  margin-bottom: 1rem;
}

.cert-details {
  margin-top: 0.5rem;
}

.cert-case-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
}

.cert-done {
  color: #2d6a2d;
}

.values-heading {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  color: var(--red);
}

/* Feedback */
.feedback-form {
  display: grid;
  gap: 0.35rem;
  max-width: 36rem;
}

.feedback-form label {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stamp);
}

.feedback-form select,
.feedback-form textarea,
.feedback-form input[type="text"] {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--stamp);
  background: var(--paper);
}

.feedback-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.feedback-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--stamp);
}

@media print {
  body * {
    visibility: hidden;
  }

  body.print-cert-active .cert-print-root,
  body.print-cert-active .cert-print-root * {
    visibility: visible;
  }

  body.print-cert-active .cert-print-root {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}
