/* 日程データカード（components/shikenCta.ts・2026-09-30）。記事から公務員試験日程ポータル /shiken/ へ送る目立つリンク。
   移植ページ（Tailwind なし・記事によっては Tailwind CDN の preflight や .seo-article a の色指定がある）と、
   ハブ（Tailwind・@theme トークン）の両方で同じこの1本を読む（移植は <link>、ハブは components/ShikenDataCard.tsx が import）。
   - クラス名はすべて ayk-scta で始め、セレクタは必ず .ayk-scta-w の中に閉じる（ほかの見た目に一切影響させない）。
     記事側の「.seo-article a { color; text-decoration }」（詳細度 0,1,1）に負けないよう「.ayk-scta-w a.ayk-scta」（0,2,1）以上で書く。
   - 色は @theme のトークン（--color-hub-*）を読む。移植ページにはトークンが無いので、var() の既定値に同じ値を写してある。
   - 文字は 14px 以上。タップ領域は 44px 以上。動きは prefers-reduced-motion で止める。フォーカスリングは消さない。 */

.ayk-scta-w {
  --scta-ink: var(--color-hub-ink, #060b10);
  --scta-teal: var(--color-hub-teal, #2cb2a7);
  --scta-bright: var(--color-hub-teal-bright, #5ed6c9);
  --scta-deep: var(--color-hub-teal-deep, #0e7d75);
  --scta-coral: var(--color-hub-coral, #f87060);
  --scta-white: var(--color-white, #fff);
  --scta-bg: color-mix(in oklab, var(--scta-ink) 86%, var(--scta-deep));
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 28px 0;
  padding: 0;
  text-align: left;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: normal;
  container-type: inline-size;
}
.ayk-scta-w *,
.ayk-scta-w *::before,
.ayk-scta-w *::after {
  box-sizing: border-box;
}
/* compact の束（キーを並べたもの）。幅があれば2列 */
.ayk-scta-w .ayk-scta-g {
  display: grid;
  gap: 10px;
}
@container (min-width: 720px) {
  .ayk-scta-w .ayk-scta-g:has(> :nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ───────── 共通（カード全体が1つのリンク） ───────── */
.ayk-scta-w a.ayk-scta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  margin: 0;
  color: var(--scta-white);
  text-decoration: none;
  font-weight: 400;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--scta-bright) 22%, transparent), transparent 58%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in oklab, var(--scta-teal) 16%, transparent), transparent 62%),
    linear-gradient(160deg, var(--scta-bg), var(--scta-ink) 72%);
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--scta-bright) 30%, transparent),
    0 14px 32px -16px color-mix(in oklab, var(--scta-ink) 75%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.ayk-scta-w a.ayk-scta:hover,
.ayk-scta-w a.ayk-scta:focus-visible {
  color: var(--scta-white);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--scta-bright) 60%, transparent),
    0 22px 40px -18px color-mix(in oklab, var(--scta-teal) 55%, transparent),
    0 0 0 4px color-mix(in oklab, var(--scta-bright) 14%, transparent);
}
.ayk-scta-w a.ayk-scta:focus-visible {
  outline: 3px solid var(--scta-bright);
  outline-offset: 3px;
}
/* 上の縁の細いグラデーション */
.ayk-scta-w a.ayk-scta::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--scta-bright), var(--scta-teal) 45%, var(--scta-coral));
}
/* 光が横切る（シャイン） */
.ayk-scta-w a.ayk-scta::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 42%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, color-mix(in oklab, var(--scta-white) 16%, transparent) 50%, transparent);
  transform: translateX(-160%) skewX(-18deg);
  transition: transform 0.9s ease;
}
.ayk-scta-w a.ayk-scta:hover::after,
.ayk-scta-w a.ayk-scta:focus-visible::after {
  transform: translateX(330%) skewX(-18deg);
}
/* 薄い格子の模様（右上ほど濃い） */
.ayk-scta-w .ayk-scta__fx {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: block;
  pointer-events: none;
  background-image:
    linear-gradient(color-mix(in oklab, var(--scta-bright) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--scta-bright) 9%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(90% 90% at 100% 0%, #000, transparent 70%);
  mask-image: radial-gradient(90% 90% at 100% 0%, #000, transparent 70%);
}
.ayk-scta-w .ayk-scta svg {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  max-width: none;
}

/* ───────── large ───────── */
.ayk-scta-w a.ayk-scta--lg {
  padding: 22px 18px 18px;
  border-radius: 18px;
}
.ayk-scta-w .ayk-scta__in {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ayk-scta-w .ayk-scta__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.ayk-scta-w .ayk-scta__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--scta-bright);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.ayk-scta-w .ayk-scta__cy {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid color-mix(in oklab, var(--scta-coral) 60%, transparent);
  border-radius: 999px;
  color: var(--scta-coral);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.ayk-scta-w .ayk-scta__title {
  display: block;
  color: var(--scta-white);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.ayk-scta-w .ayk-scta__nb {
  display: inline-block;
}
.ayk-scta-w .ayk-scta__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 22px;
}
.ayk-scta-w .ayk-scta__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.ayk-scta-w .ayk-scta__num {
  color: var(--scta-bright);
  font-size: clamp(32px, 10cqi, 48px);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  text-shadow: 0 0 24px color-mix(in oklab, var(--scta-bright) 45%, transparent);
}
.ayk-scta-w .ayk-scta__unit {
  color: color-mix(in oklab, var(--scta-white) 80%, transparent);
  font-size: 15px;
  font-weight: 700;
}
.ayk-scta-w .ayk-scta__rows {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: color-mix(in oklab, var(--scta-white) 6%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--scta-white) 10%, transparent);
}
.ayk-scta-w .ayk-scta__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
}
.ayk-scta-w .ayk-scta__row + .ayk-scta__row {
  border-top: 1px solid color-mix(in oklab, var(--scta-white) 9%, transparent);
}
.ayk-scta-w .ayk-scta__d {
  flex: none;
  min-width: 5.4em;
  color: var(--scta-bright);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ayk-scta-w .ayk-scta__rb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
}
.ayk-scta-w .ayk-scta__o {
  color: var(--scta-white);
  font-size: 15px;
  font-weight: 700;
}
.ayk-scta-w .ayk-scta__s {
  color: color-mix(in oklab, var(--scta-white) 78%, transparent);
  font-size: 14px;
}
.ayk-scta-w .ayk-scta__chip {
  display: inline-block;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--scta-bright) 16%, transparent);
  color: var(--scta-bright);
  font-size: 14px;
  font-weight: 700;
}
.ayk-scta-w .ayk-scta__dl {
  color: color-mix(in oklab, var(--scta-white) 62%, transparent);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ayk-scta-w .ayk-scta__foot {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 10px;
}
.ayk-scta-w .ayk-scta__note {
  color: color-mix(in oklab, var(--scta-white) 60%, transparent);
  font-size: 14px;
}
.ayk-scta-w .ayk-scta__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--scta-bright);
  color: var(--scta-ink);
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 24px -10px color-mix(in oklab, var(--scta-bright) 80%, transparent);
  transition: background-color 0.2s ease;
}
.ayk-scta-w a.ayk-scta:hover .ayk-scta__pill {
  background: var(--scta-white);
}
.ayk-scta-w .ayk-scta__ar {
  transition: transform 0.25s ease;
}
.ayk-scta-w a.ayk-scta:hover .ayk-scta__ar,
.ayk-scta-w a.ayk-scta:focus-visible .ayk-scta__ar {
  transform: translateX(3px);
}

@container (min-width: 560px) {
  /* 年から書く日付があるときは日付の列を広げて団体名をそろえる（狭い幅では広げない） */
  .ayk-scta-w .ayk-scta__rows--y .ayk-scta__d {
    min-width: 7.4em;
  }
  .ayk-scta-w a.ayk-scta--lg {
    padding: 26px 28px 24px;
    border-radius: 20px;
  }
  .ayk-scta-w .ayk-scta__title {
    font-size: 24px;
  }
  .ayk-scta-w .ayk-scta__foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .ayk-scta-w .ayk-scta__rb {
    flex-wrap: nowrap;
  }
  .ayk-scta-w .ayk-scta__s {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ayk-scta-w .ayk-scta__o,
  .ayk-scta-w .ayk-scta__chip,
  .ayk-scta-w .ayk-scta__dl {
    flex: none;
    white-space: nowrap;
  }
}

/* 広い場所（ハブのトップなど）では、左に見出しと数字・右に抜粋の2列 */
@container (min-width: 900px) {
  .ayk-scta-w a.ayk-scta--lg {
    padding: 30px 36px 28px;
  }
  .ayk-scta-w .ayk-scta__in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas:
      "top top"
      "title rows"
      "stats rows"
      "foot foot";
    grid-template-rows: auto auto 1fr auto;
    gap: 14px 40px;
  }
  .ayk-scta-w .ayk-scta__top { grid-area: top; }
  .ayk-scta-w .ayk-scta__title { grid-area: title; font-size: 28px; }
  .ayk-scta-w .ayk-scta__stats { grid-area: stats; align-content: start; }
  .ayk-scta-w .ayk-scta__rows { grid-area: rows; align-self: start; }
  .ayk-scta-w .ayk-scta__foot { grid-area: foot; }
}

/* ───────── compact（濃紺の1行） ───────── */
.ayk-scta-w a.ayk-scta--sm {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px 10px 12px;
  border-radius: 14px;
}
.ayk-scta-w .ayk-scta__sq {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--scta-teal), var(--scta-deep));
  color: var(--scta-white);
  box-shadow: 0 0 18px -4px color-mix(in oklab, var(--scta-bright) 70%, transparent);
}
.ayk-scta-w .ayk-scta__sb {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.ayk-scta-w .ayk-scta__st {
  color: var(--scta-white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.ayk-scta-w .ayk-scta__sc {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  color: color-mix(in oklab, var(--scta-white) 65%, transparent);
  font-size: 14px;
}
.ayk-scta-w .ayk-scta__sn {
  color: var(--scta-bright);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ayk-scta-w .ayk-scta__go {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--scta-bright) 16%, transparent);
  color: var(--scta-bright);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.ayk-scta-w a.ayk-scta--sm:hover .ayk-scta__go {
  background: var(--scta-bright);
  color: var(--scta-ink);
}
.ayk-scta-w a.ayk-scta--sm:hover,
.ayk-scta-w a.ayk-scta--sm:focus-visible {
  transform: translateY(-2px);
}

/* ───────── 動きを減らす設定 ───────── */
@media (prefers-reduced-motion: reduce) {
  .ayk-scta-w a.ayk-scta,
  .ayk-scta-w a.ayk-scta::after,
  .ayk-scta-w .ayk-scta__ar,
  .ayk-scta-w .ayk-scta__pill,
  .ayk-scta-w .ayk-scta__go {
    transition: none;
  }
  .ayk-scta-w a.ayk-scta:hover,
  .ayk-scta-w a.ayk-scta:focus-visible,
  .ayk-scta-w a.ayk-scta--sm:hover,
  .ayk-scta-w a.ayk-scta--sm:focus-visible,
  .ayk-scta-w a.ayk-scta:hover .ayk-scta__ar,
  .ayk-scta-w a.ayk-scta:focus-visible .ayk-scta__ar {
    transform: none;
  }
  .ayk-scta-w a.ayk-scta::after {
    display: none;
  }
}
