/* =====================================================================================================
   DigiSelf blog (/ja/blog/) and the parts the top pages share with it
   Styles for the blog list and article pages, the eye-catch template, and what the top pages use from here
   (the mobile menu and the blog pickup). Rules are scoped to classes so the top page's Tailwind styles are
   untouched. The blog pages are built by blog/ (Astro); the top pages link this file directly.
   ===================================================================================================== */

:root {
  /* Colors taken from the top page */
  --ds-ink: #000b0f;
  --ds-body: #1d282e;
  --ds-muted: #52616b;
  --ds-subtle: #8a9ba8;
  --ds-line: #dbdbdb;
  --ds-line-soft: #e9eef1;
  --ds-surface: #f6f8fa;
  --ds-tint: #f6fbfe;
  --ds-tint-line: #d8e8f0;
  --ds-blue: #0094de;
  --ds-blue-deep: #007dbc;
  --ds-blue-light: #89d8ff;
  --ds-sky: #38b6f5;
  --ds-green: #a6e99a;
  --ds-navy: #0c0b24;
  --ds-grad-text: linear-gradient(270.61deg, #89d8ff 26.76%, #007dbc 52.83%);
  --ds-grad-brand: linear-gradient(90deg, #a6e99a, #00aaff);
  --ds-font-ja: 'Noto Sans JP', sans-serif;
  --ds-font-en: Switzer, sans-serif;
  /* Room for the floating header when the page scrolls to an anchor or keeps the sidebar in view */
  --ds-sticky-top: 24px;
}

@media (min-width: 1024px) {
  :root {
    --ds-sticky-top: 112px;
  }
}

/* Category colors (picked per category in microCMS): blue, teal and green from the brand gradient, and gray */
.cat-blue {
  --cat: #0094de;
  --cat-bg: #e6f4fb;
  --cat-text: #0072ab;
}
.cat-teal {
  --cat: #12a39a;
  --cat-bg: #e4f5f3;
  --cat-text: #0b7d76;
}
.cat-green {
  --cat: #45b25a;
  --cat-bg: #ebf7ec;
  --cat-text: #2c8540;
}
.cat-gray {
  --cat: #8a9ba8;
  --cat-bg: #eef2f4;
  --cat-text: #52616b;
}

/* ----- Base for the blog pages (the top page keeps its own base) ----- */

.blog-html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--ds-sticky-top);
}

.blog-page {
  margin: 0;
  background: #fff;
  color: var(--ds-ink);
  font-family: var(--ds-font-ja);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}

/* :where() keeps these resets at zero specificity so component styles always win */
:where(.blog-page) *,
:where(.blog-page) *::before,
:where(.blog-page) *::after {
  box-sizing: border-box;
}

/* height: auto keeps the ratio of images whose width and height attributes reserve their space */
:where(.blog-page) img {
  display: block;
  max-width: 100%;
  height: auto;
}

:where(.blog-page) a {
  color: inherit;
  text-decoration: none;
}

:where(.blog-page) :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd) {
  margin: 0;
}

:where(.blog-page) :where(ul, ol) {
  padding: 0;
  list-style: none;
}

:where(.blog-page) button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:where(.blog-page) :focus-visible {
  outline: 2px solid var(--ds-blue);
  outline-offset: 3px;
}

/* Headings and short copy break between Japanese phrases where the browser supports it (as in the speed
   section); running text keeps the usual line breaking so paragraphs stay even */
:where(.blog-page, .post-card) :where(h1, h2, h3, .post-card__title, .post-featured__excerpt, .blog-hero__lead),
:where(.ds-banner__title, .ds-banner__text, .article-promo__title, .article-promo__text, .ds-footer-banner__text),
:where(.toc__list a, .side-toc a, .post-nav__title, .callout__title) {
  word-break: auto-phrase;
}

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

.ds-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ----- Buttons (the top page's pill buttons) ----- */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--ds-font-ja);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.ds-btn--sm {
  padding: 8px 16px;
  font-size: 14px;
  line-height: 20px;
}

.ds-btn--block {
  display: flex;
  width: 100%;
}

.ds-btn--dark {
  background: var(--ds-ink);
  color: #fff;
}

.ds-btn--dark:hover {
  background: #2b363c;
}

.ds-btn--outline {
  border-color: var(--ds-ink);
  color: var(--ds-ink);
}

.ds-btn--outline:hover {
  background: var(--ds-surface);
}

.ds-btn--light {
  background: #fff;
  color: var(--ds-ink);
}

.ds-btn--light:hover {
  background: var(--ds-line-soft);
}

.ds-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

:is(a, button):hover > .ds-arrow,
:is(a, button):hover .ds-btn > .ds-arrow {
  transform: translateX(3px);
}

/* ----- Header: the top page's navigation, with Blog added ----- */

.ds-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin-inline: auto;
  padding: 24px;
}

.ds-nav__left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.ds-nav__logo img {
  width: auto;
  height: 28px;
}

.ds-nav__links {
  display: none;
  gap: 24px;
}

.ds-nav__links a {
  position: relative;
  font-family: var(--ds-font-en);
  font-size: 16px;
  line-height: 24px;
}

.ds-nav__links a:hover,
.ds-nav__login:hover {
  color: #6b7280;
}

/* The current section gets a small blue dot */
.ds-nav__links a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ds-blue);
  transform: translateX(-50%);
}

.ds-nav__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-nav__lang {
  display: none;
  border: 0;
  background: #fff;
  color: var(--ds-ink);
  font-family: var(--ds-font-ja);
  font-size: 14px;
  cursor: pointer;
}

.ds-nav__login {
  font-size: 16px;
  white-space: nowrap;
}

.ds-nav__ctas {
  display: none;
  gap: 8px;
}

/* Mobile menu button (below 1024px, where the top page hides its menu links) */
.ds-nav__toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ds-line-soft);
  border-radius: 50%;
  background: #fff;
  color: var(--ds-ink);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ds-nav__toggle:hover {
  background: var(--ds-surface);
}

.ds-nav__toggle svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 768px) {
  .ds-nav {
    padding: 40px 24px;
  }

  .ds-nav__logo img {
    height: 32px;
  }

  .ds-nav__right {
    gap: 24px;
  }

  .ds-nav__lang {
    display: block;
    font-size: 16px;
  }

  .ds-nav__ctas {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .ds-nav__links {
    display: flex;
  }

  .ds-nav__toggle {
    display: none;
  }
}

/* Floating header after scrolling (desktop only, like the top page) */
.ds-float {
  position: fixed;
  top: 8px;
  left: 0;
  right: 0;
  z-index: 100;
  display: none;
  justify-content: center;
  pointer-events: none;
}

.ds-float__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 48px);
  max-width: 1280px;
  padding: 20px 24px;
  border-radius: 80px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-16px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s linear 0.3s;
}

.ds-float.is-visible .ds-float__inner {
  opacity: 1;
  visibility: visible;
  transform: translateY(10px);
  pointer-events: auto;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.ds-float .ds-nav__logo img {
  height: 32px;
}

@media (min-width: 1024px) {
  .ds-float {
    display: flex;
  }
}

/* Reading progress on the article page */
.ds-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: 3px;
  pointer-events: none;
}

.ds-progress span {
  display: block;
  height: 100%;
  background: var(--ds-grad-brand);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

/* ----- Mobile menu ----- */

.ds-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  transition: visibility 0s linear 0.35s;
}

.ds-drawer.is-open {
  visibility: visible;
  transition: none;
}

.ds-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 11, 15, 0.4);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ds-drawer.is-open .ds-drawer__backdrop {
  opacity: 1;
}

.ds-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(100%, 440px);
  padding: 24px;
  overflow-y: auto;
  background: #fff;
  font-family: var(--ds-font-ja);
  color: var(--ds-ink);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.ds-drawer.is-open .ds-drawer__panel {
  transform: none;
}

.ds-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ds-drawer__head img {
  width: auto;
  height: 28px;
}

/* Menu links: large English labels with an arrow in a circle; the current page gets a blue dot.
   The links slide in one after another when the menu opens. */
.ds-drawer__nav {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
  border-top: 1px solid var(--ds-line-soft);
}

.ds-drawer__nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--ds-line-soft);
  color: var(--ds-ink);
  font-family: var(--ds-font-en);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.ds-drawer__nav a[hidden] {
  display: none;
}

.ds-drawer.is-open .ds-drawer__nav a {
  opacity: 1;
  transform: none;
}

.ds-drawer.is-open .ds-drawer__nav a:nth-child(2) {
  transition-delay: 0.04s;
}

.ds-drawer.is-open .ds-drawer__nav a:nth-child(3) {
  transition-delay: 0.08s;
}

.ds-drawer.is-open .ds-drawer__nav a:nth-child(4) {
  transition-delay: 0.12s;
}

.ds-drawer.is-open .ds-drawer__nav a:nth-child(5) {
  transition-delay: 0.16s;
}

.ds-drawer__nav a > span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.ds-drawer__nav a[aria-current='page'] > span::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ds-blue);
  box-shadow: 0 0 0 4px rgba(0, 148, 222, 0.15);
}

.ds-drawer__nav i {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ds-line);
  border-radius: 50%;
  color: var(--ds-ink);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.ds-drawer__nav i svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.ds-drawer__nav a:hover i,
.ds-drawer__nav a:focus-visible i {
  border-color: var(--ds-ink);
  background: var(--ds-ink);
  color: #fff;
}

.ds-drawer__nav a:hover i svg {
  transform: translateX(2px);
}

/* The buttons sit in a soft brand panel under the links */
.ds-drawer__actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--ds-tint-line);
  border-radius: 16px;
  background: linear-gradient(165deg, #f6fbfe 0%, #e6f4fc 100%);
}

.ds-drawer__actions .ds-btn--outline {
  background: #fff;
}

.ds-drawer__actions .ds-btn--outline:hover {
  background: var(--ds-surface);
}

.ds-drawer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 28px;
  font-size: 14px;
}

.ds-drawer__foot > a:hover {
  color: var(--ds-muted);
}

.ds-drawer__langs {
  display: flex;
  align-items: center;
}

.ds-drawer__langs a {
  color: var(--ds-muted);
}

.ds-drawer__langs a + a {
  margin-left: 12px;
  padding-left: 13px;
  border-left: 1px solid var(--ds-line);
}

.ds-drawer__langs a:hover,
.ds-drawer__langs a[aria-current='true'] {
  color: var(--ds-ink);
}

.ds-drawer__langs a[aria-current='true'] {
  font-weight: 700;
}

body.ds-no-scroll {
  overflow: hidden;
}

/* ----- Breadcrumb ----- */

.ds-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ds-muted);
}

.ds-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ds-breadcrumb li + li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid #b4bfc7;
  border-right: 1.5px solid #b4bfc7;
  transform: rotate(45deg);
}

.ds-breadcrumb a:hover {
  color: var(--ds-blue);
}

.ds-breadcrumb [aria-current='page'] {
  overflow: hidden;
  max-width: 24em;
  color: var(--ds-subtle);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Phones leave the article title out of the breadcrumb, as in the wireframe */
@media (max-width: 639px) {
  .ds-breadcrumb .is-title {
    display: none;
  }
}

/* ----- Labels ----- */

.post-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--cat-bg);
  color: var(--cat-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.post-cat::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cat);
}

a.post-cat:hover {
  filter: brightness(0.97);
}

.post-date {
  font-family: var(--ds-font-en);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ds-subtle);
}

.ds-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

/* Section titles carry the same gradient bar as the article headings */
.ds-section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.ds-section-head h2::before {
  content: '';
  flex: none;
  width: 5px;
  height: 1.1em;
  border-radius: 3px;
  background: linear-gradient(180deg, #0094de, #a6e99a);
}

.ds-section-head__note {
  font-size: 13px;
  color: var(--ds-subtle);
}

.ds-section-head__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.ds-section-head__more:hover {
  color: var(--ds-blue);
}

@media (min-width: 768px) {
  .ds-br-sp {
    display: none;
  }
}

/* =====================================================================================================
   Eye-catch template: 1200 x 630 so the same image works as the OGP image.
   Text sizes follow the width of the image (container query units), so one template fits every card size.
   ===================================================================================================== */

.eyecatch {
  --ec-pad: 6.4cqw;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: var(--ds-surface);
  color: #fff;
  font-family: var(--ds-font-ja);
  line-height: 1.4;
}

.eyecatch::before,
.eyecatch::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.eyecatch__text {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ec-pad);
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 60%;
  padding-bottom: 3cqw;
}

.eyecatch__label {
  align-self: flex-start;
  padding: 0.55em 1.25em;
  border: max(1px, 0.14cqw) solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 2cqw;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.eyecatch__catch {
  margin-top: 2.6cqw;
  font-size: 5.5cqw;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.eyecatch__brand {
  position: absolute;
  left: var(--ec-pad);
  bottom: 5.6cqw;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1.3cqw;
  font-family: var(--ds-font-en);
  font-size: 1.9cqw;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.eyecatch__brand img {
  width: auto;
  height: 2.7cqw;
}

.eyecatch__brand span {
  padding-left: 1.3cqw;
  border-left: max(1px, 0.14cqw) solid currentColor;
  opacity: 0.85;
}

/* White logo on the colored and dark themes */
:is(.eyecatch--brand, .eyecatch--sky, .eyecatch--navy) .eyecatch__brand img {
  filter: brightness(0) invert(1);
}

/* Cut-out portrait standing at the right */
.eyecatch__figure {
  position: absolute;
  right: 2cqw;
  bottom: 0;
  z-index: 2;
  width: 44cqw;
  height: 92%;
}

.eyecatch__figure::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6%;
  z-index: -1;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 68%);
  transform: translateX(-50%);
}

/* contain, not cover: cover filled the width and cut off the top of the head */
.eyecatch__figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
}

/* 3D speech bubbles from the about section */
.eyecatch__bubble {
  position: absolute;
  z-index: 2;
  width: 21cqw;
  filter: drop-shadow(0 2.4cqw 3.2cqw rgba(0, 20, 60, 0.28));
}

.eyecatch__bubble--1 {
  top: 15%;
  right: 9cqw;
  transform: rotate(6deg);
}

.eyecatch__bubble--2 {
  top: 50%;
  right: 29cqw;
  width: 13cqw;
  transform: rotate(-8deg);
}

/* Photo on the right, fading into the text side */
.eyecatch__photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 64%;
  background-position: 28% 30%;
  background-size: cover;
  transform: scale(1.04);
  transform-origin: 100% 0;
}

/* Themes */
.eyecatch--brand {
  background: linear-gradient(118deg, #a6e99a 0%, #43c7b8 46%, #00aaff 100%);
}

.eyecatch--brand::before,
.eyecatch--sky::before {
  background: url(/assets/images/banner_footer/pattern.png) no-repeat 0 0 / 30cqw auto;
}

.eyecatch--brand::after,
.eyecatch--sky::after {
  background: url(/assets/images/banner_footer/pattern.png) no-repeat 100% 100% / 30cqw auto;
  transform: rotate(180deg);
}

.eyecatch--sky {
  background: linear-gradient(128deg, #007dbc 0%, #0094de 42%, #89d8ff 100%);
}

.eyecatch--navy {
  background:
    radial-gradient(52% 78% at 76% 40%, rgba(0, 148, 222, 0.55), transparent 72%),
    radial-gradient(36% 56% at 2% 100%, rgba(166, 233, 154, 0.22), transparent 70%),
    var(--ds-navy);
}

.eyecatch--navy::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 4.6cqw 4.6cqw;
  -webkit-mask-image: radial-gradient(70% 90% at 72% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(70% 90% at 72% 40%, #000 20%, transparent 78%);
}

.eyecatch--navy .eyecatch__label {
  border-color: rgba(56, 182, 245, 0.7);
  background: rgba(56, 182, 245, 0.12);
  color: #8fd6ff;
}

.eyecatch--navy .eyecatch__figure img {
  filter: grayscale(1) contrast(1.05) brightness(0.95);
}

.eyecatch--navy .eyecatch__figure::before {
  background: radial-gradient(circle at 50% 45%, rgba(56, 182, 245, 0.55), rgba(56, 182, 245, 0) 68%);
}

.eyecatch--photo,
.eyecatch--light {
  color: var(--ds-ink);
}

.eyecatch--photo {
  background: #eaf5fb;
}

.eyecatch--photo::after {
  z-index: 1;
  background: linear-gradient(
    90deg,
    #eaf5fb 0%,
    #eaf5fb 34%,
    rgba(234, 245, 251, 0.82) 46%,
    rgba(234, 245, 251, 0) 66%
  );
}

.eyecatch--light {
  background:
    radial-gradient(48% 70% at 82% 50%, rgba(137, 216, 255, 0.35), transparent 70%),
    radial-gradient(30% 40% at 96% 96%, rgba(166, 233, 154, 0.4), transparent 70%),
    var(--ds-surface);
}

.eyecatch--light::before {
  background-image: radial-gradient(rgba(0, 11, 15, 0.12) 1px, transparent 1.4px);
  background-size: 2.4cqw 2.4cqw;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 75%);
  mask-image: linear-gradient(90deg, transparent 30%, #000 75%);
}

.eyecatch--photo .eyecatch__label,
.eyecatch--light .eyecatch__label {
  border-color: transparent;
  background: #fff;
  color: var(--cat-text);
  box-shadow: 0 0.6cqw 1.6cqw rgba(0, 40, 80, 0.08);
}

.eyecatch__symbol {
  position: absolute;
  top: 50%;
  right: 9cqw;
  z-index: 2;
  width: 26cqw;
  transform: translateY(-50%);
  filter: drop-shadow(0 2cqw 3cqw rgba(0, 60, 100, 0.12));
}

/* Thumbnails are too small for text: show the picture only */
@container (max-width: 220px) {
  .eyecatch__text,
  .eyecatch__brand {
    display: none;
  }
}

/* ----- Post cards ----- */

.post-grid {
  display: grid;
  gap: 40px 32px;
}

.post-card {
  min-width: 0;
}

.post-card__link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.post-card__media {
  overflow: hidden;
  border-radius: 12px;
  background: var(--ds-surface);
  box-shadow: 0 0 0 1px rgba(0, 11, 15, 0.04);
}

.post-card__media .eyecatch,
.post-featured__media .eyecatch {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.post-card__link:hover .eyecatch,
.post-featured__link:hover .eyecatch {
  transform: scale(1.04);
}

.post-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.post-card__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.post-card__link:hover .post-card__title,
.post-featured__link:hover .post-featured__title {
  color: var(--ds-blue);
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Boxed card for the top page pickup: the same card as the case studies (gray box, image on top) */
.post-card--boxed .post-card__link {
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ds-surface);
  transition: box-shadow 0.2s ease;
}

.post-card--boxed .post-card__link:hover {
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.post-card--boxed .post-card__media {
  border-radius: 0;
  box-shadow: none;
}

.post-card--boxed .post-card__body {
  flex: 1;
  gap: 12px;
  padding: 24px 32px 32px;
}

.post-card--boxed .post-card__title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-line-clamp: 3;
}

/* Three narrow cards on tablets: less padding so the titles keep their words */
@media (min-width: 768px) and (max-width: 1023px) {
  .post-card--boxed .post-card__body {
    padding: 20px 20px 24px;
  }

  .post-card--boxed .post-card__title {
    font-size: 16px;
  }
}

.post-card--boxed .post-date {
  margin-top: auto;
}

/* Row card: thumbnail beside the title (related posts on phones) */
.post-card--row .post-card__link {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.post-card--row .post-card__media {
  border-radius: 8px;
}

.post-card--row .post-card__body {
  gap: 6px;
}

.post-card--row .post-card__title {
  font-size: 14px;
  line-height: 1.6;
}

.post-card--row .post-cat {
  font-size: 11px;
}

/* ----- Blog list page ----- */

.blog-hero {
  padding-bottom: 8px;
}

.blog-hero__panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 16px;
  padding: 40px 24px 36px;
  border-radius: 24px;
  background: var(--ds-surface);
}

/* A light take on the speed section: soft glows and a faint grid */
.blog-hero__panel::before,
.blog-hero__panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.blog-hero__panel::before {
  background:
    radial-gradient(42% 70% at 82% 40%, rgba(137, 216, 255, 0.45), transparent 72%),
    radial-gradient(30% 50% at 100% 100%, rgba(166, 233, 154, 0.4), transparent 70%);
}

.blog-hero__panel::after {
  background-image:
    linear-gradient(rgba(0, 11, 15, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 11, 15, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(60% 90% at 78% 40%, #000 20%, transparent 80%);
  mask-image: radial-gradient(60% 90% at 78% 40%, #000 20%, transparent 80%);
}

.blog-hero__body {
  position: relative;
  z-index: 1;
  max-width: 660px;
}

.blog-hero__title {
  font-family: var(--ds-font-en);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* background-clip: text paints the letters only inside the box, so the box reaches below the baseline far
   enough for the descender of "g" */
.blog-hero__title-grad {
  display: inline-block;
  margin-bottom: -0.2em;
  padding: 0 0.04em 0.2em 0;
  background: var(--ds-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Category pages: the blue English label above the name */
.blog-hero__eyebrow {
  font-family: var(--ds-font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ds-blue);
}

/* Category and tag pages: the Japanese name */
.blog-hero__title--ja {
  font-family: var(--ds-font-ja);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.blog-hero__lead {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ds-body);
}

.blog-hero__visual {
  display: none;
}

.cat-chips {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-chips::-webkit-scrollbar {
  display: none;
}

.cat-chips a {
  flex: none;
  padding: 8px 18px;
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.cat-chips a:hover {
  border-color: var(--ds-ink);
}

.cat-chips a[aria-current='page'] {
  border-color: var(--ds-ink);
  background: var(--ds-ink);
  color: #fff;
}

.post-featured {
  margin-top: 40px;
}

.post-featured__link {
  display: grid;
  gap: 20px;
}

.post-featured__media {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 11, 15, 0.04);
}

.post-featured__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #0094de, #a6e99a) border-box;
  font-family: var(--ds-font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.post-featured__badge i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007dbc, #0094de 45%, #89d8ff);
  color: #fff;
  font-style: normal;
}

.post-featured__badge svg {
  width: 11px;
  height: 11px;
}

.post-featured__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.post-featured__title {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.post-featured__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ds-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-featured__more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 500;
}

.post-featured__more i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ds-ink);
  color: #fff;
  font-style: normal;
  transition: transform 0.2s ease;
}

.post-featured__link:hover .post-featured__more i {
  transform: translateX(3px);
}

/* Posts, pagination, categories and banners. Phones stack them as in the wireframe:
   posts, banners, pagination, categories. */
.blog-layout {
  display: grid;
  grid-template-areas:
    'posts'
    'banners'
    'pager'
    'cats';
  gap: 48px;
  margin-top: 48px;
}

.blog-layout__posts {
  grid-area: posts;
  min-width: 0;
}

.blog-layout__pager {
  grid-area: pager;
}

.blog-layout__cats {
  grid-area: cats;
}

.blog-layout__banners {
  grid-area: banners;
  display: grid;
  gap: 16px;
}

.ds-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ds-font-en);
}

.ds-pagination a,
.ds-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 15px;
  transition: background-color 0.2s ease;
}

.ds-pagination a:hover {
  background: var(--ds-surface);
}

.ds-pagination [aria-current='page'] {
  background: var(--ds-ink);
  color: #fff;
}

.ds-pagination .ds-pagination__next {
  gap: 6px;
  margin-left: 8px;
  padding: 0 20px;
  border: 1px solid var(--ds-line);
  font-family: var(--ds-font-ja);
  font-size: 14px;
}

.ds-pagination .ds-pagination__gap {
  min-width: 24px;
  color: var(--ds-subtle);
}

@media (max-width: 639px) {
  .ds-pagination {
    gap: 6px;
  }

  .ds-pagination a,
  .ds-pagination span {
    min-width: 40px;
    height: 40px;
  }

  .ds-pagination .ds-pagination__next {
    margin-left: 4px;
    padding: 0 14px;
  }

  .ds-pagination .ds-pagination__gap {
    min-width: 16px;
  }
}

/* ----- Sidebar blocks and banners ----- */

.side-block {
  padding: 24px;
  border: 1px solid var(--ds-line-soft);
  border-radius: 16px;
  background: #fff;
}

.side-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.side-title::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #0094de, #a6e99a);
}

.side-cats {
  margin-top: 12px;
}

.side-cats a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--ds-line-soft);
  font-size: 15px;
  transition: color 0.2s ease;
}

.side-cats li:last-child a {
  padding-bottom: 2px;
  border-bottom: 0;
}

.side-cats a::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat);
}

.side-cats a:hover,
.side-cats a[aria-current='page'] {
  color: var(--ds-blue);
}

.side-cats .count {
  margin-left: auto;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--ds-surface);
  font-family: var(--ds-font-en);
  font-size: 12px;
  color: var(--ds-muted);
}

.ds-banner {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  padding: 24px;
  border-radius: 16px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.ds-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 11, 15, 0.12);
}

.ds-banner__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.ds-banner__text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
}

.ds-banner .ds-btn {
  margin-top: 18px;
}

.ds-banner--doc {
  border: 1px solid var(--ds-tint-line);
  background: linear-gradient(165deg, #f6fbfe 0%, #e6f4fc 100%);
}

.ds-banner--doc .ds-banner__text {
  color: var(--ds-muted);
}

/* A brochure cover drawn in CSS. The tilted pages hang below the box, so the title needs the wide gap. */
.doc-mock {
  position: relative;
  height: 128px;
  margin: -4px 0 32px;
}

.doc-mock__page {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 168px;
  aspect-ratio: 297 / 210;
  margin-left: -84px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 70, 120, 0.16);
}

.doc-mock__page--back {
  transform: translate(-14px, 4px) rotate(-7deg);
}

.doc-mock__page--back::before,
.doc-mock__page--back::after {
  content: '';
  position: absolute;
  left: 14px;
  height: 5px;
  border-radius: 3px;
  background: var(--ds-line-soft);
}

.doc-mock__page--back::before {
  top: 18px;
  width: 60%;
}

.doc-mock__page--back::after {
  top: 30px;
  width: 40%;
}

.doc-mock__page--front {
  transform: translate(10px, -2px) rotate(4deg);
  background: linear-gradient(118deg, #a6e99a 0%, #43c7b8 46%, #00aaff 100%);
}

.doc-mock__page--front img.logo {
  position: absolute;
  top: 12px;
  left: 12px;
  height: 11px;
  filter: brightness(0) invert(1);
}

.doc-mock__page--front b {
  position: absolute;
  top: 34px;
  left: 12px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.doc-mock__page--front img.person {
  position: absolute;
  right: -6px;
  bottom: 0;
  width: 78px;
}

.ds-banner--contact {
  background: var(--ds-navy);
  color: #fff;
}

.ds-banner--contact::before,
.ds-banner--contact::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.ds-banner--contact::before {
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(0, 148, 222, 0.45), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, rgba(166, 233, 154, 0.16), transparent 70%);
}

.ds-banner--contact::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(80% 70% at 100% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(80% 70% at 100% 0%, #000 10%, transparent 75%);
}

.ds-banner--contact .ds-banner__text {
  color: rgba(255, 255, 255, 0.72);
}

.ds-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #007dbc, #0094de 45%, #89d8ff);
}

.ds-banner__icon svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .blog-layout__banners {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .blog-hero__panel {
    padding: 56px 56px 52px;
  }

  .blog-hero__title {
    font-size: 64px;
  }

  .blog-hero__title--ja {
    font-size: 36px;
  }

  .blog-hero__lead {
    font-size: 16px;
  }

  .post-featured__link {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
  }

  .post-featured__title {
    font-size: 26px;
  }
}

@media (min-width: 1024px) {
  .blog-hero__panel {
    min-height: 320px;
  }

  .blog-hero__visual {
    position: absolute;
    top: 50%;
    right: 64px;
    z-index: 1;
    display: block;
    width: 400px;
    height: 280px;
    transform: translateY(-50%);
  }

  /* Keep the text clear of the visual */
  .blog-hero__body {
    max-width: min(660px, calc(100% - 440px));
  }

  .blog-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      'posts cats'
      'posts banners'
      'pager banners';
    gap: 0 64px;
    margin-top: 56px;
  }

  .blog-layout__pager {
    margin-top: 64px;
  }

  .blog-layout__banners {
    position: sticky;
    top: var(--ds-sticky-top);
    align-self: start;
    margin-top: 24px;
  }
}

/* Narrow desktops: a smaller visual so the lead keeps a comfortable width */
@media (min-width: 1024px) and (max-width: 1279px) {
  .blog-hero__visual {
    right: 24px;
    transform: translateY(-50%) scale(0.84);
    transform-origin: 100% 50%;
  }

  .blog-hero__body {
    max-width: calc(100% - 380px);
  }
}

/* Hero visual: the monochrome avatar and the 3D bubbles of the about section */
.hv-avatar {
  position: absolute;
  top: 24px;
  left: 96px;
  width: 224px;
  height: 224px;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 50%;
  background: linear-gradient(165deg, #fff 0%, #e4e9ee 100%);
  box-shadow: 0 24px 60px rgba(0, 60, 100, 0.14);
}

/* Framed like the circle of the Japanese about section: the whole head inside, the body cut by the circle */
.hv-avatar img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: auto;
  max-width: none;
  height: 94%;
  filter: grayscale(1) contrast(1.04);
  transform: translateX(-50%);
}

.hv-bubble {
  position: absolute;
  filter: drop-shadow(0 18px 24px rgba(0, 80, 140, 0.2));
  animation: hv-float 6s ease-in-out infinite;
}

.hv-bubble--green {
  top: -6px;
  right: 18px;
  width: 112px;
  animation-delay: -2s;
}

.hv-bubble--blue {
  bottom: 0;
  left: 34px;
  width: 90px;
  animation-delay: -4s;
}

.hv-chip {
  position: absolute;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 11, 15, 0.08);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  animation: hv-float 7s ease-in-out infinite;
}

.hv-chip--1 {
  top: 54px;
  left: -8px;
  animation-delay: -1s;
}

.hv-chip--2 {
  right: -6px;
  bottom: 46px;
  animation-delay: -3.5s;
}

.hv-chip b {
  color: var(--ds-blue);
  font-weight: 700;
}

@keyframes hv-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

/* =====================================================================================================
   Article page
   ===================================================================================================== */

.article-layout {
  display: grid;
  gap: 56px;
  margin-top: 24px;
}

.article {
  min-width: 0;
}

.article-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ds-muted);
}

.meta-item svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--ds-subtle);
}

.meta-item time {
  font-family: var(--ds-font-en);
  letter-spacing: 0.02em;
}

.article-title {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ds-line-soft);
}

.article-meta__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.byline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.byline__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ds-line-soft);
  border-radius: 50%;
  background: #fff;
}

.byline__avatar img {
  width: 16px;
}

.share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ds-line);
  border-radius: 50%;
  background: #fff;
  color: var(--ds-ink);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.share__btn svg {
  width: 16px;
  height: 16px;
}

.share__btn--line .line-text {
  fill: #fff;
}

.share__btn--line:hover .line-text {
  fill: #06c755;
}

.share__btn--hatena span {
  font-family: Verdana, var(--ds-font-en);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.share__btn:hover {
  color: #fff;
}

.share__btn--x:hover {
  border-color: #000;
  background: #000;
}

.share__btn--fb:hover {
  border-color: #1877f2;
  background: #1877f2;
}

.share__btn--line:hover {
  border-color: #06c755;
  background: #06c755;
}

.share__btn--hatena:hover {
  border-color: #00a4de;
  background: #00a4de;
}

.share__btn--copy:hover {
  border-color: var(--ds-ink);
  background: var(--ds-ink);
}

.article-eyecatch {
  margin-top: 32px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 11, 15, 0.04);
}

.article-lead {
  margin-top: 32px;
  color: var(--ds-body);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.03em;
}

/* Table of contents at the top of the article */
.toc {
  margin: 32px 0 0;
  padding: 24px;
  border-radius: 16px;
  background: var(--ds-surface);
}

.toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toc__title {
  font-size: 16px;
  font-weight: 700;
}

.toc__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--ds-muted);
}

.toc__toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.toc__toggle[aria-expanded='false'] svg {
  transform: rotate(180deg);
}

.toc__list {
  margin-top: 16px;
}

.toc__list[hidden] {
  display: none;
}

.toc__list > li + li {
  border-top: 1px solid #e3e9ed;
}

/* Each entry starts with the small gradient bar of the headings it links to */
.toc__list > li > a {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

.toc__list > li > a::before {
  content: '';
  flex: none;
  width: 3px;
  height: 1em;
  margin-top: 0.3em;
  border-radius: 2px;
  background: linear-gradient(180deg, #0094de, #a6e99a);
}

.toc__list ol {
  margin: -4px 0 12px 15px;
}

.toc__list ol a {
  position: relative;
  display: block;
  padding: 5px 0 5px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ds-muted);
}

.toc__list ol a::before {
  content: '';
  position: absolute;
  top: 1.05em;
  left: 0;
  width: 5px;
  height: 1px;
  background: var(--ds-subtle);
}

.toc__list a:hover {
  color: var(--ds-blue);
}

/* Article body typography */
.article-body {
  margin-top: 40px;
  color: var(--ds-body);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.03em;
}

.article-body > * + * {
  margin-top: 1.6em;
}

.article-body h2 {
  position: relative;
  margin-top: 3em;
  padding-left: 20px;
  color: var(--ds-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
  scroll-margin-top: var(--ds-sticky-top);
}

.article-body h2::before {
  content: '';
  position: absolute;
  top: 0.22em;
  bottom: 0.22em;
  left: 0;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #0094de, #a6e99a);
}

.article-body h3 {
  margin-top: 2.4em;
  color: var(--ds-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  scroll-margin-top: var(--ds-sticky-top);
}

.article-body h2 + *,
.article-body h3 + * {
  margin-top: 1em;
}

.article-body h3 .step {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ds-blue);
  color: #fff;
  font-family: var(--ds-font-en);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  vertical-align: 3px;
}

.article-body a:not(.ds-btn) {
  color: var(--ds-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-body a:not(.ds-btn):hover {
  text-decoration-thickness: 2px;
}

.article-body strong {
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(137, 216, 255, 0.5) 62%);
}

.article-body ul > li,
.article-body ol > li {
  position: relative;
  padding-left: 1.5em;
}

.article-body ul > li + li,
.article-body ol > li + li {
  margin-top: 0.5em;
}

.article-body ul > li::before {
  content: '';
  position: absolute;
  top: 0.82em;
  left: 0.35em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ds-blue);
}

.article-body ol {
  counter-reset: steps;
}

.article-body ol > li {
  padding-left: 2.2em;
  counter-increment: steps;
}

.article-body ol > li::before {
  content: counter(steps);
  position: absolute;
  top: 0.32em;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55em;
  height: 1.55em;
  border-radius: 50%;
  background: var(--ds-ink);
  color: #fff;
  font-family: var(--ds-font-en);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.article-body figure {
  margin-top: 2.2em;
}

.article-body figure + * {
  margin-top: 2.2em;
}

.article-body figure .frame {
  overflow: hidden;
  border-radius: 16px;
  background: var(--ds-surface);
}

.article-body figure img {
  width: 100%;
}

.article-body figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ds-muted);
  text-align: center;
}

.article-body blockquote {
  position: relative;
  padding: 24px 24px 24px 64px;
  border-radius: 16px;
  background: var(--ds-surface);
  color: var(--ds-ink);
}

.article-body blockquote::before {
  content: '“';
  position: absolute;
  top: 10px;
  left: 22px;
  font-family: Georgia, serif;
  font-size: 56px;
  line-height: 1;
  background: var(--ds-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.article-body blockquote p + p {
  margin-top: 0.8em;
}

.article-body blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-style: normal;
  color: var(--ds-muted);
}

/* Callouts */
.callout {
  padding: 20px 24px;
  border: 1px solid var(--ds-tint-line);
  border-radius: 16px;
  background: var(--ds-tint);
  font-size: 15px;
  line-height: 1.9;
}

.callout__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--ds-blue);
  font-size: 15px;
  font-weight: 700;
}

.callout__title svg {
  width: 18px;
  height: 18px;
}

.callout--caution {
  border-color: #f6d4d4;
  background: #fff6f6;
}

.callout--caution .callout__title {
  color: #d64545;
}

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ds-line-soft);
  border-radius: 16px;
}

.table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.table-wrap th,
.table-wrap td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ds-line-soft);
  text-align: left;
  vertical-align: top;
}

.table-wrap tr:last-child > * {
  border-bottom: 0;
}

.table-wrap thead th {
  background: var(--ds-surface);
  color: var(--ds-ink);
  font-size: 13px;
  font-weight: 700;
}

.table-wrap tbody th {
  width: 26%;
  color: var(--ds-ink);
  font-weight: 700;
  white-space: nowrap;
}

.table-wrap .is-ours {
  background: #f2fafe;
}

.table-wrap thead .is-ours {
  background: #e3f3fc;
  color: var(--ds-blue-deep);
}

.table-wrap td.is-ours {
  color: var(--ds-ink);
  font-weight: 500;
}

/* Phones fit the three columns on screen so the DigiSelf column stays in view */
@media (max-width: 639px) {
  .table-wrap table {
    min-width: 0;
    font-size: 13px;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 12px 10px;
  }

  .table-wrap thead th {
    font-size: 12px;
  }

  .table-wrap tbody th {
    width: 28%;
    white-space: normal;
  }
}

/* Service banner at the end of the article, about the size of the first banner: the catch copy and the main
   visual of the DigiSelf poster, with its blue square behind the couple. It follows its own width (container
   queries): the visual sits under the text in narrow columns and beside it in wider ones. */
.article-promo {
  container: promo / inline-size;
  overflow: hidden;
  margin-top: 56px;
  border-radius: 20px;
  background:
    radial-gradient(55% 80% at 90% 100%, rgba(0, 170, 255, 0.2), transparent 70%),
    radial-gradient(40% 60% at 100% 0%, rgba(166, 233, 154, 0.38), transparent 70%),
    linear-gradient(160deg, #f6fbff 0%, #e6f5fd 55%, #d3eefb 100%);
}

.article-promo__inner {
  display: grid;
}

.article-promo__body {
  position: relative;
  z-index: 1;
  padding: 28px 22px 0;
}

.article-promo__logo img {
  width: auto;
  height: 22px;
}

.article-promo__title {
  margin-top: 14px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.article-promo__title span {
  background: var(--ds-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Even line lengths keep the breaks after the commas rather than inside 人手をかけずに */
.article-promo__text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ds-muted);
  text-wrap: balance;
}

.article-promo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.article-promo__actions .ds-btn {
  padding: 10px 18px;
  font-size: 14px;
  line-height: 20px;
}

/* The visual stands on the bottom edge, in front of the poster's blue square */
.article-promo__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 300px);
  margin-top: 18px;
}

.article-promo__mv {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.article-promo__shape {
  position: absolute;
  top: 15%;
  right: -4%;
  width: 54%;
  aspect-ratio: 1;
  background: linear-gradient(150deg, #1689cc 0%, #27a3df 55%, #5cc4ef 100%);
  opacity: 0.9;
}

/* Beside the text */
@container promo (min-width: 560px) {
  .article-promo__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: end;
  }

  .article-promo__body {
    align-self: center;
    padding: 36px 0 36px 36px;
  }

  .article-promo__title {
    font-size: 24px;
  }

  .article-promo__visual {
    width: min(100%, 330px);
    margin-top: 24px;
  }
}

@container promo (min-width: 700px) {
  .article-promo__body {
    padding: 40px 0 40px 44px;
  }

  .article-promo__title {
    font-size: 30px;
  }

  .article-promo__text {
    font-size: 15px;
  }

  .article-promo__actions {
    margin-top: 24px;
  }

  .article-promo__actions .ds-btn {
    padding: 12px 24px;
    font-size: 16px;
    line-height: 1.5;
  }

  .article-promo__visual {
    width: min(100%, 340px);
  }
}

/* Tags, share, author */
.article-tags {
  margin-top: 48px;
}

.article-tags__title {
  font-size: 14px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ds-surface);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ds-body);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.tag-list a:hover {
  background: var(--ds-line-soft);
  color: var(--ds-blue);
}

.article-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 28px 24px;
  border: 1px solid var(--ds-line-soft);
  border-radius: 16px;
}

.article-share__label {
  font-size: 14px;
  font-weight: 700;
}

.author-box {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding: 24px;
  border-radius: 16px;
  background: var(--ds-surface);
}

.author-box__avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 11, 15, 0.06);
}

.author-box__avatar img {
  width: 36px;
}

.author-box__label {
  font-size: 12px;
  color: var(--ds-muted);
}

.author-box__name {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
}

.author-box__bio {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ds-body);
}

/* Previous and next posts */
.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.post-nav__item {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--ds-line-soft);
  border-radius: 16px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.post-nav__item:hover {
  border-color: var(--ds-surface);
  background: var(--ds-surface);
}

.post-nav__thumb {
  display: none;
  overflow: hidden;
  border-radius: 8px;
}

.post-nav__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ds-muted);
}

.post-nav__title {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-nav__item--next {
  text-align: right;
}

.post-nav__item--next .post-nav__label {
  justify-content: flex-end;
}

/* Related posts */
.related {
  margin-top: 72px;
}

.related .post-grid {
  gap: 20px;
}

/* Sidebar on the article page */
.article-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.article-side .side-block--cats,
.side-toc {
  display: none;
}

.side-toc ol {
  margin-top: 14px;
  border-left: 2px solid var(--ds-line-soft);
}

.side-toc a {
  display: block;
  margin-left: -2px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ds-muted);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.side-toc a:hover {
  color: var(--ds-ink);
}

.side-toc a.is-active {
  border-left-color: var(--ds-blue);
  color: var(--ds-blue);
  font-weight: 500;
}

@media (max-width: 639px) {
  .related .post-card .post-card__link {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }

  .related .post-card__media {
    border-radius: 8px;
  }

  .related .post-card__body {
    gap: 6px;
  }

  .related .post-card__title {
    font-size: 14px;
    line-height: 1.6;
  }

  .related .post-card .post-date {
    font-size: 12px;
  }
}

@media (min-width: 640px) {
  .related .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .related .post-card__title {
    font-size: 15px;
  }

  .post-nav__item {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .post-nav__item--next {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .post-nav__item--next .post-nav__thumb {
    order: 2;
  }

  .post-nav__thumb {
    display: block;
  }

  .post-nav__title {
    font-size: 14px;
  }
}

@media (min-width: 768px) {
  .article-title {
    font-size: 32px;
  }

  .article-body,
  .article-lead {
    font-size: 17px;
  }

  .article-body h2 {
    font-size: 26px;
  }

  .article-body h3 {
    font-size: 20px;
  }

  .toc {
    padding: 28px 32px;
  }

  .author-box {
    padding: 28px;
  }
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 72px;
    margin-top: 32px;
  }

  .article-side .side-block--cats,
  .side-toc {
    display: block;
  }

  .side-toc {
    position: sticky;
    top: var(--ds-sticky-top);
    margin-top: 8px;
  }
}

/* ----- Footer banner and footer (the top page's) ----- */

.ds-footer-banner {
  position: relative;
  overflow: hidden;
  margin-top: 96px;
  background: linear-gradient(90deg, #a6e99a, #00aaff);
}

.ds-footer-banner__pattern {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.ds-footer-banner__pattern--end {
  top: auto;
  left: auto;
  right: 0;
  bottom: 0;
  display: none;
  transform: rotate(180deg);
}

.ds-footer-banner__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  margin-inline: auto;
  padding: 128px 32px;
  color: #fff;
  text-align: center;
}

.ds-footer-banner__title {
  font-size: 24px;
  font-weight: 500;
}

.ds-footer-banner__text {
  font-size: 20px;
  font-weight: 500;
}

.ds-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1280px;
  margin-inline: auto;
  padding: 24px;
}

.ds-footer__left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ds-footer__left img {
  width: auto;
  height: 28px;
}

.ds-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 12px;
}

.ds-footer a {
  font-family: var(--ds-font-en);
  font-size: 16px;
}

.ds-footer a:hover {
  color: #6b7280;
}

.ds-footer a[aria-current='page'] {
  color: var(--ds-blue);
}

.ds-footer__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.ds-footer__right a[lang='ja'] {
  font-family: var(--ds-font-ja);
}

@media (min-width: 640px) {
  .ds-footer ul {
    gap: 24px;
  }
}

@media (min-width: 768px) {
  .ds-footer-banner {
    margin-top: 128px;
  }

  .ds-footer-banner__pattern--end {
    display: block;
  }

  .ds-footer-banner__inner {
    gap: 16px;
    padding: 144px 32px;
  }

  .ds-footer-banner__title {
    font-size: 32px;
  }

  .ds-footer-banner__text {
    margin-bottom: 16px;
    font-size: 24px;
  }

  .ds-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 40px 24px;
  }

  .ds-footer__left {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .ds-footer__left img {
    height: 32px;
  }
}

/* ----- Top pages (Japanese and English) ----- */

/* On phones the current top pages are wider than the screen until the about image's AOS fade-left (which starts
   100px to the right) plays, so the page pans sideways and a full-height menu would sit partly off screen. */
html:has(body[data-page^='top']),
body[data-page^='top'] {
  overflow-x: clip;
}

/* The blog pickup */

.pickup-grid {
  display: flex;
  gap: 16px;
  margin-inline: -24px;
  padding: 0 24px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pickup-grid::-webkit-scrollbar {
  display: none;
}

.pickup-grid > .post-card {
  flex: 0 0 300px;
  scroll-snap-align: center;
}

@media (min-width: 768px) {
  .pickup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }
}

/* ----- Toast (the article's copy-link button) ----- */

.ds-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 410;
  /* left: 50% alone would cap the width at half the screen and break the message on phones */
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ds-ink);
  color: #fff;
  font-family: var(--ds-font-ja);
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

.ds-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ----- States the design review did not show ----- */

/* An eye-catch image uploaded in microCMS instead of the template */
.eyecatch--image {
  background: var(--ds-surface);
}

.eyecatch__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A lead of several paragraphs */
.article-lead > * + * {
  margin-top: 1em;
}

/* "前へ" on the second and later pages, the twin of "次へ" */
.ds-pagination .ds-pagination__prev {
  gap: 6px;
  margin-right: 8px;
  padding: 0 20px;
  border: 1px solid var(--ds-line);
  font-family: var(--ds-font-ja);
  font-size: 14px;
}

@media (max-width: 639px) {
  .ds-pagination .ds-pagination__prev {
    margin-right: 4px;
    padding: 0 14px;
  }
}

/* The newest post has only an older neighbor; the oldest only a newer one, which stays on the right */
.post-nav__item--next:only-child {
  grid-column: 2;
}

/* A list with no posts yet */
.blog-empty {
  padding: 48px 0;
  color: var(--ds-muted);
  font-size: 15px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .blog-html {
    scroll-behavior: auto;
  }

  .hv-bubble,
  .hv-chip {
    animation: none;
  }

  .ds-drawer__nav a {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .post-card__media .eyecatch,
  .post-featured__media .eyecatch {
    transition: none;
  }
}
