:root {
  color-scheme: light;

  --bg: #231f20;
  --card-bg: #ffffff;

  --text: #000000;
  --muted: #5e5e5e;

  --primary: #c1d82e;
  --primary-hover: #75831c;
  --ring: rgba(95, 95, 95, 0.22);
  --btn-label: #000000;

  --radius: 8px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;

  background-color: var(--bg);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: auto;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Only applies to embed_graph.html */
body.embed-body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;

  background-color: #ffffff;
  /* page background */
  padding-bottom: 16px;
  /* adjust as needed */
  box-sizing: border-box;
}

/* Canvas fills the viewport, stays transparent */
body.embed-body #embedChart {
  display: block;
  width: 100%;
  height: 100%;

  background: transparent;
  /* IMPORTANT */
}

/* Shell just centers the card */
.auth-shell {
  width: 100%;
  display: grid;
  place-items: center;
}

/* This is now the real white box */
.auth-card {
  width: min(420px, 92vw);
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  padding: 28px 32px 32px;
  /* 👈 INTERNAL MARGINS */
  display: grid;
  gap: 18px;
  text-align: center;
}

.auth-img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}

/* Title + subtitle like Cognito */
.auth-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.auth-subtitle {
  margin: -8px 0 8px;
  font-size: 14px;
  color: var(--muted);
}

/* Primary button */
.main-btn {
  width: 100%;
  height: 36px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  border-radius: 8px;

  background: var(--primary);
  border: var(--ring);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.main-btn:hover {
  background: var(--primary-hover);
}

.main-btn:active {
  transform: translateY(1px);
}

.main-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

/* Button label */
.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--btn-label);
}

.label span {
  -webkit-text-stroke: 0;
}

/* Footer message inside the card */
.normal-text {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

/* ============================ WIP ============================== */

/* Navbar styles */
.navbar {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-bottom: 20px;
}

.navbar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.navbar a:hover {
  color: var(--primary);
}

.navbar a.selected {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- App pages ---------- */

/* Wider card, same styling */
.app-card {
  width: min(900px, 92vw);
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  padding: 28px 32px 32px;
  display: grid;
  gap: 18px;
  text-align: center;
}

/* Embed area */
.embed-wrap {
  display: grid;
  place-items: center;
}

.embed-box {
  width: 500px;
  height: 500px;
  border-radius: var(--radius);
  background: #f3f4f6;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .10);
}

.embed-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Responsive: if screen is narrower than 500px */
@media (max-width: 560px) {
  .embed-box {
    width: 100%;
    height: min(500px, 70vh);
  }
}

/* Small button override (wins against .main-btn { width:100% }) */
a.main-btn.small {
  width: fit-content !important;
  height: 32px;
  padding: 0 16px;
  justify-self: center;
  /* centers inside the grid card */
}



a.main-btn.small .label,
a.main-btn.small .label span {
  color: var(--card-bg);
}

.code-box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  /* make it stay inside the card */
  overflow-x: auto;

  /* make JSON wrap nicely instead of forcing overflow */
  white-space: pre-wrap;
  word-break: break-word;

  /* optional: make it look like an actual box */
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);

  /* JSON reads better left-aligned */
  text-align: left;
}

/* Embedded self-test block */
.embed-test {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 16px;
}

.embed-test iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.embed-note {
  margin: 0 0 10px;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Embed graph layout */
.embed-wrap {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.embed-head {
  display: grid;
  gap: 4px;
}

.embed-title {
  margin: 0;
  font-size: 1.05rem;
}

.embed-sub {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

.embed-panel {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.embed-chart {
  /* The chart will fill this area. Change min-height if you want “bigger chart” by default. */
  width: 100%;
  height: 180px;
  padding: 10px 10px 6px;
  box-sizing: border-box;
}

.embed-chart canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.embed-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.10);
}

.embed-pill {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  width: fit-content;
}