.ec-demo {
  --paper: #ead6b8;
  --paper-2: #f6e6cc;
  --ink: #1c140c;
  --muted: #6e5c48;
  --line: #d4bc96;
  --nick: #e23b2b;
  --ok: #1b6b3a;
  --r: 14px;
  --font: "Mona Sans", sans-serif;
  --font-read: "Mona Sans", sans-serif;
}

.ec-demo[data-theme="ink"] {
  --paper: #1a1916;
  --paper-2: #241f1a;
  --ink: #ead6b8;
  --muted: #a89880;
  --line: #3a3228;
}

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

.ec-demo img {
  max-width: none;
}

.ec-demo .panel {
  width: 380px;
  height: 720px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: -0.02em;
  border: 1px solid #1c140c;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(28, 20, 12, 0.22);
}

.ec-demo .panel--cut {
  height: auto;
  max-height: none;
}

.ec-demo .panel--cut .scroll {
  flex: 1 1 auto;
  overflow: visible;
}

.ec-demo .panel--cut .lesson-h {
  margin: 12px 0 4px;
  padding-bottom: 4px;
  font-size: 15px;
}

.ec-demo .panel--cut .agent-prompt {
  margin-top: 14px;
}

.ec-demo .panel-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.ec-demo .pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ec-demo .pane[hidden],
.ec-demo [hidden] {
  display: none !important;
}

.ec-demo .ph {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
}

.ec-demo .ph-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.ec-demo .ph-title {
  font-size: 14px;
  font-weight: 800;
}

.ec-demo .mark {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.ec-demo .wordmark {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.ec-demo .icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.ec-demo .icon-btn .i {
  width: 18px;
  height: 18px;
  display: block;
}

.ec-demo .ph .icon-btn[aria-label="Open in window"],
.ec-demo .ph .icon-btn[aria-label="Close panel"] {
  display: none;
}

.ec-demo .tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 10px 10px;
  padding: 0;
}

.ec-demo .tabs button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.ec-demo .tabs button[aria-selected="true"] {
  background: #e8e1d5;
  color: #1c140c;
}

.ec-demo[data-theme="ink"] .tabs button[aria-selected="true"] {
  background: var(--paper-2);
  color: #ead6b8;
}

.ec-demo .scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 0 14px 12px;
}

.ec-demo .stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ec-demo .glow-warm,
.ec-demo .glow-ink,
.ec-demo .glow-nick {
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.ec-demo .card {
  border-radius: var(--r);
  padding: 14px;
}

.ec-demo .catalog-card {
  appearance: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 12px;
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.ec-demo .catalog-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ec-demo .catalog-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ec-demo .project-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.ec-demo .catalog-card[data-project] .project-title {
  font-size: 18px;
  font-weight: 720;
}

.ec-demo .catalog-preview-project {
  justify-content: center;
  min-height: 124px;
  padding: 16px 14px;
}

.ec-demo .catalog-preview-project .catalog-body {
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ec-demo .catalog-preview-project .project-title {
  max-width: 27ch;
}

.ec-demo .catalog-preview-project .chip-row {
  justify-content: center;
  gap: 6px;
}

.ec-demo .preview-techs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 24px;
}

.ec-demo .preview-techs .lang,
.ec-demo .preview-techs .lang img {
  width: 20px;
  height: 20px;
}

.ec-demo .preview-techs .lang {
  border-radius: 5px;
}

.ec-demo .catalog-paper-row {
  appearance: none;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.ec-demo .paper-preview-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.ec-demo .paper-preview-icon img {
  width: 22px;
  height: 22px;
  opacity: 0.72;
}

.ec-demo .catalog-paper-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.ec-demo .catalog-paper-copy strong {
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.ec-demo .catalog-paper-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.ec-demo .chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.ec-demo .chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 52%, var(--paper-2)) 0%,
      color-mix(in srgb, var(--ink) 7%, var(--paper-2)) 100%
    );
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 245, 0.88),
    inset 0 -1px 0 rgba(28, 20, 12, 0.1);
}

.ec-demo .chip-oak,
.ec-demo .chip-ink,
.ec-demo .chip-warm,
.ec-demo .chip-time {
  border-color: color-mix(in srgb, var(--ink) 18%, var(--line));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 52%, var(--paper-2)) 0%,
      color-mix(in srgb, var(--ink) 7%, var(--paper-2)) 100%
    );
  color: var(--ink);
}

.ec-demo .chip-nick {
  border-color: color-mix(in srgb, var(--nick) 42%, var(--line));
  color: var(--nick);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 40%, color-mix(in srgb, var(--nick) 12%, var(--paper-2))) 0%,
      color-mix(in srgb, var(--nick) 16%, var(--paper-2)) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 242, 0.7),
    inset 0 -1px 0 color-mix(in srgb, var(--nick) 18%, transparent);
}

.ec-demo .lang {
  box-sizing: border-box;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.ec-demo .lang img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.ec-demo .project-head .lang,
.ec-demo .project-head .lang img {
  width: 22px;
  height: 22px;
}

.ec-demo .project-logos {
  display: flex;
  gap: 6px;
  flex: none;
}

.ec-demo .home-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 16px;
}

.ec-demo .fb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 30%;
  background: #1a1614;
  color: #ead6b8;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.ec-demo .who {
  flex: 1;
  min-width: 0;
}

.ec-demo .who b {
  display: block;
  font-size: 14px;
}

.ec-demo .who span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.ec-demo .streak {
  flex: none;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.ec-demo .section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}

.ec-demo .section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.ec-demo .count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
}

.ec-demo .lede {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.ec-demo .proj {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 14px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.ec-demo .proj::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  background: rgba(17, 17, 17, 0.1);
  pointer-events: none;
}

.ec-demo .proj > * {
  position: relative;
}

.ec-demo .proj-copy {
  flex: 1;
  min-width: 0;
}

.ec-demo .proj b {
  display: block;
  font-size: 13px;
}

.ec-demo .proj small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.ec-demo .proj em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.ec-demo .daily {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  text-align: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.ec-demo[data-theme="ink"] .daily {
  background: #3a3228;
  border-color: #8a7358;
  color: #ead6b8;
}

.ec-demo .daily .project-title {
  width: 100%;
  text-align: center;
}

.ec-demo .daily .chip-row {
  justify-content: center;
}

.ec-demo .project-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 4px 0 18px;
  padding: 18px 14px 16px;
  text-align: center;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: none;
}

.ec-demo .project-head .lesson-title {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.ec-demo .project-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.ec-demo .project-cats {
  justify-content: center;
  flex-wrap: wrap;
}

.ec-demo .lesson-scroll {
  padding-bottom: 48px;
}

.ec-demo .docs {
  margin: 0 0 16px;
}

.ec-demo .docs-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--muted);
}

.ec-demo .docs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.ec-demo .doc-link {
  color: var(--ink);
  font-size: 0.875rem;
  text-decoration: underline;
}

.ec-demo .lesson-h {
  margin: 26px 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 24%, var(--line));
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ec-demo .lesson-p,
.ec-demo .lesson-ul {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.ec-demo .lesson-ul {
  padding-left: 1.2em;
}

.ec-demo .agent-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
  padding: 16px 14px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}

.ec-demo .agent-prompt-marks {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 2px;
}

.ec-demo .agent-mark {
  position: relative;
  z-index: var(--z, 1);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: -8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #fff);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 20, 12, 0.18);
}

.ec-demo .agent-mark:first-child {
  margin-left: 0;
}

.ec-demo .agent-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ec-demo .agent-mark--gpt {
  background: #fff;
  padding: 5px;
  box-sizing: border-box;
}

.ec-demo .agent-mark--gpt img {
  filter: invert(1);
}

.ec-demo .agent-mark--gpt img,
.ec-demo .agent-mark--gemini img,
.ec-demo .agent-mark--lovable img,
.ec-demo .agent-mark--manus img {
  object-fit: contain;
}

.ec-demo .agent-mark--gemini,
.ec-demo .agent-mark--lovable,
.ec-demo .agent-mark--manus {
  padding: 4px;
  box-sizing: border-box;
}

.ec-demo .agent-prompt-copy {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  font-variation-settings: "wght" 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink);
}

.ec-demo .agent-prompt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-2);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  font-variation-settings: "wght" 750;
  letter-spacing: -0.02em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.ec-demo .agent-prompt-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.ec-demo .agent-prompt-btn.is-on {
  background: var(--paper-2);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
}

.ec-demo .lesson-done {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 18px 0 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.ec-demo .lesson-done-copy b,
.ec-demo .lesson-done-copy span {
  display: block;
}

.ec-demo .lesson-done-copy span {
  font-size: 12px;
  color: var(--muted);
}

.ec-demo .bubbles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ec-demo .bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.ec-demo .bubble.me {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}

.ec-demo .bubble.ta {
  align-self: flex-start;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.ec-demo .bubble.ta p {
  margin: 0 0 8px;
}

.ec-demo .bubble.ta p:last-child {
  margin: 0;
}

.ec-demo .bubble.ta code {
  font-size: 12px;
}

.ec-demo .composer {
  display: flex;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
}

.ec-demo .composer input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  background: var(--paper-2);
  color: var(--muted);
}

.ec-demo .composer .send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
}

.ec-demo .composer .send .i {
  width: 18px;
  height: 18px;
}

.ec-demo .ph-nick {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 12px 12px 8px;
}

.ec-demo .ph-nick .ph-title {
  text-align: center;
}

.ec-demo .nick-peek {
  width: 72px;
  height: auto;
  display: block;
  margin: 0 auto;
  pointer-events: none;
}

.ec-demo .dock {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 70%, var(--paper));
  padding: 6px 4px 8px;
}

.ec-demo .dock button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  cursor: pointer;
  border-radius: 8px;
}

.ec-demo .dock button[aria-current="page"] {
  color: var(--ink);
  background: rgba(17, 17, 17, 0.05);
}

.ec-demo .dock .i {
  width: 18px;
  height: 18px;
}

.ec-demo .profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 16px;
}

.ec-demo .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

.ec-demo .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 16px 10px 14px;
  text-align: center;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.ec-demo .stat b {
  display: block;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ec-demo .stat span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.ec-demo .account-row,
.ec-demo .appearance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}

.ec-demo .account-row b,
.ec-demo .appearance-row b {
  font-size: 15px;
  font-weight: 700;
}

.ec-demo .mode {
  --w: 44px;
  --h: 26px;
  width: var(--w);
  height: var(--h);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  cursor: pointer;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.ec-demo .mode::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
}

.ec-demo .mode[aria-checked="true"] {
  background: var(--ink);
  justify-content: flex-end;
}

.ec-demo .mode[aria-checked="true"]::after {
  background: var(--paper);
}

@media (max-width: 860px) {
  .ec-demo {
    justify-self: center;
    width: 100%;
  }

  .ec-demo .panel,
  .ec-demo .panel--cut {
    width: 100%;
    max-width: 380px;
    transform: none;
  }

  .preview-band .ec-demo .panel {
    max-width: none;
  }

  .preview-band .ec-demo .stats {
    gap: 10px;
  }

  .preview-band .ec-demo .stat {
    min-height: 92px;
    padding: 18px 12px 16px;
  }

  .preview-band .ec-demo .profile-card,
  .preview-band .ec-demo .home-hero {
    padding: 14px;
  }
}
