/* Page chrome: the world stage, the glass header, labels, the intro dialogue, the panel
   drawer, the dock, the classic view. Shared content components live in panel.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
[hidden] {
  display: none !important;
}
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: #3f94dd;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root[data-theme="night"] body {
  background: #0b1430;
}
button {
  font: inherit;
  color: inherit;
}
kbd {
  font-family: var(--font-pixel);
  font-size: 0.72em;
  line-height: 1;
  display: inline-block;
  padding: 3px 5px 2px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: var(--surface);
  color: var(--ink);
  min-width: 1.6em;
  text-align: center;
}
.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;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
  box-shadow: var(--shadow);
}
.portrait {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ------------------------------------------------------------------ stage */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: manipulation;
}
#world {
  position: absolute;
  left: 0;
  top: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
#world:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
  box-shadow: inset 0 0 0 5px var(--focus);
}
.labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Floating chips over the world, in the spirit of Cofounder's "Task Completed" tag. */
.hub-label,
.prompt,
.bubble {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.hub-label {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px 6px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(17, 24, 33, 0.72);
  color: #fff;
  font-size: clamp(12.5px, calc(var(--px, 2px) * 6.4), 15px);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity 160ms var(--ease);
}
.hub-label.is-off {
  opacity: 0;
  pointer-events: none;
}
.hub-label__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 35%, transparent);
}
.hub-label__key {
  font-size: 9.5px;
  padding: 2px 4px 1px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.hub-label__check {
  display: none;
  color: #7ee08a;
  font-size: 11px;
}
.hub-label.is-visited .hub-label__check {
  display: inline;
}
.hub-label:hover,
.hub-label.is-hover,
.hub-label:focus-visible {
  background: rgba(17, 24, 33, 0.82);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 0 2px var(--dot);
}
.prompt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #1c1b18;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  white-space: nowrap;
  animation: bob 1.6s ease-in-out infinite;
}
@supports not (translate: 0 0) {
  .prompt {
    animation: none;
  }
}
.prompt kbd {
  background: #1c1b18;
  color: #fff;
  border-color: #1c1b18;
}
.bubble {
  max-width: min(300px, calc(100vw - 32px));
  white-space: normal !important;
  text-align: center;
  padding: 7px 11px 6px;
  border-radius: 10px;
  background: #fff;
  color: #1c1b18;
  font-family: var(--font-pixel);
  font-size: 11.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  white-space: nowrap;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}
@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -3px;
  }
}

/* ------------------------------------------------------------------ header */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left));
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 30, 60, 0.4), rgba(10, 30, 60, 0));
}
.topbar :focus-visible {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 4px #1c1b18;
}
.topbar > * {
  pointer-events: auto;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  padding: 6px 13px 7px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  text-shadow: 0 1px 2px rgba(0, 20, 50, 0.5), 0 2px 16px rgba(0, 20, 50, 0.4);
  white-space: nowrap;
  margin-right: auto;
  letter-spacing: -0.01em;
}
.nav__group {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 6px 24px rgba(0, 30, 60, 0.12);
}
.nav__item {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 10, 25, 0.45);
  transition: background var(--dur) var(--ease);
}
.nav__item:hover {
  background: rgba(255, 255, 255, 0.16);
}
.nav__item.is-active {
  background: #fff;
  color: #1c1b18;
  text-shadow: none;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.glass-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease);
}
.glass-btn:hover {
  background: var(--glass-strong);
}
.glass-btn svg {
  width: 16px;
  height: 16px;
}
.glass-btn--icon {
  width: 38px;
  padding: 0;
  justify-content: center;
}
.glass-btn .i-sun {
  display: none;
}
:root[data-theme="night"] .glass-btn .i-sun {
  display: block;
}
:root[data-theme="night"] .glass-btn .i-moon {
  display: none;
}
.white-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  background: #fff;
  color: #1c1b18;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 30, 60, 0.18);
  transition: transform var(--dur) var(--ease);
}
.white-btn:hover {
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------ intro dialogue */
.hero {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: 22px;
  width: min(780px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 20px 22px 18px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  color: var(--ink);
  animation: rise 520ms var(--ease) both;
}
.hero.is-collapsed {
  animation: sink 360ms var(--ease) both;
  pointer-events: none;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 24px);
  }
}
@keyframes sink {
  to {
    opacity: 0;
    transform: translate(-50%, 30px);
  }
}
.hero__portrait {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(180deg, #9fd3f6, #cbe9fb);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.06);
}
:root[data-theme="night"] .hero__portrait {
  background: linear-gradient(180deg, #24376b, #33467e);
}
.hero__tag {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 4px 0 8px;
}
.hero__text {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}
.hero__text strong {
  color: var(--ink);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn--ghost:hover {
  border-color: var(--line-strong);
}
.hero__keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}
.hero__keys kbd {
  margin-right: 2px;
}
.hero__caret {
  position: absolute;
  right: 18px;
  bottom: 12px;
  font-size: 11px;
  color: var(--ink-3);
  animation: blink 1.1s steps(2) 8;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ HUD */
.hud {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0s 300ms;
  pointer-events: none;
}
.hero-collapsed .hud {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0s;
}
.progress,
.hud__help,
.toast {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(17, 24, 33, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
}
.progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
}
.progress__bar {
  width: 64px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.progress__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7ee08a, #ffd36b);
  transition: width 500ms var(--ease);
}
.progress__count {
  font-family: var(--font-pixel);
  font-size: 11px;
}
.hud__help {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-family: var(--font-pixel);
  font-size: 13px;
  cursor: pointer;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.panel-open .toast {
  left: calc((100vw - var(--panel-w, 0px)) / 2);
}
.toast__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7ee08a;
  box-shadow: 0 0 0 3px rgba(126, 224, 138, 0.3);
  flex: none;
}
.toast__dot--tip {
  background: #8fd0f2;
  box-shadow: 0 0 0 3px rgba(143, 208, 242, 0.3);
}
.toast__dot--trophy {
  background: #ffd36b;
  box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.35);
}

/* ------------------------------------------------------------------ help */
.help {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(8, 14, 30, 0.35);
  padding: 16px;
  overflow-y: auto;
}
.help[hidden] {
  display: none;
}
.help__card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.help__x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
}
.help__x svg {
  width: 18px;
  height: 18px;
}
.help__touch {
  display: none;
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 14.5px;
}
.help__touch li {
  margin: 4px 0;
}
.touch .help__touch {
  display: block;
}
.touch .help__keys {
  display: none;
}
.help__card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 12px;
}
.help__card dl {
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}
.help__card dl > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
}
.help__card dt {
  white-space: nowrap;
}
.help__card dd {
  margin: 0;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ dock (narrow screens) */
.dock {
  display: none;
}

/* ------------------------------------------------------------------ panel drawer */
.panel-drawer {
  position: fixed;
  z-index: 30;
  top: 72px;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(540px, 46vw);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  overflow: hidden;
  transform: translateX(calc(100% + 24px));
  transition: transform 380ms var(--ease);
}
.panel-drawer.is-open {
  transform: none;
}
.panel-drawer[hidden] {
  display: none;
}
.panel__strip {
  height: 6px;
  flex: none;
  background:
    repeating-linear-gradient(90deg, var(--accent) 0 12px, color-mix(in srgb, var(--accent) 70%, white) 12px 18px, var(--accent) 18px 24px);
}
.panel__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px 14px 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.panel__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--accent);
  background-size: 26px 26px;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  margin-top: 4px;
}
.panel__titles h2 {
  margin: 2px 0 4px;
}
.panel__titles h2:focus {
  outline: none;
}
.panel__blurb {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
}
.panel__close {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.panel__close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.panel__close svg {
  width: 18px;
  height: 18px;
}
.panel__body {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 22px 28px;
  scrollbar-width: thin;
  outline: none;
}
.panel__body:focus-visible {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--focus) 70%, transparent);
}
.widget-slot.is-loading {
  min-height: 120px;
  margin: 14px 0 4px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.panel__foot {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.panel__hint {
  align-self: center;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.panel__foot .btn {
  min-width: 0;
}
.panel__foot .btn span {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@container (max-width: 470px) {
  .panel__hint {
    display: none;
  }
  .panel__foot .btn span {
    max-width: 120px;
  }
}

/* panel content pieces */
.link-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent-deep);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link-btn svg {
  width: 14px;
  height: 14px;
}
.see-also {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
.see-also a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.see-also svg {
  width: 13px;
  height: 13px;
}
.panel .fine {
  font-size: 13.5px;
  color: var(--ink-3);
  margin-top: 22px;
}
.intro-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
}
.intro-card .portrait,
.sheet .portrait {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.intro-card .lede {
  margin-bottom: 10px;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.contact-row .btn--primary span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn--icon {
  padding: 10px;
}
.now-list,
.map-list {
  display: grid;
  gap: 6px;
}
.now-item,
.map-item {
  appearance: none;
  width: 100%;
  text-align: left;
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 14px;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.now-item {
  grid-template-columns: auto 1fr auto;
}
.now-item svg,
.map-item svg {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}
.now-item:hover,
.map-item:hover {
  border-color: color-mix(in srgb, var(--c, var(--accent)) 60%, transparent);
  transform: translateX(2px);
}
.now-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.map-item {
  grid-template-columns: auto 1fr auto;
}
.map-item__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background-color: var(--c);
  background-size: 18px 18px;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}
.map-item__text {
  display: grid;
  gap: 2px;
}
.map-item__text .muted {
  font-size: 13px;
  line-height: 1.35;
}
.quest + .quest,
.project + .project {
  margin-top: 16px;
}
.quest__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.quest__title {
  font-family: var(--font-pixel);
  font-size: 22px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}
.quest__role {
  font-size: 14px;
  color: var(--ink-2);
}
.mini-title {
  font-size: 13px;
  font-weight: 650;
  margin: 16px 0 0;
}
.callout {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 14.5px;
}
.callout__label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 4px;
}
.callout--big {
  margin-top: 24px;
  padding: 16px;
}
.callout--big p {
  margin-bottom: 12px;
}
.contact-row--compact .btn span {
  display: none;
}
.contact-row--compact .btn--primary span {
  display: inline;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 4px, transparent 4px 8px);
}
.timeline__item {
  position: relative;
}
.timeline__item + .timeline__item {
  margin-top: 12px;
}
.timeline__node {
  position: absolute;
  left: -21px;
  top: 18px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--surface), inset -2px -2px 0 rgba(0, 0, 0, 0.2);
}

.degree {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}
.degree__gpa {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}
.degree__gpa span {
  font-family: var(--font-pixel);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin-bottom: -10px;
}
.degree__gpa strong {
  font-family: var(--font-pixel);
  font-size: 24px;
  font-weight: 600;
}
.plain-list {
  margin-top: 12px;
  font-size: 14px;
}
.plain-list summary {
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 600;
}
.plain-list p {
  margin: 8px 0 0;
}
.panel .before {
  margin-top: 16px;
  font-size: 14px;
}

.sheet {
  margin-top: 16px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--accent);
  overflow: hidden;
}
.sheet__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-bottom: 2px solid var(--ink);
}
.sheet__head .portrait {
  width: 52px;
  height: 52px;
  background: var(--surface);
}
.sheet__head .kicker {
  display: block;
}
.sheet__name {
  display: block;
  font-size: 18px;
}
.sheet__grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.sheet__grid > div {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.sheet__grid > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.sheet__grid dt {
  font-family: var(--font-pixel);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
}
.sheet__grid dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 550;
}
.traits {
  display: grid;
  gap: 10px;
}
.trait {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.trait h4 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 4px;
}
.trait p {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 6px !important;
}
.trait .link-btn {
  font-size: 13.5px;
}

.loop {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.loop li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.loop p {
  margin: 2px 0 0 !important;
  font-size: 14px;
  color: var(--ink-2);
}
.loop__n {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 13px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.hacks {
  display: grid;
  gap: 10px;
}
.hack {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
}
.hack p {
  margin: 4px 0 6px !important;
  color: var(--ink-2);
}
.hack a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hack a svg {
  width: 13px;
  height: 13px;
}
/* A pixel name badge on a lanyard: "I was there", not "I won". */
.hack__badge {
  width: 32px;
  height: 32px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23d94f82' d='M4 0h2v4H4zM10 0h2v4h-2z'/%3E%3Cpath fill='%23585f6e' d='M3 4h10v1H3z'/%3E%3Cpath fill='%23ffffff' d='M3 5h10v10H3z'/%3E%3Cpath fill='%23d94f82' d='M3 5h10v3H3z'/%3E%3Cpath fill='%23b9b2a3' d='M5 10h6v1H5zM5 12h4v1H5z'/%3E%3Cpath fill='%233b3f4a' d='M2 4h1v12H2zM13 4h1v12h-1zM3 15h10v1H3z'/%3E%3C/svg%3E");
  image-rendering: pixelated;
}

/* ------------------------------------------------------------------ classic view */
.classic {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
}
.classic[hidden] {
  display: none;
}
.classic__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  --accent: #2f62b8;
  --accent-deep: #1d3f7a;
}
.classic__bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 28px;
}
.classic__head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1;
  margin: 0 0 8px;
}
.classic__head h1:focus {
  outline: none;
}
.classic__head .contact-row {
  margin-top: 16px;
}
.classic section {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.classic section h2 {
  font-size: 30px;
  margin: 0 0 14px;
}
.cl-item {
  margin-bottom: 18px;
}
.cl-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}
.cl-item h3 {
  font-size: 17px;
}
.cl-item p,
.cl-item ul {
  margin: 4px 0;
}
.classic ul {
  padding-left: 20px;
}
.classic li {
  margin: 4px 0;
}
.classic-open .topbar,
.classic-open .hero,
.classic-open .hud,
.classic-open .dock {
  visibility: hidden;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  padding: 32px;
  overflow: auto;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .nav {
    display: none;
  }
  .dock {
    display: flex;
    position: fixed;
    z-index: 12;
    left: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    max-width: calc(100% - 24px);
    gap: 2px;
    padding: 5px;
    border-radius: 14px;
    background: rgba(17, 24, 33, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .dock::-webkit-scrollbar {
    display: none;
  }
  .dock__item {
    appearance: none;
    border: 0;
    background: transparent;
    color: #fff;
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 58px;
    min-height: 44px;
    padding: 6px 6px 5px;
    border-radius: 10px;
    cursor: pointer;
  }
  .dock__item.is-active,
  .dock__item:hover {
    background: rgba(255, 255, 255, 0.16);
  }
  .dock__icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background-color: var(--c);
    background-size: 14px 14px;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  }
  .dock__label {
    font-size: 10.5px;
    font-weight: 500;
    white-space: nowrap;
  }
  .hero {
    bottom: 92px;
  }
  /* Beside an open panel the dock shrinks to icons so all eight still fit. */
  .panel-open .dock {
    left: 12px;
    transform: none;
    max-width: calc(100% - var(--panel-w, 50vw) - 12px);
  }
  .panel-open .dock__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .panel-open .dock__item {
    min-width: 40px;
    align-content: center;
  }
  .hud {
    bottom: auto;
    top: 66px;
  }
  .toast {
    bottom: 96px;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    gap: 8px;
  }
  .wordmark {
    font-size: 21px;
    padding: 6px 10px 7px;
  }
  .glass-btn span {
    display: none;
  }
  .glass-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }
  .white-btn {
    height: 40px;
    padding: 0 12px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 16px 14px;
    bottom: 84px;
    max-height: calc(100% - 160px);
    overflow: auto;
  }
  .hero__portrait {
    display: none;
  }
  .hero__text {
    font-size: 14px;
  }
  .dock {
    left: 8px;
    right: 8px;
    transform: none;
    max-width: none;
    bottom: max(8px, env(safe-area-inset-bottom));
  }
  .dock__item {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 1px 4px;
  }
  .dock__label {
    font-size: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hud {
    left: 12px;
    top: 62px;
  }
  .sheet__grid {
    grid-template-columns: 1fr;
  }
  .sheet__grid > div:nth-child(odd) {
    border-right: 0;
  }
  .help__card dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Phones: the dock becomes a 4x2 grid so every area keeps its full name. */
@media (max-width: 560px) {
  .dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    overflow: visible;
  }
  .dock__item {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 4px 6px;
  }
  .dock__icon {
    width: 22px;
    height: 22px;
    background-size: 12px 12px;
  }
  .dock__label {
    font-size: 11px;
  }
  .hero {
    bottom: calc(108px + env(safe-area-inset-bottom));
    max-height: calc(100% - 180px);
  }
  .toast {
    bottom: calc(112px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 400px) {
  .dock__item {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    padding: 4px 2px;
  }
  .dock__label {
    font-size: 10px;
  }
}

/* Panels cover the whole screen on phones and on short landscape screens. */
@media (max-width: 760px), (max-height: 500px) {
  .panel-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    border-radius: 0;
    transform: translateY(100%);
  }
  .panel__header {
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
    gap: 12px;
  }
  .panel__icon {
    width: 38px;
    height: 38px;
  }
  .panel__body {
    padding: 16px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left));
  }
  .panel__foot {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .panel__hint {
    display: none;
  }
  .panel-open .toast {
    left: 50%;
    bottom: calc(76px + env(safe-area-inset-bottom));
    background: rgba(17, 24, 33, 0.92);
  }
}

/* Short landscape screens: a compact header and intro so the town stays visible. */
@media (max-height: 500px) {
  .topbar {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }
  .hero {
    top: 60px;
    bottom: auto;
    max-height: calc(100% - 140px);
    overflow: auto;
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }
  .hero__portrait,
  .hero__text {
    display: none;
  }
  .hero__title {
    font-size: 22px;
  }
  .panel__blurb {
    display: none;
  }
  .help {
    place-items: start center;
  }
  .hud {
    top: 56px;
  }
}

@media (max-height: 820px) {
  .hero__keys {
    display: none;
  }
}

/* Touch screens: no keyboard hints, bigger targets. */
.touch .hero__keys,
.touch .panel__hint {
  display: none;
}
.touch .panel__close,
.touch .hud__help {
  width: 44px;
  height: 44px;
}
.touch .panel__foot .btn {
  min-height: 44px;
}
.touch .hub-label {
  min-height: 34px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------ print: the one-page view only */
.classic.print-only {
  display: none;
}
@media print {
  body {
    overflow: visible;
    background: #fff;
  }
  .stage,
  .topbar,
  .hero,
  .hud,
  .dock,
  .panel-drawer,
  .toast,
  .help,
  .skip-link,
  .classic__bar {
    display: none !important;
  }
  .classic,
  .classic.print-only,
  .classic[hidden].print-only {
    display: block !important;
    position: static;
    overflow: visible;
    background: #fff;
    color: #000;
  }
  .classic .btn {
    border: 0;
    padding: 0;
  }
  .classic a[href^="http"]::after,
  .classic a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-weight: 400;
    font-size: 0.9em;
  }
  .classic a[href^="mailto"]::after {
    content: "";
  }
}
