/* Me and the year in review. Stream M. Tokens only; controls are at least
   44 px; a status or a chart segment is never colour alone (it has a count and
   a pattern). Pills (bd-pill, bd-st-*) come from board.css. */

.me { display: grid; gap: 22px; max-width: 820px; margin: 0 auto; min-width: 0; }
.me h2 { margin: 0; }
.me h3 { margin: 0 0 10px; font-size: 1.05rem; }
.me-small { font-size: .85rem; }
.me-hint { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }

.me-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.me-handle { margin: 0; color: var(--muted); font-size: .9rem; }

.me-btn, a.me-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--accent); text-decoration: none; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.me-btn:hover { border-color: var(--accent); }
.me-btn:disabled { opacity: .5; cursor: not-allowed; }
.me-back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; justify-self: start; }
.me-yearnav { display: flex; flex-wrap: wrap; gap: 8px; }

.me-section { display: grid; gap: 4px; min-width: 0; }

/* Talks and Settings: two rows, each a whole-width 48 px target. */
.me-links { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.me-links li + li { border-top: 1px solid var(--line); }
.me-link { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; color: var(--text); text-decoration: none; font-weight: 600; }
.me-link:hover { background: var(--accent-tint); }
.me-link span[aria-hidden] { color: var(--muted); font-size: 1.3rem; line-height: 1; }

.me-next { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.me-next p { margin: 0; }
.me-next .me-actions { margin: 10px 0 6px; }

/* --- Lists: upcoming and history ----------------------------------------------------- */
.me-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.me-item {
  display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0;
}
.me-item-main { min-width: 0; display: grid; gap: 2px; }
.me-item-title { display: flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.me-meta { margin: 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.me-item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 640px) {
  .me-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .me-item-actions { justify-content: flex-end; }
}

/* --- Tiles ---------------------------------------------------------------------------- */
.me-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.me-tile { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.me-tile p { margin: 0; }
.me-tile-label { color: var(--muted); font-size: .8rem; }
.me-tile-value { font-size: 1.6rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.me-tile-note { color: var(--muted); font-size: .8rem; margin-top: 4px !important; }

/* --- Charts: bars drawn with spans ------------------------------------------------------- */
.me-charts { display: grid; gap: 22px; margin-top: 14px; }
.me-chart { min-width: 0; }
.me-chart h3 { margin-bottom: 6px; }

.me-years { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.me-year { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 2px 10px; align-items: center; }
.me-year-label { font-size: .9rem; }
.me-year-track { display: block; min-width: 0; }
.me-stack { display: flex; height: 30px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.me-year-text { grid-column: 2; color: var(--muted); font-size: .8rem; }

.me-seg { display: grid; place-items: center; min-width: 26px; font-size: .78rem; font-weight: 600; }
/* The count sits on a plain chip so it reads over the hatching. */
.me-seg-n { padding: 0 6px; border-radius: 9px; background: var(--surface); color: var(--text); line-height: 1.5; }
.me-seg-accepted { background: var(--pin-accepted); }
.me-seg-pending { background: var(--pin-submitted); }
.me-seg-waitlisted { background: repeating-linear-gradient(135deg, var(--soon) 0 5px, color-mix(in srgb, var(--soon) 55%, var(--surface)) 5px 10px); }
.me-seg-rejected { background: repeating-linear-gradient(90deg, var(--urgent) 0 3px, color-mix(in srgb, var(--urgent) 60%, var(--surface)) 3px 6px); }
.me-seg-withdrawn { background: var(--pin-saved); }

.me-legend { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); }
.me-legend li { display: inline-flex; align-items: center; gap: 6px; }
.me-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

.me-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.me-bar { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.me-bar-label { overflow-wrap: anywhere; font-size: .9rem; }
.me-bar-track { display: block; height: 14px; border-radius: 7px; background: var(--ground); border: 1px solid var(--line); overflow: hidden; }
.me-bar-fill { display: block; height: 100%; background: var(--accent); }
.me-bar-num { font-size: .85rem; color: var(--muted); font-family: var(--font-mono); font-weight: 500; min-width: 1.5rem; text-align: right; }

/* --- Year in review ------------------------------------------------------------------------ */
.me-rcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.me-rcard { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.me-rcard p { margin: 0; }
.me-rcard-value { font-size: 2.2rem; font-weight: 600; line-height: 1.15; color: var(--accent); overflow-wrap: anywhere; }
.me-rcard-label { font-weight: 600; margin-top: 4px !important; }

/* --- Public page controls ------------------------------------------------------------------ */
.me-public { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.me-sub-h { margin: 14px 0 2px; font-size: .95rem; }
.me-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.me-check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--accent); }
.me-check label { flex: 1; min-width: 0; min-height: 44px; padding: 10px 0; cursor: pointer; overflow-wrap: anywhere; }
.me-url { margin: 0; }
.me-url a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; word-break: break-all; }

/* --- Share card dialog --------------------------------------------------------------------------- */
.me-card-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--ground); }
.me-card-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; }
.me-card-status { min-height: 1.4em; margin: 6px 0; }
.me-card-status:empty { display: none; }
.me-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

@media (max-width: 520px) {
  .me-bar { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) auto; gap: 8px; }
  .me-tile-value { font-size: 1.4rem; }
  .me-rcard-value { font-size: 1.9rem; }
}
