/* Insights section. Same tokens as the main site, typography tuned for reading
   rather than for scrolling past. No framework, no bundle: these pages are
   type on paper and should load like it. */

:root {
  --paper: #efeeec;
  --paper-2: #e6e4e1;
  --ink: #222725;
  --ink-2: #5c625f;
  --ink-3: #8d918f;
  --line: rgba(34, 39, 37, 0.16);
  --line-soft: rgba(34, 39, 37, 0.08);
  --blue: #0000ee;

  --font: 'Manrope', 'Noto Sans JP', -apple-system, BlinkMacSystemFont,
    'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;

  --gut: clamp(1.25rem, 4vw, 4.5rem);
  --max: 1560px;
  --measure: 40rem;
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ------------------------------------------------------------------ nav */

.a-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem var(--gut);
  background: rgba(239, 238, 236, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.a-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex: none;
}
.a-logo .mark { width: 22px; height: 22px; fill: var(--ink); display: block; }
.a-word { font-size: 0.8rem; letter-spacing: 0.14em; }
.a-word b { font-weight: 800; }
.a-word i { font-style: normal; font-weight: 400; color: var(--ink-2); }

.a-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.a-links a { text-decoration: none; color: var(--ink-2); transition: color 0.25s var(--e-out); }
.a-links a:hover { color: var(--ink); }
.a-links a[aria-current='page'] { color: var(--ink); font-weight: 600; }

.a-right { display: flex; align-items: center; gap: 1rem; }

.a-lang {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.25s var(--e-out), border-color 0.25s var(--e-out);
}
.a-lang:hover { color: var(--blue); border-color: var(--blue); }

.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 0;
  transition: background 0.25s var(--e-out);
}
.a-btn:hover { background: var(--blue); }
.a-btn-lg { padding: 0.95rem 1.9rem; font-size: 0.86rem; }

@media (max-width: 720px) {
  .a-links { gap: 1rem; font-size: 0.76rem; }
  .a-word { display: none; }
}

/* ------------------------------------------------------------ index page */

.a-eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.i-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--gut) clamp(2.5rem, 5vw, 4rem);
}

.i-h1 {
  margin: 0;
  font-size: clamp(3.5rem, 13vw, 11rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.i-lede-top {
  max-width: 46rem;
  margin: 2rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.i-count {
  margin: 2.5rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.i-list {
  list-style: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
  border-top: 1px solid var(--line);
}

.i-item { border-bottom: 1px solid var(--line); }

.i-link {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.75rem, 3vw, 2.75rem) 0;
  text-decoration: none;
  transition: color 0.3s var(--e-out);
}
.i-link:hover { color: var(--blue); }

.i-num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding-top: 0.45rem;
}
.i-link:hover .i-num { color: var(--blue); }

.i-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.65rem;
}

.i-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.i-lede {
  display: block;
  max-width: 42rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.i-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding-top: 0.45rem;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .i-link { grid-template-columns: 2.5rem 1fr; }
  .i-meta { grid-column: 2; flex-direction: row; align-items: center; gap: 1rem; padding-top: 0.75rem; }
}

/* ---------------------------------------------------------- article page */

.a-article {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gut) 0;
}

.a-head { max-width: 52rem; }

.a-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.25s var(--e-out);
}
.a-back::before { content: '\2190'; margin-right: 0.5rem; }
.a-back:hover { color: var(--blue); }

.a-tag {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.a-head h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.a-lede {
  max-width: var(--measure);
  margin: 1.75rem 0 0;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.a-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Reading column plus a sticky contents rail. The rail only appears where
   there is genuinely room for it, otherwise the contents sit inline above
   the body as a normal block. */
.a-cols {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

@media (max-width: 1100px) {
  .a-cols { grid-template-columns: minmax(0, 1fr); }
}

.a-aside { position: sticky; top: 6rem; }

@media (max-width: 1100px) {
  .a-aside { position: static; order: -1; max-width: var(--measure); }
}

/* table of contents */
.a-toc {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 1.5rem 1.75rem;
  background: var(--paper-2);
}

@media (max-width: 1100px) {
  .a-toc { margin-top: 3rem; }
}
.a-toc-title {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.a-toc ol { margin: 0; padding-left: 1.15rem; }
.a-toc li { margin: 0.4rem 0; font-size: 0.9rem; }
.a-toc a { color: var(--ink-2); text-decoration: none; }
.a-toc a:hover { color: var(--blue); text-decoration: underline; }

/* body */
.a-body {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  font-size: 1.06rem;
  line-height: 1.78;
}

html[lang='ja'] .a-body { line-height: 1.95; font-size: 1.02rem; }

.a-body > * { margin: 0; }
.a-body > * + * { margin-top: 1.5em; }

.a-body h2 {
  margin-top: 3.25em;
  margin-bottom: 0.9em;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.a-body h3 {
  margin-top: 2.4em;
  margin-bottom: 0.7em;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
}

.a-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.a-body a:hover { text-decoration-thickness: 2px; }

.a-body strong { font-weight: 700; }

.a-body ul,
.a-body ol { margin: 1.5em 0 0; padding-left: 1.4rem; }
.a-body li { margin: 0.55em 0; }
.a-body li::marker { color: var(--ink-3); }

.a-body blockquote {
  margin: 2em 0 0;
  padding: 1.25rem 0 1.25rem 1.5rem;
  border-left: 2px solid var(--blue);
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 500;
}
.a-body blockquote p { margin: 0; }

.a-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 0.15em 0.4em;
}

.table-wrap { margin-top: 2em; overflow-x: auto; }
.a-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.a-body th,
.a-body td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.a-body th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom-color: var(--ink);
  white-space: nowrap;
}

/* sources: the differentiator, so it gets real weight */
.a-sources {
  margin: clamp(3.5rem, 7vw, 5.5rem) 0 0;
  padding: 2rem 2rem 2.25rem;
  background: var(--paper-2);
}
.a-sources h2 {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.a-sources ol { margin: 0; padding-left: 1.2rem; }
.a-sources li { margin: 0.7rem 0; font-size: 0.88rem; line-height: 1.55; color: var(--ink-2); }
.a-sources a { color: var(--blue); text-decoration: underline; text-underline-offset: 0.15em; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- cta, pager */

.a-cta {
  max-width: var(--max);
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gut);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.a-cta h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.a-cta p {
  max-width: 38rem;
  margin: 1.25rem auto 2.25rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(239, 238, 236, 0.72);
}
.a-cta .a-btn { background: var(--paper); color: var(--ink); }
.a-cta .a-btn:hover { background: var(--blue); color: var(--paper); }

.a-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
  background: transparent;
}
.a-pager-item {
  display: block;
  padding: 2.25rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s var(--e-out);
}
.a-pager-item:hover { color: var(--blue); }
.a-pager-item span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}
.a-pager-item b { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.a-pager-next { text-align: right; }

@media (max-width: 720px) {
  .a-pager { grid-template-columns: 1fr; }
  .a-pager-next { text-align: left; }
}

/* -------------------------------------------------------------- footer */

.a-foot {
  max-width: var(--max);
  margin: clamp(4rem, 8vw, 6rem) auto 0;
  padding: 0 var(--gut) 2.5rem;
}
.a-foot-in {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}
.a-foot-in .mark { width: 26px; height: 26px; fill: var(--ink); }
.a-foot-links { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-left: auto; font-size: 0.82rem; }
.a-foot-links a { color: var(--ink-2); text-decoration: none; transition: color 0.25s var(--e-out); }
.a-foot-links a:hover { color: var(--blue); }

.a-foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.72rem;
  color: var(--ink-3);
}
.a-foot-bottom address { font-style: normal; }
