@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---------------------------------------------------------
   airdrop ROI
   設計: 帳簿。数字が主役、日本語は黒子。
   色は符号（収支）にしか使わない。
   --------------------------------------------------------- */

:root {
  --paper:      #edeff0;
  --paper-deep: #e3e6e8;
  --panel:      #f7f8f8;
  --ink:        #16191c;
  --ink-mid:    #454e53;
  --ink-soft:   #6d777c;
  --rule:       #c6ccd0;
  --rule-soft:  #d8dde0;
  --plus:       #1b6e4a;
  --minus:      #a6362b;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --jp: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
        "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP",
        "Meiryo", sans-serif;

  --measure: 34rem;
  --wide: 44rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--jp);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 1;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- 見出し・本文 ------------------------------------- */

h1, h2, h3 { font-weight: 600; letter-spacing: 0.01em; margin: 0; }

h1 { font-size: 1.0rem; line-height: 1.6; }

h2 {
  font-size: 0.94rem;
  line-height: 1.6;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.4rem;
}

h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

p { margin: 0 0 1.2rem; max-width: var(--measure); }

p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-mid); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.note {
  font-size: 0.8rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* --- ヘッダ ------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 0 1.1rem;
}

.brand {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-block;
}

.brand span { color: var(--ink-soft); font-weight: 400; }

.tagline {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

/* --- 見出し（表のキャプションを兼ねる） ------------------ */

.caption {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.005em;
  margin: 2rem 0 0.5rem;
}

.sub {
  margin: 0 0 1.1rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  max-width: 38rem;
}

/* --- 集計行 --------------------------------------------- */

.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.55rem;
  padding: 0.6rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  font-size: 0.86rem;
  color: var(--ink-mid);
}

.summary b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

.summary .total { font-size: 1rem; }
.summary .sep { color: var(--rule); }

.summary .asof {
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

/* --- 記録テーブル（本体） -------------------------------- */

.tablewrap {
  margin-top: -1px;
  border: 1px solid var(--rule);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ledger-table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.86rem;
}

.ledger-table th,
.ledger-table td {
  padding: 0.62rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--rule-soft);
  white-space: nowrap;
}

.ledger-table thead th {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}

.ledger-table .r { text-align: right; }

.ledger-table tbody td:nth-child(n+4):nth-child(-n+7) {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ledger-table .c-name {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.ledger-table thead .c-name { background: var(--panel); }

.ledger-table tbody tr:last-child td { border-bottom: 0; }
.ledger-table tbody tr:hover td { background: #f6f8f8; }
.ledger-table tbody tr:hover .c-name { background: #f6f8f8; }

.ledger-table .empty td {
  padding: 2.6rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  white-space: normal;
  text-align: center;
}

.tablenote {
  margin: 0.75rem 0 0;
  max-width: 38rem;
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

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

/* --- 決まり書き ------------------------------------------ */

.rules { list-style: none; margin: 0 0 1rem; padding: 0; max-width: 38rem; }

.rules li {
  padding: 0.45rem 0 0.45rem 1.1rem;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.88rem;
  line-height: 1.75;
  position: relative;
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.05em;
  width: 5px; height: 1px;
  background: var(--ink-soft);
}

.rules li:first-child { border-top: 1px solid var(--rule-soft); }

.compact { padding: 1.9rem 0 0.6rem; margin-top: 2rem; }

/* --- セクション --------------------------------------- */

.section { padding: 2.2rem 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }

.lead {
  font-size: 1.02rem;
  line-height: 1.95;
  max-width: var(--measure);
}

/* --- 対比リスト（書くこと／書かないこと） --------------- */

.pair { display: grid; gap: 2rem; }

@media (min-width: 41rem) {
  .pair { grid-template-columns: 1fr 1fr; gap: 2.4rem; }
}

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

.stack li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.9rem;
  line-height: 1.75;
}

.stack li:first-child { border-top: 1px solid var(--rule-soft); }

.stack.no li { color: var(--ink-soft); }

.pair-head {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

/* --- 状態表示 ----------------------------------------- */

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  padding: 0.9rem 0 0;
  font-size: 0.84rem;
}

.status dt { color: var(--ink-soft); display: inline; }
.status dd { margin: 0; display: inline; font-family: var(--mono); }
.status div { white-space: nowrap; }

/* --- 本文ページ --------------------------------------- */

.doc { padding: 2.4rem 0 1rem; }
.doc h2 { margin-top: 2.4rem; }
.doc h2:first-of-type { margin-top: 0; }
.doc ul { margin: 0 0 1.2rem; padding-left: 1.2rem; max-width: var(--measure); }
.doc li { margin-bottom: 0.35rem; font-size: 0.94rem; }
.doc dl { margin: 0 0 1.2rem; max-width: var(--measure); }
.doc dt { font-weight: 600; font-size: 0.9rem; margin-top: 0.9rem; }
.doc dd { margin: 0.1rem 0 0; font-size: 0.92rem; }
.doc .updated { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }

.back {
  display: inline-block;
  margin-bottom: 1.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--ink-soft);
}

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

/* --- フッタ ------------------------------------------- */

.foot {
  border-top: 1px solid var(--rule);
  margin-top: 2.4rem;
  padding: 1.4rem 0 3rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-bottom: 0.9rem; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot .copy { font-family: var(--mono); font-size: 0.76rem; }

/* --- 小画面 ------------------------------------------- */

@media (max-width: 30rem) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 1rem; }
  .caption { font-size: 1.2rem; margin-top: 1.6rem; }
  .summary { font-size: 0.8rem; padding: 0.55rem 0.7rem; }
  .summary .asof { margin-left: 0; width: 100%; }
  .ledger-table { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
