/* 読みもの共通の体裁。記事が増えるので、一覧も各記事もこの 1 枚だけを読む。
   色と書体は本体（/index.html）からの写し。本体は 1 枚で完結させたいのでインラインのまま。
   片方だけ触らないこと。dark は light の自動反転ではなく、暗い地に対して選び直したもの。 */
:root {
  color-scheme: light;
  --plane:   #e7e9e2;
  --surface: #fcfcfb;
  --ink:     #151a16;
  --ink-2:   #4b524b;
  --ink-3:   #7e847b;
  --rule:    #d2d6cb;
  --brass:   #8a6d1f;
  --s1: #2a78d6;
  --s2: #eb6834;

  --sans: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --serif: "Hiragino Mincho ProN", "BIZ UDPMincho", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --plane: #101210; --surface: #1a1a19;
    --ink: #ffffff; --ink-2: #c3c2b7; --ink-3: #898781;
    --rule: #2c2c2a; --brass: #c9a544;
    --s1: #3987e5; --s2: #d95926;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--plane); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.85;
  padding: 0 16px env(safe-area-inset-bottom);
}
/* 行長は ch で測らない。欧文基準なので全角だと 1 行 39 字ほどにしかならない。
   全角で 1 行 43 字に収まる幅を px で置く。本体（1060px）とは別の幅。 */
.wrap { max-width: 660px; margin: 0 auto; }
:where(a) { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .25em; }
:where(a):hover { text-decoration-color: currentColor; }
:where(a):focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 3px; }

.masthead { display: flex; align-items: baseline; gap: 14px; padding: 22px 0 14px; border-bottom: 1px solid var(--rule); }
.logo { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .12em; margin: 0; }
.logo a { text-decoration: none; }
.logo .en { font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: .18em; color: var(--ink-3); margin-left: .9em; }
.back { margin-left: auto; font-size: 12px; color: var(--ink-2); white-space: nowrap; }

h1 { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .06em; line-height: 1.5; margin: 34px 0 6px; }
.lede { color: var(--ink-2); margin: 0 0 8px; }
.stamp { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; margin: 0 0 24px; }
h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .05em;
  margin: 46px 0 10px; padding-top: 22px; border-top: 1px solid var(--rule);
}
p { margin: 0 0 14px; }
b { font-weight: 600; }
.note { font-size: 13px; color: var(--ink-3); line-height: 1.8; }

table {
  width: 100%; border-collapse: collapse; margin: 16px 0 18px;
  font-size: 13.5px; font-variant-numeric: tabular-nums;
}
caption { text-align: left; font-size: 12.5px; color: var(--ink-3); padding-bottom: 6px; }
th, td { border-bottom: 1px solid var(--rule); padding: 7px 10px 7px 0; text-align: right; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
thead th { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
/* 色が指すのは条件ではなく、得か損か。本体の凡例（元金＝青・利息＝橙）とは別の意味なので、
   面ではなく文字にだけ当てる。 */
td.win { color: var(--s1); }
td.lose { color: var(--s2); }
tr.key td, tr.key th { font-weight: 600; }

/* 設定そのものへの入口。読んだ直後にその場で触れるようにする。 */
.tryrow { margin: 2px 0 20px; }
.try {
  display: inline-block; border: 1px dashed var(--rule); border-radius: 5px;
  padding: 8px 14px; font-size: 13px; color: var(--ink-2); text-decoration: none;
  background: var(--surface);
}
.try:hover { border-color: var(--brass); color: var(--ink); }
.try b { color: var(--ink); font-weight: 600; }

/* 一覧。記事が増えても、日付・題・リードの三つだけを並べる。 */
.list { list-style: none; margin: 30px 0 0; padding: 0; }
.list li { border-top: 1px solid var(--rule); padding: 20px 0; }
.list li:last-child { border-bottom: 1px solid var(--rule); }
.list .date { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; }
.list h2 {
  font-size: 19px; margin: 3px 0 5px; padding-top: 0; border-top: 0;
}
.list h2 a { text-decoration: none; }
.list h2 a:hover { text-decoration: underline; text-decoration-color: var(--rule); }
.list p { color: var(--ink-2); font-size: 14px; margin: 0; }

footer { padding: 30px 0 46px; margin-top: 40px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-3); }
footer p { margin: 0 0 10px; }
