/* Kazbo UI catalogue layout. The look itself comes from styles/ember/ember.css. */
html { scroll-behavior: smooth; scroll-padding-top: 76px; overflow-x: clip; }
body { margin: 0; min-height: 100vh; background: var(--e-surface-1); overflow-x: clip; }
a { color: inherit; }
code { font: 13px/1.5 var(--e-font-mono); color: var(--e-text-2); }
main { padding: 0 8px; }

/* header */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-name { font: 600 17px/1 var(--e-font-body); letter-spacing: -.01em; }
.e-header nav { margin-left: 6px; }
.site-search { width: min(100%, 400px); }
@media (max-width: 700px) {
  .site-search { display: none; }
}

/* hero */
.hero { display: grid; justify-items: center; gap: 18px; max-width: 900px; margin: 0 auto; padding: clamp(70px, 12vw, 150px) 16px clamp(56px, 8vw, 100px); text-align: center; }
.hero .e-lead { max-width: 600px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 12px; }

/* blocks */
.block { max-width: 1400px; margin: 0 auto; padding: 0 0 clamp(70px, 8vw, 110px); }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding: 0 12px 22px; }
.block-head .e-small { margin: 0; max-width: 560px; }
.sub { margin: 40px 12px 16px; font: 600 15px/1 var(--e-font-body); color: var(--e-text-1); }
.sub .e-small { font-weight: 500; }

/* gallery of shipped sites */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 8px; }
@media (max-width: 760px) { .gallery { grid-template-columns: minmax(0, 1fr); } }

/* components catalogue */
.toolbar { position: relative; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 0 12px 18px; }
.toolbar .e-chips { flex: 1; min-width: 0; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 8px; }
.item { display: flex; flex-direction: column; min-width: 0; }
.item.wide { grid-column: span 2; }
@media (max-width: 900px) { .item.wide { grid-column: auto; } }
.item[hidden] { display: none; }
.demo {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 260px;
  padding: 40px 28px;
  border-radius: 16px;
  /* a stage one step darker than the cards, so surface-2 components read as they do on a page */
  background: var(--e-floating);
  box-shadow: inset 0 0 0 1px var(--e-border-1);
}
.demo-tall { align-items: flex-start; padding-top: 70px; }
.demo-col { flex-direction: column; flex-wrap: nowrap; }
.demo-col .e-field { max-width: 320px; }
.demo-flush { padding: 26px 0; align-items: center; overflow: hidden; }
.demo-card { padding: 28px clamp(16px, 6vw, 80px); }
.demo-card .e-card { width: min(100%, 560px); }
.demo-hero { padding: 50px 20px; }
.mini-header { position: relative; width: 100%; background: var(--e-surface-1); }
.mini-hero { display: grid; justify-items: center; gap: 14px; max-width: 620px; text-align: center; }
.mini-hero .e-display { font-size: clamp(32px, 4vw, 46px); }
.demo-panel { max-width: 300px; padding: 20px; }
.demo-panel p { margin: 0 0 6px; }
.demo .e-chips { max-width: 100%; }

.item-meta { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 6px 8px 16px; }
.item-meta > span { flex: 1; min-width: 0; line-height: 1.25; }
.item-meta b { display: block; font-weight: 500; }
.item-meta i { display: block; font-style: normal; color: var(--e-text-2); }
.item-actions { display: flex; gap: 6px; opacity: 0; transform: translateY(3px); transition: opacity .2s ease-out, transform .3s var(--e-ease-out-cubic); }
.item:hover .item-actions, .item:focus-within .item-actions, .item.code-open .item-actions { opacity: 1; transform: none; }
@media (hover: none) { .item-actions { opacity: 1; transform: none; } }
.item-code { display: none; margin: 0 0 14px; }
.item.code-open .item-code { display: block; }
.code {
  margin: 0;
  max-height: 340px;
  overflow: auto;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--e-floating);
  box-shadow: inset 0 0 0 1px var(--e-border-1);
  font: 13px/1.6 var(--e-font-mono);
  color: var(--e-text-1);
  white-space: pre;
  tab-size: 2;
}
.code code { color: inherit; }
.empty { padding: 40px 12px; text-align: center; color: var(--e-text-2); }

/* tokens */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 0 4px; }
.swatch { display: grid; gap: 8px; padding: 8px 8px 12px; border: 0; border-radius: 16px; background: var(--e-surface-2); color: var(--e-text-1); text-align: left; cursor: pointer; transition: background-color .2s var(--e-ease-out-quart), transform .15s ease; }
.swatch:hover { background: var(--e-surface-2-hover); }
.swatch:active { transform: scale(.98); }
.swatch i { display: block; height: 72px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
.swatch b { padding: 0 4px; font-weight: 500; font-size: 14px; }
.swatch span { padding: 0 4px; font: 12px/1.3 var(--e-font-mono); color: var(--e-text-2); }
.type-list { display: grid; gap: 2px; padding: 0 4px; }
.type-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 18px 20px; border-radius: 14px; background: var(--e-surface-2); }
.shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 0 4px; }
.shape { display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 1.3; background: var(--e-surface-2); }
.shape b { font-weight: 500; }
.shape span { font: 12px/1 var(--e-font-mono); color: var(--e-text-2); }
.curves { display: grid; gap: 2px; padding: 0 4px; }
.curve { display: grid; grid-template-columns: minmax(130px, 200px) 1fr minmax(0, 260px); align-items: center; gap: 18px; padding: 14px 20px; border-radius: 14px; background: var(--e-surface-2); }
.curve b { font-weight: 500; }
.curve code { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { position: relative; height: 10px; border-radius: 99px; background: var(--e-surface-3); }
.track i { position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--e-text-1); transition: left 1s var(--ease); }
.curve:hover .track i, .curve:focus-within .track i { left: calc(100% - 18px); background: var(--e-accent); }
@media (max-width: 700px) { .curve { grid-template-columns: 1fr; gap: 10px; } }

/* styles */
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 8px; }
.style-card { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; padding: 16px; border-radius: 18px; background: var(--e-surface-2); }
.style-card.is-on { box-shadow: inset 0 0 0 1px var(--e-accent-50); }
.style-card p { margin: 8px 0 0; }
.style-card .e-tag { margin-left: 6px; vertical-align: 2px; height: 22px; font-size: 11px; }
.style-swatch { aspect-ratio: 1; border-radius: 14px; }

/* use */
.use { display: grid; gap: 14px; padding: 0 4px; }
.use-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; max-width: 1400px; margin: 0 auto; padding: 30px 20px 50px; color: var(--e-text-3); font-size: 14px; border-top: 1px solid var(--e-border-1); }
.sheet-actions { display: flex; gap: 8px; padding: 14px 4px 0; }

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--e-text-1);
  color: var(--e-surface-1);
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s ease-out, transform .45s var(--e-ease-out-expo);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
