/* Best times page (insights.html). Workspace tokens come from workspace.css. */
.insights { min-height: 100%; height: auto; }
.bt-page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 28px 64px; display: flex; flex-direction: column; gap: 18px; }
.bt-controls { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; }
.bt-seg { display: flex; flex-direction: column; gap: 6px; }
.bt-seg-label { font-size: 9px; font-weight: 650; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.bt-seg-row { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 2px; gap: 2px; }
.bt-seg-row button { border: 0; background: transparent; border-radius: 6px; padding: 6px 12px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.bt-seg-row button:hover:not(:disabled) { background: #f0f2eb; }
.bt-seg-row button.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.bt-seg-row button:disabled { opacity: 0.45; cursor: default; }

.bt-hero:empty { display: none; }
.bt-card, .bt-hero { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.bt-card h2 { font-size: 15px; letter-spacing: -0.2px; margin: 0 0 10px; }
.bt-card p { margin: 0 0 8px; }
.bt-note { color: var(--muted); font-size: 12px; }

.bt-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; }
.bt-hero-time { font-size: 26px; font-weight: 620; letter-spacing: -0.8px; margin: 6px 0 2px; }
.bt-hero-lift { color: var(--muted); margin-bottom: 12px; }
.bt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-chips .chip.best { border-color: #86b6ef; background: #eef5fd; }
.bt-chips .chip.test { border-style: dashed; }
.bt-verdict { font-size: 14px; line-height: 1.5; margin: 0 0 10px; }
.bt-hero-side .bt-note { margin: 0 0 6px; }

.bt-card-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.bt-card-head h2 { margin: 0; }
.bt-legend { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.bt-ramp-wrap { display: flex; flex-direction: column; gap: 2px; width: 180px; }
.bt-ramp { height: 10px; border-radius: 3px; }
.bt-ramp-ticks { display: flex; justify-content: space-between; font-size: 10px; }
.bt-leg-key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.bt-hatch { display: inline-block; width: 14px; height: 12px; border-radius: 2px; background: #f0efec repeating-linear-gradient(45deg, rgba(37, 39, 34, 0.28) 0 1px, transparent 1px 4px); }

.bt-scroll { overflow-x: auto; padding-bottom: 4px; }
.bt-grid { display: grid; grid-template-columns: 48px repeat(24, minmax(26px, 1fr)) 58px; gap: 2px; min-width: 780px; }
.bt-corner, .bt-hour, .bt-day { font-size: 10px; color: var(--muted); display: flex; align-items: center; white-space: nowrap; }
.bt-hour { justify-content: flex-start; height: 18px; font-variant-numeric: tabular-nums; }
.bt-hour.bt-any, .bt-day.bt-any { font-weight: 600; justify-content: center; }
.bt-hour.bt-any { padding-left: 6px; }
.bt-day.bt-any { margin-top: 6px; justify-content: flex-start; }
.bt-cell { height: 30px; border: 0; border-radius: 4px; background: #f0efec; padding: 0; cursor: pointer; font-size: 12px; font-weight: 700; color: #252722; position: relative; }
.bt-cell.dark { color: #fff; }
.bt-cell.empty { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.bt-cell.thin { background-image: repeating-linear-gradient(45deg, rgba(37, 39, 34, 0.2) 0 1px, transparent 1px 4px); }
.bt-cell:hover, .bt-cell:focus-visible { outline: 2px solid #252722; outline-offset: 1px; z-index: 1; }
.bt-cell.now { box-shadow: inset 0 0 0 2px #252722; }
.bt-cell.pinned { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 1; }
.bt-cell.pick.test { font-weight: 800; }
.bt-cell.pick.good { font-size: 16px; }
.bt-margin { cursor: default; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 6px; display: flex; align-items: center; justify-content: center; }
.bt-grid > .bt-margin:nth-last-child(-n + 25) { margin: 6px 0 0; }
.bt-foot { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

.bt-cell-detail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.bt-detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.bt-detail-head .btn { margin-left: auto; }
.bt-detail-sum { color: var(--muted); font-size: 12px; }
.bt-posts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.bt-posts li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 2px 12px; }
.bt-posts a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-posts a:hover { text-decoration: underline; }
.bt-post-when { color: var(--muted); font-size: 12px; grid-row: span 2; }
.bt-post-num { color: var(--muted); font-size: 11px; }

.bt-table { margin-top: 14px; }
.bt-table summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.bt-tab { border-collapse: collapse; font-size: 12px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bt-tab th, .bt-tab td { text-align: left; padding: 4px 16px 4px 0; border-bottom: 1px solid var(--line); }
.bt-tab th { color: var(--muted); font-weight: 600; }

.bt-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bt-levers { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.bt-lever { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 46px 64px; align-items: center; gap: 10px; font-size: 12px; }
.bt-lever-track { position: relative; height: 8px; background: #f3f3ef; border-radius: 4px; }
.bt-lever-track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: #c3c2b7; }
.bt-lever-fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.bt-lever-val { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.bt-lever-n { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.bt-tip { position: fixed; z-index: 50; max-width: 280px; background: #252722; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.bt-tip strong { display: block; margin-bottom: 2px; }

@media (max-width: 860px) {
  .bt-page { padding: 16px 16px 48px; }
  .bt-hero, .bt-cards { grid-template-columns: minmax(0, 1fr); }
  .bt-legend { margin-left: 0; }
  .workspace .top { padding: 0 16px; gap: 12px; height: 60px; }
  .workspace .brand .sub, .brand-divider { display: none; }
}
