/* howtokeepupwithai.com: a weekly planner. A blue-black cover band with
   divider tabs, pale ruled paper, a time column where the budgets hang, and
   one highlighter that marks booked time and nothing else. */
@font-face { font-family: "Literata"; src: url("/fonts/literata-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/literata-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  --paper: #eef1f4;
  --sheet: #f9fafb;
  --cover: #16243d;
  --ink: #15233b;
  --ink-2: #3f4e66;
  --ink-3: #56647a;
  --rule: rgba(21, 35, 59, 0.14);
  --rule-strong: rgba(21, 35, 59, 0.42);
  --blue: #1b45b4;
  --blue-deep: #102c7a;
  --hi: #ffe14d;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 20px;
  --time: 0rem;
  --col: 38rem;
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink-3) var(--paper); scroll-padding-top: 24px; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--serif); color: var(--ink); background: var(--paper); font-variant-numeric: tabular-nums; caret-color: var(--blue); accent-color: var(--blue); }
h1, h2, h3, p, ol, ul, dl, dd, dt, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
p, li, dd, dt, h1, h2, h3 { overflow-wrap: anywhere; }
::selection { background: var(--hi); color: var(--ink); }

a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color 140ms var(--ease), background-color 140ms var(--ease); }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
cite { font-style: italic; }
strong { font-weight: 600; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--hi); color: var(--ink); padding: 8px 12px; z-index: 5; }

.wrap { max-width: calc(72rem + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Cover band. The tabs hang from its lower edge like planner dividers. */
.mast { background: var(--cover); color: #e3e9f2; font-family: var(--display); }
.mast .wrap { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; line-height: 1.2; }
.mast .name { font-size: 1.375rem; font-weight: 600; color: #fff; text-decoration: none; }
a.name:hover { color: var(--hi); }
.mast .by { color: #c3cde0; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.mast .by:hover { color: #fff; }
.mast :focus-visible { outline-color: var(--hi); }
.ulsa-mark { display: inline-block; vertical-align: baseline; margin-left: 4px; }
.tabs ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tabs a { display: flex; align-items: center; min-height: 44px; height: 100%; padding: 6px 12px; font-size: 0.9375rem; line-height: 1.25; font-weight: 500; color: #e3e9f2; text-decoration: none; background: rgba(255, 255, 255, 0.1); border-radius: 8px 8px 0 0; }
.tabs a:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.tabs a[aria-current] { background: var(--paper); color: var(--ink); font-weight: 600; }
.tabs li:nth-child(-n+2) a { border-radius: 8px; }
.tabs li:nth-child(-n+2) { margin-bottom: 0; }

main.wrap { padding-top: 32px; }
article { padding-bottom: 64px; }

/* Title block */
.top h1 { font: 600 2.125rem/1.08 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.top .lede { margin-top: 20px; font-size: 1.125rem; line-height: 1.55; max-width: 40rem; }
.top .meta { margin-top: 16px; font: 400 0.9375rem/1.5 var(--display); color: var(--ink-2); }
.top .open > p + p { margin-top: 16px; }

/* The week figure: the page's one drawn thing. */
.week { --u: 6.5px; margin-top: 32px; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 16px 12px 16px 8px; font-family: var(--display); font-size: 0.8125rem; line-height: 1.3; }
.week figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 0 0 12px 4px; border-bottom: 2px solid var(--ink); font-size: 1.125rem; font-weight: 600; }
.wk-total { font-size: 0.9375rem; font-weight: 400; color: var(--ink-2); }
.wk-total b { display: inline-block; min-width: 2ch; text-align: right; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.wk-grid { display: grid; grid-template-columns: 2.5rem repeat(5, minmax(0, 1fr)) minmax(0, 2.9fr); grid-template-rows: auto auto; }
.wk-day { display: contents; }
.wk-dn { grid-row: 1; grid-column: var(--c); padding: 8px 0 6px; font-weight: 600; text-align: center; border-left: 1px solid var(--rule); }
.wk-track { grid-row: 2; grid-column: var(--c); position: relative; height: calc(var(--max) * var(--u)); border-left: 1px solid var(--rule); border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.wk-track i { display: block; height: calc(10 * var(--u)); border-bottom: 1px solid var(--rule); }
.wk-track i:last-of-type { border-bottom: 0; }
.wk-wide .wk-track, .wk-wide.wk-day .wk-dn { border-right: 1px solid var(--rule); }
.wk-blk { position: absolute; left: 3px; right: 3px; top: 0; height: calc(var(--m) * var(--u)); background: var(--hi); border-radius: 3px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: var(--ink); }
.wk-blk b { font-size: 1.125rem; font-weight: 600; }
.wk-wide .wk-blk { align-items: flex-start; justify-content: flex-start; padding: 8px; gap: 4px; }
.wk-wide .wk-blk b { font-size: 0.8125rem; }
.wk-axis { grid-row: 2; grid-column: 1; position: relative; color: var(--ink-3); font-size: 0.6875rem; }
.wk-axis span { position: absolute; right: 6px; top: calc(var(--at) * var(--u)); transform: translateY(-50%); white-space: nowrap; }
.wk-axis span:first-child { transform: none; }
.wk-axis span:last-child { transform: translateY(-100%); }
.wk-note { grid-row: 2; grid-column: 2 / 7; align-self: start; justify-self: start; margin: calc(var(--m) * var(--u) + 8px) 8px 0 9px; padding: 4px 8px 6px; position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 3px; color: var(--ink-2); max-width: 21rem; }
.wk-note b { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.wk-later { margin: 16px 0 0 4px; }
.wk-later > p { font-weight: 600; font-size: 0.9375rem; }
.wk-later dl { margin-top: 6px; border-top: 1px solid var(--rule); }
.wk-later dl > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.wk-later dt { font-weight: 600; }
.wk-later dd { color: var(--ink-2); }
.wk-cap { margin: 12px 0 0 4px; color: var(--ink-3); }

/* Body: the flow sits right of the time column and its margin line. */
.cols { margin-top: 8px; }
.side { display: none; }
section, .ulsa, .also { margin-top: 56px; }
h2 { font: 600 1.5rem/1.2 var(--display); letter-spacing: -0.01em; margin-bottom: 16px; padding-top: 14px; border-top: 2px solid var(--ink); text-wrap: balance; }
h3 { font: 600 1.1875rem/1.3 var(--display); }
p + p, p + ul, p + ol, p + dl, p + table, ul + p, ol + p, dl + p, table + p, dl + h3, .rules + p { margin-top: 16px; }

/* Hanging labels. Above the heading on small screens, in the time column on
   wide ones. Booked time carries the highlighter. */
.hang { position: relative; }
.budget { font: 600 0.9375rem/1.5 var(--display); color: var(--ink); }
.steps .budget, section.hang > .budget { display: table; background: var(--hi); padding: 1px 8px; border-radius: 3px; margin-bottom: 8px; }
section.hang:has(> .budget) { display: flex; flex-direction: column; }
section.hang:has(> .budget) > * { order: 2; }
section.hang > h2 { order: 0 !important; }
section.hang > .budget { order: 1 !important; align-self: flex-start; margin: -4px 0 16px; }
.src .budget { font-size: 0.875rem; }

/* The routine and other ordered steps */
.steps { counter-reset: step; }
.steps > li { counter-increment: step; border-top: 1px solid var(--rule); padding: 20px 0 24px; }
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps h3::before { content: counter(step) ". "; font-weight: 400; color: var(--ink-3); }
.steps h3 + p, .rules h3 + p { margin-top: 8px; }
.steps p + p { margin-top: 12px; }

.rules > div { border-top: 1px solid var(--rule); padding: 20px 0 24px; }
.rules > div:last-child { border-bottom: 1px solid var(--rule); }

/* Counts with their sources: a ruled two-column table, numerals to the right */
.counts { width: 100%; border-collapse: collapse; }
.counts thead th { font: 500 0.875rem/1.4 var(--display); color: var(--ink-3); text-align: left; padding: 0 0 8px; border-bottom: 1px solid var(--rule-strong); }
.counts thead th:first-child, .counts tbody th { text-align: right; padding-right: 16px; white-space: nowrap; width: 1%; }
.counts tbody th { font: 600 1.125rem/1.5 var(--display); vertical-align: top; padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.counts td { vertical-align: top; padding: 14px 0; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); padding-left: 16px; }

.defs > div { border-top: 1px solid var(--rule); padding: 16px 0 20px; }
.defs > div:last-child { border-bottom: 1px solid var(--rule); }
.defs dt { font: 600 1.0625rem/1.4 var(--display); }
.defs dd { margin-top: 4px; }

.plain > li { position: relative; padding-left: 1.25em; }
.plain > li + li { margin-top: 8px; }
.plain > li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.5em; height: 1px; background: var(--ink-3); }

/* Sources by role */
.filter { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font: 500 1rem/1.4 var(--display); }
.filter[hidden] { display: none; }
.filter select { font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 8px; padding: 10px 12px; min-height: 44px; max-width: 100%; }
.role[hidden] { display: none; }
.role h2 .n { font-size: 0.9375rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); white-space: nowrap; margin-left: 6px; }
.sources { margin-top: 24px; }
.src { border-top: 1px solid var(--rule); padding: 20px 0 24px; }
.src:last-child { border-bottom: 1px solid var(--rule); }
.src h3 a { color: var(--ink); text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.src h3 a:hover { color: var(--blue-deep); }
.src .who { font: 400 0.9375rem/1.5 var(--display); color: var(--ink-2); }
.src .say { margin-top: 12px; }
.spec { margin-top: 12px; font-size: 1rem; line-height: 1.55; }
.spec > div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); column-gap: 12px; }
.spec > div + div { margin-top: 4px; }
.spec dt { font: 500 0.875rem/1.75 var(--display); color: var(--ink-3); }
.note { margin-top: 16px; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.changed h3 { margin-top: 40px; margin-bottom: 8px; }

/* Newsletter picks: one ruled table in its own scroll container */
.scroll { margin: 24px 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.picks table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.picks caption { text-align: left; font: 400 0.9375rem/1.5 var(--display); color: var(--ink-2); padding-bottom: 10px; }
.picks th, .picks td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-top: 1px solid var(--rule); font-weight: 400; }
.picks thead th { font: 500 0.875rem/1.4 var(--display); color: var(--ink-3); border-top: 0; padding-top: 0; padding-bottom: 8px; }
.picks tbody tr:first-child > * { border-top-color: var(--rule-strong); }
.picks tbody th { font: 600 1rem/1.5 var(--display); }
.picks tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }

/* The one call to action: a note clipped to the page */
.ulsa { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 20px; }
.ulsa h2 { font-size: 1.25rem; border-top: 0; padding-top: 0; margin-bottom: 8px; }
.go { font: 600 1.0625rem/1.5 var(--display); color: var(--ink); text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.ulsa .go { display: inline-block; background: var(--hi); padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.ulsa .go:hover { background: var(--ink); color: #fff; }
.spec + p { margin-top: 12px; }

/* Page-to-page links, with what each page holds */
.also h2 { font-size: 1.0625rem; margin-bottom: 0; padding-bottom: 12px; }
.also li { border-top: 1px solid var(--rule); padding: 12px 0; }
.also li:first-child { border-top: 0; padding-top: 0; }
.also li:last-child { border-bottom: 1px solid var(--rule); }
.also a { font: 600 1.0625rem/1.4 var(--display); }
.also span { display: block; font-size: 1rem; color: var(--ink-2); }

.colophon { padding: 28px 0 44px; background: var(--cover); color: #c3cde0; font: 400 0.9375rem/1.6 var(--display); }
.colophon a { color: #fff; }
.colophon a:hover { color: var(--hi); }
.colophon :focus-visible { outline-color: var(--hi); }

@media (min-width: 30rem) {
  .week { padding: 20px 20px 20px 16px; font-size: 0.875rem; }
  .wk-grid { grid-template-columns: 2.75rem repeat(5, minmax(0, 1fr)) minmax(0, 2.5fr); }
  .wk-axis { font-size: 0.75rem; }
  .wk-wide .wk-blk { padding: 10px; gap: 6px; }
  .wk-wide .wk-blk b, .wk-note b { font-size: 0.9375rem; }
}

@media (min-width: 44rem) {
  :root { --gutter: 32px; }
  body { font-size: 1.125rem; }
  .mast .wrap { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 24px; }
  .brand { padding-bottom: 14px; }
  .tabs ul { display: flex; gap: 4px; }
  .tabs a { min-height: 44px; padding: 8px 16px; white-space: nowrap; }
  .tabs li:nth-child(-n+2) a { border-radius: 8px 8px 0 0; }
  main.wrap { padding-top: 48px; }
  .top h1 { font-size: 3rem; line-height: 1.04; letter-spacing: -0.02em; max-width: 46rem; }
  .top .lede { font-size: 1.25rem; }
  section, .ulsa, .also { margin-top: 72px; }
  .week { --u: 7px; }
  .spec > div { grid-template-columns: 6rem minmax(0, 1fr); }
  .ulsa { padding: 28px; }
}

/* Wide screens: title block in two columns, the time column with its margin
   line on the left of the flow, the index of the page on the right. */
@media (min-width: 70rem) {
  :root { --time: 9rem; }
  .mast .name { font-size: 1.5rem; }
  main.wrap { padding-top: 0; }
  /* the margin line carries a planner's ruling: one long tick, three short */
  article { margin-left: var(--time); padding: 56px 0 88px 2rem; border-left: 1px solid var(--rule-strong); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='48'%3E%3Cpath d='M0 .5h9M0 12.5h4M0 24.5h4M0 36.5h4' stroke='%2315233b' stroke-opacity='.32'/%3E%3C/svg%3E") repeat-y left top; }
  .top h1 { font-size: 3rem; }
  .top.with-fig { display: grid; grid-template-columns: minmax(0, 1fr) 31rem; column-gap: 3rem; align-items: start; }
  .week { margin-top: 6px; }
  .cols { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); column-gap: 4rem; align-items: start; }
  .top + .cols { margin-top: 72px; }
  .flow > :first-child { margin-top: 0; }
  .flow > .top + section { margin-top: 56px; }
  .budget, .steps .budget, section.hang > .budget { position: absolute; display: block; right: 100%; top: 0; margin: 0 3rem 0 0; width: max-content; max-width: calc(var(--time) - 1.5rem); text-align: right; }
  .steps > li > .budget, .src > .budget { top: 21px; }
  section.hang > .budget { top: 16px; }
  section.hang:has(> .budget) { display: block; }
  .src .budget { font-size: 0.9375rem; }
  /* a tick on the margin line where a label hangs */
  .hang:has(> .budget)::before { content: ""; position: absolute; left: calc(-2rem - 12px); top: 32px; width: 12px; height: 2px; background: var(--ink); }
  section.hang:has(> .budget)::before { top: 28px; }
  .side { display: block; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; font-family: var(--display); }
  .toc h2 { font-size: 0.9375rem; letter-spacing: 0; margin-bottom: 4px; padding-top: 12px; }
  .toc li { border-bottom: 1px solid var(--rule); }
  .toc a { display: inline-block; padding: 7px 0; font-size: 0.9375rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
  .toc a:hover { color: var(--blue); text-decoration: underline; }
  .toc li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .toc span { font-size: 0.875rem; color: var(--ink-3); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .filter, .skip, .tabs, .side { display: none; }
  a { color: inherit; }
}

/* AI disclosure line (added by the build) keeps the colophon's gutters */
.colophon .ai-note { max-width: calc(72rem + 2 * var(--gutter)) !important; margin: 8px auto 0 !important; padding: 0 var(--gutter) 24px; }
