.demand-history-page,
.demand-detail-page,
.demand-history-login,
.demand-detail-missing {
  min-height: calc(100% - 60px);
  background: #fff;
}

.demand-history-hero {
  position: relative;
  min-height: 170px;
  padding: 28px 76px 24px 18px;
  background: var(--brand-deep);
  color: #fff;
}

.demand-history-hero > span,
.demand-detail-hero > div > span,
.demand-detail-heading > span,
.demand-history-empty > span,
.demand-detail-missing > span,
.demand-history-login-card > span {
  color: rgb(255 255 255 / 0.64);
  font-family: var(--numeric);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.demand-history-hero h2 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.2;
}

.demand-history-hero p {
  margin: 0;
  color: rgb(255 255 255 / 0.72);
  font-size: 11px;
  line-height: 1.7;
}

.demand-history-hero > strong {
  position: absolute;
  right: 18px;
  bottom: 24px;
  font-family: var(--numeric);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.demand-history-hero > strong small {
  display: block;
  margin-top: 5px;
  color: rgb(255 255 255 / 0.58);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  text-align: right;
}

.demand-history-list {
  margin: 0;
  padding: 14px 18px 0;
  list-style: none;
}

.demand-history-list li {
  border-bottom: 1px solid var(--line-default);
}

.demand-history-list button {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 0 10px;
  padding: 20px 0 18px;
  border: 0;
  background: transparent;
  color: var(--ink-primary);
  text-align: left;
  cursor: pointer;
}

.demand-history-index {
  grid-row: 1 / span 5;
  color: var(--brand-primary);
  font-family: var(--numeric);
  font-size: 13px;
  font-weight: 700;
}

.demand-history-date {
  color: var(--ink-secondary);
  font-family: var(--numeric);
  font-size: 9px;
}

.demand-history-list em {
  justify-self: end;
  padding: 3px 5px;
  background: var(--surface-muted);
  color: var(--ink-secondary);
  font-size: 8px;
  font-style: normal;
}

.demand-history-list h2 {
  grid-column: 2 / -1;
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
}

.demand-history-list p {
  display: grid;
  grid-column: 2 / -1;
  gap: 5px;
  margin: 0;
}

.demand-history-list p strong {
  font-size: 11px;
}

.demand-history-list p span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-secondary);
  font-size: 10px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.demand-history-footer {
  display: flex;
  grid-column: 2 / -1;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line-default);
}

.demand-history-footer small {
  color: var(--brand-primary);
  font-size: 9px;
  font-weight: 700;
}

.demand-history-footer b {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-primary);
  font-size: 10px;
}

.demand-history-footer svg,
.demand-history-empty button svg,
.demand-detail-missing button svg,
.demand-detail-new button svg {
  width: 15px;
  height: 15px;
}

.demand-history-notice {
  margin: 0;
  padding: 18px;
  color: var(--ink-secondary);
  font-size: 9px;
  line-height: 1.65;
}

.demand-history-empty,
.demand-detail-missing {
  display: grid;
  justify-items: start;
  padding: 48px 28px;
}

.demand-history-empty > svg,
.demand-detail-missing > svg {
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  color: var(--brand-primary);
}

.demand-history-empty > span,
.demand-detail-missing > span {
  color: var(--brand-primary);
}

.demand-history-empty h2,
.demand-detail-missing h2 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 23px;
}

.demand-history-empty p,
.demand-detail-missing p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 11px;
  line-height: 1.7;
}

.demand-history-empty button,
.demand-detail-missing button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 0 18px;
  border: 0;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
}

.demand-history-login {
  padding: 34px 18px;
}

.demand-history-login-card {
  display: grid;
  justify-items: start;
  padding: 30px 22px;
  background: var(--brand-deep);
  color: #fff;
}

.demand-history-login-card > svg {
  width: 32px;
  height: 32px;
  margin-bottom: 22px;
}

.demand-history-login-card h2 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 22px;
}

.demand-history-login-card p {
  margin: 0;
  color: rgb(255 255 255 / 0.72);
  font-size: 11px;
  line-height: 1.7;
}

.demand-history-login-card button {
  width: 100%;
  min-height: 44px;
  margin-top: 22px;
  border: 0;
  background: #fff;
  color: var(--brand-deep);
  font-weight: 700;
}

.demand-history-login-card small {
  margin-top: 9px;
  color: rgb(255 255 255 / 0.54);
  font-size: 8px;
}

.demand-detail-hero {
  padding: 24px 18px 22px;
  background: var(--brand-deep);
  color: #fff;
}

.demand-detail-hero > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demand-detail-hero > div > em {
  padding: 3px 6px;
  border: 1px solid rgb(255 255 255 / 0.22);
  color: rgb(255 255 255 / 0.62);
  font-size: 8px;
  font-style: normal;
}

.demand-detail-hero h2 {
  max-width: 310px;
  margin: 14px 0 20px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
}

.demand-detail-hero dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgb(255 255 255 / 0.18);
}

.demand-detail-hero dl div + div {
  padding-left: 16px;
  border-left: 1px solid rgb(255 255 255 / 0.18);
}

.demand-detail-hero dt {
  color: rgb(255 255 255 / 0.54);
  font-size: 9px;
}

.demand-detail-hero dd {
  margin: 5px 0 0;
  font-size: 11px;
  font-weight: 700;
}

.demand-detail-snapshot,
.demand-detail-contact {
  padding: 26px 18px;
  border-bottom: 8px solid var(--surface-muted);
}

.demand-detail-heading > span {
  color: var(--brand-primary);
}

.demand-detail-heading h2 {
  margin: 7px 0 6px;
  font-family: var(--serif);
  font-size: 20px;
}

.demand-detail-heading p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 10px;
  line-height: 1.65;
}

.demand-detail-snapshot dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--line-default);
}

.demand-detail-snapshot dl div {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-default);
}

.demand-detail-snapshot dl div:nth-child(even) {
  padding-left: 14px;
}

.demand-detail-snapshot dl div:nth-child(1),
.demand-detail-snapshot dl div:nth-child(4),
.demand-detail-snapshot dl div:nth-child(5),
.demand-detail-snapshot dl div:nth-child(6) {
  grid-column: 1 / -1;
  padding-left: 0;
}

.demand-detail-snapshot dt {
  color: var(--ink-secondary);
  font-size: 9px;
}

.demand-detail-snapshot dd {
  margin: 5px 0 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.demand-detail-contact {
  background: var(--brand-deep);
  color: #fff;
}

.demand-detail-contact .demand-detail-heading > span {
  color: #b8d2cd;
}

.demand-detail-contact .demand-detail-heading p {
  color: rgb(255 255 255 / 0.62);
}

.demand-detail-contact-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.demand-detail-contact-actions button {
  display: grid;
  min-height: 62px;
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgb(255 255 255 / 0.24);
  background: rgb(255 255 255 / 0.05);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.demand-detail-contact-actions button > svg:first-child {
  width: 20px;
  height: 20px;
  color: #b8d2cd;
}

.demand-detail-contact-actions button > svg:last-child {
  width: 15px;
  height: 15px;
  color: rgb(255 255 255 / 0.6);
}

.demand-detail-contact-actions button span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.demand-detail-contact-actions strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demand-detail-contact-actions small {
  overflow: hidden;
  color: rgb(255 255 255 / 0.56);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demand-detail-new {
  padding: 24px 18px;
  border-bottom: 1px solid var(--line-default);
}

.demand-detail-new > strong,
.demand-detail-boundary > strong {
  font-family: var(--serif);
  font-size: 14px;
}

.demand-detail-new p,
.demand-detail-boundary p {
  margin: 6px 0 0;
  color: var(--ink-secondary);
  font-size: 9px;
  line-height: 1.7;
}

.demand-detail-new button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--brand-primary);
  background: transparent;
  color: var(--brand-primary);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.demand-detail-boundary {
  margin: 18px;
  padding: 14px;
  background: var(--brand-soft);
}

@media (max-width: 359px) {
  .demand-history-hero {
    padding-right: 64px;
  }

  .demand-history-list {
    padding-inline: 14px;
  }

  .demand-detail-snapshot,
  .demand-detail-contact,
  .demand-detail-new {
    padding-inline: 14px;
  }

  .demand-detail-snapshot dl {
    grid-template-columns: 1fr;
  }

  .demand-detail-snapshot dl div,
  .demand-detail-snapshot dl div:nth-child(even) {
    grid-column: 1;
    padding-left: 0;
  }

  .demand-detail-boundary {
    margin-inline: 14px;
  }
}
