:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f5ef;
  color: #141c18;
}

html {
  background: #f7f5ef;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background:
    radial-gradient(circle at 18% 10%, rgba(248, 179, 25, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 245, 239, 0.98) 340px),
    #f7f5ef;
}

@supports (-webkit-touch-callout: none) {
  @media (display-mode: standalone) {
    body {
      padding-top: max(env(safe-area-inset-top, 0px), 28px);
    }
  }
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.account-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.account-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(20, 28, 24, 0.14);
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #1f1b17;
  border-radius: 8px;
  background: #0f6653;
  box-shadow: 0 6px 18px rgba(20, 28, 24, 0.18);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.eyebrow,
.auth-kicker {
  margin: 0 0 5px;
  color: #6c3f0f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: #111b16;
  font-size: 24px;
  line-height: 1.08;
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-nav a,
.auth-secondary-link,
.auth-primary-link,
.auth-secondary-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #c8d8d1;
  border-radius: 8px;
  background: #fffdf8;
  color: #26332d;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.account-nav a[aria-current="page"],
.auth-primary-link {
  border-color: #0f6653;
  background: #0f6653;
  color: #fffdf8;
}

.account-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.55fr);
  gap: 16px;
  align-items: end;
  padding: 26px 0 18px;
}

.account-hero h2 {
  margin-bottom: 10px;
  font-size: 38px;
  line-height: 1.08;
}

.account-hero p {
  margin-bottom: 0;
  color: #5f7169;
  font-size: 16px;
  line-height: 1.7;
}

.hero-note {
  padding: 14px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fffdf8;
  color: #28443a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.auth-panel-page,
.settings-panel,
.account-summary {
  padding: 18px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 12px 34px rgba(20, 28, 24, 0.08);
}

.auth-form-panel {
  max-width: 680px;
}

.auth-panel-page h2,
.settings-panel h2,
.account-summary h2 {
  margin-bottom: 8px;
  color: #111b16;
  font-size: 24px;
  line-height: 1.18;
}

.auth-panel-page p,
.account-summary p {
  margin-bottom: 0;
  color: #5f7169;
  line-height: 1.65;
}

.auth-page-form,
.settings-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.auth-page-form label,
.settings-form label {
  display: grid;
  gap: 6px;
  color: #4c6359;
  font-size: 13px;
  font-weight: 850;
}

.auth-page-form input,
.settings-form input,
.settings-form select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c8d8d1;
  border-radius: 8px;
  background: white;
  color: #17211d;
}

.auth-field-note {
  margin: -2px 0 0;
  color: #5f7169;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.auth-field-note a {
  color: #14594a;
  font-weight: 900;
}

.settings-form input[readonly] {
  background: #f5f7f5;
  color: #4d5b55;
}

.settings-purpose-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #d8e4df;
  border-radius: 8px;
  background: #f8fbf9;
}

.settings-purpose-note h3 {
  margin: 0;
  color: #17211d;
  font-size: 15px;
  line-height: 1.3;
}

.settings-purpose-note p {
  margin: 0;
  color: #5f7169;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.6;
}

.settings-purpose-note a {
  justify-self: start;
  color: #14594a;
  font-size: 13px;
  font-weight: 900;
}

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

.auth-page-form button,
.settings-form button,
.notification-pref-form button,
.favorite-settings-list button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #0f6653;
  border-radius: 8px;
  background: #0f6653;
  color: #fffdf8;
  cursor: pointer;
  font-weight: 900;
}

.auth-page-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-message {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #ead08a;
  border-radius: 8px;
  background: #fff8db;
  color: #6a4c14;
  font-size: 14px;
  font-weight: 850;
}

.auth-message.success {
  border-color: #abdcbc;
  background: #e7f8ed;
  color: #14633b;
}

.auth-message.error {
  border-color: #f0c6ba;
  background: #fff0ea;
  color: #7b2e1f;
}

.auth-link-row,
.auth-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.auth-link-row a {
  color: #14594a;
  font-size: 14px;
  font-weight: 850;
}

.auth-secondary-button {
  cursor: pointer;
}

.account-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

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

.settings-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.settings-panel:last-child {
  grid-column: 1 / -1;
}

.settings-panel-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.account-email,
.settings-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #c8ded7;
  border-radius: 999px;
  background: #edf7f3;
  color: #245346;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.settings-check {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d8e4df;
  border-radius: 8px;
  background: #f8fbf9;
}

.settings-check input {
  width: 18px;
  min-height: 18px;
  accent-color: #0f6653;
}

.settings-check strong,
.settings-check small {
  display: block;
}

.settings-check small {
  margin-top: 2px;
  color: #63736c;
  font-size: 12px;
  line-height: 1.45;
}

.settings-inline-note {
  margin: -2px 0 0;
  color: #63736c;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.notification-pref-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.notification-pref-form label {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e4df;
  border-radius: 8px;
  background: #f8fbf9;
  color: #245346;
  font-weight: 900;
}

.notification-pref-form label:has(input:disabled) {
  opacity: 0.55;
}

.notification-pref-form input {
  accent-color: #0f6653;
}

.notification-pref-form button {
  grid-column: 1 / -1;
}

.favorite-settings-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.favorite-settings-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e8e4;
  border-radius: 8px;
  background: #f8fbf9;
}

.favorite-settings-list strong,
.favorite-settings-list span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-settings-list strong {
  color: #14231d;
  font-size: 15px;
}

.favorite-settings-list span {
  margin-top: 3px;
  color: #63736c;
  font-size: 12px;
  font-weight: 750;
}

.favorite-settings-list button {
  min-height: 36px;
  border-color: #d8ded7;
  background: #fffdf8;
  color: #294139;
}

.empty-favorite-row {
  grid-template-columns: 1fr;
  color: #63736c;
  font-weight: 800;
}

.legal-page {
  display: grid;
  gap: 14px;
  max-width: 860px;
}

.legal-panel {
  padding: 20px;
  border: 1px solid #d8ded7;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 12px 34px rgba(20, 28, 24, 0.08);
}

.legal-panel h2 {
  margin: 0 0 10px;
  color: #111b16;
  font-size: 22px;
  line-height: 1.2;
}

.legal-panel h3 {
  margin: 20px 0 8px;
  color: #17211d;
  font-size: 17px;
  line-height: 1.35;
}

.legal-panel p,
.legal-panel li {
  color: #4f6259;
  font-size: 15px;
  line-height: 1.75;
}

.legal-panel p {
  margin: 0 0 10px;
}

.legal-panel ul {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  padding-left: 1.2em;
}

.legal-panel .legal-updated {
  color: #6c3f0f;
  font-size: 13px;
  font-weight: 850;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(20, 28, 24, 0.14);
  color: #5f7169;
  font-size: 13px;
  font-weight: 750;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer a {
  color: #14594a;
  font-weight: 900;
}

@media (max-width: 760px) {
  .account-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .account-topbar,
  .account-hero,
  .account-summary,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .account-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .account-nav a {
    min-width: 0;
    padding: 8px 6px;
    text-align: center;
  }

  h1 {
    font-size: 20px;
  }

  .account-hero {
    padding: 20px 0 14px;
  }

  .account-hero h2 {
    font-size: 29px;
  }

  .account-summary .auth-action-row {
    margin-top: 0;
  }

  .settings-panel:last-child {
    grid-column: auto;
  }

  .settings-panel-head {
    display: grid;
  }

  .notification-pref-form,
  .favorite-settings-list,
  .settings-field-grid {
    grid-template-columns: 1fr;
  }

  .favorite-settings-list li {
    grid-template-columns: 1fr;
  }

  .favorite-settings-list button {
    width: 100%;
  }

  .legal-panel {
    padding: 16px;
  }

  .site-footer {
    display: grid;
    justify-content: stretch;
  }
}
