:root {
  --paper: #ecebe6;
  --sheet: #f6f5f1;
  --ink: #121212;
  --mute: #5a5a5a;
  --rule: #121212;
  --line: #cfcbc3;
  --hi: #121212;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans SC", "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

.page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.kicker {
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif; }
h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sum {
  margin: 0 0 22px;
  color: var(--mute);
  font-size: 14px;
  max-width: 62ch;
  line-height: 1.7;
}

.btn-ink,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule);
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2a2a2a; }
.btn-line { background: transparent; }
.btn-line:hover { background: #fff; }

/* mast */
.mast {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.mast-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.id {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.id img { width: 36px; height: 36px; }
.id strong { display: block; font-size: 14px; font-weight: 700; }
.id em {
  display: block;
  font-style: normal;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--mute);
}
.get {
  flex-shrink: 0;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border: 1px solid var(--rule);
}

/* sheets */
.sheet {
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.sheet.brief { padding-top: 28px; }

.brief-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}
.brief-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brief h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.line {
  margin: 14px 0 0;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
}
.line span {
  border-bottom: 2px solid var(--ink);
}
.lead {
  margin: 16px 0 0;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.75;
}
.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 28px 0 0;
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.meta > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.meta > div:nth-child(odd) { border-right: 1px solid var(--line); }
.meta > div:nth-last-child(-n+2) { border-bottom: 0; }
.meta dt {
  margin: 0;
  color: var(--mute);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.meta dd { margin: 0; font-weight: 600; }

.fig {
  margin: 0;
  border: 1px solid var(--rule);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.fig img {
  width: 100%;
  flex: 1;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
  max-height: min(560px, calc(100vh - 180px));
}
.fig figcaption,
.metric-fig figcaption {
  padding: 8px 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--rule);
}

/* query */
.query-box {
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.query-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.query-row label,
.query-row > span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mute);
}
.query-row input {
  width: 100%;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  border-radius: 0;
}
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0;
}
.opts button.on,
.opts button:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.query-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--mute);
}
.query-foot strong { color: var(--ink); font-size: 14px; }

/* tables */
.tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tables article {
  border: 1px solid var(--rule);
  background: #fff;
}
.tables header {
  padding: 10px 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
}
.tables th,
.tables td,
.watch th,
.watch td {
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.tables th,
.watch th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  color: var(--mute);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.tables td:first-child,
.tables td:nth-child(3),
.tables td:last-child {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.tables tr:last-child td,
.watch tr:last-child td { border-bottom: 0; }

/* calendar */
.cal-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 12px;
}
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--rule);
  background: #fff;
}
.week button {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 16px 8px;
  cursor: pointer;
  text-align: left;
}
.week button:last-child { border-right: 0; }
.week button.on { background: var(--ink); color: #fff; }
.week b {
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.week span {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0 4px;
}
.week em {
  font-style: normal;
  font-size: 11px;
  color: var(--mute);
}
.week button.on em { color: #bbb; }
.cal-log {
  border: 1px solid var(--rule);
  background: var(--sheet);
  padding: 14px;
}
.cal-log header {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.cal-log ul {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}
.cal-log li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.cal-log time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--mute);
}
.hint { margin: 0; font-size: 12px; color: var(--mute); }

/* atlas */
.atlas {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  background: #fff;
}
.atlas li {
  display: grid;
  grid-template-columns: 72px 1fr 64px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.atlas li:last-child { border-bottom: 0; }
.atlas i {
  display: block;
  height: 8px;
  background: #e4e1da;
  position: relative;
}
.atlas i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--n);
  background: var(--ink);
}
.atlas span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  text-align: right;
}

/* dossier */
.dossier {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--rule);
  background: #fff;
}
.dossier figure { margin: 0; border-right: 1px solid var(--rule); }
.dossier img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
  min-height: 280px;
}
.dossier-body { padding: 18px 20px; }
.code {
  margin: 0 0 6px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mute);
}
.dossier-body h3 {
  margin: 0 0 14px;
  font-size: 24px;
}
.dossier-body dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}
.dossier-body dl > div {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.dossier-body dt {
  margin: 0 0 2px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--mute);
}
.dossier-body dd { margin: 0; }
.blurb {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--mute);
  line-height: 1.7;
}

/* watch */
.watch-table-wrap {
  border: 1px solid var(--rule);
  background: #fff;
  overflow-x: auto;
}
.watch input { accent-color: #121212; }

/* metrics */
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.metrics > article,
.metric-fig {
  border: 1px solid var(--rule);
  background: #fff;
  padding: 14px;
  margin: 0;
}
.metric-fig { padding: 0; }
.metric-fig img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
}
.metrics header {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.metrics > article p {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--mute);
  line-height: 1.65;
}
.bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 120px;
  border-bottom: 1px solid var(--rule);
  padding-top: 8px;
}
.bars span {
  flex: 1;
  background: var(--ink);
}
.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stack li { font-size: 12px; }
.stack i {
  display: block;
  height: 6px;
  margin-top: 4px;
  background: var(--ink);
}
.score strong {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.score span { color: var(--mute); font-size: 13px; margin-left: 8px; }

/* notes */
.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.notes article {
  border: 1px solid var(--rule);
  background: #fff;
  padding: 14px;
}
.notes header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.notes time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--mute);
  font-size: 11px;
}
.notes p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

/* faq */
.faq {
  border: 1px solid var(--rule);
  background: #fff;
}
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.7;
}

/* build */
.build {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.build > div {
  border: 1px solid var(--rule);
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.build h3 { margin: 6px 0 10px; font-size: 22px; }
.build p { margin: 0 0 16px; color: var(--mute); font-size: 14px; line-height: 1.7; }
.build .btn-ink,
.build .btn-line { align-self: flex-start; margin-top: auto; }
.build-meta { margin: 12px 0 0; }

.colophon {
  padding: 28px 0 96px;
  font-size: 12px;
  color: var(--mute);
}
.colophon p { margin: 0 0 6px; }

.dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 12px 16px;
  border: 1px solid var(--rule);
}

.glass {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(18, 18, 18, 0.92);
  display: grid;
  place-items: center;
  padding: 24px;
}
.glass[hidden] { display: none; }
.glass img {
  max-width: min(420px, 92vw);
  max-height: 86vh;
  border: 1px solid #fff;
}
.glass-x {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 960px) {
  .brief-grid,
  .tables,
  .cal-grid,
  .dossier,
  .metrics,
  .notes,
  .build {
    grid-template-columns: 1fr;
  }
  .week { grid-template-columns: repeat(4, 1fr); }
  .week button { border-bottom: 1px solid var(--line); }
  .fig img { max-height: 420px; }
  .meta > div { grid-template-columns: 80px 1fr; }
  .meta > div:nth-child(odd) { border-right: 0; }
}

@media (max-width: 640px) {
  .query-row { grid-template-columns: 1fr; gap: 8px; }
  .week { grid-template-columns: repeat(2, 1fr); }
  .dossier-body dl { grid-template-columns: 1fr; }
  .brief h1 { font-size: clamp(40px, 14vw, 56px); }
}
