:root {
  color-scheme: light;
  --bg: #fafaff;
  --paper: #ffffff;
  --ink: #101828;
  --muted: #475467;
  --line: #d7d5ec;
  --teal: #6938ef;
  --teal-deep: #4b22bd;
  --coral: #1570ef;
  --gold: #f79009;
  --mint: #ece9ff;
  --blue: #d1e9ff;
  --shadow: 0 16px 38px rgba(16, 24, 40, 0.09);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(105, 56, 239, 0.07), rgba(209, 233, 255, 0.2) 16rem, transparent 31rem),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

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

h1 {
  max-width: 13ch;
  margin-bottom: 0;
  font-size: 2.55rem;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 1.3rem;
  line-height: 1.18;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.25;
}

p {
  line-height: 1.5;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  padding: 0.9rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  background: rgba(250, 250, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.topbar-actions,
.panel-heading,
.surface-heading,
.answer-header,
.band-heading,
.mode-row,
.solve-actions,
.checkout-line,
menu {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.8rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand span:last-child {
  display: grid;
  min-width: 0;
}

.brand strong,
.brand small {
  overflow-wrap: anywhere;
}

.brand small {
  color: var(--muted);
}

.brand-mark {
  position: relative;
  display: block;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 76% 24%, rgba(247, 144, 9, 0.96) 0 0.33rem, transparent 0.35rem),
    linear-gradient(135deg, #22114d, #4b22bd 54%, #6938ef);
  color: #fff;
  box-shadow: 0 12px 24px rgba(75, 34, 189, 0.28);
}

.brand-mark::after {
  position: absolute;
  inset: 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  content: "";
}

.brand-mark span,
.brand-mark i {
  position: absolute;
  z-index: 1;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.brand-mark span {
  top: 0.48rem;
  left: 0.47rem;
  font-size: 1.38rem;
}

.brand-mark i {
  right: 0.44rem;
  bottom: 0.42rem;
  color: #d1e9ff;
  font-size: 1.08rem;
}

.brand-mark i::before {
  position: absolute;
  right: 0.84rem;
  bottom: 0.27rem;
  width: 0.54rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.72);
  content: "";
}

.topbar-actions {
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
}

.site-nav a {
  position: relative;
  min-height: 2.15rem;
  padding: 0.42rem 0.68rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0.68rem;
  bottom: 0.12rem;
  left: 0.68rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal-deep);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.topbar-actions .button-quiet {
  border-color: transparent;
  background: transparent;
}

.topbar-actions .button-quiet:hover {
  border-color: rgba(105, 56, 239, 0.16);
  background: rgba(255, 255, 255, 0.88);
}

.plan-pill,
.confidence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  max-width: 100%;
  padding: 0.32rem 0.72rem;
  border: 1px solid rgba(105, 56, 239, 0.18);
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

main {
  display: grid;
  gap: clamp(1.15rem, 2vw, 1.8rem);
  padding: clamp(1rem, 3vw, 2.2rem);
}

body:not(.landing-page) main {
  width: min(100%, 94rem);
  margin-inline: auto;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(20rem, 1.08fr) minmax(21rem, 0.96fr) minmax(17rem, 0.72fr);
  gap: clamp(1rem, 1.6vw, 1.35rem);
  align-items: start;
}

.tool-panel,
.checkout-shell {
  border: 1px solid rgba(16, 29, 45, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.tool-panel {
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.35rem);
}

.panel-heading,
.surface-heading,
.answer-header,
.band-heading,
.mode-row,
.solve-actions,
.checkout-line,
menu {
  justify-content: space-between;
  gap: 0.9rem;
}

.panel-heading,
.answer-header {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.eyebrow {
  margin-bottom: 0.38rem;
  color: var(--teal-deep);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quota {
  display: grid;
  width: 6.6rem;
  min-height: 4.1rem;
  padding: 0.66rem;
  flex: 0 0 auto;
  border: 1px solid rgba(21, 112, 239, 0.24);
  border-radius: 8px;
  background: rgba(21, 112, 239, 0.1);
  text-align: right;
}

.quota span {
  font-size: 1.1rem;
  font-weight: 800;
}

.quota small {
  color: var(--muted);
  line-height: 1.2;
}

form,
.account-block,
.steps,
.recent-surface {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.46rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field input,
.field select {
  min-height: 2.9rem;
  padding: 0 0.85rem;
}

.field textarea {
  min-height: 7.1rem;
  resize: vertical;
  padding: 0.85rem;
  line-height: 1.45;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(105, 56, 239, 0.16);
}

.examples,
.segmented,
.formula-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip,
.segment,
.text-button {
  border: 1px solid var(--line);
  color: var(--ink);
}

.chip {
  min-height: 2.1rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.chip:hover,
.text-button:hover {
  border-color: rgba(105, 56, 239, 0.35);
  background: var(--mint);
}

.segmented {
  width: max-content;
  max-width: 100%;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1efff;
}

.segment {
  min-height: 2.25rem;
  padding: 0.38rem 0.72rem;
  border-radius: 6px;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 800;
}

.segment.is-active {
  border-color: rgba(105, 56, 239, 0.18);
  background: var(--paper);
  color: var(--teal-deep);
  box-shadow: 0 7px 18px rgba(16, 29, 45, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.58rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}

.button-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 11px 22px rgba(105, 56, 239, 0.24);
}

.button-accent {
  border-color: rgba(16, 29, 45, 0.08);
  background: var(--gold);
  color: var(--ink);
}

.button-danger {
  border-color: rgba(167, 46, 61, 0.28);
  background: rgba(167, 46, 61, 0.09);
  color: #8c1f35;
}

.button-quiet {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

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

.button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: #f3f2fb;
  box-shadow: none;
  color: var(--muted);
  opacity: 0.72;
  transform: none;
}

.match-surface,
.recent-surface {
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid rgba(105, 56, 239, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 233, 255, 0.94), rgba(209, 233, 255, 0.72)),
    #fff;
}

.match-surface {
  display: grid;
  grid-template-columns: minmax(7rem, 0.66fr) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.formula-preview strong,
.equation {
  display: block;
  overflow-wrap: anywhere;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 1.48rem;
  line-height: 1.2;
}

.formula-preview p,
.account-block p,
.band-heading p,
.price-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.input-shell input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.input-shell em {
  display: grid;
  min-width: 4.2rem;
  place-items: center;
  padding: 0 0.62rem;
  background: #edf3f9;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  min-height: 4.7rem;
  padding: 0.88rem 0;
  border-top: 1px solid var(--line);
}

.step:first-child {
  padding-top: 0;
  border-top: 0;
}

.step > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #2549ae;
  font-weight: 900;
}

.step:nth-child(2) > span {
  background: var(--mint);
  color: var(--teal-deep);
}

.step:nth-child(3) > span {
  background: rgba(105, 56, 239, 0.16);
  color: var(--teal-deep);
}

.step p {
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.step-final {
  margin-top: 0.22rem;
  padding: 0.9rem;
  border-color: rgba(105, 56, 239, 0.28);
  border: 1px solid rgba(105, 56, 239, 0.28);
  border-radius: 8px;
  background: rgba(236, 233, 255, 0.72);
}

.step-final p {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 900;
}

.recent-surface {
  margin-top: 1rem;
}

.text-button {
  min-height: 1.95rem;
  padding: 0.22rem 0.54rem;
  border-radius: 6px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 0.55rem;
  min-height: 3rem;
}

.history-item,
.history-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(16, 29, 45, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.history-item strong,
.history-item small,
.history-empty {
  overflow-wrap: anywhere;
}

.history-item strong {
  display: block;
  font-size: 0.92rem;
}

.history-item small,
.history-empty {
  color: var(--muted);
}

.account-panel {
  display: grid;
  gap: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.product-visual {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(16, 29, 45, 0.12);
  border-radius: 8px;
  background: #e7e5fe;
}

.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-block {
  padding: 0.95rem;
  border: 1px solid rgba(215, 213, 236, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.status-dot {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(21, 112, 239, 0.16);
}

.meter {
  width: 100%;
  height: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: #efeffb;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  transition: width 180ms ease;
}

.account-features ul {
  display: grid;
  gap: 0.68rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.catalog-band,
.pricing-band {
  display: grid;
  gap: clamp(1rem, 1.6vw, 1.35rem);
  padding: clamp(0.75rem, 1.2vw, 1rem) 0;
}

.band-heading {
  align-items: flex-end;
}

.band-heading h2 {
  max-width: 18ch;
  font-size: 1.65rem;
}

.band-heading > p {
  max-width: 31rem;
}

.formula-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.formula-card,
.price-card {
  display: grid;
  min-width: 0;
  min-height: 12rem;
  gap: 0.8rem;
  align-content: space-between;
  padding: 0.95rem;
  border: 1px solid rgba(215, 213, 236, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.formula-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.formula-meta span {
  min-height: 1.65rem;
  padding: 0.2rem 0.46rem;
  border-radius: 999px;
  background: #edf3f9;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.price-card strong {
  display: block;
  margin: 0.52rem 0 0.38rem;
  font-size: 2rem;
  line-height: 1;
}

.price-card-featured {
  border-color: rgba(105, 56, 239, 0.28);
  background:
    linear-gradient(180deg, rgba(236, 233, 255, 0.94), transparent 82%),
    #fff;
}

.pricing-heading {
  align-items: center;
}

.checkout-dialog {
  width: min(31rem, calc(100% - 1rem));
  padding: 0;
  border: 0;
  background: transparent;
}

.checkout-dialog::backdrop {
  background: rgba(16, 29, 45, 0.52);
  backdrop-filter: blur(4px);
}

.checkout-shell {
  position: relative;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: clamp(1rem, 3vw, 1.35rem);
}

.dialog-close {
  position: absolute;
  top: 0.82rem;
  right: 0.82rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.checkout-shell h2 {
  padding-right: 2rem;
  font-size: 1.7rem;
}

.checkout-shell p {
  margin-bottom: 0;
  color: var(--muted);
}

.checkout-line {
  min-height: 3.3rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.landing-main {
  display: grid;
  gap: 0;
  padding: 0;
}

.landing-topbar {
  position: absolute;
  right: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(250, 250, 255, 0.97), rgba(250, 250, 255, 0.72));
}

.landing-hero {
  display: grid;
  min-height: clamp(34rem, 78svh, 46rem);
  align-items: end;
  padding: clamp(7rem, 12vw, 9.2rem) clamp(1rem, 5vw, 4.4rem) clamp(3rem, 7vw, 5rem);
  background:
    linear-gradient(90deg, rgba(16, 24, 40, 0.94), rgba(48, 27, 108, 0.62) 47%, rgba(16, 24, 40, 0.16)),
    url("./assets/chemistry-workflow.png") center / cover;
  color: #fff;
}

.landing-hero .eyebrow {
  color: #e7e5fe;
}

.landing-hero h1 {
  max-width: none;
  margin-bottom: 0.7rem;
  font-size: 4.4rem;
  line-height: 0.96;
}

.hero-copy {
  width: min(36rem, 100%);
}

.hero-copy p:not(.eyebrow) {
  margin-bottom: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.16rem;
}

.hero-actions,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.landing-band {
  display: grid;
  gap: clamp(1rem, 2vw, 1.6rem);
  padding: clamp(1.6rem, 5vw, 4rem) clamp(1rem, 5vw, 4.4rem);
}

.marks-band {
  background: rgba(255, 255, 255, 0.72);
}

.marks-grid,
.account-plan-grid {
  display: grid;
  gap: 0.9rem;
}

.marks-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mark-card {
  display: grid;
  min-width: 0;
  min-height: 9.3rem;
  gap: 0.62rem;
  align-content: start;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.mark-card span {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.mark-card:nth-child(2) span {
  background: #1570ef;
}

.mark-card:nth-child(3) span {
  background: var(--coral);
}

.mark-card:nth-child(4) span {
  background: var(--gold);
}

.mark-card p,
.product-copy p,
.account-hero p {
  margin-bottom: 0;
  color: var(--muted);
}

.product-band {
  grid-template-columns: minmax(18rem, 1.08fr) minmax(18rem, 0.92fr);
  align-items: center;
  background: rgba(231, 229, 254, 0.38);
}

.preview-visual {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(16, 29, 45, 0.14);
  border-radius: 8px;
  box-shadow: 0 22px 56px rgba(16, 24, 40, 0.14);
}

.preview-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-copy {
  display: grid;
  gap: 0.9rem;
}

.product-copy h2,
.account-hero h1 {
  max-width: 16ch;
  font-size: 2.1rem;
}

.product-points {
  display: grid;
  gap: 0.72rem;
}

.product-points p {
  padding-left: 0.8rem;
  border-left: 3px solid rgba(105, 56, 239, 0.38);
}

.landing-pricing {
  margin: clamp(1rem, 4vw, 3rem) clamp(1rem, 5vw, 4.4rem);
  padding-block: clamp(1rem, 2vw, 1.5rem);
}

.billing-note {
  margin-bottom: 0;
  padding: 0.82rem;
  border: 1px solid rgba(16, 29, 45, 0.1);
  border-radius: 8px;
  background: rgba(243, 174, 49, 0.18);
  color: var(--muted);
}

.account-main {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2.2rem);
}

.account-page {
  background:
    linear-gradient(180deg, #14112e, rgba(38, 24, 86, 0.94) 22rem, var(--bg) 48rem),
    var(--bg);
}

.account-page .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 17, 46, 0.9);
  color: #fff;
}

.account-page .brand small {
  color: rgba(224, 237, 247, 0.7);
}

.account-page .site-nav {
  background: transparent;
}

.account-page .site-nav a {
  color: rgba(240, 246, 251, 0.78);
}

.account-page .site-nav a:hover,
.account-page .site-nav a[aria-current="page"] {
  color: #fff;
}

.account-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 17rem;
  overflow: hidden;
  padding: clamp(1.1rem, 4vw, 2.2rem);
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(15, 12, 40, 0.96), rgba(44, 25, 101, 0.76) 53%, rgba(15, 12, 40, 0.34)),
    url("./assets/chemistry-workflow.png") center / cover;
  box-shadow: 0 24px 54px rgba(9, 15, 25, 0.22);
  color: #fff;
}

.account-hero > div:first-child {
  display: grid;
  gap: 0.52rem;
  width: min(39rem, 100%);
}

.account-hero .eyebrow {
  color: #fdbd5b;
}

.account-hero p {
  color: rgba(237, 245, 252, 0.84);
}

.account-identity {
  display: grid;
  width: min(23rem, 100%);
  gap: 0.52rem;
  padding: clamp(0.95rem, 2vw, 1.2rem);
  border: 1px solid rgba(231, 229, 254, 0.34);
  border-radius: 8px;
  background: rgba(20, 17, 46, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.account-identity strong {
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 1.38rem;
  line-height: 1.18;
}

.account-identity p {
  margin-bottom: 0;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(24rem, 1.15fr);
  gap: 1rem;
  align-items: start;
}

.account-column {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.account-page .tool-panel {
  box-shadow: 0 15px 36px rgba(8, 19, 33, 0.11);
}

.account-summary-panel,
.subscription-panel,
.auth-panel {
  display: grid;
  gap: 1rem;
}

.auth-panel {
  border-color: rgba(105, 56, 239, 0.22);
  background:
    linear-gradient(155deg, rgba(231, 229, 254, 0.82), transparent 42%),
    rgba(255, 255, 255, 0.98);
}

.account-summary-panel {
  background:
    linear-gradient(180deg, rgba(209, 233, 255, 0.68), transparent 46%),
    rgba(255, 255, 255, 0.98);
}

.subscription-panel {
  border-color: rgba(105, 56, 239, 0.2);
  background:
    linear-gradient(145deg, rgba(236, 233, 255, 0.72), transparent 38%),
    rgba(255, 255, 255, 0.98);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.66rem;
  border: 1px solid rgba(105, 56, 239, 0.28);
  border-radius: 999px;
  background: rgba(105, 56, 239, 0.12);
  color: var(--teal-deep);
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
}

.auth-guest,
.auth-member,
.auth-form {
  display: grid;
  gap: 0.82rem;
}

.auth-toggle {
  width: 100%;
}

.auth-toggle .segment {
  flex: 1 1 0;
}

.auth-link-button {
  justify-self: start;
}

.member-facts {
  display: grid;
  gap: 0.62rem;
  margin: 0;
}

.member-facts div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.72rem 0;
  border-top: 1px solid var(--line);
}

.member-facts div:first-child {
  border-top: 0;
}

.member-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.member-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.account-facts {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.account-facts div {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 3rem;
  align-items: center;
  padding: 0.72rem 0;
  border-top: 1px solid var(--line);
}

.account-facts div:first-child {
  border-top: 0;
}

.account-facts dt {
  color: var(--muted);
  font-weight: 700;
}

.account-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
  text-align: right;
}

.account-plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

menu {
  margin: 0;
  padding: 0;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  width: min(22rem, calc(100% - 2rem));
  min-height: 3rem;
  padding: 0.88rem;
  border: 1px solid rgba(16, 29, 45, 0.12);
  border-radius: 8px;
  background: var(--ink);
  box-shadow: var(--shadow);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

@media (max-width: 1220px) {
  .workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-panel {
    grid-column: 1 / -1;
    grid-template-columns: minmax(17rem, 0.7fr) repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .product-visual {
    min-height: 100%;
  }

  .marks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .account-hero,
  .panel-heading,
  .band-heading,
  .mode-row,
  .solve-actions,
  .pricing-heading,
  menu {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
  }

  .topbar-actions {
    width: auto;
    flex: 0 1 auto;
    justify-content: flex-end;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav a {
    flex: 0 0 auto;
    text-align: left;
  }

  .brand {
    flex: 1 1 12rem;
  }

  .topbar-actions .button {
    width: auto;
  }

  .workspace,
  .account-layout,
  .account-plan-grid,
  .formula-grid,
  .pricing-grid,
  .account-panel,
  .product-band {
    grid-template-columns: 1fr;
  }

  .account-panel {
    grid-column: auto;
  }

  .quota {
    width: 100%;
    text-align: left;
  }

  h1 {
    font-size: 2rem;
  }

  .match-surface,
  .input-grid {
    grid-template-columns: 1fr;
  }

  .segmented,
  .button,
  .billing-toggle {
    width: 100%;
  }

  .segment {
    flex: 1 1 0;
  }

  .landing-topbar {
    position: static;
    background: rgba(250, 250, 255, 0.96);
  }

  .landing-hero {
    min-height: 32rem;
    padding-top: 3rem;
    background:
      linear-gradient(90deg, rgba(16, 24, 40, 0.94), rgba(48, 27, 108, 0.54)),
      url("./assets/chemistry-workflow.png") 58% center / cover;
  }

  .landing-hero h1 {
    font-size: 3.2rem;
  }

  .product-copy h2,
  .account-hero h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 520px) {
  .topbar-actions {
    width: 100%;
    align-items: stretch;
    justify-content: stretch;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .topbar-actions > * {
    flex: 1 1 8rem;
  }

  .site-nav {
    justify-content: space-between;
  }

  .site-nav a {
    flex: 1 1 0;
    text-align: center;
  }

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

  .step > span {
    width: 2.2rem;
  }

  .history-item {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .hero-actions,
  .account-actions,
  .account-facts div {
    align-items: stretch;
    flex-direction: column;
  }

  .account-facts dd {
    text-align: left;
  }
}
