.project-scope, #project-list { margin: 1.25rem 0; padding: clamp(1rem, 3vw, 2rem); background: white; border: 1px solid #d8dce8; border-radius: 1rem; }
.project-scope h2, #project-list h2 { margin-top: 0; }
.project-fields { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.project-scope label { display: grid; gap: .4rem; font-weight: 600; }
.project-scope input, .project-scope select { padding: .6rem; font: inherit; border: 1px solid #a1a8b8; border-radius: .4rem; }
.project-scope summary, .project-row summary { cursor: pointer; }
.project-row { padding: .8rem 0; border-bottom: 1px solid #e0e3ee; }

/* Stage 1 uses the same editor controls in a warm, raised-card workspace. */
.stage-one {
  --ink: #382d24;
  --sage-ink: #305447;
  --edge: #d8c9b4;
  --lift: inset 0 1px 1px #ffffffd9, 0 2px 2px #73583a22, 0 6px 14px #73583a10;
  background: linear-gradient(145deg,#fff8ec,#f6e9d9);
  padding: clamp(16px,3vw,36px);
  border: 1px solid #e7d8c3;
  border-radius: 24px;
  color: var(--ink);
}
.stage-one .vw-heading h1, .stage-one h2, .stage-one .vw-search label { color: var(--ink); }
.stage-one .vw-heading p, .stage-one .vw-breadcrumb, .stage-one .vw-search p { color: #62574c; }
.stage-one .vw-kicker { color: var(--sage-ink)!important; }
.stage-one .project-scope { display: grid; gap: 15px; padding: 0; margin: 0 0 16px; border: 0; background: transparent; }
.stage-one .project-name-card, .stage-one .period-card, .stage-one .vw-search,
.stage-one .vw-group, .stage-one .vw-more, .stage-one #project-list {
  border: 1px solid var(--edge); border-radius: 18px; box-shadow: var(--lift);
}
.stage-one .project-name-card, .stage-one .period-card, .stage-one .vw-search { padding: clamp(16px,2.5vw,27px); }
.stage-one .project-name-card { background: linear-gradient(130deg,#f9dfc8,#fff0dc); }
.stage-one .period-card { background: linear-gradient(130deg,#dfe8d9,#eef1e3); }
.stage-one .vw-search, .stage-one .vw-group, .stage-one .vw-more, .stage-one #project-list { background: #fffaef; }
.stage-one .project-name-card label, .stage-one .period-card h2, .stage-one .vw-search label {
  display:block; font-weight: 700; font-size: 1.15rem; margin: 0 0 12px;
}
.stage-one .project-name-card input { width:100%; box-sizing:border-box; }
.stage-one .project-fields { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0; }
.stage-one input, .stage-one select { background:#fffcf5; border:1px solid #ac9e88; border-radius:10px; box-shadow:inset 0 2px 3px #70513213; }
.stage-one .project-fields input, .stage-one .project-fields select { width:100%; min-width:0;box-sizing:border-box; min-height:46px; }
.stage-one .vw-primary { background:#355d4e; border-color:#294b3f; color:white; box-shadow:var(--lift); }
.stage-one .vw-primary:hover {background:#264638;}
.stage-one .vw-secondary, .stage-one .vw-small-primary { background:#f9e3cc; border-color:#c5a88d; color:#513728; box-shadow:var(--lift); }
.stage-one .vw-text-button, .stage-one .vw-main-group .vw-group-kind { color:var(--sage-ink); }
.stage-one .vw-preview-term, .stage-one .vw-chip { background:#e3eddf; border-color:#aebda7;color:#294635;border-radius:12px; }
.stage-one .vw-chip button {color:#294635;}
.stage-one .vw-preview-term.vw-abbr { background:#fae5ce;color:#613d27;border-color:#d4b291; }
.stage-one .vw-save-bar { background:#fcf6e9; border-color:var(--edge);box-shadow:var(--lift); }
.stage-one .vw-save-bar strong { color:var(--ink); }
.stage-one .vw-save-bar small { color:#564e42; }
.stage-one :focus-visible { outline:3px solid #366849; outline-offset:3px; }
@media(max-width:700px) {
  .stage-one .project-fields {grid-template-columns:minmax(0,1fr);}
  .stage-one .vw-heading {flex-wrap:wrap;gap:12px;}
}
#projects { display:grid; gap:1rem; }
#projects article { border:1px solid var(--edge); border-radius:18px; padding:1.25rem; box-shadow:var(--lift); }
#projects article h2 { margin-bottom:.5rem; }

#delete-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(28rem, calc(100% - 2rem));
  height: fit-content;
  max-height: calc(100% - 2rem);
  box-sizing: border-box;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: clamp(1.25rem, 4vw, 2rem);
  color: var(--ink);
  background: #fffaef;
  border: 1px solid var(--edge);
  border-radius: 18px;
  box-shadow: 0 12px 48px #33291c38;
}
#delete-dialog::backdrop { background: rgb(37 32 25 / 52%); }
#delete-dialog .delete-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:.65rem; margin-top:1.25rem; }
#delete-dialog .delete-warning:not([hidden]) + .delete-actions [data-confirm] { background:#873a30; border-color:#763128; }
