:root {
  --bg: #f6efe5;
  --panel: rgba(255, 251, 246, 0.88);
  --panel-strong: #fffaf3;
  --ink: #18212d;
  --muted: #5d6777;
  --accent: #1f6b5d;
  --accent-strong: #0f4f43;
  --accent-soft: #d8ebe5;
  --danger: #a63b32;
  --line: rgba(24, 33, 45, 0.12);
  --shadow: 0 24px 60px rgba(51, 43, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(240, 197, 112, 0.26), transparent 28%),
    radial-gradient(circle at right 20%, rgba(31, 107, 93, 0.2), transparent 24%),
    linear-gradient(180deg, #f8f2e8 0%, #f3eadc 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding-bottom: 40px;
}

.background-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.55;
}

.background-glow-a {
  top: -80px;
  left: -120px;
  width: 300px;
  height: 300px;
  background: rgba(240, 197, 112, 0.4);
}

.background-glow-b {
  right: -120px;
  bottom: -60px;
  width: 340px;
  height: 340px;
  background: rgba(31, 107, 93, 0.18);
}

.hero-panel,
.view-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 20px 32px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.hero-inner,
.content-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-inner {
  position: relative;
}

.hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px;
}

.hero-copy-block {
  min-width: 0;
}

.content-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 20px 0;
}

.app-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.view-card {
  border-radius: 28px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  max-width: 10ch;
}

.brand-name {
  max-width: none;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: min(100%, clamp(220px, 34vw, 420px));
  height: auto;
}

h2 {
  font-size: 1.7rem;
}

h3 {
  font-size: 1.35rem;
}

.hero-copy,
.section-heading p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 48ch;
  margin-top: 20px;
  font-size: 1.05rem;
}

.hero-account {
  position: absolute;
  top: 0;
  right: 0;
  min-width: min(100%, 260px);
  max-width: min(320px, 100%);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(24, 33, 45, 0.08);
  box-shadow: 0 10px 24px rgba(24, 33, 45, 0.08);
}

.trust-panel {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(24, 33, 45, 0.08);
}

.trust-label {
  margin: 0 0 14px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.trust-list-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-list li {
  color: var(--ink);
  line-height: 1.6;
}

.trust-list-compact li {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(24, 33, 45, 0.08);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.tabs {
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: rgba(24, 33, 45, 0.05);
  margin-bottom: 24px;
}

.tab,
.ghost-button,
.primary-button,
.text-button,
.suggestion-option,
.remove-button {
  border: 0;
  cursor: pointer;
}

.tab {
  padding: 10px 18px;
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(24, 33, 45, 0.08);
}

.stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field span {
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field select,
.field textarea,
.autocomplete input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.autocomplete input:focus {
  border-color: rgba(31, 107, 93, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 107, 93, 0.12);
  transform: translateY(-1px);
}

.field textarea {
  resize: vertical;
  min-height: 132px;
}

.primary-button,
.ghost-button {
  padding: 13px 18px;
  border-radius: 16px;
  font-weight: 800;
}

.text-button {
  justify-self: start;
  padding: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
}

.text-button:hover,
.text-button:focus-visible {
  text-decoration: underline;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
}

.ghost-button {
  background: rgba(24, 33, 45, 0.06);
  color: var(--ink);
}

.account-bar {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.account-details {
  display: grid;
  gap: 2px;
}

.hero-account-details .eyebrow {
  margin-bottom: 0;
  font-size: 0.62rem;
  text-align: right;
}

.hero-account-details h2 {
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  text-align: right;
}

#logout-button {
  align-self: center;
  flex: 0 0 auto;
}

.hero-logout-button {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1;
}

.interest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.interest-column {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(24, 33, 45, 0.07);
}

.support-panel {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(24, 33, 45, 0.07);
}

.email-preview-panel {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(24, 33, 45, 0.07);
}

.preview-status {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.email-preview-frame {
  width: 100%;
  min-height: 760px;
  margin-top: 18px;
  border: 1px solid rgba(24, 33, 45, 0.08);
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.support-form {
  max-width: 720px;
}

.support-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.section-heading {
  margin-bottom: 14px;
}

.autocomplete {
  position: relative;
}

.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 8px;
  max-height: min(320px, calc(100vh - 220px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(24, 33, 45, 0.09);
  box-shadow: 0 20px 50px rgba(24, 33, 45, 0.12);
}

.suggestions.suggestions-above {
  top: auto;
  bottom: calc(100% + 8px);
}

.suggestion-option {
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
}

.suggestion-option:hover,
.suggestion-option:focus-visible {
  background: var(--accent-soft);
}

.selected-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: min(420px, calc(100vh - 360px));
  overflow-y: auto;
  padding-right: 6px;
}

.selected-item,
.empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 33, 45, 0.08);
}

.selected-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  color: var(--muted);
  justify-content: flex-start;
}

.remove-button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(166, 59, 50, 0.1);
  color: var(--danger);
  font-weight: 800;
}

.message {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(31, 107, 93, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(31, 107, 93, 0.2);
}

.message.error {
  background: rgba(166, 59, 50, 0.1);
  color: var(--danger);
  border-color: rgba(166, 59, 50, 0.18);
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .page-shell {
    padding-bottom: 24px;
  }

  .hero-panel {
    padding: 30px;
  }

  .hero-main {
    flex-direction: column;
  }

  .hero-account {
    position: static;
    min-width: 0;
    width: 100%;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 22px;
  }

  .account-bar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .hero-account-details .eyebrow,
  .hero-account-details h2 {
    text-align: left;
  }

  #logout-button {
    align-self: flex-start;
  }

  .hero-logout-button {
    padding: 10px 14px;
    font-size: 0.88rem;
  }
}

@media (min-width: 760px) {
  .interest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 540px) {
  .view-card,
  .hero-panel {
    padding: 24px 16px;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  .hero-panel {
    border-bottom: 1px solid var(--line);
  }

  .content-panel {
    padding: 0 16px;
  }

  .content-panel {
    gap: 0;
  }

  .app-view {
    gap: 0;
  }

  .hero-account {
    max-width: none;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .trust-panel {
    margin-top: 24px;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .interest-grid {
    gap: 0;
  }

  .interest-column {
    padding: 20px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .support-panel {
    padding: 20px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .email-preview-panel {
    padding: 20px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .account-bar {
    align-items: flex-start;
  }
}
