/* Life in Weeks page. Scoped to .lw so it cannot affect other pages. */
.lw { --muted: #5f6772; --line: #e4e4e4; --soft: #f6f6f4; --empty: #ecebe7; --now: #1a1a1a; --gap: 2px; }
.lw-wrap { width: min(1000px, 100% - 32px); margin: 0 auto; padding: 56px 0 72px; }
.lw-head { text-align: center; max-width: 640px; margin: 0 auto; }
.lw-head p { color: var(--muted); margin-top: 16px; }

.lw-stats { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lw-stats li { background: var(--soft); border-radius: 16px; padding: 16px 18px; }
.lw-stats b { display: block; font-size: 28px; font-weight: 400; line-height: 1.2; font-variant-numeric: tabular-nums; }
.lw-stats span { font-size: 14px; color: var(--muted); }

.lw-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.lw-views { display: inline-flex; background: var(--soft); border-radius: 1000px; padding: 4px; }
.lw-views button { border: 0; background: none; font: 700 13px/1.6 var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 8px 18px; border-radius: 1000px; cursor: pointer; color: var(--muted); }
.lw-views button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.lw-hint { color: var(--muted); }

.lw-legend { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.lw-legend button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 1000px; padding: 5px 12px 5px 8px; font: 400 14px/1.4 var(--font); cursor: pointer; color: var(--text); }
.lw-legend button:hover { background: var(--soft); }
.lw-legend button[aria-pressed="true"] { border-color: var(--text); background: var(--soft); }
.lw-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.lw-legend i.trip, .lw-tip li i.trip { background: var(--flag) center / cover no-repeat; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.lw-legend i.now { background: #fff; box-shadow: inset 0 0 0 2px #1a1a1a; }
.lw-legend i.future { background: #fff; box-shadow: inset 0 0 0 1px #cfccc4; }

.lw-gridwrap { position: relative; margin-top: 24px; --lab: 36px; }
.lw-axis { padding-left: calc(var(--lab) + 6px); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.lw-grid { display: grid; grid-template-columns: var(--lab) repeat(52, 1fr); column-gap: var(--gap); row-gap: var(--gap); outline: none; }
.lw-grid:focus-visible { outline: 2px solid var(--text); outline-offset: 6px; border-radius: 4px; }
.lw-grid .w { aspect-ratio: 1; border-radius: 2px; background: var(--empty); position: relative; transition: opacity .15s; }
.lw-grid .w.f { background: #fff; box-shadow: inset 0 0 0 1px #dedbd3; }
.lw-grid .w.trip { box-shadow: 0 0 0 1px rgba(0,0,0,.35); z-index: 1; }
.lw-grid .w.trip::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--flag) center / cover no-repeat; }
.lw { --house: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%202.5%201.5%2011.5h3v10h6v-6.5h3v6.5h6v-10h3z%22%20fill%3D%22%231a1a1a%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.6%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E"); }
.lw-grid .w.move::before { content: ""; position: absolute; inset: 6%; z-index: 2; background: var(--house) center / contain no-repeat; }
.lw-legend i.move, .lw-tip li i.move { background: var(--house) center / contain no-repeat; }
.lw-grid .w.out { background: none !important; box-shadow: none; pointer-events: none; }
.lw-grid .w.now { background: #fff !important; box-shadow: inset 0 0 0 2px var(--now); animation: lwPulse 1.6s ease-in-out infinite; }
.lw-grid .w.cur { outline: 2px solid var(--text); outline-offset: 1px; z-index: 1; }
.lw-grid.focus .w:not(.hit) { opacity: .16; }
.lw-grid .w { min-width: 0; }
.lw-grid .row-label { font-size: 11px; color: var(--muted); line-height: 1; height: 0; display: flex; align-items: center; justify-content: flex-end; overflow: visible; padding-right: 6px; align-self: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes lwPulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .lw-grid .w.now { animation: none; } }

.lw-tip { position: absolute; z-index: 5; width: 280px; background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 8px 28px rgba(0,0,0,.16); pointer-events: none; font-size: 14px; line-height: 1.45; }
.lw-tip .when { font-weight: 700; }
.lw-tip .meta { color: var(--muted); font-size: 13px; }
.lw-tip ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.lw-tip li { display: flex; gap: 8px; align-items: baseline; }
.lw-tip li i { width: 10px; height: 10px; border-radius: 3px; flex: none; transform: translateY(1px); }

.lw-chapters { margin-top: 64px; }
.lw-h { font-size: 32px; }
.lw-chapters ol { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line); }
.lw-chapters li { display: grid; grid-template-columns: 14px 210px 1fr auto; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lw-chapters li i { width: 12px; height: 12px; border-radius: 3px; transform: translateY(1px); }
.lw-chapters .d { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.lw-chapters .n { color: var(--muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lw-note { color: var(--muted); margin-top: 20px; }

@media (max-width: 920px) {
  .lw { --gap: 1px; }
  .lw-wrap { padding-top: 32px; }
  .lw-stats { grid-template-columns: repeat(2, 1fr); margin-top: 28px; }
  .lw-stats b { font-size: 24px; }
  .lw-gridwrap { --lab: 24px; }
  .lw-grid .row-label { font-size: 9px; padding-right: 3px; }
  .lw-grid .row-label.first { visibility: hidden; }
  .lw-grid .w { border-radius: 1px; }
  .lw-grid .w.trip { box-shadow: 0 0 0 .5px rgba(0,0,0,.4); }
  .lw-grid .w.f { box-shadow: inset 0 0 0 .5px #cfccc4; }
  .lw-tip { width: min(300px, calc(100vw - 32px)); }
  .lw-chapters li { grid-template-columns: 12px 1fr auto; gap: 4px 12px; }
  .lw-chapters li .d { grid-column: 2 / 4; grid-row: 2; }
}

/* Plans (only the private page has any): striped weeks still to come, faded flags with a dashed
   outline for planned trips, a cube for goals. Stripes and outlines, not just colour, so they read
   for deuteranomaly too. */
.lw { --cube: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20stroke%3D%22%23fff%22%20stroke-width%3D%221.4%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%202%2021.5%207%2012%2012%202.5%207z%22%20fill%3D%22%23c9a227%22/%3E%3Cpath%20d%3D%22M2.5%207%2012%2012v10L2.5%2017z%22%20fill%3D%22%238a6d12%22/%3E%3Cpath%20d%3D%22M21.5%207%2012%2012v10l9.5-5z%22%20fill%3D%22%231a1a1a%22/%3E%3C/g%3E%3C/svg%3E"); }
.lw-grid .w.f.plan { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.lw-grid .w.ptrip { outline: 1px dashed #1a1a1a; outline-offset: 0; z-index: 1; }
.lw-grid .w.ptrip::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--pflag) center / cover no-repeat, #fff; opacity: .85; }
.lw-grid .w.ptrip.rough::after { opacity: .65; }
.lw-grid .w.goal::before { content: ""; position: absolute; inset: -10%; z-index: 3; background: var(--cube) center / contain no-repeat; }
.lw-legend i.plan { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.lw-legend i.ptrip { background-color: transparent; outline: 1px dashed #1a1a1a; opacity: .8; }
.lw-legend i.goal, .lw-tip li i.goal, .lw-plans li i.goal { background: var(--cube) center / contain no-repeat; }
.lw { --flame: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%201.5c.6%203.2%203.4%205.4%205.3%208.3%201.9%203%201.6%207-1%209.6-2.4%202.3-6.2%202.6-8.8.6-2.9-2.2-3.6-6.3-1.7-9.4.6%201.5%201.6%202.6%203%203.1-.6-4.3%201.1-8.4%203.2-12.2z%22%20fill%3D%22%23f08c00%22%20stroke%3D%22%231a1a1a%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12.2%2012.3c1.3%201.6%202.6%202.9%202.4%204.9-.2%201.7-1.6%202.9-3.2%202.8-1.7-.1-2.9-1.6-2.7-3.3.1-1%20.6-1.8%201.4-2.4.3%201%20.9%201.6%201.6%201.8-.2-1.4%200-2.6.5-3.8z%22%20fill%3D%22%23ffd43b%22%2F%3E%3C%2Fsvg%3E");
  --heart: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%2021s-8.5-5.3-8.5-11.2A4.6%204.6%200%200%201%2012%207.1a4.6%204.6%200%200%201%208.5%202.7C20.5%2015.7%2012%2021%2012%2021z%22%20fill%3D%22%231a1a1a%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E"); }
.lw-grid .w.goal.fire::before { background-image: var(--flame); }
.lw-legend i.fire, .lw-tip li i.fire, .lw-plans li i.fire { background: var(--flame) center / contain no-repeat; }
.lw-legend i.fam, .lw-tip li i.fam, .lw-plans li i.fam { background: var(--heart) center / contain no-repeat; }
.lw-tip li i.famtxt { visibility: hidden; }
.lw-plans { margin-top: 48px; }
.lw-plans ol { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line); }
.lw-plans li { display: grid; grid-template-columns: 14px 210px 1fr auto; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lw-plans li i { width: 12px; height: 12px; border-radius: 3px; transform: translateY(1px); }
.lw-plans li i.trip { background: var(--flag) center / cover no-repeat; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.lw-plans .d { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.lw-plans .n { color: var(--muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Faint links to the private pages, bottom right like every other page's */
.lw-owner { margin-top: 56px; text-align: right; font-size: 12px; color: #cfcfcf; }
.lw-owner a { color: #cfcfcf; text-decoration: none; }
.lw-owner a:hover, .lw-owner a:focus-visible { color: #5f6772; text-decoration: underline; }
@media (max-width: 920px) {
  .lw-plans li { grid-template-columns: 12px 1fr auto; gap: 4px 12px; }
  .lw-plans li .d { grid-column: 2 / 4; grid-row: 2; }
}

/* More marks on the private page: an uncoloured flame for Coast and Lean FIRE, a diploma for each
   diploma finished, a skull at the projected end (80). Black and white, so they read for deuteranomaly. */
.lw { --flame-plain: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%201.5c.6%203.2%203.4%205.4%205.3%208.3%201.9%203%201.6%207-1%209.6-2.4%202.3-6.2%202.6-8.8.6-2.9-2.2-3.6-6.3-1.7-9.4.6%201.5%201.6%202.6%203%203.1-.6-4.3%201.1-8.4%203.2-12.2z%22%20fill%3D%22%23fff%22%20stroke%3D%22%231a1a1a%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12.2%2012.3c1.3%201.6%202.6%202.9%202.4%204.9-.2%201.7-1.6%202.9-3.2%202.8-1.7-.1-2.9-1.6-2.7-3.3.1-1%20.6-1.8%201.4-2.4.3%201%20.9%201.6%201.6%201.8-.2-1.4%200-2.6.5-3.8z%22%20fill%3D%22none%22%20stroke%3D%22%231a1a1a%22%20stroke-width%3D%221.2%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --diploma: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2212%22%20rx%3D%221.5%22%20fill%3D%22%23fff%22%20stroke%3D%22%231a1a1a%22%20stroke-width%3D%221.6%22%2F%3E%3Cpath%20d%3D%22M6.5%209h11M6.5%2012h7%22%20stroke%3D%22%231a1a1a%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.6%2016.5%2013.8%2022l2.4-1.4%202.4%201.4-.8-5.5%22%20fill%3D%22%231a1a1a%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%2216.2%22%20cy%3D%2215%22%20r%3D%222.8%22%20fill%3D%22%231a1a1a%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --skull: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%202C6.8%202%203.5%205.6%203.5%2010.2c0%202.6%201.2%204.4%203%205.5V19a1.5%201.5%200%200%200%201.5%201.5h1v1.5h2v-1.5h2v1.5h2v-1.5h1a1.5%201.5%200%200%200%201.5-1.5v-3.3c1.8-1.1%203-2.9%203-5.5C20.5%205.6%2017.2%202%2012%202z%22%20fill%3D%22%23fff%22%20stroke%3D%22%231a1a1a%22%20stroke-width%3D%221.6%22%20stroke-linejoin%3D%22round%22%2F%3E%3Ccircle%20cx%3D%228.6%22%20cy%3D%2211%22%20r%3D%222.2%22%20fill%3D%22%231a1a1a%22%2F%3E%3Ccircle%20cx%3D%2215.4%22%20cy%3D%2211%22%20r%3D%222.2%22%20fill%3D%22%231a1a1a%22%2F%3E%3Cpath%20d%3D%22M12%2013.6l1.3%202.4h-2.6z%22%20fill%3D%22%231a1a1a%22%2F%3E%3C%2Fsvg%3E"); }
.lw-grid .w.goal.fire.plain::before { background-image: var(--flame-plain); }
.lw-legend i.fire.plain, .lw-tip li i.fire.plain, .lw-plans li i.fire.plain { background: var(--flame-plain) center / contain no-repeat; }
.lw-legend i.diploma, .lw-tip li i.diploma, .lw-plans li i.diploma { background: var(--diploma) center / contain no-repeat; }
.lw-legend i.skull, .lw-tip li i.skull, .lw-plans li i.skull { background: var(--skull) center / contain no-repeat; }
