/* Good Company — shared styles (public site + admin). Light and dark themes. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@600;700&display=swap");

:root {
  --bg: #F7F5F2; --surface: #FFFFFF; --line: #E7E2DC; --ink: #1F2A30; --muted: #5B6670;
  --pri: #C2410C; --pri-text: #C2410C; --pri-hover: #9A3412; --pri-soft: #FFF1E8;
  --teal: #0F4C5C; --teal-text: #0F4C5C; --teal-soft: #E6F0F2; --danger: #9F1239; --on-ink: #FFFFFF;
  --focus: #2563EB;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121619; --surface: #1C2226; --line: #2E363C; --ink: #ECEFF1; --muted: #A3ADB5;
    --pri-text: #F59E62; --pri-hover: #FDBA8C; --pri-soft: #3A2416;
    --teal: #134A57; --teal-text: #7CC4D4; --teal-soft: #16343B; --danger: #FB7185; --on-ink: #121619;
    --focus: #93C5FD; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121619; --surface: #1C2226; --line: #2E363C; --ink: #ECEFF1; --muted: #A3ADB5;
  --pri-text: #F59E62; --pri-hover: #FDBA8C; --pri-soft: #3A2416;
  --teal: #134A57; --teal-text: #7CC4D4; --teal-soft: #16343B; --danger: #FB7185; --on-ink: #121619;
  --focus: #93C5FD; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.45; }
a { color: var(--pri-text); }
a:hover { color: var(--pri-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, .display { font-family: Outfit, Inter, sans-serif; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { flex-shrink: 0; }

/* header */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.logo span { font-family: Outfit, sans-serif; font-weight: 700; font-size: 19px; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }

/* layout */
.page { max-width: 720px; margin: 0 auto; padding: 20px 16px 104px; display: flex; flex-direction: column; gap: 16px; }
.page h1 { margin: 0; font-size: 28px; letter-spacing: -0.3px; }
.sub { margin: 0; color: var(--muted); font-size: 15px; }
.section-label { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; font-family: Inter, sans-serif; }

/* inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 14px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.help { font-size: 13px; color: var(--muted); }
input[type=text], input[type=search], input[type=email], input[type=url], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); width: 100%; }
textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.search input { padding-left: 44px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--pri); flex-shrink: 0; }

/* buttons */
.btn { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-pri { background: var(--pri); border-color: var(--pri); color: #FFFFFF; }
.btn-pri:hover { background: #9A3412; color: #FFFFFF; }
.btn-teal { background: var(--teal); border-color: var(--teal); color: #FFFFFF; }
.btn-danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 600px) {
  /* Wider screens: wrap the category buttons so every one is visible (no sideways scrolling needed). */
  .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 2px 0 4px; -webkit-mask-image: none; mask-image: none; }
}
.chip { flex-shrink: 0; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tag { align-self: flex-start; font-size: 12px; font-weight: 500; color: var(--teal-text); background: var(--teal-soft); padding: 3px 10px; border-radius: 999px; }

/* event card */
.card { display: flex; gap: 14px; padding: 14px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); }
.datebox { width: 54px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; background: var(--pri-soft); border-radius: 10px; align-self: flex-start; }
.datebox .m { font-size: 11px; font-weight: 600; color: var(--pri-text); letter-spacing: .6px; }
.datebox .d { font-family: Outfit, sans-serif; font-size: 24px; font-weight: 700; line-height: 1.1; }
.card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card .title { font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
.card .title::after { content: ""; }
.card .meta { font-size: 13px; color: var(--muted); }
.save-btn { width: 44px; height: 44px; border: none; background: transparent; color: var(--muted); cursor: pointer; margin: -8px -8px 0 0; display: flex; align-items: center; justify-content: center; }
.save-btn[aria-pressed="true"] { color: var(--pri-text); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; }

/* bottom nav */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: 72px; padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--surface); border-top: 1px solid var(--line); }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 500; }
.bottomnav a[aria-current="page"] { color: var(--pri-text); font-weight: 600; }
.bottomnav .inner { max-width: 720px; margin: 0 auto; display: flex; width: 100%; }

/* region picker */
.region-open { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; min-height: 44px; background: var(--surface); border: 2px solid var(--pri-text); border-radius: 14px; color: var(--ink); cursor: pointer; text-align: left; width: 100%; }
.region-open .badge { font-size: 12px; font-weight: 600; color: #FFFFFF; background: var(--pri); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.region-soon { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 16px; min-height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* calendar */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-day { height: 48px; border: none; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: transparent; color: var(--ink); cursor: pointer; font-weight: 500; }
.cal-day .dot { width: 6px; height: 6px; border-radius: 999px; }
.cal-day.has .dot { background: var(--pri-text); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
.cal-day[aria-pressed="true"] { background: var(--pri); color: #FFFFFF; font-weight: 700; }
.cal-day[aria-pressed="true"] .dot { background: #FFFFFF; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head h1 { font-size: 22px; }

/* event detail */
.hero { background: var(--teal); color: #FFFFFF; padding: 24px 16px; }
.hero .inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.15; }
.hero .pill { align-self: flex-start; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px; }
.info { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; }
.info-row .ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--pri-soft); color: var(--pri-text); display: flex; align-items: center; justify-content: center; }
.info-row .t { font-weight: 600; }
.info-row .s { color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 140px; }
.desc { white-space: pre-line; margin: 0; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--pri-soft); color: var(--ink); font-size: 14px; }
.notice.ok { background: var(--teal-soft); }
.notice.err { background: var(--pri-soft); border: 1px solid var(--pri-text); }
.footer-note { padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }

/* honeypot: hidden from people, visible to simple bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 760px) { .page { padding-top: 28px; } }
