/* === Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
  color: #333;
  background: #fff;
}

/* === Typography === */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

p {
  margin: 0.5rem 0;
  color: #444;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}

/* === Hero === */
.hero {
  text-align: center;
}

.profile-photo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.profile-picture {
  display: inline-block;
  width: 240px;
  height: 240px;
}

.profile-picture .profile-photo {
  display: block;
}

.tagline {
  font-size: 1.05rem;
  color: #666;
}

.hero-identity {
  margin: 1rem 0 0.35rem;
  color: #616161;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero h1 {
  margin: 0.2rem auto 0.75rem;
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.hero-cta {
  margin: 1.25rem 0 0.65rem;
  font-weight: 700;
}

.hero-note {
  max-width: 620px;
  margin: 0 auto;
  color: #6b6b6b;
  font-size: 0.82rem;
  line-height: 1.55;
}

.landing-lead {
  margin: 1.3rem 0 0;
  font-size: 1.4rem;
  font-weight: 650;
}

.landing-detail {
  max-width: 680px;
  margin: 0.45rem auto 0;
  font-size: 1.08rem;
}

.landing-promise {
  margin-top: 1.35rem;
  font-size: 1.35rem;
  color: #222;
}

.hero .hero-cta a {
  display: inline-block;
  padding: 0.72rem 1.05rem;
  border: 1px solid currentColor;
  border-radius: 4px;
}

/* === Social Links === */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 1rem 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: #555;
  transition: fill 0.2s;
}

.social-links a:hover svg {
  fill: #111;
}

/* === Page Nav === */
.page-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.page-nav a {
  color: #6b6b6b;
  text-decoration: none;
}

.page-nav a:hover {
  color: #0066cc;
}

.post-date {
  color: #6b6b6b;
  font-size: 0.85rem;
  margin-left: 0.75rem;
  white-space: nowrap;
}

.view-all {
  margin-top: 0.8rem;
  font-size: 0.95rem;
}

/* === Homepage Proof === */
.proof-section {
  scroll-margin-top: 1rem;
}

.proof-section > h2 {
  margin-bottom: 0.55rem;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.proof-card {
  padding: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
}

.proof-card h3 {
  margin: 0.15rem 0 0.45rem;
  font-size: 1.05rem;
}

.proof-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.proof-card .proof-capability {
  color: #0066cc;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.proof-card .proof-meta {
  margin-top: 0.7rem;
  color: #6b6b6b;
  font-size: 0.76rem;
}

.proof-bridge {
  margin-top: 1.15rem;
  padding-left: 0.9rem;
  border-left: 3px solid #0066cc;
  font-size: 0.92rem;
}

/* === Services === */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.service-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.1rem;
  background: #fff;
}

.service-card h3,
.service-step h3 {
  margin: 0 0 0.45rem;
}

.service-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #616161;
}

.service-list {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: #444;
  line-height: 1.55;
}

.service-steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.service-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
}

.service-step-num {
  color: #757575;
  font-size: 0.85rem;
  font-weight: 600;
}

.service-step p,
.service-cta p {
  margin-top: 0;
}

.challenge-form {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 650;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  padding: 0.72rem 0.78rem;
  background: #fff;
  color: #222;
  font: inherit;
}

.form-field textarea {
  resize: vertical;
  line-height: 1.55;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #0066cc;
  outline: 3px solid rgba(0, 102, 204, 0.14);
}

.form-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.55;
  cursor: pointer;
}

.form-consent input {
  flex: 0 0 auto;
  margin-top: 0.25rem;
}

.challenge-form .form-privacy {
  margin: 0.9rem 0 0;
  color: #616161;
  font-size: 0.8rem;
  line-height: 1.5;
}

.form-submit {
  margin-top: 1rem;
  border: 1px solid #0066cc;
  border-radius: 6px;
  padding: 0.72rem 1rem;
  background: #0066cc;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.form-submit:hover {
  background: #0052a3;
  border-color: #0052a3;
}

.form-success {
  padding: 0.85rem 1rem;
  border: 1px solid #9bc8aa;
  border-radius: 6px;
  background: #eff9f2;
  color: #176b38;
}

.form-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.challenge-page section {
  scroll-margin-top: 1rem;
}

.challenge-hero {
  max-width: 820px;
  padding: 2rem 0 0.5rem;
}

.challenge-hero h1 {
  max-width: 780px;
  margin: 0.25rem 0 1rem;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.challenge-lead {
  margin-top: 1.4rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.challenge-promise {
  margin-top: 1rem;
  font-size: 1.35rem;
  color: #222;
}

.challenge-page .hero-cta a {
  display: inline-block;
  padding: 0.72rem 1.05rem;
  border: 1px solid currentColor;
  border-radius: 5px;
}

.challenge-microcopy {
  color: #616161;
  font-size: 0.84rem;
}

.problem-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e5e5e5;
}

.problem-examples li {
  padding: 0.9rem 0.2rem;
  border-bottom: 1px solid #e5e5e5;
  font-weight: 600;
}

.problem-examples li:nth-child(odd) {
  padding-right: 1rem;
}

.problem-examples li:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid #e5e5e5;
}

.challenge-emphasis {
  font-size: 1.12rem;
}

.bet-exchange {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.bet-exchange p {
  margin: 0;
  padding: 1rem;
  border-left: 3px solid #0066cc;
  background: #f7f9fc;
}

.challenge-boundary {
  margin-top: 1rem;
  color: #666;
  font-size: 0.88rem;
}

.service-steps--compact {
  max-width: 820px;
}

.credibility-band {
  max-width: 850px;
}

.legal-note {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fafafa;
}

.legal-note p {
  margin: 0;
  color: #666;
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .service-grid--three {
    grid-template-columns: 1fr;
  }
}

.loading {
  color: #757575;
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #ddd;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  border: 2px solid #fff;
}

.timeline-year {
  display: block;
  color: #6b6b6b;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-detail {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
}

/* === Featured List === */
.featured-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.featured-list li {
  margin-bottom: 1rem;
  line-height: 1.5;
}

.featured-source {
  font-size: 0.85rem;
  color: #6b6b6b;
}

/* === Article === */
.article-page {
  max-width: 760px;
}

.article-breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
  color: #757575;
  font-size: 0.85rem;
}

.article-breadcrumb a {
  color: #616161;
}

.article-header {
  margin-bottom: 3rem;
}

.article-kicker {
  margin: 0 0 0.7rem;
  color: #0066cc;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.article-header h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.15rem, 7vw, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
  color: #6b6b6b;
  font-size: 0.86rem;
}

.article-summary {
  margin: 0 0 3rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #f7f9fc;
}

.article-summary h2 {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.article-summary ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #444;
  font-size: 0.93rem;
  line-height: 1.7;
}

.article-summary li + li {
  margin-top: 0.35rem;
}

.article-toc {
  margin: 0 0 3rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #f7f9fc;
}

.article-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.article-toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.45rem 2rem;
  margin: 0;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  line-height: 1.65;
}

.article-toc a:focus-visible,
.article-body pre:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 4px;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.9;
}

.article-body p {
  margin: 1rem 0;
}

.article-body section {
  margin-top: 3.5rem;
  scroll-margin-top: 1.5rem;
}

.article-body h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.article-body li + li {
  margin-top: 0.3rem;
}

.article-body code,
.article-body kbd {
  padding: 0.12em 0.3em;
  border-radius: 3px;
  background: #f1f3f5;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.article-body kbd {
  border: 1px solid #d9dee5;
  box-shadow: 0 1px 0 #d9dee5;
  white-space: nowrap;
}

.article-body pre {
  max-width: 100%;
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  background: #f7f9fc;
  font-size: 0.9rem;
  line-height: 1.65;
  tab-size: 2;
}

.article-body pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  overflow-wrap: normal;
  white-space: pre;
}

.article-flow {
  overflow-wrap: anywhere;
  padding: 1rem 1.1rem;
  border-left: 3px solid #0066cc;
  background: #f7f9fc;
  color: #333;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.75;
}

.article-manuscript {
  width: 100%;
  max-width: 100%;
  margin: 3.5rem 0 0;
  box-sizing: border-box;
}

.article-manuscript a {
  display: block;
  overflow: hidden;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  background: #f7f4ed;
}

.article-manuscript img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.article-manuscript figcaption {
  margin-top: 0.75rem;
  color: #616161;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* === Talks === */
.talks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.talk-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.talk-thumb {
  width: 200px;
  height: auto;
  border-radius: 4px;
  flex-shrink: 0;
  background: #eee;
}

.talk-info p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #666;
}

/* === Status Tags === */
.status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 4px;
}

.status--active {
  background: #e6f4ea;
  color: #1e7e34;
}

.status--planning {
  background: #fff8e1;
  color: #b8860b;
}

.status--starting {
  background: #e3f2fd;
  color: #1565c0;
}

.status--blocked {
  background: #eeeeee;
  color: #616161;
}

.status--done {
  background: #e8eaf6;
  color: #3949ab;
}

/* === Podcast === */
.podcast-desc {
  margin-bottom: 0.75rem;
}

.podcast-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.podcast-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  font-weight: 500;
}

.podcast-link:hover {
  color: #111;
  text-decoration: none;
}

.podcast-embed {
  min-height: 152px;
}

.podcast-embed iframe {
  display: block;
  border: 0;
}

.podcast-facade {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  height: 152px;
  padding: 0 1.1rem;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.podcast-facade:hover {
  background: #f2f2f2;
  border-color: #d5d5d5;
}

.podcast-facade-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1db954;
}

.podcast-facade-play svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.podcast-facade-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.podcast-facade-title {
  font-size: 1rem;
  font-weight: 650;
  color: #222;
}

.podcast-facade-hint {
  font-size: 0.85rem;
  color: #616161;
}


/* === GitHub Section === */
.gh-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.gh-repo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gh-repo-list li {
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.gh-repo-desc {
  font-size: 0.85rem;
  color: #666;
}

.gh-repo-meta {
  font-size: 0.8rem;
  color: #757575;
}

/* === Footer === */
footer {
  text-align: center;
  font-size: 0.85rem;
  color: #757575;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #666;
}

/* === Games === */
.game-list,
.tool-list {
  display: grid;
  gap: 1rem;
}

.game-card,
.tool-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: center;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.game-card--text-only {
  grid-template-columns: 1fr;
}

.game-card h2,
.tool-card h2 {
  margin-bottom: 0.35rem;
}

.game-card-meta {
  color: #616161;
  font-size: 0.9rem;
}

.game-card-visual {
  min-height: 150px;
}

.tool-card-visual {
  min-height: 150px;
  display: grid;
  place-items: center;
}

.tool-mark {
  --tool-accent: #0066cc;
  --tool-soft: rgba(0, 102, 204, 0.1);
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  gap: 0.25rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tool-accent) 30%, #d9d9d9);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--tool-soft), #fff 72%);
  color: var(--tool-accent);
  text-align: center;
}

.tool-mark::before,
.tool-mark::after {
  content: '';
  position: absolute;
  z-index: -1;
  border: 1px solid var(--tool-soft);
  border-radius: 999px;
}

.tool-mark::before {
  width: 145px;
  height: 145px;
  top: -74px;
  right: -42px;
}

.tool-mark::after {
  width: 90px;
  height: 90px;
  bottom: -50px;
  left: -24px;
}

.tool-mark span {
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.tool-mark strong {
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.025em;
}

.tool-mark--document {
  --tool-accent: #0b6b4f;
  --tool-soft: rgba(11, 107, 79, 0.11);
}

.tool-mark--strategy {
  --tool-accent: #7055a4;
  --tool-soft: rgba(112, 85, 164, 0.11);
}

.tool-mark--social {
  --tool-accent: #222;
  --tool-soft: rgba(34, 34, 34, 0.08);
}

.tool-mark--ads {
  --tool-accent: #1267d8;
  --tool-soft: rgba(18, 103, 216, 0.11);
}

.tool-mark--dashboard {
  --tool-accent: #b35c00;
  --tool-soft: rgba(179, 92, 0, 0.11);
}

.tool-mark--notes {
  --tool-accent: #8b3d65;
  --tool-soft: rgba(139, 61, 101, 0.11);
}

.mini-converter {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #dcded7;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(0,102,204,0.08), rgba(52,168,83,0.08)),
    #fafafa;
}

.mini-converter span {
  display: grid;
  place-items: center;
  min-height: 64px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-size: 1.35rem;
  font-weight: 800;
}

.mini-converter strong {
  color: #616161;
  font-size: 1.4rem;
}

.mini-protein-matrix {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  align-content: center;
  padding: 1rem;
  border: 1px solid #d9e3dc;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(11, 107, 79, 0.12), rgba(0, 102, 204, 0.07)), #fafafa;
}

.mini-protein-matrix span {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid #dce7df;
  border-radius: 8px;
  background: #fff;
  color: #315c49;
  font-size: 0.78rem;
  font-weight: 800;
}

.mini-protein-matrix strong {
  grid-column: 1 / -1;
  color: #0b6b4f;
  text-align: center;
  font-size: 1.15rem;
}

.mini-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(180deg, #237a4d, #155f3a);
  border: 2px solid rgba(255,255,255,0.75);
}

.mini-pitch::before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(255,255,255,0.75);
}

.mini-goal {
  position: absolute;
  left: 50%;
  top: 16px;
  width: 82px;
  height: 32px;
  border: 3px solid #fff;
  border-bottom: 0;
  transform: translateX(-50%);
}

.mini-ball {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 35%, #111 36% 48%, #fff 49%);
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.game-page {
  max-width: 1180px;
  background: #f6f7f3;
}

.tool-page {
  max-width: 1100px;
  background: #f7f8fa;
}

.converter-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.converter-board,
.converter-notes {
  border: 1px solid #e2e5ea;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.converter-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.8rem;
  margin-top: 1rem;
}

.converter-form label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #666;
}

.converter-form input,
.converter-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8dce2;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  background: #fff;
  color: #222;
  font: inherit;
}

.quick-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.quick-pairs button {
  min-height: 36px;
  border: 1px solid #d8dce2;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  background: #fff;
  color: #333;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.quick-pairs button:hover {
  border-color: #0066cc;
  color: #0066cc;
}

.converter-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.result-card {
  min-width: 0;
  border: 1px solid #e8eaee;
  border-radius: 8px;
  padding: 0.8rem;
  background: #fbfbfc;
}

.result-card span {
  display: block;
  margin-bottom: 0.25rem;
  color: #616161;
  font-size: 0.82rem;
  font-weight: 700;
}

.result-card strong {
  display: block;
  color: #222;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.result-card--primary {
  background: #eef6ff;
  border-color: #cfe3f8;
}

.converter-notes h2 {
  margin-bottom: 0.6rem;
}

.converter-notes ul {
  margin: 0;
  padding-left: 1.1rem;
}

.converter-notes li {
  margin-bottom: 0.35rem;
}

/* === Protein Choice Matrix === */
.protein-tool-page {
  max-width: 1180px;
  background: #f4f7f5;
}

.protein-tool-page main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.protein-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  padding: 1.25rem;
  border: 1px solid #dce5df;
  border-radius: 12px;
  background: linear-gradient(125deg, #fff 0 65%, #edf7f1 100%);
}

.protein-intro h1 {
  margin-top: 0.15rem;
}

.protein-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.protein-highlight-grid article,
.protein-ranking,
.protein-simple,
.protein-pending {
  padding: 1.25rem;
  border: 1px solid #dce5df;
  border-radius: 12px;
  background: #fff;
}

.protein-highlight-grid article {
  border-top: 3px solid #0b6b4f;
}

.protein-highlight-grid h3 {
  margin: 0.3rem 0 0.65rem;
  font-size: 1.1rem;
}

.protein-highlight-grid article p:last-child,
.protein-ranking > p,
.protein-simple > p,
.protein-pending > p {
  margin-bottom: 0;
}

.protein-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 0.9rem;
  border: 1px solid #dce5df;
  border-radius: 8px;
}

.protein-table {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.protein-table th,
.protein-table td {
  padding: 0.65rem;
  border-bottom: 1px solid #e6ece8;
  text-align: left;
  white-space: nowrap;
}

.protein-table thead { background: #edf7f1; }
.protein-table tbody tr:nth-child(even) { background: #f8faf8; }
.protein-table tbody tr:last-child th,
.protein-table tbody tr:last-child td { border-bottom: 0; }
.protein-table strong { color: #0b6b4f; }
.protein-volume { color: #69736d; font-weight: 500; }

.protein-simple-list,
.protein-pending ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.protein-simple-list li { padding: 0.2rem 0; }
.protein-simple-list li span:not(.protein-volume) {
  display: block;
  color: #68736d;
  font-size: 0.82rem;
}

.protein-sources {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #dce5df;
  font-size: 0.88rem;
}
.protein-sources summary { cursor: pointer; font-weight: 750; }
.protein-sources p { margin: 0.65rem 0 0; }

.protein-data-stamp {
  min-width: 150px;
  display: grid;
  padding: 0.9rem 1rem;
  border-left: 3px solid #0b6b4f;
}

.protein-data-stamp strong {
  color: #0b6b4f;
  font-size: 2.2rem;
  line-height: 1;
}

.protein-data-stamp span {
  color: #333;
  font-weight: 750;
}

.protein-data-stamp small {
  color: #69736d;
}

.protein-filter-board,
.protein-method,
.protein-faq {
  padding: 1.25rem;
  border: 1px solid #dce5df;
  border-radius: 12px;
  background: #fff;
}

.protein-filter-heading,
.protein-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.protein-filter-heading h2,
.protein-section-heading h2 {
  margin-bottom: 0;
}

.protein-result-count {
  margin: 0;
  color: #0b6b4f;
  font-size: 0.95rem;
  font-weight: 800;
}

.protein-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.protein-filter-buttons button,
.protein-clear {
  min-height: 42px;
  border: 1px solid #cad7cf;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: #fff;
  color: #315c49;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

.protein-filter-buttons button:hover,
.protein-filter-buttons button:focus-visible,
.protein-clear:hover,
.protein-clear:focus-visible {
  border-color: #0b6b4f;
  outline: none;
}

.protein-filter-buttons button[aria-pressed="true"] {
  border-color: #0b6b4f;
  background: #0b6b4f;
  color: #fff;
}

.protein-sort-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 360px) auto;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.9rem;
}

.protein-sort-row label {
  color: #58635d;
  font-size: 0.88rem;
  font-weight: 750;
}

.protein-sort-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cad7cf;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  background: #fff;
  color: #222;
  font: inherit;
}

.protein-clear {
  justify-self: start;
  border-radius: 8px;
  color: #616161;
}

.protein-filter-note,
.protein-legend,
.protein-answer-note {
  color: #68736d;
  font-size: 0.84rem;
}

.protein-filter-note {
  margin: 0.8rem 0 0;
}

.protein-legend {
  margin: 0;
}

.protein-legend span {
  font-weight: 800;
}

.protein-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.protein-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #dce5df;
  border-radius: 10px;
  background: #fff;
}

.protein-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.protein-card h3 {
  margin: 0.35rem 0 0.1rem;
  color: #24352c;
  font-size: 1.02rem;
  line-height: 1.4;
}

.protein-card-head > div > p:last-child {
  margin: 0;
  color: #747b77;
  font-size: 0.82rem;
}

.protein-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}

.protein-card-badges span {
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #edf7f1;
  color: #315c49;
  font-size: 0.72rem;
  font-weight: 750;
}

.protein-card-badges .is-caution {
  background: #fff3d9;
  color: #77530c;
}

.protein-cost {
  min-width: 112px;
  text-align: right;
}

.protein-cost span,
.protein-cost small {
  display: block;
  color: #747b77;
  font-size: 0.72rem;
}

.protein-cost strong {
  display: block;
  color: #0b6b4f;
  font-size: 1.25rem;
}

.protein-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.85rem 0 0;
}

.protein-metrics div {
  min-width: 0;
  padding: 0.55rem;
  border-radius: 7px;
  background: #f5f8f6;
}

.protein-metrics dt {
  color: #69736d;
  font-size: 0.72rem;
  font-weight: 700;
}

.protein-metrics dd {
  margin: 0.08rem 0 0;
  color: #24352c;
  font-size: 0.98rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.protein-metrics dd small {
  display: block;
  color: #747b77;
  font-size: 0.68rem;
  font-weight: 500;
}

.protein-empty {
  padding: 1.25rem;
  border: 1px dashed #b8c7bd;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.protein-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.protein-method-grid article {
  padding: 0.85rem;
  border-left: 3px solid #8cb9a1;
  background: #f5f8f6;
}

.protein-method-grid p {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.protein-faq > h2 {
  margin-bottom: 1rem;
}

.protein-faq article {
  padding: 1rem 0;
  border-top: 1px solid #e3e9e5;
}

.protein-faq article:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.protein-faq h3 {
  margin: 0 0 0.4rem;
  color: #24352c;
  font-size: 1.05rem;
}

.protein-faq article > p:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .protein-highlight-grid,
  .protein-simple-list,
  .protein-pending ul { grid-template-columns: 1fr; }

  .protein-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .protein-data-stamp {
    border-left: 0;
    border-top: 3px solid #0b6b4f;
  }

  .protein-results {
    grid-template-columns: 1fr;
  }

  .protein-method-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .protein-filter-heading,
  .protein-section-heading {
    display: block;
  }

  .protein-result-count,
  .protein-legend {
    margin-top: 0.35rem;
  }

  .protein-filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .protein-filter-buttons button {
    border-radius: 8px;
  }

  .protein-sort-row {
    grid-template-columns: 1fr;
  }

  .protein-card-head {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .protein-cost {
    text-align: left;
  }

  .protein-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-color-scheme: dark) {
  .mini-protein-matrix {
    border-color: #33463b;
    background: linear-gradient(145deg, rgba(35, 130, 91, 0.2), rgba(38, 88, 130, 0.14)), #181818;
  }

  .mini-protein-matrix span {
    border-color: #33463b;
    background: #1d1d1d;
    color: #83c7a5;
  }

  .mini-protein-matrix strong {
    color: #83c7a5;
  }

  .protein-tool-page {
    background: #101411;
  }

  .protein-intro,
  .protein-filter-board,
  .protein-card,
  .protein-method,
  .protein-faq,
  .protein-empty,
  .protein-highlight-grid article,
  .protein-ranking,
  .protein-simple,
  .protein-pending {
    border-color: #2a3930;
    background: #151a17;
  }

  .protein-intro {
    background: linear-gradient(125deg, #151a17 0 65%, #15241c 100%);
  }

  .protein-table-scroll { border-color: #2a3930; }
  .protein-table th, .protein-table td { border-color: #2a3930; }
  .protein-table thead { background: #1b3024; }
  .protein-table tbody tr:nth-child(even) { background: #1b211d; }
  .protein-table strong { color: #83c7a5; }
  .protein-simple-list li span:not(.protein-volume), .protein-volume { color: #9caaa1; }
  .protein-sources { border-color: #2a3930; }

  .protein-data-stamp strong,
  .protein-result-count,
  .protein-cost strong {
    color: #83c7a5;
  }

  .protein-data-stamp span,
  .protein-card h3,
  .protein-metrics dd,
  .protein-faq h3 {
    color: #e2e9e4;
  }

  .protein-data-stamp small,
  .protein-filter-note,
  .protein-legend,
  .protein-answer-note,
  .protein-cost span,
  .protein-cost small,
  .protein-card-head > div > p:last-child,
  .protein-metrics dt,
  .protein-metrics dd small {
    color: #9caaa1;
  }

  .protein-filter-buttons button,
  .protein-clear,
  .protein-sort-row select {
    border-color: #34463b;
    background: #1b211d;
    color: #c7d7cd;
  }

  .protein-filter-buttons button[aria-pressed="true"] {
    border-color: #83c7a5;
    background: #2b6e4d;
    color: #fff;
  }

  .protein-card-badges span,
  .protein-metrics div,
  .protein-method-grid article {
    background: #1b251f;
  }

  .protein-card-badges span {
    color: #9bd6b6;
  }

  .protein-card-badges .is-caution {
    background: #3a301b;
    color: #e7c978;
  }

  .protein-faq article {
    border-color: #2a3930;
  }
}

.shootout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.shootout-board,
.shootout-controls {
  border: 1px solid #e2e4dc;
  border-radius: 8px;
  background: #fff;
}

.shootout-board {
  padding: 1rem;
}

.shootout-copy {
  margin-bottom: 1rem;
}

.score-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #111;
  color: #fff;
}

.score-strip strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.score-strip > div:last-child {
  text-align: right;
}

.score-label {
  display: block;
  margin-bottom: 0.15rem;
  /* .score-strip 的底色永遠是 #111，兩種模式都用淺灰 */
  color: #999;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.score-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.pitch-scene {
  position: relative;
  min-height: 430px;
  margin-top: 1rem;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 72%, transparent 0 72px, rgba(255,255,255,0.72) 73px 75px, transparent 76px),
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #2d915c 0%, #1f7a4a 48%, #145d39 100%);
  border: 2px solid #fff;
}

.pitch-scene::before {
  content: '';
  position: absolute;
  left: 7%;
  right: 7%;
  top: 7%;
  bottom: 7%;
  border: 3px solid rgba(255,255,255,0.78);
}

.goal-frame {
  position: absolute;
  left: 50%;
  top: 40px;
  width: min(78%, 520px);
  height: 160px;
  border: 6px solid #f9f9f9;
  border-bottom: 0;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.22) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
}

.keeper {
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 34px;
  height: 78px;
  border-radius: 18px 18px 8px 8px;
  background: #f0c43c;
  transform: translateX(-50%);
  transition: transform 0.22s ease;
}

.keeper::before,
.keeper::after {
  content: '';
  position: absolute;
  top: 22px;
  width: 44px;
  height: 10px;
  border-radius: 12px;
  background: #f0c43c;
}

.keeper::before {
  right: 24px;
  transform: rotate(-18deg);
}

.keeper::after {
  left: 24px;
  transform: rotate(18deg);
}

.keeper[data-direction="left"] { transform: translateX(-165px) rotate(-14deg); }
.keeper[data-direction="center"] { transform: translateX(-50%) scaleY(1.06); }
.keeper[data-direction="right"] { transform: translateX(130px) rotate(14deg); }

.shot-target {
  position: absolute;
  top: 46%;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 50%;
  color: rgba(255,255,255,0.7);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.shot-target--left { left: 16%; }
.shot-target--center { left: 50%; transform: translateX(-50%); }
.shot-target--right { right: 16%; }

.penalty-spot {
  position: absolute;
  left: 50%;
  bottom: 126px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.ball {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 34%, #1f1f1f 35% 47%, #fff 48%);
  box-shadow: 0 14px 24px rgba(0,0,0,0.25);
  transform: translateX(-50%);
  transition: transform 0.32s ease, bottom 0.32s ease;
}

.ball[data-direction="left"] { transform: translate(-190px, -265px) scale(0.78); }
.ball[data-direction="center"] { transform: translate(-50%, -285px) scale(0.78); }
.ball[data-direction="right"] { transform: translate(156px, -265px) scale(0.78); }

.round-panel {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.shot-log {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shot-log li {
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: #555;
  font-size: 0.82rem;
}

.shootout-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.shootout-controls h2 {
  margin-bottom: 0.55rem;
}

.team-grid,
.direction-grid {
  display: grid;
  gap: 0.5rem;
}

.team-button,
.direction-button,
.reset-button {
  min-height: 42px;
  border: 1px solid #dcded7;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.team-button {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.55rem;
  align-items: center;
  text-align: left;
  padding: 0.45rem 0.55rem;
}

.team-button:hover,
.direction-button:hover,
.reset-button:hover {
  border-color: #1f7a4a;
}

.team-button.is-selected {
  border-color: #1f7a4a;
  background: #e8f4ee;
}

.team-flag {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.direction-grid {
  grid-template-columns: repeat(3, 1fr);
}

.direction-button {
  background: #113c2a;
  color: #fff;
}

.direction-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.reset-button {
  width: 100%;
  margin-top: 0.4rem;
}

.result-box {
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

/* === GitHub Section === */
.gh-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
}

.gh-stat-item {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

.gh-repo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gh-repo-list li {
  margin-bottom: 0.9rem;
  line-height: 1.5;
}

.gh-repo-name {
  font-weight: 600;
  display: block;
}

.gh-repo-desc {
  display: block;
  font-size: 0.9rem;
  color: #555;
  margin: 0.1rem 0 0.15rem;
}

.gh-repo-meta {
  display: block;
  font-size: 0.8rem;
  color: #6b6b6b;
}

/* === Responsive === */
@media (max-width: 600px) {
  body {
    padding: 24px 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .profile-photo {
    width: 160px;
    height: 160px;
  }

  .profile-picture {
    width: 160px;
    height: 160px;
  }

  .timeline-item {
    flex-direction: column;
    gap: 0.15rem;
  }

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

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

  .challenge-hero {
    padding-top: 1rem;
  }

  .challenge-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .problem-examples,
  .bet-exchange {
    grid-template-columns: 1fr;
  }

  .problem-examples li:nth-child(odd),
  .problem-examples li:nth-child(even) {
    padding: 0.8rem 0;
    border-left: 0;
  }

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

  .form-field--full {
    grid-column: auto;
  }

  .timeline-year {
    width: auto;
  }

  .talk-item {
    flex-direction: column;
  }

  .talk-thumb {
    width: 100%;
    max-width: 320px;
  }

  .game-card,
  .tool-card {
    grid-template-columns: 1fr;
  }

  .shootout-shell,
  .converter-shell {
    grid-template-columns: 1fr;
  }

  .converter-form,
  .converter-results {
    grid-template-columns: 1fr;
  }

  .score-strip {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .score-strip > div:last-child {
    text-align: left;
  }

  .score-main {
    justify-content: flex-start;
  }

  .pitch-scene {
    min-height: 360px;
  }

  .goal-frame {
    width: 86%;
    height: 128px;
  }

  .keeper[data-direction="left"] { transform: translateX(-118px) rotate(-14deg); }
  .keeper[data-direction="right"] { transform: translateX(84px) rotate(14deg); }
  .ball[data-direction="left"] { transform: translate(-128px, -220px) scale(0.78); }
  .ball[data-direction="center"] { transform: translate(-50%, -238px) scale(0.78); }
  .ball[data-direction="right"] { transform: translate(94px, -220px) scale(0.78); }

  .round-panel,
  .direction-grid {
    grid-template-columns: 1fr;
  }
}

/* === Long Bets === */
.bets-desc {
  margin-bottom: 0.75rem;
}

.bets-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bet-item {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.bet-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  margin: 0 0 0.8rem;
}

.bet-outcomes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bet-outcome {
  display: grid;
  grid-template-columns: 2.8rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
}

.bet-label {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-align: center;
}

.bet-label--yes {
  background: #e6f4ea;
  color: #1e7e34;
}

.bet-label--no {
  background: #fce8e8;
  color: #b71c1c;
}

.bet-bar {
  height: 7px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.bet-fill {
  height: 100%;
  border-radius: 4px;
}

.bet-fill--yes { background: #34a853; }
.bet-fill--no  { background: #e05252; }

.bet-pct {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  text-align: right;
}

.probability-history {
  margin-top: 1.25rem;
}

.probability-history h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #222;
}

.probability-chart {
  margin: 0.9rem 0 1rem;
  padding: 0.75rem;
  overflow-x: auto;
  border: 1px solid #e4e8e5;
  border-radius: 8px;
  background: #fcfdfc;
}

.probability-chart svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
  color: #555;
}

.chart-grid line {
  stroke: #dde3df;
  stroke-width: 1;
}

.chart-axis-labels text,
.chart-dates text {
  fill: currentColor;
  font-size: 12px;
}

.chart-axis-labels text {
  text-anchor: end;
}

.chart-dates text,
.chart-values text {
  text-anchor: middle;
}

.chart-area {
  fill: #34a853;
  opacity: 0.1;
}

.chart-line {
  fill: none;
  stroke: #34a853;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-points circle {
  fill: #fff;
  stroke: #25863f;
  stroke-width: 4;
}

.chart-values text {
  fill: #1e7e34;
  font-size: 15px;
  font-weight: 700;
}

.probability-table-wrap {
  overflow-x: auto;
}

.probability-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.probability-table th,
.probability-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #e8e8e8;
  text-align: left;
  vertical-align: top;
}

.probability-table th {
  color: #444;
  font-weight: 600;
}

.probability-table th:nth-child(2),
.probability-table td:nth-child(2),
.probability-table th:nth-child(3),
.probability-table td:nth-child(3) {
  white-space: nowrap;
}

.probability-up {
  color: #1e7e34;
  font-weight: 600;
}

.bet-evidence {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: #f8faf8;
  border-left: 3px solid #34a853;
  border-radius: 0 6px 6px 0;
}

.bet-evidence h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #222;
}

.evidence-timeline {
  margin: 0.85rem 0;
  padding-left: 1.35rem;
}

.evidence-timeline li {
  margin-bottom: 0.75rem;
}

.evidence-timeline li:last-child {
  margin-bottom: 0;
}

.evidence-timeline li > p {
  margin: 0.3rem 0 0;
}

.evidence-estimate {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #4f6354;
}

.bet-evidence-conclusion {
  margin-top: 1rem;
}

.source-note {
  margin-bottom: 0;
  font-size: 0.82rem;
  color: #666;
}

/* === Back Link === */
.back-link {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* === Project Entry (collapsible) === */
details.project-entry > summary { list-style: none; }
details.project-entry > summary::-webkit-details-marker { display: none; }

.project-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
  padding: 0.35rem 0 0.35rem 1.4rem;
  border-radius: 4px;
  position: relative;
  user-select: none;
}

.project-summary::before {
  content: '▶';
  position: absolute;
  left: 0;
  font-size: 0.6rem;
  color: #757575;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}

details[open] > .project-summary::before {
  transform: translateY(-50%) rotate(90deg);
}

.project-summary:hover { color: #0066cc; }
.project-summary:hover::before { color: #0066cc; }
.project-summary:focus-visible { outline: 2px solid #0066cc; outline-offset: 2px; }

.project-body {
  padding: 0.6rem 0 0.4rem 1.4rem;
  border-left: 2px solid #eee;
  margin-left: 0.1rem;
  margin-top: 0.3rem;
}

.project-body p {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: #555;
}

/* === Project Resources (file-list) === */
.project-resources {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-resources li {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.resource-icon { grid-row: 1; grid-column: 1; color: #6b6b6b; }
.resource-link { grid-row: 1; grid-column: 2; font-weight: 500; }
span.resource-link--note { color: #444; font-weight: 500; }
.resource-note { grid-row: 2; grid-column: 2; color: #6b6b6b; font-size: 0.8rem; margin-top: 0.1rem; }

/* === Projects Teaser (index.html) === */
.projects-teaser {
  list-style: none;
  padding: 0;
  margin: 0;
}

.projects-group-title {
  margin: 1.2rem 0 0.35rem;
  color: #616161;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-teaser li {
  display: grid;
  grid-template-columns: 5.5rem 1fr 130px auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
}

.projects-teaser li:last-child { border-bottom: none; }

.projects-teaser .teaser-year {
  color: #757575;
  font-size: 0.8rem;
}

.projects-teaser .teaser-note {
  color: #6b6b6b;
  font-size: 0.8rem;
}

.teaser-progress { display: flex; align-items: center; gap: 0.4rem; }
.teaser-progress-bar {
  flex: 1;
  height: 5px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}
.teaser-progress-fill {
  height: 100%;
  background: #34a853;
  border-radius: 3px;
}
.teaser-progress-pct {
  font-size: 0.72rem;
  color: #6b6b6b;
  min-width: 2.4rem;
  text-align: right;
}

@media (max-width: 600px) {
  .projects-teaser li {
    grid-template-columns: 5.5rem 1fr auto;
    row-gap: 0.3rem;
  }
  .projects-teaser .teaser-year { grid-column: 1; }
  .projects-teaser strong { grid-column: 2; }
  .projects-teaser .status { grid-column: 3; }
  .projects-teaser .teaser-note {
    grid-column: 2 / -1;
    grid-row: 2;
  }
  .teaser-progress { grid-column: 1 / -1; }
}

/* === Kanban (projects.html) === */
.kanban { display: flex; flex-direction: column; gap: 0.8rem; }
.kanban-col {
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  background: #f5f5f5;
}
.kanban-col-head::-webkit-details-marker { display: none; }
.kanban-col-head::before {
  content: '▶';
  font-size: 0.65rem;
  color: #6b6b6b;
  margin-right: 0.55rem;
  transition: transform 0.15s ease;
}
.kanban-col[open] > .kanban-col-head::before { transform: rotate(90deg); }
.kanban-col-title { flex: 1; font-size: 0.92rem; }
.kanban-col-count {
  font-size: 0.72rem;
  color: #6b6b6b;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1px 8px;
  min-width: 1.5rem;
  text-align: center;
}
.kanban-col-body { padding: 0.8rem 1rem; }
.kanban-empty { color: #757575; font-size: 0.9rem; margin: 0; }
.kanban-col-body .timeline-item { margin-bottom: 0.8rem; }
.kanban-col-body .timeline-item:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 0.75rem;
  }
  .kanban-col-head { cursor: default; }
  .kanban-col-head::before { display: none; }
  .kanban-col-body { padding: 0.7rem 0.8rem; }
  .kanban-col-body .timeline-year { font-size: 0.75rem; }
}

/* === Dark Mode === */
@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a1a;
    color: #e0e0e0;
  }

  p {
    color: #ccc;
  }

  a {
    color: #6db3f2;
  }

  hr {
    border-color: #444;
  }

  .tagline {
    color: #aaa;
  }

  .hero-identity,
  .hero-note {
    color: #aaa;
  }

  .landing-promise {
    color: #f0f0f0;
  }

  .social-links svg {
    fill: #aaa;
  }

  .social-links a:hover svg {
    fill: #fff;
  }

  .post-date {
    color: #999;
  }

  .loading {
    color: #777;
  }

  .featured-source {
    color: #999;
  }

  .article-breadcrumb,
  .article-breadcrumb a,
  .article-meta {
    color: #999;
  }

  .article-kicker {
    color: #6db3f2;
  }

  .article-flow {
    border-left-color: #6db3f2;
    background: #141414;
    color: #ddd;
  }

  .article-summary,
  .article-toc,
  .article-body pre {
    border-color: #2f3842;
    background: #141414;
  }

  .article-toc a:focus-visible,
  .article-body pre:focus-visible {
    outline-color: #6db3f2;
  }

  .article-body code,
  .article-body kbd {
    background: #292929;
  }

  .article-body kbd {
    border-color: #4a4a4a;
    box-shadow: 0 1px 0 #4a4a4a;
  }

  .article-body pre code {
    background: transparent;
  }

  .article-summary ul {
    color: #ccc;
  }

  .article-manuscript a {
    border-color: #3a3a3a;
  }

  .article-manuscript figcaption {
    color: #999;
  }

  .timeline::before {
    background: #444;
  }

  .timeline-item::before {
    background: #aaa;
    border-color: #1a1a1a;
  }

  .timeline-year {
    color: #999;
  }

  .timeline-detail {
    color: #ccc;
  }

  .talk-info p {
    color: #999;
  }

  footer {
    color: #666;
  }

  .footer-links a {
    color: #888;
  }

  .game-page {
    background: #111;
  }

  .game-card,
  .tool-card,
  .converter-board,
  .converter-notes,
  .shootout-board,
  .shootout-controls {
    background: #141414;
    border-color: #2a2a2a;
  }

  .game-card-meta,
  .shot-log li {
    color: #aaa;
  }

  .shot-log li,
  .team-button,
  .reset-button {
    background: #1d1d1d;
    border-color: #333;
    color: #e0e0e0;
  }

  .team-button.is-selected {
    background: #163223;
    border-color: #6fcf97;
  }

  .tool-page {
    background: #111;
  }

  .tool-mark {
    border-color: #333;
    background: linear-gradient(145deg, var(--tool-soft), #171717 72%);
  }

  .tool-mark--social {
    --tool-accent: #e0e0e0;
    --tool-soft: rgba(255, 255, 255, 0.07);
  }

  .mini-converter {
    background:
      linear-gradient(135deg, rgba(109,179,242,0.13), rgba(111,207,151,0.12)),
      #181818;
    border-color: #333;
  }

  .mini-converter span,
  .converter-form input,
  .converter-form select,
  .quick-pairs button {
    background: #1d1d1d;
    border-color: #333;
    color: #e0e0e0;
  }

  .converter-form label,
  .result-card span {
    color: #aaa;
  }

  .mini-converter strong {
    color: #8a8a8a;
  }

  .result-card {
    background: #1a1a1a;
    border-color: #333;
  }

  .result-card strong {
    color: #e0e0e0;
  }

  .result-card--primary {
    background: #15263a;
    border-color: #26486c;
  }

  .result-box {
    border-top-color: #333;
  }

  .profile-photo {
    background: #333;
  }

  .talk-thumb {
    background: #333;
  }

  .status--active {
    background: #1b3a26;
    color: #6fcf97;
  }

  .status--planning {
    background: #3a3520;
    color: #f0c040;
  }

  .status--starting {
    background: #1a2a3a;
    color: #64b5f6;
  }

  .status--blocked {
    background: #2a2a2a;
    color: #999;
  }

  .status--done {
    background: #24263a;
    color: #9fa8da;
  }

  .podcast-link {
    color: #aaa;
  }

  .podcast-link:hover {
    color: #fff;
  }

  .page-nav a {
    color: #8a8a8a;
  }

  .podcast-facade {
    border-color: #2a2a2a;
    background: #141414;
  }

  .podcast-facade:hover {
    background: #1c1c1c;
    border-color: #383838;
  }

  .podcast-facade-title {
    color: #eee;
  }

  .podcast-facade-hint {
    color: #a0a0a0;
  }

  .gh-stats {
    color: #999;
  }

  .gh-stat-item {
    color: #999;
  }

  .gh-repo-desc {
    color: #999;
  }

  .gh-repo-meta {
    color: #8a8a8a;
  }

  .service-card {
    background: #141414;
    border-color: #2a2a2a;
  }

  .proof-card {
    background: #141414;
    border-color: #2a2a2a;
  }

  .proof-card .proof-capability {
    color: #64b5f6;
  }

  .proof-card .proof-meta {
    color: #888;
  }

  .service-kicker,
  .service-step-num {
    color: #888;
  }

  .service-list {
    color: #bbb;
  }

  .challenge-form {
    background: #141414;
    border-color: #2a2a2a;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    background: #1d1d1d;
    border-color: #3a3a3a;
    color: #e0e0e0;
  }

  .challenge-form .form-privacy {
    color: #999;
  }

  .form-success {
    background: #163223;
    border-color: #315d40;
    color: #8ee0aa;
  }

  .challenge-promise {
    color: #f0f0f0;
  }

  .problem-examples,
  .problem-examples li,
  .problem-examples li:nth-child(even) {
    border-color: #333;
  }

  .bet-exchange p {
    background: #141414;
  }

  .challenge-microcopy,
  .challenge-boundary,
  .legal-note p {
    color: #999;
  }

  .legal-note {
    background: #141414;
    border-color: #2a2a2a;
  }

  /* --- Dark: long bets --- */
  .bet-item {
    border-color: #333;
  }

  .bet-question {
    color: #e0e0e0;
  }

  .bet-label--yes {
    background: #1b3a26;
    color: #6fcf97;
  }

  .bet-label--no {
    background: #3a1b1b;
    color: #f48484;
  }

  .bet-bar {
    background: #2a2a2a;
  }

  .bet-pct {
    color: #aaa;
  }

  .probability-history h3 {
    color: #e0e0e0;
  }

  .probability-chart {
    background: #121512;
    border-color: #2a322c;
  }

  .probability-chart svg {
    color: #aaa;
  }

  .chart-grid line {
    stroke: #303832;
  }

  .chart-area {
    fill: #6fcf97;
  }

  .chart-line {
    stroke: #6fcf97;
  }

  .chart-points circle {
    fill: #141414;
    stroke: #6fcf97;
  }

  .chart-values text,
  .probability-up {
    fill: #6fcf97;
    color: #6fcf97;
  }

  .probability-table th,
  .probability-table td {
    border-bottom-color: #303030;
  }

  .probability-table th {
    color: #bbb;
  }

  .bet-evidence {
    background: #141914;
    border-left-color: #6fcf97;
  }

  .bet-evidence h3 {
    color: #e0e0e0;
  }

  .evidence-estimate {
    color: #9fc9aa;
  }

  .source-note {
    color: #999;
  }

  /* --- Dark: project entries --- */
  .project-summary { color: #e0e0e0; }
  .project-summary::before { color: #666; }
  .project-summary:hover { color: #6db3f2; }
  .project-summary:hover::before { color: #6db3f2; }
  .project-summary:focus-visible { outline-color: #6db3f2; }
  .project-body { border-left-color: #333; }
  .project-body p { color: #bbb; }
  .resource-icon { color: #666; }
  span.resource-link--note { color: #ccc; }
  .resource-note { color: #777; }

  /* --- Dark: index teaser list --- */
  .projects-teaser li { border-bottom-color: #2a2a2a; }
  .projects-teaser .teaser-year { color: #8a8a8a; }
  .projects-teaser .teaser-note { color: #888; }
  .projects-group-title { color: #888; }
  .teaser-progress-bar { background: #2a2a2a; }
  .teaser-progress-pct { color: #888; }

  /* --- Dark: kanban --- */
  .kanban-col { border-color: #2a2a2a; }
  .kanban-col-head { background: #1a1a1a; color: #e0e0e0; }
  .kanban-col[open] { background: #141414; }
  .kanban-col-head::before { color: #888; }
  .kanban-col-count { background: #222; color: #aaa; }
  .kanban-empty { color: #555; }
}

/* === Wide-page (projects.html) === */
@media (min-width: 768px) {
  body.wide-page { max-width: 1040px; }
}
