/* ==========================================================================
   DioTrans マニュアル専用スタイル
   方針: マーケティングページとは分離し、読み物として静かで読みやすい
   ドキュメントスタイルにする。装飾より余白・行間・情報の階層を優先する。
   ========================================================================== */

:root {
  --m-ink: #1b2734;
  --m-text: #333f4d;
  --m-muted: #66707f;
  --m-faint: #9aa4b1;
  --m-line: #e3e8ee;
  --m-line-strong: #cdd5de;
  --m-bg: #ffffff;
  --m-bg-side: #f7f9fb;
  --m-bg-soft: #f2f5f8;
  --m-brand: #1e3a5f;
  --m-link: #175c9e;
  --m-link-hover: #0d3f70;
  --m-info-bg: #eef5fc;
  --m-info-line: #2f6fb5;
  --m-warn-bg: #fdf6e7;
  --m-warn-line: #d99000;
  --m-danger-bg: #fdeeee;
  --m-danger-line: #c43d3d;
  --m-ok-bg: #eaf7f0;
  --m-ok-line: #1f9d63;
  --m-radius: 8px;
  --m-topbar-h: 56px;
  --m-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, -apple-system, sans-serif;
  --m-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-font);
  font-size: 15px;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--m-link);
  text-decoration: none;
}

a:hover {
  color: var(--m-link-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--m-brand);
  color: #fff;
  border-radius: 0 0 6px 6px;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* --------------------------------------------------------------------------
   トップバー
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--m-topbar-h);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--m-line);
  backdrop-filter: blur(6px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 0 20px;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--m-brand);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.topbar__brand:hover {
  text-decoration: none;
  color: var(--m-brand);
}

.topbar__brand img {
  width: 26px;
  height: 26px;
  display: block;
}

.topbar__badge {
  padding: 2px 8px;
  border: 1px solid var(--m-line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--m-muted);
  letter-spacing: 0.04em;
}

.topbar__spacer {
  flex: 1;
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

.topbar__links a {
  color: var(--m-muted);
}

.topbar__links a:hover {
  color: var(--m-link);
}

.topbar__login {
  padding: 6px 14px;
  border: 1px solid var(--m-line-strong);
  border-radius: 6px;
  color: var(--m-text) !important;
  font-weight: 600;
}

.topbar__login:hover {
  border-color: var(--m-link);
  text-decoration: none;
}

/* モバイル目次トグル（チェックボックスでJSなしに開閉する） */
#toc-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toc-button {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--m-line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--m-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.toc-button svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   レイアウト
   -------------------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  align-items: start;
}

.sidenav {
  position: sticky;
  top: var(--m-topbar-h);
  max-height: calc(100vh - var(--m-topbar-h));
  overflow-y: auto;
  padding: 28px 18px 60px 24px;
  background: var(--m-bg-side);
  border-right: 1px solid var(--m-line);
}

.sidenav__label {
  margin: 22px 0 6px;
  padding-left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--m-faint);
}

.sidenav__label:first-child {
  margin-top: 0;
}

.sidenav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidenav__list a,
.sidenav__list .soon {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--m-text);
}

.sidenav__list a:hover {
  background: #edf1f5;
  text-decoration: none;
}

.sidenav__list a.is-active {
  border-left-color: var(--m-link);
  background: #fff;
  color: var(--m-brand);
  font-weight: 700;
}

.sidenav__list .soon {
  color: var(--m-faint);
}

.sidenav__list .soon::after {
  content: "準備中";
  flex: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--m-faint);
  border: 1px solid var(--m-line-strong);
  border-radius: 999px;
  padding: 0 7px;
  line-height: 1.7;
}

.content {
  min-width: 0;
  padding: 40px 48px 80px;
}

.article {
  max-width: 840px;
}

/* --------------------------------------------------------------------------
   パンくず・見出し・本文
   -------------------------------------------------------------------------- */

.crumbs {
  margin: 0 0 20px;
  font-size: 12.5px;
  color: var(--m-muted);
}

.crumbs a {
  color: var(--m-muted);
}

.crumbs a:hover {
  color: var(--m-link);
}

.crumbs span + span::before {
  content: "/";
  margin: 0 8px;
  color: var(--m-line-strong);
}

.article h1 {
  margin: 0 0 12px;
  font-size: 27px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--m-brand);
}

.article .lead {
  margin: 0 0 32px;
  font-size: 14.5px;
  color: var(--m-muted);
}

.article h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 52px 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--m-line);
  font-size: 19px;
  line-height: 1.5;
  color: var(--m-brand);
}

.article h2 .num {
  flex: none;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  background: var(--m-brand);
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.article h3 {
  margin: 30px 0 8px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--m-ink);
}

.article p {
  margin: 0 0 14px;
}

.article ul,
.article ol {
  margin: 0 0 16px;
  padding-left: 1.5em;
}

.article li {
  margin-bottom: 6px;
}

.article li > ul,
.article li > ol {
  margin-top: 6px;
  margin-bottom: 0;
}

.article strong {
  color: var(--m-ink);
}

.article hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--m-line);
}

.article :not(pre) > code,
.article .kbd {
  padding: 2px 6px;
  background: var(--m-bg-soft);
  border: 1px solid var(--m-line);
  border-radius: 4px;
  font-family: var(--m-mono);
  font-size: 0.86em;
  color: var(--m-ink);
}

/* --------------------------------------------------------------------------
   手順リスト
   -------------------------------------------------------------------------- */

.steps {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  position: relative;
  padding: 0 0 24px 44px;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--m-brand);
  border-radius: 50%;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
}

.steps > li::after {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 34px;
  bottom: 4px;
  width: 1px;
  background: var(--m-line-strong);
}

.steps > li:last-child {
  padding-bottom: 4px;
}

.steps > li:last-child::after {
  display: none;
}

.steps h3 {
  margin: 3px 0 6px;
  font-size: 15px;
}

.steps p {
  margin-bottom: 10px;
}

.steps .figure {
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   スクリーンショット
   -------------------------------------------------------------------------- */

.figure {
  margin: 18px 0 24px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 39, 52, 0.05);
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--m-line);
}

.figure figcaption {
  padding: 8px 14px;
  background: #fbfcfd;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--m-muted);
}

.figure--narrow {
  max-width: 620px;
}

.figure--medium {
  max-width: 760px;
}

.figure__badge {
  display: inline-block;
  margin-right: 6px;
  padding: 0 7px;
  border: 1px solid var(--m-line-strong);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--m-muted);
  vertical-align: 1px;
}

/* --------------------------------------------------------------------------
   注記（コールアウト）
   -------------------------------------------------------------------------- */

.callout {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  padding: 13px 16px;
  border-left: 4px solid var(--m-info-line);
  border-radius: 6px;
  background: var(--m-info-bg);
  font-size: 14px;
  line-height: 1.85;
}

.callout__icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.callout__body {
  min-width: 0;
}

.callout__title {
  display: block;
  margin-bottom: 2px;
  font-weight: 700;
  color: var(--m-ink);
}

.callout p {
  margin: 0 0 6px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout--warn {
  border-left-color: var(--m-warn-line);
  background: var(--m-warn-bg);
}

.callout--danger {
  border-left-color: var(--m-danger-line);
  background: var(--m-danger-bg);
}

.callout--ok {
  border-left-color: var(--m-ok-line);
  background: var(--m-ok-bg);
}

/* --------------------------------------------------------------------------
   表
   -------------------------------------------------------------------------- */

.table {
  width: 100%;
  margin: 16px 0 24px;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.75;
}

.table th,
.table td {
  padding: 10px 12px;
  border: 1px solid var(--m-line);
  text-align: left;
  vertical-align: top;
}

.table thead th {
  background: var(--m-bg-soft);
  color: var(--m-brand);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.table tbody th {
  background: #fbfcfd;
  font-weight: 600;
  color: var(--m-ink);
  white-space: nowrap;
}

.table--fixed {
  table-layout: fixed;
}

/* --------------------------------------------------------------------------
   カード・チップ
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 18px 0 26px;
}

.card {
  padding: 16px 18px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  background: #fff;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
}

.card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--m-muted);
}

.card__index {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--m-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--m-link);
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.8;
  vertical-align: 1px;
  white-space: nowrap;
}

.badge--ok {
  background: #e3f5ec;
  color: #0d6b41;
}

.badge--wait {
  background: #fdf0dc;
  color: #9a5b00;
}

.badge--off {
  background: var(--m-bg-soft);
  color: var(--m-muted);
}

.badge--soon {
  border: 1px solid var(--m-line-strong);
  color: var(--m-faint);
}

/* チェックリスト */
.checklist {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--m-ok-line);
  border-bottom: 2px solid var(--m-ok-line);
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   前後のページ
   -------------------------------------------------------------------------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--m-line);
}

.pager a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  color: var(--m-text);
}

.pager a:hover {
  border-color: var(--m-link);
  text-decoration: none;
}

.pager__label {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  color: var(--m-muted);
}

.pager__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--m-link);
}

.pager .pager__next {
  text-align: right;
}

.pager__empty {
  visibility: hidden;
}

/* --------------------------------------------------------------------------
   一覧ページ（マニュアルトップ）
   -------------------------------------------------------------------------- */

.toc-group {
  margin: 0 0 34px;
}

.toc-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--m-brand);
}

.toc-group__title .num {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: var(--m-brand);
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.toc-group__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--m-line);
}

.toc-group__list li {
  border-bottom: 1px solid var(--m-line);
}

.toc-group__list a,
.toc-group__list .soon {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 6px;
  color: var(--m-text);
}

.toc-group__list a:hover {
  background: var(--m-bg-side);
  text-decoration: none;
}

.toc-group__list .toc-title {
  flex: none;
  width: 220px;
  font-weight: 600;
  color: var(--m-link);
}

.toc-group__list .soon .toc-title {
  color: var(--m-faint);
}

.toc-group__list .toc-desc {
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--m-muted);
}

.toc-group__list .soon .toc-desc {
  color: var(--m-faint);
}

/* --------------------------------------------------------------------------
   フッター
   -------------------------------------------------------------------------- */

.manual-footer {
  padding: 28px 24px 40px;
  border-top: 1px solid var(--m-line);
  background: var(--m-bg-side);
  font-size: 12.5px;
  color: var(--m-muted);
}

.manual-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.manual-footer a {
  color: var(--m-muted);
}

.manual-footer__spacer {
  flex: 1;
}

/* --------------------------------------------------------------------------
   レスポンシブ
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .layout {
    display: block;
  }

  .toc-button {
    display: inline-flex;
  }

  .sidenav {
    display: none;
    position: static;
    max-height: none;
    padding: 20px 20px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--m-line);
  }

  #toc-toggle:checked ~ .layout .sidenav {
    display: block;
  }

  .content {
    padding: 28px 22px 64px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }

  .topbar__inner {
    padding: 0 14px;
    gap: 10px;
  }

  .topbar__links a:not(.topbar__login):not(.topbar__lang) {
    display: none;
  }

  .article h1 {
    font-size: 22px;
  }

  .article h2 {
    font-size: 17px;
    margin-top: 40px;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager .pager__next {
    text-align: left;
  }

  .toc-group__list a,
  .toc-group__list .soon {
    display: block;
    padding: 12px 4px;
  }

  .toc-group__list .toc-title {
    display: block;
    width: auto;
    margin-bottom: 2px;
  }
}

@media (max-width: 480px) {
  .topbar__badge {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   印刷
   -------------------------------------------------------------------------- */

@media print {
  .topbar,
  .sidenav,
  .pager,
  .manual-footer {
    display: none;
  }

  .content {
    padding: 0;
  }

  .figure {
    break-inside: avoid;
  }
}
