/* Editorial service portal: warm paper, architectural ink, and restrained clay. */
:root {
  --arch-paper: #f2eee6;
  --arch-paper-raised: #fbf8f2;
  --arch-paper-deep: #e5ded2;
  --arch-ink: #211f1b;
  --arch-ink-soft: #37332d;
  --arch-muted: #686159;
  --arch-rule: #bcb3a5;
  --arch-rule-soft: #d9d0c3;
  --arch-clay: #a84631;
  --arch-clay-dark: #843524;
  --arch-clay-soft: #f0ded7;
  --arch-moss: #526158;
  --arch-moss-soft: #e4e9e3;
  --arch-error: #8e3529;
  --arch-shadow-soft: 0 8px 26px rgba(58, 49, 39, .07);
  --arch-shadow-lift: 0 16px 36px rgba(58, 49, 39, .12);
}

body[data-route="portal"] {
  --portal-paper: var(--arch-paper);
  --portal-paper-deep: var(--arch-paper-deep);
  --portal-ink: var(--arch-ink);
  --portal-muted: var(--arch-muted);
  --portal-rule: var(--arch-rule);
  --portal-clay: var(--arch-clay);
  --portal-clay-dark: var(--arch-clay-dark);
  background: var(--portal-paper);
  color: var(--portal-ink);
}

body[data-route="portal"] #app {
  width: 100%;
  max-width: none;
  background: var(--portal-paper);
  box-shadow: none;
}

body[data-route="portal"] #screen {
  padding: 0;
  overflow: visible;
}

body[data-route="portal"] .screen-enter {
  animation: portal-reveal .42s ease-out both;
}

.portal-screen {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 48px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.portal-masthead {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto auto;
  align-items: center;
  min-height: 62px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--portal-ink);
  column-gap: 24px;
}

.portal-wordmark {
  display: grid;
  grid-template-columns: 25px auto;
  grid-template-rows: auto auto;
  column-gap: 11px;
  align-items: center;
  width: max-content;
  letter-spacing: .055em;
}

.portal-wordmark-rule {
  grid-row: 1 / 3;
  width: 25px;
  height: 25px;
  border-left: 4px solid var(--portal-clay);
  border-bottom: 4px solid var(--portal-clay);
}

.portal-wordmark strong { font-size: 14px; line-height: 1; }
.portal-wordmark small { margin-top: 5px; font-size: 9px; color: var(--portal-muted); letter-spacing: .12em; }

.portal-account {
  display: grid;
  justify-items: end;
  line-height: 1.25;
}

.portal-account span { font-size: 9px; color: var(--portal-muted); letter-spacing: .14em; }
.portal-account strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.portal-admin-link,
.portal-exit-link {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--portal-ink);
  border-radius: 0;
  background: transparent;
  color: var(--portal-ink);
  font: 600 11px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
}

.portal-exit-link {
  padding-inline: 10px;
  border-color: transparent;
  border-bottom-color: var(--portal-rule);
  color: var(--portal-muted);
}

.portal-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr);
  gap: clamp(48px, 10vw, 148px);
  align-items: end;
  padding: clamp(70px, 10vw, 132px) 0 clamp(72px, 9vw, 118px);
}

.portal-overline,
.portal-service-label {
  margin: 0 0 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}

.portal-overline { color: var(--portal-clay); }

.portal-intro h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 8vw, 104px);
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.055em;
}

.portal-intro-copy > p:last-child {
  max-width: 530px;
  margin: 35px 0 0;
  color: var(--portal-muted);
  font-size: 16px;
  line-height: 1.62;
}

.portal-status {
  margin: 0;
  border-top: 1px solid var(--portal-rule);
}

.portal-status > div {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--portal-rule);
}

.portal-status dt { color: var(--portal-muted); font-size: 11px; }
.portal-status dd { margin: 0; font-size: 12px; font-weight: 700; text-align: right; }

.portal-services { border-top: 1px solid var(--portal-ink); }
.portal-service { position: relative; }

.portal-design-service {
  display: grid;
  grid-template-columns: minmax(310px, .9fr) minmax(390px, 1.35fr);
  gap: clamp(42px, 8vw, 118px);
  align-items: center;
  min-height: 570px;
  padding: 74px 0 86px;
  border-bottom: 1px solid var(--portal-ink);
}

.portal-service-copy { max-width: 430px; }
.portal-service-number { display: block; margin-bottom: 62px; color: var(--portal-clay); font: 400 13px/1 Georgia, serif; }
.portal-service-label { color: var(--portal-muted); }

.portal-service h2 {
  margin: 0 0 21px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4.8vw, 61px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.035em;
}

.portal-service-copy > p:not(.portal-service-label),
.portal-project-copy > p:not(.portal-service-label) {
  max-width: 425px;
  margin: 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.68;
}

.portal-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 216px;
  min-height: 48px;
  margin-top: 32px;
  padding: 0 0 0 16px;
  border: 1px solid var(--portal-ink);
  border-radius: 0;
  background: transparent;
  color: var(--portal-ink);
  font: 700 12px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.portal-action-mark {
  display: grid;
  place-items: center;
  width: 47px;
  min-height: 46px;
  border-left: 1px solid currentColor;
  font-size: 16px;
}

.portal-action-accent { border-color: var(--portal-clay); background: var(--portal-clay); color: #fffaf2; }
.portal-action-quiet { min-width: 196px; }
.portal-action-light { border-color: #d9d0c3; color: #f7f2e9; }

.portal-saved-draft {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--portal-rule);
  border-bottom: 1px solid var(--portal-rule);
}

.portal-saved-draft > div { display: grid; gap: 3px; min-width: 0; }
.portal-saved-draft span { color: var(--portal-clay); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.portal-saved-draft strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.portal-saved-draft small { color: var(--portal-muted); font-size: 9px; }
.portal-saved-draft button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--portal-ink);
  border-radius: 0;
  background: transparent;
  color: var(--portal-ink);
  font: 700 9px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  cursor: pointer;
}
.portal-saved-draft button:hover { background: var(--portal-ink); color: var(--portal-paper); }
.portal-saved-draft button:focus-visible { outline: 3px solid var(--portal-clay); outline-offset: 3px; }

.portal-plan-preview {
  position: relative;
  align-self: stretch;
  min-height: 410px;
  padding: 27px;
  border-left: 1px solid var(--portal-rule);
  background: #e9e3d9;
}

.portal-plan-caption,
.portal-plan-scale {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}

.portal-plan-caption span,
.portal-plan-scale { color: var(--portal-muted); font-size: 9px; letter-spacing: .12em; }
.portal-plan-caption strong { font: 400 16px/1.2 Georgia, serif; }

.portal-plan-drawing {
  position: relative;
  width: min(100%, 510px);
  aspect-ratio: 1.52;
  margin: 42px auto 35px;
  border: 2px solid #37332d;
  background: #f4f0e9;
}

.portal-room { position: absolute; border: solid #37332d; background: #f4f0e9; }
.portal-room i { position: absolute; left: 9px; top: 8px; color: #756d63; font: normal 8px/1 "Helvetica Neue", sans-serif; letter-spacing: .12em; }
.room-living { inset: 0 39% 42% 0; border-width: 0 1px 1px 0; }
.room-kitchen { inset: 58% 39% 0 0; border-width: 0 1px 0 0; }
.room-bedroom { inset: 0 0 51% 61%; border-width: 0 0 1px 0; }
.room-bath { inset: 49% 0 0 61%; border-width: 0; }
.portal-plan-door { position: absolute; width: 18px; height: 18px; border: solid #37332d; border-width: 1px 0 0 1px; border-radius: 18px 0 0; }
.door-a { left: calc(61% - 18px); top: 30%; transform: rotate(90deg); }
.door-b { left: 25%; top: calc(58% - 8px); transform: rotate(180deg); }

.portal-community-service {
  display: grid;
  grid-template-columns: minmax(410px, 1.5fr) minmax(280px, .72fr);
  gap: clamp(48px, 9vw, 130px);
  align-items: center;
  padding: 102px 0 116px;
}

.portal-community-service .portal-service-number { margin-bottom: 78px; }

.portal-community-mosaic {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  grid-template-rows: 210px 155px;
  gap: 8px;
  transform: translateX(-32px);
}

.portal-mosaic-piece { position: relative; overflow: hidden; }
.portal-mosaic-piece small { position: absolute; left: 13px; bottom: 10px; padding: 4px 6px; background: var(--portal-paper); color: var(--portal-ink); font-size: 8px; letter-spacing: .06em; }
.mosaic-living { grid-row: 1 / 3; background: #c9b89c; }
.mosaic-kitchen { background: #94968d; }
.mosaic-materials { display: flex; gap: 7px; align-items: stretch; padding: 12px 12px 42px; background: #ded5c7; }
.mosaic-window { position: absolute; left: 14%; top: 12%; width: 27%; height: 45%; border: 6px solid #efeae1; background: #aebbc0; }
.mosaic-window::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid #efeae1; }
.mosaic-sofa { position: absolute; left: 25%; right: 9%; bottom: 19%; height: 25%; background: #6f665b; }
.mosaic-sofa::before { content: ''; position: absolute; left: 8%; right: 8%; top: -22%; height: 44%; border: 1px solid #5b534a; background: #82776a; }
.mosaic-table { position: absolute; right: 11%; bottom: 10%; width: 29%; height: 5%; background: #312e29; }
.mosaic-cabinet { position: absolute; inset: 15% 10% auto 12%; height: 34%; border-bottom: 5px solid #3f413d; background: #d9d4c9; }
.mosaic-island { position: absolute; left: 24%; right: 8%; bottom: 18%; height: 29%; border-top: 6px solid #ded8ce; background: #4e504c; }
.material-sample { flex: 1; border: 1px solid rgba(33,31,27,.18); }
.sample-oak { background: #aa805b; }
.sample-stone { background: #a7a39a; }
.sample-clay { background: var(--portal-clay); }

.portal-project-service {
  display: grid;
  grid-template-columns: minmax(300px, .86fr) minmax(430px, 1.2fr);
  gap: clamp(52px, 9vw, 135px);
  align-items: center;
  margin-inline: calc(50% - 50vw);
  padding: 102px max(32px, calc((100vw - 1180px) / 2)) 112px;
  background: var(--portal-ink);
  color: #f7f2e9;
}

.portal-project-service .portal-service-number { margin-bottom: 48px; color: #d9674d; }
.portal-project-service .portal-service-label,
.portal-project-copy > p:not(.portal-service-label) { color: #aaa195; }

.portal-project-copy > .portal-project-disclaimer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #5d574f;
  color: #c7beb2;
  font-size: 11px;
  line-height: 1.5;
}

.portal-ledger { border-top: 1px solid #d9d0c3; }
.portal-ledger-head { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0 27px; border-bottom: 1px solid #5d574f; }
.portal-ledger-head span { color: #aaa195; font-size: 9px; letter-spacing: .13em; }
.portal-ledger-head strong { font: 400 17px/1 Georgia, serif; }
.portal-progress-line { padding: 28px 0 33px; border-bottom: 1px solid #5d574f; }
.portal-progress-label { display: flex; justify-content: space-between; margin-bottom: 13px; font-size: 12px; }
.portal-progress-label b { color: #e17a61; }
.portal-progress-rule { height: 3px; background: #5d574f; }
.portal-progress-rule span { display: block; width: 62%; height: 100%; background: #d9674d; }
.portal-ledger-rows { margin: 0; }
.portal-ledger-rows > div { display: grid; grid-template-columns: 92px 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid #5d574f; }
.portal-ledger-rows dt { color: #aaa195; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.portal-ledger-rows dd { margin: 0; font-size: 12px; text-align: right; }

.portal-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding-top: 25px;
  color: var(--portal-muted);
  font-size: 9px;
  letter-spacing: .09em;
}

.portal-action:hover,
.portal-admin-link:hover { background: var(--portal-ink); color: var(--portal-paper); }
.portal-exit-link:hover { border-bottom-color: var(--portal-ink); color: var(--portal-ink); }
.portal-action-accent:hover { background: var(--portal-clay-dark); border-color: var(--portal-clay-dark); color: #fff; }
.portal-action-light:hover { background: #f7f2e9; color: var(--portal-ink); }
.portal-action:focus-visible,
.portal-admin-link:focus-visible,
.portal-exit-link:focus-visible { outline: 3px solid var(--portal-clay); outline-offset: 4px; }

@keyframes portal-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .portal-screen { width: min(100% - 40px, 720px); padding-top: 20px; }
  .portal-masthead { grid-template-columns: 1fr auto auto; }
  .portal-account { display: none; }
  .portal-intro { grid-template-columns: 1fr; gap: 48px; padding: 72px 0 76px; }
  .portal-status { max-width: 450px; margin-left: auto; width: 78%; }
  .portal-design-service { grid-template-columns: 1fr; min-height: 0; padding: 65px 0 72px; }
  .portal-plan-preview { min-height: 360px; }
  .portal-community-service { grid-template-columns: 1fr; padding: 78px 0 86px; }
  .portal-community-mosaic { order: 2; width: 92%; transform: none; }
  .portal-community-service .portal-service-copy { margin-left: 25%; }
  .portal-project-service { grid-template-columns: 1fr; padding-top: 78px; padding-bottom: 84px; }
  .portal-project-copy { max-width: 540px; }
  .portal-ledger { width: 92%; margin-left: auto; }
}

@media (max-width: 540px) {
  .portal-screen { width: calc(100% - 32px); padding-top: 15px; }
  .portal-masthead { column-gap: 10px; }
  .portal-admin-link, .portal-exit-link { padding: 0 9px; font-size: 10px; }
  .portal-intro { padding: 58px 0 62px; }
  .portal-intro h1 { font-size: clamp(49px, 15vw, 72px); }
  .portal-intro-copy > p:last-child { margin-top: 26px; font-size: 15px; }
  .portal-status { width: 100%; }
  .portal-service-number { margin-bottom: 42px; }
  .portal-service h2 { font-size: 40px; }
  .portal-design-service { gap: 46px; padding: 58px 0 64px; }
  .portal-plan-preview { min-height: 0; padding: 19px 14px; }
  .portal-plan-drawing { margin: 30px auto 26px; }
  .portal-community-service { gap: 45px; padding: 64px 0 70px; }
  .portal-community-service .portal-service-copy { margin-left: 0; }
  .portal-community-service .portal-service-number { margin-bottom: 42px; }
  .portal-community-mosaic { width: 100%; grid-template-rows: 176px 132px; }
  .portal-project-service { margin-inline: -16px; padding: 64px 16px 70px; gap: 52px; }
  .portal-ledger { width: 100%; }
  .portal-footer { flex-direction: column; }
  .portal-saved-draft { grid-template-columns: 1fr; }
  .portal-saved-draft button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-route="portal"] .screen-enter { animation: none; }
  .portal-action, .portal-admin-link, .portal-exit-link, .portal-saved-draft button { transition: none; }
}
