/* The Monday List: drawing sheets on a cutting mat */
/* Fonts are stored in the fonts folder, so the site calls no outside service. Both are free under the SIL Open Font Licence (see fonts/OFL-*.txt). */
@font-face { font-family: "Allerta Stencil"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/allerta-stencil-latin.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("fonts/archivo-variable-latin.woff2") format("woff2"); }

:root {
  --mat: #2f6b4f;
  --mat-deep: #24543e;
  --mat-line: rgba(255, 255, 255, 0.1);
  --mat-text: #e9f2ec;
  --sheet: #f3f6f4;
  --ink: #16223a;
  --ink-soft: #46536f;
  --rule: #b9c2cc;
  --red: #c7371e;
  --red-wash: rgba(199, 55, 30, 0.1);
  --stencil: "Allerta Stencil", "Archivo", Arial, sans-serif;
  --text: "Archivo", Arial, Helvetica, sans-serif;
  --pad: clamp(1.1rem, 2.6vw, 2.25rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-color: var(--ink) var(--mat-deep); }
body {
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.07) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 2px, transparent 2px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--red); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sheet); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- the sheet ---------- */
.mat { padding: clamp(0.6rem, 1.7vw, 1.5rem) clamp(0.6rem, 2.4vw, 2.25rem) clamp(0.6rem, 2.4vw, 2.25rem); display: grid; gap: clamp(1rem, 3vw, 2.75rem); }
.sheet {
  position: relative;
  width: 100%;
  max-width: 86rem;
  margin: 0 auto;
  background: var(--sheet);
  padding: clamp(0.55rem, 1.5vw, 1.35rem);
  box-shadow: 0 18px 34px -14px rgba(6, 28, 20, 0.6), 0 2px 5px rgba(6, 28, 20, 0.28);
}
.frame { border: 2px solid var(--ink); position: relative; }
.frame > .body { padding: var(--pad); }
#top .body { padding-top: clamp(1rem, 1.9vw, 1.6rem); padding-bottom: clamp(1rem, 1.9vw, 1.5rem); }
/* margin references, like a real sheet */
.ticks { position: absolute; display: flex; justify-content: space-around; font: 600 0.7rem/1 var(--text); letter-spacing: 0.08em; color: var(--ink-soft); pointer-events: none; }
.ticks.top { left: 0; right: 0; top: 0; height: clamp(0.55rem, 1.5vw, 1.35rem); align-items: center; }
.ticks.side { top: 0; bottom: 0; left: 0; width: clamp(0.55rem, 1.5vw, 1.35rem); flex-direction: column; align-items: center; }
@media (max-width: 47.99rem) { .ticks { display: none; } }

h1, h2, .stencil { font-family: var(--stencil); font-weight: 400; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.2vw, 4.4rem); line-height: 1; max-width: 13.4em; }
h1 em { font-style: normal; color: var(--red); }
h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.04; max-width: 18em; }
h3 { font: 700 0.78rem/1 var(--text); font-stretch: 85%; letter-spacing: 0.14em; text-transform: uppercase; padding-bottom: 0.6rem; border-bottom: 1.5px solid var(--ink); margin-bottom: 0.95rem; }
p { max-width: 66ch; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.45; max-width: 54ch; margin-top: 1rem; }
.small { font-size: 0.95rem; color: var(--ink-soft); }
.example { display: inline-block; font: 700 0.72rem/1 var(--text); font-stretch: 85%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); border: 1.5px solid var(--ink); padding: 0.32rem 0.45rem; }

/* ---------- top line of the first sheet ---------- */
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.9rem; margin-bottom: clamp(1.2rem, 2vw, 1.6rem); }
.nav .name { font: 400 1.35rem/1 var(--stencil); margin-right: auto; text-decoration: none; }
.nav a.nav-go { background: var(--red); color: #fff; text-decoration: none; padding: 0.62rem 0.85rem; white-space: nowrap; transition: background 0.25s var(--ease); }
.nav a.nav-go:hover { background: #a92c16; color: #fff; }
.nav a:not(.name) { font: 600 0.82rem/1 var(--text); font-stretch: 87%; letter-spacing: 0.1em; text-transform: uppercase; }
.nav a:not(.name):not(.nav-go) { padding: 0.35rem 0; }

/* ---------- hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(16rem, 21.5rem) 1fr; grid-template-areas: "notes plan" "switch plan"; grid-template-rows: auto 1fr; gap: 0 clamp(1.5rem, 3vw, 3rem); align-items: start; margin-top: clamp(1.4rem, 2.2vw, 1.9rem); }
.notes { grid-area: notes; }
.switchwrap { grid-area: switch; }
.plan { grid-area: plan; }
.notes ol { list-style: none; counter-reset: n; display: grid; gap: 0.9rem; }
.notes li { counter-increment: n; position: relative; padding-left: 2.2rem; }
.notes li::before { content: counter(n); position: absolute; left: 0; top: 0.12rem; width: 1.45rem; height: 1.45rem; border: 1.5px solid var(--ink); border-radius: 50%; font: 700 0.78rem/1.3rem var(--text); text-align: center; }
.switch { border: 1.5px solid var(--ink); display: inline-flex; margin-top: 1.6rem; }
.switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch label { font: 600 0.8rem/1 var(--text); font-stretch: 87%; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.8rem 1rem; cursor: pointer; transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.switch label:hover { background: rgba(22, 34, 58, 0.08); }
.switch input:checked + label { background: var(--ink); color: #fff; }
.switch #v-pr:checked + label { background: var(--red); }
.switch input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 3px; }
.switch-note { margin-top: 0.7rem; font-size: 0.95rem; color: var(--ink-soft); max-width: 30ch; }

.plan { overflow: hidden; }
.plan svg { width: 100%; height: auto; max-height: 25rem; }
.plan .keys { display: none; }
.plan .keys circle { fill: var(--sheet); stroke: var(--ink); stroke-width: 2; }
.plan .keys text { font-size: 19px; font-weight: 700; }
.plan text { font-family: var(--text); fill: var(--ink); }
.plan .st { font-family: var(--stencil); }
.only-ex { opacity: 0; transition: opacity 0.3s var(--ease); }
.only-pr { transition: opacity 0.3s var(--ease); }
.sheet:has(#v-ex:checked) .only-ex { opacity: 1; }
.sheet:has(#v-ex:checked) .only-pr { opacity: 0; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  /* .ready is added by a line of script once the browser is painting, so the red walls are never left hidden */
  .sheet.ready:has(#v-pr:checked) .draw { animation: draw 1.3s var(--ease) 0.15s both; }
  .sheet.ready:has(#v-pr:checked) .wash { animation: wash 0.7s var(--ease) 0.9s both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes wash { from { opacity: 0; } to { opacity: 0.55; } }
.legend { display: none; list-style: none; margin-top: 0.8rem; gap: 0.5rem; }
.legend li { display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.98rem; line-height: 1.35; }
.legend b { flex: none; width: 1.45rem; height: 1.45rem; border: 1.5px solid var(--ink); border-radius: 50%; font: 700 0.78rem/1.3rem var(--text); text-align: center; }
.legend .ex-item, .sheet:has(#v-ex:checked) .legend .pr-item { display: none; }
.sheet:has(#v-ex:checked) .legend .ex-item { display: flex; }

/* ---------- title block ---------- */
.titleblock { border-top: 2px solid var(--ink); display: grid; grid-template-columns: 1.35fr 1.45fr 1fr 1.1fr 1fr 1.5fr; }
.titleblock > * { padding: 0.95rem 1.05rem 1.05rem; border-right: 1.5px solid var(--ink); min-width: 0; }
.titleblock > *:last-child { border-right: 0; }
.titleblock dt, .tb-label { display: block; font: 700 0.72rem/1 var(--text); font-stretch: 85%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.55rem; }
.titleblock dd, .tb-value { font: 600 1.18rem/1.3 var(--text); font-stretch: 90%; }
.tb-who { display: flex; gap: 0.7rem; align-items: center; }
.tb-who img { width: 2.6rem; height: 2.6rem; flex: none; }
.tb-who .tb-value { font: 700 1.12rem/1.15 var(--text); font-stretch: 92%; }
.go { background: var(--red); color: #fff; text-decoration: none; display: block; transition: background 0.25s var(--ease); }
.go:hover { background: #a92c16; color: #fff; }
.go:focus-visible { outline-color: var(--ink); outline-offset: -6px; box-shadow: inset 0 0 0 3px #fff; }
.go .tb-label { color: #fff; }
.go .tb-value { font: 400 clamp(1.25rem, 1.9vw, 1.6rem)/1.12 var(--stencil); display: block; }
.go .tb-sub { display: block; font: 500 0.95rem/1.3 var(--text); margin-top: 0.45rem; }

/* small title strip on the later sheets */
.strip { border-top: 2px solid var(--ink); display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem var(--pad); font: 600 0.72rem/1.2 var(--text); font-stretch: 87%; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- sheet 2: schedule and letter ---------- */
.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(1.6rem, 3vw, 2.6rem); align-items: start; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { text-align: left; }
th { font: 700 0.72rem/1.3 var(--text); font-stretch: 85%; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-soft); text-align: left; padding: 0 0.9rem 0.55rem 0; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
td { padding: 0.8rem 0.9rem 0.85rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 1rem; line-height: 1.38; }
td:last-child, th:last-child { padding-right: 0; }
td strong { font-weight: 650; }
.group th { font: 700 1.05rem/1.2 var(--text); letter-spacing: 0; text-transform: none; color: var(--ink); padding: 1.6rem 0 0.55rem; border-bottom: 1.5px solid var(--ink); }
.group:first-child th { padding-top: 1rem; }
.ref { font-weight: 600; font-stretch: 88%; white-space: nowrap; font-size: 0.92rem; }
.is-approved { font-weight: 700; }
.letter { background: #fff; border: 1.5px solid var(--ink); padding: clamp(1.1rem, 2vw, 1.7rem); position: relative; font-size: 0.98rem; line-height: 1.5; }
.letter p + p { margin-top: 0.8rem; }
.letter .slot { border-bottom: 1.5px dashed var(--ink); font-weight: 650; }
.letter .foot { font-size: 0.86rem; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 0.75rem; margin-top: 1rem; }
.detail-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

/* ---------- sheet 3: areas ---------- */
.cols.even { grid-template-columns: 1fr 1fr; align-items: center; }
.key svg { max-width: 31rem; }
.key svg text { font-family: var(--text); fill: var(--ink); }
.key .st { font-family: var(--stencil); }
.num { font: 400 1.5rem/1 var(--stencil); white-space: nowrap; }
.num small { font: 500 0.85rem/1 var(--text); color: var(--ink-soft); }

/* ---------- sheet 4: terms ---------- */
.rev td:first-child { font: 400 1.5rem/1 var(--stencil); width: 2.6rem; }
.general { list-style: none; counter-reset: g; display: grid; gap: 0.85rem; }
.general li { counter-increment: g; padding-left: 2.2rem; position: relative; max-width: 46ch; }
.general li::before { content: counter(g); position: absolute; left: 0; top: 0.12rem; width: 1.45rem; height: 1.45rem; border: 1.5px solid var(--ink); border-radius: 50%; font: 700 0.78rem/1.3rem var(--text); text-align: center; }
.general strong { font-weight: 650; }
.ask { margin-top: clamp(1.8rem, 3.5vw, 3rem); border: 2px solid var(--ink); display: grid; grid-template-columns: 1fr auto; }
.ask > div { padding: 1.2rem 1.3rem; }
.ask p { font-size: 1.05rem; }
.ask .go { display: flex; flex-direction: column; justify-content: center; padding: 1.2rem 1.6rem; border-left: 2px solid var(--ink); }

/* ---------- sheet 5: homeowners ---------- */
.home { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: end; }
.home .phone { font: 400 clamp(1.9rem, 3.6vw, 3rem)/1 var(--stencil); text-decoration: none; display: inline-block; margin: 0.35rem 0 0.6rem; }
.home p + p { margin-top: 0.8rem; }
.stopbox { border: 2px solid var(--ink); padding: 1.2rem 1.3rem; }

/* ---------- footer on the mat ---------- */
.matfoot { color: var(--mat-text); max-width: 86rem; margin: 0 auto; padding: 0.5rem clamp(0.9rem, 2.6vw, 2.4rem) 2.5rem; display: flex; flex-wrap: wrap; gap: 0.6rem 2.2rem; font-size: 0.95rem; }
.matfoot a:hover { color: #fff; }
.matfoot :focus-visible { outline-color: #fff; }
.matfoot .grow { margin-right: auto; }

/* ---------- letters page (reading) ---------- */
.read h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.read h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 2.4rem 0 0.7rem; }
.read p, .read li { max-width: 68ch; }
.read p + p, .read ul + p, .read p + ul { margin-top: 0.8rem; }
.read ul { padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.read .stopbox { margin: 1.8rem 0 0.5rem; max-width: 44rem; }
.read .stopbox .phone { font: 400 clamp(1.8rem, 4vw, 2.6rem)/1.1 var(--stencil); text-decoration: none; display: inline-block; margin: 0.3rem 0; }
.todo { background: #ffe9a8; padding: 0.05rem 0.3rem; font-weight: 600; }

/* ---------- smaller screens ---------- */
@media (max-width: 68rem) {
  .titleblock { grid-template-columns: repeat(3, 1fr); }
  .titleblock > *:nth-child(3) { border-right: 0; }
  .titleblock > *:nth-child(-n + 3) { border-bottom: 1.5px solid var(--ink); }
  .titleblock > .go { grid-column: span 1; }
  .cols, .cols.even, .home { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "plan" "switch" "notes"; grid-template-rows: auto; }
  .plan svg { max-height: none; }
  .switch { margin-top: 1rem; }
  .notes { margin-top: 1.6rem; }
}
@media (max-width: 55rem) {
  .plan svg { width: 184%; max-width: none; max-height: none; margin-left: -27%; }
  .plan .callouts { display: none; }
  .plan .keys { display: block; }
  .legend { display: grid; }
  .plan .lbl, .plan .dim { font-size: 19px; }
  .plan .big { font-size: 33px; }
  .key svg text { font-size: 23px; }
  .ask { grid-template-columns: 1fr; }
  .ask .go { border-left: 0; border-top: 2px solid var(--ink); }
}
@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > * { border-bottom: 1.5px solid var(--ink); }
  .titleblock > *:nth-child(3) { border-right: 1.5px solid var(--ink); }
  .titleblock > *:nth-child(even) { border-right: 0; }
  .titleblock > .tb-who, .titleblock > .go { grid-column: 1 / -1; border-right: 0; }
  .titleblock > .go { border-bottom: 0; }
  .nav { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 0.5rem 1.2rem; }
  .nav .name { grid-column: 1; grid-row: 1; margin: 0; align-self: center; font-size: 1.2rem; white-space: nowrap; }
  .nav .nav-go .wk { display: none; }
  .nav a.nav-go { font-size: 0.74rem; padding: 0.55rem 0.6rem; }
  .nav .nav-go { grid-column: 2; grid-row: 1; justify-self: end; }
  .nav a:not(.name):not(.nav-go) { justify-self: start; }
  /* schedule rows stack */
  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .schedule tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  .schedule tr.group { padding: 1.1rem 0 0; border-bottom: 1.5px solid var(--ink); }
  .schedule td, .schedule .group th { display: block; border: 0; padding: 0.1rem 0; }
  .schedule .group th { padding-bottom: 0.5rem; }
  .strip { flex-direction: column; gap: 0.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  body { background: #fff; }
  .mat { padding: 0; }
  .sheet { box-shadow: none; }
}

/* small ruled label, used for "Notes" and table-side headings */
h2.label, h3.label, .label { font: 700 0.78rem/1 var(--text); font-stretch: 85%; letter-spacing: 0.14em; text-transform: uppercase; padding-bottom: 0.6rem; border-bottom: 1.5px solid var(--ink); margin-bottom: 0.95rem; max-width: none; }
.stack > * + * { margin-top: 1rem; }
.read .stopbox h2.label { margin-top: 0; }

/* letters page: the stop box rides in a side column on wide screens */
.read .layout { display: grid; grid-template-columns: minmax(0, 44rem) minmax(17rem, 23rem); gap: clamp(2rem, 4vw, 4rem); align-items: start; margin-top: 1.8rem; }
.read .layout > aside { grid-column: 2; grid-row: 1; position: sticky; top: 1.5rem; }
.read .layout > .notice { grid-column: 1; grid-row: 1; }
.read .layout .stopbox { margin: 0; }
.read .notice > h2:first-child { margin-top: 0; }
@media (max-width: 62rem) {
  .read .layout { grid-template-columns: 1fr; }
  .read .layout > aside, .read .layout > .notice { grid-column: 1; grid-row: auto; position: static; }
}
