/* =====================================================
   橋爪商事 — topic-modern.css
   topicnews/topic/*.html 専用スタンドアロン CSS
   Astro+Tailwind ビルドと同一デザイントークン
   ===================================================== */

/* --- Design Tokens --- */
:root {
  --bedrock: #0D1F35;
  --teal:    #0DAE87;
  --blue:    #0078C0;
  --surface: #F7F5F2;
  --body:    #1A2840;
  --muted:   #6B7C90;
  --border:  #D8E0EA;
  --font-sans:  'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
}

/* --- Base Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--body);
  line-height: 1.75;
  margin: 0;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); transition: color 0.2s; }
a:hover { color: var(--teal); }
table { border-collapse: collapse; }

/* --- Header --- */
.site-header {
  background: var(--bedrock);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  background: white;
  border-radius: 6px;
  padding: 3px;
  display: block;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; gap: 3px; }
.logo-ja {
  font-family: var(--font-serif);
  font-weight: 900;
  color: white;
  font-size: 18px;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: color 0.2s;
}
.site-logo:hover .logo-ja { color: var(--teal); }
.logo-en {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1;
  font-weight: 400;
}

/* Desktop Nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 500;
  border-radius: 4px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--teal); }

/* Hamburger */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: white;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hidden { display: none !important; }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bedrock);
  z-index: 40;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
}
.mobile-nav li { border-top: 1px solid rgba(255,255,255,0.1); }
.mobile-nav li:first-child { border-top: none; }
.mobile-nav a {
  display: block;
  padding: 1.25rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--teal); }

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* --- Breadcrumb --- */
.breadcrumb-nav {
  background: white;
  border-bottom: 1px solid var(--border);
}
.breadcrumb-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.breadcrumb-list li { display: flex; align-items: center; gap: 0.25rem; }
.breadcrumb-sep { color: var(--border); font-size: 0.75rem; }
.breadcrumb-list a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb-list a:hover { color: var(--teal); }
.breadcrumb-current { color: var(--body); font-weight: 500; }

/* --- Page Layout --- */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.page-title-block {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--teal);
}
.page-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--body);
  letter-spacing: 0.05em;
  margin: 0;
  line-height: 1.4;
}
.content-columns {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- Sidebar --- */
.sidebar { width: 100%; }
.sidebar-inner {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.sidebar-title {
  background: var(--bedrock);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  letter-spacing: 0.05em;
}
.sidebar-list {
  background: white;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-list li { border-top: 1px solid var(--border); }
.sidebar-list li:first-child { border-top: none; }
.sidebar-list a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--body);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-list a:hover { background: var(--surface); color: var(--teal); }

/* --- Main Content --- */
.main-content { flex: 1; min-width: 0; overflow: hidden; }
.content-body {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--body);
  overflow-x: auto;
}
/* 旧コンテンツの固定幅指定を無効化 */
.content-body img {
  max-width: 100% !important;
  height: auto !important;
  display: inline;
}
.content-body table {
  max-width: 100% !important;
  width: auto !important;
  table-layout: auto;
}
/* 画像を含む table は折り返し許容 */
.content-body table td { max-width: min(700px, 100%); }
.content-body a { color: var(--blue); }
.content-body a:hover { color: var(--teal); }
.content-body td, .content-body th { padding: 0.4rem 0.5rem; vertical-align: top; }
.content-body p { margin: 0.5rem 0; }
.content-body br { line-height: 1.4; }
/* Suppress old CSS-dependent elements */
.content-body .indentS { padding-left: 1.5rem; }
.content-body div[align="center"] { text-align: center; }
.content-body div[align="right"] { text-align: right; }

/* --- Footer --- */
.site-footer {
  background: var(--bedrock);
  color: rgba(255,255,255,0.6);
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.footer-logo-img {
  height: 36px;
  width: auto;
  background: white;
  border-radius: 5px;
  padding: 3px;
  display: block;
}
.footer-logo-text { display: flex; flex-direction: column; gap: 2px; }
.footer-logo-ja {
  font-family: var(--font-serif);
  font-weight: 900;
  color: white;
  font-size: 1rem;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: color 0.2s;
}
.footer-logo:hover .footer-logo-ja { color: var(--teal); }
.footer-logo-en {
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1;
}
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.footer-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
}
.footer-copy {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

@media (min-width: 768px) {
  .page-title { font-size: 1.875rem; }
  .page-wrap { padding: 3rem 1.25rem 4rem; }
  .content-columns { flex-direction: row; }
  .sidebar { width: 180px; flex-shrink: 0; align-self: flex-start; }
  .footer-top { flex-direction: row; align-items: center; justify-content: space-between; }
}
