:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5c6470;
  --accent: #1e3a8a;
  --accent-contrast: #ffffff;
  --rule: #e3e6eb;
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #151a22;
    --text: #e8eaee;
    --muted: #98a1ad;
    --accent: #8fabff;
    --accent-contrast: #0e1116;
    --rule: #242a34;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-footer {
  padding-top: 48px;
  padding-bottom: 32px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
}

/* Portal */
.portal-shell {
  width: 100%;
  max-width: 768px;
  margin-inline: auto;
  padding-inline: 24px;
}

.portal-header {
  padding-top: 32px;
}

.portal-wordmark {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
}

.portal-hero {
  padding-block: 64px 48px;
  text-align: center;
}

.portal-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  font-weight: 800;
  line-height: normal;
}

.portal-introduction {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.portal-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.portal-apps {
  display: grid;
  gap: 16px;
}

.portal-app-card {
  --portal-accent: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  padding: 20px 24px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 0 0 transparent;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.portal-app-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: var(--portal-accent);
  content: "";
}

.portal-app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 12%, transparent);
}

.portal-app-card--sports {
  --portal-accent: #1E7CCC;
}

.portal-app-card--marathon {
  --portal-accent: #5E6AE8;
}

.portal-app-card--bball {
  --portal-accent: #D97A26;
}

.portal-app-card--shot {
  --portal-accent: #7E5BE0;
}

.portal-app-card--specarchives {
  --portal-accent: #C0392B;
}

.portal-app-icon {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.portal-app-copy {
  min-width: 0;
}

.portal-app-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.portal-app-copy > p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-app-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.portal-updates-section {
  margin-top: 48px;
}

.portal-section-label,
.v3-section-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 0.08em;
}

.portal-updates {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.portal-updates li {
  display: grid;
  grid-template-columns: 112px 144px minmax(0, 1fr);
  gap: 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
}

.portal-updates time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.portal-updates span {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.portal-updates p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Product pages v3 */
.v3-page--sports {
  --v3-band: radial-gradient(900px circle at 50% 100%, #47B6FF 0%, #2B8BE0 57%, #1A7CCC 95%);
  --v3-cta-text: #1A7CCC;
  --v3-accent: #1E7CCC;
}

.v3-page--marathon {
  --v3-band: radial-gradient(900px circle at 50% 100%, #8F9BFF 0%, #5E6AE8 57%, #4650C9 95%);
  --v3-cta-text: #4650C9;
  --v3-accent: #5E6AE8;
}

.v3-page--bball {
  --v3-band: radial-gradient(900px circle at 50% 100%, #FFAD5C 0%, #E8802E 57%, #C96716 95%);
  --v3-cta-text: #C96716;
  --v3-accent: #D97A26;
}

.v3-page--shot {
  --v3-band: radial-gradient(900px circle at 50% 100%, #B08CFF 0%, #7E5BE0 57%, #6243C4 95%);
  --v3-cta-text: #6243C4;
  --v3-accent: #7E5BE0;
}

.v3-shell {
  width: 100%;
  max-width: 840px;
  margin-inline: auto;
  padding-inline: 24px;
}

.v3-hero-band {
  color: #ffffff;
  background: var(--v3-band);
}

.v3-hero-inner {
  padding-top: 32px;
  padding-bottom: 120px;
  text-align: center;
}

.v3-back-link {
  display: inline-block;
  color: rgb(255 255 255 / 70%);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
}

.v3-hero-icon {
  width: 80px;
  height: 80px;
  margin: 28px auto 0;
  border-radius: 18px;
}

.v3-hero-title {
  margin: 16px 0 0;
  color: #ffffff;
  font-size: 42px;
  font-weight: 800;
  line-height: normal;
}

.v3-hero-tagline {
  max-width: 680px;
  margin: 8px auto 0;
  color: rgb(255 255 255 / 92%);
  font-size: 18px;
}

.v3-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.v3-pill-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  border: 0;
  border-radius: 999px;
  color: var(--v3-cta-text);
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  font-size: 17px;
  font-weight: bold;
  line-height: 1.4;
  text-decoration: none;
}

.v3-pill-cta--secondary {
  border: 1.5px solid rgb(255 255 255 / 80%);
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}

.v3-play-icon {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.v3-apple-mark {
  display: inline-block;
  vertical-align: -4px;
}

.v3-hero-meta {
  margin: 10px 0 0;
  color: rgb(255 255 255 / 75%);
  font-family: var(--font-mono);
  font-size: 12px;
}

.v3-screenshot-wrap {
  display: flow-root;
  position: relative;
  max-width: 888px;
}

.v3-screenshot-card {
  max-width: 760px;
  margin-top: -72px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(10,30,60,0.35);
}

.v3-screenshot-card--tablet {
  max-width: 800px;
}

.v3-screenshot-card--composite {
  max-width: 840px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.v3-screenshot-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.v3-screenshot-card--composite img {
  filter: drop-shadow(0 16px 32px rgba(10,30,60,0.30));
}

.v3-content {
  padding-top: 40px;
}

.v3-introduction {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}

.v3-introduction p {
  margin: 0;
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.8;
}

.v3-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 44px;
}

.v3-feature-item {
  min-width: 0;
}

.v3-feature-icon {
  width: 40px;
  height: 40px;
}

.v3-feature-item h3 {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.v3-feature-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.v3-product-section {
  margin-top: 44px;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-badge {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--v3-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
}

.step p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.v3-platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v3-platform-chips span {
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.v3-platform-chips span:hover {
  border-color: var(--v3-accent);
}

.v3-updates {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.v3-updates li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
}

.v3-updates time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.v3-updates p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.v3-bottom-cta {
  margin-top: 48px;
  padding: 48px;
  background: var(--v3-band);
  text-align: center;
}

@media (max-width: 760px) {
  .v3-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portal-shell,
  .v3-shell {
    padding-inline: 20px;
  }

  .portal-hero h1 {
    font-size: 28px;
  }

  .portal-updates li {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .portal-updates p {
    grid-column: 1 / -1;
  }

  .v3-hero-title {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .portal-hero {
    padding-block: 48px 40px;
  }

  .portal-app-card {
    padding-inline: 20px;
  }

  .v3-feature-grid {
    grid-template-columns: 1fr;
  }

  .v3-hero-actions--dual {
    flex-direction: column;
    align-items: center;
  }

  .v3-hero-actions--dual .v3-pill-cta {
    max-width: 100%;
  }

  .v3-updates li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-app-card {
    transition: none;
  }
}
