/* MyHomeTX in-site tools (replace HAR launch panels). Uses site tokens from style.css */
[data-tool] { margin: 8px 0 0; }
.mt-qs { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.mt-f { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; min-width: 0; }
.mt-f.mt-grow { flex: 3 1 240px; }
.mt-f span { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mt-f input, .mt-f select, .mt-f textarea { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-height: 42px; width: 100%; box-sizing: border-box; }
.mt-f textarea { resize: vertical; min-height: 120px; }
.mt-f :focus { outline: 2px solid var(--pine); outline-offset: 1px; }
.mt-qs .btn { min-height: 42px; border: 0; cursor: pointer; font: inherit; }
.mt-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.mt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mt-seg span { display: block; padding: 11px 16px; font-size: 14px; color: var(--muted); background: var(--bg); cursor: pointer; }
.mt-seg input:checked + span { background: var(--pine); color: var(--on-pine); }
.mt-seg input:focus-visible + span { outline: 2px solid var(--bronze); outline-offset: -2px; }
.mt-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }

.mt-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mt-village { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.mt-village h3 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 0; color: var(--fg); }
.mt-vc { font-size: 14px; color: var(--muted); margin: 0; min-height: 1.4em; }
.mt-vlinks { display: flex; gap: 16px; margin-top: auto; padding-top: 6px; }
.mt-vlinks a, .mt-link { color: var(--bronze); font-weight: 600; font-size: 14px; text-decoration: none; }
.mt-vlinks a:hover, .mt-link:hover { text-decoration: underline; }

.mt-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.mt-panel p { margin: 0 0 12px; line-height: 1.6; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 4px 0 16px; }
.mt-table th, .mt-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.mt-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.mt-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 14px; }

.mt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.mt-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.mt-stats span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mt-stats strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 24px; margin-top: 4px; color: var(--fg); }

.mt-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.mt-contact .mt-full { grid-column: 1 / -1; }
.mt-contact .btn { border: 0; cursor: pointer; font: inherit; }

button.more[data-glossary] { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.mt-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.mt-modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.mt-modal-body { position: relative; width: min(640px, 100%); max-height: 85vh; overflow-y: auto; background: var(--bg); color: var(--fg); border-radius: 12px; padding: 24px; outline: none; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.mt-modal-body h2 { font-family: var(--font-display); font-weight: 400; margin: 0 0 12px; }
.mt-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface); color: var(--fg); font-size: 22px; cursor: pointer; }
.mt-gl { margin: 0; }
.mt-gl dt { font-weight: 600; margin-top: 12px; }
.mt-gl dd { margin: 2px 0 0; color: var(--muted); line-height: 1.55; }

@media (max-width: 640px) {
  .mt-seg { flex: 1 1 100%; } .mt-seg label { flex: 1; text-align: center; }
  .mt-qs .btn { flex: 1 1 100%; }
  .mt-contact { grid-template-columns: 1fr; }
}
