/* Storage Biz column components. All component classes use the site-specific sb- prefix. */
:root {
  --color-main: #374151;
  --color-sub: #f9fafb;
  --color-accent: #d97706;
  --color-text: #111827;
  --color-border: #d1d5db;
}

html { scroll-behavior: smooth; }
.sb-column-content h2,
.sb-column-content h3 { scroll-margin-top: 104px; }

/* Column index and filters. */
.sb-category-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 2rem; }
.sb-category-filter__link { display: inline-flex; min-height: 40px; align-items: center; gap: .45rem; padding: .45rem .8rem; border: 1px solid var(--color-border); background: #fff; color: var(--color-main); font-size: .82rem; font-weight: 700; text-decoration: none; }
.sb-category-filter__link span { display: grid; min-width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 999px; background: var(--color-sub); color: #6b7280; font-size: .68rem; }
.sb-category-filter__link:hover,
.sb-category-filter__link.is-current { border-color: var(--color-main); background: var(--color-main); color: #fff; }
.sb-category-filter__link.is-current span { background: rgba(255,255,255,.18); color: #fff; }
.sb-column-index .page-numbers { list-style: none; }
.sb-column-index ul.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 2rem 0 0; padding: 0; }

/* 1. Automatically generated table of contents. */
.sb-toc { margin: 2rem 0; border: 1px solid var(--color-border); background: var(--color-sub); }
.sb-toc__toggle { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; padding: .8rem 1rem; border: 0; background: var(--color-main); color: #fff; font-weight: 700; cursor: pointer; }
.sb-toc__icon { display: grid; width: 1.5rem; height: 1.5rem; place-items: center; font-size: 1.2rem; }
.sb-toc__body { padding: 1rem 1.25rem; }
.sb-toc__body[hidden] { display: none; }
.sb-toc__list { margin: 0; padding: 0; list-style: none; }
.sb-toc__item { margin: .35rem 0; }
.sb-toc__item--h2 { font-weight: 700; }
.sb-toc__item--h3 { margin-left: 1rem; color: #4b5563; font-size: .9rem; }
.sb-toc__item a { color: inherit; text-decoration: none; }
.sb-toc__item a:hover { color: var(--color-accent); text-decoration: underline; }

/* 2. Point box. */
.sb-point { margin: 2rem 0; border-left: 6px solid var(--color-main); background: var(--color-sub); }
.sb-point__label { padding: .65rem 1rem .15rem; color: var(--color-main); font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.sb-point__body { padding: .55rem 1rem 1rem; }
.sb-point__body > *:last-child { margin-bottom: 0; }

/* 3. Caution box. */
.sb-caution { margin: 2rem 0; border-left: 6px solid #f59e0b; background: #fef3c7; }
.sb-caution__label { padding: .7rem 1rem .2rem; color: #92400e; font-weight: 800; }
.sb-caution__body { padding: .5rem 1rem 1rem; color: #78350f; }
.sb-caution__body > *:last-child { margin-bottom: 0; }

/* 4. Checklist. */
.sb-checklist { margin: 2rem 0; padding: 1.25rem; border: 1px solid #fde68a; background: #fffbeb; }
.sb-checklist__title { margin-bottom: .8rem; color: var(--color-main); font-weight: 800; }
.sb-checklist ul { margin: 0; padding: 0; list-style: none; }
.sb-checklist li { position: relative; margin: .5rem 0; padding-left: 1.8rem; }
.sb-checklist li::before { position: absolute; top: .32em; left: 0; display: grid; width: 1.2rem; height: 1.2rem; place-items: center; border-radius: 50%; background: var(--color-accent); color: #fff; content: "✓"; font-size: .76rem; font-weight: 800; line-height: 1; }

/* 5. Comparison table. */
.sb-table-wrap { width: 100%; margin: 2rem 0; overflow-x: auto; border: 1px solid var(--color-border); -webkit-overflow-scrolling: touch; }
.entry-content .sb-table,
.sb-table { width: 100%; min-width: 640px; margin: 0; border-collapse: collapse; background: #fff; }
.entry-content .sb-table th,
.entry-content .sb-table td,
.sb-table th,
.sb-table td { padding: .8rem; border: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.entry-content .sb-table thead th,
.sb-table thead th { background: var(--color-main); color: #fff; }
.entry-content .sb-table tbody th,
.sb-table tbody th { background: var(--color-sub); color: var(--color-text); }

/* 6. FAQ. */
.sb-faq { margin: 2.5rem 0; padding: 1rem; background: var(--color-sub); }
.sb-faq__item { overflow: hidden; border: 1px solid var(--color-border); background: #fff; }
.sb-faq__item + .sb-faq__item { margin-top: .75rem; }
.sb-faq__q,
.sb-faq__a { position: relative; padding: 1rem 1rem 1rem 3.2rem; }
.sb-faq__q { border-bottom: 1px solid #e5e7eb; font-weight: 800; }
.sb-faq__q::before,
.sb-faq__a::before { position: absolute; top: .85rem; left: 1rem; display: grid; width: 1.65rem; height: 1.65rem; place-items: center; border-radius: 50%; background: var(--color-main); color: #fff; content: "Q"; font-size: .78rem; font-weight: 800; }
.sb-faq__a::before { background: var(--color-accent); content: "A"; }
.sb-faq--legacy > h2 { margin-top: 0; }

/* 7. Related posts. */
.sb-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.sb-related .post-card__excerpt { display: none; }
.sb-related .post-card__body { padding: .85rem; }
.sb-related .post-card__title { font-size: .93rem; }

/* 8. Speech balloons. */
.sb-balloon { display: flex; align-items: flex-start; gap: 1rem; margin: 2rem 0; }
.sb-balloon--right { flex-direction: row-reverse; }
.sb-balloon__icon { display: grid; width: 72px; height: 72px; flex: 0 0 72px; overflow: hidden; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--color-main); box-shadow: 0 0 0 1px var(--color-border); color: #fff; font-weight: 800; }
.sb-balloon__icon img { width: 100%; height: 100%; object-fit: cover; }
.sb-balloon__body { position: relative; min-width: 0; flex: 1; padding: 1rem; border: 1px solid var(--color-border); background: var(--color-sub); }
.sb-balloon__body::before { position: absolute; top: 1.35rem; left: -10px; width: 18px; height: 18px; border-bottom: 1px solid var(--color-border); border-left: 1px solid var(--color-border); background: var(--color-sub); content: ""; transform: rotate(45deg); }
.sb-balloon--right .sb-balloon__body::before { right: -10px; left: auto; border: 0; border-top: 1px solid var(--color-border); border-right: 1px solid var(--color-border); }
.sb-balloon__name { margin-bottom: .3rem; color: var(--color-main); font-size: .76rem; font-weight: 800; }
.sb-balloon__text > *:last-child { margin-bottom: 0; }

/* 9. Author and supervisor information. */
.sb-credits { display: grid; gap: 1rem; margin-top: 3rem; }
.sb-credit-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 1rem; padding: 1.25rem; border: 1px solid var(--color-border); background: var(--color-sub); }
.sb-credit-card__photo { display: grid; width: 72px; height: 72px; overflow: hidden; place-items: center; border-radius: 50%; background: var(--color-main); color: #fff; font-size: 1.5rem; font-weight: 800; }
.sb-credit-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.sb-credit-card__role { margin: 0; color: var(--color-accent); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.sb-credit-card__name { margin: .1rem 0; color: var(--color-text); font-size: 1.15rem; line-height: 1.4; }
.entry-content .sb-credit-card__name::before,
.sb-credit-card__name::before { display: none; }
.sb-credit-card__title { margin: 0 0 .55rem; color: #4b5563; font-size: .8rem; }
.sb-credit-card__profile { margin: 0; font-size: .86rem; line-height: 1.7; }
.sb-credit-card__qualifications { display: flex; flex-wrap: wrap; gap: .35rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.sb-credit-card__qualifications li { margin: 0; padding: .25rem .5rem; border: 1px solid var(--color-border); background: #fff; font-size: .72rem; }
.sb-credit-card__links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; font-size: .78rem; font-weight: 700; }

/* 10. CTA. */
.sb-cta { margin: 3rem 0 0; padding: 1.5rem; background: var(--color-main); color: #fff; text-align: center; }
.sb-cta__title { margin-bottom: .35rem; font-size: clamp(1.2rem, 4vw, 1.55rem); font-weight: 800; }
.sb-cta__text { margin-bottom: 1rem; color: #e5e7eb; font-size: .9rem; }
.sb-cta__button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .7rem 1.25rem; background: var(--color-accent); color: #fff; font-weight: 800; text-decoration: none; }
.sb-cta__button:hover { background: #b45309; color: #fff; }

/* Standalone design-check page. */
.sb-column-demo { margin: 0; background: #eef1f5; color: var(--color-text); font-family: "Noto Sans JP", "Yu Gothic", sans-serif; line-height: 1.8; }
.sb-column-demo *,
.sb-column-demo *::before,
.sb-column-demo *::after { box-sizing: border-box; }
.sb-column-demo img { display: block; max-width: 100%; }
.sb-demo-header { padding: 1rem; background: #1f2937; color: #fff; }
.sb-demo-header__inner { width: min(100% - 2rem, 1080px); margin: auto; font-size: .82rem; font-weight: 800; letter-spacing: .12em; }
.sb-column-shell { width: min(100% - 2rem, 820px); margin: 2rem auto; padding: clamp(1.25rem, 4vw, 3rem); background: #fff; box-shadow: 0 10px 34px rgba(17,24,39,.08); }
.sb-demo-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1rem; color: #6b7280; font-size: .78rem; }
.sb-demo-category { color: var(--color-accent); font-weight: 800; }
.sb-demo-title { margin: 0 0 1rem; font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.4; }
.sb-demo-lead { margin-bottom: 2rem; color: #4b5563; }
.sb-column-demo h2 { margin-top: 3rem; padding-left: .8rem; border-left: 6px solid var(--color-main); color: #1f2937; font-size: 1.6rem; line-height: 1.45; }
.sb-column-demo h3 { margin-top: 2rem; padding-bottom: .45rem; border-bottom: 2px solid var(--color-border); font-size: 1.2rem; }
.sb-demo-related-grid { display: grid; gap: 1rem; }
.sb-demo-related-card { overflow: hidden; border: 1px solid var(--color-border); background: #fff; }
.sb-demo-related-card__image { display: grid; aspect-ratio: 1200 / 630; place-items: center; background: linear-gradient(135deg, #4b5563, #1f2937); color: rgba(255,255,255,.7); font-size: .72rem; letter-spacing: .12em; }
.sb-demo-related-card__body { padding: .8rem; }
.sb-demo-related-card__body strong { display: block; line-height: 1.5; }
.sb-demo-related-card__body time { color: #6b7280; font-size: .72rem; }

@media (min-width: 640px) {
  .sb-credits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sb-demo-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .sb-balloon__icon { width: 56px; height: 56px; flex-basis: 56px; }
  .sb-credit-card { grid-template-columns: 56px minmax(0, 1fr); padding: 1rem; }
  .sb-credit-card__photo { width: 56px; height: 56px; }
  .sb-faq { padding: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .sb-toc__toggle,
  .sb-cta { display: none !important; }
  .sb-toc__body[hidden] { display: block; }
}
