:root {
  color-scheme: light;
  --ivory: #f7f5f0;
  --paper: #ffffff;
  --ink: #172b3a;
  --slate: #59636b;
  --blue: #245c80;
  --blue-dark: #173f59;
  --line: #dddcd6;
  --soft: #eeece6;
  --success: #2f6d55;
  --danger: #9a3f37;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(23, 43, 58, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--ivory); color: var(--ink); }
body { margin: 0; min-width: 280px; background: var(--ivory); }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 99; padding: 10px 14px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }
.shell { min-height: 100vh; }
.site-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px clamp(18px, 4vw, 64px); background: rgba(247,245,240,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--slate); text-decoration: none; font-size: 14px; font-weight: 550; letter-spacing: -.01em; }
.brand-mark { width: 31px; height: 25px; object-fit: contain; opacity: .75; }
.header-link { color: var(--slate); text-decoration: none; font-size: 14px; font-weight: 650; }
.page { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 46px 0 90px; }
.public-page { width: min(660px, calc(100% - 28px)); }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; letter-spacing: -.035em; }
h1 { font-weight: 640; font-size: clamp(30px, 5vw, 44px); line-height: 1.08; }
h2 { font-weight: 620; font-size: clamp(27px, 3vw, 34px); line-height: 1.12; }
h3 { font-size: 18px; line-height: 1.2; }
.lede { margin: 18px 0 0; max-width: 600px; color: var(--slate); font-size: 17px; line-height: 1.55; }
.context { margin: 30px 0; padding: 16px 0; display: flex; gap: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.context-symbol { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 14px; }
.context strong, .context span { display: block; }
.context span { margin-top: 3px; color: var(--slate); font-size: 14px; }
.panel { margin-top: 26px; padding: clamp(20px, 4vw, 34px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stack { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span, legend { color: var(--ink); font-size: 13px; font-weight: 750; }
.hint { color: var(--slate); font-size: 12px; line-height: 1.4; }
input, textarea, select { width: 100%; min-height: 52px; padding: 12px 13px; color: var(--ink); background: rgba(255,255,255,.9); border: 1px solid #bfc2be; border-radius: 10px; outline: none; }
textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,92,128,.14); }
fieldset { margin: 0; padding: 0; border: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; min-height: 42px; align-items: center; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--slate); background: var(--paper); cursor: pointer; font-weight: 700; font-size: 14px; }
.choice input:checked + span { color: white; background: var(--ink); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid rgba(36,92,128,.24); outline-offset: 2px; }
.section-rule { height: 1px; margin: 6px 0; background: var(--line); }
.consent-heading { margin-bottom: 4px; }
.consent-intro { margin: 0 0 8px; color: var(--slate); }
.toggle-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row small { margin-top: 5px; color: var(--slate); line-height: 1.4; }
.switch { position: relative; width: 48px; height: 28px; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #c8cbc8; transition: .18s ease; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 22px; height: 22px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: .18s ease; }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid rgba(36,92,128,.24); outline-offset: 2px; }
.consent-footer { display: flex; justify-content: space-between; gap: 16px; margin: 14px 0 0; color: var(--slate); font-size: 12px; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.button { appearance: none; display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--blue); color: white; text-decoration: none; font-weight: 760; cursor: pointer; }
.button:hover { background: var(--blue-dark); }
.button:disabled { opacity: .55; cursor: wait; }
.button.secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.button.secondary:hover { background: var(--soft); }
.button.danger { color: var(--danger); border-color: #e3c7c3; background: white; }
.button.small { min-height: 38px; padding: 8px 12px; font-size: 13px; }
.button.full { width: 100%; }
.notice { margin: 18px 0; padding: 13px 15px; border-left: 3px solid var(--blue); background: #edf4f7; color: var(--ink); font-size: 14px; line-height: 1.45; }
.notice.error { border-color: var(--danger); background: #fbefed; }
.notice.success { border-color: var(--success); background: #eef6f1; }
.dev-banner { padding: 8px 16px; text-align: center; color: #fff; background: #7d5225; font-size: 12px; font-weight: 700; }
.otp { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.receipt { text-align: center; }
.receipt-mark { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--success); font-size: 25px; }
.receipt-list { margin: 24px 0 0; padding: 0; list-style: none; text-align: left; border-top: 1px solid var(--line); }
.receipt-list li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--slate); }
.receipt-list strong { color: var(--ink); }
.tabs { display: flex; gap: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { appearance: none; padding: 14px 1px 12px; color: var(--slate); background: none; border: 0; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; font-weight: 720; }
.tab.active { color: var(--ink); border-color: var(--blue); }
.app-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 30px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 24px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.metric { padding: 20px; background: var(--paper); }
.metric strong, .metric span { display: block; }
.metric strong { margin-bottom: 5px; font-size: 30px; font-weight: 620; }
.metric span { color: var(--slate); font-size: 12px; }
.list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-item { padding: 18px; color: inherit; background: var(--paper); text-decoration: none; }
.list-item-button { width: 100%; border: 0; text-align: left; cursor: pointer; }
.list-item:hover { background: #fbfaf7; }
.item-head { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.item-head time, .muted { color: var(--slate); font-size: 12px; }
.item-copy { margin: 7px 0 0; color: var(--slate); line-height: 1.45; }
.pill { display: inline-flex; padding: 4px 8px; margin: 8px 5px 0 0; border: 1px solid var(--line); border-radius: 999px; color: var(--slate); font-size: 11px; font-weight: 750; }
.pill.on { color: var(--success); border-color: #b9d4c5; background: #f2f8f4; }
.empty { padding: 42px 20px; text-align: center; color: var(--slate); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.owner-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; align-items: start; }
.owner-nav { position: sticky; top: 92px; display: grid; gap: 5px; }
.owner-nav button { appearance: none; padding: 11px 12px; text-align: left; border: 0; border-radius: 7px; color: var(--slate); background: transparent; cursor: pointer; font-weight: 700; }
.owner-nav button.active { color: white; background: var(--ink); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 22px 0 14px; }
.toolbar .search { width: min(340px, 100%); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--slate); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--success); }
.dialog-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(23,43,58,.58); }
.dialog { width: min(520px, 100%); max-height: 88vh; overflow: auto; padding: 26px; background: white; border-radius: var(--radius); box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.dialog p { color: var(--slate); line-height: 1.55; }
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .page { padding-top: 30px; }
  .grid-2, .owner-layout { grid-template-columns: 1fr; }
  .owner-nav { position: static; grid-template-columns: repeat(3, 1fr); }
  .owner-nav button { text-align: center; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .app-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 430px) {
  .site-header { height: 58px; padding: 0 15px; }
  .brand span:last-child { display: inline; }
  .public-page { width: min(100% - 22px, 660px); padding-top: 24px; }
  h1 { font-size: 42px; }
  h2 { font-size: 30px; }
  .panel { margin-top: 20px; padding: 19px 16px; border-radius: 11px; }
  .grid-2 { grid-template-columns: 1fr; }
  .actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .consent-footer { flex-direction: column; gap: 7px; }
  .metric { padding: 16px; }
  .otp { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; } }

/* Approved Connect v1 glass controls, quiet rows, and owner work surfaces. */
.glass, .tabs { background: rgba(255,255,255,.68); border: 1px solid rgba(255,255,255,.88); box-shadow: 0 0 0 1px rgba(23,43,58,.08), 0 8px 24px rgba(23,43,58,.05); backdrop-filter: blur(14px); }
.row-glow { transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.row-glow:hover, .row-glow:focus-within { border-color: rgba(36,92,128,.28); background: rgba(255,255,255,.96); box-shadow: 0 8px 26px rgba(36,92,128,.08); }
.suggestions { display: grid; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 35px rgba(23,43,58,.12); }
.suggestion { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding: 10px 13px; text-align: left; color: var(--ink); background: white; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.suggestion:hover, .suggestion:focus { background: #eef4f6; }
.suggestion small { color: var(--slate); }
dialog.dialog { width: min(560px, calc(100vw - 30px)); border: 1px solid white; border-radius: 20px; padding: 28px; color: var(--ink); background: rgba(255,255,255,.96); box-shadow: 0 24px 80px rgba(23,43,58,.24); }
dialog.dialog::backdrop { background: rgba(23,43,58,.28); backdrop-filter: blur(6px); }
.compact { display: inline-flex; width: auto; padding: 3px; border-radius: 999px; }
.compact .tab { min-height: 36px; border-radius: 999px; }
.message-row, .message-history { display: block; width: 100%; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.message-detail { padding: 28px 0; }
.message-detail time { display: block; margin-top: 10px; color: var(--slate); font-size: 12px; }
.message-detail > p:last-child, .review-body { margin-top: 25px; white-space: pre-wrap; line-height: 1.75; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.owner-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.86); }
.owner-card small { color: var(--slate); }
.metric-inline { display: grid; grid-template-columns: auto 1fr; gap: 4px 9px; margin: 24px 0; }
.metric-inline strong { font-size: 24px; font-weight: 620; }
.metric-inline span { align-self: center; color: var(--slate); font-size: 12px; }
.owner-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--slate); font-size: 11px; }
.timeline-surface { margin: 25px 0; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.86); }
.timeline-heading, .timeline-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.timeline-heading p { margin: 5px 0 0; color: var(--slate); font-size: 11px; }
.timeline-controls select { min-height: 42px; width: 180px; border-radius: 999px; }
.timeline-plots { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 24px; }
.timeline-plots figure { margin: 0; }
.timeline-plots figcaption { margin-bottom: 12px; font-size: 13px; font-weight: 650; }
.timeline-chart { width: 100%; height: auto; }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bar-chart { display: flex; height: 160px; align-items: end; gap: 4px; border-bottom: 1px solid var(--line); }
.bar-chart button { display: flex; flex: 1; height: 100%; padding: 0; align-items: end; justify-content: center; gap: 1px; border: 0; background: transparent; }
.bar-chart i, .bar-chart b { width: 42%; min-height: 1px; }
.bar-chart i { height: calc(var(--yard) * 100%); background: #416d79; }
.bar-chart b { height: calc(var(--help) * 100%); background: #9a7944; }
.timeline-slider { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin-top: 18px; color: var(--slate); font-size: 11px; }
.timeline-slider output { color: var(--ink); text-align: right; }
.timeline-slider input { grid-column: 1 / -1; min-height: 30px; padding: 0; accent-color: var(--blue); }
.owner-filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin: 22px 0; }
.owner-filters label, .compose-audience label { font-size: 12px; font-weight: 700; }
.owner-filters input, .owner-filters select, .compose-audience select { margin-top: 6px; min-height: 44px; }
.contact-link { appearance: none; padding: 0; border: 0; color: var(--ink); background: transparent; cursor: pointer; }
.contact-link:hover { color: var(--blue); text-decoration: underline; }
.contact-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; margin-top: 28px; }
.contact-detail-grid dt { margin-top: 18px; color: var(--slate); font-size: 11px; }
.contact-detail-grid dd { margin: 4px 0 0; }
.owner-request-item { padding: 15px 0; border-bottom: 1px solid var(--line); }
.delivery-breakdown { margin: 24px 0 0; }
.delivery-breakdown > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.delivery-breakdown dd { margin: 0; font-weight: 700; }
.history-heading { margin: 30px 0 12px; }
.compose-audience { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 800px) { .card-grid, .timeline-plots { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .owner-filters, .contact-detail-grid, .compose-audience { grid-template-columns: 1fr; } .timeline-slider { grid-template-columns: 1fr; } .timeline-slider output { text-align: left; } }
@media (prefers-reduced-transparency: reduce) { .glass, .tabs, .timeline-surface, .owner-card { background: white; backdrop-filter: none; } }

/* Keep the next signup action visible while the fields scroll behind it. */
#app:has(.signup-action-dock) .public-page { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
.signup-action-dock { position: fixed; z-index: 15; bottom: 0; left: 50%; transform: translateX(-50%); width: min(704px, 100%); padding: 16px 22px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #f7f5f000, #f7f5f0f5 45%, #f7f5f0); }
.signup-action-dock .button { width: 100%; min-height: 54px; border-radius: 999px; border: 1px solid #ffffff66; background: linear-gradient(165deg, #346e92f5, #245c80f5 48%, #204e6ff7); box-shadow: inset 0 1px 1px #ffffff80, inset 0 -1px 1px #173d6559, 0 4px 12px #245c8024; backdrop-filter: blur(18px) saturate(1.45); -webkit-backdrop-filter: blur(18px) saturate(1.45); transition: transform .15s, box-shadow .15s; }
.signup-action-dock .button:active:not(:disabled) { transform: scale(.985); }
.signup-action-dock .button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.public-page input { scroll-margin-bottom: 110px; }
#otp .otp { display: block; }
@media (prefers-reduced-motion: reduce) { .signup-action-dock .button { transition: none; } .signup-action-dock .button:active:not(:disabled) { transform: none; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) { .signup-action-dock { background: var(--ivory); } .signup-action-dock .button { background: var(--blue); backdrop-filter: none; -webkit-backdrop-filter: none; border-color: var(--blue-dark); } }
.field-attention input { border-color: var(--blue); box-shadow: 0 0 0 3px #245c8019; }
.field-guidance { color: var(--blue); font-size: 12px; line-height: 1.4; }
.signup-action-dock .button:disabled { opacity: 1; }

/* Keep the neutral Porch canvas; personalize only the liquid button. */
.site-header { padding-right: 62px; }
.admin-entry { position: absolute; right: 4px; top: 4px; width: 46px; height: 46px; background: transparent; border: 0; cursor: pointer; border-radius: 12px; }
.admin-entry:focus-visible { outline: 2px solid var(--ink); }
button.header-link { appearance: none; border: 0; background: transparent; cursor: pointer; padding: 8px 0; }
.signup-action-dock .button, .theme-preview-button {
  color: var(--button-font, #ffffff);
  background: linear-gradient(165deg, var(--glass-top, #346e92f5), var(--glass-middle, #245c80f5) 48%, var(--glass-bottom, #204e6ff7));
  border-radius: 999px; border: 1px solid #ffffff66;
  box-shadow: inset 0 1px 1px #ffffff80, inset 0 -1px 1px #173d6559, 0 4px 12px #245c8024;
  text-shadow: 0 1px 1px #163f5826;
  backdrop-filter: blur(18px) saturate(1.45); -webkit-backdrop-filter: blur(18px) saturate(1.45);
}
.theme-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.theme-colors input { min-width: 0; padding: 4px; }
.theme-preview { padding: 24px; background: var(--ivory); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; }
.theme-preview .panel { margin: 20px 0; }
.theme-preview-button { width: 100%; min-height: 54px; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .signup-action-dock .button, .theme-preview-button { background: var(--button-color, #245c80); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
