/* 左のサイドバー（パソコン）／ページ頭の折りたたみ（スマホ）。中身は sidebar.js が作る。全ページ共通 */
/* 文字の色をもう一段濃く（「薄くて小さく感じる」との声。全ページ共通でここが最後に効く） */
:root { --ink: #2c333d; --sub: #465060; }
/* 「全体的に薄い」との声で、青をもう一段濃く（ボタン・丸印・表の見出し・上の帯） */
:root { --accent: #3a7fc1; --accent-soft: #dbe9f6; --accent-dark: #23609a; }
.hero, .page-hero { background: linear-gradient(180deg, #b5d3ee 0%, #d7e8f7 65%, #f3f8fc 100%); }
.page-hero .kicker { border-color: #a9c9e6; }
h2 { border-bottom-color: #b9d4ea; }
.side-title { border-bottom-color: #b9d4ea; }
/* お問い合わせの2つの入口（学習ツール→STORES窓口／お仕事・その他→フォーム） */
.contact-routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 14px 0 4px; text-align: left; }
.contact-routes .route { background: #fbfcfd; border: 1px solid var(--line, #e6ebf0); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; }
.contact-routes .route h3 { margin: 0 0 6px; font-size: 18px; }
.contact-routes .route p { margin: 0 0 14px; font-size: 15.5px; color: var(--sub, #465060); flex: 1; }
.contact-routes .route .cta { align-self: center; font-size: 16px; padding: 10px 22px; }
@media (max-width: 700px) { .contact-routes { grid-template-columns: 1fr; } }

/* プロフィールの見出し「これまでの制作」が7文字になったので、項目名の幅をそろえる */
@media (min-width: 521px) { .profile dl { grid-template-columns: 8em 1fr; } }

/* 大きい画面で本文が真ん中に細く見えないよう、全体の幅を広げる（比嘉さんの希望）。上の帯・見出しの帯・足もとも同じ幅に */
.wrap { max-width: 1440px; }
.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
}
.side-mobile > summary::before { content: none; display: none; }
/* パソコンでは本文がサイドバーの分だけ右にあるので、見出しの帯・パンくず・足もとも本文の列にそろえる（左に寄って見えた） */
@media (min-width: 1001px) {
  .hero .wrap, .page-hero .wrap, footer .wrap, .crumbs { padding-left: calc(22px + 280px + 32px); }
}
/* 見出しの帯の説明文も、広い画面では横に広げる（640pxだと3行に折れて細く見えた） */
.page-hero p { max-width: 860px; }
/* 幅を広げたら、4枚のカードが3列＋1枚になった。2列×2段・6枚は3列×2段に固定する */
@media (min-width: 701px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1001px) { .grid:not(.two) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.layout main .wrap { max-width: none; padding-left: 0; padding-right: 0; }

/* サイドバーは本文と同じ高さまで伸ばし、その中で目次の箱だけが画面に付いてくる */
.sidebar { padding-top: 32px; padding-bottom: 60px; }
.side-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(40, 70, 110, 0.06);
  padding: 18px 16px 14px;
  margin: 0 0 16px;
}
.side-toc {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.side-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #3a4250);
  margin: 0 0 8px;
  padding: 0 0 8px 4px;
  border-bottom: 2px dotted #cfe0ee;
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-title::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent, #4a90c8); box-shadow: 0 0 0 4px var(--accent-soft, #eaf3fa); }
.side-title-gap { margin-top: 16px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { margin: 0; }
.side-list a {
  display: block;
  text-decoration: none;
  color: var(--sub, #56606d);
  font-size: 15px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 10px;
  border-left: 3px solid transparent;
}
.side-list a:hover { background: var(--accent-soft, #eaf3fa); color: var(--accent-dark, #2f6fa3); }
.side-list a.is-current { background: var(--accent-soft, #eaf3fa); color: var(--accent-dark, #2f6fa3); font-weight: 700; border-left-color: var(--accent, #4a90c8); }
.side-list a.is-here { color: var(--accent-dark, #2f6fa3); font-weight: 700; }
.side-sub { font-size: 13px; color: var(--sub, #56606d); margin: 8px 0 0 4px; }

/* スマホ用の折りたたみ（パソコンでは出さない） */
.side-mobile { display: none; }

@media (max-width: 1000px) {
  .layout { display: block; padding: 0; max-width: none; }
  .layout main .wrap { max-width: 960px; padding-left: 22px; padding-right: 22px; }
  .sidebar { display: none; }
  .side-mobile {
    display: block;
    margin: 18px 22px 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(40, 70, 110, 0.06);
  }
  .side-mobile > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-dark, #2f6fa3);
  }
  .side-mobile > summary::-webkit-details-marker { display: none; }
  .side-mobile > summary::after { content: "＋"; float: right; }
  .side-mobile[open] > summary::after { content: "－"; }
  .side-mobile-inner { padding: 4px 16px 14px; }
}
