/* Editorial reading layout.
   Off-white page, near-black text, one ~680px column.
   Source Serif 4 for headlines and body. DM Sans for chrome, dates, and captions.
   One accent, --link, is used for links and data only.
   No backdrop-filter and no animation on this sheet. Jungle mode loads separately. */

@font-face {
  font-family: Lack;
  src: url("/fonts/Lack-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lack Line";
  src: url("/fonts/Lack-Line-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --bg-soft: #f3f1ec;
  --paper: #fffcf8;
  --ink: #1c1b19;
  --muted: #5e5c57;
  --muted-2: #6f6c66;
  --dim: #8a867e;
  --link: #0c6b45;
  --accent: var(--link);
  --rule: #e4e0d8;
  --rule-strong: #d4cfc5;
  --slot: #e7e4dc;
  --maxw: 1100px;
  --reading: 680px;
  --font-serif: "Source Serif 4", "Noto Sans JP", "Hiragino Mincho ProN", "Yu Mincho", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "DM Sans", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-display: var(--font-serif);
  --font-display-italic: var(--font-serif);
  --radius: 0;
  --radius-sm: 0;
  --radius-pill: 0;
  --ease: 0.01s linear;
  --ease-spring: 0.01s linear;
}

html[lang="ja"] {
  --font-serif: "Source Serif 4", "Noto Sans JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans: "DM Sans", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

html[lang="ja"] body {
  line-height: 1.85;
}

html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3,
html[lang="ja"] .home-intro,
html[lang="ja"] .lede {
  word-break: auto-phrase;
  line-break: strict;
}

.term-nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-size: 20px;
  scroll-behavior: auto;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.014em;
  line-height: 1.18;
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: rgba(28, 27, 25, 0.28);
}

a:hover {
  text-decoration-color: currentColor;
}

main a,
.footnotes a,
.colophon a,
.not-found-links a,
.gate-panel a {
  color: var(--link);
  text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent);
}

main a:visited,
.footnotes a:visited,
.colophon a:visited {
  color: var(--link);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

:target {
  scroll-margin-top: 5.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.nav {
  width: min(var(--maxw), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.7rem 0;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 44px;
}

.brand-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  margin-right: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.logo img {
  width: 28px;
  height: 28px;
  border-radius: 22%;
}

.brand-ext,
.nav-cta-bar {
  display: none;
}

.nav-cta,
.nav-cta-bar,
.nav-cta-menu,
.nav-ext,
.brand-ext {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}

.brand-ext:hover,
.nav-cta:hover {
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.95rem;
  margin-top: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--link);
  text-underline-offset: 0.28em;
}

.lang-switcher {
  display: inline-flex;
  gap: 0.45rem;
}

.lang-switcher a[aria-current="true"] {
  text-decoration: underline;
  text-decoration-color: var(--link);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.15rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
}

.nav-toggle-bars {
  width: 16px;
  height: 10px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}

.nav-toggle-text {
  white-space: nowrap;
}

.jm {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  margin: 0;
  padding: 0.35rem 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.jm .leaf {
  display: none;
  width: 16px;
  height: 16px;
}

.jm .track {
  display: inline-block;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #d9d4cb;
  position: relative;
  flex: none;
}

.jm .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}

html.jungle .jm .leaf {
  display: block;
}

html.jungle .jm .knob {
  transform: translateX(16px);
}

.jm:hover {
  color: var(--ink);
}

html.jungle .jm {
  color: var(--ink);
}

main {
  position: relative;
  z-index: 2;
  width: min(var(--reading), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.6rem 0 4.5rem;
}

.home-kicker,
.kicker,
.eyebrow,
.card-kicker,
.article-meta,
.status-label {
  margin: 0 0 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-title {
  margin: 0;
  font-size: 2.7rem;
  line-height: 1.05;
}

.home-intro,
.lede,
.page-hero .lead,
.article-header .lead,
.hero .lead {
  margin: 1rem 0 0;
  font-size: 1.28rem;
  line-height: 1.5;
  color: var(--ink);
}

.home-actions,
.colophon {
  margin: 1.15rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.index-label {
  margin: 3.2rem 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.news-index {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-index > li {
  display: grid;
  grid-template-columns: 8.2rem minmax(0, 1fr);
  gap: 0.4rem 1.2rem;
  padding: 1.25rem 0 1.35rem;
  border-top: 1px solid var(--rule);
}

.news-index time {
  padding-top: 0.28rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.news-index h3 {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.news-index h3 a {
  color: var(--ink);
  text-decoration-color: transparent;
}

.news-index h3 a:hover {
  color: var(--link);
  text-decoration-color: var(--link);
}

.news-index p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.index-note {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

.post-header {
  margin-bottom: 1.6rem;
}

.post-header h1,
.page-hero h1,
.article-header h1,
.hero h1 {
  margin: 0.15rem 0 0.7rem;
  font-size: 2.4rem;
  line-height: 1.12;
}

.post-date,
.article-meta time {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
}

.post > p,
.article-body > p,
.page-hero > p.lead {
  margin: 0 0 1.15em;
}

.post h2,
.article-body h2,
.api-list h2 {
  margin: 2.1rem 0 0.7rem;
  font-size: 1.45rem;
}

.post h3,
.article-body h3 {
  margin: 1.6rem 0 0.45rem;
  font-size: 1.15rem;
}

.post-figure,
.article-body figure {
  margin: 1.8rem 0 1.6rem;
}

.figure-slot {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  min-height: 16rem;
  padding: 1.5rem;
  background: var(--slot);
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--rule-strong);
}

.figure-slot p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.45;
}

.figure-slot-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

figcaption {
  margin-top: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted-2);
}

sup {
  font-family: var(--font-sans);
  font-size: 0.65em;
  line-height: 0;
}

sup a {
  color: var(--link);
  text-decoration: none;
  padding: 0 0.12em;
}

.data-table,
.article-body table,
.api-table {
  width: 100%;
  margin: 0.4rem 0 1.3rem;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.45;
}

.data-table th,
.data-table td,
.article-body th,
.article-body td,
.api-table th,
.api-table td {
  padding: 0.55rem 0.8rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.data-table th,
.article-body th,
.api-table th {
  font-weight: 500;
  color: var(--muted);
}

.data-table td:first-child {
  color: var(--link);
  font-weight: 500;
}

.article-body ol,
.article-body ul,
.post ol,
.post ul {
  margin: 0 0 1.15em;
  padding-left: 1.2rem;
}

.article-body li + li,
.post li + li {
  margin-top: 0.35em;
}

.article-body blockquote {
  margin: 1.4rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 2px solid var(--rule-strong);
  color: var(--ink);
}

.note-box {
  margin: 1.4rem 0;
  padding: 0.9rem 0 0.9rem 1rem;
  border-left: 2px solid var(--rule-strong);
  background: transparent;
  font-size: 1rem;
}

.note-box strong {
  font-weight: 600;
}

.code-block {
  margin: 0.8rem 0 1.2rem;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.footnotes {
  margin-top: 2.8rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--rule);
}

.footnotes h2 {
  margin: 0.8rem 0 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footnotes ol {
  margin: 0;
  padding-left: 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

.footnotes li {
  margin: 0 0 0.7rem;
}

.footnotes li:target {
  color: var(--ink);
}

.waitlist-form {
  margin: 2rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.waitlist-form h2,
.waitlist-form h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.waitlist-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
}

.waitlist-form input[type="email"],
.gate-panel input[type="password"] {
  display: block;
  width: 100%;
  max-width: 24rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.waitlist-form button,
.gate-panel button {
  margin-top: 0.85rem;
  padding: 0.15rem 0;
  border: 0;
  border-bottom: 1px solid var(--link);
  background: transparent;
  color: var(--link);
  font: inherit;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  cursor: pointer;
}

.waitlist-status {
  min-height: 1.3em;
  margin: 0.7rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.waitlist-status[data-state="success"] {
  color: var(--link);
}

.waitlist-status[data-state="error"] {
  color: #8a1f1f;
}

.breadcrumb {
  margin: 0 0 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--dim);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--link);
}

.page-hero,
.article-header {
  margin-bottom: 1.5rem;
}

.hero {
  display: block;
}

.hero-brand,
.serif {
  display: block;
}

.sticker,
#puma {
  display: none;
}

.section {
  margin-top: 2.4rem;
}

.section-title {
  margin-bottom: 0.6rem;
}

.section-title p,
.about-grid p,
.project-card p,
.research-card p,
.feature p,
.team-card p {
  color: var(--ink);
}

.project-grid,
.research-grid,
.feature-grid,
.about-grid,
.platform-grid {
  display: block;
}

.project-card,
.research-card,
.feature,
.team-card,
.app-panel,
.platform-card {
  margin: 0;
  padding: 1.15rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-card h2,
.project-card h3,
.research-card h3,
.feature h3 {
  margin: 0.25rem 0 0.4rem;
  font-size: 1.3rem;
}

.project-card h2 a,
.research-card h3 a {
  color: var(--ink);
  text-decoration-color: transparent;
}

.project-card h2 a:hover,
.research-card h3 a:hover,
.text-link {
  color: var(--link);
}

.platform-card strong {
  display: block;
  color: var(--link);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.platform-card span,
.backer-list span {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--link);
}

.backer-list {
  margin: 0.4rem 0 1.6rem;
  padding: 0;
  list-style: none;
}

.backer-list li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}

.backer-list strong {
  font-family: var(--font-serif);
  font-weight: 600;
}

.backer-list-more {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
}

.byline-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.byline-card img {
  width: 48px;
  height: 48px;
  border-radius: 22%;
}

.byline-card p {
  margin: 0.2rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
}

.article-footer .cta-row,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-top: 1rem;
}

.primary,
.ghost {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent);
  background: transparent;
  border: 0;
  padding: 0;
}

.api-list {
  overflow-x: auto;
}

.gate {
  min-height: calc(100vh - 8rem);
  display: grid;
  align-items: start;
}

.gate-panel {
  width: min(100%, 26rem);
}

.gate-panel h1 {
  margin: 0.2rem 0 0.8rem;
  font-size: 2.15rem;
}

.gate-panel .lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.gate-error {
  color: #8a1f1f;
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.not-found-links {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.not-found-links li + li {
  margin-top: 0.45rem;
}

.site-footer {
  position: relative;
  z-index: 2;
  width: min(var(--reading), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.6rem 0 2.8rem;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 1rem;
}

.footer-brand {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  text-decoration: none;
}

.site-footer p {
  margin: 0.3rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--link);
}

.footer-copy {
  color: var(--dim);
}

@media (min-width: 961px) {
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }

  .nav-bar {
    flex: none;
  }

  .nav-links {
    margin-top: 0;
    justify-content: flex-end;
  }

  .nav-ext,
  .nav-cta-menu {
    display: inline;
  }
}

@media (min-width: 961px) and (max-width: 1279px) {
  .nav-ext {
    display: none;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 0.35rem;
    padding: 0.35rem 0 0.6rem;
    border-top: 1px solid var(--rule);
  }

  .nav.is-open .nav-links {
    display: flex;
  }

  .nav-links a,
  .lang-switcher {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-ext,
  .nav-cta-menu {
    display: inline-flex;
  }
}


@media (max-width: 520px) {
  .jm .track,
  .jm .leaf {
    display: none;
  }

  html.jungle .jm .lbl {
    color: var(--link);
  }
}

@media (max-width: 1199px) {
  html {
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  .nav,
  main,
  .site-footer {
    width: min(var(--reading), calc(100% - 2rem));
  }

  .home-title {
    font-size: 2.15rem;
  }

  .home-intro,
  .lede,
  .page-hero .lead,
  .article-header .lead {
    font-size: 1.15rem;
  }

  .post-header h1,
  .page-hero h1,
  .article-header h1 {
    font-size: 2.05rem;
  }

  .news-index > li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .news-index time {
    padding-top: 0;
  }

  .figure-slot {
    min-height: 12rem;
  }

  .byline-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
