.tp-shell {
  --tp-ink: #17231d;
  --tp-muted: #667069;
  --tp-gold: #b99142;
  --tp-gold-dark: #8d6b2e;
  --tp-line: #e8e4d9;
  --tp-paper: #fbfaf6;
  --tp-green: #173f30;
  box-sizing: border-box;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 22px 72px;
  color: var(--tp-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tp-shell * { box-sizing: border-box; }
.tp-hero { padding: 58px; border: 1px solid var(--tp-line); border-radius: 28px; background: radial-gradient(circle at 90% 0, rgba(185,145,66,.14), transparent 37%), linear-gradient(145deg,#fff 0,#fbf9f2 100%); box-shadow: 0 24px 70px rgba(27,40,31,.08); }
.tp-kicker, .tp-eyebrow { display: block; margin-bottom: 14px; color: var(--tp-gold-dark); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.tp-hero h1 { max-width: 760px; margin: 0 0 20px; font-family: Georgia,"Times New Roman",serif; font-size: clamp(40px,6vw,70px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
.tp-hero > p { max-width: 760px; margin: 0 0 34px; color: var(--tp-muted); font-size: 18px; line-height: 1.65; }
.tp-type-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-type-grid span { padding: 10px 14px; border: 1px solid #dfd7c4; border-radius: 999px; background: #fff; color: #37433c; font-size: 14px; font-weight: 650; }
.tp-principle { display: flex; align-items: flex-start; gap: 14px; margin-top: 34px; padding: 18px 20px; border-radius: 16px; background: var(--tp-green); color: #fff; }
.tp-principle p { margin: 0; color: #fff; font-size: 15px; line-height: 1.55; }
.tp-principle-icon { display: grid; flex: 0 0 25px; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--tp-gold); font-weight: 900; }

.tp-panel, .tp-dashboard { margin-top: 24px; padding: 34px; border: 1px solid var(--tp-line); border-radius: 22px; background: #fff; box-shadow: 0 12px 40px rgba(27,40,31,.05); }
.tp-panel h2, .tp-dashboard h2 { margin: 0 0 10px; font-family: Georgia,"Times New Roman",serif; font-size: 32px; font-weight: 500; }
.tp-panel p, .tp-dashboard p { color: var(--tp-muted); line-height: 1.6; }
.tp-apply-intro, .tp-status-row, .tp-dashboard-head, .tp-referral-box, .tp-form-end { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tp-apply-intro > div { max-width: 730px; }
.tp-button, .tp-copy { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 22px; border: 0; border-radius: 999px; background: var(--tp-green); color: #fff !important; font-size: 14px; font-weight: 750; text-decoration: none !important; cursor: pointer; transition: transform .18s ease,background .18s ease; }
.tp-button:hover, .tp-copy:hover { transform: translateY(-1px); background: #235c46; }

.tp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.tp-form label { display: flex; flex-direction: column; gap: 8px; }
.tp-form label span, .tp-referral-box label { color: #48534c; font-size: 13px; font-weight: 750; }
.tp-form input, .tp-form select, .tp-form textarea, .tp-referral-box input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #dcded8; border-radius: 11px; background: #fff; color: var(--tp-ink); font: inherit; outline: none; }
.tp-form textarea { resize: vertical; }
.tp-form input:focus, .tp-form select:focus, .tp-form textarea:focus, .tp-referral-box input:focus { border-color: var(--tp-gold); box-shadow: 0 0 0 3px rgba(185,145,66,.13); }
.tp-wide { grid-column: 1/-1; }
.tp-form-end { padding-top: 6px; }
.tp-form-end p { margin: 0; font-size: 13px; }
.tp-notice { margin: 24px 0 0; padding: 14px 18px; border-radius: 12px; font-weight: 650; }
.tp-success { background: #eaf7ef; color: #17653a; }
.tp-info { background: #eef3f8; color: #315a75; }
.tp-error { background: #fff0ef; color: #9e332f; }

.tp-status { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #eef1ee; color: #536059; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tp-status-pending { background: #fff4d9; color: #84610d; }
.tp-status-approved, .tp-status-available, .tp-status-paid { background: #e7f6ed; color: #216941; }
.tp-status-suspended, .tp-status-rejected, .tp-status-void { background: #f9e9e8; color: #903c36; }
.tp-dashboard-head { align-items: flex-start; }
.tp-rate { padding: 9px 13px; border-radius: 999px; background: #f4ecda; color: #73561d; font-weight: 800; }
.tp-referral-box { margin: 24px 0; padding: 18px; border: 1px solid var(--tp-line); border-radius: 16px; background: var(--tp-paper); }
.tp-referral-box > div { flex: 1; }
.tp-referral-box label { display: block; margin-bottom: 7px; }
.tp-referral-box input { min-height: 42px; background: #fff; }
.tp-copy { flex: 0 0 auto; }

.tp-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; }
.tp-metrics article, .tp-balance-row > div { padding: 20px; border: 1px solid var(--tp-line); border-radius: 15px; background: #fff; }
.tp-metrics span, .tp-balance-row span { display: block; margin-bottom: 8px; color: var(--tp-muted); font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.tp-metrics strong { font-family: Georgia,"Times New Roman",serif; font-size: 30px; font-weight: 500; }
.tp-balance-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-top: 13px; }
.tp-balance-row > div { background: var(--tp-paper); }
.tp-balance-row strong { font-size: 17px; }

.tp-profile-details { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--tp-line); border-radius: 14px; background: var(--tp-paper); }
.tp-profile-details summary { cursor: pointer; font-weight: 750; }
.tp-profile-details form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; margin-top: 16px; }
.tp-profile-details label { display: flex; flex-direction: column; gap: 7px; }
.tp-profile-details label span { font-size: 12px; font-weight: 750; }
.tp-profile-details input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dcded8; border-radius: 10px; background: #fff; font: inherit; }
.tp-profile-details .tp-button { min-height: 44px; }

.tp-ledger { margin-top: 30px; }
.tp-ledger-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.tp-ledger h3 { margin: 0; font-family: Georgia,"Times New Roman",serif; font-size: 24px; font-weight: 500; }
.tp-ledger-title p { max-width: 560px; margin: 0; font-size: 13px; }
.tp-table-wrap { margin-top: 15px; overflow-x: auto; border: 1px solid var(--tp-line); border-radius: 14px; }
.tp-table-wrap table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.tp-table-wrap th, .tp-table-wrap td { padding: 14px 16px; border-bottom: 1px solid var(--tp-line); text-align: left; font-size: 13px; }
.tp-table-wrap th { background: var(--tp-paper); color: #59645d; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.tp-table-wrap tbody tr:last-child td { border-bottom: 0; }
.tp-empty { color: var(--tp-muted); text-align: center !important; }
.tp-footnote { margin: 16px 0 0 !important; font-size: 12px; }
.tp-how { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 24px; }
.tp-how > div { padding: 28px; border: 1px solid var(--tp-line); border-radius: 19px; background: var(--tp-paper); }
.tp-how b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--tp-green); color: #fff; }
.tp-how h3 { margin: 17px 0 7px; font-size: 19px; }
.tp-how p { margin: 0; color: var(--tp-muted); font-size: 14px; line-height: 1.55; }

@media (max-width: 800px) {
  .tp-shell { padding: 22px 14px 48px; }
  .tp-hero { padding: 34px 24px; }
  .tp-type-grid {
    flex-wrap: nowrap;
    margin-right: -24px;
    padding-right: 24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tp-type-grid::-webkit-scrollbar { display: none; }
  .tp-type-grid span {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 12px;
  }
  .tp-panel, .tp-dashboard { padding: 24px; }
  .tp-apply-intro, .tp-status-row, .tp-dashboard-head, .tp-referral-box, .tp-form-end, .tp-ledger-title { align-items: stretch; flex-direction: column; }
  .tp-form { grid-template-columns: 1fr; }
  .tp-wide { grid-column: auto; }
  .tp-metrics { grid-template-columns: 1fr 1fr; }
  .tp-balance-row, .tp-how { grid-template-columns: 1fr; }
  .tp-referral-box .tp-copy { width: 100%; }
  .tp-profile-details form { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .tp-hero h1 { font-size: 38px; }
  .tp-metrics { grid-template-columns: 1fr; }
  .tp-type-grid span { font-size: 12px; }
  .tp-panel h2, .tp-dashboard h2 { font-size: 27px; }
}
