:root {
  --ink: #0a2340;
  --ink-soft: #35506d;
  --blue: #1769e0;
  --blue-dark: #0d4fb7;
  --sky: #e8f5ff;
  --sky-strong: #cfeafb;
  --warm: #fffaf2;
  --paper: #ffffff;
  --coral: #f27b57;
  --mint: #78bbaa;
  --line: #d9e6ef;
  --shadow: 0 20px 55px rgba(17, 64, 105, .12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-feature-settings: "palt" 1;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; color: #fff; background: var(--ink); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.mag-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(10, 35, 64, .08);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.mag-header-inner { min-height: 76px; display: flex; align-items: center; gap: 32px; }
.mag-brand { display: inline-flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.mag-brand img { width: 170px; height: auto; }
.mag-brand em { padding-left: 13px; border-left: 1px solid var(--line); color: var(--blue); font-size: 12px; font-style: normal; font-weight: 800; letter-spacing: .13em; }
.mag-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.mag-nav a { transition: color .2s ease; }
.mag-nav a:hover { color: var(--blue); }
.mag-cta, .button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(23, 105, 224, .22);
  font-weight: 800;
  line-height: 1.35;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.mag-cta:hover, .button:hover { transform: translateY(-2px); background: var(--blue-dark); box-shadow: 0 14px 28px rgba(23, 105, 224, .28); }

.mag-hero {
  overflow: hidden;
  padding: 72px 0 54px;
  background:
    radial-gradient(circle at 88% 0%, rgba(242, 123, 87, .14), transparent 27%),
    linear-gradient(135deg, var(--warm), #f2faff 64%, #fff 100%);
}
.mag-hero-copy { max-width: 760px; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 13px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.mag-hero h1 { margin: 0; font-size: clamp(38px, 6vw, 76px); line-height: 1.08; letter-spacing: -.055em; }
.mag-hero h1 span { display: block; }
.mag-hero h1 small { display: block; margin-top: 14px; color: var(--ink-soft); font-size: clamp(16px, 2vw, 22px); font-weight: 700; letter-spacing: 0; }
.mag-hero-copy > p:last-child { max-width: 650px; margin: 24px 0 0; color: var(--ink-soft); font-size: 17px; }

.featured-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr); gap: 22px; margin-top: 44px; }
.featured-main, .featured-side-card, .article-card { position: relative; overflow: hidden; border: 1px solid rgba(10, 35, 64, .08); background: #fff; box-shadow: var(--shadow); }
.featured-main { min-height: 470px; border-radius: var(--radius-lg); }
.featured-main img { width: 100%; height: 100%; min-height: 470px; object-fit: cover; }
.featured-overlay { position: absolute; inset: auto 0 0; padding: 80px 34px 32px; color: #fff; background: linear-gradient(transparent, rgba(5, 28, 52, .92)); }
.category-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: 999px; color: var(--blue-dark); background: var(--sky); font-size: 11px; font-weight: 900; line-height: 1.2; }
.featured-overlay .category-tag { color: var(--ink); background: #fff; }
.featured-overlay h2 { max-width: 800px; margin: 12px 0 10px; font-size: clamp(24px, 3.2vw, 39px); line-height: 1.35; letter-spacing: -.035em; }
.featured-overlay p { margin: 0; color: rgba(255,255,255,.84); font-size: 14px; }
.featured-side { display: grid; gap: 22px; }
.featured-side-card { display: grid; grid-template-columns: 42% 1fr; min-height: 224px; border-radius: var(--radius-md); }
.featured-side-card img { width: 100%; height: 100%; object-fit: cover; }
.featured-side-card div { align-self: center; padding: 22px; }
.featured-side-card h2 { margin: 10px 0; font-size: 19px; line-height: 1.45; letter-spacing: -.02em; }
.card-meta { color: #526b82; font-size: 12px; font-weight: 700; }

.service-banner { margin: 52px auto 0; }
.service-banner-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 26px 30px;
  border-radius: 20px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 18px 45px rgba(10,35,64,.18);
}
.service-banner-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: var(--ink); background: var(--sky); font-size: 26px; }
.service-banner h2 { margin: 0 0 4px; font-size: 21px; line-height: 1.35; }
.service-banner p { margin: 0; color: rgba(255,255,255,.74); font-size: 13px; }
.service-banner .button { color: var(--ink); background: #fff; box-shadow: none; }

.mag-main { padding: 74px 0 100px; }
.category-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.category-nav a { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: #fff; font-size: 13px; font-weight: 800; }
.category-nav a:hover, .category-nav a[aria-current="page"] { color: #fff; border-color: var(--blue); background: var(--blue); }
.mag-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 54px; align-items: start; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; letter-spacing: -.04em; }
.section-heading p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.search-box { display: flex; gap: 10px; margin: 0 0 28px; padding: 8px 8px 8px 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box button { min-width: 46px; border: 0; border-radius: 9px; color: #fff; background: var(--ink); cursor: pointer; }
.search-result { min-height: 1.5em; margin: -16px 0 20px; color: var(--ink-soft); font-size: 12px; }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.article-card { border-radius: var(--radius-md); box-shadow: 0 12px 35px rgba(17,64,105,.08); transition: transform .22s ease, box-shadow .22s ease; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card figure { aspect-ratio: 3 / 2; margin: 0; overflow: hidden; background: var(--sky); }
.article-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.article-card:hover img { transform: scale(1.025); }
.article-card-body { padding: 22px; }
.article-card h3 { margin: 11px 0 12px; font-size: 20px; line-height: 1.55; letter-spacing: -.02em; }
.article-card p { margin: 0 0 16px; color: #2d4b68; font-size: 14px; line-height: 1.85; }
.article-card[hidden] { display: none; }

.mag-sidebar { position: sticky; top: 104px; display: grid; gap: 24px; }
.side-box { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.side-box h2 { margin: 0 0 18px; padding-bottom: 12px; border-bottom: 3px solid var(--sky-strong); font-size: 18px; }
.popular-list { display: grid; gap: 17px; counter-reset: rank; }
.popular-list a { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: #2d4b68; font-size: 14px; font-weight: 750; line-height: 1.65; }
.popular-list a::before { counter-increment: rank; content: counter(rank); width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 900; }
.job-link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.job-link-list a { padding: 7px 10px; border-radius: 8px; color: var(--blue-dark); background: var(--sky); font-size: 12px; font-weight: 800; }
.side-cta { color: #fff; border: 0; background: linear-gradient(145deg, var(--blue), #0d4fb7); }
.side-cta h2 { border-color: rgba(255,255,255,.3); }
.side-cta p { color: rgba(255,255,255,.8); font-size: 13px; }
.side-cta .button { width: 100%; color: var(--ink); background: #fff; box-shadow: none; }

.category-intro { margin-bottom: 38px; padding: 28px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--warm), var(--sky)); }
.category-intro h1 { margin: 0 0 10px; font-size: clamp(32px, 5vw, 52px); line-height: 1.25; letter-spacing: -.04em; }
.category-intro p { max-width: 720px; margin: 0; color: var(--ink-soft); }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 26px; color: #526b82; font-size: 12px; }
.breadcrumb a:hover { color: var(--blue); }
.article-hero { padding: 42px 0 58px; background: linear-gradient(180deg, var(--warm), #fff); }
.article-header { max-width: 940px; }
.article-header h1 { margin: 14px 0 22px; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.34; letter-spacing: -.04em; text-wrap: balance; }
.article-description { max-width: 780px; margin: 0; color: #2d4b68; font-size: 18px; line-height: 1.9; }
.article-byline { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 22px; color: #526b82; font-size: 12px; font-weight: 700; }
.article-cover { margin-top: 34px; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.article-cover img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.article-main { padding: 62px 0 110px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; gap: 72px; align-items: start; }
.article-body { min-width: 0; color: #112f4c; font-size: 18px; line-height: 2; letter-spacing: .01em; }
.article-body > p:first-of-type { margin-bottom: 32px; color: #173d60; font-size: 19px; font-weight: 650; line-height: 2.05; }
.article-body h2 { margin: 72px 0 26px; padding: 0 0 14px 16px; border-bottom: 2px solid var(--sky-strong); border-left: 5px solid var(--blue); color: var(--ink); font-size: clamp(26px, 3vw, 32px); line-height: 1.5; letter-spacing: -.025em; }
.article-body h3 { margin: 42px 0 16px; color: var(--ink); font-size: 22px; line-height: 1.55; }
.article-body p { margin: 0 0 28px; }
.article-body ul, .article-body ol { margin: 0 0 32px; padding-left: 1.45em; }
.article-body li { margin-bottom: 12px; padding-left: .15em; }
.article-body a:not(.button) { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.article-body table { width: 100%; margin: 30px 0 38px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; font-size: 15px; line-height: 1.75; }
.article-body th, .article-body td { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { color: var(--ink); background: var(--sky); font-weight: 850; }
.article-body tr:last-child td { border-bottom: 0; }
.article-body th:last-child, .article-body td:last-child { border-right: 0; }
.summary-box, .toc, .note-box { margin: 34px 0; padding: 27px 30px; border-radius: var(--radius-md); }
.summary-box { border: 1px solid #c5e1d8; background: #f0faf7; }
.summary-box h2, .toc h2 { margin: 0 0 13px; padding: 0; border: 0; font-size: 19px; }
.summary-box ul { margin-bottom: 0; }
.toc { border: 1px solid var(--line); background: #f8fbfd; }
.toc ol { margin: 0; }
.toc a { text-decoration: none !important; }
.note-box { border-left: 5px solid var(--coral); background: var(--warm); }
.note-box strong { display: block; margin-bottom: 7px; color: var(--ink); }
.inline-cta { margin: 44px 0; padding: 30px; border-radius: 22px; color: #fff; background: linear-gradient(140deg, var(--ink), #114e83); box-shadow: var(--shadow); }
.inline-cta small { display: block; margin-bottom: 6px; color: #9fd5ff; font-weight: 850; letter-spacing: .08em; }
.inline-cta h2 { margin: 0 0 9px; padding: 0; border: 0; color: #fff; font-size: 25px; }
.inline-cta p { margin-bottom: 20px; color: rgba(255,255,255,.8); }
.inline-cta .button { color: var(--ink); background: #fff; box-shadow: none; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.faq-list summary { cursor: pointer; color: var(--ink); font-weight: 850; }
.faq-list p { margin: 13px 0 0; font-size: 16px; line-height: 1.9; }
.references { font-size: 13px; }
.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 18px; margin-top: 54px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.author-mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: var(--ink); font-weight: 900; }
.author-box h2 { margin: 0 0 5px; padding: 0; border: 0; font-size: 18px; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: 13px; }

.related-section { margin-top: 78px; padding-top: 48px; border-top: 1px solid var(--line); }
.related-section h2 { margin: 0 0 24px; font-size: 28px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.related-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.related-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.related-card div { padding: 16px; }
.related-card h3 { margin: 8px 0 0; font-size: 15px; line-height: 1.55; }

.about-content { max-width: 840px; }
.about-content section { margin-top: 45px; }
.about-content h2 { margin: 0 0 14px; font-size: 27px; }
.about-content p, .about-content li { color: var(--ink-soft); }

.mag-footer { padding: 58px 0 32px; color: rgba(255,255,255,.78); background: #071a2f; }
.mag-footer-grid { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 44px; align-items: start; }
.mag-footer .mag-brand em { color: #9fd5ff; border-color: rgba(255,255,255,.25); }
.mag-footer .mag-brand img { filter: brightness(0) invert(1); }
.mag-footer p { max-width: 520px; margin: 18px 0 0; font-size: 13px; }
.mag-footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 28px; font-size: 13px; font-weight: 700; }
.mag-footer a:hover { color: #fff; }
.copyright { margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; }

.mobile-sticky { display: none; }
.empty-state { grid-column: 1 / -1; padding: 36px; border-radius: 16px; text-align: center; color: var(--ink-soft); background: #f6fafc; }

@media (max-width: 980px) {
  .mag-nav a:not(.mag-cta) { display: none; }
  .featured-grid, .mag-layout, .article-layout { grid-template-columns: 1fr; }
  .featured-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .featured-side-card { grid-template-columns: 1fr; }
  .featured-side-card img { height: 170px; }
  .mag-sidebar { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mag-sidebar .side-cta { grid-column: 1 / -1; }
  .article-layout { max-width: 780px; }
  .article-main .mag-sidebar { display: none; }
}

@media (max-width: 680px) {
  :root { --wrap: min(100% - 28px, 1180px); --radius-lg: 20px; }
  body { padding-bottom: 70px; }
  .mag-header-inner { min-height: 62px; gap: 12px; }
  .mag-brand { gap: 8px; }
  .mag-brand img { width: 132px; }
  .mag-brand em { padding-left: 8px; font-size: 9px; }
  .mag-nav { margin-left: auto; }
  .mag-nav .mag-cta { min-height: 40px; padding-inline: 13px; font-size: 12px; }
  .mag-hero { padding: 45px 0 38px; }
  .mag-hero h1 { font-size: 42px; }
  .mag-hero h1 small { font-size: 15px; line-height: 1.6; }
  .mag-hero-copy > p:last-child { font-size: 15px; }
  .featured-grid { margin-top: 30px; }
  .featured-main, .featured-main img { min-height: 410px; }
  .featured-overlay { padding: 70px 22px 23px; }
  .featured-overlay h2 { font-size: 25px; }
  .featured-side { grid-template-columns: 1fr; }
  .featured-side-card { grid-template-columns: 38% 1fr; min-height: 168px; }
  .featured-side-card img { height: 100%; }
  .featured-side-card div { padding: 16px; }
  .featured-side-card h2 { font-size: 16px; }
  .service-banner { margin-top: 34px; }
  .service-banner-inner { grid-template-columns: 1fr; gap: 14px; padding: 24px; }
  .service-banner-mark { display: none; }
  .service-banner .button { width: 100%; }
  .mag-main { padding: 52px 0 72px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 8px; }
  .article-grid, .mag-sidebar { grid-template-columns: 1fr; }
  .mag-sidebar .side-cta { grid-column: auto; }
  .category-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .category-nav::-webkit-scrollbar { display: none; }
  .category-nav a { flex: 0 0 auto; }
  .article-hero { padding: 28px 0 38px; }
  .article-header h1 { font-size: 32px; line-height: 1.45; text-wrap: pretty; }
  .article-description { font-size: 16px; line-height: 1.9; }
  .article-cover { margin-top: 25px; }
  .article-main { padding: 38px 0 75px; }
  .article-body { font-size: 17px; line-height: 1.95; letter-spacing: 0; }
  .article-body > p:first-of-type { font-size: 17px; line-height: 1.95; }
  .article-body h2 { margin-top: 58px; padding-left: 12px; font-size: 24px; }
  .article-body h3 { margin-top: 36px; font-size: 20px; }
  .article-body p { margin-bottom: 25px; }
  .article-body table { display: table; table-layout: fixed; overflow: visible; white-space: normal; font-size: 14px; line-height: 1.65; }
  .article-body th, .article-body td { padding: 12px 10px; overflow-wrap: anywhere; }
  .article-body th:first-child, .article-body td:first-child { width: 34%; }
  .summary-box, .toc, .note-box, .inline-cta { padding: 21px; }
  .related-grid { grid-template-columns: 1fr; }
  .mag-footer-grid { grid-template-columns: 1fr; }
  .mag-footer-links { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mobile-sticky {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 8px;
    padding: 9px max(10px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
  }
  .mobile-sticky a { min-height: 48px; border-radius: 9px; font-size: 13px; font-weight: 850; }
  .mobile-sticky a:first-child { display: grid; place-items: center; color: var(--blue-dark); background: var(--sky); }
}

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