:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --sidebar: #fafafa;
  --hair: rgba(0, 0, 0, .10);
  --hair-soft: rgba(0, 0, 0, .06);
  --hair-firm: rgba(0, 0, 0, .20);
  --ink: #0a0a0a;
  --ink-2: #3c3c3c;
  --ink-3: #6e6e6e;
  --ink-4: #9a9a9a;
  --ink-5: #c4c4c4;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: #ffffff; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif; font-weight: 400; -webkit-font-smoothing: antialiased; }
body, p, li { text-wrap: pretty; }
button, input, textarea, select { font: inherit; }
button, a, summary, input, textarea, select { transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease), transform 160ms var(--ease); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { position: fixed; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 22px; border-bottom: 1px solid var(--hair); background: #ffffff; }
.topbar-leading, .brand, .topbar-actions { display: flex; align-items: center; }
.topbar-actions { position: relative; gap: 12px; }
.topbar-leading { gap: 8px; }
.brand, h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif; }
.brand { gap: 9px; color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -.015em; text-decoration: none; }
.brand-mark { display: none; width: 22px; height: 22px; border-radius: 6px; color: #ffffff; background: var(--ink); font-size: 12px; font-weight: 700; place-items: center; }
.mobile-menu-button { display: none; }
.founder-shell { min-height: 100vh; padding-top: 58px; background: #ffffff; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(24px, 3vw, 34px); font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
h2 { margin-bottom: 8px; font-size: clamp(21px, 2.6vw, 29px); font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
h3 { margin-bottom: 8px; font-size: 14px; font-weight: 600; line-height: 1.35; }
p { color: var(--ink-2); font-size: 14px; line-height: 1.58; }
.muted { color: var(--ink-3); }
.eyebrow, .status-word, .identity, .history-group-heading span, .sidebar-heading span, .lifecycle small, .event time, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.eyebrow { margin-bottom: 7px; color: var(--ink-4); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.identity, .card-title-row { display: flex; align-items: center; gap: 9px; }
.identity { color: var(--ink-3); font-size: 11px; }

.status-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border: 1px solid var(--ink-5); border-radius: 50%; background: transparent; }
.status-dot.current, .status-dot.completed { border-color: var(--ink-5); background: var(--ink-5); }
.status-dot.running { border: 1.5px solid var(--ink); border-top-color: transparent; background: transparent; animation: spin 1s linear infinite; }
.status-dot.needs-you { border-color: var(--ink); background: var(--ink); animation: pulse-dot 1.6s ease-in-out infinite; }
.status-dot.blocked { border-color: var(--ink); border-radius: 2px; background: var(--ink); }
.status-word { display: inline-flex; width: fit-content; color: var(--ink-3); font-size: 9px; letter-spacing: .09em; line-height: 1.4; text-transform: uppercase; }
.status-word.needs-you, .status-word.attention, .status-word.running, .status-word.blocked { color: var(--ink); }
.status-word.completed { color: var(--ink-3); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 50% { opacity: .35; } }

button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border: 1px solid var(--hair); border-radius: 999px; color: var(--ink-2); background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; }
button:not(:disabled):active { transform: scale(.98); }
button:hover { border-color: var(--hair-firm); color: var(--ink); }
button:disabled { cursor: not-allowed; opacity: .48; }
.primary-button { border-color: var(--ink); color: #ffffff; background: var(--ink); }
.primary-button:hover { color: #ffffff; background: #000000; }
.ghost-button { border-color: transparent; color: var(--ink-3); }
.notification-button { position: relative; width: 34px; min-height: 34px; padding: 0; border: 0; font-size: 20px; }
.notification-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.notification-button span { position: absolute; top: -3px; right: -5px; display: grid; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; color: #fff; background: var(--ink); font-size: 9px; place-items: center; }
.notification-menu { position: absolute; z-index: 40; top: 44px; right: 0; width: min(380px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 80px)); overflow-y: auto; padding: 10px; border: 1px solid var(--hair); border-radius: 14px; background: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.10); }
.notification-heading { display: flex; justify-content: space-between; padding: 9px 10px 12px; border-bottom: 1px solid var(--hair-soft); font-size: 12px; }
.notification-item { display: grid; width: 100%; gap: 4px; min-height: 0; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--hair-soft); border-radius: 0; text-align: left; }
.notification-item strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.notification-item small { color: var(--ink-3); font-size: 10px; }
.notification-group-label { margin: 11px 10px 4px; color: var(--ink-4); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }

.workspace { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: calc(100vh - 58px); background: #ffffff; }
.workspace-sidebar { position: sticky; top: 58px; align-self: start; height: calc(100vh - 58px); overflow-y: auto; padding: 20px 14px 24px; border-right: 1px solid var(--hair); background: var(--sidebar); }
.mobile-drawer-heading { display: none; }
.sidebar-project { display: grid; gap: 8px; padding: 0 6px 18px; }
.project-navigation-heading { margin-bottom: 2px; }
.project-list { display: grid; gap: 18px; }
.project-nav-group { display: grid; gap: 3px; }
.project-nav-group-heading { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 4px 7px; border: 0; border-radius: 7px; color: var(--ink-4); background: transparent; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 9px; letter-spacing: .13em; text-align: left; text-transform: uppercase; }
.project-nav-group.selected .project-nav-group-heading { color: var(--ink); }
.project-conversations { display: grid; gap: 1px; }
.project-conversation { display: grid; grid-template-columns: 8px minmax(0,1fr); align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 5px 7px; border: 0; border-radius: 7px; color: var(--ink-2); background: transparent; font-size: 11.5px; font-weight: 400; text-align: left; }
.project-conversation:hover, .project-conversation.selected { background: rgba(0,0,0,.045); }
.project-conversation span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-nav-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 9px 10px; border: 0; border-radius: 9px; color: var(--ink-2); background: transparent; font-size: 13px; font-weight: 400; text-align: left; }
.project-nav-item:hover { border-color: transparent; background: rgba(0,0,0,.04); }
.project-nav-item.selected { color: var(--ink); background: rgba(0,0,0,.06); font-weight: 600; }
.project-nav-item .project-nav-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-nav-item .project-nav-arrow { color: var(--ink-5); font-size: 14px; font-weight: 400; }
.sidebar-new { width: 100%; }
.mobile-menu-backdrop { display: none; }
.sidebar-section { padding: 18px 6px; border-top: 1px solid var(--hair); }
.sidebar-heading, .history-group-heading, .card-row, .ribbon-heading, .delivery-heading, .conversation-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sidebar-heading { align-items: center; margin-bottom: 10px; }
.sidebar-heading h2 { margin: 0; font-size: 13px; }
.sidebar-heading span, .history-group-heading span { color: var(--ink-4); font-size: 9px; }
.history-group + .history-group, .audit-history { margin-top: 16px; }
.history-group-heading { align-items: center; margin-bottom: 7px; }
.history-group-heading h3 { margin: 0; color: var(--ink-3); font-size: 11px; text-transform: uppercase; }
.history-list { display: grid; gap: 5px; }
.history-item { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; width: 100%; min-height: 0; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; }
.history-item:hover, .history-item.selected { border-color: var(--hair); background: #ffffff; }
.history-copy, .history-state { min-width: 0; }
.history-copy strong, .history-copy small, .history-state strong, .history-state small { display: block; }
.history-copy strong { margin-bottom: 3px; overflow: hidden; font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.history-copy small { display: -webkit-box; overflow: hidden; color: var(--ink-3); font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.history-state { display: flex; justify-content: space-between; gap: 8px; text-align: left; }
.history-state strong, .history-state small { color: var(--ink-4); font-size: 8.5px; text-transform: uppercase; }
.history-item.tone-running .history-state strong, .history-item.tone-needs-you .history-state strong { color: var(--ink); }
.history-item.delivered .history-state strong { color: var(--ink-3); }
.audit-history { padding-top: 12px; border-top: 1px solid var(--hair); }
.audit-history summary { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 11px; cursor: pointer; }
.secondary-history { margin-top: 8px; opacity: .8; }
.empty-state.compact { min-height: 0; padding: 12px; border: 1px dashed var(--hair); border-radius: 10px; text-align: center; }
.empty-state.compact p { margin: 0; color: var(--ink-4); font-size: 11px; }
.sidebar-project-state { display: none; }
.project-card { padding: 12px; border: 1px solid var(--hair); border-radius: 12px; background: #ffffff; }
.project-card h2 { margin: 0; font-size: 12px; }
.project-card p, .project-card > span { margin: 8px 0 0; font-size: 10.5px; line-height: 1.4; }

.conversation-workspace { width: min(1040px, 100%); min-width: 0; margin: 0 auto; padding: 22px clamp(20px, 5vw, 64px) 32px; background: #ffffff; }
.home-overview { min-height: calc(100vh - 112px); padding: 0 0 56px; background: #ffffff; }
.presence-hero, .quiet-divider { display: none; }
.home-welcome { display: flex; min-height: 330px; flex-direction: column; justify-content: center; padding: 62px 0 44px; }
.home-welcome h1 { margin-bottom: 24px; font-size: clamp(38px, 5vw, 52px); font-weight: 600; letter-spacing: -.045em; }
.home-summary { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--ink-3); font-size: clamp(17px, 2vw, 21px); line-height: 1.35; }
.home-needs-badge { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 15px; border-radius: 999px; color: #ffffff; background: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.home-needs-badge.all-clear { color: var(--ink-3); background: var(--hair-soft); }
.home-group { margin-top: 34px; }
.home-group-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--hair); }
.home-group-heading h2,
.home-group-heading span { margin: 0; color: var(--ink-4); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 10px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
.home-list { display: grid; }
.home-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; min-height: 78px; padding: 14px 7px; border: 0; border-bottom: 1px solid var(--hair-soft); border-radius: 0; background: #ffffff; text-align: left; }
.home-row:hover { border-color: var(--hair); background: #ffffff; }
.home-row-copy { min-width: 0; }
.home-project-tag { display: block; margin-bottom: 5px; overflow: hidden; color: var(--ink-4); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 9px; font-weight: 400; letter-spacing: .13em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.home-row-title { display: block; overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.home-row-status { display: flex; align-items: center; gap: 12px; color: var(--ink-4); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.home-row-status::after { content: '›'; color: var(--ink-5); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif; font-size: 17px; font-weight: 400; }
.home-empty { padding: 34px 0; border-top: 1px solid var(--hair); }
.home-empty p { margin: 0; color: var(--ink-3); }
.home-new-discussion { position: fixed; z-index: 6; bottom: 22px; left: calc(310px + (100vw - 310px) / 2); display: flex; width: min(680px, calc(100vw - 390px)); min-height: 56px; margin: 0; box-shadow: 0 14px 34px rgba(0,0,0,.12); font-size: 14px; transform: translateX(-50%); }
.show-more { min-height: 34px; margin-top: 12px; padding: 7px 0; border: 0; border-radius: 0; color: var(--ink-3); font-size: 11px; }
#statusPanel > .plan-details { display: none; }
#approval { display: none !important; }
#understanding { display: none !important; }
.presence-hero { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; min-height: 92px; padding: 8px 2px 18px; }
.presence-copy { min-width: 0; }
.presence-copy h1 { margin-bottom: 3px; font-size: 18px; }
.hero-sentence { margin: 0; font-size: 12.5px; }
.presence-hint { margin: 2px 0 0; color: var(--ink-4); font-size: 9px; font-style: normal; }
.quiet-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.quiet-divider span { flex: 1; height: 1px; background: var(--hair); }
.quiet-divider p { margin: 0; color: var(--ink-4); font-size: 9px; text-transform: uppercase; }
.conversation-workspace > .presence-hero,
.conversation-workspace > .quiet-divider { display: none !important; }

.detail-panel { min-width: 0; }
.conversation-panel { display: flex; min-height: calc(100vh - 190px); flex-direction: column; background: #ffffff; }
.conversation-header { align-items: flex-start; padding: 22px 0 18px; border-bottom: 1px solid var(--hair); background: #ffffff; }
.work-order-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.danger-button { color: var(--ink); border-color: var(--hair-firm); }
.conversation-header .eyebrow, #draftChangeSummary { display: none; }
.conversation-header h2 { max-width: 720px; margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.conversation-header p { margin-bottom: 0; }
.conversation-thread { display: flex; flex: 1; flex-direction: column; gap: 18px; padding: 28px 0; background: #ffffff; }
.conversation-history { display: contents; }
.message-row { display: flex; width: 100%; }
.founder-message { justify-content: flex-end; }
.homelander-message { justify-content: flex-start; }
.message-bubble { max-width: min(680px, 88%); padding: 14px 16px; border-radius: 16px; background: #ffffff; }
.homelander-message .message-bubble:not(.decision-card):not(.failure-card):not(.delivery-card) { padding: 0; border-radius: 0; background: transparent; }
.founder-message .message-bubble { color: #ffffff; border-radius: 16px 16px 4px 16px; background: var(--ink); }
.message-bubble p { margin-bottom: 8px; white-space: pre-line; }
.message-bubble h3 { margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.message-bubble p:last-child { margin-bottom: 0; }
.founder-message .message-bubble p { color: #ffffff; }
.message-meta { display: block; margin-top: 7px; color: var(--ink-4); font-size: 9px; }
.founder-message .message-meta { color: rgba(255,255,255,.55); }
.message-sources { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 2px; }
.message-sources a { color: var(--ink); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.thinking-row { display: flex; align-items: center; gap: 5px; width: fit-content; padding: 10px 0; background: #ffffff; }
.thinking-row span { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: typing 1.2s ease-in-out infinite; }
.thinking-row span:nth-child(2) { animation-delay: .18s; }
.thinking-row span:nth-child(3) { animation-delay: .36s; }
.thinking-row em { margin-left: 5px; color: var(--ink-4); font-size: 11px; font-style: normal; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.conversation-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 0; border-top: 1px solid var(--hair); }
.conversation-composer { position: sticky; bottom: 12px; z-index: 2; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; margin-top: 14px; padding: 8px; border: 1px solid var(--hair-firm); border-radius: 18px; background: #ffffff; }
.conversation-composer textarea { min-height: 42px; max-height: 180px; padding: 10px 12px; border: 0; background: transparent; resize: vertical; }
.conversation-composer button { min-width: 72px; }

.plan-details { margin: 14px 0; padding: 13px 15px; border: 1px solid var(--hair); border-radius: 13px; background: #ffffff; }
.plan-details > summary { color: var(--ink-3); font-size: 12px; font-weight: 500; cursor: pointer; }
.plan-details[open] > summary { margin-bottom: 10px; }
.progress-ribbon-card { padding: 16px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.ribbon-heading { align-items: center; }
.ribbon-heading .eyebrow { margin: 0; }
.lifecycle { display: grid; grid-template-columns: repeat(var(--stage-count, 6), minmax(0, 1fr)); gap: 5px; margin: 12px 0 0; padding: 0; list-style: none; }
.lifecycle li { display: grid; min-width: 0; gap: 7px; }
.lifecycle li > span { height: 4px; border-radius: 999px; background: var(--hair-soft); }
.lifecycle li.complete > span { background: var(--ink-3); }
.lifecycle li.active > span, .lifecycle li.failed > span { background: var(--ink); }
.lifecycle small { overflow: hidden; color: var(--ink-3); font-size: 8px; text-overflow: ellipsis; text-transform: uppercase; }
.proposal-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.proposal-section { padding: 14px; border: 1px solid var(--hair); border-radius: 11px; background: #ffffff; }
.proposal-section h3 { margin: 0 0 7px; font-size: 12px; }
.proposal-section p, .proposal-section li { color: var(--ink-3); font-size: 11px; line-height: 1.5; }
.proposal-section p:last-child, .proposal-section ul:last-child { margin-bottom: 0; }
.proposal-section ul { margin: 0; padding-left: 16px; }
.decision-card, .failure-card, .delivery-card, .activity-card { margin-top: 14px; padding: 16px; border: 1px solid var(--hair); border-radius: 12px; background: #ffffff; }
.message-bubble.decision-card, .message-bubble.failure-card, .message-bubble.delivery-card { margin-top: 0; }
.decision-card { border-color: var(--ink); }
.failure-card { border-style: dashed; border-color: var(--ink-3); }
.delivery-card { border-color: var(--hair-firm); }
.activity-card > .eyebrow { margin-bottom: 0; }
.event { display: grid; grid-template-columns: 66px minmax(0,1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--hair); color: var(--ink-3); font-size: 11px; }
.event:first-child { margin-top: 9px; }
.event time { color: var(--ink-4); font-size: 8px; }
.mode-summary { margin: 12px 0 0; padding: 10px 12px; border-left: 2px solid var(--ink); background: #ffffff; }
.delivery-heading { align-items: flex-start; }
.delivery-grid { margin: 14px 0 0; }
.delivery-grid > div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
.delivery-grid dt { color: var(--ink-4); font-size: 9px; }
.delivery-grid dd { min-width: 0; margin: 0; color: var(--ink-2); font-size: 11px; overflow-wrap: anywhere; }
.delivery-grid a { color: var(--ink); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.preline { white-space: pre-line; }

.start-work-section { min-height: calc(100vh - 112px); padding: 44px 0; }
.conversation-workspace.new-discussion-mode .presence-hero,
.conversation-workspace.new-discussion-mode .quiet-divider { display: none; }
.secondary-home { width: min(680px, 100%); margin: 0 auto; padding: 0; background: #ffffff; }
.new-discussion-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--hair-soft); }
.new-discussion-header h2 { margin: 0; font-size: 18px; }
.new-discussion-header .eyebrow { margin-bottom: 4px; }
.request-form, .response-form, .login-form { display: grid; gap: 11px; }
.request-form { padding-top: 14px; border-top: 1px solid var(--hair); }
.request-heading h2 { font-size: 27px; font-weight: 600; }
label { display: grid; gap: 6px; color: var(--ink-3); font-size: 11px; font-weight: 500; }
textarea, select, input { width: 100%; min-height: 42px; padding: 11px 13px; border: 1px solid var(--hair); border-radius: 11px; color: var(--ink); background: #ffffff; outline: none; }
textarea { min-height: 104px; resize: vertical; }
textarea:focus, select:focus, input:focus { border-color: var(--ink); background: #ffffff; }
.request-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.request-notice { min-height: 18px; margin: 0; color: var(--ink-3); font-size: 10px; }
.attachment-input { display: grid; gap: 8px; }
.attachment-button { display: inline-flex; width: fit-content; min-height: 36px; align-items: center; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 10px; color: var(--ink-2); background: #ffffff; cursor: pointer; }
.attachment-button input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; pointer-events: none; }
.attachment-help { margin: 0; color: var(--ink-4); font-size: 10px; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 7px; }
.attachment-chip { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--hair); border-radius: 9px; color: var(--ink-2); background: #ffffff; font-size: 10px; }
.attachment-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip button { min-height: 20px; padding: 0 3px; border: 0; color: var(--ink-3); background: transparent; font-size: 15px; }
.conversation-attachments { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: -10px; }
.conversation-attachments a { color: var(--ink-2); text-decoration: none; }

.login-shell { display: grid; min-height: calc(100vh - 58px); padding: 40px 20px; background: #ffffff; place-items: center; }
.login-card { width: min(460px, 100%); padding: 34px; border: 1px solid var(--hair); border-radius: 20px; background: #ffffff; text-align: center; }
.login-card h1 { font-size: 31px; }
.login-mark { display: grid; width: 38px; height: 38px; margin: 0 auto 18px; border-radius: 9px; color: #ffffff; background: var(--ink); font-size: 18px; font-weight: 700; place-items: center; }
.login-form { margin-top: 22px; text-align: left; }
.login-form button { width: 100%; }
.error { min-height: 20px; margin: 10px 0 0; color: var(--ink); font-size: 12px; }

@media (max-width: 820px) {
  .topbar { height: 54px; padding: 0 15px; }
  .mobile-menu-button { display: flex; width: 34px; min-height: 34px; padding: 0; flex: 0 0 34px; flex-direction: column; gap: 4px; border: 0; border-radius: 9px; }
  .mobile-menu-button span { width: 16px; height: 1.5px; border-radius: 2px; background: var(--ink); }
  .mobile-menu-button span:last-child { width: 10px; margin-left: -6px; }
  .brand-mark { display: grid; }
  .brand { font-size: 14px; }
  .identity { font-size: 9px; }
  .founder-shell { padding-top: 54px; }
  .workspace { display: block; }
  body.mobile-menu-open { overflow: hidden; }
  .workspace-sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; display: block; width: min(300px, 84vw); height: 100dvh; padding: 20px 14px 28px; border-right: 1px solid var(--hair); overflow-y: auto; transform: translateX(-102%); transition: transform 180ms var(--ease); }
  .workspace-sidebar.mobile-browse-open { transform: translateX(0); }
  .mobile-drawer-heading { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; }
  .drawer-mark { display: grid; width: 22px; height: 22px; border-radius: 6px; color: #ffffff; background: var(--ink); font-size: 12px; font-weight: 700; place-items: center; }
  .mobile-drawer-heading strong { font-size: 14px; font-weight: 600; }
  .drawer-close { width: 30px; min-height: 30px; margin-left: auto; padding: 0; border: 0; border-radius: 8px; color: var(--ink-3); font-size: 18px; font-weight: 400; }
  .mobile-menu-backdrop { position: fixed; z-index: 20; inset: 0; display: block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: rgba(0,0,0,.32); }
  .sidebar-section { padding: 15px 6px; }
  .conversation-workspace { padding: 14px 16px 24px; }
  .home-overview { min-height: calc(100dvh - 72px); padding-bottom: 26px; }
  .home-welcome { min-height: 270px; padding: 46px 2px 34px; }
  .home-welcome h1 { margin-bottom: 18px; font-size: clamp(34px, 11vw, 46px); }
  .home-summary { align-items: flex-start; flex-direction: column; gap: 10px; font-size: 16px; }
  .home-needs-badge { min-height: 34px; padding: 7px 13px; font-size: 12px; }
  .home-new-discussion { right: 14px; bottom: 14px; left: 14px; width: auto; min-height: 52px; transform: none; }
  .home-group { margin-top: 26px; }
  .home-row { grid-template-columns: 9px minmax(0, 1fr); gap: 13px; min-height: 76px; padding: 13px 2px; }
  .home-row-status { grid-column: 2; justify-content: space-between; margin-top: -8px; }
  .presence-hero { grid-template-columns: minmax(0,1fr); }
  .presence-hero > button { display: none; }
  .conversation-panel { min-height: auto; }
  .conversation-header { display: grid; }
  .work-order-controls { justify-content: space-between; }
  .message-bubble { max-width: 92%; }
  .proposal-grid { grid-template-columns: minmax(0,1fr); }
  .delivery-grid > div { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .start-work-section { min-height: calc(100vh - 82px); padding: 28px 0; }
}

@media (max-width: 430px) {
  .conversation-workspace { padding-inline: 12px; }
  .presence-hero { gap: 11px; }
  .presence-copy h1 { font-size: 16px; }
  .message-bubble { max-width: 96%; }
  .conversation-composer { bottom: 7px; }
  .conversation-actions button { flex: 1 1 auto; }
  .lifecycle small { font-size: 7px; }
}

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