:root {
  --hardship-ink: #0b1f33;
  --hardship-border: #e4d7c1;
  --hardship-cream: #f8f2e8;
  --hardship-sand: #f4e9d7;
  --hardship-gold: #d4a047;
  --hardship-teal: #0f6b5a;
  --hardship-slate: #31465f;
}

body {
  background: linear-gradient(180deg, #f7f1e6 0%, #fbf8f2 55%, #fff 100%);
  color: var(--hardship-ink);
}

.hardship-hero {
  text-align: left;
}

.hardship-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 48px;
  max-width: 900px;
  margin: 0 auto;
}

.tt-card {
  border: 1px solid var(--hardship-border);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(7, 20, 37, 0.06);
  padding: 22px;
  background: #fff;
}

.hardship-locked {
  border: 2px dashed #cbb99a;
  background: #fff8eb;
  text-align: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 18px;
  align-items: center;
}

.summary-text {
  margin-top: 6px;
  font-size: 1rem;
  color: #273d55;
}

.hardship-message .summary-text {
  margin-top: 0;
}

.summary-meta {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-meta .meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b6f86;
}

.summary-meta .meta-value {
  font-size: 1.05rem;
  font-weight: 800;
}

.summary-badge {
  justify-self: end;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  text-align: center;
  border: 1px solid var(--hardship-border);
  background: var(--hardship-sand);
}

.summary-badge.good {
  background: #e4f4ee;
  color: #0f6b5a;
  border-color: #b8e1d2;
}

.summary-badge.warn {
  background: #fff1d6;
  color: #9a5d00;
  border-color: #f5d59e;
}

.summary-badge.pending {
  background: #e8f1ff;
  color: #1f5ea8;
  border-color: #bfd5f6;
}

.summary-badge.review {
  background: #fff1d6;
  color: #9a5d00;
  border-color: #f5d59e;
}

.summary-badge.bad {
  background: #ffe7e7;
  color: #b00020;
  border-color: #f2b8c1;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pill-status {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hardship-border);
  font-weight: 800;
  background: #f7f1e6;
}

.pill-status.good {
  background: #e8f7f0;
  color: #0f6b5a;
  border-color: #b8e1d2;
}

.pill-status.pending {
  background: #e8f1ff;
  color: #1f5ea8;
  border-color: #bfd5f6;
}

.pill-status.review {
  background: #fff1d6;
  color: #9a5d00;
  border-color: #f5d59e;
}

.pill-status.bad {
  background: #ffe7e7;
  color: #b00020;
  border-color: #f2b8c1;
}

.reason-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--hardship-slate);
}

.determination-copy {
  margin-top: 12px;
  color: var(--hardship-slate);
  display: grid;
  gap: 14px;
}

.determination-metrics,
.determination-explanations,
.determination-disclaimers {
  display: grid;
  gap: 8px;
}

.determination-metric {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  line-height: 1.45;
}

.determination-label {
  font-weight: 800;
  color: var(--hardship-ink);
}

.determination-value {
  color: var(--hardship-slate);
}

.determination-explanation {
  margin: 0;
  font-size: 0.92rem;
  color: #325d91;
  font-style: italic;
  line-height: 1.45;
}

.determination-review-notice {
  padding: 14px 16px;
  border: 1px solid #b9d6f2;
  border-radius: 12px;
  background: #eef7ff;
  display: grid;
  gap: 8px;
}

.determination-review-title {
  margin: 0;
  color: #0b1f33;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.3;
}

.determination-review-list {
  margin: 0;
  padding-left: 18px;
  color: #243b53;
  font-size: 0.9rem;
  line-height: 1.45;
}

.determination-disclaimers {
  padding: 14px 18px;
  gap: 8px;
}

.determination-disclaimers-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--hardship-ink);
  cursor: pointer;
}

.determination-disclaimer {
  margin: 0;
  font-size: 0.86rem;
  color: #4a5f76;
  line-height: 1.45;
}

.irs-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #405469;
  font-style: italic;
}

.ppia-range {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--hardship-cream);
}

.ppia-range .label {
  font-size: 0.85rem;
  color: #5b6f86;
}

.ppia-range .value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hardship-ink);
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.snapshot-grid .label {
  font-size: 0.85rem;
  color: #5b6f86;
}

.snapshot-grid .value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--hardship-ink);
}

.data-source {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #4d6278;
}

#hardship-notes textarea {
  width: 100%;
  min-height: 140px;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid var(--hardship-border);
  padding: 12px;
  font-size: 0.95rem;
  resize: vertical;
  background: #fffdf9;
}

.note-save {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.note-save-btn {
  border: 2px solid #1854ad;
  background: #2a7ff1;
  color: #fff;
  min-width: 152px;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(31, 94, 168, 0.18);
}

.note-save-btn:hover,
.note-save-btn:focus-visible {
  background: #1f6fd6;
  color: #fff;
  border-color: #174a83;
}

.note-status {
  font-size: 0.85rem;
  color: #5b6f86;
}

.note-help {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #5b6f86;
}

.hardship-disclaimer {
  margin: 18px auto 10px;
  max-width: 900px;
  text-align: center;
  font-size: 0.92rem;
  color: #2b4060;
  font-style: italic;
}

@media (max-width: 720px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-badge {
    justify-self: start;
  }
}
