:root {
  --bg-sand: #f3ead5;
  --bg-charcoal: #454a56;
  --text-ink: #13161b;
  --text-soft: #39404a;
  --brand-green: #0a5b3b;
  --brand-gold: #f0be2d;
  --brand-violet: #7a45ee;
  --surface: rgba(255, 255, 255, 0.74);
  --line: rgba(19, 22, 27, 0.18);
  --field-bg: rgba(255, 255, 255, 0.96);
  --field-line: rgba(10, 91, 59, 0.22);
  --table-head: rgba(10, 91, 59, 0.1);
}

:root[data-theme="dark"] {
  --bg-sand: #161b22;
  --bg-charcoal: #0e1117;
  --text-ink: #e8edf4;
  --text-soft: #b4becb;
  --brand-green: #76d7ab;
  --brand-gold: #ffd166;
  --brand-violet: #b794ff;
  --surface: rgba(30, 37, 45, 0.84);
  --line: rgba(232, 237, 244, 0.2);
  --field-bg: rgba(15, 20, 27, 0.96);
  --field-line: rgba(118, 215, 171, 0.34);
  --table-head: rgba(118, 215, 171, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg-sand: #161b22;
    --bg-charcoal: #0e1117;
    --text-ink: #e8edf4;
    --text-soft: #b4becb;
    --brand-green: #76d7ab;
    --brand-gold: #ffd166;
    --brand-violet: #b794ff;
    --surface: rgba(30, 37, 45, 0.84);
    --line: rgba(232, 237, 244, 0.2);
    --field-bg: rgba(15, 20, 27, 0.96);
    --field-line: rgba(118, 215, 171, 0.34);
    --table-head: rgba(118, 215, 171, 0.14);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text-ink);
  background: var(--bg-sand);
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

.shared-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  z-index: 1300;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-green));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.shared-theme-toggle {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 1205;
  border: none;
  background: transparent;
  color: var(--brand-gold);
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-size: 0.85rem;
  box-shadow: none;
  cursor: pointer;
}

.shared-theme-toggle:hover {
  color: var(--brand-green);
  transform: translateY(-1px);
}

.shared-theme-toggle:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
}

h1, h2, h3 {
  color: var(--brand-green);
  margin-top: 0;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0.3px;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.16rem;
  margin-bottom: 8px;
}

p, li, td, th, label {
  line-height: 1.45;
}

a {
  color: var(--brand-green);
  font-weight: 600;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-green);
}

.top-links {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-charcoal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}

.card,
form,
table,
ul,
.note-box {
  background: var(--surface);
}

.card,
.note-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

form {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

input,
textarea,
select,
button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--field-line);
  background: var(--field-bg);
  color: var(--text-ink);
  padding: 10px 11px;
  font-size: 14px;
  font-family: inherit;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(10, 91, 59, 0.28);
  border-color: rgba(10, 91, 59, 0.55);
}

button {
  width: fit-content;
  min-width: 130px;
  border: none;
  background: var(--bg-charcoal);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 180ms ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.16);
}

button:active {
  transform: translateY(0);
}

.Welcome {
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--bg-sand);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.welcome-copy {
  position: relative;
  padding: 26px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--bg-sand);
  border-radius: 14px;
  z-index: 2;
}

.welcome-copy h1 {
  margin: 0 0 20px;
  color: var(--brand-green);
  font-size: clamp(2.1rem, 4vw, 4rem);
  text-align: center;
}

.welcome-thought-bubble {
  position: relative;
  width: min(92%, 620px);
  min-height: 300px;
  border: 10px solid var(--text-ink);
  border-radius: 50% / 46%;
  background: var(--bg-sand);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 44px 60px;
}

.welcome-thought-bubble::before {
  content: "";
  position: absolute;
  right: -2px;
  top: -8px;
  width: 34%;
  height: 26%;
  background: var(--bg-sand);
}

.bubble-dot {
  position: absolute;
  border: 8px solid var(--text-ink);
  border-radius: 999px;
  background: var(--bg-sand);
}

.bubble-dot.dot-one {
  width: 66px;
  height: 46px;
  right: 64px;
  bottom: -34px;
  transform: rotate(20deg);
}

.bubble-dot.dot-two {
  width: 44px;
  height: 32px;
  right: 28px;
  bottom: -72px;
}

.welcome-hero-image {
  position: relative;
  min-height: 100%;
  border-radius: 14px;
  overflow: hidden;
}

.welcome-hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--bg-sand) 0%,
    var(--bg-sand) 18%,
    transparent 40%
  );
}

.welcome-hero-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}

th,
td {
  border-bottom: 1px solid rgba(17, 17, 17, 0.09);
  padding: 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

th {
  color: var(--brand-green);
  background: var(--table-head);
}

tr:last-child td {
  border-bottom: none;
}

.muted {
  color: var(--text-soft);
}

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

.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--line);
}

.status-pill.unread {
  background: rgba(10, 91, 59, 0.15);
  border-color: rgba(10, 91, 59, 0.38);
}

.status-pill.read {
  background: rgba(10, 91, 59, 0.1);
  border-color: rgba(10, 91, 59, 0.3);
}

.error {
  color: #b00020;
  font-weight: 700;
}

@media (max-width: 860px) {
  .Welcome {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 0;
    padding: 0;
  }

  .welcome-copy {
    padding: 16px 10px 10px;
  }

  .welcome-copy h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    margin-bottom: 12px;
  }

  .welcome-thought-bubble {
    width: 100%;
    min-height: 220px;
    border-width: 7px;
    padding: 26px 22px;
  }

  .bubble-dot.dot-one {
    width: 46px;
    height: 32px;
    right: 46px;
    bottom: -23px;
    border-width: 6px;
  }

  .bubble-dot.dot-two {
    width: 32px;
    height: 22px;
    right: 18px;
    bottom: -50px;
    border-width: 5px;
  }

  .welcome-hero-image {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: 100%;
    border-radius: 0;
    z-index: 1;
    pointer-events: none;
  }

  .welcome-hero-image img {
    object-position: center;
    opacity: 0.12;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  body {
    width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  th,
  td {
    white-space: normal;
    min-width: 120px;
  }

  td form {
    width: 100%;
  }

  td form[style*="display:inline"] {
    display: grid !important;
    gap: 8px;
    margin-bottom: 8px;
  }

  td form[style*="display:inline"] button,
  td form[style*="display:inline"] input {
    width: 100%;
  }

  table {
    font-size: 13px;
  }
}

/* Shared navigation styling for non-marketing pages */
.bar {
  position: sticky;
  top: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-charcoal);
  color: #fff;
  border-radius: 12px;
}

.bar a {
  color: inherit;
  text-decoration: none;
}

#menu-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.bar-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.bar-logo span {
  color: var(--brand-gold);
}

.bar-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #1b2028;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.bar-cta:hover {
  background: var(--brand-green);
}

#mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-charcoal);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease-in-out;
  z-index: 1050;
}

#mobile-nav.active {
  max-height: 480px;
}

#mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 12px;
}

#mobile-nav a {
  display: block;
  padding: 10px 8px;
  border-radius: 10px;
  font-weight: 700;
}

#mobile-nav a:hover,
#mobile-nav a:focus {
  background: rgba(255, 255, 255, 0.12);
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 1000;
}

@media (max-width: 1023px) {
  .bar {
    border-radius: 10px;
    row-gap: 8px;
  }

  #mobile-nav {
    position: static;
    order: 3;
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #mobile-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  #mobile-nav a {
    display: inline-flex;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  #mobile-nav {
    position: static;
    max-height: none;
    background: transparent;
  }

  #mobile-nav ul {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
  }

  #mobile-nav a {
    padding: 8px 6px;
    border-radius: 8px;
  }

  #overlay {
    display: none !important;
  }
}
