/* Swiss Modernism 2.0 — 12 column grid, black / white, glass modules */
:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #555555;
  --line: rgba(0, 0, 0, 0.18);
  --line-soft: rgba(0, 0, 0, 0.1);
  --glass: rgba(255, 255, 255, 0.62);
  --unit: 0.5rem;
  --r: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Outfit", "Rubik", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--ink);
  background-color: #fff;
  background-image:
    radial-gradient(760px 460px at 12% -6%, #e9e9e9 0%, rgba(255, 255, 255, 0) 68%),
    radial-gradient(620px 420px at 96% 4%, #efefef 0%, rgba(255, 255, 255, 0) 70%);
  overflow-x: clip;
}

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

a {
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

dl,
dt,
dd {
  margin: 0;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 1.25rem 0;
}

:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

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

.skip {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  background: #000;
  color: #fff;
  text-decoration: none;
}

/* ---------- masthead ---------- */
.masthead {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--ink);
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow: hidden;
  flex: 0 0 auto;
}

.mark-img {
  width: 100%;
  height: 44px;
  object-fit: cover;
  display: block;
}

.brand {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.finder {
  margin-left: auto;
}

.finder-input {
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
  width: min(260px, 58vw);
  padding: 0.45rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  appearance: none;
}

.finder-input::placeholder {
  color: #6b6b6b;
}

.pills {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
}

.pills::-webkit-scrollbar {
  display: none;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.4rem 1.05rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.6);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pill:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}

.pill[hidden] {
  display: none;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 70vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1rem 2.5rem;
  border-bottom: 1px solid var(--ink);
}

.hero-copy {
  grid-column: 1 / span 8;
}

.hero h1 {
  font-size: clamp(2.1rem, 6.2vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--mute);
  line-height: 1.6;
}

.hero-art-wrap {
  grid-column: 9 / span 4;
  align-self: center;
}

.hero-art {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: #fff;
}

.stamp {
  position: absolute;
  top: 1.6rem;
  right: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  transform: rotate(-3deg);
}

/* ---------- grid shell ---------- */
.wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1rem 0;
  align-items: start;
}

.body-col {
  grid-column: 1 / span 8;
  min-width: 0;
}

.side {
  grid-column: 10 / span 3;
  position: sticky;
  top: 76px;
  padding: 1.1rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.side h2 {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.side hr {
  height: 2px;
  background: var(--ink);
  margin: 0.6rem 0 0.75rem;
}

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0;
  font-size: 0.94rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.side-list li:last-child a {
  border-bottom: 0;
}

.side-list a:hover {
  text-decoration: underline;
}

/* ---------- prose ---------- */
.prose {
  font-size: 1.02rem;
}

.prose [id] {
  scroll-margin-top: 96px;
}

.prose article {
  margin: 0 0 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.25s ease;
}

.prose article:hover {
  border-color: var(--ink);
}

.prose article.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.prose article.reveal.in {
  opacity: 1;
  transform: none;
}

.prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.prose h2 + hr {
  height: 2px;
  background: var(--ink);
  width: 100%;
  margin: 0.7rem 0 1.15rem;
}

.prose h3 {
  font-size: 1.12rem;
  margin: 1.6rem 0 0.6rem;
}

.prose h3 + hr {
  margin: 0.55rem 0 0.9rem;
}

.prose p,
.prose li {
  line-height: 1.72;
  max-width: 68ch;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 1.15rem;
}

.prose blockquote {
  margin: 0 0 1rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--ink);
  color: var(--mute);
}

.prose img {
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  margin: 0 0 1rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

.prose code,
.prose pre {
  font-family: "Rubik", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
}

.prose pre {
  overflow-x: auto;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.85);
}

/* ---------- footer ---------- */
.colophon {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 1.5rem 1rem 1.75rem;
  border-top: 1px solid var(--ink);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.foot-cols dt {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding-bottom: 0.45rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.foot-cols dd {
  font-size: 0.94rem;
  color: var(--mute);
  word-break: break-word;
}

.foot-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.94rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-cols a:hover {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.wordmark {
  margin: 2rem 0 1rem;
  font-size: clamp(2.6rem, 15vw, 10.5rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
  word-break: break-word;
}

.fine {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.86rem;
  color: var(--mute);
}

/* ---------- narrow ---------- */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .hero-art-wrap {
    grid-column: 1 / -1;
    max-width: 420px;
  }

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

  .body-col,
  .side {
    grid-column: 1 / -1;
  }

  .side {
    position: static;
    order: 2;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .brand-line {
    padding: 0.75rem 0.85rem;
  }

  .finder {
    margin-left: 0;
    width: 100%;
  }

  .finder-input {
    width: 100%;
  }

  .pills {
    padding: 0.5rem 0.85rem;
  }

  .wrap,
  .hero {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .prose article {
    padding: 1.15rem;
  }

  .foot-cols {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .colophon {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .stamp {
    position: static;
    display: inline-block;
    margin-bottom: 0.9rem;
    transform: rotate(-2deg);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .prose article.reveal {
    opacity: 1;
    transform: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
