/* Compact project composition, retaining the native workspace and its controls. */
body[data-route="project"] .workspace { max-width: none; }
body[data-route="project"] .project-heading {
  grid-template-columns: minmax(180px, 23%) minmax(0, 1fr) minmax(320px, 32%);
  min-height: 0; border-radius: 16px;
}
body[data-route="project"] .project-identity-art { grid-row: 1 / span 2; min-height: 220px; }
body[data-route="project"] .project-heading-copy { padding: 24px 28px 12px; }
body[data-route="project"] .project-heading-copy > .eyebrow { display: none; }
body[data-route="project"] .project-heading h1 { font-size: clamp(25px, 2.3vw, 34px); line-height: 1.16; letter-spacing: -.03em; }
body[data-route="project"] .project-heading-copy > p:not(.eyebrow) { font-size: 14px; line-height: 1.5; }
body[data-route="project"] .project-actions { grid-column: 2; max-width: none; justify-content: flex-start; align-items: center; flex-wrap: wrap; padding: 0 28px 20px; }
body[data-route="project"] .project-actions .button { min-height: 40px; font-size: 13px; padding: 9px 13px; }
body[data-route="project"] .project-actions [data-focus-update] { background: var(--accent); color: #fff; border-color: var(--accent); }
body[data-route="project"] .project-actions #workspace-density { margin-right: auto; }
body[data-route="project"] .project-heading .project-image-action { right: 12px; bottom: 12px; }
body[data-route="project"] #simple-nav { border-radius: 12px; margin-bottom: 12px; box-shadow: none; }
body[data-route="project"] #simple-nav button { min-height: 44px; padding: 12px 20px; font-size: 14px; }
body.rwt-simple[data-route="project"] #simple-quick {
  grid-column: 3; grid-row: 1 / span 2; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr);
  align-content: start; align-items: start; gap: 16px; margin: 0; padding: 24px;
  border-radius: 0; background: #f0f6f7; border: 0; border-left: 1px solid #d6e3e5; box-shadow: none;
}
body[data-route="project"] #simple-quick > .simple-phase-label { margin: 0; }
body[data-route="project"] #simple-quick .simple-phase-label small { color: #456469; font-size: 12px; letter-spacing: 0; }
body[data-route="project"] #simple-quick .simple-phase-label strong { color: #234e54; font-size: 21px; line-height: 1.3; margin-top: 4px; }
.phase-sequence { display: flex; min-width: 0; margin: 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #8ea8ad transparent; }
.phase-sequence li { position: relative; flex: 1 0 74px; min-width: 0; padding: 0 5px; color: #52636b; text-align: center; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.phase-sequence li::before { content: ''; position: absolute; top: 12px; right: 50%; width: 100%; height: 1px; background: #b9cccf; }
.phase-sequence li:first-child::before { display: none; }
.phase-sequence-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 25px; height: 25px; margin: 0 auto 7px; border: 1px solid #afc2c7; border-radius: 50%; background: #fff; color: #52636b; font-size: 11px; font-weight: 700; }
.phase-sequence .is-current { color: #234e54; font-weight: 750; }
.phase-sequence .is-current .phase-sequence-dot { color: #fff; background: #34656b; border-color: #34656b; }
.phase-sequence .is-complete .phase-sequence-dot { color: #34592c; background: #e4efdf; border-color: #a2bb98; }
body[data-route="project"] .simple-phase-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body[data-route="project"] .simple-phase-actions .soft-button { min-height: 40px; padding: 8px 12px; font-size: 13px; background: #fff; }
body[data-route="project"] .simple-phase-actions [data-simple-advance] { color: #234e54; border-color: #a7bec3; font-weight: 700; }
body[data-route="project"] #simple-quick > .plan-card { grid-column: 1 / -1; grid-row: auto; min-width: 0; margin: 0; padding: 12px 0 0; background: transparent; border-top-color: #d3e1e3; border-radius: 0; }
body[data-route="project"] #simple-quick #phase-list strong { min-width: 0; overflow-wrap: anywhere; }
body[data-route="project"] #simple-quick .rwt-fold > summary { font-size: 13px; color: #456469; }
body[data-route="project"] main.page-shell > .project-grid { gap: 16px; }
body[data-route="project"] .page-shell .card:not(.project-heading):not(#simple-quick) { border-radius: 16px; }
body[data-route="project"] .team-card { background: #f4f7fa; box-shadow: none; }
body[data-route="project"] .team-card .card-head h2 { color: #3b586e; }
body[data-route="project"] .dates-card .card-head h2 { color: #335d59; }
body[data-route="project"] .team-list li { min-height: 54px; }
body[data-route="project"] .card-head h2 { font-size: 18px; }
/* Laptop viewports have less usable project width than their viewport suggests
   because the floating rail and page gutters share that space. Keep the project
   art quiet and preserve a useful phase panel in this intermediate range. */
@media (min-width: 1201px) and (max-width: 1500px) {
  body[data-route="project"] .project-heading {
    grid-template-columns: minmax(145px, 18%) minmax(0, 1fr) minmax(300px, 31%);
  }
  body[data-route="project"] .project-identity-art { min-height: 180px; }
  body[data-route="project"] .project-heading-copy { padding: 20px 22px 10px; }
  body[data-route="project"] .project-actions { padding: 0 22px 18px; }
  body.rwt-simple[data-route="project"] #simple-quick { padding: 18px; }
  body[data-route="project"] .phase-sequence {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 4px;
    overflow: visible;
  }
  body[data-route="project"] .phase-sequence li {
    flex: initial;
    padding: 0 2px;
    overflow-wrap: normal;
  }
  body[data-route="project"] .phase-sequence li::before { display: none; }
}
@media (max-width: 1200px) {
  body[data-route="project"] .project-heading { grid-template-columns: minmax(170px, 27%) minmax(0, 1fr); }
  body[data-route="project"] .project-identity-art { grid-row: 1 / span 3; }
  body[data-route="project"] .project-heading-copy { padding: 20px 20px 12px; }
  body[data-route="project"] .project-actions { padding: 0 20px 20px; }
  body.rwt-simple[data-route="project"] #simple-quick { grid-column: 2; grid-row: 3; padding: 20px; border-left: 0; border-top: 1px solid #d6e3e5; }
}
@media (max-width: 660px) {
  body[data-route="project"] .topbar { margin-bottom: 12px; }
  body[data-route="project"] main.page-shell { margin-top: 0; padding-top: 0; }
  body[data-route="project"] .project-breadcrumb { position: static; padding-left: 0; }
  body[data-route="project"] .project-breadcrumb p { min-width: 0; flex-wrap: wrap; }
  body[data-route="project"] .project-breadcrumb .round-button { flex-shrink: 0; }

  body[data-route="project"] .project-heading { grid-template-columns: minmax(0, 1fr); }
  body[data-route="project"] .project-identity-art { grid-row: auto; height: 132px; min-height: 132px; }
  body[data-route="project"] .project-heading-copy { padding: 20px 16px 12px; }
  body[data-route="project"] .project-actions { grid-column: 1; gap: 8px; padding: 0 16px 16px; }
  body[data-route="project"] .project-actions #workspace-density { flex-basis: 100%; margin: 0; }
  body.rwt-simple[data-route="project"] #simple-quick { grid-column: 1; grid-row: auto; padding: 16px; gap: 14px; }
  body[data-route="project"] .simple-phase-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-route="project"] .simple-phase-actions .soft-button { min-width: 0; white-space: normal; }
}

/* Shared portal color refinement: warm field, research-colored working regions, and high-clarity selection. */
:root {
  --bg: #f5f1ed;
  --surface-muted: #faf6f2;
  --line: #e5ddd7;
  --shadow: 0 12px 34px rgba(83, 61, 55, .075), 0 2px 5px rgba(83, 61, 55, .04);
  --shadow-hover: 0 16px 40px rgba(83, 61, 55, .12), 0 3px 8px rgba(83, 61, 55, .06);
}

body {
  background:
    radial-gradient(circle at 94% 4%, rgba(226, 238, 238, .85), transparent 27rem),
    radial-gradient(circle at 8% 96%, rgba(247, 229, 234, .7), transparent 30rem),
    var(--bg);
}

.rail {
  border-color: rgba(223, 213, 207, .92);
  background: rgba(255, 253, 251, .94);
}

.card { border-color: rgba(224, 216, 209, .94); }
.search, .icon-button, .round-button { background: #fff; border-color: var(--line); }

/* Form controls remain bright, stable writing surfaces against the warmer page. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea,
select { background-color: #fff; }

/* Burgundy remains the portal voice; selected states read immediately at a glance. */
.nav-item.is-active,
.dock-item.is-active {
  background: linear-gradient(145deg, #f8e8ed, #f3dce4);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(157, 41, 72, .12);
  font-weight: 750;
}
.nav-item.is-active svg,
.dock-item.is-active svg { stroke-width: 2.35; }
.nav-item.is-active::before { background: var(--accent-dark); box-shadow: 0 0 0 3px rgba(157, 41, 72, .10); }
.tabs button.active,
.rwt-local-tabs button.active,
.resource-tabs button.selected { color: var(--accent-dark); font-weight: 750; }
.tabs button.active::after,
.rwt-local-tabs button.active::after { background: var(--accent-dark); height: 4px; }
.segmented button.selected,
.rwt-tab-button.primary,
.primary-button,
.sp-button.submit { background: var(--accent-dark); border-color: var(--accent-dark); }
.activity-filters button.active,
.rwt-segmented button.active,
.browse-filters button.selected { color: var(--accent-dark); box-shadow: inset 0 0 0 1px rgba(157, 41, 72, .14), 0 2px 8px rgba(83, 61, 55, .06); }

/* Home uses quiet color fields to separate research work without reordering content. */
.home-project-tiles .sp-section-head h2 { color: #274f58; }
.home-work { border-top: 3px solid #5b8a88; background: #eaf3f1; }
.home-work .card-title { color: #315f60; }
.home-calendar { border-top: 3px solid #667f97; background: #edf2f8; }
.home-calendar .card-title { color: #3d607b; }
.quick-actions { border-top: 3px solid #a64b62; background: #f9edef; }
.quick-actions .card-title { color: var(--accent-dark); }
.quick-icon { background: #f6e9ed; color: var(--accent-dark); }
.home-announcements > header { background: linear-gradient(90deg, #f7ebee, #fffaf7 72%); }

.home-page .home-project-tile {
  border-top-width: 4px;
  background: linear-gradient(145deg, #e7f1f0, #f4f9f8 68%);
  box-shadow: 0 9px 22px rgba(53, 90, 91, .09);
}
.home-page .home-project-tile:nth-child(4n + 2) { border-top-color: #5a7f9a; background: linear-gradient(145deg, #e9f0f7, #f4f8fb 68%); }
.home-page .home-project-tile:nth-child(4n + 3) { border-top-color: #a65a70; background: linear-gradient(145deg, #f8e9ed, #fcf4f5 68%); }
.home-page .home-project-tile:nth-child(4n + 4) { border-top-color: #75854e; background: linear-gradient(145deg, #edf2e3, #f6f8f0 68%); }
.home-page .home-project-tile:hover { border-color: #99b8ba; box-shadow: 0 14px 28px rgba(53, 90, 91, .14); }
.home-page .home-project-tile[data-work-state="overdue"] { border-top-color: #a42c46; background: linear-gradient(145deg, #fdecef, #fdf5f6 68%); }
.home-page .home-project-tile[data-work-state="update"] { border-top-color: #987020; background: linear-gradient(145deg, #f8efd9, #fbf6e9 68%); }
.home-page .home-project-tile[data-work-state="clear"] { border-top-color: #637b55; background: linear-gradient(145deg, #eaf2e6, #f4f8f0 68%); }

/* Project sections carry their existing blue and teal cues into their header fields. */
body[data-route="project"] .team-card { border-top: 3px solid #6d8da3; background: #f2f6f9; }
body[data-route="project"] .dates-card { border-top: 3px solid #5e8c86; background: #f0f7f5; }
body[data-route="project"] .project-heading { border-color: #d7e3e1; }

.rwt-team-availability { padding: 18px 20px; }
.rwt-team-availability-state { margin: 12px 0 0; color: var(--ink); font-size: 13px; font-weight: 650; }

/* Published work remains readable, with publication edits in its own tab. */
.published-project-notice { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.25rem; margin:0 0 1rem; border:1px solid #b8c7bd; border-radius:14px; background:#edf3ee; color:#344d3e; font-weight:600; }
.rwt-project-published .project-heading { background:#f1f2f2; }
.rwt-project-published .project-heading .project-identity-art { filter:grayscale(.75); }
.rwt-project-published .project-grid > *, .rwt-project-published #simple-quick { background-color:#f3f4f4; }
.rwt-project-published [data-published-disabled] { opacity:.45; cursor:not-allowed; }
@media(max-width:640px){.published-project-notice{align-items:flex-start;flex-direction:column;}}
