.site-account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-account-button,
.site-account-link,
.site-account-logout,
.site-account-save,
.site-account-load,
.site-account-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff8ec;
  text-decoration: none;
  font: 700 0.94rem/1 "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

.site-account-button:hover,
.site-account-button:focus-visible,
.site-account-link:hover,
.site-account-link:focus-visible,
.site-account-logout:hover,
.site-account-logout:focus-visible,
.site-account-save:hover,
.site-account-save:focus-visible,
.site-account-load:hover,
.site-account-load:focus-visible,
.site-account-secondary:hover,
.site-account-secondary:focus-visible {
  transform: translateY(-1px);
}

.site-account-button.primary,
.site-account-save {
  background: linear-gradient(135deg, #d39b45, #ca6630);
  color: #21170f;
  border-color: rgba(130, 66, 18, 0.22);
}

.site-account-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
}

.site-account-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 28, 35, 0.38);
  box-shadow: 0 20px 54px rgba(6, 12, 16, 0.26);
  backdrop-filter: blur(12px);
  color: #fff8ec;
}

.site-account-panel strong {
  font-size: 1.02rem;
}

.site-account-panel p {
  margin: 0;
  color: rgba(248, 242, 228, 0.78);
  line-height: 1.55;
}

.site-account-panel-actions,
.site-account-save-list,
.site-account-modal-actions,
.site-account-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-account-panel-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(248, 242, 228, 0.68);
  font-size: 0.9rem;
}

.site-account-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.site-account-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(7, 12, 16, 0.58);
  z-index: 70;
}

.site-account-modal-backdrop.is-open {
  display: grid;
}

.site-account-modal {
  width: min(560px, 100%);
  max-height: min(88vh, 840px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(247, 241, 228, 0.98);
  color: #1e2629;
  box-shadow: 0 26px 56px rgba(6, 12, 16, 0.36);
}

.site-account-modal h2,
.profile-hero h1,
.profile-card h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

.site-account-modal h2,
.profile-card h2 {
  margin: 0 0 10px;
}

.site-account-modal p {
  margin: 0;
  color: #586468;
  line-height: 1.6;
}

.site-account-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.site-account-tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(30, 38, 41, 0.12);
  background: #fff9f0;
  color: #1e2629;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-account-tab.is-active {
  background: linear-gradient(135deg, #d39b45, #ca6630);
  color: #21170f;
}

.site-account-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.site-account-field {
  display: grid;
  gap: 8px;
}

.site-account-field span {
  font-size: 0.88rem;
  font-weight: 700;
  color: #4f5a5e;
}

.site-account-field input,
.site-account-field textarea,
.site-account-field select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(30, 38, 41, 0.12);
  background: #fffdf8;
  font: inherit;
  color: #1e2629;
}

.site-account-field textarea {
  min-height: 110px;
  resize: vertical;
}

.site-account-error,
.site-account-success {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.site-account-error {
  background: rgba(185, 45, 66, 0.12);
  color: #8b2234;
}

.site-account-success {
  background: rgba(47, 107, 88, 0.12);
  color: #215947;
}

.site-account-save-list {
  display: grid;
  margin-top: 18px;
}

.site-account-save-item {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid rgba(30, 38, 41, 0.08);
}

.site-account-save-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.site-account-save-item h3 {
  margin: 0;
  font-size: 1rem;
}

.site-account-save-item p {
  margin: 0;
}

.site-account-save-meta {
  color: #677378;
  font-size: 0.9rem;
}

.profile-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.profile-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(16, 28, 35, 0.38);
  box-shadow: 0 20px 54px rgba(6, 12, 16, 0.26);
  backdrop-filter: blur(12px);
}

.profile-hero {
  padding: 40px 0 24px;
  color: #fff8ec;
}

.profile-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.98;
}

.profile-hero p {
  margin: 0;
  max-width: 720px;
  color: rgba(248, 242, 228, 0.8);
  line-height: 1.7;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
}

.dashboard-sidebar,
.dashboard-main {
  display: grid;
  gap: 20px;
}

.dashboard-sidebar {
  align-self: start;
  position: sticky;
  top: 18px;
}

.dashboard-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.profile-card,
.dashboard-panel {
  padding: 24px 26px;
  border-radius: 28px;
  background: rgba(247, 241, 228, 0.92);
  border: 1px solid rgba(38, 49, 54, 0.12);
  box-shadow: 0 20px 54px rgba(6, 12, 16, 0.26);
  scroll-margin-top: 20px;
}

.profile-card-highlight,
.dashboard-panel-highlight {
  background:
    radial-gradient(circle at top right, rgba(211, 155, 69, 0.18), transparent 34%),
    rgba(255, 249, 238, 0.97);
}

.profile-card p,
.profile-card li,
.profile-card td,
.profile-card th,
.profile-card label,
.dashboard-panel p,
.dashboard-panel li,
.dashboard-panel td,
.dashboard-panel th,
.dashboard-panel label {
  color: #1e2629;
  line-height: 1.65;
}

.dashboard-panel h2 {
  margin: 0 0 12px;
}

.profile-overview-grid {
  display: grid;
  gap: 12px;
}

.profile-overview-stat {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(38, 49, 54, 0.08);
}

.profile-overview-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #677378;
}

.profile-overview-value {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1;
  color: #1e2629;
}

.profile-overview-note,
.profile-history-meta {
  color: #586468;
  font-size: 0.92rem;
}

.dashboard-nav-panel {
  background: rgba(255, 249, 238, 0.96);
}

.profile-quicknav {
  display: grid;
  gap: 10px;
}

.profile-quicknav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(30, 38, 41, 0.06);
  border: 1px solid rgba(30, 38, 41, 0.08);
  color: #1e2629;
  font-weight: 700;
}

.profile-card table {
  width: 100%;
  border-collapse: collapse;
}

.profile-card th,
.profile-card td {
  padding: 10px 0;
  border-top: 1px solid rgba(38, 49, 54, 0.08);
  text-align: left;
  vertical-align: top;
}

.profile-card tr:first-child th,
.profile-card tr:first-child td {
  border-top: 0;
}

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-list-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid rgba(38, 49, 54, 0.08);
}

.profile-list-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.profile-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-inline-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(30, 38, 41, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
}

.profile-login-note {
  padding: 18px;
  border-radius: 20px;
  background: rgba(16, 28, 35, 0.38);
  color: #fff8ec;
}

.profile-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-preview-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(38, 49, 54, 0.08);
}

.profile-preview-card strong {
  color: #1e2629;
}

.profile-preview-card span {
  color: #586468;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }

  .dashboard-split,
  .profile-overview-grid,
  .profile-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .profile-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .site-account-shell,
  .profile-page {
    width: min(100%, calc(100% - 18px));
  }
}
