/* D077: closed-cycle timeline; the same markup adapts to small screens. */
.pond-sheet:has(:is(.cycle-section-history,.cycle-section-closed)){padding:0;border:0;background:transparent}
.pond-sheet:has(:is(.cycle-section-history,.cycle-section-closed))>.pond-summary-header{margin:0;border:1px solid var(--line);border-bottom:0;border-radius:14px 14px 0 0;background:var(--paper);padding:12px 20px}
.pond-sheet>:is(.cycle-section-history,.cycle-section-closed){padding:0;border:0}
.cycle-empty-shell{display:contents}
.cycle-section:has(>.cycle-empty-shell):not(:has(.record-tabs)){border-bottom:0}
:is(.cycle-section-history,.cycle-section-closed)>.cycle-empty-shell{display:block;padding:8px 20px 20px;border:1px solid var(--line);border-top:0;border-radius:0 0 14px 14px;background:var(--paper)}
:is(.cycle-section-history,.cycle-section-closed) .pond-empty-copy{padding-block:10px}
.cycle-history-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:22px}
.cycle-history .cycle-history-heading h2{margin:0 0 5px}.cycle-history-heading p{margin:0;color:var(--muted);font-size:.85rem}
.cycle-history-totals{display:flex;gap:8px}.cycle-history-totals>div{display:grid;gap:4px;padding:10px 14px;border-radius:12px;background:var(--field);min-width:96px}
.cycle-history-totals span{font-size:.76rem;color:var(--muted)}.cycle-history-totals strong{font-size:1.15rem}.cycle-history-totals small{font-size:.66rem;color:var(--muted);font-weight:400}
.cycle-history-year+ .cycle-history-year{margin-top:26px}.cycle-history-year>header{display:flex;align-items:center;gap:12px;margin-bottom:16px}.cycle-history-year>header::after{content:'';height:1px;background:var(--line);flex:1;min-width:16px}
.cycle-history-year>header h3{margin:0;flex:none;border-radius:8px;padding:6px 12px;background:var(--deck2);color:var(--deck-ink);font-size:.92rem}.cycle-history-year>header p{margin:0;font-size:.8rem;color:var(--muted)}
.cycle-history-timeline{display:grid;gap:18px}.cycle-history-entry{position:relative;padding-left:34px;min-width:0}.cycle-history-entry::before{content:'';position:absolute;left:3px;top:22px;width:16px;height:16px;border:3px solid var(--input-line);border-radius:50%;background:var(--paper)}
.cycle-history-card{width:100%;display:grid;grid-template-columns:minmax(200px,2.3fr) repeat(6,minmax(0,1fr)) 16px;align-items:center;gap:12px;padding:18px 16px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);text-align:left;cursor:pointer}
.cycle-history-card:hover{border-color:var(--accent);background:var(--field)}.cycle-history-card:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.cycle-history-identity{display:grid;gap:6px;min-width:0}.cycle-history-identity>span{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.cycle-history-identity b{font-size:1rem}.cycle-history-identity>small{color:var(--muted);font-size:.78rem}
.cycle-closed-badge{display:inline-flex;padding:2px 8px;border-radius:20px;background:var(--field);color:var(--muted);font-size:.7rem;white-space:nowrap}
.cycle-history-value{display:flex;align-items:center;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere}.cycle-history-value>span{font-size:.73rem;color:var(--muted)}.cycle-history-value>b{font-size:1.05rem;font-variant-numeric:tabular-nums}
.cycle-change{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px;font-size:.65rem;color:var(--muted)}.cycle-change svg{width:12px;height:12px}.cycle-change.is-better{color:var(--ok)}.cycle-change.is-worse{color:var(--bad)}
.cycle-history-chevron{width:16px;height:16px;color:var(--muted)}.cycle-rest-note{margin:7px 4px 0;font-size:.73rem;color:var(--muted)}
.cycle-history-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0}.cycle-history-details>div{padding:12px;border-bottom:1px solid var(--line);min-width:0}.cycle-history-details dt{color:var(--muted);font-size:.8rem}.cycle-history-details dd{margin:5px 0 0;font-size:.95rem;font-weight:600;overflow-wrap:anywhere}
.cycle-history-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%;justify-content:flex-end}.cycle-history-dialog .text-muted{font-size:.8rem}.cycle-history-actions svg{width:16px;height:16px}
@media(max-width:1100px){.cycle-history-card{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.cycle-history-identity{grid-column:1/-1;padding-right:20px}.cycle-history-chevron{position:absolute;right:14px;top:24px}.cycle-history-value{align-items:flex-start}.cycle-change{justify-content:flex-start}}
@media(max-width:700px){.pond-sheet:has(:is(.cycle-section-history,.cycle-section-closed))>.pond-summary-header{padding:10px 14px}:is(.cycle-section-history,.cycle-section-closed)>.cycle-empty-shell{padding:6px 14px 14px}:is(.cycle-section-history,.cycle-section-closed) .pond-empty-cycle{padding:14px;gap:12px}:is(.cycle-section-history,.cycle-section-closed) .pond-empty-copy{padding:0}.cycle-history-heading{gap:14px}.cycle-history-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:6px}.cycle-history-totals>div{min-width:0;padding:9px}.cycle-history-totals strong{font-size:1rem;overflow-wrap:anywhere}.cycle-history-year>header{flex-wrap:wrap;gap:8px}.cycle-history-year>header::after{display:none}.cycle-history-year>header p{font-size:.75rem;flex-basis:100%}.cycle-history-entry{padding-left:19px}.cycle-history-entry::before{width:10px;height:10px;border-width:2px;left:0;top:20px}.cycle-history-card{padding:14px 12px;gap:14px 8px}.cycle-history-identity b{font-size:.95rem}.cycle-history-value>b{font-size:.95rem}.cycle-history-value>span{font-size:.68rem}.cycle-change{font-size:.61rem}.cycle-history-details{grid-template-columns:repeat(2,minmax(0,1fr))}.cycle-history-details>div{padding:10px 6px}.cycle-history-actions{justify-content:flex-start}.cycle-history-actions>.btn{flex:1 1 auto}.cycle-history-dialog .ui-dialog-body{padding:14px}}

.cycle-closed-context{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0;margin-top:8px}.cycle-closed-context .cycle-identity{display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex:1}.cycle-closed-context .cycle-identity span{font-size:.8rem;color:var(--muted)}
.cycle-viewing-badge{background:var(--field);color:var(--ink);border:1px solid var(--line)}
@media(max-width:700px){.cycle-closed-context .cycle-identity{flex-basis:100%}}

.pond-sheet:has(.cycle-section-closed:not(:has(.cycle-empty-shell)):not(:has(.cycle-summary-shell)))>.pond-summary-header{border-bottom:1px solid var(--line);border-radius:14px}

.cycle-pending-card{margin:0 20px 20px}.cycle-pending-message{margin-top:16px}.cycle-section-closed:has(.cycle-pending-card) .cycle-summary-shell{padding:10px 0 0;border:1px solid var(--line);border-top:0;border-radius:0 0 14px 14px;background:var(--paper)}
@media(max-width:700px){.cycle-pending-card{margin:0 14px 14px}.cycle-section-closed:has(.cycle-pending-card) .cycle-summary-shell{padding-top:6px}}
