:root {
  color-scheme: light;
  --paper: #f5f4e9;
  --white: #fffef8;
  --ink: #20231c;
  --muted: #53594d;
  --line: #d0d0bf;
  --citron: #d9ed74;
  --olive: #252c20;
  --focus: #526027;
  --error: #9b3025;
  --gutter: clamp(18px, 5vw, 72px);
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
:where(input,textarea,select) { display: block; width: 100%; min-width: 0; min-height: 44px; border: 1px solid #aaa996; border-radius: 5px; padding: 10px 11px; background: var(--white); color: var(--ink); }
textarea { resize: vertical; line-height: 1.5; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
label { display: block; margin-bottom: 5px; font-size: .9rem; font-weight: 650; }
.skip { position: absolute; z-index: 2; top: -60px; left: 18px; background: var(--white); padding: 10px; }
.skip:focus { top: 12px; }
.site-header, main { width: min(calc(100% - 2 * var(--gutter)), 1376px); margin-inline: auto; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 27px); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 750; letter-spacing: -.04em; white-space: nowrap; }
.mark { display: grid; place-items: center; width: 31px; aspect-ratio: 1; border: 1px solid var(--ink); font-size: 18px; }
.text-link { border: 0; padding: 7px 0; color: inherit; background: transparent; font-weight: 650; font-size: .92rem; text-decoration: underline; text-underline-offset: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 10px 18px; border: 1px solid transparent; border-radius: 4px; background: var(--ink); color: var(--white); font-weight: 700; text-decoration: none; white-space: nowrap; }
.button:hover:not(:disabled) { background: #414939; }
.button.small { font-size: .88rem; min-height: 44px; }
.eyebrow { font-size: .76rem; font-weight: 735; text-transform: uppercase; letter-spacing: .095em; line-height: 1.5; }
.landing { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .82fr); gap: clamp(26px, 6vw, 120px); min-height: 70vh; align-items: center; padding: clamp(44px, 8vw, 115px) 0; }
.intro h1 { margin-block: 15px 22px; font: 720 clamp(60px, 8vw, 118px)/.87 "Helvetica Neue", Arial, sans-serif; letter-spacing: -.083em; }
.intro-copy { max-width: 460px; margin-bottom: 24px; color: var(--muted); font-size: clamp(1.08rem, 1.7vw, 1.45rem); line-height: 1.5; }
.playbook-preview { background: var(--olive); color: var(--white); padding: clamp(23px, 4vw, 49px); border-radius: 8px; }
.playbook-preview > .eyebrow { color: var(--citron); }
.playbook-preview h2 { font: 680 clamp(2rem, 3.4vw, 3.75rem)/1.02 "Helvetica Neue", Arial, sans-serif; margin-block: 12px 26px; letter-spacing: -.055em; }
.preview-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid #5b6453; }
.preview-row:last-child { padding-bottom: 0; }
.preview-row h3 { margin-bottom: 4px; font-size: 1.04rem; }
.preview-row p { color: #e3e8dc; font-size: .92rem; line-height: 1.5; }
.feature-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 5px; color: var(--olive); background: var(--citron); font-weight: 750; }
.workspace { max-width: 1120px; margin-inline: auto; padding: clamp(28px, 5vw, 64px) 0 55px; }
.workspace-heading, .workspace-identity { display: flex; align-items: center; gap: 17px; }
.workspace-heading { justify-content: space-between; margin-bottom: 21px; flex-wrap: wrap; }
.workspace-identity { min-width: 0; }
#workspace-initial { display: grid; place-items: center; flex: 0 0 56px; height: 56px; background: var(--citron); border-radius: 5px; font-size: 1.45rem; font-weight: 750; }
.workspace h1 { font: 700 clamp(2.1rem, 5vw, 4.5rem)/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: -.065em; }
.workspace-identity .eyebrow { margin-bottom: 3px; color: var(--muted); }
.life-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; width: fit-content; }
.life-tabs button { border: 0; border-radius: 4px; background: transparent; color: var(--ink); padding: 8px 12px; min-height: 42px; font-size: .91rem; font-weight: 650; }
.life-tabs [aria-pressed="true"] { background: var(--olive); color: var(--white); }
#account-name { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
#signout { flex-shrink: 0; }
.work-layout { display: grid; grid-template-columns: minmax(245px, .75fr) minmax(0, 1.85fr); align-items: start; gap: 18px; }
.tools { display: grid; gap: 18px; }
.card { padding: clamp(15px, 2vw, 24px); background: var(--white); border: 1px solid var(--line); border-radius: 7px; min-width: 0; }
.card h2 { font-size: 1.23rem; letter-spacing: -.035em; }
.playbooks { display: grid; gap: 8px; margin-top: 11px; }
.playbook { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 49px; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 9px 11px; background: var(--paper); color: var(--ink); text-align: start; font-weight: 650; font-size: .92rem; }
.playbook:hover { background: #eff3d9; }
.playbook span { color: var(--focus); }
#tasks { margin: 11px 0 15px; }
.task { display: grid; gap: 7px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; overflow-wrap: anywhere; }
.task select { min-height: 38px; padding: 6px 9px; font-size: .85rem; }
.task-input, .composer-actions { display: flex; align-items: center; gap: 8px; }
.composer-actions { justify-content: flex-end; }
.composer-actions > .feedback { flex: 1; }
.conversation-heading { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.conversation-heading p, .hint, .empty { color: var(--muted); font-size: .87rem; line-height: 1.45; }
.conversation-heading p { margin-top: 3px; }
.conversation > .empty { margin-top: 18px; }
.messages { display: grid; gap: 13px; margin: 12px 0 19px; }
.message { display: grid; gap: 7px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); overflow-wrap: anywhere; }
.message.assistant { background: #f3f5e6; }
.message h3 { font-size: .87rem; }
.message-copy { white-space: pre-wrap; font-size: .93rem; line-height: 1.52; }
#chat-form .hint { margin-block: 7px 12px; }
.feedback { font-size: .85rem; line-height: 1.45; color: var(--muted); }
.feedback:empty { display: none; }
#workspace-status:not(:empty), #task-status:not(:empty) { margin-block: 9px; }
.error { color: var(--error); }

dialog { width: min(94vw, 460px); max-height: 94dvh; border: 1px solid var(--line); border-radius: 9px; padding: clamp(22px, 5vw, 35px); color: var(--ink); background: var(--white); box-shadow: 0 30px 90px #20231c38; }
dialog::backdrop { background: #1b2016a1; }
dialog h2 { margin: 4px 30px 7px 0; font-size: clamp(1.7rem, 5.5vw, 2.35rem); line-height: 1.12; letter-spacing: -.05em; }
#auth-intro { color: var(--muted); font-size: .95rem; line-height: 1.4; margin-bottom: 20px; }
.close { position: absolute; right: 11px; top: 9px; width: 40px; height: 40px; border: 0; background: none; color: var(--ink); font-size: 1.7rem; line-height: 1; border-radius: 4px; }
.close:hover { background: var(--paper); }
#auth-form input { margin-bottom: 11px; }
#auth-form label > .hint { float: right; font-weight: 500; font-size: .77rem; }
.password-field { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
#auth-form .password-field input { margin: 0; }
#auth-submit { width: 100%; margin-top: 4px; }
#auth-error:not(:empty) { margin-bottom: 8px; }
.auth-switch { text-align: center; margin-top: 13px; color: var(--muted); font-size: .88rem; }

@media (max-width: 760px) {
  .landing, .work-layout { grid-template-columns: 1fr; }
  .intro h1 { font-size: clamp(53px, 11vw, 90px); }
  .tools { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
}

@media (max-width: 370px) {
  .site-header .button { padding-inline: 9px; }
  .wordmark { gap: 6px; font-size: .88rem; }
  .mark { width: 23px; }
}

#notes { margin-block: 11px; }
.note { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .86rem; overflow-wrap: anywhere; }
.note > p { margin-top: 6px; white-space: pre-wrap; }
summary { cursor: pointer; }
#note-form { display: grid; margin-top: 9px; gap: 5px; }
#note-form button { justify-self: start; margin-block: 6px; }

.selection { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: center; margin-top: 6px; }
.selection > span { background: #ecf1ce; color: var(--olive); padding: 4px 8px; border-radius: 4px; font-size: .85rem; font-weight: 650; }
.selection > button { font-size: .81rem; }

.opening-brief { margin-bottom: 19px; padding: clamp(17px, 2.65vw, 31px); border: 1px solid #bfc8a7; border-radius: 8px; background: #edf0dc; }
.opening-brief > h2 { margin-bottom: 12px; font-size: clamp(1.35rem, 2.25vw, 2.1rem); letter-spacing: -.045em; }
.brief-welcome { margin-bottom: 14px; color: var(--muted); line-height: 1.5; }
.proposal { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid #ccd2b7; border-radius: 6px; background: var(--white); }
.proposal h3 { font-size: clamp(1.2rem, 1.9vw, 1.5rem); letter-spacing: -.025em; }
.proposal-summary { font-size: 1.01rem; font-weight: 650; line-height: 1.5; }
.proposal-quotes { display: grid; gap: 7px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); padding: 0; margin: 0; list-style: none; }
.proposal-quotes li { padding: 9px 11px; border-left: 3px solid #a9b76f; background: #f1f3e7; font-size: .9rem; line-height: 1.45; }
.proposal-scope { color: var(--muted); font-size: .87rem; line-height: 1.5; }
.proposal-draft { padding: 7px 0; border-bottom: 1px solid var(--line); }
.proposal-draft summary, .brief-history summary { width: fit-content; font-size: .91rem; font-weight: 650; }
.proposal-draft-copy { max-width: 77ch; margin: 9px 0 6px; white-space: pre-wrap; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.proposal-actions { display: flex; align-items: center; gap: 8px 19px; flex-wrap: wrap; }
.proposal-actions > .button { white-space: normal; text-align: start; }
.proposal-edit { display: grid; gap: 8px; }
.proposal-edit > button, .proposal > button { justify-self: start; }
.decision-state { font-size: .92rem; font-weight: 650; }
.brief-history { margin-top: 13px; }
.brief-history > .proposal { margin-top: 9px; }
#brief-feedback:not(:empty) { margin-top: 9px; }

.quote-evidence { margin-top: 4px; }
.quote-evidence summary { width: fit-content; font-size: .8rem; color: var(--muted); }
.quote-evidence p { margin-top: 5px; white-space: pre-wrap; }

.work-navigation { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.work-navigation button { border: 0; border-bottom: 3px solid transparent; padding: 9px 12px; min-height: 44px; background: transparent; color: var(--muted); font-weight: 690; }
.work-navigation button[aria-pressed="true"] { border-color: var(--focus); color: var(--ink); }
.work-view { display: grid; gap: 16px; }
.work-view-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; column-gap: 22px; row-gap: 4px; }
.work-view-heading h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.055em; }
.work-view-heading h3 { font-size: 1.28rem; letter-spacing: -.03em; }
.work-view-heading p { margin-top: 4px; color: var(--muted); font-size: .91rem; line-height: 1.45; overflow-wrap: anywhere; }
.work-columns { display: grid; grid-template-columns: minmax(205px, 1fr) minmax(0, 2.35fr); gap: 16px; align-items: start; }
.work-items { display: grid; gap: 6px; margin-block: 10px; }
.work-item { display: grid; gap: 4px; min-height: 44px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; text-align: start; color: var(--ink); background: var(--paper); overflow-wrap: anywhere; }
.work-item[aria-pressed="true"], .work-item:hover:not(:disabled) { background: #e9efcf; border-color: #a9b76f; }
.work-form { display: grid; gap: 6px; margin-top: 12px; }
.work-form label { margin: 0; }
.work-form button { justify-self: start; margin-top: 3px; white-space: normal; }
.project-join { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.project-join p { margin-top: 4px; font-size: .9rem; overflow-wrap: anywhere; }
#project-people { margin-top: 13px; padding: 9px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#project-people > summary { width: fit-content; font-size: .9rem; font-weight: 650; }
.project-member { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; overflow-wrap: anywhere; }
.project-invite-result { display: grid; gap: 7px; margin-top: 13px; padding: 12px; border-radius: 5px; background: #ecf1d5; }
.project-messages { max-height: min(57vh, 560px); overflow: auto; padding-right: 3px; }
.project-message-topline { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; }
.mail-opening { padding: 11px 13px; margin-bottom: 12px; border-radius: 5px; border: 1px solid #c5cfa5; background: var(--white); display: flex; align-items: center; gap: 8px 14px; justify-content: space-between; flex-wrap: wrap; }
.mail-opening p { font-weight: 650; }
.mail-decisions { display: grid; gap: 10px; }
.mail-decisions:empty { display: none; }
.mail-message { overflow-wrap: anywhere; }
.mail-message h3 { font-size: 1.27rem; margin-bottom: 8px; }
.mail-message .message-copy { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; }
.mail-source { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.mail-delivery { display: grid; gap: 4px; padding: 9px 12px; margin: 0; background: #edf0df; border-radius: 5px; overflow-wrap: anywhere; }
.mail-delivery strong { font-size: .92rem; }
@media (max-width: 660px) { .work-columns { grid-template-columns: 1fr; } }
