@layer reset, base, layout, components, utilities;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
  button, input, select, textarea { font: inherit; }
  img, svg { max-width: 100%; }
  button, a { -webkit-tap-highlight-color: transparent; }
  [hidden] { display: none !important; }
}
@layer base {
  :root { --paper: #FFFFFF; --wash: #EDF3F6; --ink: #28211D; --blue: #244E68; --muted: #5A6268; --line: #CCD5DA; --serif: Georgia, 'Times New Roman', serif; --sans: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif; color-scheme: light; }
  html { scroll-padding-top: 24px; }
  body { background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); }
  a { color: var(--blue); text-underline-offset: 4px; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }
  button { cursor: pointer; }
  button, a, input, select, textarea { touch-action: manipulation; }
  :focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
  ::selection { background: #C9DFED; color: var(--ink); }
  h1, h2, h3 { font-family: var(--sans); line-height: 1.2; font-weight: 700; text-wrap: balance; }
  h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); letter-spacing: -.045em; }
  h2 { font-size: 1.85rem; letter-spacing: -.035em; }
  h3 { font-size: 1.45rem; letter-spacing: -.025em; }
  img { display: block; width: 100%; height: auto; object-fit: cover; }
  figcaption { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 8px; }
}
@layer layout {
  .container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
  .preview-note { background: var(--wash); padding: 8px 20px; font-size: 12px; text-align: center; color: var(--blue); }
  .site-header { border-bottom: 1px solid var(--line); }
  .header-inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .brand { display: block; font: 30px/1.1 var(--serif); letter-spacing: -.05em; color: var(--ink); text-decoration: none; }
  .brand span { white-space: nowrap; }
  .nav { display: flex; align-items: center; gap: 28px; }
  .nav > a { color: var(--ink); font-size: 15px; text-decoration: none; padding: 12px 0; }
  .nav > a:hover, .nav > a[aria-current] { color: var(--blue); text-decoration: underline; }
  .home-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; padding: 38px 0 34px; }
  .home-intro h1 { font-size: clamp(2.4rem,4vw,3.25rem); }
  .home-intro p { max-width: 420px; color: var(--muted); font-size: 18px; }
  .lead-section { display: grid; grid-template-columns: 1.05fr 1fr; gap: 42px; align-items: center; padding-bottom: 36px; }
  .lead-photo img { height: 315px; border-radius: 4px; }
  .lead-copy { padding-bottom: 22px; }
  .lead-copy h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin: 13px 0 17px; }
  .lead-copy h2 a { color: var(--ink); text-decoration: none; }
  .lead-copy h2 a:hover { text-decoration: underline; }
  .lead-copy > p { color: var(--muted); font-size: 16px; margin-bottom: 24px; }
  .section { padding-block: 42px; }
  .journal-section { border-top: 1px solid var(--line); }
  .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
  .article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 38px; }
  .story { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 19px; align-items: start; }
  .story-image img { aspect-ratio: 1; border-radius: 3px; }
  .story :is(h2, h3) { font-size: 22px; line-height: 1.25; margin: 8px 0 10px; }
  .story :is(h2, h3) a { color: var(--ink); text-decoration: none; }
  .story :is(h2, h3) a:hover { text-decoration: underline; }
  .story p { font-size: 14px; line-height: 1.65; color: var(--muted); }
  .story .text-link { margin-top: 10px; font-size: 14px; }
  .resource { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; background: var(--wash); border-radius: 5px; padding: 38px 42px; margin-block: 12px 38px; align-items: center; }
  .resource h2 { margin-bottom: 12px; }
  .resource p { color: var(--muted); margin-bottom: 23px; }
  .notes-preview { background: white; border: 1px solid var(--line); border-radius: 3px; padding: 22px 26px; }
  .notes-preview .notes-preview-title { font: 21px/1.35 var(--serif); color: var(--ink); margin-bottom: 15px; }
  .notes-preview dl > div { padding: 9px 0; border-top: 1px solid var(--line); }
  .notes-preview dt { font-size: 13px; color: var(--ink); }
  .notes-preview dd { font-size: 13px; color: var(--muted); }
  .about-brief { max-width: 740px; padding-bottom: 48px; }
  .about-brief h2 { font-size: 24px; margin-bottom: 12px; }
  .about-brief p { color: var(--muted); margin-bottom: 14px; }
  .site-footer { border-top: 1px solid var(--line); padding: 30px 0; }
  .footer-top { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
  .footer-title { font: 22px/1.2 var(--serif); letter-spacing: -.03em; }
  .footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
  .footer-links a { padding-block: 10px; }
  .footer-bottom { color: var(--muted); font-size: 12px; margin-top: 23px; display: grid; gap: 7px; max-width: 850px; }
  .page-intro { max-width: 800px; padding: 44px 0 34px; }
  .page-intro h1 { margin-bottom: 18px; }
  .page-intro > p { font-size: 18px; color: var(--muted); max-width: 68ch; }
  .article-intro { max-width: 870px; padding-top: 27px; }
  .article-intro h1 { margin-top: 15px; }
  .article-cover { margin-bottom: 38px; }
  .article-cover img { width: 100%; height: 380px; border-radius: 4px; }
  .article-layout { display: grid; grid-template-columns: 210px minmax(0, 68ch); gap: 50px; align-items: start; padding-bottom: 40px; }
  .article-aside { position: sticky; top: 24px; font-size: 14px; border-top: 2px solid var(--blue); padding-top: 15px; }
  .article-aside h2 { font-size: 16px; letter-spacing: 0; margin-bottom: 14px; }
  .article-aside ol { list-style: none; margin: 0 0 20px; padding: 0; }
  .article-aside li { margin-bottom: 12px; }
  .article-aside a { color: var(--muted); }
  .article-body { font: 18px/1.75 var(--serif); max-width: 68ch; min-width: 0; }
  .article-body h2 { font-size: 28px; margin: 36px 0 15px; }
  .article-body h3 { font-size: 23px; margin: 26px 0 12px; }
  .article-body p, .article-body ul, .article-body ol { margin-bottom: 20px; }
  .article-body ul, .article-body ol { padding-left: 25px; }
  .article-body li { margin-bottom: 9px; }
  .article-body table { width: 100%; border-collapse: collapse; font: 14px/1.6 var(--sans); margin: 22px 0; }
  .article-body th, .article-body td { border-bottom: 1px solid var(--line); padding: 11px 8px; text-align: left; overflow-wrap: anywhere; }
  .article-body th { background: var(--wash); }
  .article-body blockquote { border-left: 3px solid var(--blue); padding: 18px 23px; margin: 24px 0; background: var(--wash); }
  .editorial-note { background: var(--wash); border-radius: 3px; padding: 17px 20px; color: var(--muted); font: 14px/1.65 var(--sans); margin-bottom: 28px; }
  .policy-body { margin: 0 auto 50px; }
  .about-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 55px; align-items: center; padding: 45px 0; }
  .about-layout h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); margin-bottom: 22px; }
  .about-layout p { color: var(--muted); margin-bottom: 20px; }
  .about-layout img { height: 390px; border-radius: 4px; }
  .about-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 35px; padding: 35px 0 50px; border-top: 1px solid var(--line); }
  .about-values h2 { font-size: 23px; margin-bottom: 12px; }
  .about-values p { color: var(--muted); font-size: 15px; }
  .worksheet { max-width: 900px; padding-bottom: 50px; }
  .worksheet-toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
  .log-entry { padding: 26px; margin-bottom: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
  .entry-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
  .entry-header h2 { font-size: 24px; }
  .remove-entry { border: 0; color: var(--blue); background: transparent; text-decoration: underline; min-height: 44px; padding: 10px; font-size: 14px; }
  .remove-entry:hover { background: var(--wash); }
  .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
  .field.wide { grid-column: 1/-1; }
  .field input, .field select, .field textarea { width: 100%; min-width: 0; background: white; border: 1px solid #7B8992; border-radius: 3px; padding: 11px 12px; min-height: 47px; font-size: 16px; color: var(--ink); }
  .field textarea { min-height: 100px; resize: vertical; }
  .log-footnote { color: var(--muted); font-size: 14px; }
  .tool-privacy { margin-top: 20px; }
  .tool-help { margin-top: 24px; }
  .print-value { display: none; }
  dialog { overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); width: min(700px,calc(100% - 32px)); max-height: 85vh; padding: 28px; }
  dialog::backdrop { background: #28211D99; }
  dialog > label { display: block; margin-bottom: 8px; font-size: 14px; }
  .search-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
  .search-header h2 { font-size: 28px; }
  .search-input { width: 100%; border: 1px solid #7B8992; padding: 13px; border-radius: 3px; font-size: 16px; }
  .search-results { list-style: none; padding: 0; margin: 20px 0 0; }
  .search-results li + li { border-top: 1px solid var(--line); }
  .search-results a { display: block; padding: 15px 0; text-decoration: none; }
  .search-results a:hover strong { text-decoration: underline; }
  .search-results strong { display: block; font-size: 19px; line-height: 1.35; margin-bottom: 5px; }
  .search-results small, .search-status { color: var(--muted); font-size: 13px; }
  .search-status { margin-top: 12px; }
}
@layer components {
  .icon-button { border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 10px; min-width: 44px; min-height: 44px; border-radius: 4px; font-size: 26px; }
  .icon-button:hover { background: var(--wash); }
  .button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 19px; background: var(--blue); border: 1px solid var(--blue); border-radius: 4px; color: white; font-size: 15px; font-weight: 700; text-decoration: none; line-height: 1.4; text-align: center; }
  .button:hover { background: #193B50; text-decoration: underline; }
  .button:disabled { opacity: .6; cursor: default; }
  .button.secondary { background: white; color: var(--blue); }
  .button.secondary:hover { background: var(--wash); }
  .text-link { display: inline-block; font-size: 15px; font-weight: 700; text-decoration: underline; }
  .meta { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; font-size: 13px; color: var(--muted); }
  .meta span:first-child { color: var(--blue); }
  .filters { display: flex; flex-wrap: wrap; gap: 7px; }
  .filter { min-height: 44px; padding: 9px 13px; border: 1px solid #7B8992; border-radius: 4px; background: white; color: var(--blue); font-size: 14px; }
  .filter:hover { border-color: var(--blue); }
  .filter[aria-pressed='true'] { border-color: var(--blue); background: var(--blue); color: white; }
  .breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 24px; font-size: 13px; color: var(--muted); }
}
@layer utilities {
  .skip-link { position: absolute; top: -100px; left: 20px; background: var(--ink); color: white; padding: 13px 20px; z-index: 100; }
  .skip-link:focus { top: 12px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .empty-state { padding: 20px 0; color: var(--muted); }
}
@media (max-width: 1000px) {
  .nav { gap: 20px; }
  .brand { font-size: 27px; }
  .home-intro { gap: 40px; }
  .lead-section { gap: 30px; }
  .article-grid { column-gap: 28px; }
  .story { grid-template-columns: 100px minmax(0, 1fr); gap: 15px; }
  .story :is(h2, h3) { font-size: 20px; }
  .article-layout { grid-template-columns: 175px minmax(0,1fr); gap: 30px; }
  .resource { gap: 32px; padding: 30px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .header-inner { flex-wrap: wrap; gap: 0; padding: 21px 0 8px; }
  .brand { font-size: 29px; width: 100%; margin-bottom: 8px; }
  .nav { width: 100%; justify-content: space-between; gap: 10px; }
  .nav > a { font-size: 14px; }
  .home-intro { grid-template-columns: 1fr; gap: 16px; padding: 27px 0 25px; }
  .home-intro h1 { font-size: clamp(2.2rem,7vw,2.8rem); }
  .home-intro p { font-size: 17px; }
  .lead-section { grid-template-columns: 1fr; gap: 21px; padding-bottom: 29px; }
  .lead-photo img { height: auto; aspect-ratio: 1.65; }
  .lead-copy { padding-bottom: 0; }
  .lead-copy h2 { font-size: 30px; margin: 11px 0 14px; }
  .lead-copy > p { margin-bottom: 20px; }
  .section { padding-block: 31px; }
  .section-heading { margin-bottom: 25px; gap: 17px; }
  .article-grid { grid-template-columns: 1fr; row-gap: 30px; }
  .story { grid-template-columns: 125px minmax(0,1fr); gap: 19px; }
  .story :is(h2, h3) { font-size: 23px; }
  .resource { grid-template-columns: 1fr; gap: 24px; padding: 27px; }
  .about-brief { padding-bottom: 35px; }
  .footer-top { flex-direction: column; align-items: start; gap: 16px; }
  .footer-links { column-gap: 20px; row-gap: 2px; }
  .page-intro { padding-top: 30px; padding-bottom: 27px; }
  .page-intro h1 { font-size: 36px; }
  .page-intro > p { font-size: 17px; }
  .article-cover img { height: auto; aspect-ratio: 1.65; }
  .article-layout { grid-template-columns: 1fr; gap: 28px; }
  .article-aside { position: static; }
  .article-aside ol { display: flex; flex-wrap: wrap; gap: 10px 20px; }
  .article-aside li { margin: 0; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 26px; }
  .about-layout { grid-template-columns: 1fr; gap: 25px; padding: 30px 0; }
  .about-layout img { height: auto; aspect-ratio: 1.5; }
  .about-values { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 440px) {
  .container { width: calc(100% - 36px); }
  .brand { font-size: 28px; }
  .nav { gap: 6px; }
  .nav > a { font-size: 13px; }
  .story { grid-template-columns: 1fr; gap: 15px; }
  .story-image img { aspect-ratio: 1.8; }
  .story :is(h2, h3) { font-size: 25px; }
  .story p { font-size: 15px; }
  .resource { padding: 25px 22px; }
  .notes-preview { padding: 20px; }
  .field-grid { grid-template-columns: 1fr; gap: 17px; }
  .log-entry { padding: 20px; }
  dialog { padding: 22px; }
  .preview-note { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  @page { margin: 15mm; }
  body { background: white; color: black; font-size: 11pt; }
  .site-header, .site-footer, .preview-note, .breadcrumb, .article-aside, .worksheet-toolbar, .remove-entry, .log-footnote, #add-coffee, .worksheet > p, dialog { display: none !important; }
  .container { width: 100%; }
  .page-intro { padding: 0; margin: 0 0 20px; }
  .page-intro h1 { font-size: 27pt; margin: 7px 0 10px; }
  .page-intro > p { font-size: 11pt; }
  .worksheet { padding: 0; }
  .log-entry { break-inside: auto; border: 1px solid #aaa; padding: 15px; margin-bottom: 16px; }
  .entry-header { margin-bottom: 10px; }
  .entry-header h2 { font-size: 16pt; }
  .field-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .field input, .field select, .field textarea { display: none; }
  .print-value { display: block; border-bottom: 1px solid #aaa; padding: 5px 0; min-height: 25px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11pt; color: black; }
  .article-layout { display: block; }
  .article-cover img { max-height: 220px; }
  .article-body h2 { break-after: avoid; }
}


.article-intro .byline { font: 14px/1.6 var(--sans); margin: 0 0 12px; color: var(--muted); }

.setup-teaser { display: grid; grid-template-columns: 1.1fr 1fr; gap: 55px; align-items: start; padding: 5px 0 40px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.setup-teaser h2 { font-size: 27px; margin-bottom: 14px; }
.setup-teaser p { color: var(--muted); margin-bottom: 15px; }
.setup-reminder { border-left: 2px solid var(--blue); padding-left: 24px; }
.setup-reminder h3 { font-size: 22px; margin-bottom: 12px; }
.setup-body { margin: 0 auto 50px; }
.setup-body td, .setup-body th { vertical-align: top; }
.setup-body th[scope="row"] { width: 32%; background: transparent; }
.article-body dl { margin: 18px 0 24px; }
.article-body dt { margin-top: 12px; }
.article-body dd { margin: 3px 0 12px 18px; }
.tool-help { margin: 0 0 30px; max-width: 72ch; }
.tool-help h2 { font-size: 24px; margin-bottom: 12px; }
.tool-help > p { margin-bottom: 12px; color: var(--muted); }
.tool-example { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; margin-top: 20px; }
.tool-example summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.tool-example > p { margin: 14px 0; color: var(--muted); }
.tool-example dl > div { display: grid; grid-template-columns: 175px 1fr; gap: 18px; margin: 8px 0; font-size: 14px; }
.tool-example dd { color: var(--muted); }
@media (max-width: 760px) { .setup-teaser { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 440px) { .tool-example dl > div { grid-template-columns: 1fr; gap: 3px; margin: 13px 0; } }
@media print { .tool-help { display: none !important; } }
