:root {
  --mag-ink: #172235;
  --mag-muted: #5d6878;
  --mag-navy: #0b3d78;
  --mag-navy-dark: #082d59;
  --mag-orange: #d95f24;
  --mag-paper: #fff;
  --mag-warm: #f7f4ee;
  --mag-soft: #f4f6f8;
  --mag-line: #d8dee7;
  --mag-line-soft: #e6eaf0;
  --mag-max: 1120px;
  --mag-radius: 4px;
  --mag-shadow: 0 1px 2px rgba(16, 39, 71, .06);
  --mag-shadow-hover: 0 8px 20px rgba(16, 39, 71, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  /* Last line of defence against sideways drift on phones. `clip` is used
     instead of `hidden` because it does not create a scroll container, so
     the sticky category bar keeps working. */
  overflow-x: clip;
  color: var(--mag-ink);
  background: var(--mag-paper);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: #0755a5; text-underline-offset: 3px; }
a:hover { color: var(--mag-navy-dark); }

/* Images must never overflow their container, even if a component
   ships before its own layout rules reach the browser. */
img, svg, video { max-width: 100%; height: auto; }

:where(a, button):focus-visible {
  outline: 3px solid #1c6fd0;
  outline-offset: 2px;
}
.mag-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 10px 16px;
  background: var(--mag-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.mag-skip:focus { left: 8px; top: 8px; color: #fff; }

/* Header: utility navigation, not a landing-page hero. */
.mag-header {
  background: #fff;
  border-top: 4px solid var(--mag-navy);
  border-bottom: 1px solid var(--mag-line);
}
.mag-header__inner {
  width: min(calc(100% - 32px), var(--mag-max));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mag-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--mag-navy-dark);
  text-decoration: none;
}
.mag-brand__logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.mag-brand__logo img { display: block; width: 74px; height: auto; }
.mag-brand__name { font-size: 14px; font-weight: 800; letter-spacing: .035em; }
.mag-header__link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--mag-navy);
  border-radius: var(--mag-radius);
  background: var(--mag-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.mag-header__link:hover { color: #fff; background: var(--mag-navy-dark); }
.mag-header__tools { display: flex; align-items: center; gap: 12px; }

/* Keyword search over the archive. Runs on the reader's machine, so it works
   on a static host and stays usable where the category chips are too coarse. */
.mag-search { display: flex; align-items: center; gap: 0; }
.mag-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.mag-search__input {
  width: 208px;
  /* Without this the input keeps its intrinsic size in a flex row and can push
     the header wider than a narrow phone. */
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--mag-line);
  border-right: 0;
  border-radius: var(--mag-radius) 0 0 var(--mag-radius);
  background: #fff;
  color: var(--mag-ink);
  font-size: 13px;
  font-family: inherit;
}
.mag-search__input::placeholder { color: #97a0ad; }
.mag-search__input:focus { outline: 2px solid var(--mag-navy); outline-offset: -2px; }
.mag-search__button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--mag-navy);
  border-radius: 0 var(--mag-radius) var(--mag-radius) 0;
  background: #fff;
  color: var(--mag-navy);
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.mag-search__button:hover { color: #fff; background: var(--mag-navy); }

/* Global category navigation, so readers can move between themes
   without going back to search results. */
.mag-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--mag-line);
}
.mag-nav__inner {
  width: min(calc(100% - 32px), var(--mag-max));
  margin: 0 auto;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  /* Swiping past the last chip must not hand the gesture to the page, which is
     what makes a phone appear to scroll sideways. */
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mag-nav__inner::-webkit-scrollbar { display: none; }
.mag-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 3px solid transparent;
  color: #33435a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mag-nav a:hover { color: var(--mag-navy); border-bottom-color: var(--mag-line); background: #f8fafc; }
.mag-nav a[aria-current="page"] { color: var(--mag-navy); border-bottom-color: var(--mag-orange); }

.mag-breadcrumb {
  width: min(calc(100% - 32px), var(--mag-max));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #727c8b;
  font-size: 12px;
}
.mag-breadcrumb a { color: #536074; text-decoration: none; }
.mag-breadcrumb a:hover { text-decoration: underline; }
.mag-breadcrumb__sep { color: #a5acb7; }

/* Compact editorial masthead. */
.mag-hero {
  background: var(--mag-warm);
  border-top: 1px solid #ebe4d8;
  border-bottom: 1px solid #e2dbcf;
  color: var(--mag-ink);
}
.mag-hero__inner {
  width: min(calc(100% - 32px), var(--mag-max));
  margin: 0 auto;
  padding: 40px 0 42px;
}
.mag-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mag-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
}
a.mag-category:hover { color: #b64c17; text-decoration: underline; }
.mag-category::before { content: ""; width: 18px; height: 3px; background: currentColor; flex: 0 0 auto; }
.mag-hero h1 {
  max-width: 840px;
  margin: 12px 0 14px;
  color: #13233a;
  font-size: clamp(27px, 4.2vw, 40px);
  line-height: 1.45;
  letter-spacing: .01em;
}
.mag-hero__lead { max-width: 780px; margin: 0; color: #4f5d70; font-size: 15px; }
.mag-meta {
  margin-top: 17px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  color: #657083;
  font-size: 12px;
}
.mag-meta__editor { color: #33435a; font-weight: 700; }

/* Article lead image. Purely illustrative: the same words are in the h1,
   so it is exposed as decorative to screen readers. */
/* Aligned to the left edge and width of the article column below it. */
.mag-eyecatch {
  width: min(calc(100% - 32px), var(--mag-max));
  margin: 36px auto 0;
}
.mag-eyecatch img {
  display: block;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: var(--mag-radius);
  background: var(--mag-soft);
}

/* Article sheet: no floating SaaS-style card. */
.mag-layout {
  width: min(calc(100% - 32px), var(--mag-max));
  margin: 42px auto 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 56px;
  align-items: start;
}
.mag-article { min-width: 0; max-width: 760px; font-size: 17px; }
.mag-article__intro {
  margin: 0 0 46px;
  padding: 22px 0;
  border-top: 2px solid var(--mag-navy);
  border-bottom: 1px solid var(--mag-line);
  color: #26364d;
  font-size: 17px;
  line-height: 1.95;
}
.mag-article__intro p:first-child { margin-top: 0; }
.mag-article__intro p:last-child { margin-bottom: 0; }
.mag-article h2 {
  margin: 62px 0 22px;
  padding: 0 0 11px;
  border-bottom: 1px solid #aebac9;
  color: #102f55;
  font-size: clamp(23px, 3vw, 29px);
  line-height: 1.5;
  scroll-margin-top: 24px;
}
.mag-article h2:first-of-type { margin-top: 0; }
.mag-article h3 {
  position: relative;
  margin: 38px 0 15px;
  padding-left: 17px;
  color: #1e334f;
  font-size: clamp(19px, 2.4vw, 22px);
  line-height: 1.55;
  scroll-margin-top: 24px;
}
.mag-article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 7px;
  height: 7px;
  background: var(--mag-orange);
}
.mag-article p { margin: 0 0 22px; }
.mag-article ul, .mag-article ol { margin: 0 0 24px; padding-left: 1.5em; }
.mag-article li { margin-bottom: 8px; }
.mag-article strong { color: #142f50; font-weight: 800; }
.mag-article figure { margin: 30px 0; }
.mag-article figure img { display: block; width: 100%; border-radius: var(--mag-radius); }
.mag-article figcaption { margin-top: 8px; color: var(--mag-muted); font-size: 13px; line-height: 1.7; }

.mag-table-wrap {
  margin: 27px 0;
  overflow-x: auto;
  border-top: 2px solid var(--mag-navy);
  border-bottom: 1px solid var(--mag-line);
}
.mag-article table { width: 100%; min-width: 590px; border-collapse: collapse; font-size: 14px; }
.mag-article th, .mag-article td {
  padding: 13px 14px;
  border-right: 1px solid var(--mag-line);
  border-bottom: 1px solid var(--mag-line);
  text-align: left;
  vertical-align: top;
}
.mag-article th { background: #eef2f6; color: #263e5c; font-weight: 800; }
.mag-article tr:last-child td { border-bottom: 0; }
.mag-article th:last-child, .mag-article td:last-child { border-right: 0; }

.mag-note {
  margin: 27px 0;
  padding: 17px 19px;
  border-left: 3px solid #bd8d2d;
  border-radius: 0 var(--mag-radius) var(--mag-radius) 0;
  background: #fbf7eb;
  color: #4c432e;
  font-size: 15px;
}
.mag-article pre {
  margin: 27px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid #cbd3dd;
  border-radius: var(--mag-radius);
  background: #f5f6f7;
  color: #25364d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mag-checklist { margin: 24px 0; padding: 0; list-style: none; }
.mag-checklist li { position: relative; padding: 7px 0 7px 30px; }
.mag-checklist li::before { content: "□"; position: absolute; left: 3px; top: 5px; color: var(--mag-navy); font-size: 18px; font-weight: 900; }

/* One restrained conversion area at the article end. */
.mag-cta {
  margin: 58px 0 12px;
  padding: 30px;
  border-top: 3px solid var(--mag-navy);
  border-radius: 0 0 var(--mag-radius) var(--mag-radius);
  background: #eef3f8;
  color: var(--mag-ink);
  text-align: left;
}
.mag-cta__eyebrow { margin: 0 0 5px; color: var(--mag-orange); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.mag-cta h2 { margin: 0 0 8px; padding: 0; border: 0; color: #112f55; font-size: clamp(21px, 3vw, 27px); }
.mag-cta p { margin: 0 0 20px; max-width: 620px; color: #526178; font-size: 15px; }
.mag-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 28px;
  border: 1px solid var(--mag-navy);
  border-radius: var(--mag-radius);
  background: var(--mag-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.mag-cta__button:hover { color: #fff; background: var(--mag-navy-dark); transform: translateY(-1px); }

.mag-sidebar { position: sticky; top: 18px; min-width: 0; display: grid; gap: 26px; }
.mag-side-card { padding: 18px 0 0; border-top: 2px solid var(--mag-navy); }
.mag-side-card h2 { margin: 0 0 10px; color: #193654; font-size: 14px; line-height: 1.5; }
.mag-side-card p { margin: 0 0 10px; color: var(--mag-muted); font-size: 12px; line-height: 1.75; }
.mag-toc { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.mag-toc li { counter-increment: toc; border-top: 1px solid var(--mag-line-soft); }
.mag-toc li:first-child { border-top: 0; }
.mag-toc a {
  display: grid;
  grid-template-columns: 23px 1fr;
  gap: 4px;
  padding: 10px 0;
  color: #43536a;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  text-decoration: none;
}
.mag-toc a:hover { color: var(--mag-navy); text-decoration: underline; }
.mag-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--mag-orange); font-size: 10px; font-weight: 900; }
/* Table of contents first, then the job CTA, then who edits the site. */
.mag-sidebar .mag-side-cta { order: 2; }
.mag-sidebar .mag-editorial-card { order: 3; }
.mag-editorial-card strong { color: #193654; }
.mag-side-card--tags { display: none; }

/* Compact job CTA that travels with the sidebar. */
.mag-side-cta {
  padding: 18px;
  border: 1px solid var(--mag-line);
  border-top: 3px solid var(--mag-orange);
  border-radius: var(--mag-radius);
  background: var(--mag-warm);
}
.mag-side-card.mag-side-cta { border-top: 3px solid var(--mag-orange); }
.mag-side-cta h2 { margin: 0 0 7px; color: #14365d; font-size: 14px; line-height: 1.55; }
.mag-side-cta p { margin: 0 0 13px; color: #5b6678; font-size: 12px; line-height: 1.7; }
.mag-side-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--mag-radius);
  background: var(--mag-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.mag-side-cta a:hover { color: #fff; background: var(--mag-navy-dark); }
.mag-side-links { display: grid; gap: 1px; }
.mag-side-links a {
  padding: 9px 0;
  border-top: 1px solid var(--mag-line-soft);
  color: #43536a;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}
.mag-side-links a:first-child { border-top: 0; }
.mag-side-links a:hover { color: var(--mag-navy); text-decoration: underline; }

.mag-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.mag-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid #c9d2dc;
  border-radius: 999px;
  background: #fff;
  color: #44546a;
  font-size: 11px;
  text-decoration: none;
}
a.mag-tag:hover { border-color: var(--mag-navy); color: var(--mag-navy); }

.mag-cluster-nav {
  margin: 40px 0 0;
  padding: 22px 22px 8px;
  border: 1px solid var(--mag-line);
  border-radius: var(--mag-radius);
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 70%);
}
.mag-cluster-nav > h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: #142f50;
  font-size: 20px;
}
.mag-cluster-nav > p {
  margin: 0 0 14px;
  color: var(--mag-muted);
  font-size: 15px;
}
.mag-cluster-nav ol {
  margin: 0 0 12px;
  padding-left: 1.35em;
}
.mag-cluster-nav li { margin-bottom: 6px; }

.mag-confirm-points {
  margin: 36px 0 0;
  padding: 20px 22px 10px;
  border-left: 4px solid #2f6fed;
  background: #f5f8fd;
}
.mag-confirm-points > h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: #142f50;
  font-size: 20px;
}
.mag-confirm-points > p {
  margin: 0 0 12px;
  color: var(--mag-muted);
  font-size: 15px;
}
.mag-confirm-points ul { margin: 0 0 12px; }
.mag-source-note {
  margin: 28px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--mag-line);
  border-radius: var(--mag-radius);
  background: #fff;
  color: var(--mag-muted);
  font-size: 14px;
  line-height: 1.7;
}

.mag-related { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--mag-line); }
.mag-related > h2 { margin: 0 0 18px; padding: 0; border: 0; color: #142f50; font-size: 22px; }
.mag-related__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mag-related__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--mag-line);
  border-radius: var(--mag-radius);
  background: #fff;
  color: var(--mag-ink);
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.mag-related__card:hover { border-color: #8197b1; color: var(--mag-ink); transform: translateY(-2px); box-shadow: var(--mag-shadow-hover); }
.mag-related__thumb { display: block; overflow: hidden; background: var(--mag-soft); }
.mag-related__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
.mag-related__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.mag-related__label { color: var(--mag-orange); font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.mag-related__title { font-size: 14.5px; font-weight: 800; line-height: 1.65; }
.mag-pending { margin-top: 30px; padding: 16px 0; border-top: 1px solid var(--mag-line); }
.mag-pending h2 { margin: 0 0 9px; padding: 0; border: 0; color: #344961; font-size: 14px; }
.mag-pending p { margin: 0 0 9px; color: var(--mag-muted); font-size: 12px; }

.mag-footer { padding: 30px 16px; background: #0a2b53; color: rgba(255,255,255,.72); font-size: 11px; text-align: center; }
.mag-footer p { margin: 0 0 7px; }
.mag-footer a { margin: 0 8px; color: #fff; text-decoration: none; }
.mag-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------------
   Magazine archive
   --------------------------------------------------------------- */
/* Archive masthead. The band stays short on purpose: the first screen has to
   show that articles continue below it, not fill itself with a poster. */
.mag-archive-hero {
  position: relative;
  isolation: isolate;
  background: var(--mag-navy-dark);
  overflow: hidden;
}
.mag-archive-hero__media { position: absolute; inset: 0; z-index: -2; }
.mag-archive-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.mag-archive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(8, 45, 89, .94) 0%, rgba(8, 45, 89, .88) 34%, rgba(8, 45, 89, .55) 62%, rgba(8, 45, 89, .28) 100%);
}
.mag-archive-hero__inner {
  width: min(calc(100% - 32px), var(--mag-max));
  margin: 0 auto;
  padding: 40px 0 42px;
}
.mag-archive-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .06em;
}
.mag-archive-hero__eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--mag-orange); }
.mag-archive-hero h1 {
  max-width: 20em;
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.45;
}
/* Each clause is its own inline block, so a narrow screen breaks the headline
   at the comma instead of splitting a word. */
.mag-archive-hero h1 span { display: inline-block; }
/* The band is dark, so any paragraph inside it has to be light regardless of
   which template rendered it. */
.mag-archive-hero p { max-width: 34em; margin: 0; color: #dbe4ef; font-size: 14.5px; line-height: 1.85; }
.mag-archive-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.mag-archive-hero__cta {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #fff;
  border-radius: var(--mag-radius);
  background: #fff;
  color: var(--mag-navy-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.mag-archive-hero__cta:hover { color: var(--mag-navy-dark); background: #e8eef6; border-color: #e8eef6; }
.mag-archive-hero__cta--ghost { background: transparent; color: #fff; }
.mag-archive-hero__cta--ghost:hover { color: var(--mag-navy-dark); background: #fff; }

.mag-archive { width: min(calc(100% - 32px), var(--mag-max)); margin: 40px auto 84px; }

/* Purpose-first entries. The category chips answer "which bucket", these
   answer "what am I trying to decide". */
.mag-entries { margin-bottom: 44px; }
.mag-entries__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mag-entry {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 18px 20px;
  border: 1px solid var(--mag-line);
  border-top: 3px solid var(--mag-navy);
  border-radius: var(--mag-radius);
  background: #fff;
  color: var(--mag-ink);
  text-decoration: none;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.mag-entry:hover { color: var(--mag-ink); border-color: #8197b1; box-shadow: var(--mag-shadow-hover); }
.mag-entry__title { color: #12335b; font-size: 15px; font-weight: 800; line-height: 1.6; }
.mag-entry__desc { color: #5b6779; font-size: 12.5px; line-height: 1.75; }
.mag-entry__count { margin-top: auto; color: #7b8491; font-size: 11px; font-weight: 700; }

/* Pagination. The archive keeps growing, so a page shows a fixed slice instead
   of every card at once. Every link stays in the document, so the pages remain
   reachable for crawlers and for readers without JavaScript. */
.mag-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.mag-pager__status {
  flex: 1 0 100%;
  margin: 0 0 6px;
  color: #6b7481;
  font-size: 12px;
  text-align: center;
}
.mag-pager__button,
.mag-pager__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--mag-line);
  border-radius: var(--mag-radius);
  background: #fff;
  color: #33435a;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.mag-pager__button:hover:not(:disabled),
.mag-pager__page:hover:not([aria-current="page"]) {
  color: var(--mag-navy);
  border-color: #8197b1;
  background: #f8fafc;
}
.mag-pager__page[aria-current="page"] {
  border-color: var(--mag-navy);
  background: var(--mag-navy);
  color: #fff;
  cursor: default;
}
.mag-pager__button:disabled { color: #a9b1bd; background: #f4f6f8; cursor: default; }
.mag-pager__gap { min-width: 20px; text-align: center; color: #a9b1bd; font-size: 13px; }

.mag-section-heading {
  margin: 0 0 18px;
  padding-left: 13px;
  border-left: 4px solid var(--mag-navy);
  color: #15385f;
  font-size: 22px;
  line-height: 1.5;
}
.mag-section-heading__count { margin-left: 10px; color: #7b8491; font-size: 12px; font-weight: 500; }

.mag-hub-core {
  margin: 0 0 28px;
  padding: 18px 18px 14px;
  border: 1px solid var(--mag-line);
  border-left: 4px solid var(--mag-navy);
  background: linear-gradient(180deg, #f7fafc 0%, #fff 100%);
}
.mag-hub-core > p {
  margin: 0 0 12px;
  color: #4a5563;
  font-size: 14px;
  line-height: 1.75;
}
.mag-hub-core__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mag-hub-core__list a {
  color: #15385f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.mag-hub-core__list a:hover { text-decoration: underline; }

.mag-hub-guide {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-top: 1px solid var(--mag-line);
  border-bottom: 1px solid var(--mag-line);
  background: #f8fafc;
}
.mag-hub-guide p {
  margin: 0;
  color: #4a5563;
  font-size: 14px;
  line-height: 1.75;
}
.mag-hub-guide a { color: #15385f; font-weight: 600; }

@media (max-width: 680px) {
  .mag-hub-core__list { grid-template-columns: 1fr; }
}

/* Lead article: one horizontal unit, so the row never leaves a dead column. */
.mag-archive__lead { margin-bottom: 44px; }
.mag-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--mag-line);
  border-top: 4px solid var(--mag-orange);
  border-radius: var(--mag-radius);
  background: #fff;
  color: var(--mag-ink);
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.mag-feature:hover { color: var(--mag-ink); border-color: #8197b1; box-shadow: var(--mag-shadow-hover); }
/* The thumbnails carry burned-in text, so the frame keeps their 1200:630
   ratio instead of cropping to fill the row. */
.mag-feature__thumb {
  display: block;
  align-self: start;
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--mag-soft);
}
.mag-feature__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mag-feature__body { display: flex; flex-direction: column; gap: 10px; padding: 26px 28px; }
.mag-feature__label, .mag-archive-card__category {
  display: inline-block;
  color: var(--mag-orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
}
.mag-feature h3 { margin: 0; color: #12335b; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.5; }
.mag-feature p { margin: 0; color: #566377; font-size: 14px; line-height: 1.8; }
.mag-feature time { margin-top: auto; color: #7b8491; font-size: 11px; }

.mag-archive__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 48px;
  align-items: start;
}
.mag-archive__main { min-width: 0; }
.mag-archive-side { position: sticky; top: 18px; min-width: 0; display: grid; gap: 26px; }

/* Category filter. Falls back to plain links when JS is unavailable. */
.mag-filter { margin: 0 0 22px; }
.mag-filter__label { margin: 0 0 9px; color: #66717f; font-size: 12px; font-weight: 700; }
.mag-filter__items { display: flex; flex-wrap: wrap; gap: 8px; }
.mag-filter button {
  appearance: none;
  min-height: 38px;
  padding: 5px 15px;
  border: 1px solid #aeb9c7;
  border-radius: 999px;
  background: #fff;
  color: #354861;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mag-filter button:hover { border-color: var(--mag-navy); color: var(--mag-navy); background: #f2f6fb; }
.mag-filter button[aria-pressed="true"], .mag-filter button.is-active {
  border-color: var(--mag-navy);
  background: var(--mag-navy);
  color: #fff;
}
.mag-archive__heading { margin: 0 0 18px; color: #15385f; font-size: 22px; }
.mag-archive__empty { margin: 24px 0; padding: 20px; border: 1px dashed var(--mag-line); border-radius: var(--mag-radius); color: var(--mag-muted); font-size: 14px; text-align: center; }
.mag-archive__empty p { margin: 0 0 12px; }
.mag-archive__empty button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--mag-navy);
  border-radius: var(--mag-radius);
  background: #fff;
  color: var(--mag-navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mag-archive__empty button:hover { background: #f2f6fb; }

.mag-archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
.mag-archive-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--mag-line);
  border-radius: var(--mag-radius);
  background: #fff;
  box-shadow: var(--mag-shadow);
  color: var(--mag-ink);
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.mag-archive-card[hidden] { display: none; }
.mag-archive-card:hover { border-color: #8195ad; color: var(--mag-ink); transform: translateY(-2px); box-shadow: var(--mag-shadow-hover); }
.mag-archive-card__thumb { display: block; overflow: hidden; background: var(--mag-soft); }
.mag-archive-card__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  transition: filter .3s ease;
}
.mag-archive-card:hover .mag-archive-card__thumb img { filter: brightness(.97); }
.mag-archive-card__body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 15px 18px 17px; }
.mag-archive-card h3 {
  display: -webkit-box;
  margin: 7px 0 9px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #17385d;
  font-size: 16px;
  line-height: 1.62;
}
.mag-archive-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #667184;
  font-size: 13px;
  line-height: 1.75;
}
.mag-archive-card time { margin-top: auto; color: #7b8491; font-size: 11px; }

.mag-qualifications { margin-top: 56px; padding-top: 30px; border-top: 2px solid var(--mag-navy); }
.mag-qualifications h2 { margin: 0 0 8px; color: #15385f; font-size: 22px; }
.mag-qualifications__lead { margin: 0 0 18px; color: #5b6678; font-size: 14px; }
/* Fourteen qualifications used to stack as full poster cards, which made this
   block the longest part of the page. A compact row keeps the same links in a
   fraction of the height. */
.mag-qualifications__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mag-qualification-link {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 0 14px;
  min-width: 0;
  border: 1px solid var(--mag-line);
  border-radius: var(--mag-radius);
  background: #fff;
  box-shadow: var(--mag-shadow);
  color: #17385d;
  font-weight: 800;
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.mag-qualification-link:hover { border-color: var(--mag-navy); transform: translateY(-2px); box-shadow: var(--mag-shadow-hover); }
.mag-qualification-link__thumb { display: block; overflow: hidden; background: var(--mag-soft); }
.mag-qualification-link__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
.mag-qualification-link__body {
  display: -webkit-box;
  padding: 12px 16px 12px 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Full-width editorial policy panel, placed where readers look for
   who is behind the content. */
.mag-about {
  margin-top: 64px;
  padding: 30px;
  border-top: 3px solid var(--mag-navy);
  border-radius: 0 0 var(--mag-radius) var(--mag-radius);
  background: var(--mag-soft);
}
.mag-about h2 { margin: 0 0 14px; color: #14365d; font-size: 20px; }
.mag-about__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mag-about h3 { margin: 0 0 6px; color: #26405f; font-size: 13px; }
.mag-about p { margin: 0; color: #596779; font-size: 13px; line-height: 1.8; }
.mag-about strong { color: #14365d; }

@media (max-width: 1000px) {
  .mag-layout, .mag-archive__layout { grid-template-columns: 1fr; gap: 34px; }
  .mag-sidebar { position: static; }
  .mag-archive-side { position: static; }
  .mag-article { max-width: none; }
  .mag-about__grid { grid-template-columns: 1fr 1fr; }
  .mag-entries__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-search__input { width: 160px; }
}

@media (max-width: 900px) {
  .mag-sidebar { order: -1; }
  .mag-editorial-card { display: none; }
  .mag-feature { grid-template-columns: 1fr; }
  .mag-feature__body { padding: 20px 22px; }
}

@media (max-width: 680px) {
  body { font-size: 15.5px; }
  .mag-header__inner { min-height: 58px; gap: 10px; }
  .mag-brand { gap: 8px; }
  .mag-brand__logo img { width: 56px; }
  .mag-brand__name { font-size: 11px; }
  .mag-header__link { min-height: 36px; padding: 0 10px; font-size: 10.5px; }
  /* The phone header keeps the brand and the job link on one row; search drops
     to a full-width row of its own so neither control gets squeezed. */
  .mag-header__inner { flex-wrap: wrap; padding: 9px 0 10px; }
  .mag-header__tools { display: contents; }
  .mag-search { order: 3; width: 100%; }
  .mag-search__input { flex: 1 1 auto; width: auto; min-height: 42px; font-size: 16px; }
  .mag-search__button { min-height: 42px; padding: 0 16px; }
  /* A fade on the trailing edge shows that more categories exist to the right. */
  .mag-nav { position: sticky; }
  .mag-nav__inner { width: 100%; padding: 0 14px; }
  .mag-nav::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 78%);
  }
  .mag-nav a { min-height: 42px; padding: 0 11px; font-size: 12.5px; }
  .mag-breadcrumb { width: min(calc(100% - 24px), var(--mag-max)); padding: 11px 0; }
  .mag-hero__inner { width: min(calc(100% - 24px), var(--mag-max)); padding: 26px 0 28px; }
  .mag-hero h1 { margin-top: 9px; line-height: 1.5; }
  .mag-hero__lead { font-size: 14px; line-height: 1.8; }
  .mag-meta { margin-top: 13px; display: grid; gap: 2px; }
  .mag-eyecatch { width: min(calc(100% - 24px), var(--mag-max)); margin: 22px auto 0; }
  .mag-layout { width: min(calc(100% - 24px), var(--mag-max)); margin: 26px auto 58px; gap: 30px; }
  .mag-article { font-size: 16px; }
  .mag-article__intro { margin-bottom: 34px; padding: 17px 0; font-size: 16px; }
  .mag-article h2 { margin-top: 46px; }
  .mag-article h3 { margin-top: 32px; }
  .mag-table-wrap::before {
    content: "表は横にスクロールできます →";
    position: sticky;
    left: 0;
    display: block;
    width: max-content;
    padding: 6px 0;
    color: #6b7481;
    background: #fff;
    font-size: 10px;
  }
  .mag-article th, .mag-article td { padding: 11px 12px; }
  .mag-cta { margin-top: 44px; padding: 22px 18px; }
  .mag-cta__button { width: 100%; }
  .mag-related { margin-top: 44px; }
  .mag-related__grid { grid-template-columns: 1fr; gap: 12px; }
  .mag-footer a { display: inline-block; margin-top: 5px; }

  .mag-archive-hero__inner, .mag-archive { width: min(calc(100% - 24px), var(--mag-max)); }
  .mag-archive-hero__inner { padding: 26px 0 28px; }
  /* On a phone the photo sits behind a heavier scrim: the text column spans the
     full width, so it cannot be pushed onto the busy side of the frame. */
  .mag-archive-hero__media img { object-position: 68% 50%; }
  .mag-archive-hero::before {
    background: linear-gradient(180deg, rgba(8, 45, 89, .92) 0%, rgba(8, 45, 89, .86) 55%, rgba(8, 45, 89, .82) 100%);
  }
  .mag-archive-hero h1 { font-size: 24px; line-height: 1.5; }
  .mag-archive-hero__lead { font-size: 13.5px; line-height: 1.8; }
  .mag-archive-hero__actions { gap: 10px; margin-top: 20px; }
  .mag-archive-hero__cta { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .mag-archive { margin: 26px auto 60px; }
  /* On a phone these are wayfinding links, not cards to read: the title and
     the count carry the choice, so the description is dropped. */
  .mag-entries { margin-bottom: 30px; }
  .mag-entries__grid { grid-template-columns: 1fr; gap: 0; }
  .mag-entry {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 2px;
    border: 0;
    border-bottom: 1px solid var(--mag-line-soft);
    border-radius: 0;
  }
  .mag-entry:hover { box-shadow: none; }
  .mag-entry__title { font-size: 14.5px; }
  .mag-entry__desc { display: none; }
  .mag-entry__count { margin-top: 0; flex: 0 0 auto; }
  .mag-section-heading { font-size: 19px; }
  .mag-archive__lead { margin-bottom: 34px; }
  .mag-feature { grid-template-columns: 1fr; }
  .mag-feature__body { gap: 8px; padding: 18px; }
  .mag-feature p { font-size: 13.5px; }
  .mag-archive__layout { gap: 40px; }
  .mag-qualifications { margin-top: 44px; }
  .mag-qualifications__grid { grid-template-columns: 1fr; gap: 0; }
  .mag-qualification-link {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0 12px;
    border: 0;
    border-bottom: 1px solid var(--mag-line-soft);
    border-radius: 0;
    box-shadow: none;
  }
  .mag-qualification-link:hover { transform: none; box-shadow: none; }
  .mag-qualification-link__body { padding: 11px 0; font-size: 13px; }
  .mag-about { margin-top: 44px; padding: 22px 18px; }
  .mag-about__grid { grid-template-columns: 1fr; gap: 18px; }

  /* Dense list rows scan faster than stacked cards on a phone. */
  .mag-archive-grid { grid-template-columns: 1fr; gap: 0; }
  .mag-archive-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: start;
    gap: 0 14px;
    padding: 15px 0;
    border: 0;
    border-bottom: 1px solid var(--mag-line-soft);
    border-radius: 0;
    box-shadow: none;
  }
  .mag-archive-card:first-child { padding-top: 0; }
  .mag-archive-card:hover { transform: none; box-shadow: none; }
  .mag-archive-card__thumb { border-radius: var(--mag-radius); }
  .mag-archive-card__body { padding: 0; }
  .mag-archive-card h3 { margin: 5px 0 6px; -webkit-line-clamp: 3; font-size: 14.5px; line-height: 1.55; }
  .mag-archive-card p { display: none; }
  .mag-archive-card time { font-size: 10.5px; }

  .mag-pager { gap: 5px; margin-top: 26px; }
  .mag-pager__button, .mag-pager__page { min-width: 42px; min-height: 42px; padding: 0 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0s !important; animation-duration: 0s !important; }
}
