* { box-sizing: border-box }
:root { font: 16px/1.5 'DM Sans',system-ui,sans-serif; color: #263c34; background: #f5f3eb; }
body { margin: 0 }
header, main { max-width: 1160px; margin: auto; padding: 0 clamp(14px,4vw,54px) }
header { display: flex; justify-content: space-between; align-items: center; min-height: 58px; border-bottom: 1px solid #dadcd0; }
a { color: #365c49; text-underline-offset: 3px }
header a { text-decoration: none; font-size: .9rem; font-weight: 650 }
a:hover { text-decoration: underline }
.intro { padding: clamp(16px,3vw,32px) 0 18px }
h1,h2 { font-family: 'Playfair Display',Georgia,serif; font-weight: 500; line-height: 1.1 }
h1 { margin: 0; font-size: clamp(2.1rem,5vw,4rem); letter-spacing: -.05em }
h1 i { color: #527459 }
.intro p { margin: 9px 0 0; color: #506052 }
.model { overflow: hidden; background: #e9ecdf; border: 1px solid #cfd5c4; border-radius: 12px }
.topbar,.bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px }
button { font: inherit; cursor: pointer; color: inherit; background: transparent; border: 0 }
.years { display: flex; background: #f6f7ef; border: 1px solid #c7d0bf; border-radius: 24px; padding: 2px }
.years button { min-height: 38px; padding: 4px clamp(12px,2.4vw,27px); border-radius: 21px; font-weight: 650 }
button[aria-pressed=true] { background: #335844; color: #fff }
button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible { outline: 3px solid #ab532d; outline-offset: 2px }
#home { font-size: .86rem; min-height: 40px; text-decoration: underline; text-underline-offset: 3px }
#view { position: relative; height: clamp(330px,53svh,620px); }
#view canvas,#underlay { display: block; width: 100%; height: 100%; }
#view canvas { position: absolute; inset: 0; touch-action: none }
#underlay { object-fit: contain }
#status { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 6px 12px; width: max-content; max-width: 90%; background: #f8f7ee; border-radius: 5px; font-size: .85rem }
.bottom { min-height: 45px; color: #47594b; font-size: .84rem }
.bottom label { cursor: pointer; white-space: nowrap }
input { accent-color: #426b4c }
.caption { display: grid; grid-template-columns: minmax(160px,1fr) 2fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid #d1d6ca }
h2 { font-size: clamp(1.45rem,2.7vw,2.2rem); margin: 0 }
.caption p,details p { margin: 0; max-width: 74ch }
details { margin: 16px 0 32px }
summary { cursor: pointer; font-weight: 600 }
details p { margin: 10px 0 }
[hidden] { display: none !important }
@media (max-width: 600px) {
  .topbar,.bottom { padding: 6px 8px }
  #view { height: clamp(280px,44svh,440px) }
  .caption { grid-template-columns: 1fr; gap: 6px; padding: 15px 0 }
  .bottom { flex-wrap: wrap }
}

.topbar { justify-content: flex-start; flex-wrap: wrap }
.modes { display: flex; background: #f6f7ef; border: 1px solid #c7d0bf; border-radius: 24px; padding: 2px }
.modes button { min-height: 38px; padding: 4px 13px; border-radius: 20px; font-size: .9rem }
#home { margin-left: auto }
#plan { display: block; width: 100%; height: 100%; object-fit: contain }
#view.show-plan canvas,#view.show-plan #underlay { display: none !important }
@media (max-width:520px) {
  .topbar { column-gap: 4px; row-gap: 2px }
  .years button,.modes button { padding: 3px 9px; font-size: .85rem }
  #home { margin-left: 4px; min-height: 30px }
}
