/* Family Caregiver Practical Guide — static site styles */

:root {
  --green-900: #1a3f36;
  --green-800: #24564a;
  --ink: #241f1c;
  --ink-soft: #3e3833;
  --paper: #f3efe7;
  --paper-raised: #faf7f2;
  --line: #d4cbbd;
  --line-strong: #1a3f36;
  --gold: #8a5a12;
  --gold-bg: #f8f1e2;
  --takeaway-bg: #e5f0eb;
  --thead: #e7efe9;
  --link: #0e4f42;
  --visited: #4a2c66;
  --header-text: #f4f0e8;
  --placeholder-bg: #fff8e6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, "Noto Sans", sans-serif;
  --shell: 68rem;
  --measure: 40rem;
  --focus: #1a3f36;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

main {
  flex: 1 0 auto;
  padding: 1.75rem 0 3rem;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-header a:focus-visible,
.site-footer a:focus-visible,
.skip-link:focus-visible {
  outline-color: var(--header-text);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--paper-raised);
  color: var(--green-900);
  font-family: var(--sans);
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  z-index: 10;
  text-decoration: underline;
}

.skip-link:focus {
  transform: none;
}

main:focus {
  outline: none;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-header {
  background: var(--green-900);
  color: var(--header-text);
  border-top: 4px solid #d4b483;
}

.site-header .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--header-text);
  text-decoration: none;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.brand span {
  text-decoration: underline;
  text-decoration-color: rgba(244, 240, 232, 0.55);
  text-underline-offset: 0.14em;
}

.site-header a:link,
.site-header a:visited,
.site-footer a:link,
.site-footer a:visited {
  color: var(--header-text);
}

.site-nav ul,
.footer-nav ul,
.footer-guides ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a,
.footer-nav a,
.footer-guides a {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav a[aria-current="page"],
.footer-nav a[aria-current="page"] {
  text-decoration-thickness: 3px;
  font-weight: 700;
}

.prose {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--serif);
  line-height: 1.22;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
  scroll-margin-top: 1rem;
}

.prose h1 {
  font-size: clamp(1.9rem, 1.45rem + 1.4vw, 2.45rem);
  letter-spacing: -0.02em;
  margin: 0.15rem 0 0.75rem;
  max-width: 18em;
}

.prose h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.7rem);
  margin: 2.2rem 0 0.7rem;
  max-width: var(--measure);
}

.prose h3 {
  font-size: 1.22rem;
  margin: 1.5rem 0 0.45rem;
  max-width: var(--measure);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.lede {
  max-width: var(--measure);
}

.prose p,
.lede {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose a:link {
  color: var(--link);
}

.prose a:visited {
  color: var(--visited);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
}

.prose a:hover,
.toc a:hover,
.more a:hover,
.crumbs a:hover {
  text-decoration-thickness: 2px;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.5;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-800);
  margin: 0 0 0.25rem;
}

.byline-meta {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 1.35rem;
  max-width: var(--measure);
}

.crumbs {
  font-family: var(--sans);
  font-size: 1rem;
  margin: 0 0 1.15rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs a:link {
  color: var(--link);
}

.crumbs a:visited {
  color: var(--visited);
}

.crumbs [aria-hidden="true"] {
  color: var(--ink-soft);
  margin-left: 0.35rem;
}

blockquote.note,
blockquote.takeaways {
  margin: 1.15rem 0 1.35rem;
  padding: 0.95rem 1.1rem;
  border-left: 4px solid var(--gold);
  background: var(--gold-bg);
}

blockquote.takeaways {
  border-left-color: var(--green-900);
  background: var(--takeaway-bg);
}

blockquote.note p,
blockquote.takeaways p {
  margin: 0 0 0.5rem;
}

blockquote.note p:last-child,
blockquote.takeaways p:last-child,
blockquote.takeaways ul:last-child {
  margin-bottom: 0;
}

blockquote.takeaways ul {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.article-disclaimer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 1.35rem;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 68rem) {
  .table-wrap {
    box-shadow: inset -14px 0 10px -12px rgba(36, 31, 28, 0.28);
  }
}

table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--thead);
  font-weight: 700;
  border-bottom: 2px solid var(--line-strong);
}

tbody th[scope="row"] {
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: var(--paper-raised);
}

td.checks {
  white-space: nowrap;
}

.sources li + li {
  margin-top: 0.45rem;
}

.toc {
  list-style: decimal-leading-zero;
  margin: 0.5rem 0 0;
  padding: 0 0 0 2.6rem;
  border-bottom: 1px solid var(--line);
}

.toc > li {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0 1.2rem;
}

.toc > li::marker {
  color: var(--green-800);
  font-family: var(--sans);
  font-weight: 700;
}

.toc h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.45rem);
  line-height: 1.28;
  font-weight: 700;
  margin: 0.15rem 0 0.4rem;
  max-width: none;
}

.toc h3 a:link {
  color: var(--link);
}

.toc h3 a:visited {
  color: var(--visited);
}

.toc h3 a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.toc p {
  margin: 0;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.toc .kicker {
  margin: 0;
}

.steps li + li {
  margin-top: 0.55rem;
}

.more {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 1.05rem;
  max-width: var(--measure);
}

.more h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 0 0 0.7rem;
}

.more ul {
  margin: 0;
  padding-left: 1.2rem;
}

.more li + li {
  margin-top: 0.4rem;
}

.more a:link {
  color: var(--link);
}

.more a:visited {
  color: var(--visited);
}

.site-footer {
  background: var(--green-900);
  color: var(--header-text);
  border-top: 4px solid #d4b483;
  padding: 1.75rem 0 2.25rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

.footer-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.footer-tag,
.footer-note,
.footer-copy {
  margin: 0 0 0.85rem;
  max-width: 40rem;
}

.footer-label {
  font-weight: 700;
  margin: 0.4rem 0 0;
}

.footer-guides {
  margin-bottom: 0.85rem;
}

.footer-guides ul {
  gap: 0.1rem 1.1rem;
}

address {
  font-style: normal;
  margin: 0.5rem 0 1rem;
}

.email-placeholder {
  display: inline-block;
  margin: 0.35rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--placeholder-bg);
  border: 2px dashed var(--gold);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  max-width: 100%;
}

.placeholder-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.page-404 h1 {
  max-width: 16em;
}

::selection {
  background: #cfe3da;
  color: var(--ink);
}

@media (min-width: 48rem) {
  .shell {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  main {
    padding-top: 2.25rem;
  }
}

@media (max-width: 40rem) {
  .site-header .shell {
    align-items: flex-start;
  }

  .brand {
    padding-top: 0.35rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .crumbs,
  .more {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    display: block;
  }

  main {
    padding: 0;
  }

  .prose a:link,
  .prose a:visited {
    color: #000;
  }

  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }

  .table-wrap {
    overflow: visible;
    box-shadow: none;
  }

  table {
    min-width: 0;
    font-size: 10pt;
  }

  blockquote.note,
  blockquote.takeaways,
  thead th,
  tbody tr:nth-child(even) {
    background: #fff;
  }

  h1, h2, h3, tr {
    break-inside: avoid;
  }

  @page {
    margin: 0.7in;
  }
}
