/* Town Square Groups — layered on styles.css + palettes/three-hellos.css */
.topnav a.is-current { color: #3B66F5; box-shadow: inset 0 -2px 0 #3B66F5; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.2rem 2.5rem; }
.page-hero { max-width: var(--max); margin: 0 auto; padding: 1.4rem 1.2rem 1.2rem; }
.page-hero h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; }
.page-hero h1 em { font-style: normal; color: var(--hero-accent); }
.page-hero .lede { margin: 0.7rem 0 0; }
.hero-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; align-items: center; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.panel h2, .panel h3 { font-family: var(--display); font-weight: 800; margin: 0 0 0.5rem; }
.panel h2 { font-size: 1.35rem; } .panel h3 { font-size: 1.1rem; }
.tint { background: #EEF2FF; border-color: #3B66F5; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Directory toolbar */
.g-toolbar { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin: 0.4rem 0 1rem; }
@media (min-width: 760px) { .g-toolbar { grid-template-columns: 2fr 1fr 1fr; } }
.g-toolbar input, .g-toolbar select {
  min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  padding: 0.5rem 0.75rem; width: 100%; font-weight: 500; font-size: 0.95rem;
}
.g-toolbar select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231D2A27' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.85rem center; }
.g-toolbar select.is-active, .g-toolbar input.is-active { border-color: #3B66F5; box-shadow: 0 0 0 2px #EEF2FF; }
.g-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.85rem; margin-bottom: 0.7rem; }
.link-btn { background: none; border: 0; color: #3B66F5; font-weight: 700; cursor: pointer; min-height: 44px; padding: 0 0.3rem; }

.g-grid { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
@media (min-width: 700px) { .g-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .g-grid { grid-template-columns: repeat(3, 1fr); } }
.g-card { display: flex; flex-direction: column; gap: 0.55rem; padding: 1rem 1.05rem; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.g-card:hover { border-color: #3B66F5; box-shadow: var(--shadow); color: inherit; }
.g-card h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.15; }
.g-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.g-card .g-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; font-size: 0.82rem; color: var(--ink); font-weight: 600; }
.g-next { font-size: 0.85rem; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; padding: 0.45rem 0.6rem; }
.g-next b { color: #3B66F5; }
.ex-tag { display: inline-block; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: #FFF4D6; color: #5A4500; border-radius: 999px; padding: 0.1rem 0.45rem; }
.new-tag { display: inline-block; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: #FBE4DD; color: #7A2E1F; border-radius: 999px; padding: 0.1rem 0.45rem; }

.start-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem; margin-top: 1.4rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: #EEF2FF; border: 2px solid #3B66F5; }
.start-cta h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.start-cta p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.92rem; }

/* Group page */
.g-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .g-layout { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.g-head { padding: 1.3rem 1.2rem 0.6rem; max-width: var(--max); margin: 0 auto; }
.g-head h1 { margin: 0.5rem 0 0.4rem; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5.5vw, 3.2rem); line-height: 1.02; letter-spacing: -0.02em; }
.g-head .lede { margin: 0; }
.g-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.8rem; font-size: 0.9rem; font-weight: 600; }
.g-facts span { display: inline-flex; gap: 0.3rem; align-items: center; }
.gt-item { display: grid; grid-template-columns: 64px 1fr; gap: 0.8rem; padding: 0.9rem 0; border-top: 1px solid #E2E8F0; }
.gt-item:first-of-type { border-top: 0; }
.datebox { border: 2px solid var(--line); border-radius: 12px; text-align: center; padding: 0.35rem 0; line-height: 1.1; }
.datebox small { display: block; font-size: 0.7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.datebox b { font-size: 1.35rem; font-family: var(--display); }
.gt-item h3 { margin: 0; font-size: 1.02rem; }
.gt-item .m-meta { color: var(--muted); font-size: 0.87rem; margin: 0.15rem 0 0.5rem; }
.m-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.88rem; }
.btn-outline { background: #fff; color: #1D2A27; border: 2px solid #3B66F5; }
.btn-outline:hover { background: #EEF2FF; color: #1D2A27; }
.btn-danger { background: #fff; color: #B23A28; border: 2px solid #E8B4A9; }
.btn-danger:hover { background: #FDE8E4; color: #B23A28; }
.report-link { font-size: 0.78rem; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; min-height: 32px; }
.join-box form { display: grid; gap: 0.7rem; }
.consent { font-size: 0.78rem; color: var(--muted); margin: 0; line-height: 1.45; }
.check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.82rem; font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #3B66F5; flex: 0 0 auto; }
.avatars { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.avatars span { font-size: 0.8rem; font-weight: 600; background: #EEF2F7; border-radius: 999px; padding: 0.2rem 0.6rem; }
.note { font-size: 0.82rem; color: var(--muted); background: #F8FAFC; border: 1px dashed var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; }
.sent-box { background: #EEF2FF; border: 2px solid #3B66F5; border-radius: 12px; padding: 0.9rem 1rem; }
.sent-box h3 { margin: 0 0 0.3rem; font-family: var(--display); }
.stack { display: grid; gap: 1rem; }

/* Forms */
.form-grid { display: grid; gap: 0.9rem; }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231D2A27' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.85rem center; }
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.counter { font-weight: 500; color: var(--muted); font-size: 0.75rem; text-align: right; }
.steps { display: grid; gap: 0.5rem; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 0.6rem; align-items: start; font-size: 0.92rem; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 999px; background: #3B66F5; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 0.85rem; }

/* Homepage row */
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 0.7rem; overflow-x: auto; padding-bottom: 0.3rem; }
.gt-item .datebox { align-self: start; }
.hero-kicker { margin: 0.8rem 0 0; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.hero-kicker + .lede { margin-top: 0.35rem; }

.preview-tag { display: inline-block; vertical-align: middle; margin-left: 0.45rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: #EEF2F7; border: 1px solid #E2E8F0; border-radius: 999px; padding: 0.08rem 0.45rem; }
.g-card .preview-tag { margin-left: 0; }
.groups-row { max-width: var(--max); margin: 0 auto; padding: 0 1.2rem 2rem; }
.groups-row .start-cta { margin-top: 0.9rem; }
.groups-row .start-cta h2 em { font-style: normal; color: var(--hero-accent); }
.topbar-mobile-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; color: var(--ink); }
.groups-nav { text-decoration: none; }
@media (min-width: 800px) { .topbar-mobile-link, .groups-nav { display: none !important; } }
.topbar-right { display: flex; align-items: center; gap: 0.9rem; }
/* Launching-soon modal */
.gs-modal[hidden] { display: none; }
.gs-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; background: var(--overlay); }
.gs-modal-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); max-width: 26rem; width: 100%; padding: 1.4rem 1.3rem 1.2rem; box-shadow: 0 20px 50px rgba(29,42,39,.18); position: relative; }
.gs-modal-card h2 { padding-right: 2.4rem; font-family: var(--display); font-weight: 800; font-size: 1.45rem; margin: 0 0 0.5rem; line-height: 1.1; }
.gs-modal-card p { margin: 0 0 1rem; color: var(--muted); }
.gs-modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gs-close { position: absolute; top: 0.5rem; right: 0.5rem; }
.join-preview { display: grid; gap: 0.7rem; }
@media (max-width: 420px) {
  .groups-nav { padding: 0 0.35rem; min-width: 0; border-color: transparent; background: transparent; font-size: 0.95rem; }
  .topbar-sticky .logo-text strong { white-space: nowrap; font-size: 0.92rem; }
  .topbar-sticky .topbar-actions { gap: 0.3rem; }
}
.quick-picks .quick-link { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); background: #EEF2FF; border-color: #3B66F5; }
.quick-picks .quick-link:hover { background: #E0E8FE; color: var(--ink); }
