/* lastfrostdate.com
 * Palette (named, all text pairs checked at 7:1 or better on Seed Paper):
 *   Topsoil   #1f1b16  body text (16:1)
 *   Seed Paper #fbf7ee page
 *   Hoarfrost #1d4e6b  links, buttons, the frost side of the ribbon (8.3:1)
 *   Seedling  #2d5f2e  the packet band, headings, the safe side of the ribbon (7.0:1)
 *   Marigold  #b8740a  focus rings and today's marker (non-text, 3.5:1)
 *   Ice #dfecf4 and Leaf #e3f0dc: tints behind notes and calendar rows
 * Type: Literata (headings, numbers on the packet) with Atkinson Hyperlegible (everything else),
 * a face designed for low-vision readers. Body text 20px, line-height 1.6, lines about 65 characters.
 */
:root {
  --topsoil: #1f1b16; --paper: #fbf7ee; --hoarfrost: #1d4e6b; --seedling: #2d5f2e; --marigold: #b8740a;
  --ice: #dfecf4; --leaf: #e3f0dc; --muted: #4a4239; --line: #cfc5b3; --white: #fff;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 125%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--topsoil); font-family: var(--sans); font-size: 1rem; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--hoarfrost); text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 4px solid var(--marigold); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--white); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.wrap.narrow > * { max-width: 46rem; }
.wrap.narrow > p, .wrap.narrow > ul, .wrap.narrow > ol { max-width: 32em; }
.wrap.narrow > .table-wrap { max-width: 100%; }
main { padding-bottom: 3rem; }
main p, main li, main dd { max-width: 32em; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--topsoil); }
h1 { font-size: 2.1rem; margin: 1rem 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin: 2.2rem 0 0.6rem; color: var(--seedling); }
h3 { font-size: 1.2rem; margin: 1.6rem 0 0.4rem; }
@media (max-width: 600px) { h1 { font-size: 1.7rem; } h2 { font-size: 1.35rem; } }
.lede { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; color: var(--muted); }
.byline { color: var(--muted); margin-top: -0.4rem; }

/* header and nav: visible links, wrapping on a phone, no menu button */
.site-header { background: var(--white); border-bottom: 3px solid var(--seedling); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--topsoil); text-decoration: none; min-height: 48px; }
.brand .mark { width: 40px; height: 40px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; font-size: 1rem; }
.nav a[aria-current="page"] { font-weight: 700; color: var(--topsoil); text-decoration-thickness: 0.18em; text-decoration-color: var(--seedling); }
.crumb { margin: 1.2rem 0 0; font-size: 0.95rem; color: var(--muted); }
.crumb a { display: inline-block; padding: 0.4rem 0; }

/* buttons look like buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0.55rem 1.3rem; border: 2px solid var(--hoarfrost); border-radius: 8px; background: var(--hoarfrost); color: var(--white); font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: #163d55; text-decoration: none; }
.actions { margin: 1rem 0; }

/* hero and lookup */
.hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 0.5rem 0 1.6rem; }
.hero h1 { font-size: 2.4rem; margin-top: 1.4rem; }
@media (max-width: 600px) { .hero h1 { font-size: 1.9rem; } }
.needs-js { display: none; }
.js .needs-js { display: block; }
.lookup { margin: 1.2rem 0 0; }
.lookup-h { margin-top: 1.5rem; }
.zip-form label { font-weight: 700; display: block; margin-bottom: 0.3rem; }
.zip-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }
.zip-input { font: 700 1.6rem/1 var(--sans); letter-spacing: 0.12em; width: 8.5em; min-height: 60px; padding: 0.4rem 0.7rem; border: 3px solid var(--topsoil); border-radius: 8px; background: var(--white); color: var(--topsoil); }
.zip-row .btn { min-height: 60px; font-size: 1.1rem; }
.check { display: flex; align-items: center; gap: 0.6rem; margin: 0.8rem 0 0.2rem; }
.check input { width: 28px; height: 28px; flex: none; accent-color: var(--hoarfrost); }
.check label { font-weight: 400; margin: 0; }
.help { color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem; }
.result:not(:empty) { margin-top: 1.5rem; }
.result-h { font-size: 1.6rem; color: var(--topsoil); }
.result-h:focus { outline: none; }

/* the seed packet: the answer card */
.packet { background: var(--white); border: 3px solid var(--seedling); border-radius: 14px; overflow: hidden; margin: 1.2rem 0; box-shadow: 0 2px 0 var(--line); }
.packet-band { background: var(--seedling); color: var(--paper); padding: 0.8rem 1.2rem; border-bottom: 3px dashed var(--paper); }
.packet-band p { margin: 0; max-width: none; }
.packet-for { font-size: 0.95rem; }
.packet-title { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; line-height: 1.2; }
.packet-sub { font-size: 1rem; }
.packet-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 760px) { .packet-grid { grid-template-columns: 1fr 1fr; } }
.pk { padding: 1rem 1.2rem 1.1rem; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .pk:nth-child(odd) { border-right: 1px solid var(--line); } .pk:nth-child(-n+2) { border-top: 0; } }
.pk h3 { margin: 0; font-family: var(--sans); font-size: 1rem; color: var(--muted); font-weight: 700; }
.pk-big { font-family: var(--serif); font-weight: 700; font-size: 2.1rem; line-height: 1.15; margin: 0.15rem 0 0.35rem; color: var(--topsoil); }
.pk-text { margin: 0; }

/* the frost ribbon */
.ribbon { margin: 0.8rem 0 1.2rem; }
.ribbon-svg { display: block; width: 100%; height: 64px; border: 2px solid var(--topsoil); border-radius: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rb-today { display: none; }
.rb-today.on { display: inline; }
.rb-months { position: relative; height: 1.7rem; font-size: 0.85rem; color: var(--muted); }
.rb-months > span { position: absolute; top: 0.2rem; padding-left: 0.25rem; }
.m-short { display: none; }
@media (max-width: 640px) { .m-long { display: none; } .m-short { display: inline; } }
.ribbon figcaption { margin-top: 0.4rem; max-width: 32em; }
.ribbon-key { display: block; margin-bottom: 0.3rem; }
.key { display: inline-block; width: 1.3em; height: 0.9em; border: 1px solid var(--topsoil); vertical-align: -0.05em; margin: 0 0.35em 0 0.6em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.key:first-child { margin-left: 0; }
.key-frost { background: repeating-linear-gradient(45deg, #bcd6e6 0 4px, #7fa7bf 4px 7px); }
.key-fade { background: linear-gradient(90deg, #e8c873, #f6e7b8); }
.key-free { background: #b9dcae; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0.8rem 0 1rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; background: var(--white); font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding: 0 0 0.4rem; font-size: 1rem; }
.cal caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border: 1px solid var(--line); }
thead th { background: var(--leaf); font-size: 0.95rem; }
thead th span { font-weight: 400; }
tbody tr:nth-child(even) { background: #fdfbf6; }
.dates td { white-space: nowrap; }
.list th[scope="row"] { font-weight: 700; }
.stations td:nth-child(2) { text-align: right; }
.also-dates li { margin: 0.4rem 0; }
.cal .cal-month th { background: var(--ice); font-family: var(--serif); font-size: 1.05rem; }
.cal td { border-left-width: 1px; }
.cal tr td:first-child { border-left: 6px solid var(--line); white-space: nowrap; font-weight: 700; }
.cal tr.k-indoor td:first-child { border-left-color: var(--marigold); }
.cal tr.k-cool td:first-child { border-left-color: var(--hoarfrost); }
.cal tr.k-warm td:first-child { border-left-color: var(--seedling); }
.cal tr.k-fall td:first-child { border-left-color: #7a4e1d; }
.cal-why { color: var(--muted); }
@media (max-width: 600px) { .cal-why { display: none; } .cal tr td:first-child { white-space: normal; } }
.note { background: var(--ice); border-left: 6px solid var(--hoarfrost); padding: 0.7rem 1rem; border-radius: 0 6px 6px 0; }
.safer { background: var(--leaf); border-left: 6px solid var(--seedling); padding: 0.7rem 1rem; border-radius: 0 6px 6px 0; }
.near li { margin: 0.4rem 0; }
.aff { border: 2px solid var(--line); border-radius: 8px; padding: 0.4rem 1rem; margin: 1.5rem 0; background: var(--white); }
.aff h2 { font-size: 1.1rem; margin-top: 0.6rem; }

/* prose pages */
.prose h2 { margin-top: 2.4rem; }
.prose blockquote { margin: 1rem 0; padding: 0.4rem 1rem; border-left: 5px solid var(--seedling); background: var(--white); }
.guide-list { padding-left: 1.2rem; }
.guide-list li { margin: 0.7rem 0; }
.sources li { margin: 0.5rem 0; font-size: 0.95rem; }
.more { margin-top: 2rem; }
dl.faq dt { font-weight: 700; margin-top: 1rem; }
dl.faq dd { margin: 0.3rem 0 0; }

/* planner */
.months { display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin: 1rem 0; }
@media (min-width: 700px) { .months { grid-template-columns: 1fr 1fr 1fr; } }
.month { border: 2px solid var(--topsoil); border-radius: 8px; padding: 0.3rem 0.8rem 0.6rem; background: var(--white); break-inside: avoid; }
.month h2 { margin: 0.3rem 0; font-size: 1.15rem; color: var(--topsoil); }
.month ul { list-style: none; padding: 0; margin: 0; }
.month li { display: flex; gap: 0.5rem; margin: 0.35rem 0; font-size: 0.95rem; }
.month .box { flex: none; width: 1em; height: 1em; border: 2px solid var(--topsoil); margin-top: 0.25em; }
.month.empty p { margin: 0.2rem 0; font-size: 0.95rem; }

/* footer */
.site-footer { background: var(--white); border-top: 3px solid var(--seedling); padding: 1.5rem 0 2rem; font-size: 0.95rem; }
.site-footer p { max-width: 50em; margin: 0.5rem 0; }
.foot-brand a { font-weight: 700; }
.foot-links a { display: inline-block; margin-right: 1.1rem; min-height: 44px; padding-top: 0.5rem; }
.foot-src, .copyright { color: var(--muted); }
.print-url { display: none; }

/* print: no nav, no ads, black on white, large type, the page's address at the foot */
@media print {
  @page { margin: 14mm; }
  html { font-size: 12pt; }
  body { background: #fff; color: #000; }
  .site-header, .crumb, .lookup .zip-form, .lookup-h, .no-print, .actions, .skip, .foot-links, .foot-src, .copyright,
  ins.adsbygoogle, .google-auto-placed, .adsbygoogle, iframe { display: none !important; }
  .site-footer { border: 0; padding: 0; background: #fff; }
  .print-url { display: block; font-size: 10pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  h1, h2, h3, .pk-big { color: #000; }
  .packet { border-color: #000; box-shadow: none; break-inside: avoid; }
  .packet-band { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .pk h3, .muted, .small, .help, .cal-why { color: #000; }
  .note, .safer { background: #fff; border-left-color: #000; }
  table { font-size: 10.5pt; }
  th, td { border-color: #555; }
  thead th, .cal .cal-month th { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal-why { display: table-cell; }
  tr, .month { break-inside: avoid; }
  main p, main li { max-width: none; }
  .rb-today { display: none !important; }
  .rb-today-note { display: none; }
  /* "Print this calendar" on a lookup: only the result prints. lookup.js marks the result's
     ancestors with .pr-path; everything off that path is hidden. */
  body.print-result > :not(.pr-path), body.print-result .pr-path > :not(.pr-path):not(.result) { display: none !important; }
  body.print-result .hero { border: 0; padding: 0; background: #fff; }
  body.is-planner h1 { font-size: 18pt; margin-top: 0; }
  body.is-planner .months { grid-template-columns: 1fr 1fr 1fr; gap: 6pt; }
  body.is-planner .month li { font-size: 11pt; }
  body.is-planner .lede { font-size: 12pt; }
}
