/* The research articles (/articles/, rendered by cloudflare/articles.js), on top of home.css. */
.top-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.top-link:hover {
  color: var(--text);
}
.article {
  max-width: 720px;
  margin: 8px auto 0;
}
.article h1 {
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin: 8px 0 6px;
}
@media (min-width: 640px) {
  .article h1 {
    font-size: 30px;
  }
}
/* Sections: a short accent bar instead of a rule, so the page reads as blocks. */
.article h2 {
  position: relative;
  text-align: start;
  font-size: 22px;
  line-height: 1.45;
  margin: 52px 0 14px;
  padding-inline-start: 14px;
}
.article h2::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 5px;
  border-radius: 3px;
  background: var(--accent);
}
.article h3 {
  text-align: start;
  font-size: 18px;
  line-height: 1.5;
  margin: 32px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
/* Under よくある質問, each question gets a Q badge. */
.article h3.faq-q {
  display: flex;
  gap: 10px;
  align-items: baseline;
  border-bottom: none;
  padding-bottom: 0;
}
.article h3.faq-q::before {
  content: 'Q';
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 14px;
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-1px);
}
.article p,
.article li {
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}
.article p {
  margin: 0 0 1.1em;
}
.article li + li {
  margin-top: 6px;
}
.article ul,
.article ol {
  padding-inline-start: 1.4em;
}
.article li::marker {
  color: var(--accent);
  font-weight: 700;
}
/* Bold reads as a highlighter mark, so the key phrase stands out when skimming. */
.article strong {
  background: linear-gradient(
    transparent 62%,
    color-mix(in srgb, var(--accent) 30%, transparent) 62%
  );
}
.article a {
  color: var(--accent);
}
.article blockquote {
  margin: 16px 0;
  padding: 4px 16px;
  border-inline-start: 3px solid var(--accent);
  background: var(--surface);
  border-start-end-radius: 8px;
  border-end-end-radius: 8px;
}
.crumbs {
  margin: 0;
  font-size: 14px;
}
.meta {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.article .lead {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cite {
  font-size: 11px;
  color: var(--muted);
  line-height: 0;
}
.cite a {
  text-decoration: none;
}
.refs li {
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.disclaimer {
  margin-top: 28px;
  font-size: 13px !important;
  color: var(--muted);
}
.article-list {
  list-style: none;
  max-width: 720px;
  margin: 16px auto;
  padding: 0;
  display: grid;
  gap: 12px;
}
.article-list a {
  display: grid;
  gap: 2px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
}
.article-list a:hover {
  border-color: var(--accent);
}
.article-list b {
  font-size: 17px;
}
.article-list small,
.article-list span {
  color: var(--muted);
  font-size: 14px;
}
.article-list .empty {
  color: var(--muted);
}
.app-box {
  max-width: 720px;
  margin: 32px auto 8px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.app-box img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex: none;
}
.app-box p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--muted);
}
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 10px !important;
}
.app-links .store {
  min-width: 0;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  font-weight: 700;
}
.app-links a {
  color: var(--accent);
}
.app-links a.store {
  color: var(--on-accent);
}
/* Table of contents, figures (cloudflare/articleFigures.js) and the other articles. */
.toc {
  margin: 20px 0 8px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.toc p {
  margin: 0 0 6px;
  font-size: 14px !important;
  font-weight: 700;
}
.toc ol {
  margin: 0;
  padding-inline-start: 1.4em;
}
.toc li {
  font-size: 15px;
  line-height: 1.7;
}
.toc a {
  text-decoration: none;
}
.fig {
  margin: 20px 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.fig-title {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 15px !important;
}
.fig figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.stat {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: var(--raised);
}
.stat-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.stat b {
  font-size: 26px;
  line-height: 1.2;
  color: var(--accent);
}
.stat span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.bars {
  display: grid;
  gap: 10px;
}
.bar {
  display: grid;
  grid-template-columns: minmax(84px, 30%) 1fr 5.5em;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.bar-label {
  line-height: 1.4;
}
.bar-track {
  height: 14px;
  border-radius: 7px;
  background: var(--raised);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: var(--muted);
  opacity: 0.55;
}
.bar.on .bar-fill {
  background: var(--accent);
  opacity: 1;
}
.bar-value {
  text-align: end;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table-scroll {
  overflow-x: auto;
}
.fig table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}
.fig th,
.fig td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}
.fig thead th {
  font-size: 13px;
  color: var(--muted);
}
.fig tbody tr:last-child th,
.fig tbody tr:last-child td {
  border-bottom: none;
}
/* Cover: the article's illustration, a big line icon on a soft panel. */
.fig-cover {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: none;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 22%, var(--surface)),
    var(--surface) 75%
  );
}
.cover-art {
  flex: none;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 0 var(--border);
}
.cover-icon {
  width: 60px;
  height: 60px;
}
.article .cover-text {
  margin: 0;
  display: grid;
  gap: 4px;
}
.cover-text b {
  font-size: 20px;
  line-height: 1.35;
}
.cover-text span {
  font-size: 14px;
  color: var(--muted);
}
/* Scale: a ruler with marks; every other label sits below it. */
.scale {
  padding: 46px 4px 4px;
}
.scale-marks {
  position: relative;
  height: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    var(--raised),
    color-mix(in srgb, var(--accent) 45%, var(--raised))
  );
}
.two-rows .scale-marks {
  margin-bottom: 50px;
}
.mark {
  position: absolute;
  top: -5px;
  width: 0;
  height: 20px;
}
.mark::before {
  content: '';
  position: absolute;
  left: -2px;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--muted);
}
.mark.on::before {
  left: -8px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
}
.mark-label {
  position: absolute;
  bottom: 26px;
  transform: translateX(-50%);
  display: grid;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--muted);
}
.mark.low .mark-label {
  bottom: auto;
  top: 26px;
}
.mark.start .mark-label {
  transform: translateX(-8px);
  text-align: start;
}
.mark.end .mark-label {
  transform: translateX(calc(-100% + 8px));
  text-align: end;
}
.mark-label b {
  font-size: 14px;
  color: var(--text);
}
.mark.on .mark-label b {
  color: var(--accent);
}
.scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
/* Compare: cards side by side (stacked on phones). */
.cards {
  display: grid;
  gap: 10px;
}
@media (min-width: 560px) {
  .cards-2 {
    grid-template-columns: 1fr 1fr;
  }
  .cards-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.card {
  padding: 14px;
  border-radius: 10px;
  background: var(--raised);
}
.card-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  color: var(--accent);
}
.card b {
  font-size: 16px;
}
.article .card ul {
  margin: 6px 0 0;
  padding-inline-start: 1.2em;
}
.article .card li {
  font-size: 14px;
  line-height: 1.6;
}
/* Steps: numbered, with an icon in each badge. */
.article .steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
}
.article .steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
}
.step-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--raised);
  color: var(--accent);
}
.step-icon .icon {
  width: 26px;
  height: 26px;
}
.step-icon::after {
  content: counter(step);
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: var(--on-accent);
}
.steps div > b {
  display: block;
  font-size: 15px;
  margin-top: 4px;
}
.steps div > span {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
/* Point: one boxed key point. */
.fig-point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.point-icon {
  flex: none;
  width: 32px;
  height: 32px;
  color: var(--accent);
}
.article .fig-point p {
  margin: 0;
  display: grid;
  gap: 4px;
}
.fig-point b {
  font-size: 16px;
}
.fig-point span {
  font-size: 14px;
  line-height: 1.7;
}
.related {
  max-width: 720px;
  margin: 32px auto 0;
}
.related h2 {
  font-size: 19px;
  text-align: start;
  margin: 0 0 4px;
}
.related .article-list {
  margin-top: 8px;
}
/* The same article in another language (hreflang). */
.lang-switch {
  margin: 4px 0 0;
  font-size: 14px;
}
.lang-switch a {
  color: var(--accent);
}
/* Many translations: a list that opens from the page's own language. */
.lang-menu summary {
  cursor: pointer;
  color: var(--accent);
}
.lang-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
/* Figures are drawn left to right (scales, bars) in every language. */
[dir='rtl'] .fig-scale,
[dir='rtl'] .fig-bars {
  direction: ltr;
}
