/* Rhythm shared by the four areas. Keep collapsed disclosures compact. */
:root{--ui-inset:clamp(14px,3.5vw,24px);--ui-row:clamp(12px,2vw,16px);--ui-block:clamp(24px,4vw,36px)}
details>summary{line-height:1.4;overflow-wrap:break-word;cursor:pointer}
details[open]>summary{margin-block-end:var(--ui-row)}
details[open]>summary+:is(p,div,ul,table,section){margin-block-start:0}
details :is(select,input,textarea),.section-title>*{min-width:0}
.install-help[open]>p+p,dialog details[open]>p+p{margin-block-start:10px}
#daily-context{padding:var(--ui-inset)}
#daily-context>summary,.records>summary,.comparison-method>summary,.patterns summary,.install-help>summary{padding-block:5px}
#daily-context>section+section,#daily-context>section+details{margin-block-start:var(--ui-block)}
#daily-context .highlight-grid,#daily-context .kpi-grid{gap:var(--ui-row)}
#daily-context .section-title{margin-block-end:var(--ui-row)}
#daily-context .section-title>p{margin:0}
#daily-context #activity-chart{min-height:0}
#daily-context #activity-chart svg{display:block}
#daily-context #chart-note{margin:var(--ui-row) 0 0}
#daily-context .chart-empty{min-height:100px}
.patterns details[open]>small{display:block}.patterns details[open]>p{margin-top:10px}
.patterns details+details{margin-top:var(--ui-row)}
.patterns details[open]>summary{margin-bottom:8px}
.exercise details[open]>summary{margin-bottom:4px}
.exercise .sets{padding-top:4px}
dialog details[open]>summary,.item:first-of-type{margin-bottom:8px}
#view details[open]>button,#detail details[open]>table{margin-top:2px}
@media(max-width:650px){
 .section-title{gap:10px}
 .section-title label{width:100%}
 .section-title label select{width:100%;max-width:100%}
 #daily-context .chart-panel{padding:var(--ui-inset)}
 .evolution-controls label{min-width:min(140px,100%)}
 .records .table-scroll{max-width:100%}
 .app-tabs{gap:2px;flex-wrap:wrap}
 .app-tabs a{min-width:0}
}

#evolucao .chart-top{display:block}
#evolucao .chart-top .legend{margin-top:.65rem}
#evolucao .att-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.55rem 1rem}
#evolucao .att-head h3{margin:0;flex:1 1 9rem}
#evolucao .att{flex:none;display:grid;gap:.2rem;color:#c3d2df;font-size:.75rem;line-height:1.3}
#evolucao .att-meta{text-align:right}
#evolucao .att-line{display:flex;align-items:center;gap:.45rem;white-space:nowrap}
#evolucao .att b{color:#a8e2d5;font-size:.78rem;letter-spacing:0}
#evolucao .att progress{border:0;appearance:none;background:#314253;color:#99dbce;border-radius:9px;width:clamp(2.6rem,7vw,5rem);height:5px;overflow:hidden}
#evolucao .att progress::-webkit-progress-bar{background:#314253}
#evolucao .att progress::-webkit-progress-value{background:#99dbce;border-radius:9px}
#evolucao .att progress::-moz-progress-bar{background:#99dbce;border-radius:9px}
#agora .weight-meta{display:flex;align-items:baseline;gap:.3rem;flex-wrap:wrap}
#agora #weight-origin::before{content:"· ";}
#agora #weight-origin{font-size:.567rem;font-weight:500;color:#536579}
#agora #weight-date{font-size:.72rem;color:#536579}
#agora .quick-att{display:inline-block;white-space:nowrap;font-weight:700;color:#35526a;font-size:.72rem;margin-inline-start:.35em}
#agora .quick-att:not(:empty)::before{content:'· ';font-weight:400}
/* The heading's negative tracking must not pull the unit into the digit. */
.now .metric strong:has(.metric-percent){letter-spacing:-.04em;white-space:nowrap}
.now .metric strong .metric-percent{margin-inline-start:.14em;letter-spacing:normal;font-size:.48em}

/* Same proportional figures as the dark attainment label, including nested
   comparisons whose parent uses tabular numbers. Keep size and trend color. */
body [data-unit-run],body .variation.variation,body .att-line b,body .quick-att{
 font-variant-numeric:proportional-nums!important;font-feature-settings:"pnum" 1,"tnum" 0!important;
 font-kerning:normal;letter-spacing:0!important;word-spacing:0!important;
 font-weight:700!important;white-space:nowrap;
}
body [data-unit-run]{display:inline!important;margin:0!important;padding:0!important;font-size:inherit!important;color:inherit!important}
