/* portal-v2 · /answers/ hub — Ecosystem Index
 * スコープ: .theme-portal-v2 のみ。design.md 準拠。
 * 読込順: tokens.css → answers.css → portal/base.css → このファイル
 * (このファイルは answers.css の記事一覧・カード規則を上書きする最終レイヤー)
 */

.theme-portal-v2 .hub-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- page title ---- */
.theme-portal-v2 main.hub h1 {
  font-size: var(--portal-text-page-title);
  font-weight: 900;
}

/* ================= 注目記事レール ================= */
.theme-portal-v2 .featured-rail {
  margin: 0 0 var(--space-xl);
}

.theme-portal-v2 .section-heading {
  font-family: var(--portal-font-heading);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--portal-ink);
  margin: 0 0 var(--space-sm);
}

.theme-portal-v2 .featured-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
}

@media (min-width: 64rem) {
  .theme-portal-v2 .featured-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.theme-portal-v2 .featured-card {
  display: block;
  background: var(--portal-surface);
  border: 1px solid var(--portal-rule);
  border-radius: var(--portal-radius-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-short) var(--ease-out);
}

.theme-portal-v2 .featured-card:hover {
  border-color: var(--portal-primary);
}

.theme-portal-v2 .featured-card:focus-visible {
  outline: 2px solid var(--portal-focus);
  outline-offset: 2px;
}

.theme-portal-v2 .featured-banner {
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
}

.theme-portal-v2 .featured-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* art palette — SVGイラスト内部限定 (design.md 6章) */
.theme-portal-v2 .art-bg {
  fill: var(--portal-art-indigo);
}
.theme-portal-v2 .art-glow {
  fill: var(--portal-art-glow);
  opacity: 0.3;
}
.theme-portal-v2 .art-shape {
  fill: var(--portal-art-violet);
}
.theme-portal-v2 .art-shape--accent {
  fill: var(--portal-art-pink);
}
.theme-portal-v2 .art-line {
  fill: none;
  stroke: var(--portal-art-pink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-portal-v2 .art-node {
  fill: var(--portal-art-violet);
}
.theme-portal-v2 .art-node--accent {
  fill: var(--portal-art-pink);
}
.theme-portal-v2 .art-outline {
  fill: none;
  stroke: var(--portal-art-glow);
  stroke-width: 1.5;
  opacity: 0.6;
}
.theme-portal-v2 .art-dot {
  fill: var(--portal-art-glow);
}

.theme-portal-v2 .featured-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5em;
  padding: 1.1rem 42% 1.1rem 1.1rem;
}

.theme-portal-v2 .featured-kicker {
  display: inline-block;
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--portal-surface);
  background: color-mix(in oklch, var(--portal-surface) 22%, transparent);
  border: 1px solid color-mix(in oklch, var(--portal-surface) 40%, transparent);
  border-radius: var(--portal-radius-pill);
  padding: 0.2em 0.8em;
}

.theme-portal-v2 .featured-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: var(--portal-font-heading);
  font-weight: 700;
  font-size: var(--text-md);
  line-height: 1.45;
  color: var(--portal-surface);
}

.theme-portal-v2 .featured-desc {
  display: none;
}

@media (min-width: 30rem) {
  .theme-portal-v2 .featured-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: var(--text-xs);
    line-height: 1.6;
    color: color-mix(in oklch, var(--portal-surface) 85%, transparent);
  }
}

.theme-portal-v2 .featured-foot {
  display: block;
  padding: 0.7rem 1.1rem;
  font-size: var(--text-xs);
  color: var(--portal-muted);
  border-top: 1px solid var(--portal-rule);
}

/* ================= ツールバー(検索 + カテゴリナビ) ================= */
.theme-portal-v2 .hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-md);
}

.theme-portal-v2 .hub-search {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex: 1 1 14rem;
  min-width: 0;
  background: var(--portal-surface);
  border: 1px solid var(--portal-rule-strong);
  border-radius: var(--portal-radius-control);
  padding: 0.5em 0.9em;
  transition: border-color var(--dur-short) var(--ease-out);
}

.theme-portal-v2 .hub-search:hover {
  border-color: var(--portal-primary);
}

.theme-portal-v2 .hub-search:focus-within {
  border-color: var(--portal-primary);
}

.theme-portal-v2 .hub-search-icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--portal-muted);
}

.theme-portal-v2 .hub-search input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: none;
  font-family: var(--portal-font-body);
  font-size: var(--text-sm);
  color: var(--portal-ink);
}

.theme-portal-v2 .hub-search input::placeholder {
  color: var(--portal-muted);
}

.theme-portal-v2 .hub-search input:focus {
  outline: none;
}

.theme-portal-v2 .hub-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.theme-portal-v2 .type-tabs {
  flex: 1 1 100%;
  margin: 0;
}

@media (min-width: 40rem) {
  .theme-portal-v2 .type-tabs {
    flex: 0 1 auto;
  }
}

.theme-portal-v2 .type-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

/* カテゴリアイコン: 16-20px, 2色以内(カテゴリ色 + wash背景) */
.theme-portal-v2 .cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.theme-portal-v2 .cat-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.theme-portal-v2 .cat-icon--coral {
  background: var(--portal-cat-coral-wash);
  color: var(--portal-cat-coral);
}
.theme-portal-v2 .cat-icon--cyan {
  background: var(--portal-cat-cyan-wash);
  color: var(--portal-cat-cyan);
}
.theme-portal-v2 .cat-icon--magenta {
  background: var(--portal-cat-magenta-wash);
  color: var(--portal-cat-magenta);
}
.theme-portal-v2 .cat-icon--amber {
  background: var(--portal-cat-amber-wash);
  color: var(--portal-cat-amber);
}
.theme-portal-v2 .cat-icon--purple {
  background: var(--portal-cat-purple-wash);
  color: var(--portal-cat-purple);
}

.theme-portal-v2 .cat-icon svg [data-fill="wash"] {
  fill: var(--portal-surface);
  opacity: 0.75;
}

/* ================= 記事一覧の密度 ================= */
.theme-portal-v2 .post-desc {
  line-height: 1.6;
}

.theme-portal-v2 .post b {
  font-size: var(--text-base);
}

.theme-portal-v2 .post-thumb {
  border-radius: var(--portal-radius-card);
}

/* ================= 推薦サイドバー ================= */
.theme-portal-v2 .mini-list {
  background: var(--portal-surface);
  border-color: var(--portal-rule);
}

.theme-portal-v2 .mini-item img {
  border-radius: var(--portal-radius-control);
}

/* ================= CTA (コバルト基調) ================= */
.theme-portal-v2 .cta-band,
.theme-portal-v2 .side-cta {
  background: var(--portal-primary);
}

.theme-portal-v2 .cta-band h2,
.theme-portal-v2 .side-cta-title {
  color: var(--portal-surface);
}

.theme-portal-v2 .cta-band p,
.theme-portal-v2 .side-cta-text {
  color: color-mix(in oklch, var(--portal-surface) 85%, transparent);
}

.theme-portal-v2 .cta-band .cta-btn,
.theme-portal-v2 .side-cta .cta-btn {
  background: var(--portal-surface);
  color: var(--portal-primary-deep);
}

.theme-portal-v2 .cta-band .cta-btn:hover,
.theme-portal-v2 .side-cta .cta-btn:hover {
  background: color-mix(in oklch, var(--portal-surface) 92%, var(--portal-primary-wash));
}

.theme-portal-v2 .cta-band .cta-btn:focus-visible,
.theme-portal-v2 .side-cta .cta-btn:focus-visible {
  outline: 2px solid var(--portal-surface);
  outline-offset: 2px;
}

/* ================= mobile ================= */
@media (max-width: 640px) {
  .theme-portal-v2 .featured-overlay {
    padding-right: 46%;
  }
  .theme-portal-v2 .featured-title {
    font-size: var(--text-base);
  }
}

/* ================= page width: PC最大幅1360px (2026-07-24) ================= */
@media (min-width: 56.25rem) {
  .theme-portal-v2 main.hub {
    max-width: var(--page-max);
  }
}
