/* ==========================================================================
   Canopies and pergolas. The roof page's bones, with its own middle: the sun
   put where it really is for the month and the hour, and the shadow treated
   as a patch on the ground that both pulls back toward the wall and slides
   sideways as the afternoon goes on. The sliding is the whole point.
   ========================================================================== */

/* ---------- the shade model ---------- */
.cp-sun { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  grid-template-areas: "picks strip" "sketch read"; column-gap: 32px; row-gap: 26px; align-items: start; }
.cp-picks { grid-area: picks; display: grid; gap: 20px; align-content: start; }
.cp-strip-card { grid-area: strip; }
.cp-sketch { grid-area: sketch; }
.cp-read { grid-area: read; }

.cp-set { border: 0; padding: 0; margin: 0; display: grid; gap: 9px; }
.cp-set legend { padding: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cp-chip { height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
  transition: border-color .16s, background .16s, color .16s; }
.cp-chip:hover { border-color: var(--ink); }
.cp-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
#cp-roof .cp-chip.on { background: var(--brand); border-color: var(--brand); }

/* the two sliders */
.cp-slider { display: grid; gap: 4px; }
.cp-slider-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cp-slider-h b { font-size: 16px; letter-spacing: -.2px; text-transform: none; color: var(--ink);
  font-weight: 500; font-variant-numeric: tabular-nums; }
.cp-slider input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  border-radius: 999px; background: var(--line); outline: none; margin: 12px 0 2px; }
.cp-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 4px solid #fff;
  box-shadow: 0 1px 6px rgba(5, 15, 21, .28); cursor: pointer; }
.cp-slider input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%;
  background: var(--brand); border: 4px solid #fff; box-shadow: 0 1px 6px rgba(5, 15, 21, .28); cursor: pointer; }
.cp-slider input[type="range"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
.cp-month-slider { padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }

/* the day, half hour by half hour */
.cp-strip-card { padding: 22px 24px 18px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.cp-strip-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.cp-strip-eyebrow { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cp-strip-hours { display: block; margin-top: 5px; font-size: 27px; font-weight: 400; letter-spacing: -.6px;
  color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-key { display: flex; gap: 16px; flex-wrap: wrap; }
.cp-key span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.cp-key i { width: 9px; height: 9px; border-radius: 2px; }
.cp-key .k-shade { background: #0a1a24; }
.cp-key .k-part { background: #7f93a3; }
.cp-key .k-sun { background: #f0b53f; }
.cp-key .k-wall { background: repeating-linear-gradient(45deg, #2b3b48 0 3px, #465868 3px 6px); }

.cp-strip { display: flex; align-items: flex-end; gap: 3px; height: 148px; }
.cp-bar { flex: 1 1 0; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent;
  display: flex; align-items: flex-end; cursor: pointer; }
.cp-bar i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; background: #0a1a24;
  transition: height .3s cubic-bezier(.22, 1, .36, 1), background .2s; }
.cp-bar[data-state="part"] i { background: #7f93a3; }
.cp-bar[data-state="sun"] i { background: #f0b53f; }
.cp-bar[data-state="down"] i { background: #d3dae0; }
.cp-bar[data-state="wall"] i { background: repeating-linear-gradient(45deg, #2b3b48 0 4px, #465868 4px 8px); }
.cp-bar:hover i { filter: brightness(1.25); }
.cp-bar.now i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.cp-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cp-axis { position: relative; height: 17px; margin: 9px 0 4px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.cp-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.cp-scrub { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line-2); }

/* the little side view */
.cp-sketch { border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.cp-sketch svg { display: block; width: 100%; height: auto; }
.cp-sketch text { font-family: inherit; font-size: 11px; fill: #8b98a4; }
.cp-sketch #cp-terr-shade, .cp-sketch #cp-terr-sun, .cp-sketch #cp-beam, .cp-sketch #cp-post,
.cp-sketch #cp-sun, .cp-sketch #cp-table, .cp-sketch #cp-sky { transition: all .3s cubic-bezier(.22, 1, .36, 1); }

/* the numbers */
.cp-read { display: grid; gap: 14px; align-content: start; }
.cp-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.cp-out-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 13px 16px; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.cp-out-row:nth-child(-n+2) { border-top: 0; }
.cp-out-row:nth-child(odd) { border-left: 0; }
.cp-out-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cp-out-row span { font-size: 13.5px; color: var(--muted); }
.cp-out-row b { font-size: 17px; font-weight: 500; letter-spacing: -.3px; text-align: right; font-variant-numeric: tabular-nums; }
.cp-out-row:first-child b { color: var(--brand); }
.cp-out-row b.is-sun { color: #b87a10; }
.cp-note { font-size: 14.5px; line-height: 1.58; color: var(--ink); margin: 0; min-height: 3.2em; }
.cp-fine { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 0; }
.cp-cta { justify-self: start; }

/* ---------- the four roofs, as a table ---------- */
.cp-table-wrap { border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.cp-table { width: 100%; border-collapse: collapse; }
.cp-table th, .cp-table td { text-align: left; padding: 15px 18px; vertical-align: top; font-size: 14.5px; line-height: 1.5; }
.cp-table thead th { background: var(--ink); color: #fff; font-weight: 500; vertical-align: bottom;
  border-right: 1px solid rgba(255, 255, 255, .13); }
.cp-table thead th:last-child { border-right: 0; }
.cp-table thead th b { display: block; font-size: 15.5px; font-weight: 500; letter-spacing: -.2px; }
.cp-table thead th span { display: block; margin-top: 3px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.cp-th-lead { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.cp-table tbody tr { border-top: 1px solid var(--line-2); }
.cp-table tbody th { font-weight: 500; color: var(--ink); width: 21%; background: var(--sand); }
.cp-table tbody td { color: var(--muted); width: 19.75%; }
.cp-table tbody td[data-v] { color: var(--ink); }
.cp-table tbody td[data-v]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin: 0 8px 1px 0; vertical-align: middle; background: var(--line); }
.cp-table tbody td[data-v="yes"]::before { background: #1f9d55; }
.cp-table tbody td[data-v="part"]::before { background: #e0a33a; }
.cp-table tbody td[data-v="no"]::before { background: #cf4a4a; }
.cp-table-foot { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- three places ---------- */
.cp-places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.cp-place { padding: 26px 30px 26px 0; border-top: 2px solid var(--ink); }
.cp-place + .cp-place { padding-left: 30px; border-left: 1px solid var(--line); }
.cp-place-n { display: block; font-size: 13px; letter-spacing: .1em; color: var(--brand); margin-bottom: 14px; }
.cp-place h3 { margin: 0 0 10px; font-size: 21px; font-weight: 500; letter-spacing: -.4px; }
.cp-place p { margin: 0; font-size: 14.5px; line-height: 1.62; color: var(--muted); }
.cp-place-m { display: grid; gap: 5px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.cp-place-m span { font-size: 13px; color: var(--ink); }
.cp-place-m a { color: var(--brand); text-decoration: none; }
.cp-place-m a:hover { text-decoration: underline; }

/* ---------- the closing picture ---------- */
.cp-cta-media { margin: 34px 0 0; border-radius: var(--r); overflow: hidden; }
.cp-cta-media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- narrower ---------- */
@media (max-width: 1080px) {
  .cp-sun { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "strip strip" "picks read" "sketch read"; }
  .cp-sketch { align-self: start; }
}
@media (max-width: 900px) {
  .cp-places { grid-template-columns: 1fr; }
  .cp-place { padding: 22px 0; }
  .cp-place + .cp-place { padding-left: 0; border-left: 0; }
  .cp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cp-table { min-width: 820px; }
}
/* On a phone the table turns itself inside out: one block per question, with
   the four roofs answering it in turn. Nobody drags a table sideways. */
@media (max-width: 680px) {
  .cp-table-wrap { overflow: visible; }
  .cp-table, .cp-table tbody, .cp-table tr, .cp-table tbody th, .cp-table tbody td { display: block; width: auto; }
  .cp-table { min-width: 0; }
  .cp-table thead { display: none; }
  .cp-table tbody tr { border-top: 1px solid var(--line); padding-bottom: 10px; }
  .cp-table tbody tr:first-child { border-top: 0; }
  .cp-table tbody th { background: transparent; padding: 16px 18px 4px; font-size: 16px; letter-spacing: -.2px; }
  .cp-table tbody td { display: flex; align-items: baseline; gap: 10px; padding: 7px 18px; font-size: 14px; }
  .cp-table tbody td::after { content: attr(data-r); order: -1; flex: 0 0 104px; font-size: 13px; color: var(--muted); }
  .cp-table tbody td[data-v]::before { order: -2; flex: none; align-self: flex-start; margin: 7px 0 0; }
  .cp-table tbody td:not([data-v])::before { content: ""; order: -2; flex: none; align-self: flex-start;
    width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--line-2); display: inline-block; }
}
@media (max-width: 720px) {
  .cp-sun { grid-template-columns: 1fr; grid-template-areas: "picks" "strip" "sketch" "read"; }
  .cp-strip-card { padding: 20px 16px 16px; }
  .cp-strip { height: 120px; gap: 2px; }
  .cp-strip-hours { font-size: 23px; }
  .cp-out { grid-template-columns: 1fr; }
  .cp-out-row { border-left: 0; }
  .cp-out-row:nth-child(2) { border-top: 1px solid var(--line-2); }
  .cp-chip { height: 40px; }
  .cp-axis span:nth-child(even) { display: none; }
  .cp-key { gap: 10px; }
  .cp-key span { font-size: 11.5px; }
}
