:root {
  --green: #88c53f;
  --blue: #93c6ea;
  --ink: #17211a;
  --muted: #667068;
  --paper: #f6f7f3;
  --white: #fff;
  --line: #dfe5dc;
  --soft-green: #edf6e3;
  --soft-blue: #edf6fc;
  --warn: #f1a33b;
  --danger: #d95555;
  --purple: #896bb3;
  --shadow: 0 18px 50px rgba(23,33,26,.10);
  --radius: 18px;
  --radius-sm: 11px;
  font-family: Overpass,Catamaran,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}
body {
  font-size: 16px;
  line-height: 1.5;
}
button, input, textarea {
  font: inherit;
}
button {
  color: inherit;
}
.muted {
  color: var(--muted);
}
code, textarea.code {
  font-family: "Overpass Mono",ui-monospace,SFMono-Regular,Consolas,monospace;
}
.topbar {
  height: 64px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(246,247,243,.94);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand.large {
  font-size: 22px;
  align-items: flex-end;
}
.talnet-logo-box {
  width: 104px;
  height: 42px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
  overflow: hidden;
}
.talnet-logo-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand.large .talnet-logo-box {
  width: 142px;
  height: 66px;
  border-radius: 14px;
  padding: 7px 10px;
}
.brand-product {
  white-space: nowrap;
}
.brand.large .brand-product {
  padding-bottom: 7px;
}
.brand-mark {
  display: none;
}
.session-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}
.dot {
  opacity: .55;
}
.icon-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 800;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(390px,42%) 1fr;
  min-height: calc(100vh - 64px);
}
.flow-panel {
  border-right: 1px solid var(--line);
  padding: 20px;
  overflow: auto;
}
.preview-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
}
.loop-card, .stage-card, .code-card, .console-card, .admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(23,33,26,.02);
}
.loop-card {
  padding: 16px 16px 12px;
}
.loop-linear {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 4px;
  align-items: start;
}
.loop-step {
  text-align: center;
  position: relative;
  font-size: 11px;
  color: #9aa39b;
  font-weight: 700;
}
.loop-step:not(:last-child):after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--line);
  top: 15px;
  left: 58%;
  right: -42%;
}
.loop-step .bubble {
  width: 31px;
  height: 31px;
  margin: 0 auto 6px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--white);
  position: relative;
  z-index: 1;
  font-size: 13px;
}
.loop-step.done {
  color: var(--ink);
}
.loop-step.done .bubble {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.loop-step.active {
  color: var(--ink);
}
.loop-step.active .bubble {
  border-color: var(--blue);
  box-shadow: 0 0 0 5px rgba(147,198,234,.22);
}
.loop-step.done:not(:last-child):after {
  background: var(--green);
}

/* Iterační smyčka: po V1 už není flow lineární. */
.iteration-cycle {
  display: block;
}
.cycle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.cycle-heading span {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}
.cycle-heading strong {
  font-size: 13px;
}
.cycle-board {
  display: grid;
  grid-template-columns: minmax(105px,1fr) 30px minmax(105px,1fr) 30px minmax(105px,1fr);
  grid-template-rows: 72px 34px 72px 34px;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 3px 2px 0;
}
.cycle-node {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbf8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 7px;
  position: relative;
  z-index: 2;
  transition: .15s border,.15s box-shadow,.15s background;
}
.cycle-node b {
  font-size: 12px;
  line-height: 1.15;
}
.cycle-node span {
  font-size: 10px;
  line-height: 1.25;
  color: var(--muted);
  margin-top: 4px;
}
.cycle-node.active {
  border-color: var(--green);
  background: var(--soft-green);
  box-shadow: 0 0 0 4px rgba(136,197,63,.13);
}
.cycle-arrow {
  font-size: 20px;
  font-weight: 900;
  color: #98a299;
  text-align: center;
  line-height: 1;
}
.cycle-test {
  grid-column: 1;
  grid-row: 1;
}
.cycle-top-a {
  grid-column: 2;
  grid-row: 1;
}
.cycle-feedback {
  grid-column: 3;
  grid-row: 1;
}
.cycle-top-b {
  grid-column: 4;
  grid-row: 1;
}
.cycle-ai {
  grid-column: 5;
  grid-row: 1;
}
.cycle-down {
  grid-column: 5;
  grid-row: 2;
}
.cycle-run {
  grid-column: 1;
  grid-row: 3;
}
.cycle-bottom-a {
  grid-column: 2;
  grid-row: 3;
}
.cycle-code {
  grid-column: 3;
  grid-row: 3;
}
.cycle-bottom-b {
  grid-column: 4;
  grid-row: 3;
}
.cycle-new {
  grid-column: 5;
  grid-row: 3;
}
.cycle-return {
  grid-column: 1/2;
  grid-row: 2/5;
  align-self: stretch;
  justify-self: start;
  width: 54px;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.cycle-return-up {
  position: absolute;
  left: 8px;
  top: -1px;
  color: var(--green);
  font-size: 23px;
  font-weight: 900;
}
.cycle-return-line {
  position: absolute;
  left: 17px;
  top: 23px;
  bottom: 12px;
  width: 2px;
  background: var(--green);
  border-radius: 2px;
}
.cycle-return:after {
  content: "";
  position: absolute;
  left: 17px;
  bottom: 11px;
  width: 38px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}
.cycle-return small {
  position: absolute;
  left: 25px;
  bottom: -3px;
  width: 95px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.cycle-finished {
  opacity: .58;
}
.cycle-finished .cycle-node {
  box-shadow: none;
}
.cycle-finished .cycle-return {
  opacity: .35;
}
.stage-card {
  padding: 22px;
  margin-top: 14px;
  min-height: 260px;
}
.stage-card h1, .stage-card h2 {
  margin: 0 0 8px;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.stage-card h1 {
  font-size: 30px;
}
.stage-card h2 {
  font-size: 24px;
}
.stage-card p {
  margin: 0 0 16px;
}
.stage-card textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 14px;
  background: #fbfcf9;
  outline: none;
}
.stage-card textarea:focus, .big-input:focus, #codeInput:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(147,198,234,.2);
}
.stage-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.choice-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin: 14px 0;
}
.choice {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  font-weight: 700;
}
.choice.selected {
  border-color: var(--green);
  background: var(--soft-green);
}
.button {
  border: 1px solid transparent;
  background: var(--white);
  border-radius: 999px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 800;
  transition: .15s transform,.15s background,.15s border;
}
.button:hover {
  transform: translateY(-1px);
}
.button:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}
.button-primary {
  background: var(--ink);
  color: white;
}
.button-primary:hover {
  background: #28372b;
}
.button-ghost {
  border-color: var(--line);
  background: transparent;
}
.button-small {
  padding: 7px 11px;
  font-size: 13px;
}
.button-large {
  padding: 13px 20px;
  font-size: 16px;
}
.button-accent {
  background: var(--green);
  color: #162112;
}
.button-blue {
  background: var(--soft-blue);
  border-color: #cbe2f2;
}
.button-danger {
  background: var(--danger);
  color: white;
}
.button-danger:hover {
  background: #bf4343;
}
.topbar-reset {
  font-weight: 700;
}
.code-card {
  margin-top: 14px;
  overflow: hidden;
}
.disclosure {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
}
.disclosure #codeMeta {
  text-align: right;
  color: var(--muted);
  font-weight: 500;
}
.chev {
  transition: .2s;
}
.disclosure[aria-expanded=true] .chev {
  transform: rotate(180deg);
}
.code-pane {
  border-top: 1px solid var(--line);
  padding: 12px;
}
.code-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.code-actions.end {
  justify-content: flex-end;
  margin: 10px 0 0;
}
.code-actions label {
  cursor: pointer;
}
#codeInput {
  width: 100%;
  height: 220px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  background: #101612;
  color: #dfe8df;
  font: 12px/1.55 "Overpass Mono",ui-monospace,monospace;
  outline: none;
  tab-size: 2;
}
.validation-box {
  padding: 9px 10px;
  border-radius: 9px;
  background: #f2f4f0;
  margin-top: 8px;
  font-size: 12px;
}
.validation-box.ok {
  background: var(--soft-green);
  color: #365918;
}
.validation-box.warn {
  background: #fff5df;
  color: #755015;
}
.validation-box.bad {
  background: #fdeaea;
  color: #802c2c;
}
.versions-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 13px 2px;
}
.version-pill {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.version-pill.current {
  border-color: var(--green);
  background: var(--soft-green);
}
.preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}
.preview-toolbar strong {
  font-size: 18px;
}
.preview-actions {
  display: flex;
  gap: 7px;
}
.preview-wrap {
  background: #e9ede7;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  min-height: 520px;
  flex: 1;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.preview-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: white;
}
.empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--muted);
  gap: 16px;
}
.empty-orbit {
  width: 52px;
  height: 52px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  position: relative;
}
.empty-orbit:after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  position: absolute;
  right: -5px;
  top: 8px;
}
.console-card {
  margin-top: 12px;
  overflow: hidden;
}
.console-card summary {
  cursor: pointer;
  padding: 11px 14px;
  font-weight: 800;
  font-size: 13px;
}
.console-card summary span {
  background: var(--paper);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 4px;
}
.console-output {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  max-height: 170px;
  overflow: auto;
  background: #111713;
  color: #dfe9e0;
  font: 12px/1.5 "Overpass Mono",monospace;
}
.console-line {
  padding: 2px 0;
  white-space: pre-wrap;
}
.console-line.error {
  color: #ff9a9a;
}
.console-line.warn {
  color: #ffd38a;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17,24,19,.58);
  backdrop-filter: blur(7px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal {
  position: relative;
  width: min(620px,100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--white);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.welcome-modal {
  width: min(540px,100%);
}
.welcome-modal h1, .login-modal h1 {
  font-size: 42px;
  letter-spacing: -.05em;
  line-height: 1.05;
  margin: 28px 0 12px;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 46ch;
}
.welcome-modal form, .login-modal form {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.big-input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 17px;
  outline: none;
  background: #fafbf8;
}
.resume-box {
  margin-top: 16px;
  padding: 15px;
  background: var(--soft-blue);
  border-radius: 14px;
}
.modal-close {
  position: absolute;
  right: 16px;
  top: 13px;
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--paper);
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
}
.prompt-modal {
  width: min(800px,100%);
}
.prompt-modal h2, .help-modal h2 {
  font-size: 28px;
  letter-spacing: -.03em;
  margin: 0 0 16px;
}
.prompt-modal textarea, .code-modal textarea {
  width: 100%;
  height: 430px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  background: #f7f9f5;
  resize: none;
  font: 12px/1.55 "Overpass Mono",monospace;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.reset-modal h2 {
  font-size: 28px;
  letter-spacing: -.03em;
  margin: 0 0 10px;
}
.reset-confirm-name {
  display: inline-flex;
  margin-top: 5px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--paper);
  font-weight: 800;
  font-size: 13px;
}
.help-steps {
  padding-left: 24px;
}
.help-steps li {
  padding: 5px 0;
}
.error-text {
  color: var(--danger);
  min-height: 1.5em;
}

/* admin */
.admin-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.metric b {
  font-size: 31px;
  letter-spacing: -.04em;
  display: block;
}
.metric span {
  color: var(--muted);
  font-size: 13px;
}
.admin-card {
  padding: 18px;
  margin-bottom: 14px;
}
.admin-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}
.admin-card h2 {
  margin: 0;
  letter-spacing: -.025em;
}
.legend {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aaa;
}
.status-dot.active {
  background: var(--green);
}
.status-dot.idle {
  background: #bbc2bb;
}
.stage-distribution {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 8px;
}
.stage-bucket {
  border-radius: 14px;
  padding: 13px;
  background: var(--paper);
  min-height: 93px;
  position: relative;
  overflow: hidden;
}
.stage-bucket strong {
  font-size: 27px;
  display: block;
}
.stage-bucket span {
  font-size: 12px;
  color: var(--muted);
}
.stage-bucket:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  width: var(--pct,0%);
  background: var(--green);
}
.students-table {
  display: flex;
  flex-direction: column;
}
.student-row {
  display: grid;
  grid-template-columns: 220px 1fr 180px 100px;
  gap: 16px;
  align-items: center;
  padding: 13px 4px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.student-row:first-child {
  border-top: 0;
}
.student-row:hover {
  background: #fafbf8;
}
.student-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}
.student-progress {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.node {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  background: white;
  flex: none;
}
.node.done {
  background: var(--soft-green);
  border-color: var(--green);
}
.node.current {
  border: 2px solid var(--blue);
  box-shadow: 0 0 0 4px rgba(147,198,234,.16);
}
.edge {
  height: 2px;
  background: var(--line);
  width: 16px;
  flex: none;
}
.edge.done {
  background: var(--green);
}
.student-stage {
  font-size: 13px;
  font-weight: 700;
}
.student-time {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.student-time.warn {
  color: #a66d12;
  font-weight: 800;
}
.detail-modal {
  width: min(850px,100%);
}
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.detail-header h2 {
  font-size: 30px;
  margin: 0;
}
.timeline {
  border-left: 2px solid var(--line);
  padding-left: 18px;
  margin: 15px 0;
}
.timeline-item {
  position: relative;
  padding: 0 0 17px;
}
.timeline-item:before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  position: absolute;
  left: -24px;
  top: 5px;
}
.timeline-item .time {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.timeline-item p {
  margin: 3px 0 0;
}
.version-buttons {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.code-modal {
  width: min(1000px,100%);
}
.code-modal textarea {
  height: 65vh;
  background: #101612;
  color: #dfe8df;
}
@media(max-width:900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .flow-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .preview-wrap, .preview-wrap iframe {
    min-height: 440px;
  }
  .metrics {
    grid-template-columns: repeat(2,1fr);
  }
  .stage-distribution {
    grid-template-columns: repeat(3,1fr);
  }
  .student-row {
    grid-template-columns: 1fr;
  }
  .student-time {
    text-align: left;
  }
  .student-progress {
    overflow-x: auto;
  }
  .welcome-modal form, .login-modal form {
    flex-direction: column;
  }
}
@media(max-width:560px) {
  .topbar {
    padding: 0 10px;
  }
  .workspace, .admin-main {
    padding: 0;
  }
  .flow-panel, .preview-panel {
    padding: 12px;
  }
  .loop-step span {
    display: none;
  }
  .brand-product {
    display: none;
  }
  .talnet-logo-box {
    width: 92px;
    height: 38px;
  }
  .topbar-reset {
    padding: 6px 9px;
  }
  .session-meta {
    gap: 6px;
  }
  .session-meta .dot {
    display: none;
  }
  .cycle-board {
    grid-template-columns: minmax(82px,1fr) 17px minmax(82px,1fr) 17px minmax(82px,1fr);
    gap: 3px;
  }
  .cycle-node {
    padding: 6px 4px;
  }
  .cycle-node b {
    font-size: 10px;
  }
  .cycle-node span {
    font-size: 9px;
  }
  .cycle-arrow {
    font-size: 15px;
  }
  .cycle-return small {
    display: none;
  }
  .stage-card {
    padding: 18px;
  }
  .modal {
    padding: 24px 18px;
  }
  .welcome-modal h1, .login-modal h1 {
    font-size: 34px;
  }
  .choice-row {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .stage-distribution {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- VibeRise T-lab: additions on top of the original Vibe Lab styles ---- */
[hidden] {
  display: none!important;
}
a {
  color: inherit;
}
.button, .auth-tab {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.button:focus-visible,
.choice:focus-visible,
.version-pill:focus-visible,
.icon-button:focus-visible,
.disclosure:focus-visible,
.auth-tab:focus-visible,
.modal-close:focus-visible,
a:focus-visible,
summary:focus-visible,
input[type=radio]:focus-visible,
input[type=checkbox]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
body:not(.is-workspace) .workspace-only {
  display: none!important;
}

/* sign-in */
.auth-tabs {
  display: flex;
  gap: 6px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.auth-tab {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
}
.auth-tab.is-active {
  background: var(--soft-green);
  border-color: var(--green);
  color: var(--ink);
}
.welcome-modal .auth-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.welcome-modal h1 {
  font-size: 38px;
}

/* forms in modals */
.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.field>span small, .field legend small {
  font-weight: 500;
  color: var(--muted);
}
.field input:not([type=radio]):not([type=checkbox]), .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  background: #fbfcf9;
  font: inherit;
  font-weight: 400;
  outline: none;
}
.field textarea {
  min-height: 84px;
  resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(147,198,234,.2);
}
.field legend {
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}
.form-grid {
  display: grid;
  gap: 13px;
  margin-top: 6px;
}
.form-modal {
  width: min(640px,100%);
}
.form-modal h2 {
  font-size: 26px;
  letter-spacing: -.03em;
  margin: 0 0 12px;
  line-height: 1.15;
}
.form-note {
  font-size: 13px;
  margin: 0;
}
.level-choice {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
}
.level-choice legend {
  float: left;
  width: 100%;
}
label.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
label.choice:has(input:checked) {
  border-color: var(--green);
  background: var(--soft-green);
}
.choice.is-locked {
  opacity: .5;
  cursor: not-allowed;
}
fieldset.choice-row {
  border: 0;
  padding: 0;
  margin: 0;
}

/* portfolio */
.portfolio-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px;
}
.level-card {
  padding: 20px 22px;
}
.level-card h2 {
  margin: 0 0 14px;
  letter-spacing: -.03em;
  font-size: 26px;
}
.level-steps {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}
.level-step {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbf8;
}
.level-bubble {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  font-weight: 800;
  font-size: 13px;
  flex: none;
  background: var(--white);
}
.level-text {
  display: grid;
  line-height: 1.25;
}
.level-text small {
  color: var(--muted);
  font-size: 12px;
}
.level-step.is-done .level-bubble {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.level-step.is-current {
  border-color: var(--green);
  background: var(--soft-green);
}
.level-step.is-current .level-bubble {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(147,198,234,.25);
}
.level-step.is-locked {
  color: var(--muted);
}
.level-progress {
  margin: 0;
}
.next-step {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--soft-blue);
  font-size: 14px;
}
.next-step a {
  font-weight: 800;
}
.portfolio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 2px 12px;
  flex-wrap: wrap;
}
.portfolio-head h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.portfolio-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 14px;
}
.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.project-card h3 {
  margin: 2px 0 0;
  font-size: 20px;
  letter-spacing: -.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.project-goal {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.project-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.project-meta span {
  background: var(--paper);
  border-radius: 999px;
  padding: 2px 8px;
}
.project-next, .project-note {
  margin: 0;
  font-size: 13px;
}
.project-note {
  font-size: 12px;
}
.project-card .stage-actions {
  margin-top: auto;
  padding-top: 6px;
}
.empty-portfolio {
  grid-column: 1/-1;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-portfolio p {
  margin: 0;
  max-width: 44ch;
}
.portfolio-more {
  display: flex;
  justify-content: center;
  padding: 16px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: var(--paper);
  white-space: nowrap;
}
.status-approved {
  background: var(--soft-green);
  border-color: var(--green);
  color: #365918;
}
.status-submitted {
  background: var(--soft-blue);
  border-color: #cbe2f2;
  color: #245173;
}
.status-changes {
  background: #fff5df;
  border-color: #f3d79c;
  color: #755015;
}

/* project workspace */
.project-line {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.project-line b {
  color: var(--ink);
}
.stage-card .stage-goal {
  font-size: 14px;
  background: var(--paper);
  border-radius: 11px;
  padding: 9px 11px;
  overflow-wrap: anywhere;
}
.submission-banner {
  border-radius: 13px;
  padding: 11px 13px;
  margin-bottom: 14px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.submission-banner p {
  margin: 8px 0 0;
}
.submission-banner ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.submission-banner .button {
  margin-top: 10px;
}
.submission-banner.is-submitted {
  background: var(--soft-blue);
  border-color: #cbe2f2;
}
.submission-banner.is-approved {
  background: var(--soft-green);
  border-color: #cfe6b4;
}
.submission-banner.is-changes {
  background: #fff5df;
  border-color: #f3d79c;
}
.guide-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 14px;
}
.guide-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.guide-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.025em;
}
.guide-count {
  font-size: 12px;
  font-weight: 800;
  background: var(--paper);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.guide-checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 3px;
}
.check-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 5px 6px;
  border-radius: 9px;
}
.check-item small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.check-mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  border: 1.5px solid var(--line);
  background: #fff;
}
.check-item.is-done .check-mark {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.check-item.is-work {
  background: #fff5df;
}
.check-item.is-work .check-mark {
  border-color: var(--warn);
  color: #755015;
}
.check-item.is-verify {
  background: var(--soft-blue);
}
.check-item.is-verify .check-mark {
  border-color: var(--blue);
}
.check-item.is-later .check-mark {
  border-style: dashed;
}
.guide-main, .guide-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fafbf8;
}
.guide-main {
  border-color: var(--green);
  background: var(--soft-green);
}
.guide-step {
  margin-top: 10px;
}
.guide-main h3, .guide-step h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -.02em;
}
.guide-main p, .guide-step p {
  margin: 0 0 8px;
  font-size: 14px;
}
.guide-main .stage-actions, .guide-step .stage-actions {
  margin-top: 10px;
}
.guide-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #365918;
  margin-bottom: 6px;
}
.guide-test {
  background: rgba(255,255,255,.75);
  border-radius: 9px;
  padding: 7px 9px;
}
.guide-mentor {
  background: #fff5df;
  border-radius: 9px;
  padding: 7px 9px;
  color: #755015;
}
.guide-ready {
  background: var(--soft-green);
  border-radius: 12px;
  padding: 12px 13px;
  margin: 0;
  font-size: 14px;
}
.guide-more {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.guide-more summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}
.evidence-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: grid;
  gap: 7px;
  font-size: 13px;
}
.evidence-list .muted {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.result-chip {
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.result-pass {
  background: var(--soft-green);
  border-color: var(--green);
}
.result-fail {
  background: #fdeaea;
  border-color: #f0b9b9;
}
.guide-ai {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 13px;
}
.guide-ai p {
  margin: 0 0 8px;
}
.ai-details summary {
  cursor: pointer;
  font-weight: 800;
}
.assessment-list {
  padding-left: 18px;
  margin: 8px 0;
  display: grid;
  gap: 6px;
}
.evidence-quote {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #101612;
  color: #dfe8df;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  margin-top: 4px;
}
.guide-submit {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.guide-submit p {
  margin: 0;
  font-size: 12px;
  flex: 1 1 200px;
}
.save-status {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.save-status.is-error {
  color: var(--danger);
  font-weight: 700;
}
.code-note {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 0;
  text-align: right;
}
.validation-box p {
  margin: 0 0 8px;
}
.validation-box .code-actions {
  margin: 0;
}
.versions-empty {
  font-size: 12px;
}
.generation-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft-blue);
  font-size: 14px;
}
.generation-box p {
  margin: 0 0 8px;
}
.submit-checklist p {
  margin: 0 0 12px;
}
.evidence-picks {
  display: grid;
  gap: 6px;
  font-weight: 400;
  font-size: 13px;
}
.evidence-pick {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.hint-result {
  margin-top: 14px;
}
.hint-result p {
  margin: 0 0 10px;
}
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--blue);
  border-top-color: transparent;
  border-radius: 50%;
  animation: viberise-spin 1s linear infinite;
  vertical-align: -1px;
}
@keyframes viberise-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion:reduce) {
  .spinner {
    animation: none;
  }
  .button:hover {
    transform: none;
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 200;
  max-width: calc(100vw - 32px);
  width: max-content;
  font-size: 14px;
}
.session-meta {
  min-width: 0;
}
.meta-name, .meta-level, .meta-version {
  white-space: nowrap;
}
@media(max-width:900px) {
  .level-steps {
    grid-template-columns: 1fr;
  }
}
@media(max-width:720px) {
  .meta-name, .meta-level, .session-meta .dot {
    display: none;
  }
}
@media(max-width:560px) {
  .portfolio-main {
    padding: 12px;
  }
  .portfolio-head h1 {
    font-size: 26px;
  }
  .level-choice {
    grid-template-columns: 1fr;
  }
  .label-long, .meta-version {
    display: none;
  }
  .guide-card {
    padding: 16px;
  }
  .check-item {
    grid-template-columns: 22px 1fr;
  }
  .check-item small {
    grid-column: 2;
    text-align: left;
  }
  .welcome-modal h1 {
    font-size: 30px;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
  .code-actions {
    flex-wrap: wrap;
  }
  .save-status {
    margin-left: 0;
    width: 100%;
  }
}

/* mentor overview */
.login-modal .auth-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.filter-chips, .code-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.code-tabs {
  margin-bottom: 10px;
}
.filter-chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 6px 11px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.filter-chip.is-active {
  background: var(--soft-green);
  border-color: var(--green);
}
.filter-chip span {
  background: var(--paper);
  border-radius: 999px;
  padding: 0 6px;
  margin-left: 3px;
}
.admin-legend {
  margin: -4px 0 6px;
}
.row-name {
  display: grid;
  line-height: 1.25;
  min-width: 0;
}
.row-name small {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.student-stage {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.student-row:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
  border-radius: 12px;
}
.detail-section {
  margin-top: 18px;
}
.plain-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.plain-list .muted {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.inline-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: 6px;
}
.report-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 14px;
}
.report-block p {
  margin: 0 0 6px;
}
.escalation {
  background: #fdeaea;
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 8px;
}
.escalation ul {
  margin: 4px 0 0;
  padding-left: 18px;
}
.review-panel {
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 16px 0;
  background: #fbfdf8;
}
.review-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -.02em;
}
.review-questions {
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.review-checklist {
  display: grid;
  gap: 10px;
}
.review-criterion {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0;
  background: var(--white);
}
.review-criterion legend {
  padding: 0 4px;
}
.review-criterion p {
  margin: 2px 0 8px;
  font-size: 13px;
}
.review-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.review-options .choice {
  padding: 7px 10px;
  font-size: 13px;
}
.review-note {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.criterion-error {
  margin: 4px 0 0;
  font-size: 13px;
  min-height: 0;
}
.review-form .field input {
  margin-bottom: 6px;
}
.admin-tools {
  padding: 0;
}
.admin-tools>details>summary {
  padding: 16px 18px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  list-style: none;
}
.admin-tools>details>summary::-webkit-details-marker {
  display: none;
}
.admin-tools>details>summary .eyebrow {
  margin: 0;
}
.admin-tools>details>summary b {
  font-size: 20px;
  letter-spacing: -.02em;
}
.admin-tools>details>div {
  padding: 0 18px 18px;
}
.cohort-block {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.cohort-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cohort-head h3 {
  margin: 0;
}
.member-list {
  display: grid;
  margin-top: 8px;
}
.member-row {
  display: grid;
  grid-template-columns: minmax(160px,1.2fr) 1fr 120px 2fr;
  gap: 10px;
  align-items: center;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.member-row .inline-actions {
  margin-left: 0;
}
.cohort-create {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.cohort-create .field {
  flex: 1 1 240px;
}
.token-code {
  font: 800 24px/1.2 "Overpass Mono",ui-monospace,monospace;
  letter-spacing: .04em;
  background: var(--paper);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  overflow-wrap: anywhere;
  margin: 0 0 10px;
}
.ops-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}
.admin-preview {
  min-height: 60vh;
}
.admin-preview iframe {
  width: 100%;
  height: 100%;
  min-height: 60vh;
  border: 0;
  background: #fff;
}
@media(max-width:900px) {
  .member-row {
    grid-template-columns: 1fr;
  }
  .ops-grid {
    grid-template-columns: 1fr;
  }
}
.ai-notice {
  font-size: 12px;
}

/* ---- VibeRise T-lab: comfort and consistency (00-materials/2026_10_19-vylepseni.md) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
h1:focus, h2:focus {
  outline: none;
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  justify-self: start;
}
.field-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  margin: 2px 0 0;
}
.field-error:empty {
  display: none;
}
[aria-invalid="true"] {
  border-color: var(--danger) !important;
}
.field-gap {
  display: block;
  margin-top: 12px;
}
.modal.is-nudged {
  animation: viberise-nudge .3s ease;
}
@keyframes viberise-nudge {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

/* top bar: account, notifications, save state */
.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 3px 10px 3px 3px;
  cursor: pointer;
  max-width: 220px;
  min-width: 0;
}
.account-initial {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--soft-green);
  border: 1px solid var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.account-text {
  display: grid;
  line-height: 1.1;
  text-align: left;
  min-width: 0;
}
.account-text b, .account-text small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.account-text small {
  color: var(--muted);
  font-size: 11px;
}
.notif-button {
  position: relative;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.notif-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
.save-indicator {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.save-indicator {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.save-indicator.is-saved .si-icon {
  color: var(--green);
}
.session-meta > * {
  flex: none;
}
.session-meta > .meta-version {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 901px) {
  /* The result stays in view while the learner scrolls through the steps on the left. */
  .preview-panel {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow: auto;
  }
  .preview-wrap {
    min-height: 360px;
  }
  .preview-wrap iframe {
    min-height: 360px;
  }
}
.save-indicator.is-saving {
  color: var(--ink);
}
.save-indicator.is-offline {
  background: #fff5df;
  border-color: #f3d79c;
  color: #755015;
}
.save-indicator.is-error {
  background: #fdeaea;
  border-color: #f0b9b9;
  color: #802c2c;
}
.save-status.is-offline {
  color: #755015;
  font-weight: 700;
}
.save-status.is-conflict {
  color: var(--danger);
  font-weight: 700;
}

/* sign-in */
.password-row {
  display: flex;
  gap: 6px;
}
.password-row input {
  flex: 1;
  min-width: 0;
}
.field > label {
  font-weight: 700;
}
.field > label small {
  font-weight: 500;
  color: var(--muted);
}
.forgot-help {
  background: var(--soft-blue);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.forgot-help p {
  margin: 0 0 6px;
}
.invite-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft-green);
  border: 1px solid #cfe6b4;
  font-size: 14px;
}
.invite-box p {
  margin: 0 0 8px;
}
.invite-box ul {
  margin: 0 0 8px;
  padding-left: 18px;
}
.invite-box.is-error {
  background: #fdeaea;
  border-color: #f0b9b9;
}

/* portfolio */
.resume-card {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--soft-blue);
  border: 1px solid #cbe2f2;
}
.resume-card .eyebrow {
  margin-bottom: 2px;
}
.portfolio-filters {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 0 2px 8px;
}
.portfolio-filters .field {
  font-size: 12px;
}
.portfolio-filters .field input, .portfolio-filters .field select {
  padding: 8px 10px;
  background: var(--white);
}
.portfolio-count {
  margin: 0 2px 10px;
  font-size: 13px;
  min-height: 1.5em;
}
.project-card h3 a {
  text-decoration: none;
}
.project-card h3 a:hover {
  text-decoration: underline;
}
.project-description {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.project-meta .meta-draft {
  background: #fff5df;
  color: #755015;
}
.project-help {
  color: #245173;
}
.project-archived {
  font-size: 12px;
  align-self: center;
}
.status-approved-older {
  background: var(--soft-green);
  border-color: #cfe6b4;
  color: #365918;
  border-style: dashed;
}
.load-error {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
  border-radius: var(--radius);
  background: #fdeaea;
  border: 1px solid #f0b9b9;
}
.load-error p, .load-error h2 {
  margin: 0;
}
.level-note {
  color: #755015;
}
.goal-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 8px 0 0;
  font-size: 12px;
}
.chip-button {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.chip-button:hover {
  border-color: var(--green);
}

/* project workspace */
.mobile-tabs {
  display: none;
}
.project-head {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.project-head-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.project-head-title {
  min-width: 0;
}
.project-head h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.project-head .eyebrow {
  margin-bottom: 4px;
}
.project-menu {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.project-head .project-description {
  margin-top: 6px;
  color: var(--muted);
}
.work-state {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #245173;
  background: var(--soft-blue);
  border-radius: 10px;
  padding: 6px 10px;
}
.loop-card.is-readonly {
  opacity: .6;
}
.draft-origin {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.banner-label {
  font-weight: 800;
  margin: 8px 0 0;
}
.guide-help {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 13px;
}
.guide-help p {
  margin: 0 0 8px;
}
.guide-help.is-requested {
  background: var(--soft-blue);
  border-radius: 12px;
  padding: 10px 12px;
  border-top: 0;
}
.check-item.is-stale small {
  color: #755015;
}
.view-banner {
  margin-bottom: 10px;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff5df;
  border: 1px solid #f3d79c;
  font-size: 14px;
}
.view-banner p {
  margin: 0;
}
.view-banner .stage-actions {
  margin-top: 8px;
}

/* history */
.history-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 14px;
}
.history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.history-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.025em;
}
.stage-switcher {
  font-size: 12px;
  min-width: 200px;
}
.stage-switcher select {
  padding: 7px 10px;
}
.history-note {
  background: #fff5df;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 13px;
  margin: 0 0 10px;
}
.version-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: grid;
  gap: 6px;
}
.version-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbf8;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}
.version-row:hover {
  border-color: var(--blue);
}
.version-row.is-active {
  border-color: var(--green);
}
.version-row.is-viewing {
  background: #fff5df;
  border-color: #f3d79c;
}
.version-no {
  font-weight: 900;
  font-size: 15px;
}
.version-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.version-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.version-note {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.chip-active {
  border-color: var(--green);
  background: var(--soft-green);
}
.chip-approved {
  border-color: var(--green);
  background: var(--soft-green);
  color: #365918;
}
.chip-submitted {
  border-color: #cbe2f2;
  background: var(--soft-blue);
  color: #245173;
}
.chip-changes {
  border-color: #f3d79c;
  background: #fff5df;
  color: #755015;
}
.chip-viewing {
  border-color: #f3d79c;
  background: #fff5df;
}
.old-draft {
  border: 1px dashed #f3d79c;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 13px;
}
.old-draft p {
  margin: 0;
}
.stage-timeline .timeline {
  list-style: none;
  margin: 10px 0 0;
  font-size: 13px;
}
.timeline-item p {
  overflow-wrap: anywhere;
}
.timeline-review:before {
  background: var(--green);
}
.timeline-submission:before {
  background: var(--purple);
}
.timeline-help:before {
  background: var(--warn);
}

/* dialogs: restore points, comparison, account, notifications */
.snapshot-list, .notification-list, .device-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}
.snapshot-item, .device-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.snapshot-item .stage-actions {
  margin-top: 0;
}
.compare-modal {
  width: min(1200px, 100%);
}
.compare-modal h2 {
  font-size: 24px;
  margin: 0 0 6px;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.compare-grid figure {
  margin: 0;
}
.compare-grid figcaption {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
}
.compare-preview, .compare-preview iframe {
  min-height: 46vh;
}
.compare-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.compare-diff {
  margin-top: 12px;
}
.compare-diff summary {
  cursor: pointer;
  font-weight: 800;
}
.diff-pre {
  max-height: 40vh;
  overflow: auto;
  background: #101612;
  color: #dfe8df;
  border-radius: 12px;
  padding: 10px 12px;
  font: 12px/1.5 "Overpass Mono", ui-monospace, monospace;
  margin: 8px 0 0;
}
.diff-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.diff-add {
  background: rgba(136, 197, 63, .22);
}
.diff-del {
  background: rgba(217, 85, 85, .28);
}
.diff-skip {
  color: #98a299;
  font-style: italic;
}
.account-modal {
  width: min(680px, 100%);
}
.account-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 14px;
}
.account-section h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.account-section p {
  margin: 0 0 8px;
}
.username {
  font-family: "Overpass Mono", ui-monospace, monospace;
}
.code-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.code-form .field {
  flex: 1 1 220px;
}
.notification {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  text-decoration: none;
  font-size: 14px;
}
.notification.is-unread {
  border-color: var(--green);
  background: var(--soft-green);
}
.help-privacy {
  padding-left: 20px;
  font-size: 14px;
}
.help-modal h3 {
  margin: 16px 0 6px;
}
@media (max-width: 1100px) {
  .portfolio-filters {
    grid-template-columns: 1fr 1fr;
  }
  .filter-search {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .workspace {
    align-content: start;
  }
  .mobile-tabs {
    align-items: center;
    display: flex;
    gap: 6px;
    position: sticky;
    top: 64px;
    z-index: 25;
    padding: 8px 12px;
    background: rgba(246, 247, 243, .96);
    border-bottom: 1px solid var(--line);
  }
  .mobile-tab {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 999px;
    padding: 8px 6px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
  }
  .mobile-tab[aria-pressed="true"] {
    background: var(--soft-green);
    border-color: var(--green);
  }
  .workspace[data-pane="work"] .preview-panel,
  .workspace[data-pane="work"] .history-card,
  .workspace[data-pane="history"] .preview-panel,
  .workspace[data-pane="preview"] .flow-panel {
    display: none;
  }
  .workspace[data-pane="history"] .flow-panel > :not(.history-card) {
    display: none;
  }
  .workspace[data-pane="history"] .flow-panel {
    border-bottom: 0;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .compare-preview, .compare-preview iframe {
    min-height: 34vh;
  }
}
@media (max-width: 720px) {
  .account-text {
    display: none;
  }
  .account-button {
    padding: 3px;
  }
  .save-indicator .si-text {
    display: none;
  }
  .save-indicator {
    padding: 4px 9px;
  }
}
@media (max-width: 560px) {
  .portfolio-filters {
    grid-template-columns: 1fr;
  }
  .mobile-tabs {
    top: 64px;
  }
  .project-head {
    padding: 12px;
  }
  .project-menu .button {
    padding: 6px 9px;
  }
  .session-meta {
    gap: 5px;
  }
  #logoutButton {
    padding: 6px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .modal.is-nudged {
    animation: none;
  }
}

/* mentor overview additions */
.review-queue .queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.queue-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.queue-item.is-late {
  border-color: #f3d79c;
  background: #fff5df;
}
.queue-wait {
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.admin-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 10px;
}
.admin-filters .field {
  flex: 1 1 260px;
  font-size: 12px;
}
.admin-filters .field:last-child:not(:first-child) {
  flex: 0 1 220px;
}
.admin-filters input, .admin-filters select {
  padding: 8px 10px;
}
.status-help {
  background: var(--soft-blue);
  border-color: #cbe2f2;
  color: #245173;
}
.help-request {
  background: var(--soft-blue);
  border: 1px solid #cbe2f2;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.help-request p {
  margin: 0 0 8px;
}
.ops-warnings {
  background: #fff5df;
  border: 1px solid #f3d79c;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.ops-warnings ul {
  margin: 0;
  padding-left: 18px;
}
.member-search {
  margin: 4px 0 6px;
  max-width: 420px;
}
.admin-legend #tableCount {
  margin-left: auto;
}
@media (max-width: 720px) {
  .queue-item {
    grid-template-columns: 1fr;
  }
}
.token-list {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.token-list h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.token-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.guide-later {
  margin-top: 10px;
}

/* registration code and group invitations */
.new-account-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 14px;
}
.code-entry {
  background: var(--soft-green);
  border: 1px solid #cfe6b4;
  border-radius: 14px;
  padding: 12px 14px;
}
.code-label, .account-fields legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
}
.step-no {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  flex: none;
}
.code-row {
  display: flex;
  gap: 8px;
}
.field input.code-input:not([type=radio]):not([type=checkbox]), .code-input {
  flex: 1;
  min-width: 0;
  font: 800 24px/1.2 "Overpass Mono", ui-monospace, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 10px 12px;
  background: var(--white);
}
.code-input::placeholder {
  color: #b9c0b8;
  letter-spacing: .12em;
}
.code-status {
  font-size: 14px;
  min-height: 1.4em;
  overflow-wrap: anywhere;
}
.code-status:empty {
  display: none;
}
.code-status.is-ok {
  color: #365918;
}
.code-status.is-error {
  color: var(--danger);
  font-weight: 700;
}
.code-status.is-pending {
  color: var(--muted);
}
.account-fields {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.account-fields legend {
  padding: 0 4px;
}
.token-code {
  font-size: 34px;
  letter-spacing: .1em;
}
.token-steps {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 15px;
}
.group-invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.token-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}
.token-row.is-group {
  border-color: #cfe6b4;
  background: #fbfdf8;
}
.token-main {
  min-width: 0;
  flex: 1 1 320px;
}
.token-count {
  font-weight: 800;
  margin-left: 4px;
}
.token-count.is-ended {
  color: var(--muted);
}
.token-registered summary, .token-ended summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.token-registered p {
  margin: 4px 0 0;
  font-size: 13px;
}
.present-backdrop {
  background: var(--paper);
  backdrop-filter: none;
  padding: 0;
  place-items: stretch;
  overflow: auto;
}
.present {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2vh;
  padding: 4vh 4vw;
  text-align: center;
  background: var(--paper);
}
.present-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: clamp(18px, 2.4vw, 32px);
}
.present-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 72px);
  letter-spacing: -.04em;
}
.present-steps {
  margin: 0;
  padding-left: 1.2em;
  text-align: left;
  font-size: clamp(20px, 2.8vw, 40px);
  line-height: 1.5;
}
.present-code {
  margin: 1vh 0;
  font: 900 clamp(56px, 13vw, 220px)/1 "Overpass Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  background: var(--white);
  border: 3px solid var(--green);
  border-radius: 28px;
  padding: 2vh 4vw;
  overflow-wrap: anywhere;
}
.present-meta {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 32px);
  font-weight: 700;
  color: #365918;
}
.present-backdrop.is-ended .present-code {
  opacity: .35;
  text-decoration: line-through;
}
.present-backdrop.is-ended .present-meta {
  color: var(--danger);
}
.present-actions {
  display: flex;
  gap: 10px;
}
@media (max-width: 560px) {
  .group-invite-grid {
    grid-template-columns: 1fr;
  }
  .field input.code-input:not([type=radio]):not([type=checkbox]), .code-input {
    font-size: 20px;
  }
}
.code-entry .form-note {
  font-weight: 400;
}
