/* Hero glance card */
.glance table { width: 100%; margin-top: 1rem; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.glance table caption { display: none; }
.glance thead { display: none; }
.glance th, .glance td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--border); font-size: .95rem; vertical-align: top; }
.glance tr:first-child > th, .glance tr:first-child > td { border-top: 0; }
.glance th { color: var(--muted); font-weight: 500; width: 38%; }
.glance .stat__value { font-size: clamp(1.4rem, 3vw, 2rem); word-break: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Split hero: keep text left-aligned and centered against the card */
.hero--split { align-items: center; }
.hero--split .hero__body { text-align: left; align-self: center; min-width: 0; }
.hero--split .hero__body h1 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); overflow-wrap: break-word; }
.hero--split .hero__body .actions { justify-content: flex-start; }

/* Detail-page hero with a glance card: left-aligned text, centered against the card */
.hero:has(.glance) { align-items: center; }
.hero:has(.glance) .hero__body { text-align: left; align-items: flex-start; align-self: center; }
.hero:has(.glance) .hero__body .lede { margin-left: 0; margin-right: auto; }
.hero:has(.glance) .hero__body .actions,
.hero:has(.glance) .hero__body .tags,
.hero:has(.glance) .hero__body .pills,
.hero:has(.glance) .hero__body .meta { justify-content: flex-start; }

/* Inner page hero: left-aligned text, top-aligned with the card */
.hero-text, .hero-text .lede, .hero-text p, .hero-text h1 { text-align: left; }
.hero-text .lede { margin-left: 0; margin-right: auto; max-width: 60ch; }
.hero:has(.hero-text) { align-items: start; }
.hero-text { align-self: start; min-width: 0; }

/* Cards with a link: equal height, link pinned to the bottom, no truncation */
.grid-2, .grid-3, .grid-4, .card-grid, .data-grid { align-items: stretch; }
.card:has(.card-link), .card:has(.card__link), .data-card { display: flex; flex-direction: column; height: 100%; }
.card .card-link, .card .card__link, .data-card__go { margin-top: auto; }
.card:has(.card-link) :is(p, dd, dt, span, div, li, td),
.card:has(.card__link) :is(p, dd, dt, span, div, li, td),
.data-card :is(p, dd, dt, span, div, li, td) {
  white-space: normal; text-overflow: clip; overflow: visible; overflow-wrap: break-word;
}
.card [class*="issuer"], .card [class*="admin"], .data-card [class*="issuer"] {
  white-space: normal; text-overflow: clip; overflow: visible; min-height: 2.8em;
}

/* Findings */
.findings li { margin-bottom: .75rem; }
.findings .tag { margin-right: .4rem; }

/* Planner: skill mix */
.mix-title { margin: 1rem 0 .25rem; font-weight: 600; color: var(--ink); }
.mix-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .75rem; }
.mix-row input, #study-minutes, #study-weeks, #study-days { min-width: 72px; width: 100%; }

/* Planner: weekly timetable strip (signature) */
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 1rem; }
.day { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: .45rem .2rem; text-align: center; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.day b { display: block; font-size: .8rem; color: var(--ink); }
.day.is-on { border-color: var(--brand); box-shadow: inset 0 -4px 0 var(--brand); color: var(--ink); }
.day span { display: block; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .day { font-size: .68rem; padding: .35rem .1rem; } }

/* Market chart */
.chart-card { margin: 0; height: auto; max-height: none; overflow: visible; }
.chart { height: auto; }
.chart-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.5rem; height: auto; overflow: visible; }
.mkt-chart { width: 100%; max-width: 100%; height: auto; aspect-ratio: 300 / 270; max-height: 320px; display: block; }
@media (max-width: 640px) {
  .chart-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; height: auto; overflow: visible; }
  .mkt-chart { max-height: none; height: auto; max-width: 100%; }
}
.mkt-chart .bar--base { fill: var(--border); }
.mkt-chart .bar--fc { fill: var(--brand); }
.mkt-chart .axis { stroke: var(--muted); stroke-width: 1; }
.mkt-chart text { fill: var(--ink); text-anchor: middle; font-family: inherit; }
.mkt-chart .val { font-size: 15px; font-weight: 700; }
.mkt-chart .yr { font-size: 13px; fill: var(--muted); }
.mkt-chart .grp { font-size: 13px; font-weight: 600; }
.chart-card figcaption { margin-top: 1rem; }