:root {
  color-scheme: light;
  --ink: #1e293b;
  --accent: #c25e3e;
  --muted: #64748b;
  --border: #cbd5e1;
  font-family: Calibri, Aptos, Arial, sans-serif;
  color: var(--ink);
  background: #f2f1ed;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1240px; margin: 0 auto; padding: 28px 30px 45px; }
a { color: inherit; }
.brand { font-size: 18px; font-weight: 700; text-decoration: none; }
.brand span { color: var(--accent); }
.intro .eyebrow { margin-top: 32px; }
.eyebrow { font-size: 11px; letter-spacing: .15em; font-weight: 700; color: var(--accent); margin: 0 0 7px; }
h1 { font-size: clamp(28px, 4vw, 43px); letter-spacing: -.035em; margin: 0 0 8px; }
.intro > p:last-child { color: var(--muted); margin: 0 0 22px; font-size: 16px; }
.controls { border: 1px solid #dddcd6; padding: 18px 20px 10px; border-radius: 12px; background: white; margin-bottom: 23px; }
.control-row, .action-row { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.control-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; }
.location-field { flex: 1; min-width: 190px; }
select, input, button { font: inherit; }
select, input { height: 39px; border: 1px solid var(--border); border-radius: 6px; background: white; color: var(--ink); padding: 7px 10px; min-width: 0; font-size: 14px; }
button { cursor: pointer; border: 1px solid var(--border); border-radius: 6px; padding: 9px 14px; font-size: 14px; font-weight: 700; min-height: 39px; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #c25e3e77; outline-offset: 2px; }
.secondary { background: white; color: var(--ink); }
.primary { background: var(--ink); color: white; border-color: var(--ink); }
.refresh { background: #fbefe9; color: #a1462c; border-color: #ebc6b8; margin-left: auto; }
.view-switch { margin: 0; border: 0; padding: 0; display: flex; gap: 3px; }
.view-switch legend { font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.view-switch button { background: #f1f5f9; }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
details { margin-top: 14px; }
summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.custom-fields { margin-top: 12px; }
.custom-fields input { width: 155px; }
.custom-fields select { max-width: 215px; }
.helper { font-size: 12px; color: var(--muted); }
.action-row { margin-top: 17px; border-top: 1px solid #e7e9ed; padding-top: 15px; }
.navigation { display: flex; gap: 5px; }
#status { font-size: 12px; color: var(--muted); min-height: 16px; margin: 12px 0 0; }
#status.error { color: #a73a25; }
.coverage { font-size: 12px; color: var(--ink); margin: 6px 0 2px; }
.coverage:empty { display: none; }
.paper-scroll { overflow-x: auto; padding: 2px 2px 14px; }
.paper { background: white; padding: 30px 32px 25px; min-width: 860px; box-shadow: 0 4px 25px #1e293b0d; border: 1px solid #e4e4df; }
.paper-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.paper-header h2 { margin: 0 0 5px; font-size: 29px; line-height: 1.1; letter-spacing: -.025em; }
.year { color: var(--accent); background: #fbefe9; padding: 2px 7px; font-size: .72em; margin-left: 6px; vertical-align: middle; }
#place-caption { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.quarter { font-size: 11px; color: var(--muted); margin-top: 23px; white-space: nowrap; }
.planning-bar { display: grid; grid-template-columns: repeat(3, 1fr); background: #f8fafc; border: 1px solid var(--border); margin-bottom: 12px; }
.planning-bar label { padding: 9px 10px 5px; display: block; }
.planning-bar label + label { border-left: 1px solid var(--border); }
.planning-bar span { font-size: 11px; font-weight: 700; display: block; margin-bottom: 4px; }
.planning-bar b { color: var(--accent); font-size: 14px; margin-right: 5px; }
textarea { font: inherit; color: var(--ink); background: transparent; border: 0; border-radius: 0; padding: 0; resize: none; width: 100%; display: block; }
textarea::placeholder { color: #94a3b8; }
.planning-bar textarea { font-size: 12px; height: 33px; line-height: 16px; }
.calendar { width: 100%; table-layout: fixed; border-collapse: collapse; }
.calendar th { background: var(--ink); color: white; font-size: 11px; height: 30px; font-weight: 700; border: 1px solid var(--border); }
.calendar th:nth-child(n+6) { background: #334155; }
.calendar td { border: 1px solid var(--border); padding: 7px; vertical-align: top; height: 114px; overflow-wrap: anywhere; }
.calendar td.weekend { background: #f8fafc; }
.calendar td.overflow { background: #f1f5f9; }
.date-number { text-align: right; font-size: 15px; font-weight: 700; line-height: 19px; }
.overflow .date-number { font-weight: 400; color: #94a3b8; }
.is-today .date-number span { background: #fbefe9; color: #b35132; border-radius: 3px; padding: 0 5px; }
.weather-line { display: flex; align-items: center; gap: 5px; min-height: 25px; margin: 3px 0 0; }
.weather-line svg { width: 25px; height: 25px; flex: none; }
.temperature { font-weight: 700; font-size: 13px; }
.forecast-time { font-size: 9px; color: var(--muted); margin: 0 0 5px 30px; min-height: 12px; }
.day-notes { font-size: 12px; line-height: 16px; height: 46px; }
.week-view .calendar td { height: 340px; }
.week-view .day-notes { height: 240px; line-height: 20px; background-image: repeating-linear-gradient(transparent, transparent 19px, #e8edf2 19px, #e8edf2 20px); }
.six-weeks .calendar td { height: 98px; }
.six-weeks .day-notes { height: 29px; }
.paper-footer { margin-top: 11px; font-size: 10px; line-height: 1.4; color: var(--muted); }
.paper-footer p { margin: 2px 0; }
.footnote { margin: 7px 3px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.print-notes, .print-planning { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
/* Embedded view shares the article's heading and uses the available width. */
@media screen {
  .embedded-calendar, .embedded-calendar body { background: white; }
  .embedded-calendar main { max-width: none; padding: 2px 0 12px; }
  .embedded-calendar .intro { display: none; }
  .embedded-calendar .controls { border-color: var(--border); }
  .embedded-calendar .paper-scroll { margin: 0; }
  .embedded-calendar .paper-scroll:focus-visible { outline: 3px solid #c25e3e77; outline-offset: -3px; }
}
@media (max-width: 680px) {
  main { padding: 22px 13px; }
  .controls { padding: 15px; }
  .location-field { flex-basis: 100%; }
  .refresh { margin-left: 0; }
  .action-row { gap: 8px; }
  .paper-scroll { margin-right: -13px; }
  .intro .eyebrow { margin-top: 25px; }
}
@page { size: letter landscape; margin: .4in .5in; }
@media print {
  :root, body { background: white; }
  .no-print { display: none !important; }
  main { width: auto; max-width: none; padding: 0; margin: 0; }
  .paper-scroll { overflow: visible; padding: 0; margin: 0; }
  .paper { width: 10in; min-width: 0; max-width: 100%; border: 0; padding: 0; box-shadow: none; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .paper-header { margin-bottom: 9pt; }
  .paper-header h2 { font-size: 22pt; }
  .paper-header .eyebrow { font-size: 7pt; margin-bottom: 3pt; }
  #place-caption { font-size: 8pt; margin-top: 4pt; }
  .quarter { font-size: 8pt; margin-top: 15pt; }
  .planning-bar { margin-bottom: 7pt; }
  .planning-bar label { padding: 4pt 5pt; }
  .planning-bar span { font-size: 8pt; margin-bottom: 3pt; }
  textarea { display: none; }
  .print-notes, .print-planning { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 8pt; line-height: 10pt; }
  .print-planning { height: 22pt; overflow: hidden; }
  .calendar th { height: 22pt; font-size: 9pt; }
  .calendar td { height: 74pt; padding: 3pt 4pt; }
  .six-weeks .calendar td { height: 62pt; }
  .week-view .calendar td { height: 330pt; }
  .date-number { font-size: 10.5pt; line-height: 11pt; }
  .overflow .date-number { font-size: 9.5pt; }
  .weather-line { min-height: 16pt; margin-top: 2pt; gap: 3pt; }
  .weather-line svg { height: 16pt; width: 16pt; }
  .temperature { font-size: 9pt; }
  .forecast-time { font-size: 6.5pt; line-height: 8pt; min-height: 8pt; margin: 0 0 2pt 19pt; }
  .print-notes { font-size: 7.5pt; line-height: 8.5pt; min-height: 17pt; }
  .week-view .print-notes { max-height: 270pt; }
  .paper-footer { font-size: 6.5pt; line-height: 1.2; margin-top: 6pt; }
  .paper-footer a { text-decoration: none; }
  tr { break-inside: avoid; page-break-inside: avoid; }
}
