/*
Theme Name: AI CATALOG Theme
Theme URI: https://j-aix.or.jp/catalog/
Author: EFU LLC / AI CATALOG
Description: Lightweight classic theme for the AI CATALOG staging redesign. Built to avoid SWELL layout dependencies while preserving WordPress URLs, taxonomies, and content output.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: aicatalog-theme
*/

:root {
  --aic-color-main: #9718a0;
  --aic-color-main-dark: #7f1488;
  --aic-color-link: #2563eb;
  --aic-color-link-hover: #1d4ed8;
  --aic-color-text: #1f2937;
  --aic-color-muted: #6b7280;
  --aic-color-border: #e5e7eb;
  --aic-color-bg: #ffffff;
  --aic-color-soft: #faf5ff;
  --aic-container: 1200px;
  --aic-radius: 14px;
  --aic-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: #fff;
  color: var(--aic-color-text);
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.8;
}

body.aicatalog-site {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body.aicatalog-site {
    overflow-x: hidden;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--aic-color-main);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.screen-reader-text,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 9999;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: #fff;
  border: 1px solid var(--aic-color-border);
  border-radius: 8px;
}

.site-header {
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.site-header__inner,
.l-container {
  width: min(var(--aic-container), calc(100% - 48px));
  margin-inline: auto;
}

.site-header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1;
}

.site-brand__mark {
  font-size: 22px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-menu-toggle {
  display: none;
}

.site-nav-overlay {
  display: none;
}

.p-breadcrumb {
  padding-top: 18px;
}

.p-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  list-style: none;
  font-size: 12.5px;
  line-height: 1.7;
}

.p-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.p-breadcrumb__item + .p-breadcrumb__item::before {
  content: "/";
  flex: 0 0 auto;
  margin: 0 8px;
  color: #c4c8cf;
}

.p-breadcrumb__text {
  color: var(--aic-color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.p-breadcrumb__text:hover {
  color: var(--aic-color-main);
}

.p-breadcrumb__item:last-child .p-breadcrumb__text {
  color: var(--aic-color-text);
}

.l-content {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 38px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.l-content.is-one-column,
.is-aicatalog-front .l-content {
  display: block;
  max-width: none;
}
.is-aicatalog-front .l-content {
  padding-top: 0;
}

.l-mainContent {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.l-mainContent__inner > :first-child {
  margin-top: 0;
}

.l-sidebar {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.c-pageTitle {
  margin: 0 0 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--aic-color-border);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.35;
}

.c-pageTitle__inner {
  display: inline-block;
  border-bottom: 0;
  padding-bottom: 0;
}

.c-pageTitle__subTitle {
  display: none;
}

.aic-single__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: -14px 0 24px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
}

.aic-single__meta .aic-single__terms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  min-height: 20px;
}

.aic-single__meta .aic-single__terms::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 1px;
  background:
    linear-gradient(#374151 0 0) 1px 1px / 6px 3px no-repeat,
    linear-gradient(#374151 0 0) 0 4px / 14px 7px no-repeat;
}

.aic-single__terms .aic-tag {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.aic-single__terms a.aic-tag:hover {
  color: var(--aic-color-main);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.aic-single__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
  min-height: 20px;
}

.aic-single__date-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1.7px solid #6b7280;
  border-radius: 999px;
}

.aic-single__date-icon::before,
.aic-single__date-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.5px;
  border-radius: 999px;
  background: #6b7280;
  transform-origin: 50% 0;
}

.aic-single__date-icon::before {
  height: 4px;
  transform: translate(-50%, -50%) rotate(0deg);
}

.aic-single__date-icon::after {
  height: 4px;
  transform: translate(-50%, -50%) rotate(120deg);
}

.aic-single__date-label {
  color: #6b7280;
}

.aic-single__date-value {
  color: #4b5563;
}

.aic-single__thumb {
  margin: 0 0 44px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.10);
}

.aic-single__thumb .c-postThumb__img {
  display: block;
}

.p-termHead__desc,
.archive-description {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--aic-color-border);
  border-radius: 0;
  color: #374151;
  line-height: 1.9;
}

.post_content,
.entry-content {
  max-width: 100%;
}

.post_content > * + *,
.entry-content > * + * {
  margin-top: 1.5em;
}

.p-postList,
.aidb-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.p-postList__item {
  list-style: none;
}

.p-postList__link,
.aidb-card,
.aic-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--aic-color-border);
  border-radius: var(--aic-radius);
  background: #fff;
  color: var(--aic-color-text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.p-postList__link:hover,
.aidb-card:hover,
.aic-card:hover {
  transform: translateY(-2px);
  border-color: rgba(151, 24, 160, 0.3);
  box-shadow: var(--aic-shadow);
}

.c-postThumb,
.aidb-card-thumb,
.aic-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.c-postThumb__img,
.aic-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.p-postList__body,
.aidb-card-header,
.aidb-card-body,
.aidb-card-footer,
.aic-card__body {
  padding: 18px 20px;
}

.aidb-card-body,
.aidb-card-footer {
  padding-top: 0;
}

.p-postList__title,
.aidb-card-title,
.aic-card__title {
  margin: 0 0 10px;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.p-postList__excerpt,
.aidb-card-summary,
.aic-card__excerpt {
  margin: 0;
  color: #4b5563;
  font-size: 12.5px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
}

.aidb-card-company,
.aic-card__company {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-size: 13px;
}

.aidb-card-tags,
.aic-card__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.aidb-tag,
.aic-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f3f5;
  color: #1f2937;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
}

a.aic-tag:hover {
  background: #e5e7eb;
  color: #111827;
}

.aidb-filter-wrap {
  margin: 0 auto 34px;
  padding: 22px;
  border: 1px solid var(--aic-color-border);
  border-radius: 18px;
  background: #fff;
}

.aidb-search-row {
  display: flex;
  gap: 10px;
}

.aidb-search-input,
.aidb-filter-select {
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: var(--aic-color-text);
  font: inherit;
}

.aidb-search-input {
  flex: 1;
  padding: 0 14px;
}

.aidb-search-btn {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--aic-color-main);
  color: #fff;
  padding: 0 22px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.aidb-search-btn:hover {
  background: var(--aic-color-main-dark);
}

.aidb-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.aidb-filter-select {
  padding: 0 12px;
}

.aidb-sidebar-tax {
  margin-bottom: 28px;
}

.aidb-sidebar-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--aic-color-main);
  font-size: 14px;
  font-weight: 800;
}

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

.aidb-sidebar-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--aic-color-text);
  font-size: 13px;
}

.aidb-sidebar-item a:hover,
.aidb-sidebar-item.is-active a {
  background: var(--aic-color-soft);
  color: var(--aic-color-main);
}

.aidb-sidebar-count {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2f7;
  color: #6b7280;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
}

.aidb-pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--aic-color-border);
  border-radius: 9px;
  padding: 0 10px;
}

.page-numbers.current {
  border-color: var(--aic-color-main);
  background: var(--aic-color-main);
  color: #fff;
}

.aic-site-notice {
  margin-top: 28px;
  margin-bottom: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #374151;
  font-size: 13px;
  line-height: 1.6;
}

.aic-site-notice h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 15px;
  line-height: 1.55;
}

.aic-site-notice p {
  margin: 0;
}

.aic-site-notice p + p {
  margin-top: 8px;
}

.aic-site-notice a {
  color: var(--aic-color-link);
  font-weight: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.aic-site-notice a:hover {
  color: var(--aic-color-link-hover);
}

.p-breadcrumb {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--aic-color-border);
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
}

.p-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  list-style: none;
}

.p-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  list-style: none;
}

.p-breadcrumb__item + .p-breadcrumb__item::before {
  content: "›";
  margin: 0 0.55em;
  color: #cbd5e1;
}

.p-breadcrumb__text {
  color: inherit;
  text-decoration: none;
}

a.p-breadcrumb__text:hover {
  color: var(--aic-color-main);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer {
  border-top: 1px solid var(--aic-color-border);
  padding: 32px 0;
  color: var(--aic-color-muted);
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer__links {
  display: flex;
  gap: 16px;
}

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

  .l-sidebar {
    margin-top: 48px;
  }

  .p-postList,
  .aidb-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .site-header__inner,
  .l-container {
    width: min(100% - 32px, var(--aic-container));
  }

  .site-header__inner {
    min-height: 72px;
    position: relative;
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
    gap: 16px;
  }

  .site-brand {
    min-width: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
  }

  .site-brand__mark {
    font-size: 17px;
    letter-spacing: 0.18em;
  }

  .site-menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #050505;
    cursor: pointer;
    z-index: 2;
  }

  .site-menu-toggle__line {
    display: block;
    width: 24px;
    height: 2.5px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle__line:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle__line:nth-child(2) {
    opacity: 0;
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle__line:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  .site-menu-toggle.is-active {
    display: none;
  }

  .site-nav {
    display: none;
  }

  .site-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    padding: 72px 32px 40px;
    background: rgba(255, 255, 255, 0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .site-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.is-site-menu-open .site-nav-overlay {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .site-nav-close::before,
  .site-nav-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 2px;
    border-radius: 999px;
    background: #050505;
    transform-origin: center;
  }

  .site-nav-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .site-nav-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .site-nav-overlay__inner {
    width: min(100%, 400px);
    max-height: 86vh;
    overflow-y: auto;
  }

  .site-nav-overlay__list,
  .site-nav-overlay ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .site-nav-overlay__list li,
  .site-nav-overlay li {
    margin: 0;
    border-bottom: 1px solid var(--aic-color-border);
    list-style: none;
  }

  .site-nav-overlay__list li:first-child,
  .site-nav-overlay li:first-child {
    border-top: 1px solid var(--aic-color-border);
  }

  .site-nav-overlay__list a,
  .site-nav-overlay a {
    display: block;
    padding: 16px 0;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
  }

  .site-nav-overlay__list a:hover,
  .site-nav-overlay a:hover {
    color: var(--aic-color-main);
  }

  .l-content {
    padding-top: 32px;
  }

  .p-postList,
  .aidb-card-grid {
    grid-template-columns: 1fr;
  }

  .aidb-search-row {
    flex-direction: column;
  }

  .aidb-filter-select {
    width: 100%;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== AI CATALOG: migrated from mu-plugin 04_custom_css.css (catalog/hero/list design) ===== */
.aidb-home-hero,
.aidb-home-section,
.aidb-filter-wrap,
.aidb-card-grid,
.aidb-pagination {
  box-sizing: border-box;
}

.aidb-hero-band {
  width: 100vw;
  max-width: none;
  margin-top: 0 !important;
  margin-left: calc(50% - 50vw);
  margin-bottom: 0;
  padding: 44px max(20px, calc((100vw - 1280px) / 2)) 36px;
  background:
    linear-gradient(101deg, rgba(28,8,52,.66) 0%, rgba(28,8,52,.44) 30%, rgba(28,8,52,.16) 54%, rgba(28,8,52,0) 74%),
    url('assets/hero-feather-2400.jpg') center / cover no-repeat;
}

.aidb-home-hero {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 0 26px;
  text-align: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}
.aidb-home-hero-main,
.aidb-home-hero-aside,
.aidb-home-card {
  min-width: 0;
}
.aidb-home-title {
  max-width: 720px;
  margin: 0 0 16px !important;
  padding: 0 !important;
  background: none !important;
  color: #ffffff !important;
  font-size: clamp(30px, 3.4vw, 40px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.22 !important;
  overflow-wrap: anywhere;
  word-break: break-all;
  line-break: anywhere;
}
.aidb-home-title::before,
.aidb-home-title::after,
.aidb-home-section-title::before,
.aidb-home-section-title::after {
  display: none !important;
}
.aidb-home-lead {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14.5px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.aidb-lead-br {
  display: none;
}
.aidb-home-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin-top: 14px;
}
.aidb-home-stats > span {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 5px;
  align-items: baseline;
  padding: 2px 16px;
}
.aidb-home-stats > span:first-child {
  padding-left: 16px;
}
.aidb-home-stats > span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}
.aidb-home-stats strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.aidb-home-stats .aidb-home-stat-label {
  grid-column: 1 / -1;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
}
.aidb-home-stats .aidb-home-stat-unit {
  color: rgba(255, 255, 255, 0.80);
  font-size: 11px;
  font-weight: 700;
}
.aidb-home-section-head {
  display: block;
  margin-bottom: 22px;
}
.aidb-home-section-title {
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  color: #0f172a !important;
  font-size: clamp(21px, 2.6vw, 30px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere;
}
.aidb-home-section-lead {
  max-width: 560px;
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.8;
}
.aidb-popular-section,
.aidb-latest-head {
  margin: 0 0 28px;
  box-sizing: border-box;
}
.aidb-popular-section {
  margin: 0 0 52px;
  padding: 30px 0 32px;
  border: 0;
  border-radius: 0;
  background: #f5f6f8;
  box-shadow: 0 0 0 100vmax #f5f6f8;
  clip-path: inset(0 -100vmax);
}
.aidb-popular-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.aidb-popular-chip {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  padding: 14px 40px 14px 17px;
  border: 1px solid #ebddf1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.aidb-popular-chip::after {
  content: "→";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #ceabd4;
  font-size: 14px;
  font-weight: 800;
  transition: transform .18s ease, color .18s ease;
}
.aidb-popular-chip:hover {
  border-color: rgba(151, 24, 160, 0.40);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(151, 24, 160, 0.10);
}
.aidb-popular-chip:hover::after {
  color: #9718a0;
  transform: translateY(-50%) translateX(3px);
}
.aidb-popular-chip span {
  color: #15121c;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}
.aidb-latest-head {
  padding-top: 4px;
}

.aidb-filter-wrap {
  max-width: 760px;
  margin: 8px auto 0;
  padding: 16px 16px 15px;
  background: #fff;
  border: 1px solid #ece2f0;
  border-radius: 10px;
  clip-path: none;
}
.aidb-filter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aidb-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
}
.aidb-search-input {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  padding: 12px 16px 12px 48px;
  border: 1px solid #e3d8e9;
  border-radius: 8px;
  font-size: 15px;
  color: #15121c;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239718a0' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") 16px center / 18px no-repeat;
  transition: border-color 0.15s ease;
}
.aidb-search-input::placeholder {
  color: #9b94a7;
}
.aidb-search-input:focus {
  outline: 2px solid rgba(151, 24, 160, 0.45);
  outline-offset: 1px;
  border-color: #9718a0;
}
.aidb-search-btn {
  min-height: 54px;
  padding: 12px 34px;
  background: #9718a0;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.aidb-search-btn:hover {
  background: #85148f;
  transform: translateY(-1px);
}
.aidb-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.aidb-filter-select {
  flex: 1;
  min-width: 150px;
  padding: 11px 38px 11px 14px;
  border: 1px solid #e3d8e9;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #3c3646;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239718a0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.aidb-filter-select:focus {
  outline: 2px solid rgba(151, 24, 160, 0.45);
  outline-offset: 1px;
  border-color: #9718a0;
}

.aidb-filter-description {
  margin-bottom: 1.5em;
  padding: 1.2em 1.5em;
  background: #fff;
  border-left: 4px solid #9718a0;
  border-radius: 0 8px 8px 0;
}
.aidb-filter-desc-item + .aidb-filter-desc-item {
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px solid #eee;
}
.aidb-filter-desc-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5em;
}
.aidb-filter-desc-text {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

.aidb-result-count {
  color: #6b6577;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 1.2em;
}
.aidb-result-count strong {
  color: #9718a0;
  font-weight: 800;
}

.aidb-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 2em;
}
@media (max-width: 960px) {
  .aidb-home-hero,
  .aidb-home-section-head {
    grid-template-columns: 1fr;
  }
  .aidb-home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .aidb-popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .aidb-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .aidb-home-section,
  .aidb-card-grid,
  .aidb-pagination {
    width: 100%;
    max-width: 100%;
  }
  .aidb-hero-band {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-bottom: 0;
    padding: 40px 20px 28px;
    background:
      linear-gradient(180deg, rgba(28,8,52,.62) 0%, rgba(28,8,52,.44) 44%, rgba(28,8,52,.20) 74%, rgba(28,8,52,0) 100%),
      url('assets/hero-feather-2400.jpg') center / cover no-repeat;
  }
  .aidb-home-hero {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 22px;
    border-radius: 0;
    background: transparent;
  }
  .aidb-filter-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 14px;
  }
  .aidb-home-title {
    font-size: 25px;
    letter-spacing: -0.045em;
    line-height: 1.28;
  }
  .aidb-home-lead {
    font-size: 13.5px;
    line-height: 1.85;
  }
  .aidb-home-stats {
    gap: 0;
    justify-content: center;
  }
  .aidb-home-stats > span {
    padding: 2px 22px;
  }
  .aidb-home-stats > span:first-child {
    padding-left: 22px;
  }
  .aidb-home-stats .aidb-home-stat-label {
    text-align: center;
  }
  .aidb-home-stats strong {
    font-size: 32px;
  }
  .aidb-home-stats .aidb-home-stat-label,
  .aidb-home-stats .aidb-home-stat-unit {
    font-size: 12px;
  }
  .aidb-lead-br {
    display: inline;
  }
  .aidb-home-lead {
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .aidb-home-query,
  .aidb-home-section-text,
  .aidb-home-card-desc {
    word-break: break-all;
    line-break: anywhere;
  }
  .aidb-home-card-grid {
    grid-template-columns: 1fr;
  }
  .aidb-popular-section {
    padding: 30px 0 28px;
  }
  .aidb-popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .aidb-popular-chip {
    min-height: 64px;
    padding: 11px 12px;
  }
  .aidb-latest-head {
    margin-bottom: 18px;
  }
  .aidb-home-card {
    min-height: 0;
  }
  .aidb-card-grid {
    grid-template-columns: 1fr;
  }
  .aidb-search-row {
    flex-direction: column;
  }
  .aidb-search-input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }
  .aidb-search-btn {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
  }
  .aidb-filter-row {
    flex-direction: column;
  }
  .aidb-filter-select {
    width: 100%;
    min-width: 0;
  }
}

.aidb-no-results {
  text-align: center;
  padding: 3em;
  color: #888;
  font-size: 15px;
}

.post-type-ai_company .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.post-type-ai_company .entry-content table td {
  padding: 0.75em 1em;
  border-bottom: 1px solid #eee;
}
.post-type-ai_company .entry-content table td:first-child {
  font-weight: bold;
  width: 120px;
  color: #555;
}
.post-type-ai_company .entry-content iframe {
  margin: 1em 0;
  border-radius: 8px;
}
.post-type-ai_company .entry-content a {
  color: var(--aic-color-link);
  text-decoration: none;
}
.post-type-ai_company .entry-content a:hover {
  color: var(--aic-color-link-hover);
  text-decoration: underline;
}

.aidb-sidebar-tax {
  margin-bottom: 1.5em;
}
.aidb-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #9718a0;
}
.aidb-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aidb-sidebar-item {
  margin: 0;
}
.aidb-sidebar-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.15s;
}
.aidb-sidebar-item a:hover {
  background: #f3f4f6;
}
.aidb-sidebar-item.is-active a {
  background: #fdf4ff;
  color: #9718a0;
  font-weight: 600;
}
.aidb-sidebar-count {
  background: #e5e7eb;
  color: #666;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
}
.aidb-sidebar-item.is-active .aidb-sidebar-count {
  background: #9718a0;
  color: #fff;
}

.aidb-company-block {
  margin-top: 2em;
  padding: 0;
  background: none;
  border-radius: 0;
  border: none;
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5em;
}

.tax-company .p-termContent > .post_content > blockquote,
.tax-company .aidb-co-desc {
  background: none;
  border-left: none;
  padding: 0;
  margin: 0 0 1.5em;
  border-radius: 0;
  box-shadow: none;
}

.tax-company .p-termContent h2 {
  margin-bottom: 1.5em;
}

.aidb-tax-cross {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 2.5em;
  box-sizing: border-box;
  
  grid-column: 1 / -1;
  
  flex-basis: 100%;
  flex-grow: 0;
  flex-shrink: 0;
  min-width: 100%;
  order: -1;
}
.aidb-tax-cross-intro {
  margin: 0 0 1.5em;
  padding: 1em 1.2em;
  background: #f8fafc;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  border-radius: 8px;
}
.aidb-tax-cross-intro strong {
  color: #9718a0;
  font-size: 16px;
}

.aidb-cross-section {
  margin-bottom: 1em;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.aidb-cross-section[open] {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.aidb-cross-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9em 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8em;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  background: #f8fafc;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
  position: relative;
}
.aidb-cross-summary::-webkit-details-marker {
  display: none;
}
.aidb-cross-summary::before {
  content: '\25B6';
  font-size: 10px;
  color: #9718a0;
  margin-right: 0.4em;
  transition: transform 0.2s;
  display: inline-block;
}
.aidb-cross-section[open] .aidb-cross-summary::before {
  transform: rotate(90deg);
}
.aidb-cross-section[open] .aidb-cross-summary {
  border-bottom-color: #e5e7eb;
}
.aidb-cross-summary:hover {
  background: #f1f5f9;
}
.aidb-cross-summary-text {
  flex: 1;
}
.aidb-cross-summary-badge {
  background: #f5d0fe;
  color: #9718a0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.aidb-cross-section .aidb-cross-table {
  border: none;
  border-radius: 0;
}
.aidb-cross-heading {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.8em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #9718a0;
}
.aidb-cross-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.aidb-cross-table thead {
  background: #f8fafc;
}
.aidb-cross-table th {
  padding: 0.7em 1em;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #e5e7eb;
}
.aidb-cross-table td {
  padding: 0.7em 1em;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.aidb-cross-table tbody tr:last-child td {
  border-bottom: none;
}
.aidb-cross-table tbody tr:hover {
  background: #f8fafc;
}
.aidb-cross-table th.aidb-cross-num,
.aidb-cross-table td.aidb-cross-num {
  text-align: right;
  white-space: nowrap;
  width: 80px;
  color: #555;
}
.aidb-cross-table a {
  color: #9718a0;
  text-decoration: none;
}
.aidb-cross-table a:hover {
  text-decoration: underline;
}
.aidb-cross-drill {
  display: inline-block;
  padding: 4px 10px;
  background: #fdf4ff;
  color: #9718a0 !important;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.aidb-cross-drill:hover {
  background: #f5d0fe;
  text-decoration: none !important;
}
@media (max-width: 720px) {
  .aidb-cross-table,
  .aidb-cross-table thead,
  .aidb-cross-table tbody,
  .aidb-cross-table tr,
  .aidb-cross-table th,
  .aidb-cross-table td {
    display: block;
  }
  .aidb-cross-table thead {
    display: none;
  }
  .aidb-cross-table tr {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.8em 0;
  }
  .aidb-cross-table tr:last-child {
    border-bottom: none;
  }
  .aidb-cross-table td {
    border: none;
    padding: 0.3em 1em;
  }
  .aidb-cross-table td.aidb-cross-num {
    display: inline-block;
    width: auto;
    padding-right: 1em;
  }
  .aidb-cross-table td:first-child {
    font-weight: 600;
    font-size: 15px;
    padding-bottom: 0.4em;
  }
}

.aidb-cross-pct {
  color: #94a3b8;
  font-size: 12px;
  margin-left: 2px;
}

@media (min-width: 1280px) {
  .aidb-tax-cross {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.5em 1.5em;
  }
  .aidb-tax-cross-intro {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
  .aidb-cross-section {
    margin-bottom: 0;
    min-width: 0; 
  }
}

/* Cross-stats table: whole-row click affordance */
.aidb-cross-table tbody tr.is-rowlink { cursor: pointer; }
.aidb-cross-table tbody tr.is-rowlink:hover { background: #faf2fb; }
.aidb-cross-drill {
  padding: 6px 14px;
  border: 1px solid #e6cdeb;
  background: #f7ecf9;
  border-radius: 999px;
  font-weight: 700;
}
.aidb-cross-table tbody tr.is-rowlink:hover .aidb-cross-drill {
  background: #9718a0;
  border-color: #9718a0;
  color: #fff !important;
}

/* Related services: override mu-plugin's compact horizontal card layout */
.entry-content .aidb-related-services {
  margin-top: 2.2em;
  padding-top: 1.6em;
  border-top: 1px solid var(--aic-color-border);
}

.entry-content .aidb-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.entry-content .aidb-related-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--aic-color-border);
  border-radius: var(--aic-radius);
  background: #fff;
  color: var(--aic-color-text);
  text-decoration: none;
}

.entry-content .aidb-related-card:hover {
  border-color: rgba(151, 24, 160, 0.3);
  box-shadow: var(--aic-shadow);
  text-decoration: none;
}

.entry-content .aidb-related-thumb {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  background-color: #f3f4f6;
  background-size: cover;
  background-position: center top;
  flex-shrink: 0;
}

.entry-content .aidb-related-info {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 16px;
}

.entry-content .aidb-related-name {
  margin: 0 0 6px;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.entry-content .aidb-related-company {
  display: block;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.5;
}

.entry-content .aidb-related-summary {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .entry-content .aidb-related-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Accessibility & cross-page consistency ===== */

/* Keyboard focus ring for interactive cards / nav / pagination */
.aidb-card:focus-visible,
.aic-card:focus-visible,
.p-postList__link:focus-visible,
.aidb-popular-chip:focus-visible,
.aidb-related-card:focus-visible,
.page-numbers:focus-visible,
.site-nav a:focus-visible,
.site-nav-overlay a:focus-visible,
.site-footer__links a:focus-visible,
.p-breadcrumb__text:focus-visible {
  outline: 2px solid var(--aic-color-main);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Neutralize mu-plugin inline card padding on company/category pages
   so list cards match the home grid (theme owns card layout). */
.aicatalog-site .p-postList.-type-card .p-postList__item .p-postList__link {
  padding: 0;
  border-radius: var(--aic-radius);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .aidb-card,
  .aic-card,
  .p-postList__link,
  .aidb-popular-chip,
  .aidb-related-card,
  .aidb-search-btn {
    transition: none !important;
  }
  .aidb-card:hover,
  .aic-card:hover,
  .p-postList__link:hover,
  .aidb-popular-chip:hover,
  .aidb-related-card:hover {
    transform: none !important;
  }
}

/* ===== Buttons / links color system =====
   Brand purple (#9718a0) is reserved for the hero search button and accents.
   Action buttons and text links use blue. */
.aic-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 11px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--aic-color-link);
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.aic-btn:hover {
  background: var(--aic-color-link-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* Service detail: meta row alignment */
.aic-single__meta {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: start;
  column-gap: 18px;
  row-gap: 8px;
}

.aic-single__meta .aic-single__terms,
.aic-single__date {
  display: flex;
  align-items: center;
  min-height: 20px;
  margin: 0;
  line-height: 20px;
}

.aic-single__meta .aic-single__terms {
  flex-wrap: nowrap;
  gap: 0 8px;
  height: 20px;
  overflow: visible;
}

.aic-single__meta .aic-single__terms::before,
.aic-single__date-icon {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}

.aic-single__terms .aic-tag,
.aic-single__date-label,
.aic-single__date-value {
  display: inline-block;
  line-height: 20px;
  white-space: nowrap;
}

/* Service detail: calendar glyph on the published date */
.aic-single__date-icon {
  display: block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}

.aic-single__date-icon::before,
.aic-single__date-icon::after {
  content: none;
}

.aic-single__date-label,
.aic-single__date-value {
  line-height: 20px;
}

@media (min-width: 601px) {
  .aic-single__date-label,
  .aic-single__date-value {
    transform: translateY(6px);
  }
}

@media (max-width: 600px) {
  .aic-single__meta {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 8px;
  }

  .aic-single__meta .aic-single__terms,
  .aic-single__date {
    width: 100%;
  }

  .aic-single__meta .aic-single__terms {
    flex-wrap: wrap;
    height: auto;
    min-height: 20px;
  }
}

/* 404: secondary navigation links */
.aic-404-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.aic-404-links a {
  color: var(--aic-color-link);
  font-weight: 700;
}

.aic-404-links a:hover {
  color: var(--aic-color-link-hover);
}

/* Footer operator line */
.site-footer__copy {
  margin: 0;
}

.site-footer__operator {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--aic-color-muted);
}

/* Company taxonomy archive: match the compact "related services" card design */
.tax-company .p-postList,
.tax-company .aidb-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tax-company .aic-card__body {
  padding: 16px 18px 18px;
}

.tax-company .aic-card__title {
  margin-bottom: 6px;
  font-size: 16px;
}

.tax-company .aic-card__company {
  margin-top: 2px;
  font-size: 12px;
}

.tax-company .aic-card__excerpt {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  display: block;
  -webkit-line-clamp: none;
  overflow: visible;
}

.tax-company .aic-card__terms {
  display: none;
}

@media (max-width: 600px) {
  .tax-company .p-postList,
  .tax-company .aidb-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Company eyecatch (server-side via aicatalog_company_thumb).
   Inherits .aic-single__thumb (no radius, light shadow) for parity with service detail. */
.aic-company__thumb {
  margin: 18px 0 28px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.aic-company__thumb .c-postThumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Company page: AI求人ナビ link. Match the related-articles box (mu-plugin .aidb-related)
   so it does not look detached: gray panel, blue-underlined heading, blue link. */
.aidb-co-jobs {
  margin: 2em 0;
  padding: 1.5em;
  background: #f8f9fa;
  border-radius: 8px;
}

.aidb-co-jobs-heading {
  margin: 0 0 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--aic-color-link);
  font-size: 1.1em;
  font-weight: 700;
  color: #1a1a1a;
}

.aidb-co-jobs-link {
  color: var(--aic-color-link);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.aidb-co-jobs-link::before {
  content: "\25B6 ";
  font-size: 12px;
}

.aidb-co-jobs-link:hover {
  color: var(--aic-color-link-hover);
  text-decoration: underline;
}

/* Front page: AI企業一覧 section (below the service list) */
.aidb-home-companies {
  margin: 52px 0 0;
}

.aidb-home-companies-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.aidb-home-company {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--aic-color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--aic-color-text);
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.aidb-home-company:hover {
  border-color: rgba(151, 24, 160, 0.3);
  box-shadow: var(--aic-shadow);
  transform: translateY(-2px);
}

.aidb-home-company-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #111827;
}

.aidb-home-company-count {
  font-size: 12px;
  color: var(--aic-color-muted);
}

.aidb-home-companies-all {
  margin: 18px 0 0;
  text-align: center;
}

.aidb-home-companies-all a {
  display: inline-block;
  color: var(--aic-color-link);
  font-weight: 700;
  text-decoration: none;
}

.aidb-home-companies-all a::after {
  content: " \2192";
}

.aidb-home-companies-all a:hover {
  color: var(--aic-color-link-hover);
  text-decoration: underline;
}

@media (max-width: 960px) {
  .aidb-home-companies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .aidb-home-companies-grid {
    grid-template-columns: 1fr;
  }
}

/* Front page: category directory (技術 / 業種 / 用途 を3カラム＋掲載件数バッジ) */
.aidb-catdir-more {
  margin-top: 2px;
}

.aidb-catdir-moretoggle {
  list-style: none;
  cursor: pointer;
  padding: 7px 9px;
  border-radius: 8px;
  color: #9b8fa6;
  font-size: 12.5px;
  transition: background 0.15s ease, color 0.15s ease;
}

.aidb-catdir-moretoggle::-webkit-details-marker {
  display: none;
}

.aidb-catdir-moretoggle:hover {
  background: #eef0f3;
  color: var(--aic-color-main);
}

/* Mobile menu (hamburger overlay): category navigation mirroring the desktop sidebar */
.site-nav-overlay__cats {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--aic-color-border);
  text-align: left;
}

.site-nav-overlay__cats .aidb-sidebar-tax {
  margin-bottom: 20px;
}

.site-nav-overlay__cats .aidb-sidebar-title {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* Reset the overlay's bold/divider link styling for the category lists */
.site-nav-overlay__cats .aidb-sidebar-list li {
  margin: 0;
  border: 0;
}

.site-nav-overlay__cats .aidb-sidebar-item a {
  padding: 7px 8px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--aic-color-text);
}

.site-nav-overlay__cats .aidb-sidebar-count {
  font-weight: 600;
}

.aidb-catdir {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.aidb-catdir-col {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 12px 8px;
}

.aidb-catdir-head {
  display: flex;
  align-items: center;
  margin: 0 6px 8px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--aic-color-main);
}

.aidb-catdir-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #15121c;
}

.aidb-catdir-num {
  margin-left: auto;
  font-size: 11px;
  color: #b3a6bb;
}

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

.aidb-catdir-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #2b2630;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.aidb-catdir-item:hover {
  background: #f7ebfa;
  color: var(--aic-color-main);
}

.aidb-catdir-cnt {
  flex: 0 0 auto;
  color: #a99bb0;
  font-size: 12px;
  font-weight: 600;
}

.aidb-catdir-item:hover .aidb-catdir-cnt {
  color: var(--aic-color-main);
}

@media (max-width: 768px) {
  .aidb-catdir {
    grid-template-columns: 1fr;
  }
}

/* Company page: give the "○○のAIサービス一覧（n件）" heading more breathing room
   (overrides mu-plugin 08 .aidb-co-svc-heading margin without touching mu-plugin) */
.tax-company .aidb-co-svc-heading {
  margin: 3.6em 0 1.9em;
  padding-bottom: 0.7em;
}

/* Company directory (/companies/): show company name + service count only.
   Hide the thumbnail and the location line (overrides mu-plugin 09 inline styles). */
.aicatalog-site .aidb-dir-thumb {
  display: none;
}

.aicatalog-site .aidb-dir-meta span + span {
  display: none;
}

/* Header switches to the hamburger at <=960px; keep listing cards at 2 columns
   across the tablet range so they don't collapse to a single column too early. */
@media (min-width: 601px) and (max-width: 960px) {
  .p-postList,
  .aidb-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
