:root {
  color-scheme: dark;
  --paper: #171e24;
  --paper-raised: #202a31;
  --ink: #f7f2e7;
  --muted: #b9c1c0;
  --line: rgba(225, 235, 224, 0.18);
  --amber: #ffc857;
  --green: #8bd4ad;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: #10161b;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: radial-gradient(circle at 12% -10%, rgba(255, 200, 87, .11), transparent 32rem), #10161b;
  line-height: 1.8;
}
a { color: var(--amber); text-underline-offset: .2em; }
a:focus-visible { outline: 3px solid #ffe09a; outline-offset: 3px; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { line-height: 1.3; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { overflow-wrap: anywhere; color: #ffe09a; }

.skip-link {
  position: fixed;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .5rem .8rem;
  transform: translateY(-180%);
  border-radius: .45rem;
  background: var(--amber);
  color: #151819;
}
.skip-link:focus { transform: translateY(0); }
.article-header, .article-footer, .article-page { width: min(880px, calc(100% - 2rem)); margin-inline: auto; }
.article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
}
.article-brand { color: var(--ink); font-weight: 800; letter-spacing: .06em; text-decoration: none; }
.article-header nav { display: flex; gap: 1rem; font-size: .88rem; }
.article-page { padding: clamp(2rem, 6vw, 4.5rem) 0; }
.breadcrumbs { margin-bottom: 1.4rem; color: var(--muted); font-size: .88rem; }
.eyebrow { color: var(--amber); font: 700 .72rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .15em; }
.article-title { max-width: 18em; margin-top: .65rem; font-size: clamp(2rem, 6vw, 3.4rem); text-wrap: balance; }
.article-lead { max-width: 45rem; margin-top: 1rem; color: var(--muted); font-size: 1.08rem; }
.article-stamp { display: inline-block; margin-top: 1.2rem; padding: .25rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; }
.article-section { margin-top: 2.2rem; }
.article-section h2 { margin-bottom: .75rem; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.article-section h3 { margin: 1.3rem 0 .4rem; font-size: 1.08rem; }
.article-section p + p { margin-top: .7rem; }
.article-card {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: linear-gradient(150deg, rgba(32, 42, 49, .98), rgba(19, 26, 31, .98));
}
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.metric {
  min-width: 0;
  padding: 1rem;
  border-top: 2px solid rgba(255, 200, 87, .65);
  background: rgba(0, 0, 0, .16);
}
.metric dt { color: var(--muted); font-size: .82rem; }
.metric dd { margin-top: .35rem; color: var(--amber); font-size: 1.12rem; font-weight: 750; }
.steps { display: grid; gap: .75rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 1rem 1rem 1rem 3.4rem; border: 1px solid var(--line); border-radius: .7rem; background: rgba(23, 30, 36, .8); counter-increment: step; }
.steps li::before { position: absolute; top: .95rem; left: 1rem; color: var(--amber); font: 700 .8rem ui-monospace, monospace; content: "0" counter(step); }
.steps strong { display: block; margin-bottom: .2rem; }
.example-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.example-table th, .example-table td { padding: .65rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.example-table th { width: 34%; color: var(--muted); font-size: .88rem; font-weight: 600; }
.note { margin-top: .8rem; padding: .8rem 1rem; border-left: 3px solid var(--green); background: rgba(139, 212, 173, .08); color: var(--muted); font-size: .9rem; }
.tool-cta { display: inline-flex; min-height: 44px; align-items: center; margin-top: 1rem; padding: .5rem 1rem; border: 1px solid rgba(255, 200, 87, .6); border-radius: .55rem; background: rgba(255, 200, 87, .1); font-weight: 700; }
.article-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.article-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }

@media (max-width: 600px) {
  .article-header { align-items: flex-start; flex-direction: column; justify-content: center; padding: .8rem 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .article-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
