:root {
  --color-bg: #f2f3f5;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #565c63;
  --color-primary: #0b3a82;
  --color-primary-dark: #06254f;
  --color-accent: #e6001d;
  --color-link: #0057b8;
  --color-border: #d9dce0;
  --radius: 2px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 14px;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.site-header .logo-mark {
  height: 34px;
  width: auto;
  display: block;
}
.site-header .logo:hover { text-decoration: none; }
.site-header nav {
  display: flex;
  height: 100%;
}
.site-header nav a {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: 4px;
  padding: 0 14px;
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 700;
  border-bottom: 3px solid transparent;
}
.site-header nav a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
  background: #fafafa;
}

/* Hero */
.hero {
  background-color: var(--color-primary);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 40px 0;
  margin-bottom: 28px;
  border-bottom: 4px solid var(--color-accent);
  text-align: center;
}
.hero h1 {
  font-size: 1.5rem;
  margin: 0 0 8px;
}
.hero p {
  margin: 0 auto;
  color: #dbe6f5;
  max-width: 640px;
  font-size: 0.88rem;
}

/* Section */
section.block {
  margin: 0 0 28px;
}
section.block h2,
.section-heading {
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 14px;
  margin: 0 0 16px;
  border-top: 3px solid var(--color-accent);
}

/* About-site section */
.about-site-body {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 20px;
}
.about-site-body h3 {
  font-size: 0.95rem;
  margin: 20px 0 8px;
}
.about-site-body h3:first-of-type { margin-top: 0; }
.about-site-body p { margin: 0 0 8px; }
.about-site-body code {
  background: var(--color-bg);
  padding: 1px 5px;
  font-size: 0.85em;
}

/* Find-company nav */
.find-company-lead {
  color: var(--color-text-muted);
  margin: 0 0 14px;
  font-size: 0.9rem;
}
.find-company-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.find-company-list a {
  display: block;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  font-weight: 700;
  color: var(--color-text);
}
.find-company-list a:hover {
  background: #eef4fc;
  text-decoration: none;
  color: var(--color-link);
}

/* News layout with Amazon rails on both sides.
   news-layout-bleed breaks out of the .wrap max-width so the rails are
   added *outside* the normal content width, instead of shrinking it. */
.news-layout-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 20px;
}
.news-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, var(--max-width)) 220px;
  grid-template-areas: "left main right";
  gap: 24px;
  justify-content: center;
  align-items: start;
  margin-bottom: 28px;
}
.news-layout .news-main { grid-area: main; min-width: 0; }
.news-layout .news-rail:first-child { grid-area: left; }
.news-layout .news-rail:last-child { grid-area: right; }
.news-rail {
  position: sticky;
  top: 68px;
}
.news-rail .amazon-box { margin-bottom: 16px; }
.news-rail .aiseo-box { margin-bottom: 16px; }
.news-rail .aiseo-banner-row { flex-wrap: wrap; gap: 6px; }
.news-rail .aiseo-banner-cta { width: 100%; justify-content: center; margin-top: 2px; }

@media (max-width: 900px) {
  .news-layout-bleed {
    width: auto;
    margin-left: 0;
    padding: 0;
  }
  .news-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "left" "right";
  }
  .news-rail { position: static; }
}

/* News widget */
.news-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-top: none;
}
.news-list li {
  list-style: none;
  background: var(--color-surface);
}
.news-list a {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  color: var(--color-text);
  align-items: center;
}
.news-list a:hover { background: #eef4fc; text-decoration: none; }
.news-list a:hover .news-title { text-decoration: underline; color: var(--color-link); }
.news-favicon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 2px;
}
.news-date {
  flex: 0 0 auto;
  font-size: 0.76rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.news-title {
  flex: 1 1 auto;
  font-size: 0.86rem;
}
.news-empty {
  padding: 14px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
}
.news-source {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--color-text-muted);
}

/* Industry news boxes */
.industry-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.industry-news-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.industry-news-box .industry-news-list.news-list,
.industry-news-box .news-empty {
  flex: 1;
  min-height: 0;
}
.industry-news-box h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0;
  padding: 6px 10px;
  background: var(--color-primary-dark);
  color: #fff;
  border-left: 4px solid var(--color-accent);
}
.industry-news-list.news-list {
  grid-template-columns: 1fr;
  border-top: none;
}
.column-link {
  margin: 0;
  padding: 6px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  font-size: 0.78rem;
}
.column-link a { font-weight: 700; }

/* Company cards */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.company-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.company-card .card-thumb {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.company-card .tag,
.company-card h3,
.company-card .area,
.company-card p.summary,
.company-card .more {
  margin-left: 20px;
  margin-right: 20px;
}
.company-card .more { margin-bottom: 20px; }
.company-card .tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-accent);
  padding: 2px 8px;
  width: fit-content;
}
.company-card h3 {
  margin-top: 4px;
  font-size: 1.05rem;
}
.company-card .area {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.company-card p.summary {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex: 1;
}
.company-card .more {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Company detail page */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 20px 0;
}
.company-detail .detail-hero {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-top: 3px solid var(--color-primary);
  margin-bottom: 16px;
}
.company-detail h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.company-detail .area {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.company-body {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}
.company-body p { margin: 0 0 16px; }
.company-body h2 {
  font-size: 1.1rem;
  margin: 28px 0 12px;
  padding-top: 4px;
  border-top: 1px solid var(--color-border);
}
.company-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.company-body ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
}
.company-body li { margin-bottom: 6px; }
.company-body p:last-child,
.company-body ul:last-child { margin-bottom: 0; }
.company-cta {
  margin: 28px 0 60px;
}
.btn-outbound {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 700;
}
.btn-outbound:hover {
  background: #b50017;
  text-decoration: none;
}

/* Amazon associate product box */
.amazon-box {
  margin: 0 0 40px;
  border: 1px solid var(--color-border);
}
.amazon-box h2 {
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 14px;
  margin: 0;
  border-top: 3px solid #ff9900;
}
.amazon-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #232f3e 0%, #131a22 100%);
  text-decoration: none;
}
.amazon-banner:hover { background: linear-gradient(135deg, #2e3d50 0%, #1c2530 100%); text-decoration: none; }
.amazon-banner-word {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.amazon-banner-dot { color: #ff9900; }
.amazon-banner-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff9900;
  white-space: nowrap;
}
.amazon-list { margin: 0; padding: 0; }
.amazon-list li { list-style: none; border-bottom: 1px solid var(--color-border); }
.amazon-list li:last-child { border-bottom: none; }
.amazon-list a {
  display: block;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--color-text);
}
.amazon-list a:hover { background: #fff8ee; color: var(--color-link); text-decoration: underline; }
.amazon-box .news-source { padding: 8px 14px 10px; margin: 0; }

/* AI無料ツールBOX (aiseo.blue) 紹介バナー */
.aiseo-box {
  margin: 0 0 24px;
  border: 1px solid var(--color-border);
  background: #fff;
}
.aiseo-box h2 {
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 14px;
  margin: 0;
  border-top: 3px solid #00b894;
}
.aiseo-banner {
  display: block;
  padding: 18px 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s ease;
}
.aiseo-banner:hover { background: #f7f9fc; text-decoration: none; }
.aiseo-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.aiseo-banner-brand { display: flex; align-items: center; gap: 8px; }
.aiseo-banner-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
  background: linear-gradient(135deg, #2f6bff, #00b894);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
}
.aiseo-banner-name { font-weight: 700; font-size: 0.98rem; color: var(--color-text); }
.aiseo-banner-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1f4fd6;
  background: #eaf0ff;
  border-radius: 999px;
  padding: 3px 9px;
  flex: none;
  white-space: nowrap;
}
.aiseo-banner p {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.8;
}
.aiseo-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #2f6bff, #1f4fd6);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 999px;
}
.aiseo-banner-cta svg { width: 13px; height: 13px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  margin-top: 60px;
}
.site-footer p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .hero { padding: 40px 0; }
  .site-header nav a { margin-left: 14px; font-size: 0.85rem; }
  .news-list { grid-template-columns: 1fr; }
  .aiseo-banner-row { flex-wrap: wrap; }
}
