.learning-entry {
  display: grid;
  gap: 24px;
  margin: 18px 0 22px;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.learning-entry-head {
  max-width: 980px;
}

.learning-entry-eyebrow,
.course-level {
  color: #7dd3fc;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body[data-theme="light"] .learning-entry-eyebrow,
body[data-theme="light"] .course-level {
  color: #0369a1;
}

.learning-entry h2 {
  margin: .25rem 0 .65rem;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.3;
}

.learning-entry-head > p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.learning-entry-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.learning-entry-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .56rem .84rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  color: var(--fg);
  font-size: .88rem;
  font-weight: 760;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.learning-entry-actions a:hover {
  border-color: rgba(96, 165, 250, .62);
  background: rgba(255, 255, 255, .075);
}

.learning-entry-actions .learning-entry-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.learning-entry-actions .learning-entry-primary:hover {
  border-color: #3b82f6;
  background: #1d4ed8;
}

body[data-theme="light"] .learning-entry-actions a {
  background: #fff;
}

body[data-theme="light"] .learning-entry-actions .learning-entry-primary,
body[data-theme="light"] .learning-entry-actions .learning-entry-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.learning-entry-actions a:focus-visible,
.starter-steps a:focus-visible,
.course-links a:focus-visible {
  outline: 3px solid rgba(96, 165, 250, .72);
  outline-offset: 3px;
}

.learning-entry-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 980px;
  margin: 18px 0 0;
}

.learning-entry-meta div {
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

body[data-theme="light"] .learning-entry-meta div,
body[data-theme="light"] .course-card,
body[data-theme="light"] .starter-steps a {
  background: #fff;
}

.learning-entry-meta dt {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.learning-entry-meta dd {
  margin: 4px 0 0;
  color: var(--fg);
  font-size: .84rem;
  line-height: 1.55;
}

.starter-path {
  padding-top: 22px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 18px;
}

.learning-section-heading {
  display: flex;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.learning-section-heading h3 {
  margin: 3px 0 0;
  font-size: 1.08rem;
}

.course-estimate,
.course-card-top > span:last-child {
  color: var(--muted);
  font-size: .78rem;
}

.starter-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: starter-step;
}

.starter-steps li {
  min-width: 0;
  counter-increment: starter-step;
}

.starter-steps a {
  display: grid;
  gap: 5px;
  height: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.starter-steps a::before {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  content: counter(starter-step);
  font-size: .75rem;
  font-weight: 850;
}

.starter-steps a:hover,
.course-links a:hover {
  border-color: rgba(96, 165, 250, .62);
  background: rgba(37, 99, 235, .1);
}

.starter-steps strong {
  font-size: .9rem;
}

.starter-steps span {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.course-heading {
  margin: 4px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

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

.course-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

.course-card-top {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.course-card h3 {
  margin: 8px 0 9px;
  font-size: .98rem;
}

.course-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.course-card p strong {
  color: var(--fg);
}

.course-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.course-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 34px;
  padding: .25rem .48rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: #93c5fd;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

body[data-theme="light"] .course-links a {
  color: #1d4ed8;
}

.a2a-guide {
  margin: 18px 0 22px;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.a2a-guide-head {
  display: block;
}

.a2a-guide-copy {
  max-width: 980px;
}

.a2a-guide-head h2 {
  max-width: 900px;
  margin: .25rem 0 .7rem;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.3;
}

.a2a-guide-head p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.a2a-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #7dd3fc;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

body[data-theme="light"] .a2a-eyebrow {
  color: #0369a1;
}

.a2a-source-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.a2a-source-label {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.a2a-source-links a {
  display: inline-flex;
  align-items: center;
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  text-decoration: none;
  font-size: .85rem;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.a2a-source-links a:hover {
  border-color: rgba(96, 165, 250, .62);
  background: rgba(37, 99, 235, .12);
  color: #dbeafe;
}

.a2a-source-links a:focus-visible,
.a2a-guide-actions a:focus-visible,
.a2a-scope-note summary:focus-visible {
  outline: 3px solid rgba(96, 165, 250, .72);
  outline-offset: 3px;
}

body[data-theme="light"] .a2a-source-links a {
  background: #f8fafc;
}

body[data-theme="light"] .a2a-source-links a:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

.a2a-benefit-title {
  margin: 20px 0 9px;
  font-size: .92rem;
}

.a2a-guide-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 980px;
  margin: 0;
  padding: 0;
  counter-reset: a2a-benefit;
  list-style: none;
}

.a2a-guide-benefits li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
  color: var(--fg);
  font-size: .85rem;
  line-height: 1.55;
  counter-increment: a2a-benefit;
}

.a2a-guide-benefits li::before {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .2);
  color: #bfdbfe;
  content: counter(a2a-benefit);
  font-size: .78rem;
  font-weight: 850;
}

body[data-theme="light"] .a2a-guide-benefits li {
  background: #fff;
}

body[data-theme="light"] .a2a-guide-benefits li::before {
  background: #dbeafe;
  color: #1d4ed8;
}

.a2a-guide-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.a2a-guide-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .52rem .78rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  color: var(--fg);
  font-size: .86rem;
  font-weight: 720;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.a2a-guide-actions a:hover {
  border-color: rgba(96, 165, 250, .62);
  background: rgba(255, 255, 255, .075);
}

.a2a-guide-actions .a2a-primary-action {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.a2a-guide-actions .a2a-primary-action:hover {
  border-color: #3b82f6;
  background: #1d4ed8;
}

body[data-theme="light"] .a2a-guide-actions a {
  background: #fff;
}

body[data-theme="light"] .a2a-guide-actions .a2a-primary-action,
body[data-theme="light"] .a2a-guide-actions .a2a-primary-action:hover {
  background: #1d4ed8;
  color: #fff;
}

.a2a-scope-note {
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, .4);
  color: var(--muted);
  line-height: 1.7;
}

.a2a-scope-note summary {
  padding: 12px 15px;
  color: var(--fg);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 750;
}

.a2a-scope-note[open] summary {
  border-bottom: 1px solid var(--border);
}

.a2a-scope-body {
  padding: 12px 15px 14px;
}

.a2a-scope-body p {
  margin: 0 0 8px;
}

.a2a-scope-body ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.2rem;
}

body[data-theme="light"] .a2a-scope-note {
  background: #f8fafc;
}

.a2a-route-label {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 20px 0 10px;
  scroll-margin-top: 18px;
}

.a2a-route-label h3 {
  margin: 0;
  font-size: 1rem;
}

.a2a-route-label span {
  color: var(--muted);
  font-size: .82rem;
}

.a2a-route {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
}

.a2a-route-stage {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

body[data-theme="light"] .a2a-route-stage {
  background: #fff;
}

.a2a-route-number {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 850;
  font-size: .82rem;
}

.a2a-route-body {
  min-width: 0;
}

.a2a-route-body h3 {
  margin: 1px 0 7px;
  font-size: .92rem;
}

.a2a-route-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.a2a-route-links a {
  color: #93c5fd;
  text-decoration: none;
  font-size: .76rem;
}

.a2a-route-links a:hover {
  text-decoration: underline;
}

.a2a-route-links .a2a-route-pending {
  color: var(--muted);
  font-size: .76rem;
}

body[data-theme="light"] .a2a-route-links a {
  color: #1d4ed8;
}

.a2a-legend {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0 10px;
}

.a2a-map-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  padding: .2rem .48rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.a2a-map-badge.a2a-direct {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, .35);
}

.a2a-map-badge.draft-direct {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, .38);
}

.a2a-map-badge.draft-normative {
  color: #f0abfc;
  border-color: rgba(232, 121, 249, .4);
}

.a2a-map-badge.draft-informative {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, .38);
}

.a2a-map-badge.quiz-link {
  color: #86efac;
  border-color: rgba(74, 222, 128, .35);
}

.a2a-map-badge.quiz-pending {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, .28);
}

.a2a-map-badge.rfc-source {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, .3);
}

.a2a-map-badge.related-quiz {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, .35);
}

.a2a-map-badge.design {
  color: #f0abfc;
  border-color: rgba(232, 121, 249, .32);
}

.a2a-map-badge.background {
  color: #cbd5e1;
}

body[data-theme="light"] .a2a-map-badge {
  background: #fff;
}

body[data-theme="light"] .a2a-map-badge.a2a-direct {
  color: #0369a1;
}

body[data-theme="light"] .a2a-map-badge.draft-direct {
  color: #6d28d9;
}

body[data-theme="light"] .a2a-map-badge.draft-normative {
  color: #a21caf;
}

body[data-theme="light"] .a2a-map-badge.draft-informative {
  color: #6d28d9;
}

body[data-theme="light"] .a2a-map-badge.quiz-link {
  color: #15803d;
}

body[data-theme="light"] .a2a-map-badge.quiz-pending {
  color: #64748b;
}

body[data-theme="light"] .a2a-map-badge.rfc-source {
  color: #1d4ed8;
}

body[data-theme="light"] .a2a-map-badge.related-quiz {
  color: #a16207;
}

body[data-theme="light"] .a2a-map-badge.design {
  color: #a21caf;
}

.a2a-rfc-groups {
  display: grid;
  gap: 10px;
}

.a2a-rfc-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .018);
}

body[data-theme="light"] .a2a-rfc-group {
  background: #fff;
}

.a2a-rfc-group summary {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px;
  cursor: pointer;
  list-style-position: inside;
}

.a2a-rfc-group summary:hover {
  background: rgba(255, 255, 255, .025);
}

body[data-theme="light"] .a2a-rfc-group summary:hover {
  background: #f8fafc;
}

.a2a-group-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.a2a-group-copy strong {
  font-size: .98rem;
}

.a2a-group-copy > span {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.a2a-group-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .75rem;
}

.a2a-rfc-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.a2a-rfc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 13px 15px;
  border-top: 1px solid rgba(148, 163, 184, .13);
}

.a2a-rfc-item:first-child {
  border-top: 0;
}

.a2a-rfc-title {
  display: grid;
  gap: 9px;
  align-items: baseline;
  grid-template-columns: max-content minmax(0, 1fr);
}

.a2a-rfc-title .rfc-number {
  color: var(--muted);
  font-weight: 850;
}

.a2a-rfc-title a.rfc-number {
  color: #93c5fd;
  text-decoration: none;
}

body[data-theme="light"] .a2a-rfc-title a.rfc-number {
  color: #1d4ed8;
}

.a2a-rfc-title span {
  font-weight: 680;
  line-height: 1.28;
  min-width: 0;
  overflow-wrap: anywhere;
}

.a2a-rfc-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.6;
}

.a2a-rfc-side {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
}

/* Keep the landing page focused: one practical check first, deeper material on demand. */
.learning-entry > .starter-path,
.learning-entry > .course-heading,
.learning-entry > .course-grid {
  display: none;
}

.entry-facts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.entry-facts li {
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 9px 12px;
  border-left: 2px solid #3b82f6;
}

.entry-facts strong {
  color: var(--fg);
  font-size: .86rem;
}

.entry-facts span {
  color: var(--muted);
  font-size: .76rem;
}

.decision-points {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.decision-points span {
  padding: .3rem .58rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: .76rem;
}

body[data-theme="light"] .decision-points span {
  background: #f8fafc;
}

.learning-paths {
  margin: 30px 0 22px;
}

.section-intro {
  max-width: 780px;
  margin-bottom: 13px;
}

.section-intro h2 {
  margin: 4px 0 7px;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.65;
}

.path-list {
  display: grid;
  gap: 9px;
}

.path-disclosure,
.hub-disclosure {
  padding: 0;
  overflow: hidden;
}

.path-disclosure > summary,
.hub-disclosure > summary {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
  transition: background-color 180ms ease;
}

.path-disclosure > summary::-webkit-details-marker,
.hub-disclosure > summary::-webkit-details-marker {
  display: none;
}

.path-disclosure > summary:hover,
.hub-disclosure > summary:hover {
  background: rgba(255, 255, 255, .035);
}

body[data-theme="light"] .path-disclosure > summary:hover,
body[data-theme="light"] .hub-disclosure > summary:hover {
  background: #f8fafc;
}

.path-disclosure > summary > span:first-child,
.hub-disclosure > summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.path-disclosure summary strong,
.hub-disclosure summary strong {
  color: var(--fg);
  font-size: .95rem;
  line-height: 1.35;
}

.path-disclosure summary small,
.hub-disclosure summary small {
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.45;
}

.path-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.path-body {
  padding: 13px 17px 16px;
  border-top: 1px solid var(--border);
}

.path-body p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.6;
}

.path-body .course-links a {
  min-width: 0;
}

.hub-disclosure {
  margin: 12px 0;
}

.hub-disclosure-body {
  padding: 18px;
  border-top: 1px solid var(--border);
}

.hub-disclosure .a2a-guide {
  margin: 0;
  padding: 0;
}

.disclosure-action {
  flex: 0 0 auto;
  min-width: 64px;
  padding: .35rem .58rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #93c5fd;
  font-size: 0;
  font-weight: 760;
  text-align: center;
}

.disclosure-action::after {
  content: "Open";
  font-size: .78rem;
}

html[lang="ja"] .disclosure-action::after {
  content: "開く";
}

.hub-disclosure[open] > summary .disclosure-action::after {
  content: "Close";
}

html[lang="ja"] .hub-disclosure[open] > summary .disclosure-action::after {
  content: "閉じる";
}

body[data-theme="light"] .disclosure-action {
  color: #1d4ed8;
}

.path-disclosure > summary:focus-visible,
.hub-disclosure > summary:focus-visible {
  outline: 3px solid rgba(96, 165, 250, .72);
  outline-offset: -3px;
}

.catalog-controls {
  margin-bottom: 12px;
}

@media (min-width: 720px) {
  .a2a-route {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .learning-entry-meta,
  .course-grid,
  .starter-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .learning-entry-actions a {
    width: 100%;
  }

  .a2a-guide-benefits {
    grid-template-columns: minmax(0, 1fr);
  }

  .a2a-guide-actions a {
    justify-content: center;
    width: 100%;
  }

  .a2a-source-label {
    flex-basis: 100%;
  }

  .a2a-rfc-title {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-facts li {
    flex: 1 1 120px;
  }

  .path-disclosure > summary,
  .hub-disclosure > summary {
    align-items: flex-start;
  }

  .path-time {
    white-space: normal;
    text-align: right;
  }

  .hub-disclosure-body {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .learning-entry-actions a,
  .starter-steps a,
  .course-links a,
  .a2a-source-links a,
  .a2a-guide-actions a,
  .path-disclosure > summary,
  .hub-disclosure > summary {
    transition: none;
  }
}

@media (min-width: 720px) and (max-width: 959px) {
  .starter-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 880px) {
  .a2a-rfc-item {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    align-items: start;
    column-gap: 18px;
  }

  .a2a-rfc-side {
    justify-content: flex-end;
  }
}

@media (min-width: 1080px) {
  .a2a-route {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
