/* cathedir.com payment pages. Brand tokens from daily-ops BRAND_STYLE.md:
   Cathedral Navy #14243C, Community Teal #3C7C84, Connection Orange #C8743C (rules and
   borders only), Neighbor Slate #7884A4, Service Gray #6B7588, Soft Gray #F4F4F4.
   One spacing scale on an 8 px unit. Mobile first; no script. */
:root {
  --navy: #14243c;
  --teal: #3c7c84;
  --teal-text: #2f666d;
  --orange: #c8743c;
  --slate: #7884a4;
  --gray: #6b7588;
  --ink-soft: #4a5366;
  --line: #d9dce3;
  --soft: #f4f4f4;
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 32px;
  --s6: 48px;
  --radius: 6px;
  --tap: 48px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--soft);
  color: var(--navy);
  font: 17px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Header and footer */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: var(--s3);
  border-bottom: 3px solid var(--orange);
}
.site-header .inner, main, .site-footer .inner { max-width: 36rem; margin: 0 auto; }
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: var(--tap);  /* the same height signed in (Sign out) or not */
}
.lockup { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.mark { display: block; width: 40px; height: auto; flex: none; }
.brand { font-size: 1.125rem; font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.25; }
.tagline { font: italic .875rem/1.35 Georgia, "Times New Roman", serif; margin: 2px 0 0; color: #e6e9f0; }
.signout { margin: 0; flex: none; }
.link-button {
  min-height: var(--tap);
  padding: 0 var(--s2);
  font: inherit;
  font-size: .9375rem;
  color: #fff;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.site-footer { padding: 0 var(--s3) var(--s5); color: var(--ink-soft); font-size: .9375rem; }

/* Page */
main { padding: var(--s4) var(--s3); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4) var(--s3);
  margin-bottom: var(--s3);
}
.card > :last-child { margin-bottom: 0; }
h1 { font-size: 1.625rem; line-height: 1.2; margin: 0 0 var(--s2); }
h2 { font-size: 1.125rem; line-height: 1.3; margin: var(--s4) 0 var(--s2); color: var(--teal-text); }
.card > h2:first-child { margin-top: 0; }
p { margin: 0 0 var(--s3); }
a { color: var(--teal-text); }
.lead { font-size: 1.0625rem; }
.fine { font-size: .875rem; color: var(--ink-soft); }
.hint { font-size: .875rem; color: var(--ink-soft); margin: var(--s1) 0 0; }
.business { font-weight: 700; font-size: 1.0625rem; margin: 0 0 var(--s1); }
.meta { color: var(--gray); margin: 0 0 var(--s3); }
.actions { margin: var(--s4) 0 0; }
.text-link { display: inline-block; min-height: var(--tap); line-height: var(--tap); }
.back { margin: 0; padding: 0 var(--s1); }

/* Forms */
.stack { margin-top: var(--s4); }
.field { margin-bottom: var(--s3); }
label { display: block; font-weight: 700; margin: 0 0 var(--s1); }
input[type=text], input[type=email] {
  width: 100%;
  min-height: var(--tap);
  font: inherit;
  padding: 10px 12px;
  border: 2px solid var(--gray);
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: var(--s4) 0 0;
  padding: 12px var(--s3);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: #fff;
  cursor: pointer;
}
a.btn { line-height: 24px; }
.btn-secondary { background: #fff; color: var(--navy); }
.btn-pay { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: 0; text-align: left; }
.btn-amount { white-space: nowrap; }
.pay-options form { margin: 0 0 var(--s3); }

/* Amount and status */
.amount-block { margin: var(--s4) 0; }
.amount-label { font-size: .875rem; color: var(--gray); margin: 0; }
.amount { font-size: 2.25rem; font-weight: 700; line-height: 1.15; margin: 0 0 var(--s2); }
.badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.6;
  border: 2px solid var(--navy);
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  white-space: nowrap;
}
.badge-open { background: var(--navy); color: #fff; }
.badge-paid, .badge-received { border-color: var(--teal); color: var(--teal-text); }
.badge-processing { border-color: var(--slate); border-style: dashed; }
.badge-not_due { border-color: var(--gray); color: var(--ink-soft); }
.badge-unavailable { border-color: var(--orange); }
.status-message {
  border-left: 4px solid var(--teal);
  background: var(--soft);
  padding: var(--s2) 12px;
}
.notice {
  border: 2px solid var(--navy);
  border-radius: 4px;
  padding: var(--s2) 12px;
  background: #fff;
}

/* Invoice lists */
.invoice-list { list-style: none; margin: var(--s3) 0; padding: 0; border-top: 1px solid var(--line); }
.invoice-list li { border-bottom: 1px solid var(--line); }
.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 64px;
  padding: 12px 0;
  color: var(--navy);
  text-decoration: none;
}
a.invoice-row { padding-right: var(--s4); position: relative; }
a.invoice-row::after {
  content: "\203A";
  position: absolute;
  right: var(--s1);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--gray);
}
a.invoice-row:hover .row-title { text-decoration: underline; }
.row-main, .row-side { display: flex; flex-direction: column; gap: 2px; }
.row-main { min-width: 0; }
.row-side { align-items: flex-end; text-align: right; flex: none; }
.row-title { font-weight: 700; }
.row-meta, .row-note { font-size: .875rem; color: var(--ink-soft); }
.row-amount { font-weight: 700; }

@media (min-width: 40rem) {
  main { padding-top: var(--s5); }
  .card { padding: var(--s5); }
  h1 { font-size: 2rem; }
}

/* Narrow phones: the signed-in header has Sign out beside the wordmark, so the tagline wraps; drop it there. */
@media (max-width: 420px) { .signed-in .tagline { display: none; } }
