/* Accessible visually-hidden utility */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Honeypot anti-spam field */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Current page indicator (not color-only) */
.gh-head .nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

/* Visible focus indicator */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}

/* Ensure email input meets >= 16px to prevent iOS zoom */
.cover-form input[type="email"] {
  font-size: max(16px, 1.6rem);
  padding-inline-end: 132px;
}

/* Validation feedback: only after user interaction */
.form-feedback {
  display: none;
  margin-top: 0.9rem;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-size: 1.4rem;
  line-height: 1.4;
  text-align: left;
}

.form-error {
  background-color: rgba(252, 232, 230, 0.96);
  color: #b3261e;
  border: 1px solid #d93025;
}

.form-status {
  background-color: rgba(255, 255, 255, 0.95);
  color: #15171a;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  color: #137333;
  border: 1px solid #188038;
}

.form-status.is-error {
  color: #b3261e;
  border: 1px solid #d93025;
}

.cover-form input:is(:user-invalid, .user-invalid-fallback) {
  border-color: #d93025;
  background-color: #fce8e6;
  color: #15171a;
}

.cover-form input:is(:user-invalid, .user-invalid-fallback) ~ .form-error {
  display: block;
}

.cover-form input:is(:user-valid, .user-valid-fallback) {
  border-color: #188038;
}

/* Ensure nav links are always visible without Ghost's dropdown JS */
body:not(.is-dropdown-loaded) .gh-head-menu .nav > li {
  opacity: 1;
}

/* Fullscreen homepage layout with no extra bottom padding */
.home-template.with-full-cover .site {
  min-height: 100vh;
  min-height: 100dvh;
}

.home-template.with-full-cover .cover {
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 100px;
  padding-bottom: 2.4rem;
}

.cover-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 2.4rem;
  margin-top: 2.4rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.cover-links a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.cover-links a:hover {
  opacity: 0.85;
}

.cover-foot {
  position: relative;
  z-index: 10;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
}

/* Ensure header stays legible when mobile menu is open */
.is-head-open .gh-head {
  background-color: var(--color-white);
  color: var(--color-darker-gray);
}

.is-head-open .gh-head .nav > li a,
.is-head-open .gh-head .gh-head-logo {
  color: var(--color-darker-gray);
}

.is-head-open .gh-head .gh-burger:before,
.is-head-open .gh-head .gh-burger:after {
  background-color: var(--color-darker-gray);
}

/* Turnstile container */
.turnstile-slot:not(:empty) {
  margin-top: 1.2rem;
}

/* Supporters page */
.badge-preview-card {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
  align-items: center;
  padding: 2.4rem;
  margin: 2rem 0 3.2rem;
  border: 1px solid var(--color-light-gray);
  border-radius: 6px;
  background-color: var(--color-lighter-gray);
}

.badge-preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 2rem;
  background-color: #ffffff;
  border: 1px solid var(--color-light-gray);
  border-radius: 4px;
}

.badge-snippet-wrap {
  flex: 1 1 300px;
}

.badge-snippet-label {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.badge-snippet-code {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  line-height: 1.5;
  padding: 1rem 1.2rem;
  border: 1px solid var(--color-mid-gray);
  border-radius: 4px;
  background-color: #ffffff;
  color: var(--color-darker-gray);
  resize: vertical;
}

.badge-snippet-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.copy-status {
  font-size: 1.4rem;
  font-weight: 600;
  color: #137333;
}

.supporter-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0 3.6rem;
}

.supporter-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.supporter-field label {
  font-weight: 700;
  font-size: 1.5rem;
}

.field-hint {
  font-size: 1.35rem;
  color: #5f6368;
}

.supporter-field input {
  width: 100%;
  font-size: max(16px, 1.6rem);
  padding: 1rem 1.2rem;
  min-height: 48px;
  border: 1px solid #767676;
  border-radius: 4px;
  background-color: #ffffff;
  color: var(--color-darker-gray);
}

.supporter-field input:is(:user-invalid, .user-invalid-fallback) {
  border-color: #d93025;
  background-color: #fce8e6;
}

.supporter-field input:is(:user-invalid, .user-invalid-fallback) + .form-error {
  display: block;
}

.supporter-field input:is(:user-valid, .user-valid-fallback) {
  border-color: #188038;
}

.supporter-submit-btn {
  align-self: flex-start;
  min-height: 48px;
  padding: 0 2.4rem;
}

.supporters-subtitle {
  color: #5f6368;
  margin-bottom: 2rem;
}

.supporters-list {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.6rem;
}

.supporter-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem 1.6rem;
  padding: 1.4rem 1.8rem;
  border: 1px solid var(--color-light-gray);
  border-radius: 6px;
  background-color: #ffffff;
}

.supporter-link {
  font-weight: 700;
  font-size: 1.7rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  word-break: break-word;
}

.supporter-meta {
  font-size: 1.35rem;
  color: #5f6368;
}

.supporters-empty,
.supporters-loading {
  color: #5f6368;
  font-style: italic;
}
