/* The homeowner journey: one next step, then the project chapters. */
.is-signed-in .account-main { width: min(1320px, calc(100% - 1.5rem)); }
.project-room { display: block; border: 1px solid #dfe5e8; border-radius: 18px; background: #fff; box-shadow: 0 18px 48px rgba(18, 38, 54, .07); overflow: clip; }
.project-room__sidebar { position: sticky; top: var(--account-header-height); z-index: 20; display: flex; flex-direction: row; align-items: center; gap: 1rem; width: 100%; max-height: none; min-height: 0; padding: .7rem 1.2rem; border-radius: 17px 17px 0 0; overflow: visible; background: #122c42; box-shadow: 0 6px 15px rgba(12, 37, 58, .12); }
.project-room__sidebar-label, .project-room__sidebar-reference, .project-room__sidebar-role { display: none; }
.project-room__sidebar-title { flex: none; max-width: 15rem; margin: 0; font-size: .95rem; }
.project-room__sidebar-nav { display: flex; gap: .25rem; margin-left: auto; overflow-x: auto; }
.project-room__sidebar-nav a { flex: none; min-height: 42px; white-space: nowrap; }
.project-room__sidebar-nav a[aria-current], .project-room__sidebar-nav a:hover { background: #284f6d; }
.project-room__content { padding: clamp(1rem, 2.4vw, 2rem); }
.project-room .room-hero { align-items: center; gap: 1.4rem; min-height: 0; padding: clamp(1rem, 2.2vw, 1.6rem); border: 0; border-radius: 14px; background: #fff; color: #112b40; }
.project-room .room-hero > div:first-child { flex: 1; min-width: 0; }
.project-room .room-hero .account-label { color: #b65322; }
.project-room .room-hero__reference { color: #a04d23; }
.project-room .room-hero h3 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2rem, 3.6vw, 3.3rem); font-weight: 700; letter-spacing: -.045em; }
.project-room .room-hero p, .project-room .room-hero p:last-child { color: #4d6472; font-size: .95rem; text-transform: none; }
.project-room .room-hero__status { align-self: flex-start; padding: .4rem .7rem; border-radius: 999px; background: #edf3f4; color: #28485a; font-size: .78rem; }
.room-hero__photo { width: clamp(180px, 28%, 315px); height: 160px; border-radius: 10px; object-fit: cover; box-shadow: 0 10px 24px rgba(18, 38, 54, .12); }
.project-room--detail .room-hero__photo { display: none; }
.project-room--detail .room-hero { padding-block: .8rem; }
.project-room--detail .room-hero h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
.project-room .room-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin: .4rem 0 0; }
.project-dashboard__primary .room-next, .project-room .room-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 0; padding: clamp(1.25rem, 2.5vw, 2rem); border: 1px solid #f2dbc9; border-radius: 16px; background: linear-gradient(120deg, #fff7f0 0%, #fffdfb 100%); box-shadow: none; }
.project-room .room-next .account-label { grid-column: 1 / -1; margin-bottom: .35rem; color: #ae4e1e; font-size: .78rem; }
.project-room .room-next h4 { grid-column: 1; max-width: none; margin: 0; color: #17334a; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.55rem, 2.6vw, 2.15rem); line-height: 1.14; }
.project-room .room-next__description { grid-column: 1; max-width: 60ch; margin: .5rem 0 0; color: #4a5d69; font-size: 1rem; line-height: 1.5; }
.project-room .room-next__link { grid-column: 2; grid-row: 2 / span 2; align-self: center; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8rem 1.25rem; border-radius: 999px; background: #b8501f; color: #fff; text-decoration: none; font-weight: 800; white-space: nowrap; }
.project-room .room-next__link:hover, .project-room .room-next__link:focus-visible { background: #923b15; outline-offset: 3px; }
.room-next__permissions { display: none; }
.project-room .room-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.project-room .room-path h4 { padding: 0 0 .25rem; font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; }
.project-room .room-path__step { display: flex; align-items: flex-start; gap: .8rem; min-height: 105px; padding: 1rem; border: 1px solid #e1e7e8 !important; border-radius: 13px; background: #fff; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.project-room .room-path__step:hover, .project-room .room-path__step:focus-visible { background: #fffaf6; border-color: #c56a3c !important; transform: translateY(-2px); }
.project-room .room-path__step.is-current { border-color: #d37645 !important; background: #fff8f2; }
.project-room .room-path__number { width: 2.3rem; height: 2.3rem; border: 0; border-radius: 50%; background: #e9eef0; color: #18374c; font-size: .85rem; }
.project-room .room-path__step.is-current .room-path__number { background: #b8501f; color: #fff; }
.project-room .room-path__step.is-done .room-path__number { background: #478362; color: #fff; }
.project-room .room-path__step strong { font-size: 1rem; }
.project-room .room-path__step small { color: #536976; font-size: .83rem; line-height: 1.45; }
.journey-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.journey-card { display: flex; flex-direction: column; min-height: 160px; padding: 1.25rem; border: 1px solid #dfe6e8; border-radius: 13px; background: #fff; color: #112b40; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.journey-card:hover, .journey-card:focus-visible { transform: translateY(-3px); border-color: #c56a3c; box-shadow: 0 12px 25px rgba(29, 56, 69, .09); }
.journey-card__label { margin-bottom: .7rem; color: #a64d24; font-size: .86rem; font-weight: 850; }
.journey-card strong { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.2rem, 1.7vw, 1.55rem); line-height: 1.22; }
.journey-card small { margin: .45rem 0 1rem; color: #516775; font-size: .89rem; line-height: 1.42; }
.journey-card__progress { width: 100%; height: .55rem; margin: 0 0 .9rem; overflow: hidden; border: 0; border-radius: 999px; background: #e7edf0; accent-color: #26765b; }
.journey-card__progress::-webkit-progress-bar { border-radius: 999px; background: #e7edf0; }
.journey-card__progress::-webkit-progress-value { border-radius: 999px; background: #26765b; }
.journey-card__progress::-moz-progress-bar { border-radius: 999px; background: #26765b; }
.journey-card__action { margin-top: auto; color: #a94b20; font-size: .88rem; font-weight: 800; }
.journey-more { border-top: 1px solid #e0e7e9; }
.journey-more > summary { width: fit-content; padding: .7rem .2rem; color: #224c68; font-size: .9rem; font-weight: 800; cursor: pointer; }
.journey-more > .project-dashboard__columns { margin-top: .8rem; }
.project-room .room-jump--project { display: none; }
.project-room__content a:not([class]), .project-room__content .project-link-control {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  margin: .2rem .25rem .2rem 0;
  padding: .5rem .8rem;
  border: 1px solid #b8cbd4;
  border-radius: 9px;
  background: #fff;
  color: #17435d;
  font-size: .92rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.project-room__content a:not([class]):hover, .project-room__content .project-link-control:hover {
  border-color: #a9572c;
  background: #fff6ef;
  color: #843d1f;
  box-shadow: 0 3px 10px rgba(29, 55, 71, .08);
}
.project-room__content a:not([class]):focus-visible, .project-room__content .project-link-control:focus-visible {
  outline: 3px solid #b8501f;
  outline-offset: 3px;
}
.project-room__content .permission-assessment__saved .project-link-control { margin-top: .8rem; border-color: #b8501f; background: #fff8f3; color: #8c3d19; }

/* Work plan and agreement: readable status before editing controls. */
#project-stages { border-radius: 15px; }
#project-stages .section-head h4, #project-budget .section-head h4 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -.035em; }
#project-stages .section-head__description, #project-budget .section-head__description { color: #506776; font-size: 1rem; }
#project-stages .work-plan-next { margin: 1rem 0; padding: 1rem 1.2rem; border: 1px solid #eed6c6; border-radius: 12px; background: #fff7f0; }
#project-stages .work-plan-next__label { display: block; margin-bottom: .4rem; color: #a64c23; font-size: .78rem; font-weight: 850; letter-spacing: .08em; }
#project-stages .work-plan-next strong { display: block; color: #17334a; font-family: Georgia, 'Times New Roman', serif; font-size: 1.28rem; }
#project-stages .work-plan-next p { margin: .3rem 0 0; color: #4b6171; font-size: .97rem; }
#project-stages .workflow-card--stage { scroll-margin-top: calc(var(--account-header-height) + 6.5rem); border: 1px solid #dfe7e9; border-left: 3px solid #b8501f; border-radius: 12px; background: #fff; }
#project-stages .workflow-card--stage > summary { min-height: 78px; padding: 1rem; background: #fff; }
#project-stages .workflow-card__title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; }
#project-stages .workflow-status { border-radius: 999px; }
#project-stages .stage-agreement { display: grid; gap: .8rem; margin: 1rem; padding: 1.15rem; border: 1px solid #efd8c9; border-radius: 12px; background: #fff8f3; }
#project-stages .stage-agreement__message { font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; }
#project-stages .stage-agreement__parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; }
#project-stages .stage-agreement__parties > div { display: grid; gap: .15rem; padding: .8rem; border: 1px solid #e0e8e8; border-radius: 9px; background: #fff; }
#project-stages .stage-agreement__parties strong { font-size: .88rem; }
#project-stages .stage-agreement__parties span { font-size: .95rem; font-weight: 750; }
#project-stages .stage-agreement__parties .is-agreed span { color: #21724b; }
#project-stages .stage-agreement__parties .is-waiting span { color: #ad4b1f; }
#project-stages .stage-agreement__next { margin: 0; padding: .75rem; border-radius: 8px; background: #eef4f8; color: #21435d; font-size: .94rem; line-height: 1.5; }
#project-stages .stage-agreement .workflow-actions { margin: 0; }
#project-stages .stage-agreement .workflow-actions button { min-height: 44px; }
#project-stages .stage-drafts-group { border-radius: 12px; background: #fbfcfd; }
#project-stages .stage-other-group { margin: 1rem 0; border: 1px solid #dbe4e8; border-radius: 12px; background: #f8fafb; }
#project-stages .stage-other-group > summary { padding: 1rem 1.15rem; color: #173b59; font-size: 1rem; font-weight: 800; cursor: pointer; }
#project-stages .stage-other-group > summary:hover, #project-stages .stage-other-group > summary:focus-visible { background: #edf4f8; }
#project-stages .stage-other-group > .workflow-card { margin: .7rem; }
#project-stages .stage-drafts-group > summary { font-size: 1rem; }
#project-checks .work-plan-compliance { margin-top: 1.2rem; scroll-margin-top: calc(var(--account-header-height) + 6.5rem); }
#project-checks .section-head h4 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -.035em; }
#project-checks .section-head__description { color: #506776; font-size: 1rem; }

/* Budget: clearly separate matched stage costs from unassigned allowances. */
#project-budget { border-radius: 15px; }
.job-budget-journey { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1.2rem 0; }
.job-budget-journey > div { display: grid; gap: .25rem; padding: 1.2rem; border: 1px solid #dce7e3; border-radius: 12px; background: #f5faf7; }
.job-budget-journey > div + div { border-color: #efdac7; background: #fff8f1; }
.job-budget-journey strong { color: #17334a; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.7rem, 2.7vw, 2.2rem); }
.job-budget-journey span { color: #3f5968; font-size: .95rem; font-weight: 750; }
.job-budget-journey__notice { padding: 1rem 1.15rem; border: 1px solid #e8b981; border-radius: 10px; background: #fff4e7; color: #744016; font-size: .95rem; line-height: 1.5; }
.job-budget-journey__guidance { display: grid; gap: .55rem; margin: -.25rem 0 1.2rem; padding: 1rem 1.15rem; border: 1px solid #efdac7; border-radius: 12px; background: #fffaf5; color: #284657; }
.job-budget-journey__guidance strong { color: #17334a; font-size: 1.03rem; }
.job-budget-journey__guidance p { max-width: 70ch; margin: 0; font-size: .96rem; line-height: 1.55; }
.job-budget-journey__guidance a { width: fit-content; padding: .7rem 1rem; border-radius: 9px; background: #ab542a; color: #fff; font-weight: 750; text-decoration: none; }
.job-budget-journey__guidance a:hover, .job-budget-journey__guidance a:focus-visible { background: #833d1d; }
#project-budget .job-budget-panel__breakdown { overflow: hidden; border-radius: 12px; }
#project-budget .job-budget-panel__breakdown h5 { background: #edf3f6; color: #17334a; }
#project-budget .job-budget-panel__editor { border-radius: 10px; }

@media (max-width: 1000px) {
  .project-room__sidebar { gap: .4rem; }
  .project-room__sidebar-title { display: none; }
  .project-room__sidebar-nav { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) {
  .project-room__content { padding: .8rem; }
  .project-room .room-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
  .project-room .room-hero__photo { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 120px; }
  .project-room .room-hero__status { grid-column: 2; grid-row: 1; }
  .project-room .room-next { grid-template-columns: 1fr; }
  .project-room .room-next h4, .project-room .room-next__description, .project-room .room-next__link { grid-column: 1; grid-row: auto; }
  .project-room .room-next__link { width: 100%; box-sizing: border-box; margin-top: 1rem; }
  .project-room .room-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-cards { grid-template-columns: 1fr; }
  .journey-card { min-height: 0; }
}
@media (max-width: 520px) {
  .project-room .room-hero__status { display: none; }
  .project-room .room-path { grid-template-columns: 1fr; }
  .project-room .room-path__step { min-height: 0; }
  .job-budget-journey, #project-stages .stage-agreement__parties { grid-template-columns: 1fr; }
  #project-stages .stage-agreement { margin: .75rem; }
}

/* Keep account typography on the same system-font scale as the rest of BuildRite. */
.project-room :is(h3, h4, h5, h6, strong, summary, button, a, input, select, textarea) {
  font-family: var(--br-font);
}
#project-stages :is(.section-head h4, .workflow-card__title, .work-plan-next strong, .stage-agreement__message),
#project-checks .section-head h4,
#project-budget .section-head h4 { font-family: var(--br-font); }
.project-room .room-hero h3 {
  font-family: var(--br-font);
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  font-weight: 750;
  line-height: 1.14;
  letter-spacing: -.04em;
}
.project-room--detail .room-hero h3 { font-size: clamp(1.625rem, 2.4vw, 2rem); }
.project-room :is(.section-head h4, .project-view h4) {
  font-size: clamp(1.625rem, 2.5vw, 2rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.035em;
}
#project-stages .section-head h4, #project-checks .section-head h4, #project-budget .section-head h4 {
  font-size: clamp(1.625rem, 2.5vw, 2rem);
  line-height: 1.2;
}
.project-room .room-next h4 { font-family: var(--br-font); font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.25; }
.project-room .room-path h4 { font-family: var(--br-font); }
.project-room .room-path h4, .project-room .journey-card strong,
#project-stages .workflow-card__title, #project-stages .work-plan-next strong,
#project-stages .stage-agreement__message { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.02em; }
.project-room .job-budget-journey strong { font-size: clamp(1.625rem, 2.5vw, 2rem); line-height: 1.2; }
.project-room :is(.section-head__description, .room-next__description, .job-budget-journey__guidance p) { font-size: 1rem; line-height: 1.5; }
.project-room :is(.workflow-status, .room-hero__status, .stage-snapshot strong, .job-budget-panel__breakdown .job-budget-panel__item) { font-size: .875rem; line-height: 1.45; }
