:root {
  --cw-ink: #12254a;
  --cw-muted: #51647e;
  --cw-navy: #0b3e76;
  --cw-blue: #0759ba;
  --cw-blue-dark: #064697;
  --cw-cyan: #38d4ef;
  --cw-border: #d7e2f1;
  --cw-canvas: #f1f5fb;
  --cw-surface: #fff;
  --cw-radius: 1rem;
  --cw-shadow: 0 .65rem 1.75rem #1633660c;
}

.cw-shell {
  min-block-size: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: .6rem;
  block-size: 100dvh;
  max-inline-size: 92rem;
  padding: clamp(.65rem, 2vw, 1.6rem);
  margin: 0 auto;
  color: var(--cw-ink);
}
.cw-shell, .cw-shell * { box-sizing: border-box; }
.cw-shell [hidden] { display: none !important; }
.cw-topbar {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2vw, 1.2rem);
  padding: .55rem .75rem;
  min-inline-size: 0;
  color: white;
  background: linear-gradient(112deg, var(--cw-navy) 35%, #0d5499 100%);
  border: 1px solid #294c77;
  border-radius: var(--cw-radius);
}
.cw-topbar .cw-wordmark {
  display: block;
  inline-size: clamp(5.7rem, 13vw, 10rem);
  padding: .15rem;
  border-radius: .55rem;
  background: white;
}
.cw-topbar .cw-heading { flex: 1; min-inline-size: 0; }
.cw-topbar h1 { font-size: clamp(1.13rem, 2.1vw, 1.8rem); line-height: 1.08; margin: 0; letter-spacing: -.035em; }
.cw-topbar p { color: #d5e9fd; margin: .3rem 0 0; font-size: .86rem; overflow-wrap: anywhere; }
.cw-topbar a, .cw-topbar button {
  white-space: nowrap;
  border: 1px solid #91b0d7;
  color: white;
  background: #13497f;
  padding: .5rem .68rem;
  border-radius: .55rem;
}
.cw-tabs {
  display: flex;
  align-items: center;
  gap: .28rem;
  overflow-x: auto;
  scrollbar-width: thin;
  min-inline-size: 0;
  padding: .22rem;
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  border-radius: .78rem;
}
.cw-tabs > a, .cw-tabs > button {
  flex: 0 0 auto;
  padding: .56rem .78rem;
  margin: 0;
  border: 0;
  border-radius: .52rem;
  color: var(--cw-ink);
  background: transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.cw-tabs > a:hover, .cw-tabs > button:hover { background: #e8f2fe; }
.cw-tabs > :is(button[aria-selected="true"], a[aria-current="location"]) {
  color: #fff;
  background: var(--cw-blue);
}
.cw-viewport { min-block-size: 0; min-inline-size: 0; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.cw-viewport > [id], .cw-viewport [id][data-cw-anchor] { scroll-margin-block-start: .55rem; }
.cw-shell :focus-visible { outline: 3px solid var(--cw-blue-dark); outline-offset: 3px; }
.cw-topbar :focus-visible { outline-color: var(--cw-cyan); }
.cw-status:empty { display: none; }
.cw-status {
  margin: 0;
  padding: .45rem .75rem;
  border: 1px solid #aacaf0;
  border-radius: .65rem;
  background: #e8f3ff;
  overflow-wrap: anywhere;
}
.cw-card {
  min-inline-size: 0;
  padding: clamp(.85rem, 1.75vw, 1.4rem);
  background: var(--cw-surface);
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius);
  box-shadow: var(--cw-shadow);
}
.cw-card > :first-child { margin-block-start: 0; }
.cw-card > :last-child { margin-block-end: 0; }
.cw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; align-items: start; }
.cw-title { margin-block: 0 .45rem; letter-spacing: -.024em; }
.cw-subtitle { color: var(--cw-muted); margin-block: .3rem .85rem; line-height: 1.5; }
@media (max-width: 640px) {
  .cw-shell { gap: .42rem; }
  .cw-topbar p { font-size: .75rem; }
  .cw-topbar .cw-wordmark { flex: 0 0 auto; }
  .cw-tabs > a, .cw-tabs > button { padding: .48rem .65rem; }
  .cw-grid { grid-template-columns: minmax(0, 1fr); }
}

[data-cw-inactive] { display: none !important; }


body:has(.member-auth:not([hidden])),
body:has(.merchant-login:not([hidden])) {
  background:
    radial-gradient(ellipse at top left, #d8effe 0%, transparent 42%),
    radial-gradient(ellipse at bottom right, #e0f2fc 0%, transparent 48%),
    var(--cw-canvas);
}
.cw-agreement-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; max-height: 20rem; overflow: auto; padding: 1rem; border: 1px solid #ccd8e5; }
.cw-agreement-hash { overflow-wrap: anywhere; font-size: .85rem; }
