/* Copyright (C) Rein Ytterberg */
.handover-page {
  --handover-ink: #112442;
}
.handover-intro {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 32px;
}
.handover-intro h1 {
  font-size: clamp(2.7rem, 5.4vw, 5rem);
}
.handover-intro em {
  color: var(--blue);
}
.handover-intro p {
  margin-top: 20px;
  font-size: 1.08rem;
}
.order-orbit {
  position: relative;
  min-height: 230px;
  display: grid;
  place-items: center;
  background: #edf2ff;
  border-radius: 50% 45% 40% 45%;
}
.order-tiles {
  position: absolute;
  inset: 18px 30px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 10px;
  transform: rotate(-8deg);
}
.order-tiles i {
  background: #abc3ff;
  border: 1px solid #fff;
  border-radius: 4px;
}
.order-tiles i:nth-child(-n + 2) {
  background: #ed776a;
}
.order-tiles i:nth-child(n + 3):nth-child(-n + 5) {
  background: #f4c951;
}
.orbit-number {
  z-index: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
  border-radius: 24px;
  background: #fff;
  padding: 12px 30px;
  box-shadow: 0 6px 30px #16397622;
}
.orbit-number strong {
  font-size: 5rem;
  line-height: 1;
  color: var(--blue);
}
.ready-person {
  position: absolute;
  bottom: 0;
  background: #163e30;
  color: #fff;
  padding: 9px 16px;
  border-radius: 20px;
  z-index: 2;
}
.story-navigation {
  display: flex;
  gap: 8px;
  background: white;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 2px solid #173056;
}
.story-navigation button {
  flex: 1;
  padding: 14px 12px;
  border: 0;
  background: #edf2ff;
  color: #163056;
  font: inherit;
  font-weight: 700;
  border-radius: 6px;
}
.story-navigation button[aria-pressed='true'] {
  color: #fff;
  background: #164bdf;
}
.story-navigation button span {
  margin-right: 10px;
  opacity: 0.75;
}
.story-meta {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  font-size: 0.875rem;
  color: #42546d;
}
.handover-stack {
  display: grid;
}
.handover-panel {
  grid-area: 1 / 1;
  min-width: 0;
}
.handover-panel[aria-hidden='true'] {
  visibility: hidden;
  pointer-events: none;
}
.stage-heading {
  margin: 18px 0 24px;
}
.stage-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}
.stage-heading p {
  max-width: 820px;
  margin-top: 10px;
}
.setup-layout,
.coverage-layout,
.takeover-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.guide-window,
.billboard-window {
  border: 1px solid #acbcd4;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.window-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #1c2636;
  color: #fff;
  padding: 14px 20px;
  font-size: 0.9375rem;
}
.guide-content {
  padding: 24px;
}
.person-line {
  display: flex;
  align-items: center;
  gap: 14px;
}
.person-line > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.person-line > div > span {
  font-size: 0.875rem;
}
.person {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: white;
  background: #174edf;
  font-weight: 700;
}
.person.alternate {
  background: #70438e;
}
.guide-content h3,
.handover-tools h3 {
  margin: 22px 0 14px;
  font-size: 2rem;
  line-height: 1.12;
}
.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.action-primary {
  padding: 12px 18px;
  background: #164bdf;
  color: #fff;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-weight: 700;
}
.action-primary:disabled {
  background: #d6dce5;
  color: #48586c;
  cursor: not-allowed;
}
.action-text {
  padding: 10px;
  background: transparent;
  border: 0;
  text-decoration: underline;
  color: #163e91;
  font: inherit;
}
.setup-result {
  padding: 28px;
  background: #f1f5ff;
  border-radius: 12px;
}
.result-heading {
  display: block;
  margin-bottom: 18px;
  font-size: 1.3rem;
  font-weight: 700;
}
.billboard-reminder {
  background: #ffe8a4;
  border-left: 6px solid #b67600;
  padding: 20px;
}
.billboard-reminder p {
  margin: 8px 0 16px;
}
.billboard-reminder button {
  font: inherit;
  font-weight: 700;
  border: 0;
  padding: 0;
  color: #382900;
  background: none;
  text-decoration: underline;
}
.billboard-reminder.ready {
  background: #d5efdf;
  border-color: #217347;
}
.login-cycle {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  border-top: 2px dashed #9facc6;
  margin: 30px 0 18px;
  padding-top: 12px;
  font-size: 0.875rem;
}
.role-pass {
  background: #122747;
  color: #fff;
  padding: 28px;
  border-radius: 12px;
}
.pass-label {
  font-size: 0.875rem;
  color: #afc6ff;
}
.role-pass h3 {
  font-size: 2rem;
  margin: 12px 0 18px;
}
.access-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.access-tags span {
  padding: 6px 10px;
  background: #2c456d;
  border-radius: 20px;
}
.access-exclusion {
  margin: 12px 0 18px;
  font-size: 0.875rem;
  color: #c6d5ee;
}
.role-rule {
  border-top: 1px solid #567094;
  padding: 16px 0;
}
.role-rule p {
  margin-top: 6px;
}
.role-pass a {
  color: #c5d6ff;
  text-decoration: underline;
}
.candidate-area h3 {
  font-size: 1.45rem;
  margin-bottom: 16px;
}
.candidates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.candidates button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #f1f5ff;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 16px 10px;
  font: inherit;
}
.candidates button[aria-pressed='true'] {
  border-color: #164bdf;
}
.candidates button > span:last-child {
  font-size: 0.875rem;
}
.coverage-result {
  min-height: 155px;
  margin: 18px 0;
}
.coverage-result h4 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.coverage-result ul {
  padding-left: 20px;
}
.coverage-result li {
  padding: 4px 0;
}
.coverage-result.good h4 {
  color: #17623b;
}
.coverage-result.gap h4 {
  color: #ac3024;
}
.role-confirmation {
  margin-top: 12px;
  min-height: 48px;
  font-size: 0.9375rem;
}
.billboard-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  text-align: left;
  padding: 17px 20px;
  border: 0;
  border-bottom: 2px solid white;
  color: #101c30;
  font: inherit;
}
.billboard-row b {
  display: flex;
  align-items: center;
  gap: 10px;
}
.billboard-row b span {
  font-size: 1.6rem;
}
.billboard-row small {
  font-size: 0.875rem;
}
.severe {
  background: #ffb8b1;
}
.caution {
  background: #ffe39a;
}
.information {
  background: #c1dcff;
}
.healthy {
  background: #c4e9d2;
}
.handover-tools {
  padding: 24px;
  background: #f1f5ff;
  border-radius: 10px;
}
.tool-buttons {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.tool-buttons button {
  background: white;
  border: 1px solid #9db4d8;
  color: #123e99;
  padding: 12px;
  text-align: left;
  font: inherit;
  border-radius: 5px;
}
.tool-hint {
  font-size: 0.9375rem;
}
.handover-close {
  padding-top: 55px;
  padding-bottom: 55px;
  text-align: center;
}
.handover-close h2 {
  color: var(--blue);
  font-size: clamp(2rem, 4vw, 3.4rem);
}
.handover-close p {
  margin: 18px auto 22px;
}
.handover-page button {
  cursor: pointer;
}
.handover-page button:focus-visible,
.handover-page a:focus-visible {
  outline: 3px solid #ea8900;
  outline-offset: 3px;
}
.handover-page dialog {
  width: min(900px, calc(100% - 28px));
  max-height: 90dvh;
  border: 0;
  border-radius: 12px;
  padding: 30px;
  margin: auto;
  color: #112442;
  box-shadow: 0 16px 70px #0005;
}
.handover-page dialog::backdrop {
  background: #0b1a34b8;
}
.handover-page dialog h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  padding-right: 34px;
  margin-bottom: 18px;
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: #edf2ff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.5rem;
}
.account-fields {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}
.account-fields label {
  display: grid;
  gap: 6px;
}
.account-fields input {
  width: 100%;
  padding: 11px;
  border: 1px solid #aebed5;
  border-radius: 4px;
  font: inherit;
  background: #f6f8fc;
}
.local-note {
  font-size: 0.875rem;
  margin-top: 12px;
}
.order-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 14px;
  padding-right: 35px;
  font-size: 0.875rem;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.order-history {
  padding: 0 0 0 22px;
  border-left: 2px solid #b8c9e4;
  list-style: none;
}
.order-history li {
  padding: 0 0 20px;
  position: relative;
}
.order-history li::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #164bdf;
  position: absolute;
  left: -28px;
  top: 6px;
}
.order-history b,
.order-history span {
  display: block;
}
.order-history span {
  margin-top: 5px;
  font-size: 0.9375rem;
}
.order-help {
  padding: 20px;
  background: #edf3ff;
  border-radius: 8px;
}
.pophelp-trigger {
  position: relative;
  display: inline-block;
}
.pophelp-trigger button {
  border: 0;
  border-bottom: 1px dashed #164bdf;
  background: transparent;
  font: inherit;
  color: #1445b1;
  padding: 8px 0;
}
.pophelp-bubble {
  display: none;
  position: absolute;
  z-index: 2;
  left: 0;
  top: 100%;
  width: min(280px, 65vw);
  padding: 14px;
  color: white;
  background: #122747;
  border-radius: 8px;
  box-shadow: 0 6px 20px #0003;
  font-size: 0.9375rem;
}
.pophelp-trigger:hover .pophelp-bubble,
.pophelp-trigger:focus-within .pophelp-bubble,
.pophelp-trigger.is-open .pophelp-bubble {
  display: block;
}
.question-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.question-buttons button {
  padding: 8px 10px;
  background: white;
  border: 1px solid #8eabd9;
  border-radius: 15px;
  color: #143c8e;
  font: inherit;
  font-size: 0.9375rem;
}
.ai-answer {
  margin-top: 16px;
  min-height: 125px;
}
.ai-answer b {
  display: block;
  margin-bottom: 8px;
}
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.agreement-warning {
  padding: 18px;
  margin-top: 18px;
  background: #ffe2c4;
  border-left: 5px solid #bd5916;
}
.agreement-warning h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.agreement-warning p + p {
  margin-top: 10px;
}
.learning-steps {
  padding-left: 25px;
}
.learning-steps li {
  padding: 10px 0;
}
.glossary-list dt {
  font-weight: 700;
  margin-top: 18px;
}
.glossary-list dd {
  margin: 5px 0 0;
}
@media (max-width: 760px) {
  .handover-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .order-orbit {
    display: none;
  }
  .setup-layout,
  .coverage-layout,
  .takeover-layout,
  .order-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .story-navigation {
    gap: 5px;
  }
  .story-navigation button {
    padding: 12px 6px;
    font-size: 0.875rem;
  }
  .story-navigation button span {
    display: block;
    margin: 0 0 4px;
  }
  .handover-page dialog {
    padding: 24px 18px;
  }
  .guide-content,
  .setup-result,
  .role-pass,
  .handover-tools {
    padding: 20px;
  }
}
