/* The Studio KPI strip uses the shared dl.kpi-strip grid (four across, two below 900 px, one below 420 px). */

.personal-empty-state { padding:20px; background:var(--surface-muted); border:1px solid var(--border-soft); border-radius:8px; color:var(--muted); font-size:var(--font-body-size); line-height:1.6; }
.personal-studio .forecast-card { margin-top:20px; padding-top:18px; border-top:1px solid var(--border); }

/* Keep disclosure markers inside the card and narrow personal tables readable. */
#me-latest-reports > summary { padding:14px 24px; list-style-position:inside; }
/* Narrow screens scroll the table sideways inside its card instead of breaking words mid-word. */
.personal-values table { min-width:520px; table-layout:auto; }
.personal-values th { white-space:nowrap; letter-spacing:.04em; }
.personal-values td { overflow-wrap:break-word; }
.personal-values th:first-child { width:40%; }
.personal-values td.numeric { white-space:nowrap; font-variant-numeric:tabular-nums; }
.personal-agent-environment { display:block; color:var(--muted); margin-top:4px; line-height:1.4; }
@media(max-width:760px) {
  #me-latest-reports > summary { padding-inline:16px; }
  .personal-values th,.personal-values td { padding:8px 6px; }
}

.personal-date-range { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:12px 0; }
.personal-date-range[hidden] { display:none; }
.personal-date-range label { display:grid; gap:4px; min-width:0; }
.personal-date-range input { max-width:100%; }

#me-history-report-details h3 { padding:0 14px; font-size:var(--font-body-size); }
.privacy-footer details > span { display:block; margin-top:8px; }

/* My usage redesign: view tabs (Overview, then one per product); Overview product cards open a product's tab;
   Cowork panel with limit, daily changes and side cards. */
/* Every tile has the same five rows (name and "Data through", value, 7-day chart, context, credits). The rows
   are a subgrid of the tile row, so they line up across tiles and the tiles share one height. */
.product-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:20px; }
.product-tile { display:grid; grid-row:span 5; grid-template-rows:subgrid; row-gap:8px; align-content:start; min-width:0; margin:1px; padding:16px 20px; border:1px solid var(--border); border-radius:8px; color:var(--strong); background:var(--surface); font:inherit; text-align:left; cursor:pointer; }
.product-tile:hover { border-color:var(--border-strong); }
.product-tile.is-selected { margin:0; border:2px solid var(--accent); box-shadow:0 0 0 3px var(--tint); }
.product-tile-head { display:flex; align-items:center; gap:12px; min-width:0; }
.product-tile-names { display:flex; flex-direction:column; gap:2px; min-width:0; }
.product-tile-icon { display:inline-flex; flex:none; align-items:center; justify-content:center; width:40px; height:40px; border-radius:8px; color:var(--text); background:var(--surface-muted); }
.product-tile-icon svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.product-tile-name { color:var(--strong); font-size:18px; font-weight:600; line-height:24px; }
.product-tile-through { color:var(--text); font-size:13px; line-height:18px; }
.product-tile-figure { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; }
.product-tile-big { font-size:26px; font-weight:700; line-height:32px; letter-spacing:-.02em; }
.product-tile-unit { color:var(--text); font-size:16px; line-height:24px; }
.product-tile-spark { display:block; height:28px; }
.product-tile-spark .daily-chart-empty { font-size:13px; line-height:28px; }
.product-tile-sub { color:var(--text); font-size:14px; line-height:20px; }
.product-tile-est { color:var(--strong); font-size:14px; font-weight:500; line-height:20px; }
.me-product-panel[hidden] { display:none !important; }
/* View tabs: a segmented strip; narrow screens show short names and scroll sideways with the focus ring inside. */
.me-views { display:flex; justify-self:start; gap:4px; max-width:100%; padding:4px; overflow-x:auto; border-radius:10px; background:var(--surface-muted); }
.me-view-tab { flex:none; height:44px; padding:0 18px; border:0; border-radius:8px; color:var(--text); background:transparent; font:inherit; font-size:15px; font-weight:500; white-space:nowrap; cursor:pointer; }
.me-view-tab:hover { color:var(--strong); }
.me-view-tab[aria-selected="true"] { color:var(--strong); background:var(--surface); box-shadow:0 1px 2px rgb(0 0 0 / 14%); font-weight:600; }
.me-view-tab:focus-visible { outline:2px solid var(--focus-ring); outline-offset:-2px; }
.me-view-short { display:none; }
/* Overview: summary with the total and the Cowork limit, product cards, last 7 days, then two side cards. */
.me-overview { display:grid; gap:20px; min-width:0; }
.overview-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr)); gap:24px 48px; align-items:start; padding:24px 28px; }
.overview-total, .overview-limit { display:flex; flex-direction:column; gap:6px; min-width:0; }
.overview-limit { gap:10px; }
.overview-label { color:var(--muted); font-size:13px; font-weight:600; line-height:18px; }
.overview-big { color:var(--strong); font-size:40px; font-weight:700; line-height:1.1; letter-spacing:-.02em; }
.overview-products, .overview-left, .overview-limit-note, .overview-forecast-note { color:var(--text); font-size:14px; line-height:20px; }
.overview-limit-note.is-warning { color:var(--strong); font-weight:600; }
.overview-forecast { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; margin:6px 0 0; }
.overview-forecast-value { color:var(--strong); font-size:18px; font-weight:700; line-height:24px; }
.overview-limit-figure { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 12px; }
.overview-limit-figure strong { color:var(--strong); font-size:22px; font-weight:700; line-height:28px; }
.overview-limit-figure span { color:var(--text); font-size:15px; }
/* Cards are buttons with the tile rows plus "View <product>"; one tab stop each. */
.product-card { grid-row:span 6; }
.product-card:hover { border-color:var(--accent); }
.product-card:focus-visible { border-color:var(--accent); outline:2px solid var(--accent-text); outline-offset:2px; }
.product-card-link { display:inline-flex; align-items:center; gap:6px; min-height:24px; color:var(--accent-text); font-size:15px; font-weight:600; line-height:20px; }
.product-card-link svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.product-card:hover .product-card-link span { text-decoration:underline; }
.overview-pair { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr)); gap:20px; align-items:start; }
.overview-know { --daily-studio:var(--brand-mid-gray); display:grid; gap:12px; margin:0; padding:0; list-style:none; }
.overview-know li { display:flex; gap:12px; color:var(--text); font-size:15px; line-height:22px; }
.overview-know .daily-chart-dot { width:8px; height:8px; margin-top:7px; border-radius:100px; }
.overview-know strong { color:var(--strong); font-weight:600; }
.overview-know-note { margin:0; color:var(--text); font-size:15px; line-height:22px; }
.overview-credits .primary-button { justify-self:start; }
.me-cowork-layout { display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:20px; align-items:start; }
.me-main, .me-side { display:grid; gap:20px; min-width:0; }
.me-cowork-layout > #me-latest-reports { grid-column:1 / -1; }
.limit-card, .daily-card, .side-card { display:grid; gap:16px; padding:20px 24px; }
.limit-header { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:16px; }
.limit-titles { display:grid; gap:4px; }
.limit-context, .limit-note { color:var(--text); font-size:14px; line-height:20px; }
.limit-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.limit-figure { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; }
.limit-cost { font-size:34px; font-weight:700; line-height:42px; letter-spacing:-.02em; }
.limit-cost-of { color:var(--text); font-size:16px; line-height:24px; }
.limit-credits { margin-left:auto; color:var(--text); font-size:16px; line-height:24px; }
.limit-meter { position:relative; height:12px; overflow:hidden; border-radius:100px; background:var(--surface-muted); }
.limit-meter-used, .limit-meter-forecast { position:absolute; top:0; bottom:0; left:0; border-radius:100px; }
.limit-meter-used { background:var(--chart-cowork); }
.limit-meter-forecast { background:repeating-linear-gradient(135deg,var(--chart-cowork) 0 2px,transparent 2px 6px); opacity:.7; }
.limit-legend { display:flex; flex-wrap:wrap; gap:8px 24px; color:var(--text); font-size:14px; line-height:20px; }
.limit-legend-item { display:inline-flex; align-items:center; gap:8px; }
.limit-legend-limit { margin-left:auto; }
.limit-swatch { width:12px; height:12px; border-radius:3px; }
.limit-swatch.is-used { background:var(--chart-cowork); }
.limit-swatch.is-forecast { border:1px solid var(--chart-cowork); background:repeating-linear-gradient(135deg,var(--chart-cowork) 0 2px,transparent 2px 5px); }
.tier-note { margin:0; color:var(--text); font-size:14px; line-height:20px; }
.tier-list { display:grid; margin:0; padding:0; list-style:none; }
.tier-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-top:1px solid var(--border); }
.tier-row:first-child { border-top:0; padding-top:0; }
.tier-copy { display:grid; gap:2px; font-size:13px; color:var(--text); }
.tier-copy strong { color:var(--strong); font-size:15px; }
.about-list { display:grid; gap:10px; margin:0; }
.about-list > div { display:grid; grid-template-columns:120px minmax(0,1fr); gap:12px; font-size:14px; line-height:20px; }
.about-list dt { color:var(--text); }
.about-list dd { margin:0; color:var(--strong); }
.side-card .text-button { justify-self:start; }
@media (max-width:1100px) { .me-cowork-layout { grid-template-columns:minmax(0,1fr); } }
@media (max-width:660px) { .me-view-tab.has-short .me-view-long { display:none; } .me-view-short { display:inline; } .me-view-tab { padding:0 14px; } .me-overview { gap:16px; } .overview-summary { gap:20px; padding:16px; } .overview-big { font-size:32px; } .overview-credits .primary-button { justify-self:stretch; } .product-tiles { grid-template-columns:minmax(0,1fr); gap:12px; } .limit-card, .daily-card, .side-card { padding:16px; } .limit-cost { font-size:28px; line-height:36px; } .limit-credits, .limit-legend-limit { margin-left:0; } .about-list > div { grid-template-columns:minmax(0,1fr); gap:2px; } }

/* Studio and GitHub panels: KPI strip, activity breakdown, data details. */
/* dl.kpi-strip outranks the later-loaded .github-metrics grid on the personal GitHub panel. */
dl.kpi-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin:0 0 20px; overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--border); }
/* The personal GitHub strip has three figures: estimate, active days, interactions. */
dl.kpi-strip.is-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.kpi-strip .kpi { display:flex; flex-direction:column; gap:4px; min-width:0; padding:16px 20px; border:0; border-radius:0; background:var(--surface); }
.kpi-strip dt { color:var(--text); font-size:14px; line-height:20px; }
.kpi-strip dd { margin:0; color:var(--strong); font-size:22px; font-weight:700; line-height:30px; overflow-wrap:anywhere; }
.kpi-strip .kpi-note { color:var(--text); font-size:13px; line-height:18px; }
.section-titles { display:grid; gap:4px; }
.section-titles p { margin:0; }
.activity-breakdown { display:grid; gap:12px; margin-top:20px; padding:20px 24px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.activity-breakdown-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.activity-breakdown-head h3 { margin:0; font-size:17px; }
.activity-breakdown-list { display:grid; gap:12px; }
.activity-row { display:grid; gap:6px; }
.activity-row-label { display:flex; justify-content:space-between; gap:12px; font-size:15px; }
.activity-row-label > span:last-child { flex:none; color:var(--text); }
.activity-track { height:8px; overflow:hidden; border-radius:100px; background:var(--surface-muted); }
.activity-fill { height:100%; border-radius:100px; background:var(--chart-github); }
.activity-note { margin:0; padding-top:8px; border-top:1px solid var(--border); }
.data-details { margin-top:20px; }
.data-details > summary { padding:14px 0; font-weight:600; cursor:pointer; }
@media (max-width:900px) { dl.kpi-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:420px) { dl.kpi-strip, dl.kpi-strip.is-three { grid-template-columns:minmax(0,1fr); } .activity-breakdown { padding:16px; } }
#me-github-usage .github-bar { background:var(--chart-github); }
#me-github-usage > .section-bar { padding:0; }

/* Keep the visible overview hosts in place while their independent reports load.
   Minima allow larger text and wrapped content to grow naturally. */
.me-views { min-height:52px; }
#me-overview-summary { min-height:200px; }
#me-products { min-height:244px; }
#me-overview-daily { min-height:272px; }
@media (max-width:760px) {
  #me-overview-summary { min-height:300px; }
  #me-products { min-height:244px; }
}

/* 0.4.170: the Studio usage outlook lines up with the cards above it and uses one text colour. */
.personal-studio .forecast-card { padding-inline:0; }
.personal-studio .forecast-card :is(p, p.muted, summary) { color:var(--text); }
.personal-studio .forecast-card :is(.forecast-headline, [data-forecast-cost]) { color:var(--strong); }

/* 0.4.211: Download CSV beside the month. A disabled button shows its reason next to it. */
.view-actions-group.me-export { flex-wrap:nowrap; align-items:center; gap:10px; }
.me-export-note { max-width:240px; color:var(--text); font-size:13px; line-height:18px; text-align:right; }
.me-export-button svg { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.me-export-button { white-space:nowrap; }
.me-export-button:disabled { cursor:not-allowed; }
@media (max-width:1060px) {
  .view-actions:has(.me-export:not([hidden])) { flex-wrap:wrap; align-items:center; }
  .me-export-note { text-align:left; }
}
