:root {
  --ink: #17202a;
  --navy: #25364b;
  --muted: #526071;
  --paper: #fbfcfd;
  --white: #fff;
  --line: #dce2e8;
  --gold: #a68043;
  --gold-pale: #f7f2e9;
  --green: #2f7858;
  --shadow: 0 20px 50px rgba(37, 54, 75, .10);
  --content: 1120px;
  --article: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: .02em;
}
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--navy); color: #fff; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(37,54,75,.12); background: rgba(251,252,253,.94); backdrop-filter: blur(12px); }
.header-inner, .footer-inner { width: min(calc(100% - 48px), var(--content)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.header-inner { min-height: 76px; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--navy); line-height: 1.05; font-weight: 800; letter-spacing: .01em; }
.brand img { display: block; width: auto; height: 36px; }
.brand small { margin-top: -5px; padding-left: 44px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .08em; }
.global-nav, .footer-inner nav { display: flex; align-items: center; gap: 32px; }
.global-nav a, .footer-inner nav a { color: var(--navy); font-size: 14px; font-weight: 700; text-decoration: none; }
.global-nav a:hover, .global-nav a:focus-visible, .footer-inner nav a:hover { color: var(--gold); }
.menu-button { display: none; border: 1px solid var(--line); border-radius: 4px; padding: .55rem .7rem; background: #fff; color: var(--navy); font: inherit; font-size: 13px; font-weight: 700; }

.article-hero { width: min(calc(100% - 48px), var(--content)); margin: 0 auto; padding: 54px 0 24px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { text-decoration: none; }
.article-heading { max-width: 1040px; padding: 58px 0 44px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 0 0 22px; color: var(--muted); font-size: 13px; font-weight: 650; }
.article-meta span:first-child { color: var(--gold); }
.article-meta > * + * { position: relative; }
.article-meta > * + *::before { position: absolute; left: -12px; color: #b8c0c9; content: "/"; }
h1 { margin: 0; color: var(--navy); font-size: clamp(2.35rem, 4.75vw, 4rem); line-height: 1.25; letter-spacing: -.035em; text-wrap: balance; }
h1 span + span::before { content: " "; }
.lead { max-width: 760px; margin: 26px 0 0; color: #39495c; font-size: clamp(1.06rem, 2vw, 1.3rem); line-height: 1.8; }
.hero-figure { margin: 0; }
.hero-figure img { width: 100%; aspect-ratio: 16 / 8.4; border-radius: 4px; object-fit: cover; box-shadow: var(--shadow); }
.hero-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: right; }

.article-body { width: min(calc(100% - 48px), var(--article)); margin: 0 auto; padding: 76px 0 112px; }
.article-body > p { margin: 0 0 1.6em; }
.article-body h2 { position: relative; margin: 92px 0 30px; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.5; letter-spacing: -.01em; }
.article-body h2::before { position: absolute; left: -24px; top: .25em; width: 3px; height: 1.2em; background: var(--gold); content: ""; }
.article-body ul { margin: 26px 0 32px; padding-left: 1.4em; }
.article-body li { margin: .45em 0; }
.article-body li::marker { color: var(--gold); }
.article-body blockquote { margin: 32px 0; padding: 22px 28px; border-left: 3px solid var(--gold); background: var(--gold-pale); color: var(--navy); font-weight: 700; }
.mobile-only { display: none; }

.three-examples { margin: 44px calc((760px - min(1040px, 92vw)) / 2); padding: 34px; border: 1px solid var(--line); background: #f8fafb; }
.target-work { display: flex; align-items: baseline; gap: 20px; margin: 0 0 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.target-work span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.target-work strong { color: var(--navy); }
.selection-lead { margin: 0 0 24px; color: var(--navy); font-weight: 700; }
.three-examples ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.three-examples li { min-height: 210px; margin: 0; padding: 24px; border: 1px solid #d6dde4; background: var(--white); box-shadow: 0 10px 24px rgba(37,54,75,.05); }
.three-examples li span { display: block; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.three-examples li strong { display: block; margin-top: 52px; color: var(--navy); font-size: 16px; }
.three-examples li small { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.example-anchor { margin: 24px 0 0; color: var(--muted); font-size: 14px; }

.caution { display: flex; gap: 20px; margin: 38px 0; padding: 28px; border: 1px solid #ceb581; background: #fffdfa; }
.caution-mark { flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-weight: 800; line-height: 28px; text-align: center; }
.caution h3 { margin: 0 0 8px; color: var(--navy); font-size: 16px; }
.caution p { margin: 0; color: #465366; font-size: 14px; line-height: 1.8; }

.diagnosis-cta { width: min(960px, 92vw); margin: 94px calc((760px - min(960px, 92vw)) / 2) 0; padding: 52px 56px; border: 1px solid #d6dde4; background: #fff; box-shadow: var(--shadow); }
.diagnosis-label { display: flex; align-items: center; gap: 9px; margin: 0 0 20px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.diagnosis-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.diagnosis-cta h2 { margin: 0 0 22px; font-size: clamp(1.65rem, 3.5vw, 2.35rem); }
.diagnosis-cta h2::before { display: none; }
.diagnosis-cta > p:not(.diagnosis-label) { margin: 0 0 28px; color: #465366; }
.primary-button { display: inline-flex; align-items: center; justify-content: space-between; min-width: 290px; gap: 28px; padding: 15px 20px; border: 1px solid var(--navy); border-radius: 4px; background: var(--navy); color: #fff; font-size: 15px; font-weight: 750; text-decoration: none; transition: background .2s, transform .2s; }
.primary-button:hover, .primary-button:focus-visible { background: #17283d; transform: translateY(-1px); }
.diagnosis-cta > small { display: block; margin-top: 12px; color: var(--muted); }
.references { margin-top: 92px; padding-top: 6px; border-top: 1px solid var(--line); }
.references h2 { margin-top: 44px; font-size: 1.25rem; }
.references li { font-size: 14px; }
.references p { color: var(--muted); font-size: 13px; }

.site-footer { padding: 48px 0 28px; border-top: 1px solid var(--line); background: #f7f9fa; }
.copyright { width: min(calc(100% - 48px), var(--content)); margin: 34px auto 0; color: var(--muted); font-size: 11px; text-align: center; }

/* Social preview */
.social-page { min-height: 100vh; background: #eef2f5; }
.social-shell { width: min(calc(100% - 40px), 1120px); margin: 0 auto; padding: 56px 0 96px; }
.social-intro { max-width: 760px; margin-bottom: 42px; }
.social-intro h1 { font-size: clamp(2rem, 5vw, 3.7rem); }
.social-intro p { color: var(--muted); }
.preview-tabs { display: flex; gap: 8px; margin-bottom: 28px; }
.preview-tabs button { padding: 10px 16px; border: 1px solid #cfd7df; border-radius: 99px; background: #fff; color: var(--navy); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.preview-tabs button[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.social-panel[hidden] { display: none; }
.x-post { max-width: 640px; margin: 0 auto; padding: 26px; border: 1px solid #d8dee5; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.x-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.x-avatar { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; }
.x-profile strong, .x-profile small { display: block; line-height: 1.35; }
.x-profile small { color: var(--muted); }
.x-copy { white-space: pre-line; line-height: 1.65; }
.x-card { overflow: hidden; margin-top: 20px; border: 1px solid #d8dee5; border-radius: 14px; }
.x-card img { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; }
.x-card div { padding: 16px 18px; }
.x-card small { color: var(--muted); }
.x-card strong { display: block; margin-top: 4px; color: var(--navy); line-height: 1.5; }
.ig-grid { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 18px; overflow-x: auto; padding: 0 0 18px; scroll-snap-type: x mandatory; }
.ig-slide { position: relative; overflow: hidden; width: 100%; min-width: 240px; aspect-ratio: 4 / 5; padding: 28px; border: 1px solid #d8dee5; background: var(--paper); box-shadow: 0 12px 34px rgba(37,54,75,.08); scroll-snap-align: start; }
.ig-slide.cover { display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.ig-slide.cover::before { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,30,45,.08), rgba(18,30,45,.88)); content: ""; }
.ig-slide.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ig-slide > * { position: relative; }
.slide-no { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.ig-slide h2 { margin: 32px 0 14px; color: var(--navy); font-size: 26px; line-height: 1.45; }
.ig-slide.cover h2 { margin-top: auto; color: #fff; font-size: 29px; }
.ig-slide p { color: #465366; font-size: 14px; line-height: 1.75; }
.ig-slide.cover p { color: #edf2f5; }
.ig-slide .big-number { margin: 34px 0 12px; color: var(--navy); font-size: 74px; font-weight: 800; line-height: 1; }
.ig-slide .mini-docs { display: flex; gap: 8px; margin-top: 34px; }
.ig-slide .mini-docs span { width: 30%; aspect-ratio: 3/4; border: 1px solid #cfd7df; background: #fff; box-shadow: 0 5px 12px rgba(37,54,75,.08); }
.social-note { margin-top: 30px; color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.85; }
  .header-inner, .footer-inner { width: min(calc(100% - 32px), var(--content)); }
  .header-inner { min-height: 66px; }
  .menu-button { display: block; }
  .global-nav { position: absolute; left: 16px; right: 16px; top: 66px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
  .global-nav.is-open { display: flex; }
  .global-nav a { padding: 12px; }
  .article-hero { width: min(calc(100% - 32px), var(--content)); padding-top: 30px; }
  .article-heading { padding: 38px 0 30px; }
  .article-meta { gap: 7px 18px; }
  h1 { font-size: 1.82rem; line-height: 1.48; letter-spacing: -.025em; text-wrap: initial; }
  h1 span { display: block; white-space: nowrap; }
  h1 span + span::before { content: none; }
  .lead { margin-top: 20px; }
  .hero-figure img { aspect-ratio: 4 / 3; object-position: 53% center; }
  .article-body { width: min(calc(100% - 40px), var(--article)); padding: 54px 0 82px; }
  .article-body h2 { margin-top: 70px; }
  .article-body h2::before { left: -14px; }
  .mobile-only { display: initial; }
  .three-examples { margin: 36px -8px; padding: 22px 16px; }
  .three-examples ol { grid-template-columns: 1fr; }
  .three-examples li { min-height: 150px; }
  .three-examples li strong { margin-top: 28px; }
  .caution { gap: 14px; padding: 22px 18px; }
  .diagnosis-cta { width: auto; margin: 72px -10px 0; padding: 34px 24px; }
  .diagnosis-cta h2 br { display: none; }
  .primary-button { width: 100%; min-width: 0; }
  .footer-inner { align-items: flex-start; gap: 28px; }
  .footer-inner nav { flex-direction: column; align-items: flex-start; gap: 10px; }
  .social-shell { width: min(calc(100% - 28px), 1120px); padding-top: 38px; }
}

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

/* Ticket analysis article */
.ticket-title span { display: block; }
.ticket-title span + span::before { content: none; }
.workflow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 36px 0; padding: 0; list-style: none; }
.workflow li { min-height: 156px; padding: 22px 18px; border: 1px solid var(--line); background: #fff; }
.workflow span, .finding-grid span { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.workflow strong, .workflow small { display: block; }
.workflow strong { margin-top: 22px; color: var(--navy); }
.workflow small { margin-top: 8px; color: var(--muted); line-height: 1.65; }
.table-scroll { overflow-x: auto; margin: 36px 0; border: 1px solid var(--line); background: #fff; }
.role-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.role-table th, .role-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.role-table th { background: #eef3f1; color: var(--navy); }
.role-table tr:last-child td { border-bottom: 0; }
.role-table td:nth-child(2) { width: 76px; color: var(--green); font-weight: 800; }
.code-sample { overflow-x: auto; margin: 34px 0; padding: 24px; border-left: 4px solid var(--green); background: #17202a; color: #edf2f5; font-size: 14px; line-height: 1.7; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 38px 0; padding: 26px 30px; background: #eef3f1; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric strong { color: var(--navy); font-size: clamp(1.5rem, 4vw, 2.3rem); }
.metric em { margin: 0 10px; color: var(--gold); font-style: normal; }
.finding-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 38px 0; }
.finding-grid section { padding: 26px; border: 1px solid var(--line); background: #fff; }
.finding-grid h3 { margin: 14px 0 10px; color: var(--navy); font-size: 19px; }
.finding-grid p { margin: 0; color: var(--muted); font-size: 15px; }
.lesson-list { display: grid; gap: 14px; margin: 36px 0; padding: 0; list-style: none; counter-reset: lesson; }
.lesson-list li { position: relative; padding: 24px 26px 22px 70px; border: 1px solid var(--line); background: #fff; counter-increment: lesson; }
.lesson-list li::before { position: absolute; left: 24px; top: 23px; color: var(--gold); font-weight: 800; content: "0" counter(lesson); }
.lesson-list strong { color: var(--navy); }
.lesson-list p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

@media (max-width: 760px) {
  .ticket-title span { white-space: normal; }
  .workflow { grid-template-columns: 1fr 1fr; }
  .finding-grid { grid-template-columns: 1fr; }
  .metric { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 440px) {
  .workflow { grid-template-columns: 1fr; }
}
