:root {
  --text: #1f1d1a;
  --muted: #5d584f;
  --line: rgba(78, 68, 52, 0.16);
  --gold: #b0873c;
  --gold-deep: #8a6427;
  --green: #2d5b48;
  --green-deep: #203f32;
  --blue: #31556d;
  --surface: rgba(255, 252, 247, 0.82);
  --surface-strong: #fffdf9;
  --paper: #f6f2eb;
  --shadow: 0 24px 60px rgba(43, 37, 28, 0.12);
  --max: 1180px;
  --anchor-offset: 96px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /*scroll-padding-top: var(--anchor-offset);*/
  scroll-padding-top: 0;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.55;
  background: url("../images/photo-1518998053901-5348d3961a04.png") center/cover fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

[id] {
  scroll-margin-top: var(--anchor-offset);
}

.page-shell {
  min-height: 100vh;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 242, 235, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.header-inner {
  min-height: 74px;
}

.footer-inner {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 44px;
  height: auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy span,
.footer-note,
.feature p,
.step p,
.bullet-list p,
.admin-list p,
.checkpoint-list p,
.summary-block p,
.summary-list span,
.section-intro,
.section-intro p {
  color: var(--muted);
}

.brand-copy span {
  font-size: 0.88rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-grid,
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.hero-copy {
  padding: 1rem 0 2rem;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border: 1px solid rgba(138, 100, 39, 0.24);
  background: rgba(255, 250, 241, 0.82);
  color: var(--gold-deep);
  border-radius: 999px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.kicker-light {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.02;
}

h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  max-width: 10.5ch;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.hero-copy p,
.section-intro,
.section-intro p,
.summary-block p,
.closing-panel p {
  max-width: 58ch;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.9rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: 160ms ease;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(45, 91, 72, 0.24);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--green-deep);
}

.btn-secondary {
  background: rgba(255, 252, 247, 0.74);
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #fff;
}

.btn-light {
  background: #fff;
  color: var(--green-deep);
  box-shadow: none;
}

.btn-light:hover,
.btn-light:focus-visible {
  background: #f3eee7;
}

.btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
  background: transparent;
}

.btn-outline-light:hover,
.btn-outline-light:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.trust-row span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 0.55rem;
  border-radius: 999px;
  background: var(--gold);
  vertical-align: middle;
}

.hero-aside,
.feature,
.step {
  border-radius: 8px;
}

.hero-aside {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.summary-block {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.summary-block h2 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.summary-list li {
  display: grid;
  gap: 0.18rem;
  padding: 0.85rem 0;
}

.summary-list li + li {
  border-top: 1px solid var(--line);
}

section {
  padding: 2.5rem 0;
}

.section-stack {
  display: grid;
  gap: 1.5rem;
}

.section-intro {
  max-width: 70ch;
}

.section-intro h2,
.split-section h2,
.closing-panel h2 {
  margin-bottom: 0.7rem;
}

.feature-grid,
.steps {
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature,
.step {
  background: rgba(255, 252, 247, 0.78);
  border: 1px solid rgba(92, 77, 57, 0.1);
  padding: 1.2rem;
  box-shadow: 0 10px 24px rgba(43, 37, 28, 0.06);
}

.feature strong,
.step strong,
.bullet-list strong,
.summary-list strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.goods-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.good-card {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-height: 220px;
}

.good-number {
  color: var(--gold-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.band {
  background: linear-gradient(180deg, rgba(225, 234, 228, 0.7), rgba(243, 239, 232, 0.32));
  border-top: 1px solid rgba(45, 91, 72, 0.12);
  border-bottom: 1px solid rgba(45, 91, 72, 0.12);
}

.bullet-list {
  display: grid;
  gap: 1rem;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.closing {
  padding-bottom: 4.5rem;
}

.closing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 1.4rem;
  padding: 1.6rem;
  background: linear-gradient(135deg, rgba(49, 85, 109, 0.95), rgba(26, 61, 53, 0.95));
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.closing-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.9rem;
}

footer {
  padding: 0 0 2rem;
}

.user-shell {
  display: flex;
  flex-direction: column;
}

.user-header {
  width: min(var(--max), calc(100% - 2rem));
}

.logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.72);
  color: var(--muted);
  font-weight: 600;
  transition: 160ms ease;
  white-space: nowrap;
}

.logout-link:hover,
.logout-link:focus-visible {
  background: #fff;
  color: var(--text);
}

.user-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 7vh, 4.5rem) 0 clamp(1rem, 4vh, 2.5rem);
}

.welcome-panel {
  align-self: center;
  justify-self: center;
  width: min(620px, 100%);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.welcome-panel h1 {
  max-width: 13ch;
  margin: 0 auto;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
  justify-content: center;
  gap: 0.9rem;
  padding-top: clamp(2rem, 5vh, 4rem);
}

.letters-main {
  display: block;
}

.letters-panel {
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: left;
}

.letters-panel h2,
.letters-panel .kicker {
  display: block;
  text-align: center;
}

.letter-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.letter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.72);
}

.letter-item h3,
.letter-item p {
  margin: 0;
}

.letter-item p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.letter-status {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.request-letter-main {
  display: block;
}

.request-letter-panel {
  width: min(780px, 100%);
  margin: 0 auto;
  text-align: left;
}

.request-letter-heading {
  max-width: 600px;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.request-letter-heading .kicker {
  margin-bottom: 0.75rem;
}

.request-letter-heading h1 {
  max-width: none;
  font-size: clamp(2.35rem, 6vw, 3.6rem);
}

.request-letter-heading p {
  margin: 0.8rem auto 0;
  color: var(--muted);
  font-size: 1rem;
}

.request-letter-form {
  display: grid;
  gap: 1.25rem;
}

.profile-note {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(45, 91, 72, 0.16);
  border-radius: 8px;
  background: rgba(220, 236, 226, 0.5);
}

.profile-note-icon {
  display: grid;
  flex: 0 0 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
}

.profile-note-icon::before {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.profile-note > div > strong,
.profile-note > div > span {
  display: block;
}

.profile-note > div > span {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.56);
}

.form-section legend {
  padding: 0 0.5rem;
  color: var(--green-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  display: grid;
  align-content: start;
  gap: 0.38rem;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.request-letter-form label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.request-letter-form label span {
  color: #7a746b;
  font-size: 0.84rem;
  font-weight: 400;
}

.request-letter-form input,
.request-letter-form select,
.request-letter-form textarea {
  min-height: 46px;
  border-color: rgba(78, 68, 52, 0.22);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.request-letter-form textarea {
  min-height: 88px;
}

.request-letter-form input:hover,
.request-letter-form select:hover,
.request-letter-form textarea:hover {
  border-color: rgba(78, 68, 52, 0.38);
}

.request-letter-form input:focus-visible,
.request-letter-form select:focus-visible,
.request-letter-form textarea:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(49, 85, 109, 0.1);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding-top: 0.25rem;
}

.form-actions .letter-status:not(:empty) {
  flex-basis: 100%;
  order: -1;
}

.request-letter-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.request-letter-form [hidden] {
  display: none;
}

.settings-panel {
  width: min(760px, 100%);
}

.profile-photo-form {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.profile-photo-preview {
  display: grid;
  place-items: center;
  width: 190px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(49, 85, 109, 0.08);
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-loading {
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.profile-photo-controls {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.profile-photo-controls h3,
.profile-photo-controls p {
  margin: 0;
}

.profile-photo-file-label {
  color: var(--green-deep);
  font-weight: 700;
}

.profile-photo-controls input[type="file"] {
  padding: 0.55rem;
}

.profile-photo-selection {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-photo-controls button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.profile-photo-preview [hidden] {
  display: none;
}

.page-title {
  padding: 3.5rem 0 1.5rem;
}

.page-title h1 {
  max-width: 12ch;
  margin-bottom: 0.9rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
}

.content-stack {
  display: grid;
  gap: 1.5rem;
}

.panel {
  background: rgba(255, 252, 247, 0.8);
  border: 1px solid rgba(92, 77, 57, 0.1);
  border-radius: 8px;
  padding: 1.3rem;
  box-shadow: 0 10px 24px rgba(43, 37, 28, 0.06);
}

.panel h2 {
  font-size: 1.55rem;
  margin-bottom: 0.7rem;
}

.panel-heading,
.roster-controls,
.priest-row,
.priest-status-area,
.priest-actions,
.dialog-heading,
.dialog-actions {
  display: flex;
  gap: 1rem;
}

.panel-heading > .btn {
  flex: 0 0 auto;
}

.panel-heading,
.priest-row,
.dialog-heading {
  justify-content: space-between;
}

.panel-intro,
.priest-meta,
.priest-notes,
.priest-decision-note,
.empty-state {
  color: var(--muted);
}

.panel-intro {
  margin: 0;
}

.roster-controls {
  align-items: end;
  margin: 1.35rem 0 1rem;
}

.roster-controls label,
.decision-dialog label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.roster-controls label:first-child {
  flex: 1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  background: var(--surface-strong);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid rgba(49, 85, 109, 0.38);
  outline-offset: 2px;
}

.priest-roster {
  border-top: 1px solid var(--line);
}

.priest-row {
  align-items: center;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

.priest-name {
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.35;
}

.priest-meta,
.priest-notes,
.priest-decision-note {
  margin: 0.22rem 0 0;
  font-size: 0.92rem;
}

.priest-decision-note {
  color: var(--gold-deep);
}

.priest-status-area {
  align-items: flex-end;
  flex-direction: column;
  min-width: max-content;
}

.priest-actions {
  gap: 0.55rem;
}

.priest-actions .btn {
  min-height: 40px;
  padding: 0.58rem 0.8rem;
  font-size: 0.88rem;
}

.status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.25rem 0.58rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-due { background: #f4e8cd; color: #76500e; }
.status-confirmed { background: #dcece2; color: var(--green-deep); }
.status-expired { background: #f4dddd; color: #8a2828; }
.status-denied { background: #f4dddd; color: #7b2d2d; }
.status-not-eligible { background: #e6e9ec; color: #3d4d59; }

.verification-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.verification-main {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 3.5rem 1rem;
}

.verification-card {
  width: min(780px, 100%);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid rgba(92, 77, 57, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.verification-card h1 {
  max-width: none;
  font-size: clamp(2.25rem, 7vw, 3.7rem);
}

.verification-status {
  min-height: 1.5em;
  margin: 1.5rem 0 0;
  color: var(--muted);
}

.verification-status[data-kind="error"] {
  color: #8a2828;
}

.priest-verification-result:focus {
  outline: none;
}

.credential-profile-header {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  text-align: left;
}

.public-profile-photo-frame {
  position: relative;
  width: 152px;
  aspect-ratio: 4 / 5;
  overflow: visible;
  border: 1px solid rgba(78, 68, 52, 0.18);
  border-radius: 12px;
  background: linear-gradient(145deg, #ebe4d8, #faf6ef);
  box-shadow: 0 12px 28px rgba(43, 37, 28, 0.14);
}

.public-profile-photo,
.public-profile-photo-fallback {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.public-profile-photo {
  display: block;
  object-fit: cover;
}

.public-profile-photo-fallback {
  display: grid;
  place-items: center;
  color: var(--gold-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.25rem;
  font-weight: 700;
}

.credential-identity .kicker {
  margin-bottom: 0.65rem;
}

.credential-confirmation {
  position: absolute;
  right: -10px;
  bottom: -10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 4px solid var(--surface-strong);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.identity-lead {
  margin: 0.4rem 0 0.25rem;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.priest-verification-title {
  margin: 0.75rem 0 0;
  color: var(--gold-deep);
  font-weight: 700;
}

.public-standing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: #dcece2;
  color: var(--green-deep);
  font-size: 0.86rem;
  font-weight: 700;
}

.public-standing-badge::before {
  content: "✓";
}

.credential-details {
  display: grid;
  gap: 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.credential-details > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.credential-details dt {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.credential-details dd {
  margin: 0;
  font-weight: 600;
}

.credential-detail-secondary {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.public-profile-section {
  margin-top: 1.75rem;
  text-align: left;
}

.public-profile-section h2 {
  margin: 0 0 0.8rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

.faculty-list,
.statement-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faculty-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.faculty-list li {
  padding: 0.4rem 0.68rem;
  border: 1px solid rgba(45, 91, 72, 0.18);
  border-radius: 999px;
  background: rgba(220, 236, 226, 0.48);
  color: var(--green-deep);
  font-size: 0.86rem;
  font-weight: 600;
}

.statement-list {
  display: grid;
  gap: 0.55rem;
}

.statement-list li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--muted);
}

.statement-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}

.credential-note {
  margin: 1.4rem auto 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.verification-card [hidden] {
  display: none;
}

.access-link-panel {
  width: min(760px, 100%);
  margin: 0 auto 1.5rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.75);
  text-align: left;
}

.access-link-panel h3,
.access-link-panel p {
  margin: 0;
}

.access-link-panel > div:first-child p {
  margin-top: 0.35rem;
  color: var(--muted);
}

.access-link-control {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.access-link-control label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.access-link-row {
  display: flex;
  gap: 0.65rem;
}

.access-link-row input {
  min-width: 0;
}

.access-link-row .btn {
  flex: 0 0 auto;
}

.access-link-control .letter-status {
  text-align: left;
}

.access-link-control .letter-status[data-kind="error"] {
  color: #8a2828;
}

@media (max-width: 540px) {
  .credential-profile-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .public-profile-photo-frame {
    width: 132px;
  }

  .credential-details > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .access-link-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.priest-detail-link {
  color: inherit;
  text-decoration: none;
}

.priest-detail-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.priest-detail-link:focus-visible {
  outline: 3px solid rgba(49, 85, 109, 0.3);
  outline-offset: 3px;
}

.credential-review-action {
  margin-top: 1rem;
}

.empty-state {
  margin: 1.2rem 0 0;
}

.decision-dialog {
  width: min(560px, calc(100% - 2rem));
  border: 0;
  border-radius: 10px;
  padding: 0;
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.decision-dialog::backdrop {
  background: rgba(31, 29, 26, 0.52);
}

.decision-dialog form {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.decision-dialog h2 {
  font-size: 1.7rem;
}

.decision-dialog .kicker {
  margin-bottom: 0.65rem;
}

.dialog-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.dialog-close:hover { background: var(--paper); color: var(--text); }

.dialog-actions { justify-content: flex-end; }

.form-error {
  margin: 0;
  color: #8a2828;
  font-weight: 600;
}

.notice {
  position: fixed;
  z-index: 20;
  right: 1rem;
  bottom: 1rem;
  max-width: min(430px, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 8px;
  color: #fff;
  background: var(--green-deep);
  box-shadow: var(--shadow);
}

.priest-create-layout {
  align-items: start;
}

.priest-create-form {
  display: grid;
  gap: 1.5rem;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 0 0 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.form-section legend {
  margin-bottom: 0.55rem;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
}

.form-section .panel-intro {
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field-small {
  max-width: 12rem;
}

.form-field small {
  font-weight: 400;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
}

.checkbox-field input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

.form-actions button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
}

.form-status.is-success {
  color: var(--green-deep);
  border-color: rgba(45, 91, 72, 0.25);
  background: #e5f1e9;
}

.form-status.is-error {
  color: #7b2d2d;
  border-color: rgba(123, 45, 45, 0.22);
  background: #f8e9e9;
}

.provisioning-summary {
  position: sticky;
  top: 94px;
}

.admin-list,
.checkpoint-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.admin-list li,
.checkpoint-list li {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.admin-list li:first-child,
.checkpoint-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .split-section,
  .closing-panel,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-header {
    flex-direction: row;
    align-items: center;
  }

  .hero {
    padding-top: 2.8rem;
  }

  h1 {
    max-width: none;
  }

  .feature-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .user-header .brand {
    gap: 0.7rem;
  }

  .user-header .brand-mark {
    width: 40px;
  }

  .user-header .brand-copy span {
    display: none;
  }

  .logout-link {
    min-height: 42px;
    padding: 0.62rem 0.85rem;
  }

  .welcome-panel {
    padding: 1.2rem 1rem;
  }

  .welcome-panel h1 {
    max-width: 9ch;
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .request-letter-heading h1 {
    max-width: none;
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .form-section {
    padding: 1rem 0.85rem;
  }

  .profile-photo-form {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .profile-photo-controls {
    justify-items: stretch;
    width: 100%;
    text-align: left;
  }

  .action-row {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0.75rem;
  }

  .roster-controls,
  .panel-heading,
  .priest-row,
  .dialog-heading,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-heading > .btn {
    align-self: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .form-field-small {
    max-width: none;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .provisioning-summary {
    position: static;
  }

  .priest-status-area {
    align-items: flex-start;
    min-width: 0;
  }

  .priest-actions {
    width: 100%;
  }

  .priest-actions .btn,
  .dialog-actions .btn {
    flex: 1;
  }

  .dialog-close {
    align-self: flex-end;
    margin-top: -3.2rem;
  }
}

@media (max-width: 380px) {
  .user-header .brand-copy strong {
    font-size: 0.94rem;
  }

  .logout-link {
    padding-inline: 0.72rem;
  }
}
