.up-body {
  --up-blue: #123f64;
  --up-teal: #0d7c79;
  --up-sky: #8ee7df;
  --up-amber: #f6bd4b;
}

.up-body [hidden] { display: none !important; }

.up-hero {
  background:
    radial-gradient(circle at 84% 18%, rgba(246, 189, 75, .28), transparent 17rem),
    linear-gradient(145deg, #0d2747, #123f64 54%, #0d7c79);
}

.up-hero::after { border-color: rgba(142, 231, 223, .12); }
.up-hero h1 span { color: #a7f3eb; }
.up-stats .academy-stat:nth-child(1) strong,
.up-stats .academy-stat:nth-child(2) strong { color: var(--up-teal); }

.up-plan-grid,
.up-reference-grid { grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); }

.up-compass {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9rem;
  align-content: start;
}

.up-compass > span,
.up-ai-guide > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(145deg, var(--up-blue), var(--up-teal));
  font-size: 1.25rem;
  font-weight: 950;
}

.up-compass h3 { margin: .2rem 0 .45rem; }
.up-compass p { margin: 0; color: var(--academy-muted); line-height: 1.55; }
.up-compass ol { grid-column: 1 / -1; margin: .4rem 0 0; padding-left: 1.5rem; color: var(--academy-muted); line-height: 1.8; }

.up-current-card { border-top: 5px solid var(--up-teal); }
.up-current-head { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: start; }
.up-current-head h3 { margin: .65rem 0 .35rem; font-size: clamp(1.4rem, 4vw, 2rem); }
.up-current-head p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.up-deadline { min-width: 150px; padding: .8rem; border-radius: 1rem; color: #fff; text-align: right; background: var(--up-blue); }
.up-deadline span, .up-deadline small { display: block; color: #dceefa; }
.up-deadline span { font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.up-deadline strong { display: block; margin: .25rem 0; font-size: 1.05rem; }
.up-deadline small { font-weight: 700; }

.up-progress-head { margin-top: 1.15rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.up-progress-head h3 { margin: 0; }
.up-progress-head span { color: var(--academy-muted); font-weight: 750; }
.up-progress-head strong { color: var(--up-teal); }

.up-step-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1rem; }
.up-step {
  padding: .9rem;
  border: 1px solid var(--academy-border);
  border-radius: 1rem;
  background: var(--academy-card);
}
.up-step.is-complete { border-color: #67baaa; background: #effbf7; }
.up-step label { min-height: 48px; display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.up-step input { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--up-teal); }
.up-step label span { display: grid; gap: .3rem; }
.up-step small { color: var(--academy-muted); line-height: 1.4; }

.up-structure-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr); }
.up-check-fieldset { margin: 1.1rem 0 0; padding: 0; border: 0; }
.up-check-fieldset legend { margin-bottom: .7rem; color: #343b63; font-size: .86rem; font-weight: 850; }
.up-check-list { display: grid; gap: .55rem; }
.up-check-list label {
  min-height: 48px;
  padding: .7rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  border: 1px solid var(--academy-border);
  border-radius: .8rem;
  background: var(--academy-card);
  cursor: pointer;
}
.up-check-list input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--up-teal); }
.up-check-list small { margin-left: auto; color: var(--academy-muted); }

.up-result-card { min-height: 330px; display: grid; align-content: center; justify-items: start; border-top: 5px solid var(--up-amber); }
.up-result-label { color: var(--up-teal); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.up-result-card > strong { margin: .5rem 0; color: var(--up-blue); font-size: clamp(4rem, 10vw, 6.5rem); line-height: .9; letter-spacing: -.08em; }
.up-result-card h3 { margin: .6rem 0 .35rem; }
.up-result-card p { margin: 0; color: var(--academy-muted); line-height: 1.55; }
.up-missing-list { width: 100%; display: grid; gap: .45rem; margin-top: 1rem; }
.up-missing-list span { padding: .55rem .7rem; border-radius: .7rem; color: #714700; background: #fff4cf; font-weight: 750; }

.up-reference-output { position: sticky; top: 7rem; }
.up-reference-output h3 { margin: .45rem 0 .7rem; }
.up-reference-output > p:first-of-type { min-height: 120px; margin: 0; padding: 1rem; border: 1px dashed #aeb6d8; border-radius: .9rem; color: var(--academy-ink); background: #fbfbff; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.up-reference-output .academy-panel-note { margin: 1rem 0 0; }
.up-library-panel { margin-top: 1rem; }
.up-library-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.up-library-head h3 { margin: .3rem 0 0; }
.up-reference-item { border-left: 4px solid var(--up-teal); }
.up-reference-item .academy-note-content { color: var(--academy-ink); }

.up-integrity-grid { grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); }
.up-integrity-list { display: grid; gap: .6rem; margin-top: 1rem; }
.up-integrity-list label {
  min-height: 62px;
  padding: .75rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 1px solid var(--academy-border);
  border-radius: .9rem;
  background: var(--academy-card);
  cursor: pointer;
}
.up-integrity-list input { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--up-teal); }
.up-integrity-list label > span { display: grid; gap: .25rem; }
.up-integrity-list small { color: var(--academy-muted); line-height: 1.4; }
.up-ai-guide { align-content: start; }
.up-ai-guide > span { margin-bottom: 1rem; }
.up-ai-guide h3 { margin-bottom: .7rem; }
.up-ai-guide article { padding: .85rem 0; border-top: 1px solid var(--academy-border); }
.up-ai-guide article p { margin: .25rem 0 0; color: var(--academy-muted); line-height: 1.5; }
.up-ai-guide a { color: var(--academy-indigo); font-weight: 850; }

.up-history-item { border-left: 4px solid var(--up-blue); }

[data-nb-theme="dark"] .up-step.is-complete { background: #123c32; }
[data-nb-theme="dark"] .up-result-card > strong { color: var(--up-sky); }
[data-nb-theme="dark"] .up-result-card .up-missing-list span { color: #ffe9a8; background: #4c3814; }
[data-nb-theme="dark"] .up-reference-output > p:first-of-type { background: #111735; }
[data-nb-theme="dark"] .up-check-fieldset legend { color: var(--academy-ink); }

@media (max-width: 900px) {
  .up-plan-grid, .up-structure-grid, .up-reference-grid, .up-integrity-grid { grid-template-columns: 1fr; }
  .up-reference-output { position: static; }
}

@media (max-width: 620px) {
  .up-current-head { grid-template-columns: 1fr; }
  .up-deadline { min-width: 0; text-align: left; }
  .up-step-list { grid-template-columns: 1fr; }
  .up-progress-head { align-items: flex-start; }
  .up-current-card .academy-form-actions > *, .up-reference-output .academy-form-actions > * { width: 100%; }
  .up-result-card { min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .up-step { transition: none; }
}
