/* RecallUp. Tokens from the brand sheet: Ink, Signal green, Mint, Amber, Missed red, Slate, Mist. */
:root {
  --ink: #0E1B2C;
  --ink-2: #16263B;
  --ink-3: #243650;
  --green: #0B7A52;
  --green-dark: #085C3E;
  --mint: #34C98A;
  --amber: #B45309;
  --amber-soft: #FDF1E3;
  --red: #B42318;
  --red-soft: #FCEBE9;
  --green-soft: #E3F3EC;
  --slate: #3B4A5E;
  --muted: #5C6B80;
  --line: #E3E8EF;
  --line-strong: #C9D2DE;
  --mist: #F4F6F9;
  --white: #FFFFFF;
  --on-ink-muted: #A9B6C7;
  --radius: 12px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-2); color: var(--white); }
.btn-mint { background: var(--mint); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: 0.7; pointer-events: none; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-gray { background: var(--mist); color: var(--slate); }
.pill-ink { background: var(--ink); color: var(--white); }

/* Cards & forms */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card-amber { background: var(--amber-soft); border-color: #F3D9B5; }
.card-ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.card-ink .muted { color: var(--on-ink-muted); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=search], input[type=time], input[type=number], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(11,122,82,0.35); outline-offset: 1px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); }
.form-errors { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.form-errors ul { margin: 0; padding-left: 18px; }

/* Flash */
.flash { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; }
.flash-ok { background: var(--green-soft); color: var(--green-dark); }
.flash-error { background: var(--red-soft); color: var(--red); }
.flash-chat { background: var(--ink); color: var(--white); }

/* Mark */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1; }
.brand-word span { color: var(--green); }
.on-ink .brand-word { color: var(--white); }
.on-ink .brand-word span { color: var(--mint); }

/* ---------------------------------------------------------------- owner app */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--mist); }
.app-nav { flex: 0 0 240px; background: var(--ink); color: var(--white); padding: 22px 16px; display: flex; flex-direction: column; gap: 20px; }
.app-nav .biz { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--ink-2); border-radius: 10px; }
.app-nav .biz-mark { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--white); flex: 0 0 auto; }
.app-nav .biz-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.app-nav .biz-num { font-family: var(--mono); font-size: 11px; color: var(--on-ink-muted); }
.app-links { display: flex; flex-direction: column; gap: 2px; }
.app-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--on-ink-muted); font-size: 15px; font-weight: 500; }
.app-links a:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.app-links a.active { background: rgba(52,201,138,0.14); color: var(--white); font-weight: 600; }
.app-links a .left { display: inline-flex; align-items: center; gap: 10px; }
.app-links .count { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ink-3); color: var(--white); }
.app-links .count-amber { background: #FFC66D; color: var(--ink); }
.app-links .count-mint { background: var(--mint); color: var(--ink); }
.app-nav .foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.meter { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-bottom: 4px; background: var(--ink-2); border-radius: 12px; }
.meter-head { font-size: 13px; }
.meter-plan { font-weight: 600; }
.meter-count { color: var(--on-ink-muted); }
.meter-track { height: 6px; background: var(--ink-3); border-radius: 3px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--mint); }
.meter-fill.over { background: #FFC66D; }
.meter-note { font-size: 12px; color: var(--on-ink-muted); }
.meter-note a { color: var(--white); font-weight: 600; }
.app-main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; }
.app-main > .inner { max-width: 1120px; width: 100%; display: flex; flex-direction: column; gap: 22px; }
.page-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -0.025em; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--slate); font-size: 13px; font-weight: 500; }
.tab.active { background: var(--ink); border-color: var(--ink); color: var(--white); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.025em; line-height: 1.05; }
.stat .l { font-size: 13px; color: var(--muted); }
.table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.list th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.list td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--slate); }
table.list tr:last-child td { border-bottom: 0; }
table.list td a.rowlink { color: var(--ink); font-weight: 600; }
.cb-card { display: flex; flex-direction: column; gap: 10px; }
.cb-card details summary { cursor: pointer; list-style: none; }
.cb-card details summary::-webkit-details-marker { display: none; }
.thread { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 10px 14px; font-size: 15px; line-height: 1.45; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.in { align-self: flex-start; background: var(--mist); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--green); color: var(--white); border-bottom-right-radius: 4px; }
.bubble.owner { align-self: flex-end; background: var(--ink); color: var(--white); border-bottom-right-radius: 4px; }
.bubble-meta { font-size: 11px; color: var(--muted); }
.bubble-meta.right { align-self: flex-end; }
.two-col { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.two-col > .side { flex: 1 1 300px; min-width: 0; max-width: 380px; }
.two-col > .main { flex: 999 1 420px; min-width: 0; }
.qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qlist a { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.qlist a.active { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.source { display: flex; gap: 10px; font-size: 14px; color: var(--slate); line-height: 1.5; }
.sources { background: var(--mist); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.title-input { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; padding: 4px 0 12px !important; font-family: var(--display) !important; font-weight: 800; font-size: 26px !important; letter-spacing: -0.02em; }
.body-input { border: 0 !important; padding: 0 !important; font-size: 16px !important; min-height: 180px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; background: var(--white); border: 1.5px solid var(--line-strong); color: var(--muted); }
.step-n.done { background: var(--green); border-color: var(--green); color: var(--white); }
.step-n.now { background: var(--ink); border-color: var(--ink); color: var(--white); }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.code { font-family: var(--mono); font-size: 13px; background: var(--ink); color: #D7E2EF; border-radius: 10px; padding: 14px 16px; overflow-x: auto; white-space: pre; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; font-size: 14px; }
.mobile-bar, .mobile-only { display: none !important; }

@media (max-width: 860px) {
  .app { flex-direction: column; flex-wrap: nowrap; }
  .app-nav { flex: 0 0 auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; position: sticky; top: 0; z-index: 10; }
  .app-nav .app-links, .app-nav .foot, .app-nav .biz { display: none; }
  .mobile-only { display: inline-flex !important; }
  .mobile-bar { display: flex !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--ink); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .mobile-bar a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; color: var(--on-ink-muted); font-size: 11px; font-weight: 600; position: relative; }
  .mobile-bar a.active { color: var(--white); }
  .mobile-bar .dot { position: absolute; top: 4px; right: calc(50% - 18px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10px; line-height: 16px; text-align: center; background: #FFC66D; color: var(--ink); }
  .app-main { padding: 20px 16px 96px; }
  .page-title { font-size: 26px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-grid { grid-template-columns: minmax(0, 1fr); }
  .bubble { max-width: 92%; }
}

/* ---------------------------------------------------------------- auth & marketing helpers */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--mist); }
.auth-card { width: 100%; max-width: 460px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header nav { max-width: 1200px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 720px; }
.prose h2 { font-family: var(--display); font-size: 24px; margin-top: 32px; }
.prose p, .prose li { color: var(--slate); font-size: 16px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.45); border-top-color: currentColor; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------------------------------------------------------------- help center (uses --brand) */
.hc { --brand: #1E5A8A; --brand-soft: #EEF4F9; min-height: 100vh; display: flex; flex-direction: column; }
.hc a { color: var(--brand); }
.hc-header { border-bottom: 1px solid var(--line); }
.hc-header .in { max-width: 1040px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hc-logo { display: flex; align-items: center; gap: 10px; color: var(--ink) !important; }
.hc-logo .m { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.hc-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; background: var(--brand); color: var(--white) !important; border-radius: 10px; font-size: 14px; font-weight: 600; border: 0; font-family: inherit; cursor: pointer; }
.hc-hero { background: var(--brand-soft); padding: 56px 24px; }
.hc-hero .in { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.hc-hero h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -0.025em; }
.hc-search { width: 100%; display: flex; gap: 10px; flex-wrap: wrap; }
.hc-search input { flex: 1 1 280px; min-width: 0; height: 54px; }
.hc-body { max-width: 1040px; width: 100%; margin: 0 auto; padding: 40px 24px 0; display: flex; flex-direction: column; gap: 36px; }
.hc-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.hc-cat { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.hc-cat h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); font-family: var(--sans); }
.hc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hc-list li { border-bottom: 1px solid var(--line); }
.hc-list a { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 4px; color: var(--ink) !important; font-size: 16px; font-weight: 500; min-height: 44px; }
.hc-article { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.hc-article h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; }
.hc-article .body p { font-size: 18px; line-height: 1.6; color: var(--slate); margin: 0 0 14px; }
.hc-foot { margin-top: auto; padding: 56px 24px 28px; }
.hc-foot .in { max-width: 1040px; margin: 0 auto; border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.powered { display: inline-flex; align-items: center; gap: 8px; color: var(--muted) !important; min-height: 44px; }
.powered .w { font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--ink); letter-spacing: -0.02em; }
.powered .w span { color: var(--green); }
@media (max-width: 640px) { .hc-hero h1 { font-size: 32px; } .hc-article h1 { font-size: 28px; } }

/* Settings > Booking: the per-day rows only matter when "any time we're open" is unticked. */
.booking-hours:has(input[name="booking_same_hours"]:checked) .booking-days { display: none; }
