/* Fourhands: calm light workspace */
:root {
  --bg: #f7f7f4; --panel: #fff; --soft: #f1f1ed; --line: #e6e5df; --ink: #1f2328; --muted: #6a6f76;
  --scout: #ff6b57; --scout-soft: #ffece9; --scout-ink: #b8321f;
  --sketch: #14b8a6; --sketch-soft: #dcf7f3; --sketch-ink: #0b7a6e;
  --forge: #8b5cf6; --forge-soft: #efe9ff; --forge-ink: #5b34c4;
  --herald: #f59e0b; --herald-soft: #fff3d6; --herald-ink: #9a6200;
  --radius: 20px; --shadow: 0 1px 2px rgba(20,20,10,.04), 0 8px 24px rgba(20,20,10,.05);
  --head: 'Plus Jakarta Sans', system-ui, sans-serif; --body: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
p { margin: 0 0 .8em; }
a { color: inherit; }
img, svg { max-width: 100%; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.hide-sm { display: inline; }
[hidden] { display: none !important; }

/* buttons & chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 15px var(--head); border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 12px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,20,10,.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:focus-visible, .tab:focus-visible, .chip-btn:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #b9a6ff; outline-offset: 2px; }
.chip-btn { font: 500 13px var(--body); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; color: var(--ink); }
.chip-btn:hover { background: var(--soft); }
.demo-chip { font: 600 12px var(--head); background: #fff; border: 1px dashed #c9c7bd; color: var(--muted); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.tag { display: inline-block; font: 700 11px var(--head); text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(247,247,244,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 20px var(--head); text-decoration: none; letter-spacing: -.03em; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--muted); }
.nav-links a:hover, .nav-links a.on { background: var(--soft); color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0 40px; background: #fbfbf9; }
.foot { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: start; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.foot-links a { text-decoration: none; color: var(--muted); } .foot-links a:hover { color: var(--ink); }
.disclaimer { grid-column: 1 / -1; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin: 0; }

/* avatars + idle animation */
.av { display: inline-block; flex: none; line-height: 0; }
.av svg { display: block; border-radius: 30%; }
.av .eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.av .ant { transform-box: fill-box; transform-origin: 50% 100%; animation: wiggle 3.4s ease-in-out infinite; }
.bob { animation: bob 3.6s ease-in-out infinite; }
.bob.d1 { animation-delay: -.9s; } .bob.d2 { animation-delay: -1.8s; } .bob.d3 { animation-delay: -2.7s; }
.working .av { animation: bob .7s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(6deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

.mention { font-weight: 700; padding: 0 5px; border-radius: 6px; }
.m-scout { background: var(--scout-soft); color: var(--scout-ink); } .m-sketch { background: var(--sketch-soft); color: var(--sketch-ink); }
.m-forge { background: var(--forge-soft); color: var(--forge-ink); } .m-herald { background: var(--herald-soft); color: var(--herald-ink); }
.m-human { background: #e8eefc; color: #2f4aa8; }

/* ===== landing ===== */
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font: 700 13px var(--head); color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--scout), var(--herald)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 520px; margin: 18px 0 24px; }
.try { display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); max-width: 560px; }
.try input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 16px var(--body); padding: 8px 14px; color: var(--ink); }
.try input:focus-visible { outline: none; }
.stage { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 32px; padding: 28px; box-shadow: var(--shadow); min-height: 440px; }
.stage .spot { position: absolute; width: 150px; }
.stage .sp-scout { left: 28px; top: 28px; } .stage .sp-sketch { right: 28px; top: 70px; } .stage .sp-forge { left: 40px; bottom: 28px; } .stage .sp-herald { right: 34px; bottom: 40px; }
.bubble { position: relative; background: var(--soft); border-radius: 14px; padding: 8px 11px; font-size: 13px; line-height: 1.35; margin-bottom: 8px; min-height: 52px; transition: opacity .3s; }
.sp-scout .bubble { background: var(--scout-soft); } .sp-sketch .bubble { background: var(--sketch-soft); } .sp-forge .bubble { background: var(--forge-soft); } .sp-herald .bubble { background: var(--herald-soft); }
.stage .center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.stage .prompt-card { background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 18px; max-width: 190px; font: 600 14px var(--head); text-align: center; }
.band { padding: 28px 0; }
.band h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; } .band .sub { color: var(--muted); max-width: 620px; margin-bottom: 28px; }
.crew-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.crew-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border-top: 5px solid var(--c); }
.crew-card h3 { font-size: 22px; margin: 14px 0 2px; } .crew-card .role { font: 700 12px var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--ci); }
.crew-card dl { margin: 14px 0 0; font-size: 14px; } .crew-card dt { font: 700 12px var(--head); color: var(--muted); margin-top: 10px; text-transform: uppercase; letter-spacing: .05em; } .crew-card dd { margin: 2px 0 0; }
.steps { display: grid; gap: 0; position: relative; max-width: 780px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding-bottom: 26px; position: relative; }
.step:not(:last-child)::before { content: ''; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.step .n { width: 44px; height: 44px; border-radius: 50%; background: var(--c); color: #fff; font: 800 17px var(--head); display: grid; place-items: center; }
.step h3 { font-size: 19px; margin-bottom: 4px; } .step p { color: var(--muted); margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.chat-demo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font: 700 17px var(--head); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--muted); } .faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.cta { background: var(--ink); color: #fff; border-radius: 28px; padding: 44px 32px; text-align: center; }
.cta h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 10px; } .cta p { color: #c9ccd1; }

/* ===== chat messages (shared by landing sample + room) ===== */
.msg { display: grid; grid-template-columns: 38px 1fr; gap: 10px; animation: pop .25s ease both; }
.msg .who { font: 700 13px var(--head); display: flex; gap: 8px; align-items: baseline; }
.msg .who small { font: 500 11px var(--body); color: var(--muted); }
.msg .txt { background: var(--soft); border-radius: 4px 16px 16px 16px; padding: 9px 13px; margin-top: 3px; font-size: 15px; line-height: 1.45; display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.msg.scout .txt { background: var(--scout-soft); } .msg.sketch .txt { background: var(--sketch-soft); } .msg.forge .txt { background: var(--forge-soft); } .msg.herald .txt { background: var(--herald-soft); }
.msg.human { grid-template-columns: 1fr; justify-items: end; } .msg.human .txt { background: var(--ink); color: #fff; border-radius: 16px 4px 16px 16px; } .msg.human .who { justify-content: flex-end; }
.msg.human .mention { background: rgba(255,255,255,.2); color: #fff; }
.typing-dots { display: inline-flex; gap: 4px; padding: 4px 2px; } .typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bob .9s ease-in-out infinite; } .typing-dots i:nth-child(2) { animation-delay: .15s; } .typing-dots i:nth-child(3) { animation-delay: .3s; }
.handoff { justify-self: center; display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--head); color: var(--muted); border: 1px dashed #cfcdc3; border-radius: 999px; padding: 5px 12px; background: #fff; animation: pop .3s ease both; }
.handoff i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sys { justify-self: center; font: 600 12px var(--head); color: var(--muted); background: var(--soft); padding: 4px 12px; border-radius: 999px; }

/* ===== room ===== */
.room-top { padding: 28px 0 16px; }
.room-top h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 6px; }
.prompt-box { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 16px; box-shadow: var(--shadow); }
.prompt-box textarea { width: 100%; min-height: 76px; resize: vertical; border: 0; font: 500 17px/1.45 var(--body); color: var(--ink); background: transparent; padding: 4px 6px; }
.prompt-box textarea:focus-visible { outline: none; }
.prompt-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.crew-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.crew-pill { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px 14px 8px 8px; min-width: 0; flex: 1 1 200px; }
.crew-pill b { font: 700 14px var(--head); display: block; } .crew-pill span.st { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.crew-pill.busy { border-color: var(--c); box-shadow: 0 0 0 3px var(--cs); }
#viewTabs { display: none; margin-bottom: 12px; }
.room-grid { display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 16px; align-items: start; }
.right { display: grid; gap: 16px; min-width: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; font: 700 12px var(--head); padding: 5px 11px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.chat { display: flex; flex-direction: column; height: min(78vh, 760px); min-height: 480px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: grid; gap: 12px; align-content: start; }
.chat-empty { color: var(--muted); text-align: center; padding: 40px 12px; font-size: 15px; }
.interject { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; }
.interject input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font: 500 15px var(--body); background: var(--bg); }
.interject-hint { padding: 0 14px 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.col { background: var(--bg); border-radius: 14px; padding: 8px; min-height: 150px; }
.col h3 { font: 700 12px var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 6px 8px; display: flex; justify-content: space-between; }
.col h3 span { background: #fff; border-radius: 999px; padding: 0 8px; }
.card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 8px 9px; margin-bottom: 8px; font-size: 13px; line-height: 1.3; display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; }
.card.pulse { animation: pulseCard .9s ease; }
@keyframes pulseCard { 0% { box-shadow: 0 0 0 0 var(--c); } 100% { box-shadow: 0 0 0 10px transparent; } }
.card small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 12px 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tab { flex: none; border: 0; background: transparent; font: 700 13px var(--head); padding: 9px 12px; border-radius: 10px 10px 0 0; cursor: pointer; color: var(--muted); position: relative; border-bottom: 3px solid transparent; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); } .tab.locked { opacity: .45; }
.tab .dot { position: absolute; top: 6px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--scout); }
.dview { padding: 20px; min-height: 320px; overflow-wrap: anywhere; }
.dview h3 { font-size: 22px; margin-bottom: 10px; } .dview h4 { font-size: 14px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dview ul { margin: 0 0 8px; padding-left: 20px; } .dview li { margin-bottom: 4px; }
.locked-msg { color: var(--muted); display: grid; place-items: center; min-height: 260px; text-align: center; gap: 6px; }
.rev-tag { font: 700 11px var(--head); background: var(--forge-soft); color: var(--forge-ink); border-radius: 999px; padding: 3px 9px; margin-left: 8px; vertical-align: middle; }
.quote { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 8px 0; font-size: 15px; }
table.names { width: 100%; border-collapse: collapse; font-size: 15px; } table.names th { text-align: left; font: 700 12px var(--head); color: var(--muted); text-transform: uppercase; padding: 6px 8px; } table.names td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
table.names tr.win td { background: #f4fbf6; } .vchips { display: flex; gap: 4px; flex-wrap: wrap; }
.vchip { display: inline-flex; align-items: center; gap: 3px; font: 700 11px var(--head); border-radius: 999px; padding: 2px 8px 2px 3px; background: var(--c-soft); color: var(--c-ink); }
.vchip.second { opacity: .55; }
.win-badge { background: #1f9d55; color: #fff; font: 700 11px var(--head); border-radius: 999px; padding: 3px 9px; }
.logo-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; } .sw { width: 76px; font-size: 12px; } .sw i { display: block; height: 46px; border-radius: 12px; border: 1px solid rgba(0,0,0,.08); margin-bottom: 4px; }
.logo-sizes { display: flex; align-items: flex-end; gap: 14px; margin-top: 12px; }
.frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; margin-inline: auto; transition: width .25s; }
.frame iframe { width: 100%; height: 470px; border: 0; display: block; }
.post { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; }
.post .meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 6px; gap: 8px; }
.post p { margin: 2px 0 0; white-space: pre-wrap; }
.rule { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin-bottom: 12px; } .rule .rn { width: 30px; height: 30px; border-radius: 50%; background: var(--herald-soft); color: var(--herald-ink); font: 800 13px var(--head); display: grid; place-items: center; }
.check { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); } .check.done span.t { text-decoration: line-through; color: var(--muted); }
.progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 6px 0 12px; } .progress i { display: block; height: 100%; background: #1f9d55; width: 0; transition: width .3s; }

/* ===== projects ===== */
.proj-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 36px 0 18px; }
.proj-head h1 { font-size: clamp(30px, 4vw, 44px); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.pcard .top { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.pcard h3 { font-size: 20px; } .pcard .prompt { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.pcard .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pcard .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { background: #fff; border: 1px dashed #cfcdc3; border-radius: var(--radius); padding: 36px; text-align: center; color: var(--muted); }

/* ===== responsive ===== */
@media (max-width: 1000px) {
  .hero, .split { grid-template-columns: 1fr; }
  .crew-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  #viewTabs { display: flex; }
  .room-grid { grid-template-columns: 1fr; }
  .right { display: contents; }
  .room-grid[data-view="chat"] #boardPane, .room-grid[data-view="chat"] #delivPane,
  .room-grid[data-view="board"] #chatPane, .room-grid[data-view="board"] #delivPane,
  .room-grid[data-view="deliv"] #chatPane, .room-grid[data-view="deliv"] #boardPane { display: none; }
  .chat { height: 70vh; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .nav { gap: 8px; height: auto; flex-wrap: wrap; padding: 8px 0; }
  .nav { gap: 8px; } .nav-links a { padding: 6px 8px; font-size: 14px; } .nav-links a:first-child, .nav-links a:nth-child(2) { display: none; }
  .brand span { display: none; }
  .crew-grid { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .stage { min-height: 500px; padding: 16px; } .stage .spot { width: 128px; }
  .stage .sp-scout { left: 12px; top: 12px; } .stage .sp-sketch { right: 12px; top: 12px; } .stage .sp-forge { left: 12px; bottom: 12px; } .stage .sp-herald { right: 12px; bottom: 12px; }
  .try { flex-direction: column; border-radius: 24px; } .try .btn { width: 100%; }
  .dview { padding: 14px; } table.names { font-size: 13px; }
}
