:root {
  --kp-bg: #f5f7fb;
  --kp-surface: #ffffff;
  --kp-surface-soft: #f8faff;
  --kp-ink: #172033;
  --kp-muted: #65708a;
  --kp-border: #e3e8f2;
  --kp-primary: #315bd6;
  --kp-primary-dark: #2548b4;
  --kp-primary-soft: #edf2ff;
  --kp-accent: #a43ca7;
  --kp-success: #167a55;
  --kp-success-soft: #e9f7f1;
  --kp-warning: #97620b;
  --kp-warning-soft: #fff6df;
  --kp-danger: #b4233c;
  --kp-danger-soft: #fff0f2;
  --kp-shadow-sm: 0 1px 2px rgba(23, 32, 51, 0.04);
  --kp-shadow-md: 0 18px 45px rgba(40, 51, 82, 0.09);
  --kp-radius-sm: 10px;
  --kp-radius-md: 16px;
  --kp-radius-lg: 24px;
  --kp-sidebar-width: 264px;
}

* {
  box-sizing: border-box;
}

body.app-page,
body.auth-page {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--kp-ink);
  background: var(--kp-bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  align-items: initial;
}

body.app-page button,
body.auth-page button,
body.app-page input,
body.auth-page input,
body.app-page select,
body.auth-page select {
  font: inherit;
}

body.app-page [hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--kp-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  background: var(--kp-surface);
  border-right: 1px solid var(--kp-border);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 4px 8px 22px;
  color: var(--kp-ink);
  text-decoration: none;
}

.app-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.app-brand-copy {
  display: grid;
  gap: 1px;
}

.app-brand-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.app-brand-context {
  color: var(--kp-muted);
  font-size: 12px;
  font-weight: 600;
}

.app-nav-label {
  margin: 8px 10px 8px;
  color: #929bb0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-nav {
  display: grid;
  gap: 5px;
}

.app-nav-link,
.app-sidebar-action {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--kp-radius-sm);
  color: #4d5870;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-nav-link svg,
.app-sidebar-action svg,
.action-card-icon svg,
.button-icon svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-nav-link:hover,
.app-sidebar-action:hover {
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
}

.app-nav-link[aria-current="page"] {
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
}

.app-nav-link[aria-current="page"]::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--kp-primary);
  content: "";
}

.app-sidebar-footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--kp-border);
}

.app-sidebar-action {
  width: 100%;
  cursor: pointer;
}

.app-sidebar-action.danger:hover {
  color: var(--kp-danger);
  background: var(--kp-danger-soft);
}

.app-main {
  min-width: 0;
  padding: 30px clamp(22px, 4vw, 56px) 56px;
}

.app-content {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  margin-bottom: 30px;
}

.page-heading {
  min-width: 0;
}

.page-eyebrow {
  margin: 0 0 4px;
  color: var(--kp-primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  color: var(--kp-ink);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.page-heading p {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--kp-muted);
  font-size: 15px;
}

.profile-chip,
.context-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 7px 12px 7px 8px;
  color: #3e4961;
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: 999px;
  box-shadow: var(--kp-shadow-sm);
  font-size: 13px;
  font-weight: 650;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--kp-primary), var(--kp-accent));
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.context-pill {
  padding: 8px 13px;
  color: var(--kp-primary-dark);
  background: var(--kp-primary-soft);
  border-color: #d9e2ff;
}

.context-pill svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.welcome-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 32px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 46px);
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 5%, rgba(86, 217, 255, 0.35), transparent 34%),
    linear-gradient(125deg, #203d99 0%, #315bd6 56%, #7b4bc2 100%);
  border-radius: var(--kp-radius-lg);
  box-shadow: var(--kp-shadow-md);
}

.welcome-panel::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  content: "";
}

.welcome-copy {
  position: relative;
  z-index: 1;
}

.welcome-kicker {
  margin: 0 0 10px;
  color: #cfdbff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.welcome-panel h2 {
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(27px, 3.5vw, 42px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.12;
  text-align: left;
}

.welcome-panel p {
  max-width: 610px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.welcome-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.welcome-mark img {
  width: min(190px, 80%);
  filter: drop-shadow(0 18px 24px rgba(11, 20, 62, 0.25));
}

.button-primary,
.button-secondary,
.button-quiet,
.btn-download,
.pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--kp-radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button-primary {
  color: #ffffff;
  background: var(--kp-primary);
  box-shadow: 0 8px 18px rgba(49, 91, 214, 0.2);
}

.button-primary:hover,
.btn-download:hover,
.pagination button:hover:not(:disabled) {
  color: #ffffff;
  background: var(--kp-primary-dark);
  transform: translateY(-1px);
}

.button-primary:disabled {
  color: #9aa3b5;
  background: #eef1f5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.32);
}

.button-secondary:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.52);
}

.button-quiet {
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
}

.button-quiet:hover {
  color: var(--kp-primary-dark);
  background: #dfe7ff;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 38px 0 16px;
}

.section-heading-row h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 20px;
  font-weight: 740;
  letter-spacing: -0.025em;
}

.section-heading-row p {
  margin: 4px 0 0;
  color: var(--kp-muted);
  font-size: 14px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.action-card {
  display: flex;
  min-height: 175px;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  color: var(--kp-ink);
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: var(--kp-shadow-sm);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.action-card:hover {
  color: var(--kp-ink);
  border-color: #cbd7fb;
  box-shadow: 0 14px 30px rgba(40, 51, 82, 0.08);
  transform: translateY(-2px);
}

.action-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border-radius: 12px;
}

.action-card h3 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 16px;
  font-weight: 730;
}

.action-card p {
  margin: 7px 0 0;
  color: var(--kp-muted);
  font-size: 13px;
}

.action-card-arrow {
  margin-top: auto;
  padding-top: 18px;
  color: var(--kp-primary);
  font-size: 18px;
  line-height: 1;
}

.surface-card {
  padding: 24px;
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: var(--kp-shadow-sm);
}

.surface-card-table {
  padding: 0;
  overflow: hidden;
}

.surface-card-table .surface-toolbar {
  padding: 22px 24px;
  border-bottom: 1px solid var(--kp-border);
}

.content-narrow {
  max-width: 820px;
}

.content-medium {
  max-width: 980px;
}

.page-intro-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.app-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--kp-muted);
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
}

.app-back-link:hover {
  color: var(--kp-primary);
}

.form-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--kp-border);
}

.form-card-header h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 18px;
  font-weight: 740;
  letter-spacing: -0.02em;
}

.form-card-header p {
  margin: 5px 0 0;
  color: var(--kp-muted);
  font-size: 13px;
}

.form-grid,
.profile-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-field,
.profile-info > label {
  color: #3c465c;
  font-size: 13px;
  font-weight: 700;
}

.form-field {
  display: grid;
  gap: 7px;
}

.profile-info > label {
  display: grid;
  gap: 7px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field input,
.form-field textarea,
.form-field select,
.profile-info input,
.password-field input {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  color: var(--kp-ink);
  background: #ffffff;
  border: 1px solid #ccd4e2;
  border-radius: var(--kp-radius-sm);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.profile-info input:focus,
.password-field input:focus {
  border-color: var(--kp-primary);
  box-shadow: 0 0 0 4px rgba(49, 91, 214, 0.12);
}

.form-field input[readonly],
.profile-info input[readonly] {
  color: #667085;
  background: #f5f7fa;
  border-color: #e2e6ed;
  cursor: not-allowed;
}

.profile-info > small,
.field-help {
  display: block;
  color: var(--kp-muted);
  font-size: 12px;
  font-weight: 500;
}

.profile-info > small {
  margin-top: -12px;
  grid-column: 1 / -1;
}

.field-help {
  margin-top: 6px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--kp-border);
}

.notice {
  padding: 14px 16px;
  color: #48536b;
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
  font-size: 13px;
}

.notice strong {
  color: var(--kp-ink);
}

.notice-success {
  color: var(--kp-success);
  background: var(--kp-success-soft);
  border-color: #ccebdd;
}

.notice-error {
  color: var(--kp-danger);
  background: var(--kp-danger-soft);
  border-color: #ffd5db;
}

.notice + .password-stack {
  margin-top: 22px;
}

.message:empty {
  display: none;
}

.password-stack {
  display: grid;
  gap: 18px;
}

.password-field {
  position: relative;
  display: grid;
  gap: 7px;
}

.password-field label {
  color: #3c465c;
  font-size: 13px;
  font-weight: 700;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--kp-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
}

.password-match {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--kp-muted);
  font-size: 12px;
}

.password-indicator {
  width: 8px;
  height: 8px;
  background: var(--kp-danger);
  border-radius: 50%;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.record-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 24px;
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: var(--kp-shadow-sm);
}

.record-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.record-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border-radius: 12px;
}

.record-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.record-card h3,
.survey-name {
  margin: 0;
  color: var(--kp-ink);
  font-size: 18px;
  font-weight: 740;
  letter-spacing: -0.025em;
}

.record-card p,
.survey-instruction {
  margin: 8px 0 0;
  color: var(--kp-muted);
  font-size: 13px;
}

.record-details {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--kp-border);
  border-bottom: 1px solid var(--kp-border);
}

.record-detail {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.record-detail span:first-child {
  color: var(--kp-muted);
}

.record-detail span:last-child {
  color: var(--kp-ink);
  font-weight: 680;
  text-align: right;
}

.record-card .button-primary,
.record-card .button-quiet,
.record-card .start-button,
.record-card .details-button {
  width: 100%;
  margin-top: auto;
}

.price-group {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 20px 0;
}

.survey-price {
  color: var(--kp-ink);
  font-size: 22px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.old-price {
  color: #929bb0;
  font-size: 13px;
  text-decoration: line-through;
}

.empty-panel,
.error-panel {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 36px;
  color: var(--kp-muted);
  background: var(--kp-surface);
  border: 1px dashed #ced6e5;
  border-radius: var(--kp-radius-md);
  text-align: center;
}

.error-panel {
  color: var(--kp-danger);
  background: var(--kp-danger-soft);
  border-color: #ffd5db;
}

.action-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 720;
  text-decoration: none;
}

.action-links a:hover {
  color: var(--kp-primary-dark);
  background: #dfe7ff;
}

.paid,
.unpaid {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.paid {
  color: var(--kp-success);
  background: var(--kp-success-soft);
}

.unpaid {
  color: var(--kp-warning);
  background: var(--kp-warning-soft);
}

/* Focused survey and booking flows */
.focus-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--kp-border);
  backdrop-filter: blur(16px);
}

.focus-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--kp-ink);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.focus-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.focus-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.focus-main {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.focus-main-wide {
  width: min(1180px, calc(100% - 36px));
}

.detail-hero {
  margin-bottom: 22px;
  padding: clamp(26px, 4vw, 40px);
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-lg);
  box-shadow: var(--kp-shadow-sm);
}

.detail-hero .page-eyebrow {
  margin-bottom: 8px;
}

.detail-hero h1,
.detail-hero h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.15;
  text-align: left;
}

.detail-hero > p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--kp-muted);
  font-size: 14px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 26px;
  background: var(--kp-border);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
}

.meta-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-item {
  padding: 16px;
  background: var(--kp-surface-soft);
}

.meta-item span {
  display: block;
  color: var(--kp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta-item strong {
  display: block;
  margin-top: 5px;
  color: var(--kp-ink);
  font-size: 14px;
}

.question-list,
.results-list {
  display: grid;
  gap: 16px;
}

.question-list {
  scroll-margin-top: 170px;
}

.survey-progress {
  position: sticky;
  top: 86px;
  z-index: 12;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: var(--kp-shadow-sm);
  backdrop-filter: blur(14px);
}

.survey-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  color: var(--kp-muted);
  font-size: 12px;
  font-weight: 680;
}

.survey-progress-copy span:first-child {
  color: var(--kp-ink);
}

.progress-track {
  height: 6px;
  overflow: hidden;
  background: #e9edf5;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--kp-primary), var(--kp-accent));
  border-radius: inherit;
  transition: width 180ms ease;
}

#page-summary {
  margin: 0 auto;
  font-weight: 680;
}

.button-quiet:disabled {
  color: #9aa3b5;
  background: #eef1f5;
  cursor: not-allowed;
}

.question,
.result-item {
  padding: clamp(22px, 3vw, 30px);
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: var(--kp-shadow-sm);
}

.question h3,
.result-item > strong {
  display: block;
  margin: 0 0 18px;
  color: var(--kp-ink);
  font-size: 17px;
  font-weight: 720;
  line-height: 1.45;
}

.question-instruction {
  margin: -2px 0 18px;
  padding: 13px 15px;
  color: #42506b;
  background: var(--kp-primary-soft);
  border-left: 3px solid var(--kp-primary);
  border-radius: 0 var(--kp-radius-sm) var(--kp-radius-sm) 0;
  font-size: 13px;
}

.option {
  position: relative;
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 8px;
  margin-top: 9px;
  padding: 13px 15px;
  color: #4b566d;
  background: #fbfcfe;
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.option:hover {
  border-color: #bfccf4;
  background: #f7f9ff;
}

.option.selected {
  color: var(--kp-primary-dark);
  background: var(--kp-primary-soft);
  border-color: #9eb2ef;
  box-shadow: inset 3px 0 0 var(--kp-primary);
}

.option-readonly,
.option-readonly:hover {
  cursor: default;
}

.option strong {
  color: currentColor;
}

.focus-actions {
  position: sticky;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: 0 16px 40px rgba(40, 51, 82, 0.13);
  backdrop-filter: blur(16px);
}

.result-item > p {
  margin: 8px 0 0;
  color: var(--kp-muted);
  font-size: 14px;
}

.result-score {
  display: inline-flex;
  margin: 0 0 12px !important;
  padding: 5px 10px;
  color: var(--kp-primary-dark) !important;
  background: var(--kp-primary-soft);
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 750;
}

.meeting-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.calendar-toolbar h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 18px;
  text-align: left;
}

.week-nav {
  display: flex;
  gap: 8px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.day-column {
  min-height: 200px;
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
}

.day-column h4 {
  margin: 0 0 12px;
  color: var(--kp-ink);
  font-size: 12px;
  text-align: left;
}

.day-date {
  display: block;
  margin-top: 3px;
  color: var(--kp-muted);
  font-size: 11px;
  font-weight: 500;
}

.time-slot {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 9px 7px;
  color: var(--kp-primary-dark);
  background: var(--kp-primary-soft);
  border: 1px solid #d8e1ff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.time-slot:hover {
  color: #ffffff;
  background: var(--kp-primary);
  border-color: var(--kp-primary);
}

.status-card {
  max-width: 620px;
  margin: 50px auto 0;
  padding: clamp(28px, 5vw, 44px);
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-lg);
  box-shadow: var(--kp-shadow-md);
}

.status-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border-radius: 16px;
  font-size: 24px;
}

.status-card h1 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 28px;
  letter-spacing: -0.035em;
}

.status-card > .notice {
  margin-top: 20px;
}

.status-message {
  margin: 22px 0;
  padding: 14px 16px;
  border-radius: var(--kp-radius-sm);
  font-size: 13px;
}

.status-message.available {
  color: var(--kp-success);
  background: var(--kp-success-soft);
  border: 1px solid #ccebdd;
}

.status-message.not-available {
  color: var(--kp-danger);
  background: var(--kp-danger-soft);
  border: 1px solid #ffd5db;
}

.surface-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--kp-border);
}

.toolbar-copy h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 18px;
  letter-spacing: -0.02em;
  text-align: left;
}

.toolbar-copy p {
  margin: 5px 0 0;
  color: var(--kp-muted);
  font-size: 13px;
}

.field-compact {
  min-width: 230px;
}

.field-compact label,
.auth-field label {
  display: block;
  margin: 0 0 7px;
  color: #3c465c;
  font-size: 13px;
  font-weight: 700;
}

.field-compact select,
.field-compact input,
.auth-field input {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  color: var(--kp-ink);
  background: #ffffff;
  border: 1px solid #ccd4e2;
  border-radius: var(--kp-radius-sm);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field-compact select:focus,
.field-compact input:focus,
.auth-field input:focus {
  border-color: var(--kp-primary);
  box-shadow: 0 0 0 4px rgba(49, 91, 214, 0.12);
}

.admin-info-card {
  margin: 24px 0 0;
}

.admin-stack {
  display: grid;
  gap: 18px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-meeting-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.admin-meeting-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-meeting-card h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 17px;
}

.admin-meeting-card-top p,
.admin-meeting-description {
  color: var(--kp-muted);
  font-size: 13px;
}

.admin-meeting-card-top p {
  margin: 5px 0 0;
}

.admin-meeting-description {
  margin: 20px 0;
}

.admin-meeting-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--kp-border);
}

.meeting-detail-grid {
  margin-top: 0;
}

.meeting-schedule-card {
  margin-top: 18px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.schedule-day-card {
  padding: 16px;
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
}

.schedule-day-card > strong {
  color: var(--kp-ink);
  font-size: 13px;
}

.schedule-time-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.schedule-time-list span {
  padding: 5px 9px;
  color: var(--kp-primary-dark);
  background: var(--kp-primary-soft);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 680;
}

.slot-day-grid {
  display: grid;
  gap: 12px;
}

.slot-day-card {
  padding: 20px 22px;
}

.slot-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.slot-day-header h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 16px;
}

.slot-day-header p {
  margin: 4px 0 0;
  color: var(--kp-muted);
  font-size: 12px;
}

.slot-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.slot-list:empty {
  display: none;
}

.time-slot-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) auto minmax(120px, 180px) 1fr;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--kp-border);
}

.time-slot-row input {
  min-height: 40px;
  padding: 8px 10px;
  color: var(--kp-ink);
  background: #fff;
  border: 1px solid #ccd4e2;
  border-radius: 8px;
}

.slot-remove {
  justify-self: end;
  padding: 6px 9px;
  color: var(--kp-danger);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-sticky-actions {
  position: sticky;
  bottom: 16px;
  z-index: 4;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: var(--kp-shadow-md);
  backdrop-filter: blur(12px);
}

.authoring-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--kp-border);
}

.instruction-list {
  display: grid;
  gap: 10px;
}

.instruction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
}

.instruction-row textarea,
.instruction-row input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--kp-ink);
  background: #fff;
  border: 1px solid #ccd4e2;
  border-radius: 8px;
}

.compact-empty {
  margin: 0;
  padding: 18px;
  background: var(--kp-surface-soft);
  border-radius: var(--kp-radius-sm);
  text-align: center;
}

.survey-tools-heading {
  margin-top: 28px;
}

.survey-tool-grid .action-card {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.survey-tool-grid .action-card-icon {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.editor-card {
  margin-top: 18px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #3c465c;
  font-size: 13px;
  font-weight: 700;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--kp-primary);
}

.option-list {
  display: grid;
  gap: 9px;
}

.option-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.option-label {
  color: var(--kp-primary);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.option-row input {
  min-height: 42px;
  padding: 9px 11px;
  color: var(--kp-ink);
  background: #fff;
  border: 1px solid #ccd4e2;
  border-radius: 8px;
}

.pricing-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.pricing-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
}

.evaluation-message {
  white-space: pre-line;
}

.admin-result-section {
  margin-top: 30px;
  scroll-margin-top: 24px;
}

.admin-result-section .result-item > p:last-child {
  white-space: pre-line;
}

/* Payments */
.payment-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(49, 91, 214, 0.09), transparent 30%),
    var(--kp-bg);
}

.secure-payment-label {
  padding: 7px 11px;
  color: var(--kp-success);
  background: var(--kp-success-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
}

.payment-main {
  width: min(100% - 36px, 1040px);
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1fr);
  align-items: start;
  gap: 42px;
}

.payment-summary {
  padding: 30px 0;
}

.payment-summary h1,
.payment-status-card h1 {
  margin: 7px 0 12px;
  color: var(--kp-ink);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.payment-summary > p:not(.page-eyebrow),
.payment-status-card > p:not(.page-eyebrow):not(.message) {
  color: var(--kp-muted);
  font-size: 14px;
}

.payment-assurance {
  display: grid;
  gap: 5px;
  margin-top: 28px;
  padding: 16px;
  color: var(--kp-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
  font-size: 12px;
}

.payment-assurance strong {
  color: var(--kp-ink);
  font-size: 13px;
}

.payment-card {
  padding: 28px;
}

.payment-fields {
  display: grid;
  gap: 18px;
}

.payment-fields .form-field small {
  color: var(--kp-danger);
}

.payment-status-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 76px);
  padding: 36px 18px;
}

.payment-status-card {
  width: min(100%, 600px);
  padding: 42px;
  text-align: center;
}

.payment-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 22px;
  border: 4px solid var(--kp-primary-soft);
  border-top-color: var(--kp-primary);
  border-radius: 50%;
  animation: payment-spin 850ms linear infinite;
}

.payment-spinner.is-complete {
  border-color: var(--kp-success);
  animation: none;
}

@keyframes payment-spin {
  to { transform: rotate(360deg); }
}

.payment-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 14px;
  color: var(--kp-muted);
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
  font-size: 12px;
  text-align: left;
}

.payment-dashboard-link {
  justify-content: center;
  margin: 26px 0 0;
}

/* AI chat */
.chat-page {
  background: #f3f6fb;
}

.chat-main {
  width: min(100% - 36px, 920px);
  margin: 0 auto;
  padding: 32px 0 24px;
}

.chat-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.chat-heading h1 {
  margin: 4px 0 6px;
  color: var(--kp-ink);
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.chat-heading p:not(.page-eyebrow) {
  margin: 0;
  color: var(--kp-muted);
  font-size: 14px;
}

.chat-surface {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-lg);
  box-shadow: var(--kp-shadow-md);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: min(56vh, 560px);
  min-height: 360px;
  overflow-y: auto;
  padding: 28px;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 78%;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.chat-message.user .chat-avatar {
  color: #fff;
  background: var(--kp-primary);
}

.chat-bubble {
  padding: 13px 15px;
  color: var(--kp-ink);
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: 15px 15px 15px 4px;
}

.chat-message.user .chat-bubble {
  color: #fff;
  background: var(--kp-primary);
  border-color: var(--kp-primary);
  border-radius: 15px 15px 4px 15px;
}

.chat-bubble strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.chat-bubble p {
  margin: 0;
  font-size: 14px;
  white-space: pre-wrap;
}

.typing-bubble {
  display: flex;
  gap: 4px;
  padding: 15px 18px;
}

.typing-bubble span {
  width: 6px;
  height: 6px;
  background: var(--kp-muted);
  border-radius: 50%;
  animation: chat-pulse 1s ease-in-out infinite;
}

.typing-bubble span:nth-child(2) { animation-delay: 120ms; }
.typing-bubble span:nth-child(3) { animation-delay: 240ms; }

@keyframes chat-pulse {
  50% { opacity: 0.3; transform: translateY(-2px); }
}

.chat-composer {
  padding: 18px;
  background: #fafbfe;
  border-top: 1px solid var(--kp-border);
}

.chat-composer > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.chat-composer textarea {
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  color: var(--kp-ink);
  background: #fff;
  border: 1px solid #ccd4e2;
  border-radius: var(--kp-radius-sm);
  resize: vertical;
}

.chat-composer textarea:focus {
  border-color: var(--kp-primary);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(49, 91, 214, 0.12);
}

.chat-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.chat-composer-footer span,
.chat-disclaimer {
  color: var(--kp-muted);
  font-size: 11px;
}

.chat-disclaimer {
  margin: 12px 4px 0;
  text-align: center;
}

/* Public information and error pages */
.public-page {
  background: #f6f7fb;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px max(24px, calc((100vw - 1160px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--kp-border);
  backdrop-filter: blur(14px);
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--kp-ink);
  font-weight: 780;
  text-decoration: none;
}

.public-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.public-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.public-header nav > a:not(.button-primary) {
  color: var(--kp-muted);
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
}

.public-header nav > a:hover {
  color: var(--kp-primary);
}

.public-main {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 48px 0 72px;
}

.public-main-narrow {
  max-width: 940px;
}

.public-main-document {
  max-width: 860px;
}

.public-title {
  max-width: 760px;
  margin: 26px 0 34px;
}

.public-title h1,
.legal-document h1 {
  margin: 7px 0 12px;
  color: var(--kp-ink);
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.public-title > p:not(.page-eyebrow) {
  margin: 0;
  color: var(--kp-muted);
  font-size: 16px;
}

.public-story-grid,
.public-value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.public-story-card > span,
.public-value-grid article > span {
  color: var(--kp-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.public-story-card h2,
.public-value-grid h2 {
  margin: 12px 0 8px;
  color: var(--kp-ink);
  font-size: 20px;
}

.public-story-card p,
.public-value-grid p {
  margin: 0;
  color: var(--kp-muted);
  font-size: 14px;
}

.public-value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-value-grid article {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
}

.legal-document {
  padding: clamp(24px, 5vw, 52px);
}

.legal-document header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--kp-border);
}

.legal-document section {
  color: #46516a;
  font-size: 14px;
  line-height: 1.75;
}

.legal-document h2 {
  margin: 28px 0 8px;
  color: var(--kp-ink);
  font-size: 17px;
}

.error-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(49, 91, 214, 0.13), transparent 34%),
    radial-gradient(circle at 86% 90%, rgba(164, 60, 167, 0.1), transparent 32%),
    #f6f7fb;
}

.error-surface {
  width: min(100%, 600px);
  text-align: center;
}

.error-brand {
  justify-content: center;
  margin-bottom: 42px;
}

.error-code {
  margin: 0;
  color: var(--kp-primary);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.error-surface h1 {
  margin: 10px 0 12px;
  color: var(--kp-ink);
  font-size: clamp(32px, 6vw, 50px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.error-surface > p:not(.error-code) {
  margin: 0;
  color: var(--kp-muted);
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* Existing public-site content, unified without changing page copy */
body.public-legacy {
  display: flex;
  align-items: stretch;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--kp-ink);
  background: #f6f7fb;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.public-legacy > header,
.public-legacy .company-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  min-height: 72px;
  height: auto;
  padding: 9px max(22px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--kp-border);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.public-legacy .company-brand,
.public-legacy .company-nav .brand {
  padding: 0;
}

.public-legacy .company-brand img,
.public-legacy .company-nav .brand img {
  width: 48px;
  margin-right: 10px;
}

.public-legacy .company-brand h1,
.public-legacy .company-nav .brand h1 {
  color: var(--kp-ink);
  font-size: 18px;
  font-weight: 780;
}

.public-legacy nav ul,
.public-legacy .company-nav .menu {
  align-items: center;
  gap: 22px;
  padding: 0;
}

.public-legacy nav ul li,
.public-legacy .company-nav .menu li {
  margin: 0;
}

.public-legacy nav a,
.public-legacy .company-nav .menu a {
  color: var(--kp-muted);
  font-size: 12px;
  font-weight: 680;
}

.public-legacy nav a:hover,
.public-legacy nav a.active,
.public-legacy .company-nav .menu a:hover {
  color: var(--kp-primary);
}

.public-legacy nav .signin a,
.public-legacy .company-nav .signin a {
  display: inline-flex;
  padding: 8px 13px;
  color: #fff;
  background: var(--kp-primary);
  border-radius: 9px;
}

.public-legacy > .content-container,
.public-legacy .company-nav + .content-container {
  width: min(100% - 40px, 1120px);
  max-width: 1120px;
  margin: 42px auto 64px;
  padding: clamp(24px, 4vw, 46px);
  color: var(--kp-ink);
  background: #fff;
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-lg);
  box-shadow: var(--kp-shadow-sm);
}

.public-legacy .page-title {
  margin: 0 0 28px;
  color: var(--kp-ink);
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.05em;
}

.public-legacy .hero {
  padding: 54px 24px;
  background: linear-gradient(135deg, #f1f4ff, #fbf5fc);
}

.public-legacy .hero::after {
  display: none;
}

.public-legacy .hero-content {
  gap: 48px;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.public-legacy .hero-text h1 {
  color: var(--kp-ink);
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.public-legacy .hero-image img {
  border-radius: var(--kp-radius-lg);
  box-shadow: var(--kp-shadow-md);
}

.public-legacy .personas {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 64px 0;
}

.public-legacy .personas > h2 {
  color: var(--kp-ink);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.public-legacy .persona-grid {
  gap: 18px;
}

.public-legacy .persona-card,
.public-legacy .service-card,
.public-legacy .event-card,
.public-legacy .contact-box,
.public-legacy .contact-info {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-md);
  box-shadow: var(--kp-shadow-sm);
}

.public-legacy .persona-card img,
.public-legacy .service-card img,
.public-legacy .event-card img {
  object-fit: cover;
}

.public-legacy .tabs {
  gap: 6px;
  padding: 5px;
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: 12px;
}

.public-legacy .tab {
  color: var(--kp-muted);
  border: none;
  border-radius: 8px;
}

.public-legacy .tab.active {
  color: var(--kp-primary);
  background: #fff;
  border: none;
  box-shadow: var(--kp-shadow-sm);
}

.public-legacy footer {
  margin-top: auto;
  padding: 28px 24px;
  color: var(--kp-muted);
  background: #fff;
  border-top: 1px solid var(--kp-border);
}

.public-legacy footer a {
  color: var(--kp-primary);
}

.public-info-legacy .company-header {
  width: 100%;
  min-height: 72px;
  padding: 10px 24px;
  color: var(--kp-ink);
  background: #fff;
  border-bottom: 1px solid var(--kp-border);
}

.public-info-legacy .company-header img {
  width: 46px;
}

.public-info-legacy .company-header h1 {
  color: var(--kp-ink);
  font-size: 18px;
}

.public-info-legacy .about-container {
  width: min(100% - 40px, 920px);
  max-width: 920px;
  margin: 42px auto 64px;
  padding: clamp(24px, 5vw, 48px);
  color: var(--kp-ink);
  background: #fff;
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-lg);
  box-shadow: var(--kp-shadow-sm);
}

.public-info-legacy .about-container > h2 {
  color: var(--kp-ink);
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.05em;
}

.public-info-legacy .highlight-box {
  background: var(--kp-surface-soft);
  border-left-color: var(--kp-primary);
  box-shadow: none;
}

.form-field small {
  color: var(--kp-muted);
  font-size: 12px;
  font-weight: 500;
}

.csv-format-note {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
  padding: 16px;
  color: var(--kp-muted);
  background: var(--kp-surface-soft);
  border: 1px solid var(--kp-border);
  border-radius: var(--kp-radius-sm);
  font-size: 13px;
}

.csv-format-note strong {
  color: var(--kp-ink);
}

.csv-format-note code {
  width: fit-content;
  padding: 4px 7px;
  color: var(--kp-primary-dark);
  background: var(--kp-primary-soft);
  border-radius: 6px;
}

.file-field input[type="file"] {
  min-height: 54px;
  padding: 8px;
  color: var(--kp-muted);
  background: var(--kp-surface-soft);
}

.file-field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.bulk-results {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--kp-border);
}

.bulk-summary {
  margin: 0 0 14px;
  color: var(--kp-ink);
  font-size: 13px;
  font-weight: 700;
}

.data-table-shell {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 820px;
  margin: 0;
  border-collapse: collapse;
  color: var(--kp-ink);
  font-size: 13px;
  white-space: normal;
}

.data-table th {
  padding: 13px 14px;
  color: #778198;
  background: #fafbfe;
  border-bottom: 1px solid var(--kp-border);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 16px 14px;
  background: #ffffff;
  border-bottom: 1px solid #edf0f5;
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fbfcff;
}

.table-primary-link {
  display: block;
  color: var(--kp-ink);
  font-weight: 730;
  text-decoration: none;
}

.table-primary-link:hover {
  color: var(--kp-primary);
}

.table-description {
  display: block;
  max-width: 360px;
  margin-top: 4px;
}

.price-cell {
  font-weight: 720;
  white-space: nowrap;
}

.button-small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
}

.student-name {
  display: block;
  font-weight: 720;
}

.student-email,
.cell-meta,
.empty-copy {
  color: var(--kp-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.badge-pending {
  color: var(--kp-warning);
  background: var(--kp-warning-soft);
}

.badge-paid {
  color: #176b84;
  background: #e8f7fb;
}

.badge-done {
  color: var(--kp-success);
  background: var(--kp-success-soft);
}

.badge-neutral {
  color: var(--kp-muted);
  background: #f0f2f6;
}

.badge-info {
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
}

.badge-success {
  color: var(--kp-success);
  background: var(--kp-success-soft);
}

.badge-danger {
  color: var(--kp-danger);
  background: var(--kp-danger-soft);
}

.cell-number {
  width: 70px;
  color: var(--kp-muted);
  text-align: center;
}

.survey-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.survey-row:last-child {
  margin-bottom: 0;
}

.btn-download {
  min-height: 32px;
  margin: 0;
  padding: 6px 10px;
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border: 0;
  box-shadow: none;
  font-size: 11px;
}

.btn-download:disabled,
.pagination button:disabled {
  color: #9aa3b5;
  background: #eef1f5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--kp-border);
}

.pagination button {
  min-height: 38px;
  color: #445069;
  background: #ffffff;
  border-color: var(--kp-border);
  box-shadow: none;
}

.pagination button:hover:not(:disabled) {
  color: var(--kp-primary);
  background: var(--kp-primary-soft);
  border-color: #cad7ff;
}

.pagination span {
  color: var(--kp-muted);
  font-size: 13px;
  font-weight: 650;
}

.empty-state,
.loading-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 36px;
  color: var(--kp-muted);
  text-align: center;
}

.message.error-message {
  padding: 11px 13px;
  color: var(--kp-danger);
  background: var(--kp-danger-soft);
  border: 1px solid #ffd5db;
  border-radius: var(--kp-radius-sm);
  font-size: 13px;
}

/* Authentication */
.auth-page {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 8% 12%, rgba(164, 60, 167, 0.12), transparent 28%),
    radial-gradient(circle at 92% 86%, rgba(49, 91, 214, 0.15), transparent 30%),
    #f6f7fb;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.75fr);
  width: min(1080px, 100%);
  min-height: 650px;
  overflow: hidden;
  background: var(--kp-surface);
  border: 1px solid rgba(218, 224, 236, 0.9);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(37, 48, 78, 0.13);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(38px, 6vw, 68px);
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 18%, rgba(76, 213, 255, 0.4), transparent 27%),
    radial-gradient(circle at 25% 88%, rgba(207, 91, 199, 0.3), transparent 30%),
    linear-gradient(145deg, #172f78, #315bd6 58%, #713e9f);
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}

.auth-story::before {
  right: -150px;
  bottom: -90px;
  width: 390px;
  height: 390px;
}

.auth-story::after {
  right: -75px;
  bottom: -15px;
  width: 240px;
  height: 240px;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.auth-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.auth-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.auth-brand span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.auth-story-copy {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: auto 0;
  padding: 50px 0;
}

.auth-story-copy p:first-child {
  margin: 0 0 12px;
  color: #cbd8ff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.auth-story-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.auth-story-copy p:last-child {
  max-width: 440px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
}

.auth-story-footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 64px);
}

.auth-card {
  width: min(390px, 100%);
}

.auth-card-wide {
  width: min(520px, 100%);
}

.auth-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-fields-grid .auth-field-full {
  grid-column: 1 / -1;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--kp-muted);
  font-size: 12px;
}

.terms-check input {
  width: 16px !important;
  min-height: 16px !important;
  margin: 2px 0 0 !important;
  flex: 0 0 auto;
}

.terms-check a {
  color: var(--kp-primary);
  font-weight: 650;
}

.surface-card > .terms-check {
  margin-top: 24px;
}

.verification-code-container {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

body.auth-page .verification-code-container input,
.verification-code-container input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 8px 2px;
  color: var(--kp-ink);
  background: #ffffff;
  border: 1px solid #ccd4e2;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
  color: var(--kp-ink);
  font-weight: 750;
  text-decoration: none;
}

.auth-mobile-brand img {
  width: 44px;
  height: 44px;
}

.auth-card h2 {
  margin: 0;
  color: var(--kp-ink);
  font-size: 30px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.auth-intro {
  margin: 9px 0 30px;
  color: var(--kp-muted);
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field input {
  min-height: 48px;
  padding: 12px 14px;
}

.auth-form .button-primary {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  font-size: 13px;
}

.auth-links a {
  color: var(--kp-primary);
  font-weight: 650;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-error:empty {
  display: none;
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  color: var(--kp-danger);
  background: var(--kp-danger-soft);
  border: 1px solid #ffd4dc;
  border-radius: var(--kp-radius-sm);
  font-size: 13px;
}

body.app-page :focus-visible,
body.auth-page :focus-visible {
  outline: 3px solid rgba(49, 91, 214, 0.3);
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-panel {
    grid-template-columns: minmax(0, 1fr) 210px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--kp-border);
  }

  .app-brand {
    min-height: 46px;
    padding: 0 4px 12px;
  }

  .app-brand img {
    width: 40px;
    height: 40px;
  }

  .app-nav-label {
    display: none;
  }

  .app-nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-nav-link {
    min-width: max-content;
  }

  .app-nav-link[aria-current="page"]::before {
    display: none;
  }

  .app-sidebar-footer {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 0;
  }

  .app-sidebar-footer .app-nav-link,
  .app-sidebar-footer .app-sidebar-action {
    width: auto;
    min-width: max-content;
  }

  .app-main {
    padding: 24px 18px 42px;
  }

  .welcome-panel {
    grid-template-columns: 1fr;
  }

  .welcome-mark {
    display: none;
  }

  .auth-page {
    padding: 18px;
  }

  .auth-layout {
    display: block;
    min-height: auto;
    border-radius: 22px;
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    min-height: 600px;
    padding: 40px 30px;
  }

  .auth-mobile-brand {
    display: flex;
  }
}

@media (max-width: 680px) {
  .app-main {
    padding: 22px 16px 40px;
  }

  .app-topbar,
  .form-card-header,
  .surface-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-chip {
    display: none;
  }

  .form-grid,
  .profile-info,
  .card-grid,
  .admin-card-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .time-slot-row {
    grid-template-columns: 1fr auto 1fr;
  }

  .instruction-row {
    grid-template-columns: 1fr;
  }

  .pricing-editor-grid {
    grid-template-columns: 1fr;
  }

  .payment-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .payment-summary {
    padding: 8px 0;
  }

  .payment-reminder {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-main {
    width: min(100% - 24px, 920px);
    padding-top: 20px;
  }

  .chat-heading {
    gap: 12px;
  }

  .chat-message {
    max-width: 92%;
  }

  .chat-messages {
    min-height: 400px;
    padding: 18px 14px;
  }

  .chat-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-composer-footer span {
    display: none;
  }

  .public-header nav > a:not(.button-primary) {
    display: none;
  }

  .public-story-grid,
  .public-value-grid {
    grid-template-columns: 1fr;
  }

  .error-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .public-legacy > header nav ul li:not(.signin),
  .public-legacy .company-nav .menu li:not(.signin) {
    display: none;
  }

  .public-legacy > header,
  .public-legacy .company-nav {
    padding: 9px 16px;
  }

  .public-legacy > .content-container,
  .public-legacy .company-nav + .content-container {
    width: min(100% - 24px, 1120px);
    margin: 20px auto 42px;
    padding: 22px 18px;
  }

  .public-legacy .hero {
    padding: 34px 16px;
  }

  .public-legacy .personas {
    width: min(100% - 24px, 1120px);
    padding: 42px 0;
  }

  .slot-remove {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .meta-grid,
  .meeting-summary {
    grid-template-columns: 1fr;
  }

  .focus-header {
    min-height: 64px;
    padding: 8px 14px;
  }

  .focus-brand span {
    display: none;
  }

  .focus-main {
    width: min(100% - 28px, 920px);
    padding: 28px 0 48px;
  }

  .focus-actions,
  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .focus-actions .button-primary,
  .focus-actions .button-quiet {
    width: 100%;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions .button-primary,
  .form-actions .button-quiet {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .app-topbar,
  .surface-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-chip {
    display: none;
  }

  .welcome-panel {
    padding: 28px 24px;
    border-radius: 20px;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .action-card {
    min-height: 150px;
  }

  .surface-card {
    padding: 18px;
  }

  .field-compact {
    width: 100%;
    min-width: 0;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination span {
    order: -1;
    width: 100%;
    text-align: center;
  }

  .auth-panel {
    min-height: 560px;
    padding: 34px 22px;
  }

  .auth-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-fields-grid {
    grid-template-columns: 1fr;
  }

  .auth-fields-grid .auth-field-full {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
