:root {
  color-scheme: light;
  --bg: #f4faff;
  --bg-soft: #edf6ff;
  --panel: rgba(255, 255, 255, 0.9);
  --text: #10233d;
  --muted: #5d738e;
  --line: rgba(16, 35, 61, 0.1);
  --primary: #0f7df0;
  --primary-2: #1ebbd7;
  --shadow: 0 28px 70px rgba(16, 35, 61, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "SF Pro Display", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #f8fcff 0%, var(--bg) 100%);
}

body {
  position: relative;
  overflow-x: hidden;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.orb--one {
  top: -140px;
  left: -100px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(113, 198, 255, 0.46), transparent 66%);
}

.orb--two {
  right: -160px;
  top: 180px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(87, 162, 255, 0.24), transparent 70%);
}

.app-shell {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  margin: 28px auto 40px;
}

.card {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  padding: 28px;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__mark {
  width: 68px;
  height: 68px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c7492;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero__body {
  max-width: 640px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-self: end;
}

.stat {
  padding: 16px;
  border-radius: 22px;
  background: rgba(16, 35, 61, 0.04);
}

.stat span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #69819d;
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  letter-spacing: -0.05em;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.layout-grid > .card,
.side-column > .card {
  padding: 24px;
}

.side-column {
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.section-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

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

.profile-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(16, 35, 61, 0.05);
}

.profile-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: #5b728d;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.profile-tab.is-active {
  background: white;
  color: #173251;
  box-shadow: 0 8px 18px rgba(16, 35, 61, 0.08);
}

.profile-panel[hidden] {
  display: none;
}

.panel-intro {
  margin-bottom: 16px;
}

.panel-intro h3 {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.panel-intro p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: block;
}

.field--wide {
  grid-column: 1 / -1;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #435e7a;
}

.field input,
.select-field select {
  width: 100%;
  border: 1px solid rgba(16, 35, 61, 0.1);
  border-radius: 18px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus,
.select-field select:focus {
  outline: none;
  border-color: rgba(15, 125, 240, 0.38);
  box-shadow: 0 0 0 4px rgba(15, 125, 240, 0.12);
  background: white;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(16, 35, 61, 0.08);
}

.setting-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.setting-row--stack {
  align-items: flex-start;
}

.setting-row h3 {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.setting-row p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle__track {
  position: relative;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  background: rgba(16, 35, 61, 0.12);
  transition: background 180ms ease;
}

.toggle__track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 6px 14px rgba(16, 35, 61, 0.16);
  transition: transform 180ms ease;
}

.toggle input:checked + .toggle__track {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.toggle input:checked + .toggle__track::after {
  transform: translateX(24px);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 20px rgba(15, 125, 240, 0.22);
}

.button--secondary {
  color: #183352;
  background: rgba(16, 35, 61, 0.08);
}

.button--ghost {
  color: #5a6f88;
  background: transparent;
  border: 1px solid rgba(16, 35, 61, 0.08);
}

.memory-list {
  display: grid;
  gap: 10px;
}

.memory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(16, 35, 61, 0.04);
}

.memory-row__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.memory-row__badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 35, 61, 0.08);
  color: #3f5874;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memory-row__value {
  margin-top: 6px;
  color: #5d748f;
  line-height: 1.5;
  word-break: break-word;
}

.memory-row__remove {
  padding: 10px 13px;
}

.empty-state {
  padding: 24px;
  border-radius: 22px;
  background: rgba(16, 35, 61, 0.04);
  color: var(--muted);
  line-height: 1.6;
}

.status-banner {
  position: sticky;
  bottom: 14px;
  width: fit-content;
  max-width: min(520px, calc(100vw - 32px));
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(12, 28, 46, 0.92);
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.status-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 20px, 1180px);
    margin-top: 12px;
  }

  .hero,
  .layout-grid > .card,
  .side-column > .card {
    padding: 18px;
  }

  .hero__stats,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-tabs {
    width: 100%;
  }

  .profile-tab {
    flex: 1 1 0;
    text-align: center;
  }
}
