:root {
  --teal-950: #36414b;
  --teal-900: #434f5a;
  --teal-800: #586774;
  --teal-100: #e3e8eb;
  --teal-50: #f1f4f5;
  --ink: #172321;
  --muted: #65716e;
  --line: #d9dfdc;
  --paper: #ffffff;
  --canvas: #f3f2ee;
  --warm: #fff8ef;
  --coral: #f6c636;
  --coral-dark: #8b6b00;
  --shadow: 0 18px 55px rgba(10, 35, 31, .14);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.topbar {
  height: 68px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--teal-950);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand { display: flex; align-items: center; color: #fff; text-decoration: none; }
.brand img { display: block; width: 224px; height: 40px; object-fit: contain; object-position: left center; }
.top-actions { display: flex; align-items: center; gap: 22px; }
.save-state { display: flex; align-items: center; gap: 8px; color: #c8d9d5; font-size: .83rem; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: #7bc2a8; box-shadow: 0 0 0 3px rgba(123,194,168,.13); }
.quiet-button { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.25); padding: 9px 14px; border-radius: 7px; }

.entry-screen { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 48px 24px; background: linear-gradient(145deg, #f3f2ee 0%, #eef2f1 100%); }
.entry-card { width: min(650px, 100%); padding: clamp(36px, 6vw, 62px); text-align: center; background: rgba(255,255,255,.94); border: 1px solid #dce2df; border-radius: 14px; box-shadow: 0 24px 70px rgba(31,48,53,.12); }
.entry-kicker { margin: 0 0 14px; color: var(--coral-dark); font-size: .76rem; font-weight: 780; letter-spacing: .13em; text-transform: uppercase; }
.entry-card h1 { margin: 0; color: var(--teal-950); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
.entry-card > p:not(.entry-kicker) { max-width: 530px; margin: 20px auto 30px; color: #5f6c69; line-height: 1.65; }
.entry-primary { width: 100%; min-height: 52px; }
.entry-return { margin-top: 19px; padding: 4px; color: #5b6865; background: transparent; border: 0; font-size: .9rem; }
.entry-return strong { color: var(--teal-900); text-decoration: underline; text-underline-offset: 3px; }
.entry-return:hover strong { color: var(--teal-800); }

.shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 310px minmax(0, 1fr); }
.sidebar { background: var(--teal-900); color: #fff; padding: 46px 34px 34px; display: flex; flex-direction: column; }
.product-label { color: #9dc8be; font-size: .76rem; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.sidebar h1 { margin: 10px 0 11px; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; letter-spacing: -.025em; }
.sidebar-intro { margin: 0 0 38px; color: #c9dbd7; font-size: .93rem; line-height: 1.55; }
.steps { display: flex; flex-direction: column; }
.step { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 13px; min-height: 66px; color: #a9c4be; font-size: .87rem; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 28px; bottom: 0; left: 12px; width: 1px; background: rgba(255,255,255,.17); }
.step-dot { position: relative; z-index: 1; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.26); background: var(--teal-900); border-radius: 50%; font-size: .72rem; }
.step-copy { padding-top: 3px; }
.step-copy strong { display: block; color: inherit; font-weight: 580; }
.step-copy small { display: block; margin-top: 4px; color: #7fa49c; }
.step.active { color: #fff; }
.step.active .step-dot { color: #3c4650; background: #f6c636; border-color: #f6c636; font-weight: 750; }
.step.done .step-dot { color: #fff; background: #4c8d7e; border-color: #4c8d7e; }
.sidebar-note { margin-top: auto; padding: 17px 17px 18px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.1); border-radius: 9px; color: #bdd1cc; font-size: .79rem; line-height: 1.5; }
.sidebar-note span { display: block; margin-bottom: 5px; color: #fff; font-weight: 650; }

.workspace { width: min(940px, calc(100% - 80px)); margin: 0 auto; padding: 57px 0 70px; }
.workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding: 0 4px 30px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 9px; color: var(--coral-dark); font-size: .75rem; font-weight: 760; text-transform: uppercase; letter-spacing: .12em; }
.workspace h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 500; letter-spacing: -.03em; }
.section-deck { max-width: 650px; margin: 12px 0 0; color: var(--muted); line-height: 1.55; }
.progress-number { display: none; color: #98a39f; font-family: Georgia, serif; font-size: 1.1rem; white-space: nowrap; }
.progress-number strong { color: var(--teal-900); font-size: 2.1rem; font-weight: 500; }

#sectionContent { padding-top: 8px; }
.question { padding: 30px 4px 28px; border-bottom: 1px solid var(--line); }
.question-label { display: flex; gap: 8px; align-items: baseline; margin-bottom: 9px; }
.question-number { color: var(--coral-dark); font-size: .73rem; font-weight: 760; letter-spacing: .07em; }
.question h3 { margin: 0; font-size: 1.05rem; font-weight: 680; letter-spacing: -.01em; }
.help { margin: 0 0 13px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.required { color: var(--coral-dark); }
input[type="text"], input[type="date"], input[type="email"], textarea, select {
  width: 100%; padding: 13px 14px; color: var(--ink); background: #fff; border: 1px solid #cfd7d3; border-radius: 7px; outline: none; transition: .18s ease;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--teal-800); box-shadow: 0 0 0 3px rgba(27,85,78,.10); }
.char-note { display: block; margin-top: 7px; color: #88928f; text-align: right; font-size: .74rem; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { height: 100%; display: flex; align-items: center; padding: 12px 13px; background: #fff; border: 1px solid #cfd7d3; border-radius: 7px; color: #3b4744; font-size: .87rem; line-height: 1.35; transition: .16s ease; }
.choice input:checked + span { color: var(--teal-950); border-color: var(--teal-800); background: var(--teal-50); box-shadow: inset 3px 0 var(--teal-800); }
.other-field { margin-top: 14px; padding: 14px; background: #f7f8f8; border: 1px solid var(--line); border-radius: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.mini-label { display: block; margin: 0 0 7px; color: #47534f; font-size: .8rem; font-weight: 650; }
.range-wrap { display: grid; grid-template-columns: 1fr 54px; align-items: center; gap: 16px; }
input[type="range"] { width: 100%; accent-color: var(--teal-800); }
.range-value { display: grid; place-items: center; height: 43px; background: var(--teal-50); border-radius: 7px; color: var(--teal-900); font-weight: 720; }
.anchor-row { display: flex; justify-content: space-between; margin-top: 5px; color: #87918e; font-size: .72rem; }
.matrix { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.matrix table { width: 100%; border-collapse: collapse; min-width: 690px; }
.matrix th, .matrix td { padding: 12px 10px; text-align: center; border-bottom: 1px solid #e6eae8; font-size: .78rem; }
.matrix th { color: var(--muted); background: #f7f8f7; font-weight: 620; }
.matrix th:first-child, .matrix td:first-child { width: 35%; text-align: left; padding-left: 15px; font-weight: 600; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix input { accent-color: var(--teal-800); }
.callout { margin: 24px 4px 3px; padding: 15px 17px; display: flex; gap: 12px; background: #fff9df; border-left: 3px solid var(--coral); border-radius: 0 7px 7px 0; color: #5f5740; font-size: .85rem; line-height: 1.5; }
.callout strong { display: block; color: #433e2d; }
.form-footer { padding: 30px 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-right { display: flex; align-items: center; gap: 17px; }
.time-hint { color: #7d8885; font-size: .78rem; }
.back-button, .primary-button { min-height: 45px; padding: 0 18px; border-radius: 7px; font-weight: 650; }
.back-button { color: #45514e; background: transparent; border: 1px solid #c7cfcb; }
.back-button:disabled { opacity: .35; cursor: default; }
.primary-button { color: #fff; background: var(--teal-900); border: 1px solid var(--teal-900); box-shadow: 0 5px 14px rgba(18,63,58,.13); }
.primary-button:hover { background: var(--teal-800); }
.primary-button span { margin-left: 8px; }

.coach-layer { position: fixed; inset: 0; z-index: 20; display: none; }
.coach-layer.open { display: block; }
.coach-backdrop { position: absolute; inset: 0; background: rgba(9, 28, 25, .48); backdrop-filter: blur(2px); }
.coach-panel { position: absolute; top: 0; right: 0; width: min(590px, 96vw); height: 100%; overflow-y: auto; padding: 52px 52px 40px; background: #fffdfa; box-shadow: -20px 0 60px rgba(8,30,26,.24); animation: slideIn .26s ease-out; }
@keyframes slideIn { from { transform: translateX(25px); opacity: .4; } }
.coach-kicker { color: var(--teal-800); font-size: .78rem; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.coach-spark { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 7px; color: #fff; background: var(--teal-800); border-radius: 50%; }
.coach-panel h2 { margin: 23px 0 12px; max-width: 470px; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; line-height: 1.15; letter-spacing: -.025em; }
.coach-intro { margin: 0 0 27px; color: var(--muted); line-height: 1.58; }
.suggestion { padding: 18px 0; border-top: 1px solid var(--line); }
.suggestion:last-child { border-bottom: 1px solid var(--line); }
.suggestion-head { display: flex; align-items: flex-start; gap: 12px; }
.suggestion-index { flex: 0 0 auto; display: grid; place-items: center; min-width: 86px; height: 25px; padding: 0 9px; color: #594700; background: #fff2b7; border-radius: 999px; font-size: .7rem; font-weight: 780; letter-spacing: .02em; }
.suggestion h3 { margin: 2px 0 7px; font-size: .96rem; }
.suggestion p { margin: 0 0 0 98px; color: #5f6b67; font-size: .87rem; line-height: 1.5; }
.coach-principle { margin-top: 26px; padding: 15px 17px; color: #4f5c58; background: var(--teal-50); border-radius: 8px; font-size: .83rem; line-height: 1.5; }
.coach-principle strong { color: var(--teal-950); }
.coach-actions { position: sticky; bottom: -40px; margin: 34px -52px -40px; padding: 20px 52px 28px; display: flex; justify-content: space-between; gap: 12px; background: rgba(255,253,250,.95); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.coach-actions .primary-button { flex: 1; }
.coach-success { padding: 22px; margin: 24px 0; text-align: center; background: var(--teal-50); border: 1px solid #c7ddd7; border-radius: 10px; }
.coach-success-icon { width: 40px; height: 40px; margin: 0 auto 11px; display: grid; place-items: center; color: #fff; background: var(--teal-800); border-radius: 50%; }
.coach-success strong { display: block; color: var(--teal-950); }
.coach-success p { margin: 5px 0 0; color: var(--muted); font-size: .85rem; }
.coach-fallback { text-align: left; }
.coach-fallback ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.coach-fallback li + li { margin-top: 6px; }

.auth-layer { position: fixed; inset: 0; z-index: 30; display: none; }
.auth-layer.open { display: grid; place-items: center; padding: 22px; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(9, 28, 25, .58); backdrop-filter: blur(3px); }
.auth-panel { position: relative; width: min(520px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; padding: 42px; background: #fffdfa; border-radius: 12px; box-shadow: 0 28px 90px rgba(8,30,26,.32); }
.auth-close { position: absolute; top: 13px; right: 15px; width: 34px; height: 34px; color: #68736f; background: transparent; border: 0; border-radius: 50%; font-size: 1.55rem; line-height: 1; }
.auth-close:hover { background: #eff3f1; }
.auth-kicker { margin: 0 0 10px; color: #9a7200; font-size: .74rem; font-weight: 780; letter-spacing: .11em; text-transform: uppercase; }
.auth-panel h2 { margin: 0; color: var(--teal-950); font-family: Georgia, serif; font-size: 2rem; font-weight: 500; line-height: 1.16; letter-spacing: -.025em; }
.auth-copy { margin: 16px 0 12px; color: #4e5c58; line-height: 1.6; }
.auth-returning { margin: 0 0 22px; padding: 12px 14px; color: #44534f; background: var(--teal-50); border-radius: 7px; font-size: .84rem; line-height: 1.5; }
.auth-panel form { display: grid; gap: 15px; }
.auth-panel label { display: grid; gap: 7px; color: #3e4946; font-size: .82rem; font-weight: 700; }
.auth-panel input { min-height: 48px; width: 100%; padding: 0 13px; color: #182421; background: #fff; border: 1px solid #bfc9c5; border-radius: 7px; font: inherit; font-weight: 450; }
.auth-panel input:focus { outline: 2px solid rgba(14,91,82,.22); border-color: var(--teal-800); }
.auth-submit { width: 100%; margin-top: 3px; }
.auth-submit:disabled { opacity: .58; cursor: wait; }
.auth-message { min-height: 22px; margin-top: 15px; color: #315f56; font-size: .86rem; line-height: 1.45; }
.auth-message.error { color: #8a3d31; }
.auth-fineprint { margin: 9px 0 0; color: #7a8582; font-size: .75rem; text-align: center; }
.save-state.saving i { background: #d3a22b; }
.save-state.error i { background: #b44f3f; }

.review-card { margin-top: 24px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.review-card h3 { margin: 0 0 17px; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.setup-card { padding-bottom: 18px; }
.participant-row { padding: 20px 0 23px; border-top: 1px solid var(--line); }
.participant-row:first-of-type { margin-top: 8px; }
.participant-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.participant-row-head strong { font-size: .9rem; }
.participant-row .field-row + .field-row { margin-top: 13px; }
.compact-check { margin-top: 13px; padding: 10px 12px; background: #f7f8f8; }
.text-button { padding: 3px 0; color: #7a4d3e; background: transparent; border: 0; font-size: .78rem; }
.add-button { margin-top: 3px; padding: 10px 14px; color: var(--teal-950); background: #fff; border: 1px solid #bfc9ce; border-radius: 7px; font-weight: 650; }
.invitation-card { margin-top: 27px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 7px 25px rgba(30,42,47,.05); overflow: hidden; }
.invitation-meta { display: grid; grid-template-columns: 68px 1fr; gap: 8px 18px; padding: 20px 24px; background: #f6f7f7; border-bottom: 1px solid var(--line); font-size: .85rem; }
.invitation-meta span { color: var(--muted); }
.invitation-body { max-width: 700px; padding: 28px 32px 32px; font-family: Georgia, serif; font-size: 1rem; line-height: 1.66; }
.delivery-recipient-list { margin: 12px 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
.delivery-recipient-list li { display: flex; justify-content: space-between; gap: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; }
.delivery-recipient-list span { color: var(--muted); overflow-wrap: anywhere; }
.initiative-title-card { margin: 24px 4px 5px; padding: 18px 20px; background: #fff9df; border: 1px solid #ebdc91; border-radius: 8px; }
.initiative-title-card span, .reveal-card > span { display: block; margin-bottom: 6px; color: #78682c; font-size: .74rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.initiative-title-card strong { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.reveal-card { margin-top: 28px; padding: 27px 30px; color: #fff; background: var(--teal-900); border-radius: 10px; box-shadow: var(--shadow); }
.reveal-card > span { color: #f5d873; }
.reveal-card blockquote { margin: 12px 0 2px; font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.45; }
.summary-strip { margin: 27px 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.summary-strip div { padding: 20px 22px; border-right: 1px solid var(--line); }
.summary-strip div:last-child { border-right: 0; }
.summary-strip strong { display: block; color: var(--teal-900); font-family: Georgia, serif; font-size: 1.9rem; font-weight: 500; }
.summary-strip span { color: var(--muted); font-size: .78rem; }
.status-list { display: grid; }
.status-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 13px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--teal-800); border-radius: 50%; font-size: .72rem; font-weight: 720; }
.status-row div:nth-child(2) strong, .status-row div:nth-child(2) span { display: block; }
.status-row div:nth-child(2) strong { font-size: .88rem; }
.status-row div:nth-child(2) span { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.response-status { padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 680; }
.response-status.complete { color: #286956; background: #e7f3ee; }
.response-status.waiting { color: #6b6250; background: #f5f0e4; }
.review-row { padding: 13px 0; display: grid; grid-template-columns: 180px 1fr; gap: 20px; border-top: 1px solid #e6eae8; font-size: .87rem; line-height: 1.5; }
.review-row span { color: var(--muted); }
.status-pill { width: fit-content; display: inline-flex; align-items: center; gap: 6px; color: #286956; background: #e7f3ee; padding: 5px 9px; border-radius: 999px; font-size: .73rem; font-weight: 700; }
.checklist { display: grid; gap: 10px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: .87rem; line-height: 1.4; }
.checkline input { margin-top: 3px; accent-color: var(--teal-800); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 10px); z-index: 40; padding: 11px 16px; color: #fff; background: var(--teal-950); border-radius: 8px; opacity: 0; pointer-events: none; transition: .2s ease; font-size: .85rem; box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 820px) {
  .topbar { padding: 0 18px; }
  .save-state { display: none; }
  .shell { display: block; }
  .sidebar { padding: 24px 20px 19px; }
  .sidebar h1 { font-size: 1.55rem; }
  .sidebar-intro, .sidebar-note { display: none; }
  .steps { margin-top: 20px; flex-direction: row; gap: 5px; }
  .step { flex: 1; display: block; min-height: auto; }
  .step:not(:last-child)::after { top: 12px; left: 25px; right: -5px; bottom: auto; width: auto; height: 1px; }
  .step-dot { margin: 0 auto; }
  .step-copy { display: none; }
  .workspace { width: calc(100% - 32px); padding: 33px 0 45px; }
  .workspace-head { padding-bottom: 23px; }
  .progress-number { display: none; }
  .choice-grid, .field-row, .field-row.three { grid-template-columns: 1fr; }
  .form-footer { align-items: stretch; }
  .footer-right { margin-left: auto; }
  .time-hint { display: none; }
  .coach-panel { padding: 35px 24px 24px; }
  .coach-actions { bottom: -24px; margin: 28px -24px -24px; padding: 17px 24px 22px; }
  .auth-panel { padding: 34px 24px 27px; }
  .review-row { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 520px) {
  .brand img { width: 178px; height: 34px; }
  .workspace h2 { font-size: 2rem; }
  .form-footer { gap: 8px; }
  .footer-right { flex: 1; }
  .primary-button { width: 100%; }
  .coach-actions { flex-direction: column-reverse; }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .status-row { grid-template-columns: 34px 1fr; }
  .response-status { grid-column: 2; width: fit-content; }
}
