/* Keep the personal-goals header readable when its action shares a small card. */
.route-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.route-card-heading > div {
  min-width: 0;
}

.route-card-heading > .soft-button {
  width: max-content;
  max-width: 100%;
  margin-top: 0;
  white-space: nowrap;
  justify-self: end;
}

@media (max-width: 440px) {
  .route-card-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .route-card-heading > .soft-button {
    width: 100%;
    max-width: none;
    margin-top: 8px;
    justify-self: stretch;
  }
}

/* Give the modal close control a clear contrast and a reliable touch target. */
.modal-close {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: #204b3a;
  color: #fff;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.26);
  touch-action: manipulation;
}

.modal-close:hover {
  background: #173a2d;
  color: #fff;
}

.modal-close:focus-visible {
  outline: 3px solid #c4e2c1;
  outline-offset: 2px;
}

/* Keep the 90-day route visually primary, using the journal's green card treatment. */
.journal-card,
.route-primary-card {
  border-color: #dbe7dc;
  background: linear-gradient(140deg, #e4ebdd, #e8eeee);
}

.route-primary-card .route-label {
  color: #58745e;
}

.route-primary-card .route-stat span {
  border-color: rgba(81, 119, 91, 0.2);
  background: rgba(255, 255, 255, 0.34);
}

/* The empty portrait is body copy, not a second headline. */
.profile-portrait > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* A failed achievements request should read like a compact inline notice. */
.achievement-notice {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--muted);
}

.achievement-notice-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 700;
}

.achievement-notice > div {
  min-width: 0;
}

.achievement-notice b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.achievement-notice p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.achievement-retry {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 700;
}

html[data-theme="dark"] .journal-card,
html[data-theme="dark"] .route-primary-card {
  border-color: #405b47;
  background: linear-gradient(140deg, #263b2e, #20352d);
}

html[data-theme="dark"] .route-primary-card .route-label {
  color: #b5d4b6;
}

html[data-theme="dark"] .route-primary-card .route-stat span {
  border-color: rgba(181, 212, 182, 0.25);
  background: rgba(19, 32, 24, 0.28);
  color: #d5e3d5;
}

html[data-theme="dark"] .achievement-notice {
  border-color: #405247;
  background: #17211c;
}

/* Make it obvious that an interview can be paused and resumed later. */
.interview-header > .round-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  touch-action: manipulation;
}

.interview-header .interview-pause-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  margin-left: auto;
  padding: 0 13px;
  border: 1px solid #bfd5c1;
  border-radius: 12px;
  background: #e8f1e8;
  color: #315e43;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  touch-action: manipulation;
}

.pause-glyph {
  font-size: 13px;
  line-height: 1;
}

.interview-header .interview-pause-button:focus-visible,
.interview-header > .round-button:focus-visible {
  outline: 3px solid #8eb397;
  outline-offset: 2px;
}

html[data-theme="dark"] .interview-header .interview-pause-button {
  border-color: #52735a;
  background: #263c2d;
  color: #e5f1e5;
}

/* The consent explanations are disclosures, so keep their labels readable in either theme. */
.consent-intro {
  max-width: 54ch;
}

.consent-details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.consent-details summary::after {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 8px;
  font-size: 18px;
  font-weight: 500;
}

.consent-details summary:focus-visible {
  outline: 3px solid #8eb397;
  outline-offset: -3px;
}

html[data-theme="dark"] .consent-details {
  border-color: #455a4b;
  background: #1b2821;
}

html[data-theme="dark"] .consent-details summary {
  color: #edf4ed;
}

html[data-theme="dark"] .consent-intro {
  color: #c2cec3;
}

html[data-theme="dark"] .consent-details summary::after {
  color: #b5d4b6;
}

html[data-theme="dark"] .consent-details > div,
html[data-theme="dark"] .consent-details > div p {
  color: #c2cec3;
}

html[data-theme="dark"] .consent-details a {
  color: #b5d4b6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-microphone-note {
  margin: 10px 0 13px;
  padding-left: 11px;
  border-left: 2px solid #9ab99c;
  color: #607267;
}

html[data-theme="dark"] .consent-microphone-note {
  color: #c2cec3;
}

/* Keep the interview microphone and its stop state upright and aligned with Send. */
.composer .voice-button,
.composer .send-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  align-self: flex-end;
  transform: none;
  line-height: 1;
  touch-action: manipulation;
}

.composer .voice-button svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0;
  transform: none;
}

.composer .voice-button.recording {
  transform: none;
}

.composer .voice-button:focus-visible {
  outline: 3px solid #8eb397;
  outline-offset: 2px;
}

/* Keep the interview as a steady chat viewport while replies and the keyboard change. */
.interview-screen {
  min-height: 0;
}

.interview-screen .chat {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
  scroll-behavior: auto;
}

.interview-screen .composer-wrap {
  flex: 0 0 auto;
  min-width: 0;
}

.interview-screen .composer {
  min-height: 58px;
}

.interview-screen .composer textarea {
  min-height: 40px;
  max-height: 125px;
  overflow-y: auto;
  line-height: 1.4;
}

.thinking-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--muted, #77817a);
  border: 1px solid var(--line, rgba(91, 121, 104, .18));
  border-radius: 16px 16px 16px 5px;
  background: var(--surface, rgba(255, 255, 255, .72));
  font-size: .94rem;
}

/* The interview is a focused, full-height workspace. */
body.interview-mode {
  height: 100%;
  overflow: hidden;
}

body.interview-mode .app-shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  height: var(--app-visual-height, 100dvh);
  min-height: 0;
  padding: env(safe-area-inset-top) 19px env(safe-area-inset-bottom);
  overflow: hidden;
}

body.interview-mode .topbar {
  display: none;
}

body.interview-mode .bottom-nav[hidden] {
  display: none !important;
}

body.interview-mode .interview-screen {
  flex: 1 1 0;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 8px 0 4px;
}

body.interview-mode .interview-header {
  flex: 0 0 auto;
  min-height: 42px;
  gap: 9px;
}

body.interview-mode .interview-header > .round-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

body.interview-mode .interview-heading .eyebrow {
  display: none;
}

body.interview-mode .interview-heading h2 {
  font-size: 16px;
}

body.interview-mode .interview-header .interview-pause-button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

body.interview-mode .interview-progress {
  flex: 0 0 auto;
  padding: 8px 0 3px;
}

body.interview-mode .progress-copy {
  align-items: center;
  margin-bottom: 5px;
  font-size: 10px;
}

body.interview-mode #blockLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.interview-mode #progressLabel {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.interview-mode .progress-track {
  height: 2px;
}

body.interview-mode .interview-screen .chat {
  gap: 9px;
  padding: 8px 1px 10px;
  scroll-behavior: auto;
}

body.interview-mode .interview-screen .bubble {
  font-size: 13px;
  line-height: 1.5;
}

body.interview-mode .interview-tools {
  flex: 0 0 auto;
  padding: 0 2px 7px;
}

body.interview-mode .composer-wrap {
  flex: 0 0 auto;
  padding-bottom: 0;
}

body.interview-mode .interview-screen .composer {
  gap: 7px;
  min-height: 56px;
  padding: 6px;
}

body.interview-mode .interview-screen .composer textarea {
  min-height: 42px;
  font-size: 16px;
}

body.interview-mode .interview-screen .voice-button,
body.interview-mode .interview-screen .send-button {
  flex-basis: 42px;
  width: 42px;
  height: 42px;
}

body.keyboard-open.interview-mode .app-shell {
  padding-bottom: 4px;
}

body.keyboard-open.interview-mode .interview-progress {
  padding-top: 5px;
}

body.keyboard-open.interview-mode .interview-tools,
body.keyboard-open.interview-mode .interview-screen .composer-hint {
  display: none;
}

@media (max-width: 440px) {
  body.interview-mode .app-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  body.interview-mode .interview-screen .bubble {
    max-width: 94%;
  }
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 10px;
}

.thinking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: interview-thinking 1.05s ease-in-out infinite;
}

.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }

@keyframes interview-thinking {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-dots i { animation: none; opacity: .7; }
}

/* Keep the contribution control readable and explain why it is unavailable yet. */
.improvement-settings > #improvementCaseAction {
  justify-self: stretch;
  min-height: 48px;
  padding-inline: 16px;
  border: 1px solid #cbdccf;
  background: #f1f7f1;
  color: #375f45;
  box-shadow: none;
  text-align: center;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.improvement-settings > #improvementCaseAction:hover {
  transform: none;
  border-color: #b5ceb9;
  background: #e4f0e6;
  color: #294f38;
  box-shadow: none;
}

.improvement-settings > #improvementCaseAction:focus-visible {
  outline: 3px solid #8eb397;
  outline-offset: 2px;
}

.improvement-settings > #improvementCaseAction.is-unavailable {
  border-style: dashed;
  background: #f5f7f2;
  color: #566b5c;
  cursor: pointer;
}

.improvement-settings > #improvementCaseAction.is-unavailable:hover {
  border-color: #b8c9b9;
  background: #edf3eb;
  color: #566f5c;
}

.improvement-settings > #improvementCaseAction.is-checking,
.improvement-settings > #improvementCaseAction.is-retry {
  background: #f5f7f2;
  color: #52685a;
}

.improvement-settings > #improvementCaseAction[hidden] {
  display: none !important;
}

html[data-theme="dark"] .improvement-settings > #improvementCaseAction {
  border-color: #526b58;
  background: #26362d;
  color: #d5e3d5;
}

html[data-theme="dark"] .improvement-settings > #improvementCaseAction:hover {
  border-color: #6b8a70;
  background: #304438;
  color: #f0f6ef;
}

html[data-theme="dark"] .improvement-settings > #improvementCaseAction.is-unavailable,
html[data-theme="dark"] .improvement-settings > #improvementCaseAction.is-checking,
html[data-theme="dark"] .improvement-settings > #improvementCaseAction.is-retry {
  border-color: #45584b;
  background: #202d25;
  color: #aab9ac;
}

html[data-theme="dark"] .improvement-settings > #improvementCaseAction.is-unavailable:hover {
  border-color: #5d7562;
  background: #293a30;
  color: #d2e1d2;
}

/* One button language across the app: filled means primary, outlined means secondary. */
:root {
  --action-primary: #244c39;
  --action-primary-hover: #326249;
  --action-primary-ink: #ffffff;
  --action-secondary: #f1f7f1;
  --action-secondary-hover: #e4f0e6;
  --action-secondary-border: #d9e6da;
  --action-secondary-ink: #375f45;
  --action-quiet-hover: rgba(85, 121, 96, 0.09);
  --action-focus: #5f9278;
}

html[data-theme="dark"] {
  --action-primary: #b5d4b6;
  --action-primary-hover: #c5dfc5;
  --action-primary-ink: #173326;
  --action-secondary: #26362d;
  --action-secondary-hover: #304438;
  --action-secondary-border: #43564a;
  --action-secondary-ink: #d5e3d5;
  --action-quiet-hover: rgba(181, 212, 182, 0.12);
  --action-focus: #b5d4b6;
}

.primary-button,
.route-actions .primary-button,
.modal-actions .primary-button {
  border: 1px solid transparent;
  background: var(--action-primary);
  color: var(--action-primary-ink);
  box-shadow: 0 5px 14px rgba(35, 73, 54, 0.13);
  transition: transform .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.primary-button:hover:not(:disabled),
.route-actions .primary-button:hover:not(:disabled),
.modal-actions .primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--action-primary-hover);
  color: var(--action-primary-ink);
}

.primary-button:active:not(:disabled),
.route-actions .primary-button:active:not(:disabled),
.modal-actions .primary-button:active:not(:disabled) {
  transform: translateY(0) scale(.99);
}

.secondary-button,
.soft-button,
.task-actions button,
.route-actions button:not(.primary-button),
.modal-actions button:not(.primary-button),
.review-controls button,
.quick-prompts button,
.improvement-case-row button {
  border: 1px solid var(--action-secondary-border);
  background: var(--action-secondary);
  color: var(--action-secondary-ink);
  box-shadow: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.secondary-button:hover:not(:disabled),
.soft-button:hover:not(:disabled),
.task-actions button:hover:not(:disabled),
.route-actions button:not(.primary-button):hover:not(:disabled),
.modal-actions button:not(.primary-button):hover:not(:disabled),
.review-controls button:hover:not(:disabled),
.quick-prompts button:hover:not(:disabled),
.improvement-case-row button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--green-deep);
  background: var(--action-secondary-hover);
  color: var(--action-secondary-ink);
}

.secondary-button:active:not(:disabled),
.soft-button:active:not(:disabled),
.task-actions button:active:not(:disabled),
.route-actions button:not(.primary-button):active:not(:disabled),
.modal-actions button:not(.primary-button):active:not(:disabled),
.review-controls button:active:not(:disabled),
.quick-prompts button:active:not(:disabled),
.improvement-case-row button:active:not(:disabled) {
  transform: translateY(0) scale(.99);
}

.journal-card .primary-button,
.route-primary-card .primary-button {
  background: var(--action-primary);
  color: var(--action-primary-ink);
}

.journal-card .primary-button:hover:not(:disabled),
.route-primary-card .primary-button:hover:not(:disabled) {
  background: var(--action-primary-hover);
  color: var(--action-primary-ink);
}

.task-actions button,
.route-actions button,
.modal-actions button,
.review-controls button,
.improvement-case-row button {
  min-height: 40px;
}

.soft-button {
  min-height: 44px;
}

.nav-item:hover:not(.selected),
.text-link:hover,
.text-button:hover,
.subtle-action:hover,
.achievement-retry:hover {
  background: var(--action-quiet-hover);
  color: var(--green-deep);
}

.task-check:hover:not(.done),
.round-button:hover,
.profile-menu button:hover,
.admin-analytics-heading button:hover,
.theme-options button:hover:not([aria-pressed="true"]) {
  background-color: var(--action-secondary-hover);
}

.review-controls button.chosen {
  border-color: var(--action-secondary-border);
  background: var(--action-secondary-hover);
  color: var(--green-deep);
}

html[data-theme="dark"] .review-controls button.chosen {
  border-color: #59795f;
  background: #304b37;
  color: #b5d4b6;
}

html[data-theme="dark"] .soft-button,
html[data-theme="dark"] .task-actions button,
html[data-theme="dark"] .route-actions button:not(.primary-button),
html[data-theme="dark"] .modal-actions button:not(.primary-button),
html[data-theme="dark"] .review-controls button:not(.chosen),
html[data-theme="dark"] .quick-prompts button,
html[data-theme="dark"] .improvement-case-row button {
  border-color: var(--action-secondary-border);
  background: var(--action-secondary);
  color: var(--action-secondary-ink);
}

html[data-theme="dark"] .soft-button:hover:not(:disabled),
html[data-theme="dark"] .task-actions button:hover:not(:disabled),
html[data-theme="dark"] .route-actions button:not(.primary-button):hover:not(:disabled),
html[data-theme="dark"] .modal-actions button:not(.primary-button):hover:not(:disabled),
html[data-theme="dark"] .review-controls button:not(.chosen):hover:not(:disabled),
html[data-theme="dark"] .quick-prompts button:hover:not(:disabled),
html[data-theme="dark"] .improvement-case-row button:hover:not(:disabled) {
  border-color: #6b8a70;
  background: var(--action-secondary-hover);
  color: var(--action-secondary-ink);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

button:disabled:hover {
  transform: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline-color: var(--action-focus);
}

html[data-theme="dark"] .journal-card .primary-button,
html[data-theme="dark"] .route-primary-card .primary-button,
html[data-theme="dark"] .route-actions .primary-button,
html[data-theme="dark"] .modal-actions .primary-button {
  background: var(--action-primary);
  color: var(--action-primary-ink);
}

html[data-theme="dark"] .journal-card .primary-button:hover:not(:disabled),
html[data-theme="dark"] .route-primary-card .primary-button:hover:not(:disabled),
html[data-theme="dark"] .route-actions .primary-button:hover:not(:disabled),
html[data-theme="dark"] .modal-actions .primary-button:hover:not(:disabled) {
  background: var(--action-primary-hover);
  color: var(--action-primary-ink);
}

html[data-theme="dark"] .button-arrow {
  color: var(--action-primary-ink);
}

/* Make the small secondary controls comfortable to tap on a phone. */
.interview-tools .subtle-action,
.text-link {
  min-height: 40px;
  padding: 8px;
  border-radius: 10px;
  touch-action: manipulation;
}

.interview-tools .subtle-action {
  font-size: 10px;
  line-height: 1.25;
}

.quick-prompts button,
.theme-options button {
  min-height: 40px;
  touch-action: manipulation;
}

button:disabled {
  opacity: .56;
  box-shadow: none;
}

.hero-topics-link,
.interview-topics-link {
  border: 0;
  background: transparent;
  color: var(--green-deep);
  font: 600 12px/1.4 var(--body);
  text-decoration: underline;
  text-decoration-color: rgba(66, 112, 80, .36);
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
}

.hero-topics-link {
  display: block;
  margin: 10px 0 0;
  padding: 4px 0;
  text-align: left;
}

.hero-topics-link[hidden] { display: none; }

.progress-secondary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.interview-topics-link {
  flex: 0 0 auto;
  padding: 0;
  font-size: 10px;
  white-space: nowrap;
}

.interview-topic-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.interview-topic-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.interview-topic-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #aac6ae;
  border-radius: 50%;
  color: var(--green-deep);
  font: 700 10px/1 var(--body);
}

.interview-topic-list li b,
.interview-topic-list li small {
  display: block;
}

.interview-topic-list li b {
  color: var(--ink);
  font: 700 13px/1.35 var(--body);
}

.interview-topic-list li small {
  margin-top: 3px;
  color: var(--muted);
  font: 400 11px/1.45 var(--body);
}

.topic-preview-footer {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green);
  color: var(--muted);
  font: 400 11px/1.5 var(--body);
}

.profile-approval-prompt {
  display: grid;
  gap: 4px;
  margin: 16px 0 10px !important;
  padding: 12px 14px;
  border: 1px solid #d8a2a2;
  border-radius: 12px;
  background: #fff2f1;
  color: #814142 !important;
  font-size: 12px !important;
}

.profile-approval-prompt b {
  font-size: 13px;
  line-height: 1.35;
}

.profile-approval-prompt span {
  line-height: 1.45;
}

.profile-approval-action {
  min-height: 48px;
  border-color: #b55f63 !important;
  background: #a7484e !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 5px 14px rgba(119, 49, 53, .16) !important;
}

.profile-approval-action:hover:not(:disabled) {
  border-color: #994047 !important;
  background: #994047 !important;
  color: #fff !important;
}

.profile-reminder-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 13px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.profile-reminder-toggle input {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #39765f;
}

.profile-reminder-toggle span,
.profile-reminder-toggle b,
.profile-reminder-toggle small { display: block; }

.profile-reminder-toggle b {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.profile-reminder-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

html[data-theme="dark"] .hero-topics-link,
html[data-theme="dark"] .interview-topics-link {
  color: #b5d4b6;
  text-decoration-color: rgba(181, 212, 182, .45);
}

html[data-theme="dark"] .interview-topic-list li {
  border-color: #394a3f;
  background: #17211c;
}

html[data-theme="dark"] .interview-topic-list li b {
  color: #edf3ec;
}

html[data-theme="dark"] .interview-topic-list li small,
html[data-theme="dark"] .topic-preview-footer {
  color: #a9b8aa;
}

html[data-theme="dark"] .interview-topic-number {
  border-color: #607d65;
  color: #b5d4b6;
}

html[data-theme="dark"] .topic-preview-footer {
  background: #22362a;
}

html[data-theme="dark"] .profile-approval-prompt {
  border-color: #7d474c;
  background: #332326;
  color: #f2c6c5 !important;
}

html[data-theme="dark"] .profile-reminder-toggle {
  border-color: #394a3f;
  background: #17211c;
}

html[data-theme="dark"] .profile-reminder-toggle b { color: #edf3ec; }
html[data-theme="dark"] .profile-reminder-toggle small { color: #a9b8aa; }

/* Version 2.0 review: keep the proposal readable on narrow screens and in both themes. */
.version2-review {
  display: grid;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  text-align: left;
}

.version2-review > .modal-kicker,
.version2-review > h2,
.version2-review > section,
.version2-review > .version2-directions-section,
.version2-review > .modal-actions {
  width: 100%;
  min-width: 0;
  text-align: left;
}

.version2-review > h2 {
  margin: 0 42px 0 0;
  font-size: clamp(22px, 5.4vw, 27px);
  line-height: 1.16;
}

.version2-review .review-section {
  margin: 0;
  padding: 15px;
  border-color: var(--line);
  background: var(--green);
}

.version2-review .version2-vision p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.version2-review .version2-gaps h3,
.version2-review .version2-open-questions h3,
.version2-directions-section > h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.version2-review .version2-gaps > p,
.version2-review .version2-open-questions > p,
.version2-review .version2-section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.version2-review .key-gap-list {
  gap: 12px;
  margin-top: 15px;
}

.version2-review .version2-gaps.review-section {
  padding: 0;
  border: 0;
  background: transparent;
}

.version2-review .key-gap-intro { font-size: 12px !important; }

.version2-review .key-gap {
  min-width: 0;
  padding: 15px;
  border-radius: 17px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.version2-review .key-gap h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.key-gap-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.key-gap-number {
  display: grid;
  flex: none;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green-deep);
  font-size: 10px;
  font-weight: 700;
}

.version2-review .key-gap-comparison {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.version2-review .key-gap-comparison > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.version2-review .key-gap-comparison .key-gap-target {
  border-color: color-mix(in srgb, var(--green-deep) 25%, var(--line));
  background: color-mix(in srgb, var(--green) 65%, var(--surface));
}

.version2-review .key-gap-comparison small {
  display: flex;
  align-items: center;
  min-height: 20px;
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 20px;
  white-space: nowrap;
}

.version2-review .key-gap-comparison p {
  color: var(--ink) !important;
  margin: 8px 0 0 !important;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.version2-review .key-gap-confidence {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0;
}

.key-gap-explanation {
  margin-top: 13px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.version2-review .key-gap-explanation summary,
.version2-review .version2-why summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 24px;
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.key-gap-explanation summary::-webkit-details-marker,
.version2-why summary::-webkit-details-marker { display: none; }

.key-gap-explanation summary::after,
.version2-review .version2-why summary::after {
  content: '+';
  flex: none;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.key-gap-explanation[open] summary::after,
.version2-review .version2-why[open] summary::after { content: '−'; }

.version2-review .key-gap-explanation p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.version2-review .key-gap-evidence b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 11px;
}

.version2-directions-section {
  min-width: 0;
}

.version2-direction-list {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin-top: 10px;
}

.version2-review .review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  text-align: left;
}

.version2-item-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.version2-direction-label {
  margin: 0 0 6px !important;
  color: var(--green-deep) !important;
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: .14em;
}

.version2-review .review-item h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.version2-review .review-item .version2-direction-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.version2-why {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.version2-why summary {
  width: fit-content;
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.version2-why > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.version2-why > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.version2-review .review-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.version2-review .review-controls button {
  min-width: 0;
  min-height: 42px;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.version2-review .review-controls button.chosen {
  border-color: #91b298;
  background: var(--green);
  color: var(--ink);
  font-weight: 700;
}

.version2-review .review-item.removed {
  opacity: .66;
}

.version2-review .version2-actions {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 9px;
  margin-top: 2px;
}

.version2-review .version2-actions button {
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 8px 10px;
  line-height: 1.3;
  white-space: normal;
}

html[data-theme="dark"] .version2-review .review-section {
  border-color: #405247;
  background: #202d25;
}

html[data-theme="dark"] .version2-review .key-gap {
  border-color: #405247;
  background: #17211c;
}

html[data-theme="dark"] .version2-review .key-gap-comparison > div {
  border-color: #405247;
  background: #1d2822;
}

html[data-theme="dark"] .version2-review .key-gap-comparison .key-gap-target {
  border-color: #52745d;
  background: #263a2e;
}

html[data-theme="dark"] .version2-review .version2-gaps.review-section { background: transparent; }

html[data-theme="dark"] .key-gap-number,
html[data-theme="dark"] .key-gap-explanation { border-color: #405247; }

html[data-theme="dark"] .version2-review .key-gap-comparison p {
  color: #e5eee5 !important;
}

html[data-theme="dark"] .version2-review .review-item {
  border-color: #405247;
  background: #1d2822;
}

html[data-theme="dark"] .version2-review .review-controls button {
  border-color: #43564a;
  background: #26362d;
  color: #d5e3d5;
}

html[data-theme="dark"] .version2-review .review-controls button.chosen {
  border-color: #6b9571;
  background: #304b37;
  color: #e4f1e4;
}

html[data-theme="dark"] .version2-why {
  border-color: #405247;
}

@media (max-width: 430px) {
  .version2-review .review-section,
  .version2-review .review-item { padding: 13px; }

  .version2-review .review-controls { gap: 6px; }

  .version2-review .review-controls button { font-size: 9px; }

  .version2-review .key-gap { padding: 12px; }
  .version2-review .key-gap-comparison { gap: 8px; }
  .version2-review .key-gap-comparison > div { padding: 10px; }

  .version2-review .version2-actions {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 430px) {
  .interview-progress .progress-copy { gap: 5px; }
  .progress-secondary { gap: 5px; }
  .interview-topics-link { font-size: 9px; }
  .interview-topic-list { gap: 6px; }
  .interview-topic-list li { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 9px; }
}

/* Journal history: clear accordions and readable, grouped strategy records. */
.journal-history .review-history-item {
  overflow: hidden;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.journal-history .review-history-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.journal-history .review-history-item > summary::-webkit-details-marker {
  display: none;
}

.review-history-summary-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.review-history-summary-copy b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.review-history-summary-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.review-history-summary-copy .strategy-history-kind {
  color: var(--green-deep);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.35;
}

.review-history-toggle {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green-deep);
  transition: transform 160ms ease, background-color 160ms ease;
}

.review-history-toggle::before {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.journal-history .review-history-item[open] {
  border-color: color-mix(in srgb, var(--green-deep) 38%, var(--line));
  box-shadow: 0 5px 18px rgba(34, 62, 44, .06);
}

.journal-history .review-history-item[open] > summary {
  border-bottom: 1px solid var(--line);
}

.journal-history .review-history-item[open] .review-history-toggle {
  background: var(--green);
}

.journal-history .review-history-item[open] .review-history-toggle::before {
  content: "−";
}

.journal-history .review-history-item > summary:focus-visible,
.journal-history .review-answers > summary:focus-visible {
  outline: 2px solid var(--green-deep);
  outline-offset: -3px;
}

.review-history-body {
  padding: 15px 16px 17px;
}

.review-history-body > p:not(.route-label) {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.strategy-history-heading {
  display: block;
  margin-top: 34px;
}

.strategy-history-intro {
  max-width: 440px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.strategy-history-list .review-history-item {
  margin: 0;
}

.strategy-history-body {
  display: grid;
  gap: 14px;
}

.strategy-history-block {
  min-width: 0;
}

.strategy-history-block + .strategy-history-block {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.strategy-history-block > .route-label {
  margin: 0 0 8px;
  color: var(--green-deep);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
}

.strategy-history-block > p:not(.route-label) {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.strategy-history-directions {
  display: grid;
  gap: 8px;
}

.strategy-history-direction {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.strategy-history-direction > span,
.strategy-history-milestones > li > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green-deep) 34%, var(--line));
  border-radius: 50%;
  color: var(--green-deep);
  font-size: 9px;
  font-weight: 700;
}

.strategy-history-direction h3 {
  margin: 1px 0 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.strategy-history-direction p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.strategy-history-direction .strategy-history-note {
  margin-top: 6px;
  font-size: 11px;
}

.strategy-history-milestones {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strategy-history-milestones > li {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.strategy-history-milestones > li > div {
  display: grid;
  gap: 3px;
  padding-top: 3px;
}

.strategy-history-milestones small,
.strategy-history-empty {
  color: var(--muted);
  font-size: 11px;
}

@media (hover: hover) {
  .journal-history .review-history-item > summary:hover {
    background: color-mix(in srgb, var(--green) 34%, var(--surface));
  }
}

@media (max-width: 420px) {
  .journal-history .review-history-item > summary {
    padding: 13px;
  }

  .review-history-body {
    padding: 13px;
  }

  .review-history-summary-copy b {
    font-size: 13px;
  }
}
