/* Read your block: a plan of the visitor's block that turns to the way their street faces,
   with the real Sunshine Coast sun path over it. Works with no script (radio buttons + :has());
   the script adds the time of day, the moving shadow and the note for the enquiry form. */
.ryb { background: var(--paper); }
.ryb-grid { display: grid; gap: 18px; }
@media (max-width: 959px) { .ryb-fig { order: -1; } .ryb .sec-head { margin-bottom: 20px; } }
@media (min-width: 960px) {
  .ryb-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "qs fig" "out fig"; gap: 32px 64px; align-items: start; }
  .ryb-qs { grid-area: qs; } .ryb-fig { grid-area: fig; position: sticky; top: 96px; } .ryb-out { grid-area: out; }
}
.ryb-qs { display: grid; gap: 14px; }
.ryb-f { margin: 0; padding: 0; border: 0; min-width: 0; }
.ryb-f legend { padding: 0; margin-bottom: 7px; font: 600 .92rem var(--sans); color: var(--ink-2); }
.ryb-dirs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; max-width: 460px; }
.ryb-dirs .chip span { justify-content: center; width: 100%; min-height: 44px; padding: 0; font: 600 .85rem var(--mono); }
.ryb-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ryb-row .chip span { min-height: 42px; padding: 6px 12px; font-size: .9rem; }

.ryb-fig { margin: 0; }
.ryb-plan { background: var(--ground); }
.ryb-svg { width: 100%; height: auto; }
@media (max-width: 959px) { .ryb-svg { max-height: 41svh; margin-inline: auto; } }
.ryb-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 0 0; font-size: .8rem; color: var(--ink-soft); }
.ryb-key { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.ryb-key::before { content: ""; width: 20px; height: 0; border-top: 3px solid #c58a3a; }
.ryb-key-s::before { border-top: 3px dashed var(--ink-soft); }
.ryb-key-n::before { border-top-color: var(--sage-deep); border-top-width: 5px; }
.ryb-key[hidden] { display: none; }

/* time of day (script only) */
.ryb-time { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 12px; padding: 10px 12px; background: var(--ground-2); color: var(--stone); }
.ryb-time[hidden] { display: none; }
.ryb-seasons { display: flex; gap: 4px; }
.ryb-seasons .chip span { background: transparent; color: var(--stone); border-color: rgba(236, 233, 220, .3); }
.ryb-seasons .chip input:checked + span { background: var(--stone); color: var(--ink-2); border-color: var(--stone); }
.ryb-seasons .chip input:focus-visible + span { outline-color: var(--stone); }
.ryb-slider input { width: 100%; height: 44px; margin: 0; accent-color: #e2b46c; cursor: grab; background: transparent; }
.ryb-read { grid-column: 1 / -1; margin: 0; font: 400 .8rem/1.45 var(--mono); color: var(--stone); min-height: 2.9em; }

/* the drawing */
.ryb-street { fill: none; stroke: var(--line); stroke-width: 1.5; }
.ryb-tl { font-size: 13px; }
.ryb-block { fill: rgba(236, 233, 220, .04); stroke: var(--line); stroke-width: 2; stroke-dasharray: 10 4 2 4; }
.ryb-house { fill: var(--ground-2); stroke: var(--line); stroke-width: 2.5; }
.ryb-hlabel { font-size: 12px; fill: var(--sage-pale); }
.ryb-cont { fill: none; stroke: var(--sage-pale); stroke-width: 1.2; opacity: .55; }
.ryb-arrow path { fill: none; stroke: var(--sage-pale); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ryb-tree circle { fill: none; stroke: rgba(236, 233, 220, .4); stroke-width: 1.2; stroke-dasharray: 4 3; }
.ryb-tree path { stroke: rgba(236, 233, 220, .4); stroke-width: 1; }
.ryb-hl { stroke: rgba(226, 180, 108, .5); stroke-width: 1.5; }
.ryb-shadow polygon { fill: rgba(10, 12, 6, .5); }
.ryb-north line { stroke: #e2b46c; stroke-width: 5; stroke-linecap: square; }
.ryb-hz { fill: none; stroke: rgba(236, 233, 220, .18); stroke-width: 1; stroke-dasharray: 2 5; }
.ryb-arc { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.ryb-arc.ryb-win { stroke: #e2b46c; }
.ryb-arc.ryb-sum { stroke: var(--stone); stroke-dasharray: 9 6; opacity: .85; }
.ryb-arc.ryb-eq { stroke: rgba(236, 233, 220, .3); stroke-width: 1.2; stroke-dasharray: 1 5; }
.ryb-noon.ryb-win { fill: #e2b46c; }
.ryb-noon.ryb-sum { fill: var(--stone); }
.ryb-compass path { fill: none; stroke: var(--line); stroke-width: 1.5; }
.ryb-compass .ryb-np { fill: var(--line); stroke: none; }
.ryb-nl { font-size: 15px; font-weight: 700; }
.ryb-sun { fill: #f5d58f; stroke: rgba(245, 213, 143, .35); stroke-width: 8; }

/* turn the sky to the street (the script takes over and always turns the short way) */
.ryb { --rot: 45deg; }
.ryb-sky { rotate: var(--rot); transform-origin: 200px 200px; transform-box: view-box; transition: rotate .9s var(--ease); }
.ryb-nl { rotate: calc(var(--rot) * -1); transform-box: fill-box; transform-origin: center; transition: rotate .9s var(--ease); }
@media (prefers-reduced-motion: reduce) { .ryb-sky, .ryb-nl { transition: none; } }

/* show the chosen block, slope and notes. Defaults first (for browsers without :has) */
.ryb-size, .ryb-cont, .ryb-arrow, .ryb-n { display: none; }
.ryb-s-suburban, .ryb-c-h, .ryb-a-toward, .ryb-n[data-n="st-se"], .ryb-n[data-n="fall-toward"], .ryb-n[data-n="size-suburban"] { display: revert; }
.ryb-n { list-style: none; }
@supports selector(:has(*)) {
  .ryb-s-suburban, .ryb-c-h, .ryb-a-toward, .ryb-n[data-n] { display: none; }
  .ryb:has([value="small"]:checked) .ryb-s-small,
  .ryb:has([value="suburban"]:checked) .ryb-s-suburban,
  .ryb:has([value="acreage"]:checked) .ryb-s-acreage,
  .ryb:has([value="toward"]:checked) :is(.ryb-c-h, .ryb-a-toward),
  .ryb:has([value="away"]:checked) :is(.ryb-c-h, .ryb-a-away),
  .ryb:has([value="across"]:checked) :is(.ryb-c-v, .ryb-a-across) { display: inline; }
  .ryb:has([name="ryb-st"][value="n"]:checked) { --rot: 180deg; } .ryb:has([name="ryb-st"][value="ne"]:checked) { --rot: 135deg; }
  .ryb:has([name="ryb-st"][value="e"]:checked) { --rot: 90deg; } .ryb:has([name="ryb-st"][value="se"]:checked) { --rot: 45deg; }
  .ryb:has([name="ryb-st"][value="s"]:checked) { --rot: 0deg; } .ryb:has([name="ryb-st"][value="sw"]:checked) { --rot: -45deg; }
  .ryb:has([name="ryb-st"][value="w"]:checked) { --rot: -90deg; } .ryb:has([name="ryb-st"][value="nw"]:checked) { --rot: -135deg; }
  .ryb:has([name="ryb-st"][value="n"]:checked) .ryb-n[data-n="st-n"], .ryb:has([name="ryb-st"][value="ne"]:checked) .ryb-n[data-n="st-ne"],
  .ryb:has([name="ryb-st"][value="e"]:checked) .ryb-n[data-n="st-e"], .ryb:has([name="ryb-st"][value="se"]:checked) .ryb-n[data-n="st-se"],
  .ryb:has([name="ryb-st"][value="s"]:checked) .ryb-n[data-n="st-s"], .ryb:has([name="ryb-st"][value="sw"]:checked) .ryb-n[data-n="st-sw"],
  .ryb:has([name="ryb-st"][value="w"]:checked) .ryb-n[data-n="st-w"], .ryb:has([name="ryb-st"][value="nw"]:checked) .ryb-n[data-n="st-nw"],
  .ryb:has([value="level"]:checked) .ryb-n[data-n="fall-level"], .ryb:has([value="toward"]:checked) .ryb-n[data-n="fall-toward"],
  .ryb:has([value="away"]:checked) .ryb-n[data-n="fall-away"], .ryb:has([value="across"]:checked) .ryb-n[data-n="fall-across"],
  .ryb:has([value="small"]:checked) .ryb-n[data-n="size-small"], .ryb:has([value="suburban"]:checked) .ryb-n[data-n="size-suburban"],
  .ryb:has([value="acreage"]:checked) .ryb-n[data-n="size-acreage"] { display: list-item; }
}
.ryb-js .ryb-sky, .ryb-js .ryb-nl { rotate: var(--rot-js, var(--rot)); }
.ryb-js .ryb-nl { rotate: calc(var(--rot-js, var(--rot)) * -1); }

/* the answer */
.ryb-out { padding: 22px 0 0; border-top: 1px solid var(--ink-2); }
.ryb-out-h { font: 600 .76rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep); margin-bottom: 10px; }
.ryb-notes { display: grid; gap: 10px; }
.ryb-n { padding-left: 18px; position: relative; font-size: 1rem; color: var(--ink-2); }
.ryb-n::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 5px; border-top: 1.5px solid var(--sage-deep); border-right: 1.5px solid var(--sage-deep); transform: skewX(-30deg); }
.ryb-fine { margin: 14px 0 0; font-size: .88rem; color: var(--ink-soft); }
.ryb-out .btns { margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .ryb-n { animation: ryb-in .45s var(--ease) both; }
}
@keyframes ryb-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
