:root {
  color-scheme: light;
  --ink: #0d321f;
  --leaf: #1b4b31;
  --paper: #fcf3e5;
  --label: #fff8eb;
  --gold: #ffbe32;
  --edge: clamp(16px, 1.65vw, 36px);
  --heading-face: "Archivo Black", "Inter", system-ui, sans-serif;
  --text-face: "DM Sans", "Inter", system-ui, sans-serif;
  font: 100%/1.4 var(--text-face);
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #256743; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.skip-link { position: absolute; top: 8px; left: var(--edge); z-index: 8; transform: translateY(-180%); padding: .55rem .85rem; background: var(--label); color: var(--ink); }
.skip-link:focus { transform: none; }
.masthead { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: clamp(67px, 5.1vw, 90px); margin-inline: var(--edge); padding-block: 8px; border-bottom: 1.4px solid var(--leaf); }
.brand { display: inline-flex; align-items: center; gap: clamp(7px, .75vw, 14px); text-decoration: none; font: 850 clamp(1.85rem, 3vw, 3.55rem)/1 var(--heading-face); letter-spacing: -.057em; }
.brand svg { width: clamp(42px, 5vw, 85px); aspect-ratio: 72 / 56; }
.all-tools-link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .18em clamp(16px, 1.7vw, 30px) .24em; border: 2px solid var(--ink); border-radius: .4em; text-decoration: none; font-size: clamp(1.05rem, 1.68vw, 1.9rem); line-height: 1.15; font-weight: 740; letter-spacing: -.035em; }
.all-tools-link:hover, .all-tools-link:focus-visible { background: var(--ink); color: var(--label); }

.town-stage { position: relative; isolation: isolate; height: clamp(475px, 51.2vw, 1024px); }
.town-intro { position: absolute; z-index: 2; top: 14.5%; left: var(--edge); width: min(30vw, 570px); }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--heading-face); font-weight: 850; }
h1 { font-size: clamp(2.8rem, 4.48vw, 5.2rem); line-height: 1.04; letter-spacing: -.065em; }
h1 span { display: block; }
.town-intro p { margin-top: clamp(14px,1.9vw,33px); font-size: clamp(1.12rem,1.72vw,2rem); line-height: 1.3; font-weight: 540; letter-spacing: -.045em; }
.tool-search { position: relative; width: min(100%, 22.55vw); min-width: 210px; margin-top: clamp(20px,2.7vw,44px); }
.search-icon { position: absolute; left: clamp(12px,1.1vw,21px); top: 50%; width: clamp(22px,2.2vw,38px); height: clamp(22px,2.2vw,38px); transform: translateY(-50%); pointer-events: none; }
#tool-query { display: block; width: 100%; min-height: 48px; height: clamp(48px,4.22vw,76px); border: 2px solid var(--ink); border-radius: clamp(8px,.77vw,14px); background: #fff9efed; color: var(--ink); padding: 0 .55em 0 clamp(42px,4.15vw,72px); font-size: clamp(1.12rem,1.8vw,1.95rem); font-weight: 480; letter-spacing: -.035em; appearance: none; }
#tool-query::placeholder { color: #65615a; opacity: 1; }
#tool-query:focus-visible { outline: 3px solid #376a44; outline-offset: 2px; }
#tool-query::-webkit-search-cancel-button { cursor: pointer; }
.search-results { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; width: 100%; max-height: 320px; overflow: auto; padding: 4px; background: #fffaf1; border: 1.5px solid var(--ink); border-radius: .6rem; box-shadow: 0 7px 15px #40341920; font-size: 1.01rem; }
.search-results a { display: block; padding: .67em .7em; border-radius: .32rem; text-decoration: none; font-weight: 620; line-height: 1.3; }
.search-results a:hover, .search-results [aria-selected=true], .search-results [data-active=true] { background: #e8ecd9; }
.search-results p { margin: 0; padding: .66em .7em; font-size: .95rem; font-weight: 480; letter-spacing: 0; }

.map-window { position: absolute; inset: calc(-1 * clamp(67px,5.1vw,90px)) 0 0; z-index: 0; overflow: hidden; }
.town-map { --scene-ratio: 3 / 2; position: absolute; right: 0; width: min(87%, 1740px); aspect-ratio: var(--scene-ratio); bottom: 0; }
.town-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; mask-image: linear-gradient(90deg, transparent, #000 19%); }
.map-links { position: absolute; inset: 0; }
.place-pin { --pin-fill: var(--label); position: absolute; z-index: 1; top: var(--y); left: var(--x); transform: translate(-50%,-50%); display: inline-flex; align-items: center; justify-content: center; gap: .32em; padding: .29em .62em .34em .44em; border-radius: .57em; background: var(--pin-fill); box-shadow: 0 2px 5px #30291d29; text-decoration: none; white-space: nowrap; font-size: clamp(1rem,1.63vw,1.9rem); font-weight: 780; line-height: 1.15; letter-spacing: -.044em; }
.place-pin::after { content: ""; position: absolute; top: calc(100% - 1px); left: .65em; border-left: .36em solid transparent; border-right: .36em solid transparent; border-top: .43em solid var(--pin-fill); }
.place-pin svg { flex: none; width: .86em; height: 1.09em; }
.room-pin { --x: 35.5%; --y: 44.8%; }
.room-pin::after, .trunk-pin::after { top: auto; bottom: calc(100% - 1px); left: auto; right: .62em; border-top: 0; border-bottom: .43em solid var(--pin-fill); }
.garage-pin { --x: 83.5%; --y: 17.2%; --pin-fill: var(--gold); }
.garage-pin::after { content: none; }
.place-pin .pin-leader { position: absolute; top: calc(100% - .15em); left: .05em; width: 1.9em; height: 2.4em; fill: none; stroke: var(--pin-fill); stroke-width: 4.3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.gallery-pin { --x: 53.3%; --y: 18.3%; }
.trunk-pin { --x: 78%; --y: 56.9%; }
.place-pin:focus-visible, .place-pin:hover { --pin-fill: #ffe09a; z-index: 3; box-shadow: 0 3px 12px #30291d42; }
.place-pin:hover span { text-decoration: underline; text-underline-offset: .12em; }
.place-pin:active { margin-top: 1px; }

.tool-directory { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: clamp(15px,2.5vw,55px); margin: 0 var(--edge); padding: clamp(13px,1.4vw,29px) 0 clamp(20px,1.6vw,36px); border-top: 1.5px solid var(--leaf); scroll-margin: 8px; }
.tool-directory:focus { outline: none; }
.tool-directory h2 { font-size: clamp(1.75rem,2.9vw,3.15rem); line-height: 1.07; letter-spacing: -.064em; }
.tool-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; padding: 0; list-style: none; }
.tool-list li { min-width: 0; padding-inline: clamp(8px,1.1vw,19px); }
.tool-list li + li { border-left: 1px solid #b0ae9a; }
.tool-list li:first-child { padding-left: 0; }
.tool-list li:last-child { padding-right: 0; }
.tool-list a { display: flex; align-items: center; justify-content: center; gap: clamp(8px,1vw,20px); min-height: clamp(76px,7.6vw,136px); height: 100%; text-decoration: none; }
.tool-object { display: block; width: 45%; height: auto; max-width: 168px; max-height: 106px; object-fit: contain; }
.tool-name { color: #142a23; font-size: clamp(1.02rem,1.64vw,1.9rem); line-height: 1.06; font-weight: 740; letter-spacing: -.045em; text-decoration: underline; text-decoration-thickness: .069em; text-underline-offset: .17em; }
.tool-list a:hover .tool-name, .tool-list a:focus-visible .tool-name { color: #34603f; text-decoration-thickness: .1em; }
@media (max-width: 920px) {
  .town-stage { height: 53vw; min-height: 420px; }
  .town-intro { top: 16%; }
  h1 { font-size: clamp(2.5rem,4.7vw,2.85rem); }
  .tool-search { width: 87%; min-width: 0; }
  .tool-directory { gap: 18px; grid-template-columns: 1fr; }
  .tool-list a { justify-content: flex-start; }
}
@media (max-width: 720px) {
  :root { --edge: clamp(16px,4.4vw,28px); }
  .masthead { min-height: 59px; padding-block: 7px; }
  .brand { gap: 7px; font-size: clamp(1.6rem,6vw,2.3rem); }
  .brand svg { width: clamp(36px,9.4vw,45px); }
  .all-tools-link { min-height: 40px; padding-inline: 13px; border-width: 1.5px; font-size: 1rem; border-radius: .48rem; }
  .town-stage { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .town-intro { position: relative; inset: auto; width: 100%; padding: 24px var(--edge) 0; }
  h1 { max-width: 15em; font-size: clamp(2.04rem,7.7vw,3.45rem); line-height: 1.05; letter-spacing: -.062em; }
  h1 span { display: inline; }
  .tool-search { width: min(100%,27rem); margin-top: 15px; }
  #tool-query { height: 47px; min-height: 44px; padding-left: 43px; border-radius: 9px; font-size: 1.13rem; }
  .search-icon { left: 13px; width: 22px; height: 22px; }
  .town-intro p { margin-top: 11px; font-size: 1rem; }
  .map-window { position: relative; inset: auto; width: 100%; height: 82vw; min-height: 252px; margin-top: 5px; }
  .town-map { width: 132%; right: auto; left: -30%; bottom: 0; }
  .town-art { mask-image: linear-gradient(to bottom, transparent, #000 11%, #000 96%, transparent); }
  .room-pin { --x: 38.7%; --y: 45.5%; }
  .gallery-pin { --x: 47%; --y: 14.5%; }
  .garage-pin { --x: 83.1%; --y: 20.5%; }
  .trunk-pin { --x: 80%; --y: 58%; }
  .place-pin { min-height: 38px; padding: 5px 9px 6px 7px; gap: 4px; font-size: clamp(.87rem,2.65vw,1.06rem); border-radius: .62em; }
  .place-pin::before { content: ""; position: absolute; inset: -4px -2px; }
  .tool-directory { margin-inline: var(--edge); gap: 12px; padding-block: 19px 24px; }
  .tool-directory h2 { font-size: 1.75rem; }
  .tool-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tool-list li { padding: 0 9px 0 0; }
  .tool-list li + li { border-left: 0; }
  .tool-list li:nth-child(even) { padding: 0 0 0 9px; border-left: 1px solid #c2bfae; }
  .tool-list li:nth-child(n+3) { border-top: 1px solid #c2bfae; }
  .tool-list a { min-height: 82px; gap: 8px; }
  .tool-object { width: 41%; max-height: 77px; }
  .tool-name { font-size: clamp(1rem,3.8vw,1.22rem); line-height: 1.13; }
}
@media (max-width:350px) {
  .brand { font-size: 1.5rem; }
  .brand svg { width: 32px; }
  .all-tools-link { padding-inline: 10px; }
  .place-pin { font-size: .8rem; min-height: 36px; }
  .tool-list a { gap: 5px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tool-list a:hover img { transform: translateY(-2px); }
  .tool-object { transition: transform .15s ease; }
}
@media (forced-colors: active) {
  .place-pin, .search-results { border: 1px solid ButtonText; }
}
