/* Shared site chrome. This file is also bundled into the static progress page. */
:root {
  --type-micro: 12px;
  --type-label: 13px;
  --type-caption: 14px;
}

html {
  background: var(--background);
}

body {
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  width: min(calc(100% - var(--page-gutter) * 2), 1440px);
  height: 96px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(16, 18, 22, 0.12);
}

.brand {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.5;
}

/* The mark's 45-degree rotation expands its painted bounds by about 7px. */
.brand > .spark-mark {
  margin-inline: 7px;
}

.spark-mark {
  position: relative;
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  rotate: 45deg;
  transform-origin: center;
  transition:
    rotate 520ms cubic-bezier(0.22, 1, 0.36, 1),
    scale 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.spark-mark > span {
  display: block;
  border-radius: 100% 14% 100% 100%;
  background: #2a4ef6;
}

.spark-mark > span:nth-child(2) {
  background: #ff7a5c;
}

.spark-mark > span:nth-child(3) {
  background: #a3d840;
}

.spark-mark > span:nth-child(4) {
  background: #101216;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  color: #545650;
  font-size: 15px;
  line-height: 1.5;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #101216;
}

.site-nav svg {
  width: 14px;
  height: 14px;
}

.site-header-action {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(16, 18, 22, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  padding: 0 20px;
  color: #101216;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  outline: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    translate 120ms ease;
}

.site-header-action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header-action:hover,
.site-header-action:focus-visible {
  border-color: rgba(42, 78, 246, 0.35);
  background: rgba(255, 255, 255, 0.8);
  color: #2a4ef6;
}

.site-header-action:focus-visible {
  box-shadow: 0 0 0 3px rgba(42, 78, 246, 0.2);
}

.site-header-action:hover svg {
  transform: translateX(3px);
}

.site-header-action:active {
  translate: 0 1px;
}

.brand:hover .spark-mark,
.spark-mark:hover {
  rotate: 135deg;
  scale: 1.08;
}

.brand:active .spark-mark,
.spark-mark:active {
  rotate: 225deg;
  scale: 0.94;
  transition-duration: 180ms;
}

.brand:focus-visible {
  border-radius: 6px;
  outline: 3px solid rgba(42, 78, 246, 0.2);
  outline-offset: 3px;
}

.site-footer {
  display: grid;
  width: min(calc(100% - var(--page-gutter) * 2), 1440px);
  min-height: 120px;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-top: 1px solid rgba(16, 18, 22, 0.14);
}

.site-footer > div {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  color: #656761;
  font-size: var(--type-caption);
  line-height: 1.5;
}

.site-footer > div a:hover {
  color: #2a4ef6;
}

@media (max-width: 767px) {
  .site-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer {
    width: min(100% - 28px, 1440px);
  }

  .site-header {
    height: 80px;
  }

  .site-header-action {
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 0;
    text-align: left;
  }

  .site-footer > div {
    justify-content: flex-start;
  }
}

@font-face {
  font-family: 'Spark Google Sans Flex';
  src: url('/fonts/google-sans-flex-latin-v1.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: 'Spark Noto Sans SC';
  src: url('/fonts/noto-sans-sc-spark-v1.woff2?v=2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Spark Geist Mono';
  src: url('/fonts/geist-mono-latin-v1.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: #f8f7f2;
  --ink: #101216;
  --muted: #656761;
  --line: rgba(16, 18, 22, 0.14);
  --blue: #2a4ef6;
  --blue-soft: #dce5ff;
  --rdma: #08766c;
  --rdma-soft: #ddf3ec;
  --coral: #ff7a5c;
  --lime: #a3d840;
  --page-gutter: clamp(28px, 3.75vw, 60px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family:
    'Spark Google Sans Flex', 'Spark Noto Sans SC', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

::selection {
  background: #cbd5ff;
  color: var(--ink);
}

.eyebrow,
.kicker,
.section-index {
  font-family: 'Spark Geist Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main {
  width: min(calc(100% - var(--page-gutter) * 2), 1440px);
  margin: 0 auto;
}

.camp-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: end;
  gap: clamp(48px, 8vw, 140px);
  padding: clamp(56px, 6vw, 92px) 0 clamp(46px, 5vw, 72px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 36px;
  font-size: var(--type-label);
  font-weight: 620;
}

.kicker > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 6px rgba(163, 216, 64, 0.15);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(42px, 4.1vw, 62px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.intro-copy {
  max-width: 480px;
  margin-bottom: 4px;
  color: #60625d;
  font-size: 17px;
  line-height: 1.82;
}

.readme-note {
  display: grid;
  min-height: 72px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  border-top: 1px solid var(--line);
  padding: 22px 4px 8px;
}

.readme-note-label {
  display: inline-flex;
  align-items: center;
  color: #666862;
  font-family: 'Spark Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.readme-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.readme-note strong {
  color: var(--ink);
  font-weight: 620;
}

.readme-note a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(16, 18, 22, 0.24);
  padding: 4px 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    border-color 180ms ease,
    color 180ms ease;
}

.readme-note a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.readme-note a:focus-visible {
  outline: 3px solid rgba(42, 78, 246, 0.2);
  outline-offset: 4px;
}

.readme-note a svg {
  width: 15px;
  height: 15px;
}

.notice {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  border: 0;
  border-radius: 16px;
  background: #fff2ed;
  padding: 12px 18px;
  color: #6f3024;
  font-size: 14px;
  line-height: 1.5;
}

.notice[hidden] {
  display: none;
}

.notice.is-info {
  background: #eff3ff;
  color: #253a8d;
}

.notice-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--coral);
}

.notice.is-info .notice-dot {
  background: var(--blue);
}

.account-panel {
  display: grid;
  min-height: 180px;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.76);
  padding: 30px 34px;
}

.account-visual {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 24px;
  background: var(--ink);
  color: #fff;
}

.account-visual svg {
  width: 37px;
  height: 37px;
  stroke: none;
}

.eyebrow {
  margin-bottom: 12px;
  color: #646660;
  font-size: var(--type-label);
  font-weight: 620;
}

.account-copy h2 {
  margin-bottom: 7px;
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.account-copy > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.primary-action,
.quiet-action,
.claim-action,
.recreate-action,
.recreate-confirm,
.phase-link {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 590;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.primary-action,
.claim-action {
  cursor: pointer;
  background: var(--ink);
  color: #fff;
}

.primary-action:hover,
.claim-action:not(:disabled):hover,
.phase-link.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16, 18, 22, 0.13);
}

.primary-action svg,
.phase-link svg {
  width: 16px;
  height: 16px;
}

.quiet-action {
  cursor: pointer;
  border-color: var(--line);
  background: transparent;
}

.recreate-action {
  cursor: pointer;
  border-color: rgba(16, 18, 22, 0.18);
  background: transparent;
  color: #565852;
}

.recreate-action:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 92, 0.62);
  background: rgba(255, 255, 255, 0.58);
  color: #8b3324;
}

.recreate-action.is-loading::after {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(86, 88, 82, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 760ms linear infinite;
  content: '';
}

.quiet-action:hover {
  border-color: rgba(16, 18, 22, 0.34);
  background: #fff;
}

.primary-action:focus-visible,
.quiet-action:focus-visible,
.claim-action:focus-visible,
.recreate-action:focus-visible,
.recreate-confirm:focus-visible,
.phase-link:focus-visible {
  outline: 3px solid rgba(42, 78, 246, 0.2);
  outline-offset: 3px;
}

.recreate-dialog {
  width: min(calc(100% - 32px), 560px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--background);
  padding: 0;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(16, 18, 22, 0.24);
}

.recreate-dialog::backdrop {
  background: rgba(16, 18, 22, 0.42);
  backdrop-filter: blur(4px);
}

.recreate-dialog-card {
  padding: clamp(28px, 5vw, 44px);
}

.recreate-dialog-card h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.recreate-warning {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.recreate-warning code {
  border-radius: 5px;
  background: #eceae2;
  padding: 2px 5px;
  color: var(--ink);
  font-family: 'Spark Geist Mono', ui-monospace, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.recreate-dialog-card label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 600;
}

.recreate-dialog-card input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(16, 18, 22, 0.2);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 16px;
  color: var(--ink);
  font-family: 'Spark Geist Mono', ui-monospace, monospace;
  font-size: 15px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.recreate-dialog-card input:focus {
  border-color: rgba(42, 78, 246, 0.58);
  box-shadow: 0 0 0 4px rgba(42, 78, 246, 0.12);
}

.recreate-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.recreate-confirm {
  cursor: pointer;
  border-color: #9c3b2c;
  background: #9c3b2c;
  color: #fff;
}

.recreate-confirm:not(:disabled):hover {
  transform: translateY(-2px);
  background: #842f22;
  box-shadow: 0 10px 24px rgba(111, 48, 36, 0.18);
}

.recreate-confirm:disabled {
  cursor: not-allowed;
  border-color: rgba(16, 18, 22, 0.1);
  background: rgba(16, 18, 22, 0.12);
  color: rgba(16, 18, 22, 0.48);
}

.phase-section,
.claim-notes {
  padding-top: clamp(72px, 8vw, 118px);
}

.section-heading {
  display: grid;
  grid-template-columns: 64px minmax(280px, 0.8fr) minmax(300px, 0.55fr);
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
  margin-bottom: 34px;
}

.section-heading.compact {
  grid-template-columns: 64px minmax(280px, 1fr);
}

.section-index {
  margin-bottom: 5px;
  color: #6c6e68;
  font-size: var(--type-label);
  font-weight: 620;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 2.7vw, 40px);
  font-weight: 530;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.section-heading > p:last-child {
  max-width: 420px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.phase-card {
  display: flex;
  min-height: 440px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(16, 18, 22, 0.1);
  border-radius: 34px;
  padding: clamp(28px, 3.4vw, 48px);
}

.phase-rust {
  background: var(--blue-soft);
}

.phase-rcore {
  background: var(--rdma-soft);
}

.phase-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.status-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(16, 18, 22, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0 15px;
  color: #565852;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #8b8d87;
  content: '';
}

.status-pill.is-open::before,
.status-pill.is-done::before {
  background: var(--blue);
}

.phase-rcore .status-pill.is-open::before,
.phase-rcore .status-pill.is-done::before {
  background: var(--rdma);
}

.status-pill.is-waiting::before {
  background: var(--coral);
}

.phase-card-copy {
  max-width: 550px;
  margin-top: 0;
  padding: clamp(54px, 8vw, 108px) 0 38px;
}

.phase-card-copy h3 {
  margin-bottom: 20px;
  font-size: clamp(38px, 3.8vw, 56px);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 1;
}

.phase-card-copy > p:last-child {
  max-width: 500px;
  margin-bottom: 0;
  color: #51534e;
  font-size: 16px;
  line-height: 1.78;
}

.phase-actions {
  display: flex;
  min-height: 52px;
  margin-top: auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.claim-action:disabled {
  cursor: not-allowed;
  background: rgba(16, 18, 22, 0.17);
  color: rgba(16, 18, 22, 0.53);
}

.claim-action.is-loading::after {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 760ms linear infinite;
  content: '';
}

.phase-link {
  border-color: rgba(16, 18, 22, 0.18);
  background: rgba(255, 255, 255, 0.5);
}

.phase-link.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.phase-link:not(.primary):hover {
  transform: translateY(-2px);
  border-color: rgba(16, 18, 22, 0.38);
  background: rgba(255, 255, 255, 0.85);
}

.claim-notes {
  padding-bottom: clamp(84px, 10vw, 142px);
}

.claim-notes ol {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  padding: 0;
  list-style: none;
}

.claim-notes li {
  min-height: 180px;
  display: flex;
  align-items: center;
  padding: 30px clamp(20px, 2.4vw, 38px);
}

.claim-notes li + li {
  border-left: 1px solid var(--line);
}

.claim-notes strong {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 620;
}

.claim-notes li p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 920px) {
  .camp-intro {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }

  .intro-copy {
    max-width: 620px;
  }

  .section-heading {
    grid-template-columns: 48px 1fr;
  }

  .section-heading > p:last-child {
    grid-column: 2;
  }

  .claim-notes ol {
    grid-template-columns: 1fr;
  }

  .claim-notes li {
    min-height: 132px;
  }

  .claim-notes li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .readme-note {
    grid-template-columns: 1fr auto;
    gap: 8px 20px;
    padding-block: 16px;
  }

  .readme-note p {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .readme-note a {
    grid-row: 1;
    grid-column: 2;
  }

  .account-panel {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 20px;
    padding: 24px;
  }

  .account-visual {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .account-visual svg {
    width: 29px;
    height: 29px;
  }

  .github-login,
  .quiet-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .phase-grid {
    grid-template-columns: 1fr;
  }

  .phase-card {
    min-height: 390px;
  }
}

@media (max-width: 520px) {
  :root {
    --page-gutter: 14px;
  }

  .camp-intro {
    padding: 48px 2px 38px;
  }

  .kicker {
    margin-bottom: 26px;
    font-size: 12px;
  }

  h1 {
    max-width: none;
    font-size: clamp(34px, 10.5vw, 42px);
    line-height: 1.02;
    white-space: nowrap;
  }

  .intro-copy {
    font-size: 15px;
  }

  .readme-note {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-inline: 4px;
  }

  .readme-note p,
  .readme-note a {
    grid-row: auto;
    grid-column: auto;
  }

  .readme-note a {
    width: fit-content;
  }

  .account-panel,
  .phase-card {
    border-radius: 24px;
  }

  .account-panel {
    padding: 22px 20px;
  }

  .account-copy h2 {
    font-size: 22px;
  }

  .section-heading,
  .section-heading.compact {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-heading > p:last-child {
    grid-column: 1;
  }

  .section-index {
    margin-bottom: 0;
  }

  .phase-card {
    min-height: 360px;
    padding: 24px 20px;
  }

  .phase-card-copy {
    padding: 58px 0 30px;
  }

  .phase-card-copy h3 {
    font-size: 38px;
  }

  .phase-card-copy > p:last-child {
    font-size: 15px;
  }

  .phase-actions > * {
    width: 100%;
  }

  .claim-notes li {
    padding-inline: 20px;
  }

  .recreate-dialog-actions {
    flex-direction: column-reverse;
  }

  .recreate-dialog-actions > * {
    width: 100%;
  }
}

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