:root {
  --ink: #101820;
  --paper: #f6f1e8;
  --red: #b2282e;
  --gold: #f2cb07;
  --green: #2f6f68;
  --graphite: #2b323b;
  --muted: #667085;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 28px; color: white; }
.brand span:last-child { color: #e12f37; }
.brand.dark { color: var(--ink); }
.mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 3px solid #d92730; border-radius: 12px; color: white; background: rgba(16,24,32,.7); }
.tourglow-mark { width: 44px; height: 42px; overflow: visible; border: 0; border-radius: 0; background: url("img/tourglow-mark.311619883c0c.png") center / contain no-repeat; box-shadow: none; }
.brand.dark .mark { color: white; }
.brand-logo { display: inline-flex; align-items: center; width: 188px; max-width: 48vw; line-height: 0; }
.brand-logo img { display: block; width: 100%; height: auto; object-fit: contain; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 7px; font-weight: 800; border: 1px solid transparent; cursor: pointer; }
.button.primary { background: #d3222b; color: white; box-shadow: 0 14px 34px rgba(178,40,46,.28); }
.button.ghost { border-color: rgba(255,255,255,.65); color: white; background: rgba(16,24,32,.22); backdrop-filter: blur(10px); }
.button.full { width: 100%; }
.button-row { display: flex; gap: 16px; flex-wrap: wrap; }
.button-row.center { justify-content: center; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--green); font-size: 12px; font-weight: 900; }

.hero { position: relative; min-height: 100vh; overflow: hidden; color: white; background: var(--ink); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .86; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,10,18,.9), rgba(5,10,18,.35), rgba(5,10,18,.2)); }
.topbar { position: relative; z-index: 1; height: 100px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; }
.navlinks { display: flex; align-items: center; gap: 36px; font-size: 18px; font-weight: 600; }
.nav-button { background: #d3222b; color: white; padding: 17px 28px; border-radius: 7px; }
.hero-copy { position: relative; z-index: 1; max-width: 760px; margin: 12vh 0 0 5vw; }
.hero h1 { margin: 0; font-size: clamp(58px, 8vw, 124px); line-height: .93; letter-spacing: 0; }
.hero h1 span { color: #df202a; display: block; }
.hero p { max-width: 680px; font-size: clamp(21px, 2vw, 32px); line-height: 1.35; }
.hero .client-line { margin: 18px 0 28px; font-size: 15px; line-height: 1.5; font-weight: 800; color: rgba(255,255,255,.76); }

main > section { padding: 110px 6vw; }
.paper-section { position: relative; display: grid; grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); gap: clamp(48px, 7vw, 96px); align-items: center; background: var(--paper); }
.paper-section h2, .dark-showcase h2, .mobile-signoff h2, .routing-section h2, .pricing h2 { margin: 0 0 18px; font-size: clamp(38px, 5vw, 78px); line-height: 1; letter-spacing: 0; }
.product-copy { max-width: 540px; }
.side-note { margin: 0 0 30px; max-width: 360px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.paper-section .eyebrow { margin-bottom: 14px; }
.route-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 4vw, 42px); align-items: start; }
.route-line div { border-top: 3px solid var(--red); padding-top: 28px; min-height: 190px; }
.route-line strong { display: block; color: var(--gold); font-size: clamp(50px, 6vw, 76px); line-height: .82; margin-bottom: 18px; }
.route-line span { display: block; max-width: 190px; font-weight: 800; font-size: 20px; line-height: 1.18; }

.dark-showcase { display: grid; grid-template-columns: 1.4fr .8fr; gap: 60px; color: white; background: radial-gradient(circle at 20% 20%, #243541, var(--ink) 58%); }
.showcase-panel { position: relative; min-height: 420px; }
.portal-preview, .queue-card, .table-card, .auth-card, .thanks-card, .review-card { border-radius: 8px; background: white; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.16); }
.portal-preview { padding: 26px; }
.portal-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 16px; padding: 18px; border-bottom: 1px solid #e8e4dc; }
.portal-row.head { color: var(--muted); font-size: 13px; text-transform: uppercase; font-weight: 900; }
.ok { color: var(--green); } .warn { color: var(--red); }
.queue-card { position: absolute; right: 0; bottom: 0; padding: 24px; width: 280px; }
.section-copy p:not(.eyebrow), .routing-section p, .pricing p, .mobile-signoff p { color: inherit; font-size: 20px; line-height: 1.55; }
.section-copy a { color: var(--gold); font-weight: 900; }

.mobile-signoff { text-align: center; color: white; background: linear-gradient(135deg, var(--graphite), var(--ink)); }
.mobile-signoff p { max-width: 760px; margin: 0 auto 42px; color: rgba(255,255,255,.78); }
.phone-strip { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.phone-card { width: 250px; min-height: 420px; border: 10px solid #05070a; border-radius: 34px; background: #fffaf2; color: var(--ink); padding: 34px 22px; text-align: left; font-weight: 900; box-shadow: 0 20px 70px rgba(0,0,0,.4); }
.phone-card span { display: block; margin-top: 22px; color: var(--muted); font-weight: 600; }
.signature-demo em { display: block; margin-top: 120px; font-family: cursive; font-size: 38px; font-weight: 400; }
.phone-card.success { background: #f8fff9; }

.routing-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; background: linear-gradient(90deg, var(--paper) 0 76%, var(--red) 76%); }
.rating-map { background: white; border-radius: 8px; padding: 40px; box-shadow: 0 20px 60px rgba(16,24,32,.14); }
.stars { font-size: 62px; color: var(--gold); letter-spacing: 4px; }
.split-paths { display: grid; gap: 14px; margin: 24px 0; font-weight: 800; }
textarea, input, select { width: 100%; border: 1px solid #d7d2ca; border-radius: 7px; padding: 14px 16px; background: #fffefa; }

.pricing { text-align: center; color: white; background: linear-gradient(180deg, var(--ink), #17232e); }
.pricing > p { max-width: 820px; margin: 0 auto 34px; color: rgba(255,255,255,.74); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 20px; margin: 34px 0; }
.plans article { text-align: left; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 28px; background: rgba(255,255,255,.06); }
.plans strong { font-size: 42px; color: var(--gold); }
.pricing footer { margin-top: 34px; color: rgba(255,255,255,.58); }

.portal-bg { background: #eee8dc; }
.app-shell { display: grid; grid-template-columns: 284px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(115deg, #eee8dc 0%, #f8f3ea 52%, #eee7da 100%); }
.sidebar { position: sticky; top: 0; height: 100vh; background: radial-gradient(circle at 12% 0%, rgba(47,111,104,.34), transparent 28%), linear-gradient(180deg, #111d24, #0c141c 72%); color: white; padding: 30px 26px 24px; display: flex; flex-direction: column; gap: 24px; border-right: 1px solid rgba(255,255,255,.08); }
.sidebar .brand, .sidebar .brand-logo { margin-bottom: 0; }
.sidebar .brand-logo { width: 196px; max-width: 100%; }
.tenant-switcher { border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 15px; display: grid; gap: 4px; background: rgba(255,255,255,.055); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.tenant-switcher span { font-weight: 900; }
.tenant-switcher small, .sidebar-footer span { color: rgba(255,255,255,.58); }
.side-nav { display: grid; gap: 8px; }
.side-nav a, .sidebar button { color: white; background: transparent; border: 0; text-align: left; cursor: pointer; font-weight: 800; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 10px; color: rgba(255,255,255,.8); transition: background .2s ease, color .2s ease, transform .2s ease; }
.side-nav a.active, .side-nav a:hover { color: white; background: linear-gradient(90deg, rgba(47,111,104,.58), rgba(255,255,255,.07)); }
.side-nav a:hover { transform: translateX(2px); }
.nav-icon { width: 24px; display: inline-grid; place-items: center; color: var(--gold); }
.svg-icon { width: 20px; height: 20px; flex: 0 0 auto; color: currentColor; }
.side-nav .svg-icon { color: var(--gold); }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.16); padding-top: 18px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: white; font-weight: 900; }
.avatar.small { width: 34px; height: 34px; font-size: 12px; }
.sidebar-footer strong { display: block; }
.signout-form { grid-column: 1 / -1; }
.signout-form button { width: 100%; min-height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.78); background: rgba(255,255,255,.045); text-align: center; font-size: 13px; font-weight: 900; }
.signout-form button:hover { color: white; background: rgba(255,255,255,.08); }
.portal-main { padding: 44px clamp(28px, 4vw, 58px) 72px; }
.portal-main, .app-main, .app-shell { min-width: 0; }
.portal-main > header, .portal-main > section, .settings-dashboard { max-width: 1180px; margin-left: auto; margin-right: auto; }
.portal-main > section:not(.panel):not(.settings-section) { padding: 0; }
.portal-main.narrow { max-width: 860px; }
.portal-main.standalone { margin: 0 auto; }
.app-main, .command-center, .settings-main { background: radial-gradient(circle at 88% -6%, rgba(242,203,7,.16), transparent 25%), radial-gradient(circle at 8% 42%, rgba(47,111,104,.08), transparent 30%), linear-gradient(180deg, #fbf7ef, #efe8dc); }
.app-header, .command-hero { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; margin-bottom: 30px; }
.compact-hero { align-items: center; }
.command-hero h1, .portal-main h1 { margin: 0; font-size: clamp(36px, 4vw, 56px); line-height: .96; letter-spacing: 0; }
.hero-subcopy { max-width: 660px; margin: 12px 0 0; color: #475467; font-size: 18px; line-height: 1.5; text-wrap: pretty; }
.command-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.button.ghost.ink { color: var(--ink); border-color: rgba(16,24,32,.16); background: rgba(255,255,255,.7); box-shadow: none; }
.button.compact { min-height: 42px; padding: 0 16px; font-size: 14px; }
.auth-note { color: #667085; font-size: 14px; font-weight: 700; text-align: center; }
.auth-note a { color: var(--red); font-weight: 900; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card, .panel, .settings-section { min-width: 0; border: 1px solid rgba(30,37,44,.08); border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,251,244,.88)); box-shadow: 0 18px 46px rgba(57,44,26,.075); }
.metric-card { padding: 22px; display: flex; gap: 16px; align-items: center; min-height: 124px; }
.metric-grid.slim .metric-card { min-height: 112px; padding: 18px; }
.metric-card span:not(.metric-icon) { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 900; }
.metric-card strong { display: block; margin: 4px 0; font-size: 42px; line-height: .95; }
.metric-grid.slim .metric-card strong { font-size: 34px; }
.metric-grid.three .metric-card strong { font-size: 34px; }
.metric-card small { display: inline-flex; color: #344054; font-weight: 700; }
.metric-icon { width: 54px; height: 54px; border-radius: 10px; display: grid; place-items: center; font-size: 24px; background: #edf6f2; color: var(--green); }
.metric-grid.slim .metric-icon { width: 46px; height: 46px; }
.metric-icon .svg-icon { width: 26px; height: 26px; }
.metric-card.followups .metric-icon { background: #fff5cf; color: #d49c00; }
.metric-card.feedback .metric-icon { background: #ffe5e5; color: var(--red); }
.metric-card.audit .metric-icon { background: #eef8f2; color: var(--green); }
.command-grid { display: grid; grid-template-columns: 1.05fr 1.05fr .9fr; gap: 14px; margin-bottom: 14px; }
.overview-grid, .page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; align-items: stretch; }
.overview-grid.lower { grid-template-columns: 1.12fr .88fr; align-items: start; }
.page-hero-panel { margin-bottom: 20px; }
.panel { padding: 26px; }
.panel-kicker { color: var(--green); text-transform: uppercase; letter-spacing: .09em; font-size: 12px; font-weight: 900; margin-bottom: 12px; }
.panel h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.08; text-wrap: balance; }
.panel p, .muted { color: #667085; line-height: 1.45; }
.panel-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.panel-head a, .panel-link { color: var(--ink); font-weight: 900; }
.filterbar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, .45fr) minmax(140px, .45fr) auto auto; gap: 12px; align-items: end; margin: 0 0 18px; padding: 14px; border: 1px solid #eee7dc; border-radius: 10px; background: rgba(251,247,239,.72); }
.filterbar label { display: grid; gap: 6px; color: #344054; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.filterbar input, .filterbar select { min-height: 42px; padding: 10px 12px; font-size: 14px; text-transform: none; letter-spacing: 0; }
.qr-layout { display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: center; }
.qr-layout.compact { grid-template-columns: 112px 1fr; gap: 18px; }
.qr-code { width: 132px; height: 132px; border-radius: 10px; background: white; padding: 10px; border: 1px solid #e6ded2; box-shadow: 0 10px 30px rgba(57,44,26,.08); }
.qr-layout.compact .qr-code { width: 112px; height: 112px; }
.link-well { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 14px 0; border: 1px solid #ddd4c7; border-radius: 7px; padding: 10px; background: #fffdfa; }
.link-well span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: #344054; }
.link-well button { border: 0; background: var(--ink); color: white; border-radius: 6px; padding: 8px 10px; font-weight: 900; cursor: pointer; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pipeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.pipeline.wide { max-width: 760px; margin: 18px auto 0; }
.pipeline::before { content: ""; position: absolute; top: 26px; left: 10%; right: 10%; height: 2px; background: #d7d2ca; }
.pipeline div { position: relative; z-index: 1; text-align: center; display: grid; gap: 6px; }
.pipe-dot { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; color: white; font-weight: 900; }
.pipe-dot.scheduled { background: var(--gold); color: var(--ink); }
.pipe-dot.sent { background: #d49c00; }
.pipe-dot.replied { background: var(--green); }
.pipe-dot.attention { background: var(--red); }
.pipeline strong { font-size: 26px; }
.pipeline small { color: #344054; font-weight: 800; }
.audit-list { list-style: none; display: grid; gap: 12px; margin: 0 0 18px; padding: 0; }
.audit-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eee7dc; padding-bottom: 11px; }
.audit-list strong { color: var(--green); }
.audit-timeline { display: grid; gap: 8px; margin: 12px 0 18px; padding: 12px; border-radius: 8px; background: #fbf7ef; }
.audit-timeline h3 { margin: 0; font-size: 14px; }
.audit-timeline div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.audit-timeline span, .audit-timeline p { color: #667085; margin: 0; }
.dashboard-columns { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; align-items: start; }
.dashboard-columns.balanced { grid-template-columns: 1fr 1fr; }
.table-panel { width: 100%; max-width: 100%; overflow: auto; }
.table-card { padding: 24px; margin-bottom: 24px; overflow: auto; }
table, .app-table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 16px 14px; border-bottom: 1px solid #eee7dc; vertical-align: top; }
.compact-table th, .compact-table td { padding: 12px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.app-table td strong, .app-table td small { display: block; }
.app-table td small { margin-top: 4px; color: #667085; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; background: #e8f4ed; color: var(--green); }
.status-pill.pending { background: #fff1c2; color: #8a6100; }
.row-action { font-weight: 900; color: var(--red); }
.stacked-panels { display: grid; gap: 14px; }
.activity-list { display: grid; gap: 12px; }
.activity-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #eee7dc; }
.activity-row strong, .activity-row small { display: block; }
.activity-row small, .activity-row > span:last-child { color: #667085; font-size: 12px; }
.message-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: #fff2bd; font-weight: 900; }
.empty-state { padding: 20px; border-radius: 10px; background: #fbf7ef; color: #667085; font-weight: 700; }
.empty-state.compact { padding: 14px; }
.billing-plan h2 { margin: 0 0 12px; font-size: clamp(34px, 4vw, 44px); }
.settings-overview { margin-top: 14px; }
.settings-overview h2 { font-size: 18px; text-transform: uppercase; letter-spacing: .08em; color: #344054; }
.settings-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.settings-cards a { min-height: 112px; border: 1px solid rgba(16,24,32,.08); border-radius: 8px; background: rgba(255,255,255,.76); padding: 16px; display: grid; gap: 6px; box-shadow: 0 12px 32px rgba(16,24,32,.06); }
.settings-cards .svg-icon { color: var(--red); width: 24px; height: 24px; }
.settings-cards strong, .settings-cards small { display: block; }
.settings-cards small { color: #667085; line-height: 1.35; }
.settings-dashboard, .settings-main { display: grid; gap: 20px; }
.settings-section { display: grid; grid-template-columns: 280px 1fr; gap: 34px; padding: 28px; }
.settings-section-copy h2 { margin: 0 0 8px; font-size: 26px; }
.settings-section-copy p { color: #667085; line-height: 1.45; }
.settings-icon { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; color: var(--red); background: #fff0ef; font-weight: 900; margin-bottom: 14px; }
.settings-fields { display: grid; gap: 14px; }
.settings-fields label, .invite-form label { display: grid; gap: 7px; font-weight: 900; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-savebar { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid rgba(16,24,32,.08); border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: 0 14px 44px rgba(16,24,32,.08); }
.setup-state { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-state span { border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; }
.setup-state .ready { background: #e8f4ed; color: var(--green); }
.setup-state .needed { background: #fff1c2; color: #8a6100; }
.evidence-card, .team-panel { border-radius: 8px; background: #fffdfa; border: 1px solid #eee7dc; padding: 18px; }
.evidence-card strong, .evidence-card span { display: block; }
.team-panel { display: grid; gap: 22px; }
.invite-form { display: grid; grid-template-columns: 1fr 170px auto; gap: 12px; align-items: end; }
.member-list { display: grid; gap: 10px; }
.member-list h3 { margin: 10px 0 0; }
.member-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #eee7dc; }

.auth-shell, .center-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card, .thanks-card, .review-card { width: min(100%, 520px); padding: 34px; }
.auth-card h1, .thanks-card h1, .review-card h1 { margin: 24px 0; font-size: 42px; line-height: 1; }
.auth-card label { display: grid; gap: 8px; margin-bottom: 16px; font-weight: 800; }
.auth-card .brand-logo { width: 190px; margin-bottom: 10px; }
.success-dot { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green); font-size: 32px; }

.waiver-bg, .review-bg { background: linear-gradient(145deg, var(--ink), var(--graphite)); }
.waiver-shell { min-height: 100vh; display: grid; grid-template-columns: .85fr 1.15fr; gap: 34px; padding: 42px; }
.waiver-brand { color: white; position: sticky; top: 42px; align-self: start; }
.waiver-brand img { max-width: 240px; max-height: 150px; object-fit: contain; }
.tenant-logo { width: 110px; height: 110px; border-radius: 24px; display: grid; place-items: center; background: var(--tenant-primary); color: white; font-size: 54px; font-weight: 900; }
.waiver-brand h1 { font-size: clamp(42px, 5vw, 78px); line-height: 1; margin: 28px 0 14px; }
.waiver-card { background: var(--paper); padding: 28px; border-radius: 8px; box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field-grid label { display: grid; gap: 7px; font-weight: 800; }
.waiver-text { max-height: 360px; overflow: auto; padding: 20px; margin: 24px 0; border: 1px solid #ddd4c7; border-radius: 8px; background: white; line-height: 1.6; }
.waiver-text.ql-editor { white-space: normal; }
.waiver-text h2, .waiver-text h3, .waiver-text h4 { margin: 18px 0 8px; line-height: 1.15; }
.waiver-text ul, .waiver-text ol { padding-left: 24px; }
.waiver-text blockquote { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--tenant-accent); background: #fffaf0; }
.editor-field { display: grid; gap: 8px; }
.wysiwyg-shell { overflow: hidden; border: 1px solid #ddd4c7; border-radius: 8px; background: white; }
.wysiwyg-shell .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid #eee7dc; background: #fffaf3; }
.wysiwyg-shell .ql-container.ql-snow { min-height: 380px; border: 0; font-family: inherit; font-size: 16px; }
.wysiwyg-shell .ql-editor { min-height: 380px; line-height: 1.6; }
.wysiwyg-source { display: none; }
.checkline { display: flex; gap: 10px; margin: 12px 0; align-items: flex-start; font-weight: 700; }
.checkline input { width: auto; margin-top: 4px; }
.signature-box { margin: 24px 0; background: white; border-radius: 8px; border: 1px solid #ddd4c7; overflow: hidden; }
.signature-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #eee7dc; }
.signature-head button { border: 0; background: transparent; color: var(--red); font-weight: 900; cursor: pointer; }
#signature-canvas { display: block; width: 100%; height: 220px; touch-action: none; background: #fff; }
.form-errors, .error { color: var(--red); font-weight: 800; }
.signature-image { width: 100%; max-width: 620px; border: 1px solid #ddd; background: white; }
.star-picker { display: flex; justify-content: center; gap: 8px; }
.star-picker button { border: 0; background: transparent; color: var(--gold); font-size: clamp(42px, 9vw, 78px); cursor: pointer; line-height: 1; }

@media (max-width: 1120px) {
  .settings-section { grid-template-columns: 1fr; }
  .settings-section-copy, .settings-fields, .team-panel { min-width: 0; }
  .invite-form { grid-template-columns: minmax(0, 1fr) minmax(138px, 170px) auto; }
}

@media (max-width: 860px) {
  .topbar { height: auto; padding: 22px; align-items: flex-start; }
  .brand-logo { width: 164px; }
  .navlinks { gap: 14px; font-size: 14px; }
  .navlinks a:not(.nav-button) { display: none; }
  .hero-copy { margin: 12vh 22px 0; }
  .paper-section, .dark-showcase, .routing-section, .waiver-shell, .app-shell { grid-template-columns: 1fr; }
  .route-line, .plans, .metrics, .metric-grid, .metric-grid.three, .command-grid, .overview-grid, .overview-grid.lower, .page-grid, .dashboard-columns, .dashboard-columns.balanced, .settings-section, .settings-cards, .field-row, .invite-form, .filterbar { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .side-nav { grid-template-columns: repeat(2, 1fr); }
  .app-header, .command-hero, .settings-savebar { flex-direction: column; align-items: flex-start; }
  .command-actions { justify-content: flex-start; }
  .qr-layout, .qr-layout.compact { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline::before { display: none; }
  .settings-cards { grid-template-columns: 1fr; }
  .side-note { margin-bottom: 22px; }
  .route-line div { min-height: 0; }
  .field-grid { grid-template-columns: 1fr; }
  .waiver-shell { padding: 18px; }
  .waiver-brand { position: static; }
  .sidebar { min-height: auto; }
  .portal-main { padding: 28px 18px 44px; }
  .portal-main h1 { font-size: clamp(34px, 12vw, 48px); }
  .hero-subcopy { font-size: 16px; }
  .panel, .metric-card, .settings-section { box-shadow: 0 8px 24px rgba(16,24,32,.055); }
  .table-panel { margin-inline: -2px; }
  main > section { padding: 72px 22px; }
}
