:root {
  --brand: #2f6b50;
  --brand-dark: #24583f;
  --brand-soft: #e4f1e9;
  --mint: #d8fdd2;
  --ink: #151817;
  --muted: #7b817e;
  --line: #e5e8e7;
  --surface: #ffffff;
  --surface-soft: #f5f6f6;
  --chat-canvas: #efebe2;
  --chat-text-size: 14px;
  --sidebar-width: 320px;
  --shadow: 0 12px 34px rgba(27, 40, 34, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
}
:root[data-chat-size="0"] { --chat-text-size: 12px; }
:root[data-chat-size="1"] { --chat-text-size: 13px; }
:root[data-chat-size="2"] { --chat-text-size: 14px; }
:root[data-chat-size="3"] { --chat-text-size: 15.5px; }
:root[data-chat-size="4"] { --chat-text-size: 17px; }
:root[data-chat-size="5"] { --chat-text-size: 19px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; background: var(--surface-soft); }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible { outline: 3px solid rgba(47, 107, 80, .25); outline-offset: 2px; }

.shell {
  position: relative; width: 100%; height: 100vh; height: 100dvh; display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr); overflow: hidden; background: var(--surface);
}
.sidebar {
  min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 20px;
  padding: 24px 22px 20px; border-right: 1px solid var(--line); background: var(--surface); z-index: 4;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark, .login-mark, .loading-mark, .chat-avatar {
  display: block; flex: 0 0 auto; object-fit: cover; object-position: center;
  border-radius: 50%; background: var(--brand); box-shadow: 0 5px 14px rgba(47, 107, 80, .18);
}
.brand-mark { width: 46px; height: 46px; }
.brand-copy { min-width: 0; }
.brand-copy h1 { margin: 0; color: #101312; font-size: 25px; font-weight: 800; letter-spacing: -.04em; }
.brand-copy p { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-close {
  width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; margin-left: auto;
  border: 0; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 25px; line-height: 1;
}
.sidebar-close:hover { background: var(--brand-soft); color: var(--brand); }
.sidebar-resizer {
  position: absolute; top: 0; bottom: 0; left: calc(var(--sidebar-width) - 4px); z-index: 12;
  width: 8px; cursor: col-resize; touch-action: none;
}
.sidebar-resizer::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px;
  background: transparent; transition: background .15s ease;
}
.sidebar-resizer:hover::after, .sidebar-resizer:focus-visible::after, .sidebar-resizing .sidebar-resizer::after { background: var(--brand); }
.sidebar-resizing, .sidebar-resizing * { cursor: col-resize !important; user-select: none !important; }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; }

.user-block {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.user-copy { min-width: 0; display: grid; gap: 2px; }
.user-copy strong, .user-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12px; }
.user-copy span { color: var(--muted); font-size: 10px; }
.user-block button { border: 0; background: transparent; color: var(--brand); font-size: 10px; font-weight: 700; padding: 6px; }
.user-block button:hover { color: var(--brand-dark); }

.threads-panel { min-height: 0; flex: 0 0 auto; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading h2 { font-size: 15px; font-weight: 800; }
.new-thread-button {
  width: 31px; height: 31px; border: 0; border-radius: 10px; background: var(--surface-soft);
  color: var(--brand); font-size: 19px; line-height: 1;
}
.new-thread-button:hover { background: var(--brand-soft); }
.thread-list { display: grid; gap: 4px; overflow: visible; margin-top: 10px; }
.thread-list.expanded { max-height: min(42vh, 420px); overflow-y: auto; padding-right: 4px; scrollbar-gutter: stable; }
.thread-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; border-radius: 11px; }
.thread-row:hover { background: var(--surface-soft); }
.thread-row.active { background: var(--brand-soft); }
.thread-row.active::before { content: ""; width: 3px; height: 24px; position: absolute; border-radius: 3px; background: var(--brand); }
.thread-select, .thread-menu { border: 0; background: transparent; }
.thread-select { min-width: 0; overflow: hidden; display: grid; gap: 2px; padding: 8px 8px 8px 12px; color: #343937; text-align: left; }
.thread-title {
  overflow: hidden; font-family: inherit; font-size: var(--chat-text-size); font-weight: 500;
  line-height: 1.3; text-overflow: ellipsis; white-space: nowrap;
}
.thread-date { color: var(--muted); font-family: inherit; font-size: 10px; font-weight: 500; }
.thread-row.active .thread-title { color: var(--brand-dark); font-weight: 750; }
.thread-actions { position: relative; display: grid; place-items: center; }
.thread-menu { width: 30px; height: 30px; border-radius: 8px; color: var(--muted); }
.thread-menu:hover, .thread-menu[aria-expanded="true"] { background: rgba(47, 107, 80, .09); color: var(--brand); }
.thread-action-menu {
  position: absolute; top: 31px; right: 0; z-index: 30; width: 126px; padding: 5px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow);
}
.thread-action-menu button { width: 100%; border: 0; border-radius: 7px; padding: 8px 9px; background: transparent; color: var(--ink); font-size: 11px; text-align: left; }
.thread-action-menu button:hover { background: var(--surface-soft); }
.thread-action-menu button.danger { color: #a23f35; }
.thread-action-menu button.danger:hover { background: #fff0ee; }
.thread-list.expanded .thread-row:nth-last-child(-n+2) .thread-action-menu { top: auto; bottom: 31px; }
.thread-list-toggle { width: 100%; margin-top: 7px; border: 0; border-radius: 9px; padding: 8px; background: transparent; color: var(--brand); font-size: 10px; font-weight: 750; }
.thread-list-toggle:hover { background: var(--brand-soft); }

.sidebar-spacer { flex: 1; }
.privacy-copy { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.privacy-copy span { color: var(--brand); font-size: 18px; }
.privacy-copy p { margin: 0; }

.loading-screen, .login-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 50% 25%, #edf5f0, var(--surface-soft) 46%);
}
.loading-card { display: grid; justify-items: center; gap: 12px; color: var(--muted); }
.loading-card p { margin: 0; font-size: 16px; font-weight: 650; }
.loading-mark { width: 58px; height: 58px; }
.loading-dots { display: flex; gap: 5px; }
.loading-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); animation: loading-pulse 1.1s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes loading-pulse { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.login-card {
  width: min(430px, 100%); padding: 40px; text-align: center; border: 1px solid var(--line);
  border-radius: 26px; background: var(--surface); box-shadow: var(--shadow);
}
.login-mark { width: 64px; height: 64px; margin: 0 auto 20px; }
.login-card h1 { font-size: 31px; font-weight: 800; letter-spacing: -.035em; }
.login-card > p:not(.eyebrow):not(.login-error) { margin: 16px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.login-card button { border: 0; border-radius: 14px; padding: 13px 19px; background: var(--brand); color: white; font-weight: 750; }
.login-card button:hover { background: var(--brand-dark); }
.login-error { min-height: 1.4em; margin: 13px 0 0; color: #9c3f35; font-size: 12px; }

.sidebar-scrim { display: none; }
.chat-panel { min-width: 0; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; background: var(--chat-canvas); }
.chat-header {
  min-height: 76px; padding: 10px 20px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 2px 10px rgba(24, 31, 27, .04); z-index: 5;
}
.sidebar-toggle {
  width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center;
  border: 0; border-radius: 11px; background: var(--surface-soft); color: var(--brand); font-size: 24px; line-height: 1;
}
.sidebar-toggle-expand { display: none; }
.sidebar-toggle-menu { display: inline; font-size: 17px; }
.sidebar-toggle:hover { background: var(--brand-soft); }
.chat-identity { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; }
.chat-avatar { width: 44px; height: 44px; }
.chat-guide-copy { min-width: 0; }
.chat-header h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.connection { display: flex; align-items: center; gap: 6px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.connection-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #35a566; }
.chat-size-control {
  display: flex; align-items: center; flex: 0 0 auto; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft);
}
.chat-size-control button { height: 38px; border: 0; border-radius: 0; padding: 0; background: transparent; color: var(--brand); line-height: 1; box-shadow: none; }
.chat-size-control button:not(.chat-size-value) { width: 36px; font-size: 19px; }
.chat-size-control .chat-size-value {
  width: 48px; border-right: 1px solid var(--line); border-left: 1px solid var(--line);
  color: #58615d; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.chat-size-control button:hover:not(:disabled) { background: var(--brand-soft); }
.chat-size-control button:disabled { color: #bbc2be; cursor: default; }

.messages {
  overflow-y: auto; padding: 24px clamp(18px, 5vw, 72px); scroll-behavior: smooth;
  background-color: var(--chat-canvas);
  background-image: radial-gradient(circle at 16px 16px, rgba(47,107,80,.035) 1px, transparent 1.2px);
  background-size: 48px 48px;
}
.message { display: flex; align-items: flex-end; margin-bottom: 12px; animation: rise .18s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.message.history-message { animation: none; }
.bubble {
  position: relative; max-width: min(720px, 80%); padding: 13px 17px 10px; color: #171a18;
  font-size: var(--chat-text-size); line-height: 1.48; white-space: pre-wrap; box-shadow: 0 1px 2px rgba(31, 38, 34, .09);
}
.bubble p { margin: 0 0 8px; }
.message-time { float: right; margin: .75em 0 0 .9em; color: #7c837f; font-size: 9px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.user-message { justify-content: flex-end; }
.user-message .bubble { border-radius: 22px 22px 6px 22px; background: var(--mint); color: #17231b; }
.user-message .message-time { color: #65806d; }
.guide-message .bubble { border-radius: 22px 22px 22px 6px; background: var(--surface); white-space: normal; }
.user-message .bubble::after, .guide-message .bubble::before { display: none; }
.guide-message .bubble > :first-child { margin-top: 0; }
.guide-message .bubble > :nth-last-child(2) { margin-bottom: 0; }
.guide-message .bubble > :last-child:not(.message-time) { margin-bottom: 0; }
.guide-message .bubble h1, .guide-message .bubble h2, .guide-message .bubble h3, .guide-message .bubble h4 { margin: 14px 0 7px; color: #111412; font-family: inherit; line-height: 1.24; }
.guide-message .bubble h1 { font-size: 1.28em; }
.guide-message .bubble h2 { font-size: 1.19em; }
.guide-message .bubble h3 { font-size: 1.1em; }
.guide-message .bubble ul, .guide-message .bubble ol { margin: 7px 0 9px; padding-left: 1.45em; }
.guide-message .bubble li { margin: 3px 0; }
.guide-message .bubble blockquote { margin: 9px 0; padding: 7px 12px; border-left: 3px solid var(--brand); background: #f2f6f3; color: #4e5752; }
.guide-message .bubble blockquote p { margin: 0; }
.guide-message .bubble a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.guide-message .bubble code { padding: 2px 5px; border-radius: 5px; background: #edf0ee; font-size: .88em; }
.guide-message .bubble pre { overflow-x: auto; padding: 10px 12px; border-radius: 10px; background: #202723; color: #f5f7f6; }
.guide-message .bubble pre code { padding: 0; background: transparent; color: inherit; }
.guide-message .bubble hr { border: 0; border-top: 1px solid var(--line); margin: 13px 0; }
.guide-message .bubble table { width: 100%; margin: 9px 0; border-collapse: collapse; font-size: .92em; }
.guide-message .bubble th, .guide-message .bubble td { padding: 6px 8px; border: 1px solid var(--line); text-align: left; }
.guide-message .bubble th { background: #f2f5f3; }
.typing .bubble { color: var(--muted); font-style: italic; }
.error-message .bubble { border: 1px solid #efc8c3; background: #fff4f2; color: #8e392f; }

.quick-prompts { display: flex; gap: 7px; padding: 8px clamp(16px, 4vw, 54px); overflow-x: auto; background: var(--chat-canvas); }
.quick-prompts button { flex: 0 0 auto; border: 1px solid #dfe3e1; border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.92); color: var(--brand-dark); font-size: 10px; font-weight: 700; }
.quick-prompts button:hover { border-color: #abc5b7; background: var(--brand-soft); }
.composer { display: flex; align-items: flex-end; gap: 9px; padding: 10px 16px 8px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea {
  width: 100%; min-height: 46px; max-height: 150px; resize: none; border: 1px solid #eceeee; outline: 0;
  padding: 12px 16px; border-radius: 23px; background: var(--surface-soft); color: var(--ink);
  font-size: var(--chat-text-size); line-height: 1.42;
}
.composer textarea:focus, .composer textarea:focus-visible {
  border-color: #b5cbbf; background: var(--surface); outline: 0; box-shadow: none;
}
.composer textarea::placeholder { color: #a2a7a5; }
.composer button {
  width: 46px; height: 46px; min-height: 46px; flex: 0 0 46px; display: grid; place-items: center;
  border: 0; border-radius: 50%; padding: 0; background: var(--brand); color: white; font-size: 16px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(47,107,80,.2);
}
.composer button span:first-child { display: none; }
.composer button:hover { background: var(--brand-dark); }
.composer button:disabled { opacity: .5; cursor: wait; }
.disclaimer { margin: 0; padding: 0 8px 7px; text-align: center; background: var(--surface); color: #9a9f9c; font-size: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

@media (min-width: 801px) {
  .sidebar-toggle { display: none; }
  .shell.sidebar-collapsed .sidebar-toggle { display: grid; }
  .sidebar-toggle-expand { display: inline; }
  .sidebar-toggle-menu { display: none; }
  .shell { transition: grid-template-columns .18s ease; }
  .sidebar { transition: transform .18s ease, opacity .18s ease; }
  .shell.sidebar-resizing, .shell.sidebar-resizing .sidebar { transition: none; }
  .shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
  .shell.sidebar-collapsed .sidebar { transform: translateX(-100%); opacity: 0; visibility: hidden; }
  .shell.sidebar-collapsed .sidebar-resizer { display: none; }
}

@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(330px, 88vw); z-index: 50;
    padding: 20px 18px; transform: translateX(-104%); transition: transform .22s ease; box-shadow: 12px 0 36px rgba(20,28,24,.16);
  }
  .shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-resizer { display: none; }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: 40; border: 0; padding: 0;
    background: rgba(12,18,15,.32); opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .shell.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .thread-list { max-height: none; }
  .chat-panel { height: 100vh; height: 100dvh; }
  .chat-header { min-height: 70px; padding: 9px 12px; gap: 8px; }
  .chat-identity { gap: 8px; }
  .chat-avatar { width: 38px; height: 38px; }
  .chat-header h2 { font-size: 15px; }
  .connection { max-width: 138px; font-size: 9px; }
  .chat-size-control { border-radius: 10px; }
  .chat-size-control button { height: 36px; }
  .chat-size-control button:not(.chat-size-value) { width: 30px; }
  .chat-size-control .chat-size-value { width: 38px; font-size: 9px; }
  .messages { padding: 15px 12px; }
  .message { margin-bottom: 9px; }
  .bubble { max-width: 92%; padding: 11px 14px 9px; }
  .quick-prompts { padding: 7px 10px; }
  .composer { padding: 8px 10px 7px; }
  .composer textarea { min-height: 44px; padding: 11px 14px; }
  .composer button { width: 44px; height: 44px; min-height: 44px; flex-basis: 44px; }
}

@media (max-width: 360px) {
  .chat-avatar { display: none; }
  .connection { max-width: 108px; }
  .chat-size-control .chat-size-value { width: 34px; }
}

/* Application-owned Claim Your Power journey */
.workspace {
  min-width: 0; height: 100vh; height: 100dvh; display: grid;
  grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: #f4f5f2;
}
.view-nav { display: grid; gap: 7px; }
.view-nav-button {
  width: 100%; min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px;
  border: 1px solid transparent; border-radius: 13px; padding: 9px 10px; background: transparent; color: #464e49; text-align: left;
}
.view-nav-button > span:first-child {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px;
  background: var(--surface-soft); color: var(--brand); font-size: 11px; font-weight: 850;
}
.view-nav-button > span:last-child { min-width: 0; display: grid; gap: 2px; }
.view-nav-button strong { font-size: 12px; }
.view-nav-button small { color: var(--muted); font-size: 9px; }
.view-nav-button:hover { border-color: #d9e3dd; background: #f7faf8; }
.view-nav-button.active { border-color: #c9ddd1; background: var(--brand-soft); color: var(--brand-dark); }
.view-nav-button.active > span:first-child { background: var(--brand); color: white; }
.journey-card { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.status-pill { border-radius: 999px; padding: 5px 8px; background: var(--brand-soft); color: var(--brand-dark); font-size: 8px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.journey-summary-row { display: flex; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 11px; }
.progress-track { height: 7px; overflow: hidden; margin-top: 8px; border-radius: 999px; background: #dde4e0; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width .25s ease; }
.resume-button { width: 100%; margin-top: 12px; border: 0; border-radius: 10px; padding: 9px 11px; background: var(--brand); color: white; font-size: 10px; font-weight: 750; }
.resume-button:hover { background: var(--brand-dark); }

.journey-view { min-height: 0; overflow-y: auto; padding: clamp(18px, 3vw, 38px); scrollbar-gutter: stable; }
.journey-intro { max-width: 1180px; margin: 0 auto 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.journey-intro h2 { color: #172019; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.journey-intro p:not(.eyebrow) { max-width: 650px; margin: 9px 0 0; color: #65706a; font-size: 13px; line-height: 1.55; }
.journey-intro-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.primary-button, .secondary-button { min-height: 40px; border-radius: 11px; padding: 9px 14px; font-size: 11px; font-weight: 780; }
.primary-button { border: 1px solid var(--brand); background: var(--brand); color: white; }
.primary-button:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.secondary-button { border: 1px solid #c9d8d0; background: white; color: var(--brand-dark); }
.secondary-button:hover { border-color: #a9c1b4; background: var(--brand-soft); }
.storage-notice { max-width: 1180px; margin: 0 auto 17px; padding: 9px 12px; border: 1px solid #d9e5dd; border-radius: 11px; background: #f3f8f5; color: #53635a; font-size: 10px; }
.storage-notice.warning { border-color: #e5cfb3; background: #fff9f0; color: #74552f; }
.journey-layout { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(224px, 270px) minmax(0, 1fr); align-items: start; gap: 18px; }
.day-navigator { display: grid; gap: 10px; }
.part-group { padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.86); box-shadow: 0 5px 18px rgba(30,47,37,.035); }
.part-group-header { display: grid; gap: 3px; margin-bottom: 9px; }
.part-group-header strong { color: #273029; font-size: 11px; }
.part-group-header small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.day-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.day-button { aspect-ratio: 1; min-width: 0; border: 1px solid #e1e6e3; border-radius: 9px; background: #f8f9f8; color: #58615d; font-size: 10px; font-weight: 750; }
.day-button:hover { border-color: #a9c1b4; background: var(--brand-soft); color: var(--brand-dark); }
.day-button.in-progress { border-color: #9db9aa; background: #edf5f0; color: var(--brand-dark); }
.day-button.complete { border-color: var(--brand); background: var(--brand); color: white; }
.day-button.selected { box-shadow: 0 0 0 3px rgba(47,107,80,.16); }
.day-card { overflow: hidden; border: 1px solid #dde3df; border-radius: 22px; background: white; box-shadow: var(--shadow); }
.day-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.day-card-header h2 { display: inline; margin-right: 9px; color: #172019; font-size: 25px; letter-spacing: -.035em; }
.day-status { display: inline-block; vertical-align: 4px; border-radius: 999px; padding: 5px 8px; font-size: 8px; font-weight: 820; letter-spacing: .035em; text-transform: uppercase; }
.day-status.not-started { background: #f0f2f1; color: #6f7773; }
.day-status.in-progress { background: var(--brand-soft); color: var(--brand-dark); }
.day-status.complete { background: var(--brand); color: white; }
.day-step-actions { display: flex; gap: 6px; }
.day-step-actions button { min-height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface-soft); color: #5b645f; font-size: 10px; font-weight: 700; }
.day-step-actions button:hover:not(:disabled) { border-color: #b8cbc0; background: var(--brand-soft); color: var(--brand-dark); }
.day-step-actions button:disabled { opacity: .42; cursor: default; }
.source-card, .theme-card { margin: 18px 24px 0; border-radius: 14px; padding: 15px 17px; }
.source-card { border: 1px solid #dde3df; background: #fafbf9; }
.theme-card { border-left: 3px solid var(--brand); background: #f1f7f3; }
.field-label { margin: 0; color: var(--brand); font-size: 8px; font-weight: 830; letter-spacing: .09em; text-transform: uppercase; }
.source-card h3, .theme-card h3 { margin: 6px 0 8px; color: #222a25; font-size: 15px; line-height: 1.38; }
.source-card > p:last-child, .theme-card > p:last-child { margin: 0; color: #68716c; font-size: 10px; line-height: 1.45; }
.source-card .field-label { margin-right: 5px; }
.reflection-fields { display: grid; gap: 9px; padding: 21px 24px 8px; }
.reflection-fields label { display: grid; gap: 4px; }
.reflection-fields label span { color: #29312c; font-size: 12px; font-weight: 800; }
.reflection-fields label small { color: #6e7772; font-size: 10px; line-height: 1.45; }
.reflection-fields textarea { width: 100%; resize: vertical; border: 1px solid #dfe5e1; border-radius: 13px; padding: 12px 13px; background: #fbfcfb; color: var(--ink); font-size: 12px; line-height: 1.55; }
.reflection-fields textarea:focus { border-color: #a9c1b4; outline: 0; box-shadow: 0 0 0 3px rgba(47,107,80,.1); background: white; }
.local-privacy { margin: 4px 24px 17px; color: #77807b; font-size: 9px; line-height: 1.45; }
.day-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 16px 24px 22px; border-top: 1px solid var(--line); }
.day-card-footer > div:first-child { display: grid; justify-items: start; gap: 5px; }
.day-card-footer small { color: var(--muted); font-size: 8px; }
.completion-actions { display: flex; flex: 0 0 auto; gap: 7px; }

.chat-view { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; background: var(--chat-canvas); }
.chat-view[hidden] { display: none; }
.privacy-copy { flex: 0 0 auto; }

@media (max-width: 980px) {
  .journey-layout { grid-template-columns: 1fr; }
  .day-navigator { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .workspace { height: 100vh; height: 100dvh; }
  .journey-view { padding: 17px 12px 28px; }
  .journey-intro { align-items: stretch; flex-direction: column; gap: 13px; }
  .journey-intro-actions { width: 100%; }
  .journey-intro-actions button { flex: 1; }
  .day-navigator { grid-template-columns: 1fr; }
  .part-group { padding: 11px; }
  .day-grid { grid-template-columns: repeat(10, minmax(31px, 1fr)); overflow-x: auto; padding: 3px 3px 8px; }
  .day-button { min-width: 31px; }
  .day-card { border-radius: 17px; }
  .day-card-header { align-items: stretch; flex-direction: column; padding: 17px 16px 14px; }
  .day-step-actions button { flex: 1; }
  .source-card, .theme-card { margin: 14px 15px 0; padding: 13px 14px; }
  .reflection-fields { padding: 17px 15px 7px; }
  .local-privacy { margin: 4px 15px 14px; }
  .day-card-footer { align-items: stretch; flex-direction: column; padding: 14px 15px 18px; }
  .day-card-footer > div:first-child, .day-card-footer button { width: 100%; }
  .completion-actions { width: 100%; }
  .completion-actions button { flex: 1; }
}

@media (max-width: 480px) {
  .chat-header { min-height: 66px; }
  .journey-intro h2 { font-size: 28px; }
  .day-card-header h2 { font-size: 22px; }
  .connection { max-width: 145px; }
}
