.form-error { color: #803c35; padding: 12px; background: #fff0ed; border-radius: 6px; }
.requirement { border-top: 1px solid #ddd; padding-top: 16px; margin-top: 16px; }
.origin { font-size: 13px; color: #52685e; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.card textarea { min-height: 90px; }
.card input[type=checkbox] { width: 18px; height: 18px; }
.warning { padding: 12px; background: #fff3d6; border-left: 4px solid #b28a28; }
button:disabled { opacity: .55; cursor: wait; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid #b28a28; outline-offset: 3px;
}
.document-link { display: inline-block; margin: 8px 16px 8px 0; }
.muted.small { overflow-wrap: anywhere; }
.agent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.agent-card { background: #fff; border: 1px solid #dfe6dc; border-radius: 12px; padding: 18px; }
.agent-card.planned { opacity: .72; }
.agent-card h3 { min-height: 48px; }
.conversation-row { width: 100%; margin: 8px 0; background: #fff; color: #16302c; border: 1px solid #dfe6dc;
  display: flex; justify-content: space-between; gap: 20px; text-align: left; }
.conversation-row span { color: #64766e; font-size: 12px; }
.chat-thread { max-width: 920px; margin: 24px auto; display: grid; gap: 16px; }
.message { padding: 18px 20px; border-radius: 14px; max-width: 82%; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { justify-self: end; background: #196c51; color: #fff; }
.message.assistant, .message.system { justify-self: start; background: #fff; border: 1px solid #dfe6dc; }
.message-label { font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 7px; }
.confirmation { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; }
.confirmation input { width: 18px; flex: 0 0 18px; margin-top: 3px; }
.run-state { margin-bottom: 8px; }
@media (max-width: 850px) { .actions button { flex: 1 1 auto; } .card { padding: 18px; } }
@media (max-width: 1050px) { .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .agent-grid { grid-template-columns: 1fr; } .message { max-width: 96%; }
  .conversation-row { display: grid; } }
/* MVP 3 card styles, deliberately scoped away from the home agent catalogue. */
#specification-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.spec-field { border-bottom: 1px solid #dbe5df; padding: 12px 0; }
.spec-field textarea { min-height: 80px; }
.spec-field h3 { margin-bottom: 12px; }
.table-scroll { overflow-x: auto; }
.items-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.items-table th, .items-table td { border: 1px solid #dbe5df; padding: 8px; vertical-align: top; }
.items-table input, .items-table textarea { width: 100%; box-sizing: border-box; }
.execution-table { min-width: 760px; }
.execution-table th:nth-child(1) { width: 7%; }
.execution-table th:nth-child(2) { width: 23%; }
.execution-table th:nth-child(3), .execution-table th:nth-child(4) { width: 35%; }
.execution-table textarea { min-height: 72px; }
.execution-table textarea:disabled { background: #edf1ee; cursor: not-allowed; }
.execution-agent { border-top: 1px solid #dbe5df; margin-top: 24px; padding-top: 20px; }
.execution-agent ol { max-width: 760px; }
.compact-items th:nth-child(1) { width: 6%; }
.compact-items th:nth-child(2) { width: 23%; }
.compact-items th:nth-child(3) { width: 10%; }
.compact-items th:nth-child(4) { width: 10%; }
.compact-items th:nth-child(5) { width: 51%; }
.compact-items tfoot th { background: #eef5ed; }
.next-stage { background: #247848; margin: 12px 0; }
.outreach-card { border-top: 1px solid #dbe5df; padding: 14px 0; }
.outreach-card label { display: block; max-width: 720px; }
.outreach-card input, .outreach-card textarea { display: block; width: 100%; box-sizing: border-box; margin: 6px 0 10px; }
.preparing::before { content: '◌'; display: inline-block; margin-right: 8px; animation: spin 1.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .preparing::before { animation: none; } }

/* Public landing page. All rules are scoped to keep the authenticated MVP unchanged. */
.public-page.login {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  color: #15382e;
  background:
    radial-gradient(circle at 92% 9%, rgba(210, 234, 242, .72), transparent 30%),
    linear-gradient(180deg, #fbfdfb 0%, #f4f8f5 100%);
}
.public-page button { width: auto; margin-top: 0; }
.public-nav {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0e9e2;
}
.public-nav nav { margin: 0; display: flex; gap: 4px; }
.public-nav nav button {
  padding: 10px 12px;
  background: transparent;
  color: #315a4d;
  font-weight: 600;
}
.public-nav nav button:hover { background: #eaf3ec; filter: none; }
.public-main { width: min(1180px, calc(100% - 48px)); max-width: none; margin: 0 auto; padding: 74px 0 54px; }
.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .72fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
}
.public-hero-copy { max-width: 760px; }
.public-page .public-kicker {
  margin: 0 0 16px;
  color: #247252;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.public-page h1 {
  margin: 0;
  max-width: 750px;
  color: #0b3027;
  font-size: clamp(42px, 5.5vw, 72px);
  line-height: 1.03;
  letter-spacing: -2.8px;
}
.public-lead { max-width: 720px; margin: 26px 0 0; color: #506a60; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.public-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.public-actions button { min-width: 142px; padding: 14px 24px; }
.public-flow {
  padding: 22px 26px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid #dce7df;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(32, 78, 62, .08);
}
.public-flow p { margin: 0; padding: 18px 0; display: flex; gap: 14px; align-items: center; border-bottom: 1px solid #e4ebe6; color: #36594f; }
.public-flow p:last-child { border-bottom: 0; }
.public-flow span { color: #21805b; font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.public-value { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 76px; }
.public-value article { padding: 24px; background: #fff; border: 1px solid #e0e9e2; border-radius: 14px; }
.public-value strong, .public-value span { display: block; }
.public-value strong { margin-bottom: 9px; font-size: 17px; }
.public-value span { color: #60756d; line-height: 1.55; }
.public-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #e0e9e2;
  color: #6a7d75;
  font-size: 13px;
}
.public-footer a { color: #315f50; font-weight: 700; }
.public-footer a:hover, .public-footer a:focus-visible { color: #14734f; }
.privacy-page { min-height: 100vh; background: #f4f7f4; color: #173f32; }
.privacy-main { width: min(900px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 72px; }
.privacy-document { padding: clamp(28px, 5vw, 56px); border: 1px solid #dce7df; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(32, 78, 62, .06); }
.privacy-document h1 { margin: 0 0 12px; font-size: clamp(31px, 5vw, 48px); letter-spacing: -1.3px; }
.privacy-document h2 { margin: 34px 0 12px; font-size: 22px; }
.privacy-document p, .privacy-document li { color: #526b62; line-height: 1.65; }
.privacy-document ul { padding-left: 22px; }
.privacy-updated { margin-top: 0; font-size: 14px; }
.privacy-back { color: #315f50; font-weight: 700; }
.public-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: min(84vh, 820px);
  padding: 34px;
  border: 1px solid #d9e5dc;
  border-radius: 18px;
  color: #173f32;
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 50, 38, .24);
  overflow: auto;
}
.public-dialog::backdrop { background: rgba(13, 35, 29, .52); backdrop-filter: blur(3px); }
.public-dialog-wide { width: min(880px, calc(100% - 32px)); }
.public-dialog h2 { margin: 0 42px 18px 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.7px; }
.public-dialog p { color: #526b62; }
.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px !important;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #edf3ee;
  color: #234b3d;
  font-size: 25px;
  line-height: 1;
}
.login-dialog { width: min(460px, calc(100% - 32px)); }
.public-page #login-form button { width: 100%; margin-top: 10px; }
.founder-heading { display: flex; gap: 22px; align-items: center; margin: 8px 0 26px; }
.founder-heading img {
  width: 120px;
  height: 120px;
  flex: 0 0 120px;
  border: 3px solid #dcebd8;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 31%;
}
.founder-heading h2 { margin-bottom: 7px; }
.founder-heading p { margin: 0 0 3px; color: #31594c; font-weight: 700; }
.founder-heading span { color: #71837c; font-size: 14px; }
.founder-copy { max-width: 780px; }
.founder-copy p { margin: 0 0 14px; line-height: 1.62; }
.contact-email { margin-top: 20px; padding: 12px; display: flex; gap: 10px; align-items: center; border: 1px solid #dce7df; border-radius: 10px; background: #f5f9f6; }
.contact-email a { flex: 1; overflow-wrap: anywhere; font-weight: 700; }
.contact-email button { flex: 0 0 auto; }

@media (max-width: 760px) {
  .public-nav { width: min(100% - 32px, 1180px); padding: 18px 0; align-items: flex-start; gap: 16px; }
  .public-nav nav { max-width: 210px; justify-content: flex-end; flex-wrap: wrap; gap: 0; }
  .public-nav nav button { padding: 7px 8px; font-size: 13px; }
  .public-main { width: min(100% - 32px, 1180px); padding: 46px 0 38px; }
  .public-hero { grid-template-columns: 1fr; gap: 38px; }
  .public-page h1 { font-size: clamp(38px, 12vw, 54px); letter-spacing: -1.8px; }
  .public-lead { font-size: 18px; }
  .public-value { grid-template-columns: 1fr; margin-top: 42px; }
  .public-footer { width: min(100% - 32px, 1180px); flex-wrap: wrap; }
  .privacy-main { width: min(100% - 32px, 900px); padding: 34px 0 48px; }
  .public-dialog { padding: 28px 22px; }
  .founder-heading { flex-direction: column; text-align: center; }
  .founder-heading img { width: 94px; height: 94px; flex-basis: 94px; }
  .founder-heading h2 { margin-right: 0; }
  .contact-email { align-items: stretch; flex-direction: column; }
}

@media (max-width: 460px) {
  .public-nav { display: grid; }
  .public-nav nav { max-width: none; justify-content: flex-start; }
  .public-actions button { flex: 1 1 130px; }
  .public-footer { display: grid; }
}
