:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #0b0b0e;
  color: #f8f8fa;
  --accent: #b89dff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #ffdd69; outline-offset: 4px; }
.shell { max-width: 132rem; margin: auto; padding: clamp(1.1rem, 2.4vw, 3rem) clamp(1rem, 3.5vw, 5rem); }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { width: auto; height: auto; clip-path: none; z-index: 2; padding: 1rem; background: #101014; }
.site-header { border-bottom: 1px solid #34323b; background: #151519; }
.site-header-inner { max-width: 132rem; margin: auto; padding-inline: clamp(1rem, 3.5vw, 5rem); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: 1.5rem; }
.wordmark { font-size: 1.15rem; font-weight: 700; text-decoration: none; padding-block: .85rem; }
.site-nav { gap: clamp(.2rem, 1vw, .75rem); }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.8rem; padding: .45rem .65rem; text-decoration: none; border-bottom: .17rem solid transparent; color: #e3e0e9; }
.site-nav a:hover { background: #26242d; }
.site-nav a[aria-current="page"] { color: #fff; border-color: var(--accent); }
h1 { font-size: clamp(1.9rem, 3.4vw, 3.2rem); font-weight: 650; line-height: 1.14; letter-spacing: -.035em; margin: 0; }
.datebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-block: 0 1rem; }
.datebar h1 { font-size: clamp(1.2rem, 2vw, 1.65rem); font-weight: 600; margin: 0; }
nav { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
nav button, nav input { height: 2.75rem; min-width: 2.75rem; padding-inline: .65rem; background: #27242e; color: inherit; border: 1px solid #51495e; border-radius: 0; }
nav button { cursor: pointer; }
nav button:hover:not(:disabled) { background: #433752; }
nav button:disabled { color: #9e96a5; cursor: default; }
.notice { background: #282131; border-inline-start: .25rem solid var(--accent); padding: .7rem 1rem; margin: 0 0 1rem; }
.day-stats, .highlight-tiles, .day-playlists { display: grid; gap: .7rem; }
.day-stats { grid-template-columns: repeat(var(--stat-columns, 2), minmax(0, 1fr)); }
.day-playlists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.day-section { margin-top: clamp(1.35rem, 2.3vw, 2.5rem); }
.section-title { font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 650; margin: 0 0 .6rem; }
.tile { position: relative; isolation: isolate; padding: clamp(.9rem, 1.5vw, 1.55rem); min-width: 0; display: flex; flex-direction: column; background: #202126; color: #fff; overflow-wrap: anywhere; border: 1px solid var(--tile-accent, var(--accent)); }
.tile-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem .7rem; margin-bottom: .85rem; }
.tile h3 { font-weight: 650; font-size: 1rem; margin: 0; }
.entry-count { color: #cbc6d3; font-size: .9rem; }
.tile--steps { --tile-accent: #61db9d; }
.tile--exercise { --tile-accent: #b89dff; }
.tile--weight { --tile-accent: #eab4ff; }
.tile--resistance { --tile-accent: #ffb26e; }
.tile--sleep { --tile-accent: #91baff; }
.tile--readiness { --tile-accent: #f1b8dd; }
.tile--youtube { --tile-accent: #ff8694; }
.tile--music { --tile-accent: #ffd06c; }
.tile--audible { --tile-accent: #ffb26e; }
.tile--movies, .tile--shows, .tile--screen { --tile-accent: #91baff; }
.tile--games { --tile-accent: #74d4ef; }
.goal-fill {
  background-image: linear-gradient(to top,
    color-mix(in srgb, var(--goal-accent, var(--tile-accent, var(--accent))) 22%, transparent) var(--goal-progress),
    transparent var(--goal-progress));
}
.day-stats .stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .22em; color: var(--tile-accent); margin: 0 0 .2rem; }
.day-stats .stat-value { min-width: 0; }
.day-stats .empty { margin-top: 0; }
.sleep-note { margin: 0; }
.tile-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; z-index: -2; opacity: .48; transition: opacity 220ms ease; }
.tile.has-cover:hover .tile-cover, .tile.has-cover:focus-within .tile-cover { opacity: 1; }
.tile.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(10 10 14 / .77) 0%, rgb(10 10 14 / .60) 32%, rgb(10 10 14 / .86) 65%, rgb(10 10 14 / .96) 100%); }
.highlight-tile { min-height: clamp(9.25rem, 12vw, 13rem); }
.highlight-caption { margin-top: auto; }
.highlight-tile h3 { font-size: clamp(1.2rem, 1.65vw, 1.7rem); }
.highlight-tile h3 a { text-decoration: none; }
.highlight-tile:hover h3 a, .highlight-tile h3 a:focus-visible { text-decoration: underline; }
.stat { font-size: clamp(2.05rem, 4vw, 4rem); font-weight: 600; line-height: 1.08; font-variant-numeric: tabular-nums; letter-spacing: -.035em; margin: auto 0 .2rem; }
.stat-unit { font-size: .6em; letter-spacing: normal; white-space: nowrap; }
.unit, .empty, .entry-subtitle { margin: 0; line-height: 1.5; }
.empty { margin-top: auto; }
.link-arrow { color: var(--tile-accent, var(--accent)); flex: none; margin-inline-start: auto; align-self: center; font-weight: 700; }
.stat-link { display: inline-flex; margin-inline-start: auto; text-decoration: none; }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stretched-link:focus-visible::after { outline: 3px solid #ffdd69; outline-offset: -3px; }
.artwork-credit { position: relative; z-index: 2; }
.has-stretched-link { transition: background-color 180ms ease; }
.has-stretched-link:hover, .has-stretched-link:focus-within { background-color: #292a32; }
.day-playlists { align-items: start; }
.playlist-tile { background: transparent; padding: 0; }
.playlist-tile > .tile-header, .playlist-tile > .empty { padding: .85rem .9rem; }
.playlist-tile > .tile-header { margin-bottom: 0; }
.playback-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; list-style: none; margin: 0; padding: 0; }
.playback-grid > li { min-width: 0; }
.playback-card { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: end; height: 100%; width: 100%; aspect-ratio: 16 / 10; min-height: 8.3rem; min-width: 0; padding: clamp(.8rem, 1.2vw, 1.15rem); background: #202126; text-decoration: none; border: 1px solid color-mix(in srgb, var(--tile-accent) 58%, #202126); }
.playback-card[href]:hover, .playback-card[href]:focus-visible { border-color: var(--tile-accent); }
.playback-card .link-arrow { position: absolute; top: .4rem; right: .5rem; padding: .12rem .28rem; background: #111118df; }
.playback-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .59; transition: opacity 220ms ease; }
.playback-card:has(.playback-art)::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #10101422, #10101455 30%, #101014e6 74%, #101014 100%); }
.playback-card[href]:hover .playback-art, .playback-card:focus-visible .playback-art { opacity: 1; }
.playback-card[href]:hover .entry-title, .playback-card:focus-visible .entry-title { text-decoration: underline; }
.playback-caption { margin-top: 1.7rem; text-shadow: 0 1px 3px #000; }
.playback-caption .entry-title { display: block; font-size: clamp(1rem, 1.15vw, 1.15rem); }
.playback-caption .entry-subtitle { font-size: .875rem; color: #e2dfeb; }
.fitness-tiles { display: flex; flex-wrap: wrap; gap: .8rem; container-type: inline-size; }
.fitness-tiles > .tile { flex: 1 1 100%; }
.fitness-tiles h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); margin-bottom: .95rem; }
@container (width >= 61.6rem) {
  .fitness-tiles > .tile { flex-basis: calc((100% - 1.6rem) / 3); }
  .fitness-tiles > .tile--sleep { flex-basis: calc((200% - .8rem) / 3); }
}
.fitness-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .9rem; margin: 0; }
.fitness-metrics dt { font-weight: 600; margin-bottom: .35rem; }
.fitness-metrics .stat { display: flex; align-items: center; flex-wrap: wrap; gap: .1em .18em; margin: 0; color: var(--tile-accent); font-size: clamp(1.85rem, 2.55vw, 3.25rem); font-weight: 650; line-height: 1.08; }
#sleep .fitness-metrics > div { padding-block: .65rem; border: 1px solid transparent; }
#sleep .fitness-metrics > .fitness-score { padding-inline: .65rem; border-color: color-mix(in srgb, var(--tile-accent) 55%, transparent); }
.fitness-metric-unit { font-size: .44em; letter-spacing: 0; white-space: nowrap; }
.duration-clock { white-space: nowrap; }
.workout-session.tile--resistance .fitness-metrics > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
.workout-secondary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr)); gap: .6rem .75rem; margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid #38363e; }
.workout-secondary dt { color: #c4c1cd; font-size: .875rem; }
.workout-secondary dd { margin: .15rem 0 0; font-variant-numeric: tabular-nums; }
.workout-zones { margin: .8rem 0 0; font-size: .9rem; }
.strength-table { width: 100%; table-layout: fixed; margin-top: 1rem; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.strength-table caption { text-align: left; font-weight: 650; padding-bottom: .45rem; }
.strength-table th, .strength-table td { padding: .5rem .6rem; text-align: left; border-bottom: 1px solid #38363e; white-space: nowrap; }
.strength-table thead th:nth-child(2) { width: max(3.75rem, 20%); }
.strength-table thead th:nth-child(3) { width: max(5.75rem, 29%); }
.strength-table tbody tr { background: #202126; }
.strength-table tbody .strength-row-alt { background: #15161b; }
.strength-table tbody tr:hover { background: #302c25; }
.strength-table .strength-exercise { overflow: hidden; text-overflow: ellipsis; }
.strength-table tbody + tbody tr:first-child > * { border-top: 1px solid #504c57; }
@container (40.8rem <= width < 61.6rem) {
  .fitness-tiles > .tile--exercise { flex-basis: calc((100% - .8rem) / 2); }
  .workout-session.tile--resistance:has(.strength-table) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(1rem, 3cqw, 2rem); align-items: start; }
  .workout-session .strength-table { margin-top: 0; }
}
.entry-title { font-weight: 600; line-height: 1.35; }
.entry-subtitle { font-size: .95rem; }
.footnote { font-size: .92rem; margin: .55rem 0 0; }
@media (max-width: 49rem) {
  .day-playlists { grid-template-columns: minmax(0, 1fr); }
  .day-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 29rem) {
  .site-header-inner { justify-content: start; }
  .site-nav a:first-child { padding-inline-start: 0; }
}

.panel { background-color: #202126; border: 1px solid var(--accent); padding: clamp(1rem, 2vw, 1.65rem); min-width: 0; }
.about { max-width: 49rem; }
.about p { max-width: 59ch; color: #d6d2dd; font-size: 1.13rem; line-height: 1.6; }
.about p:first-of-type { margin-top: 0; }
.about-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.about-links a { padding: .65rem .8rem; background: #302740; }
.muted, .footnote { color: #c4c1cd; }
.filterbar { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; margin-block: 1.2rem; }
.media-page .filterbar { margin-top: 0; }
.filterbar label { display: grid; flex: 0 1 18rem; gap: .35rem; }
.filterbar label[hidden] { display: none; }
.filterbar input, .filterbar select, .chart-filter select { min-height: 2.75rem; min-width: 0; padding-inline: .65rem; background: #222229; color: inherit; border: 1px solid #575262; }
.library-groups { display: grid; align-items: start; gap: .8rem; }
.library-group { --tile-accent: #b89dff; background: #19191f; border: 1px solid var(--tile-accent); min-width: 0; }
.library-group--books { --tile-accent: #ffb26e; }
.library-group--movies, .library-group--shows { --tile-accent: #91baff; }
.library-group--music { --tile-accent: #ffd06c; }
.library-group--videos { --tile-accent: #ff8694; }
.library-group--games { --tile-accent: #74d4ef; }
.library-summary { cursor: pointer; list-style: none; padding: .85rem 1rem; }
.library-summary::-webkit-details-marker { display: none; }
.library-summary:hover { background: #272630; }
.library-heading { display: flex; align-items: baseline; gap: .55rem; margin: 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.library-heading::before { content: ""; width: .48rem; height: .48rem; flex: none; align-self: center; border: solid var(--tile-accent); border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.library-group[open] .library-heading::before { transform: translateY(-.12rem) rotate(45deg); }
.library-group-count { margin-inline-start: auto; color: #d0cbd8; font-size: .86rem; font-weight: 400; white-space: nowrap; }
.library { display: grid; gap: .6rem; list-style: none; margin: 0; padding: 0 .65rem .65rem; }
.highlight-tiles, .library { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 26rem) {
  .highlight-tiles, .library { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 70rem) {
  .highlight-tiles, .library { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.library-art { height: 10rem; width: 100%; object-fit: cover; object-position: 50% 35%; background: #14141c; display: block; opacity: .65; transition: opacity 220ms ease; }
.library-group--books .library-art { height: auto; aspect-ratio: 1; object-fit: contain; }
.library-item { padding: .85rem 1rem; overflow-wrap: anywhere; }
.library-card { display: flex; flex-direction: column; padding: 0; background: #202126; border: 1px solid var(--tile-accent); }
.library-action { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.library-action[href]:hover, .library-action[href]:focus-visible { background: #292a32; }
.library-action:hover .library-art, .library-action:focus-visible .library-art { opacity: 1; }
.library-card h3 { display: flex; gap: .5rem; font-size: 1.05rem; margin: .3rem 0; }
.library-card p { margin: .35rem 0; color: #c4c1cd; font-size: .925rem; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: .75rem; }
.chart { --goal-accent: var(--chart-accent); border-color: var(--chart-accent); }
.chart h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.chart-filter { display: grid; gap: .35rem; margin-bottom: .65rem; }
.chart-value { margin: .1rem 0 .5rem; font-size: clamp(1.55rem, 3vw, 2.3rem); font-weight: 700; color: var(--chart-accent); }
.chart canvas { width: 100%; height: 12rem; display: block; }
.chart details summary { cursor: pointer; padding-block: .5rem; }
.chart table { width: 100%; border-collapse: collapse; }
.chart th, .chart td { padding: .35rem .4rem; text-align: left; border-bottom: 1px solid #45434d; }

@media (hover: none) {
  .tile-cover, .library-art, .playback-art { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-cover, .library-art, .playback-art, .has-stretched-link { transition: none; }
}

/* Shared reading rhythm and compact-screen controls. */
h2, h3 { line-height: 1.25; text-wrap: pretty; }
.highlight-caption .entry-subtitle { margin-top: .4rem; }
.day-stats .stat-note { color: #d2cedb; margin: .3rem 0 0; line-height: 1.5; }
.chart-value { font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.tile--weight, #fitness-body-weight { container: weight-panel / inline-size; }
.weight-reading, .day-stats .weight-reading {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  line-height: 1.1;
}
.weight-reading > span { white-space: nowrap; }
.weight-change {
  padding-inline-start: .65rem;
  border-inline-start: 1px solid currentColor;
}
@container weight-panel (min-width: 15rem) {
  .day-stats .weight-reading { font-size: min(clamp(2.05rem, 4vw, 4rem), 11cqi); }
}
@container weight-panel (width < 15rem) {
  .weight-reading, .day-stats .weight-reading { flex-direction: column; align-items: flex-start; }
  .weight-change { border-inline-start: 0; border-block-start: 1px solid currentColor; padding: .65rem 0 0; }
}
.chart table { font-variant-numeric: tabular-nums; font-size: .9rem; }
.chart td:last-child, .chart th:last-child { text-align: right; }
.chart details summary { min-height: 2.75rem; display: list-item; align-content: center; }
.chart > .muted { margin-top: 0; font-size: .9rem; }
.about-links a { border: 1px solid #64517f; text-decoration: none; }
.about-links a:hover { background: #443457; text-decoration: underline; }
.tile, .panel { scroll-margin-top: 1rem; }
@media (max-width: 35rem) {
  .site-header-inner { gap: 0; }
  .site-nav { width: 100%; justify-content: space-between; gap: 0; }
  .site-nav a { padding-inline: .4rem; font-size: .925rem; }
  .wordmark { padding-bottom: .45rem; }
  .datebar nav { width: 100%; display: grid; grid-template-columns: 2.75rem auto 2.75rem minmax(0, 1fr); }
  .datebar nav label, .datebar nav input { min-width: 0; width: 100%; }
  .filterbar label { flex: 1 1 100%; }
  .library-card h3 { font-size: 1rem; }
  .library-item { padding: .75rem; }
}

.day-stats .tile-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; min-height: 2.9rem; flex-shrink: 0; }

/* Personal facts and a readable chronological biography. */
.profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.profile-card h2 { margin: 0 0 1rem; font-size: 1.35rem; }
.profile-card p { margin: 0 0 1rem; }
.profile-card p:last-child { margin-bottom: 0; }
.profile-intro { color: #dedbe5; font-size: 1.1rem; max-width: 48ch; }
.profile-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin: 0 0 1rem; }
.profile-facts dt { color: #c4c1cd; font-size: .9rem; margin-bottom: .25rem; }
.profile-facts dd { margin: 0; font-weight: 600; }
.profile-links { margin-top: auto; }
.profile-links a { overflow-wrap: anywhere; }
.profile-age { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.profile-age > span { display: flex; flex-direction: column; }
.profile-age strong { font-size: clamp(1.8rem,3vw,3rem); color: var(--tile-accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.profile-age span span { color: #c4c1cd; font-size: .9rem; margin-top: .2rem; }
.biography { margin-top: .8rem; padding: clamp(1.25rem,4vw,3rem); }
.biography > * { max-width: 46rem; margin-inline: auto; }
.biography h2 { font-size: clamp(1.5rem,3vw,2rem); margin-block: 0 1rem; }
.biography h3 { font-size: 1.25rem; margin-block: 2rem .75rem; color: #d4c3ff; }
.biography p { font-size: 1.05rem; line-height: 1.75; color: #e1dee7; margin-block: 0 1rem; }
.biography .bio-lede { font-size: 1.2rem; color: #fff; }
.biography blockquote { padding: .75rem 1.25rem; margin-block: 1.5rem 0; border-left: 3px solid #61db9d; color: #fff; font-size: 1.25rem; line-height: 1.5; }
@media(min-width:110rem){.profile-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:44rem){.profile-grid{grid-template-columns:minmax(0,1fr);}}

.tile--water { --tile-accent: #7edbee; }
.tile--calories { --tile-accent: #f5c97d; }
.tile--protein, .tile--carbs, .tile--fat, .tile--fiber { --tile-accent: #b89dff; }
.food-totals { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; }
.food-entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.food-entry { overflow-wrap: anywhere; }
.food-entry h2 { margin: .5rem 0; font-size: 1.35rem; }
.food-energy { font-size: 1.7rem; color: #f5c97d; }
.food-macros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.food-macros dt { font-size: .85rem; color: #d2cedb; }
.food-macros dd { margin: .25rem 0 0; }
@media (max-width: 70rem) {
  .food-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .food-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 49rem) {
  .food-entries { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 29rem) {
  .day-stats, .food-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-stats .stat, .food-totals .stat { font-size: 2rem; }
}

.day-stats { display: flex; flex-wrap: wrap; }
.day-stats > .tile { flex: 1 1 calc(33.333% - .7rem); }
@media (min-width: 65rem) {
  .day-stats > .tile { flex-basis: calc(25% - .7rem); }
}
@media (max-width: 49rem) {
  .day-stats > .tile { flex-basis: calc(50% - .7rem); }
}
