.page-preferences .topic-hero { min-height: 300px; }
.page-preferences .topic-hero-copy { padding: 36px 0 46px; }
.preferences-content { max-width: 760px; padding: 54px 0 76px; }
.preferences-content h2 { margin: 0 0 16px; color: var(--forest); font-family: "Barlow Condensed", sans-serif; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.preferences-content [hidden] { display: none; }
html.checking-preference-session #request-section { display: none; }
.session-check { display: none; align-items: center; gap: 14px; min-height: 96px; color: var(--forest); font-size: 1.15rem; font-weight: 700; }
html.checking-preference-session .session-check { display: flex; }
.session-check-spinner {
  width: 28px; height: 28px; flex: 0 0 auto; border: 4px solid rgba(13,59,37,.16);
  border-top-color: var(--river); border-radius: 50%; animation: preference-session-spin .8s linear infinite;
}
@keyframes preference-session-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .session-check-spinner { animation-duration: 2s; }
}
.preferences-form { margin-top: 24px; padding: clamp(18px, 4vw, 28px); background: var(--white); border-left: 4px solid var(--moss); }
.preferences-form label { color: var(--forest); }
.preferences-form .email-field { display: grid; gap: 6px; margin: 16px 0; font-weight: 700; }
.preferences-form input[type="email"] { width: 100%; min-height: 50px; padding: 10px 12px; border: 1px solid rgba(13,59,37,.48); border-radius: 3px; font: inherit; }
.preferences-form input:focus-visible { outline: 3px solid var(--river); outline-offset: 2px; }
.preferences-form fieldset { min-width: 0; margin: 20px 0; padding: 0; border: 0; }
.preferences-form legend { margin-bottom: 12px; font-weight: 700; }
.preference-options { display: grid; gap: 12px; }
.preference-options label { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid rgba(13,59,37,.22); line-height: 1.4; }
.preference-options input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--forest); }
.preference-options span { min-width: 0; }
.preferences-form .btn { min-height: 48px; max-width: 100%; white-space: normal; cursor: pointer; }
.preferences-form .btn:disabled { cursor: wait; opacity: .68; }
.preferences-result { margin-top: 20px; padding: 14px 16px; background: var(--white); border-left: 5px solid var(--moss); overflow-wrap: anywhere; }
.preferences-result[data-state="error"] { color: #8b2f28; border-left-color: #8b2f28; }
.preferences-email { overflow-wrap: anywhere; font-weight: 700; }

[data-preference-mode="preferences"] #request-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
[data-preference-mode="preferences"] #request-link .email-field { min-width: 0; margin: 0; }
[data-preference-mode="preferences"] #request-link .btn { min-height: 50px; }
@media (max-width: 560px) {
  [data-preference-mode="preferences"] #request-link { grid-template-columns: 1fr; }
}

.preferences-result[data-state="email-requested"] {
  padding: clamp(22px, 4vw, 32px); color: var(--forest); background: #dae6d6;
  border: 2px solid var(--forest); border-left-width: 7px;
}
.preferences-result[data-state="email-requested"] strong {
  display: block; margin-bottom: 12px; font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1;
}
.preferences-result[data-state="email-requested"] span { display: block; font-size: 1.15rem; line-height: 1.5; }

.preferences-content:has(#edit-preferences:not([hidden])) { max-width: 1180px; }
#edit-preferences:not([hidden]) {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  align-items: start; background: transparent; border: 0; padding: 0;
}
#edit-preferences > h2, #edit-preferences > .preferences-email,
#edit-preferences > #confirm-unsubscribe { grid-column: 1 / -1; margin-bottom: 0; }
#edit-preferences > .btn { grid-column: 1 / -1; justify-self: start; }
.preferences-panel {
  min-width: 0; padding: clamp(18px, 3vw, 28px); background: var(--white);
  border: 1px solid rgba(13,59,37,.22); border-top: 4px solid var(--moss);
}
.preferences-panel h3 {
  margin: 0 0 16px; color: var(--forest); font-family: "Barlow Condensed", sans-serif;
  font-size: 2rem; line-height: 1.1;
}
.preferences-panel > p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  #edit-preferences:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
}

#edit-preferences .preference-options label:has(input:disabled) { opacity: .6; }

.supporter-account-bar { position: relative; z-index: 30; display: flex; flex: 0 1 220px; justify-content: flex-end; min-width: 0; max-width: 100%; }
.supporter-account-bar[hidden] { display: none; }
[data-preference-mode="manage"] .nav-inner { gap: 16px; }
@media (max-width: 1080px) {
  [data-preference-mode="manage"] .nav-inner { flex-wrap: wrap; padding-block: 10px; }
  [data-preference-mode="manage"] .nav-menu-toggle { margin-left: auto; }
  .supporter-account-bar { margin-left: auto; }
}
.supporter-account { position: relative; min-width: 0; width: 100%; color: var(--forest); }
.supporter-account summary {
  position: relative; display: block; height: 38px; padding: 0 30px 0 10px;
  background: #edf1f3; border: 1px solid #bdcbd1;
  border-radius: 3px; font-size: .9rem; font-weight: 700; line-height: 36px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; list-style: none;
}
.supporter-account summary::-webkit-details-marker { display: none; }
.supporter-account summary::after {
  content: ""; position: absolute; top: 50%; right: 12px; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
}
.supporter-account[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.supporter-account-links {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 10;
  width: min(300px, calc(100vw - 48px)); padding: 6px; background: var(--white);
  border: 1px solid rgba(13,59,37,.28); border-radius: 3px; box-shadow: 0 8px 24px rgba(8,43,27,.16);
}
.supporter-account-links a { display: block; padding: 12px; text-decoration: none; overflow-wrap: anywhere; }
.supporter-account-links a:hover { background: #dae6d6; }
.supporter-account summary:focus-visible, .supporter-account-links a:focus-visible {
  outline: 3px solid var(--river); outline-offset: 2px;
}
.preferences-panel h3 { scroll-margin-top: 120px; }
