/* The sunny side: Solana's own cost table, side by side. Its own file so it can be lifted out.
   Works without scripts (the switch is CSS); the script adds "matters to me", the differences filter and the note. */
.sunny { --sun: #e87200; --sun-pale: #fde9d2; --shade: #e8e5e1; }
.sunny-bar { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.sunny-switch { display: inline-grid; grid-template-columns: 1fr 1fr; padding: .3rem; border-radius: 999px; background: var(--shade); position: relative;
  border: 0; margin: 0; min-width: 0; width: 100%; max-width: 32rem; }
.sunny-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sunny-switch input { position: absolute; opacity: 0; pointer-events: none; }
.sunny-switch label { position: relative; z-index: 1; text-align: center; padding: .75rem .8rem; border-radius: 999px; cursor: pointer; font-weight: 600;
  font-size: 1rem; line-height: 1.2; color: var(--shade-ink, #4d4945); transition: color .35s; }
.sunny-switch::before { content: ""; position: absolute; top: .3rem; bottom: .3rem; left: .3rem; width: calc(50% - .3rem); border-radius: 999px;
  background: var(--ink, #15110e); transition: transform .45s cubic-bezier(.2,.7,.1,1); }
.sunny:has(#cmp-village:checked) .sunny-switch::before { transform: translateX(100%); }
.sunny-switch input:checked + label { color: #fff; }
.sunny-switch input:focus-visible + label { outline: 3px solid var(--sun); outline-offset: 2px; }
.sunny-only { display: none; align-items: center; gap: .6rem; font-weight: 600; font-size: 1rem; cursor: pointer; color: var(--ink, #15110e); }
.js .sunny-only { display: inline-flex; }
.sunny-only input { width: 1.4rem; height: 1.4rem; accent-color: var(--sun-deep, #b55900); }

.sunny-cols { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: .5rem; font: 600 .78rem/1.25 var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; }
.sunny-cols span { padding: .7rem .9rem; border-radius: 12px 12px 0 0; }
.sunny-cols .c-other { background: var(--shade); color: var(--shade-ink, #4d4945); }
.sunny-cols .c-sol { background: var(--sun); color: var(--ink, #15110e); display: flex; align-items: center; gap: .5rem; }
.sunny-cols .c-sol::before { content: ""; width: 1.3rem; height: .65rem; background: radial-gradient(circle at 50% 100%, var(--ink, #15110e) 0 58%, transparent 60%); flex: none; }
.sunny-cols .c-label { display: none; }
.t-village { display: none; }
.sunny:has(#cmp-village:checked) .t-village { display: inline; }
.sunny:has(#cmp-village:checked) .t-home { display: none; }

.sunny-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.sunny-row { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "cost cost" "other sol" "why why"; border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 0 var(--line, rgba(21,17,14,.14)); transition: opacity .35s, transform .35s; }
.sunny-row .cost { grid-area: cost; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .9rem .5rem; }
.sunny-row h3 { margin: 0; font-size: 1.12rem; letter-spacing: -.01em; }
.sunny-row .cell { padding: .65rem .9rem .8rem; font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--ink, #15110e); position: relative; overflow: hidden; }
.sunny-row .other { grid-area: other; background: var(--shade); color: #2f2b28; }
.sunny-row .sol { grid-area: sol; background: var(--sun-pale); }
.sunny-row .sol::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,190,110,.6) 50%, transparent 70%);
  transform: translateX(-110%); pointer-events: none; }
.sunny-row.flash .sol::after { animation: sunny-sweep 1.1s cubic-bezier(.3,.6,.2,1); }
@keyframes sunny-sweep { to { transform: translateX(110%); } }
.sunny-row .v-village { display: none; }
.sunny:has(#cmp-village:checked) .sunny-row .v-village { display: block; }
.sunny:has(#cmp-village:checked) .sunny-row .v-home { display: none; }
.sunny-row .other .v { animation: sunny-in .5s cubic-bezier(.2,.7,.1,1); }
@keyframes sunny-in { from { transform: translateY(70%); opacity: 0; } to { transform: none; opacity: 1; } }
.sunny-row .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sunny-row .why { grid-area: why; border-top: 1px solid var(--line, rgba(21,17,14,.14)); }
.sunny-row .why summary { cursor: pointer; list-style: none; padding: .55rem .9rem; font: 500 .8rem/1.3 var(--mono, monospace); letter-spacing: .08em;
  text-transform: uppercase; color: var(--sun-ink, #8a4300); }
.sunny-row .why summary::-webkit-details-marker { display: none; }
.sunny-row .why summary::after { content: " +"; }
.sunny-row .why[open] summary::after { content: " –"; }
.sunny-row .why p { margin: 0; padding: 0 .9rem .9rem; font-size: 1rem; color: var(--muted, #5d5853); }
.sunny .mark { display: none; flex: none; align-items: center; gap: .4rem; border: 1.5px solid #c9c0b7; background: transparent; color: var(--ink, #15110e);
  border-radius: 999px; padding: .4rem .75rem; min-height: 2.5rem; font: 600 .85rem/1 var(--sans, sans-serif); cursor: pointer; transition: background .25s, border-color .25s; }
.js .sunny .mark { display: inline-flex; }
.sunny .mark::before { content: ""; width: 1.05rem; height: .55rem; border-radius: 1.05rem 1.05rem 0 0; border: 1.5px solid currentColor; border-bottom: 0; }
.sunny .mark[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); }
.sunny .mark[aria-pressed="true"]::before { background: var(--ink, #15110e); border-color: var(--ink, #15110e); }
.sunny.only-diff:not(:has(#cmp-village:checked)) .sunny-row.same-home,
.sunny.only-diff:has(#cmp-village:checked) .sunny-row.same-village { display: none; }
.sunny-note { margin-top: 1.2rem; padding: 1.2rem 1.3rem; border-radius: 16px; background: var(--ink, #15110e); color: rgba(255,255,255,.85);
  display: grid; gap: .9rem; }
.sunny-note p { margin: 0; }
.sunny-note strong { color: #fff; }
.sunny-note .count { font: 600 .8rem/1.3 var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: #ffb979; }
.sunny-note .btn { justify-self: start; }
.sunny-note-noscript { display: block; }
.js .sunny-note-noscript { display: none; }
.sunny-src { margin-top: 1rem; font-size: .9rem; color: var(--muted, #5d5853); max-width: 46rem; }

@media (min-width: 760px) {
  .sunny-cols { grid-template-columns: 1.1fr 1fr 1fr; }
  .sunny-cols .c-label { display: block; color: var(--muted, #5d5853); padding: .7rem 0; }
  .sunny-rows { gap: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 var(--line, rgba(21,17,14,.14)); }
  .sunny-row { grid-template-columns: 1.1fr 1fr 1fr; grid-template-areas: "cost other sol" "why why why"; border-radius: 0; box-shadow: none;
    border-bottom: 1px solid var(--line, rgba(21,17,14,.14)); }
  .sunny-row .cost, .sunny-row .cell { padding: 1rem 1.1rem; }
  .sunny-row .cell { font-size: 1.1rem; display: flex; align-items: center; }
  .sunny-row .why { border-top: 0; }
  .sunny-row .why summary { padding: 0 1.1rem .6rem; }
  .sunny-note { grid-template-columns: 1fr auto; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .sunny-row .other .v, .sunny-row.flash .sol::after, .sunny-switch::before { animation: none !important; transition: none !important; }
}

/* Phone: compact rows so the home page stays short */
@media (max-width: 759px) {
  .sunny.section { padding: 3.2rem 0; }
  .sunny .sec-head { margin-bottom: 1.4rem; }
  .sunny-bar { margin-bottom: .9rem; }
  .sunny-switch label { padding: .65rem .5rem; font-size: .95rem; }
  .sunny-cols span { padding: .5rem .8rem; }
  .sunny-rows { gap: .4rem; }
  .sunny-row .cost { padding: .5rem .5rem .35rem .8rem; }
  .sunny-row h3 { font-size: 1.05rem; }
  .sunny-row .cell { padding: .45rem .8rem .55rem; font-size: 1rem; }
  .sunny .mark { min-height: 2.25rem; padding: .3rem .65rem; font-size: .82rem; }
  .sunny-note { padding: 1rem 1.1rem; gap: .7rem; }
  .sunny-note .count { font-size: .74rem; }
}
