/* CGPM Tenant pages (Tenant + Maintenance Request Form).
 * Loaded only by views/tenant.php and views/maintenance.php. Every rule is scoped to .tp-* classes
 * and uses the site's existing tokens (--cream, --navy, --deep, --red, --ink, --line, --body). */

/* ---------- Shared ---------- */
.tp-heading {
  max-width: 860px;
  margin-bottom: 64px
}

.tp-heading.is-center {
  margin-inline: auto;
  text-align: center
}

.tp-heading.is-center .eyebrow {
  margin-inline: auto
}

.tp-heading h2,
.tp-split h2,
.tp-form-aside h2 {
  font-size: clamp(30px, 2.9vw, 48px);
  font-weight: 200;
  line-height: 1.18;
  margin: 0;
  color: var(--ink)
}

.tp-heading .tp-intro {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--body)
}

.tp-heading .tp-intro p {
  margin: 0
}

.tp-rich {
  font-size: 16px;
  line-height: 1.8;
  color: var(--body)
}

.tp-rich p {
  margin: 0 0 18px
}

.tp-rich p:last-child {
  margin-bottom: 0
}

.tp-rich a,
.tp-links a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere
}

.tp-rich strong {
  font-weight: 500;
  color: var(--ink)
}

.tp-list {
  list-style: none;
  margin: 8px 0 22px;
  padding: 0
}

.tp-list li {
  position: relative;
  padding: 13px 0 13px 30px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.7
}

.tp-list li:last-child {
  border-bottom: 1px solid var(--line)
}

.tp-list li::before {
  content: '✧';
  position: absolute;
  left: 0;
  top: 13px;
  color: var(--red)
}

.tp-list:last-child {
  margin-bottom: 0
}

/* ---------- Content + Image ---------- */
.tp-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: center
}

.tp-split.no-image {
  grid-template-columns: minmax(0, 860px);
  justify-content: center
}

.tp-split.is-image-left .tp-split-photo {
  order: -1
}

.tp-split h2 {
  margin-bottom: 30px
}

.tp-split .eyebrow {
  margin-bottom: 26px
}

.tp-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 24px
}

.tp-split .button {
  margin-top: 34px
}

.tp-split-photo {
  position: relative;
  align-self: stretch;
  min-height: 520px
}

.tp-split-photo::before {
  content: '';
  position: absolute;
  inset: 28px -28px -28px 28px;
  border: 1px solid var(--red);
  opacity: .55
}

.tp-split.is-image-left .tp-split-photo::before {
  inset: 28px 28px -28px -28px
}

.tp-split-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

/* ---------- Numbered steps ---------- */
.tp-steps {
  background: #fff;
  border-block: 1px solid var(--line)
}

.tp-steps-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1180px;
  counter-reset: none
}

.tp-step {
  position: relative;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 0;
  padding-bottom: 34px
}

.tp-step:last-child {
  padding-bottom: 0
}

.tp-step::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 94px;
  bottom: 0;
  width: 1px;
  background: var(--line)
}

.tp-step:last-child::before {
  display: none
}

.tp-step-num {
  font-size: 58px;
  font-weight: 200;
  line-height: 1;
  color: var(--red);
  letter-spacing: -1px;
  padding-top: 30px
}

.tp-step-card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: clamp(28px, 3.4vw, 48px) clamp(24px, 3.6vw, 56px);
  transition: border-color .25s
}

.tp-step-card:hover {
  border-color: #d2b9b9
}

.tp-step-card h3 {
  font-size: clamp(21px, 1.6vw, 26px);
  font-weight: 300;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 20px
}

/* ---------- List columns (must / must not) ---------- */
.tp-columns-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  max-width: 1380px;
  margin-inline: auto
}

.tp-column {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  padding: clamp(28px, 3.4vw, 52px)
}

.tp-column.is-negative {
  border-top-color: var(--navy)
}

.tp-column h3 {
  font-size: 24px;
  font-weight: 300;
  margin: 0 0 26px;
  color: var(--ink)
}

.tp-check-list {
  list-style: none;
  margin: 0;
  padding: 0
}

.tp-check-list li {
  position: relative;
  padding: 14px 0 14px 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.7;
  color: var(--body)
}

.tp-check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: var(--red);
  color: #fff
}

.tp-column.is-negative .tp-check-list li::before {
  content: '✕';
  background: var(--navy)
}

.tp-column.is-neutral .tp-check-list li::before {
  content: '✧';
  background: transparent;
  color: var(--red);
  font-size: 15px
}

/* ---------- Resources (dark band) ---------- */
.tp-resources {
  background: var(--navy);
  color: #fff
}

.tp-resources .tp-heading h2 {
  color: #fff
}

.tp-resources .tp-heading .eyebrow {
  color: #f26479
}

.tp-resources .tp-heading .tp-intro {
  color: #d0d3d9
}

.tp-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px
}

.tp-resource {
  display: flex;
  flex-direction: column;
  border: 1px solid #ffffff22;
  background: #ffffff08;
  padding: clamp(28px, 3vw, 44px);
  transition: background .25s, border-color .25s
}

.tp-resource:hover {
  background: #ffffff10;
  border-color: #ffffff40
}

.tp-resource-icon {
  width: 64px;
  height: 64px;
  padding: 16px;
  background: var(--cream);
  margin-bottom: 30px
}

.tp-resource h3 {
  font-size: 23px;
  font-weight: 300;
  margin: 0 0 14px;
  color: #fff
}

.tp-resource p {
  font-size: 15px;
  line-height: 1.7;
  color: #d0d3d9;
  margin: 0 0 26px
}

.tp-text-button {
  margin-top: auto;
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 6px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f26479;
  cursor: pointer;
  border-bottom: 1px solid currentColor
}

.tp-text-button:hover,
.tp-text-button:focus-visible {
  color: #fff
}

.tp-links {
  margin-top: 40px;
  padding: clamp(26px, 3vw, 40px);
  border: 1px solid #ffffff22
}

.tp-links h3 {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f26479
}

.tp-link-list {
  list-style: none;
  margin: 0;
  padding: 0
}

.tp-link-list li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-top: 1px solid #ffffff1a;
  font-size: 15px;
  line-height: 1.7;
  color: #d0d3d9
}

.tp-link-list li::before {
  content: '✧';
  position: absolute;
  left: 0;
  top: 12px;
  color: #f26479
}

.tp-resources .tp-links a {
  color: #fff
}

/* ---------- Popups ---------- */
.tp-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 0;
  padding: clamp(30px, 5vw, 56px);
  background: var(--cream);
  color: var(--ink)
}

.tp-dialog::backdrop {
  background: rgba(9, 18, 30, .78)
}

.tp-dialog h2 {
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 200;
  margin: 18px 0 16px
}

.tp-dialog>p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  margin: 0 0 14px
}

.tp-dialog .dialog-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: 0;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink)
}

.tp-dialog .tp-form {
  margin-top: 26px
}

/* ---------- Help topics (maintenance) ---------- */
.tp-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px
}

.tp-help-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(28px, 3.4vw, 48px)
}

.tp-help-num {
  position: absolute;
  top: 26px;
  right: 30px;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--red)
}

.tp-help-card h3 {
  font-size: 23px;
  font-weight: 300;
  margin: 0 0 20px;
  padding-left: 18px;
  border-left: 2px solid var(--red);
  line-height: 1.35;
  color: var(--ink)
}

.tp-help-card .tp-rich {
  font-size: 15px
}

.tp-help-note {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--navy);
  color: #fff;
  padding: clamp(26px, 3vw, 40px) clamp(26px, 3.6vw, 56px)
}

.tp-help-note p {
  margin: 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6
}

.tp-help-note .button {
  flex: none
}

/* ---------- Request form ---------- */
.tp-form-section {
  background: #fff;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px
}

.tp-form-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: start
}

.tp-form-aside {
  position: sticky;
  top: 40px
}

.tp-form-aside .eyebrow {
  margin-bottom: 26px
}

.tp-form-aside h2 {
  margin-bottom: 26px
}

.tp-policy {
  margin-top: 26px;
  background: var(--cream);
  border-left: 3px solid var(--red);
  padding: 22px 26px
}

.tp-policy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink)
}

.tp-emergency {
  display: inline-block;
  margin-top: 34px;
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  text-decoration: none
}

.tp-emergency small {
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px
}

.tp-form-card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: clamp(26px, 4vw, 56px)
}

.tp-form .form-grid label,
.tp-form .tp-choice legend {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink)
}

.tp-form .tp-req {
  color: var(--red)
}

.tp-form .form-grid textarea {
  min-height: 150px;
  resize: vertical
}

.tp-form .form-grid input:focus,
.tp-form .form-grid select:focus,
.tp-form .form-grid textarea:focus {
  outline: 2px solid #db5367;
  outline-offset: 1px
}

.tp-choice {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0
}

.tp-choice legend {
  padding: 0;
  margin-bottom: 12px
}

.tp-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px
}

.tp-form .form-grid .tp-choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 300;
  cursor: pointer
}

.tp-form .form-grid .tp-choice-row input {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--red)
}

.tp-form .form-grid .tp-file input {
  background: #fff;
  border: 1px dashed #c9c5b9;
  padding: 18px;
  cursor: pointer
}

.tp-help-text {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 300;
  color: #6c6c68
}

.tp-form .is-invalid input,
.tp-form .is-invalid select,
.tp-form .is-invalid textarea {
  border-color: var(--red)
}

.tp-field-error {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: var(--red)
}

.tp-form .button {
  border: 0;
  padding: 0;
  background: transparent;
  margin-top: 28px;
  cursor: pointer
}

.tp-form .button[disabled] {
  opacity: .6;
  cursor: progress
}

.tp-status {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.6
}

.tp-status.is-error {
  color: var(--red)
}

.tp-success {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid #2f7d4f;
  padding: 26px 30px
}

.tp-success h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 300
}

.tp-success p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--body)
}

.tp-success .button {
  margin-top: 20px
}

.tp-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {

  .tp-split,
  .tp-form-layout {
    grid-template-columns: 1fr
  }

  .tp-split-photo {
    min-height: 380px;
    margin-right: 28px
  }

  .tp-split.is-image-left .tp-split-photo {
    order: 0;
    margin: 0 0 0 28px
  }

  .tp-form-aside {
    position: static
  }

  .tp-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width: 800px) {
  .tp-heading {
    margin-bottom: 44px
  }

  .tp-columns-grid,
  .tp-help-grid,
  .tp-resource-grid {
    grid-template-columns: 1fr
  }

  .tp-step {
    grid-template-columns: 1fr;
    padding-bottom: 24px
  }

  .tp-step::before {
    display: none
  }

  .tp-step-num {
    font-size: 40px;
    padding: 0 0 12px
  }

  .tp-help-note {
    flex-direction: column;
    align-items: flex-start
  }

  .tp-split-photo {
    min-height: 300px
  }
}

@media (max-width: 600px) {
  .tp-form .form-grid {
    grid-template-columns: 1fr
  }

  .tp-emergency {
    font-size: 24px
  }
}

@media (prefers-reduced-motion: reduce) {

  .tp-step-card,
  .tp-resource {
    transition: none
  }
}