/* ==========================================================================
   Illustrations for the extension rows
   Drawn in HTML and CSS (no image files). Everything is sized in em, and the
   em size follows the width of the figure, so each scene scales as one unit.
   Window chrome inside the scenes uses the site tokens, so it follows the
   active theme; the colours that stand in for other palettes are fixed.
   To use real screenshots instead, see README.md.
   ========================================================================== */

.ext-visual {
  margin: 0;
  container-type: inline-size;
}

/* A real screenshot in place of a drawn scene:
   <figure class="ext-visual"><img src="assets/img/name.png" alt="What it shows" width="1280" height="800" loading="lazy"></figure> */
.ext-visual > img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow);
}

.vis {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 2);
  background: var(--stage);
  color: var(--text);
  font-size: 2.25cqw;
  line-height: 1.25;
  user-select: none;
}

/* ---------- Shared pieces ---------- */
.popup {
  position: absolute;
  padding: 1.1em;
  border: 1px solid var(--line);
  border-radius: 1em;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9em;
  font-size: 1.05em;
  font-weight: 700;
}

.switch {
  position: relative;
  width: 2.3em;
  height: 1.3em;
  border-radius: 1em;
  background: var(--accent);
}

.switch::after {
  content: "";
  position: absolute;
  top: 0.17em;
  right: 0.17em;
  width: 0.96em;
  height: 0.96em;
  border-radius: 50%;
  background: var(--accent-ink);
}

.swatches {
  display: grid;
  gap: 0.6em;
}

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

.swatches.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swatch {
  position: relative;
  display: grid;
  gap: 0.45em;
  padding: 0.65em 0.7em 0.6em;
  border: 1px solid color-mix(in srgb, var(--st) 20%, transparent);
  border-radius: 0.65em;
  background: var(--sb);
}

.swatch i {
  display: block;
  width: 58%;
  height: 0.34em;
  border-radius: 0.2em;
  background: var(--sa);
}

.swatch b {
  color: var(--st);
  font-size: 0.8em;
  font-weight: 650;
  line-height: 1.15;
}

.swatch.is-on {
  outline: 0.16em solid var(--accent);
  outline-offset: 0.14em;
}

.swatch .star {
  position: absolute;
  top: 0.45em;
  right: 0.45em;
  width: 1em;
  height: 1em;
  color: var(--sa);
  stroke: none;
}

/* ---------- Theme Studio for GitHub ---------- */
.gh-page {
  position: absolute;
  left: 4%;
  top: 7%;
  bottom: 7%;
  width: 57%;
  overflow: hidden;
  padding: 1.4em;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 1em;
  background: #1a1b26;
  color: #c0caf5;
  box-shadow: var(--shadow);
}

.gh-top {
  display: flex;
  align-items: center;
  gap: 0.7em;
}

.gh-mark,
.gh-avatar {
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
}

.gh-mark {
  background: #7aa2f7;
}

.gh-avatar {
  background: #bb9af7;
}

.gh-search {
  flex: 1;
  height: 1.5em;
  border-radius: 0.55em;
  background: rgb(255 255 255 / 8%);
}

.gh-repo {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-top: 1.6em;
}

.gh-title {
  width: 9.5em;
  height: 1em;
  border-radius: 0.3em;
  background: #c0caf5;
  opacity: 0.9;
}

.gh-badge {
  padding: 0.1em 0.65em;
  border: 1px solid #3b4261;
  border-radius: 1em;
  color: #7aa2f7;
  font-size: 0.8em;
}

.gh-tabs {
  display: flex;
  gap: 1.1em;
  margin-top: 1.2em;
  padding-bottom: 0.8em;
  border-bottom: 1px solid #2a2e45;
}

.gh-tabs i {
  width: 3.4em;
  height: 0.6em;
  border-radius: 0.3em;
  background: #3b4261;
}

.gh-tabs i:first-child {
  background: #7aa2f7;
}

.gh-code {
  margin-top: 1.2em;
  padding: 1em 1.1em;
  border-radius: 0.6em;
  background: #16161e;
  color: #a9b1d6;
  font: 400 0.9em / 1.75 var(--font-mono);
}

.gh-code p {
  white-space: pre;
}

.gh-code b {
  font-weight: 400;
}

.c-k {
  color: #bb9af7;
}

.c-f {
  color: #7aa2f7;
}

.c-v {
  color: #e0af68;
}

.c-s {
  color: #9ece6a;
}

.gh-toast {
  position: absolute;
  right: 1.3em;
  bottom: 1.3em;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.55em 1.05em;
  border-radius: 2em;
  background: #7aa2f7;
  color: #10131f;
  font-size: 0.95em;
  font-weight: 700;
  box-shadow: 0 0 0 0.25em rgb(122 162 247 / 25%), 0 0.6em 1.6em rgb(0 0 0 / 40%);
}

.gh-check {
  position: relative;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  background: #10131f;
}

.gh-check::after {
  content: "";
  position: absolute;
  left: 0.36em;
  top: 0.2em;
  width: 0.3em;
  height: 0.52em;
  border: solid #7aa2f7;
  border-width: 0 0.14em 0.14em 0;
  transform: rotate(40deg);
}

.spark {
  position: absolute;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: #bb9af7;
}

.sp1 {
  left: -0.9em;
  top: -0.5em;
}

.sp2 {
  right: 0.8em;
  top: -1.1em;
  background: #9ece6a;
}

.sp3 {
  right: -0.7em;
  top: 0.1em;
  background: #e0af68;
}

.popup-gh {
  top: 11%;
  right: 4%;
  width: 45%;
}

/* ---------- Theme Studio for Claude ---------- */
.cl-chat {
  position: absolute;
  left: 4%;
  top: 7%;
  bottom: 7%;
  width: 58%;
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 1em;
  background: #2e3440;
  box-shadow: var(--shadow);
}

.cl-side {
  display: grid;
  align-content: start;
  gap: 0.75em;
  padding: 1.2em 0.9em;
  background: #272c36;
}

.cl-side i {
  height: 0.8em;
  border-radius: 0.3em;
  background: #3b4252;
}

.cl-side i:first-child {
  background: #88c0d0;
}

.cl-main {
  display: flex;
  flex-direction: column;
  gap: 1em;
  padding: 1.3em;
}

.cl-msg {
  display: grid;
  gap: 0.55em;
}

.cl-msg i {
  display: block;
  height: 0.62em;
  border-radius: 0.3em;
  background: #d8dee9;
  opacity: 0.7;
}

.cl-msg .w40 {
  width: 40%;
}

.cl-msg .w60 {
  width: 60%;
}

.cl-msg .w70 {
  width: 70%;
}

.cl-me {
  align-self: flex-end;
  width: 62%;
  padding: 0.9em 1em;
  border-radius: 0.8em;
  background: #4c566a;
}

.cl-glow {
  padding: 0.9em 1em;
  border-radius: 0.8em;
  background: #323947;
  box-shadow: 0 0 0 0.18em rgb(136 192 208 / 60%), 0 0 1.8em rgb(136 192 208 / 35%);
}

.cl-composer {
  display: flex;
  align-items: center;
  height: 2.7em;
  margin-top: auto;
  padding: 0 0.9em;
  border: 1px solid #4c566a;
  border-radius: 0.9em;
}

.cl-composer span {
  width: 30%;
  height: 0.6em;
  border-radius: 0.3em;
  background: #4c566a;
}

.popup-cl {
  top: 10%;
  right: 4%;
  width: 46%;
}

.tabs {
  display: flex;
  gap: 0.3em;
  padding: 0.25em;
  border-radius: 0.7em;
  background: var(--surface-2);
}

.tabs span {
  flex: 1;
  padding: 0.4em 0;
  border-radius: 0.5em;
  color: var(--muted);
  font-size: 0.85em;
  font-weight: 600;
  text-align: center;
}

.tabs .on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgb(0 0 0 / 14%);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-top: 0.9em;
}

.chips span {
  padding: 0.25em 0.7em;
  border: 1px solid var(--line);
  border-radius: 2em;
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 550;
}

.chips .on {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.popup-cl .swatches {
  margin-top: 0.9em;
}

.popup-note {
  margin-top: 0.9em;
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 550;
}

/* ---------- Task Board ---------- */
.vis-tb {
  --tb: #3d8ea0;
}

.browser {
  position: absolute;
  inset: 7% 4%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1em;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 1.1em;
  padding: 0.8em 1em 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.dots {
  display: flex;
  gap: 0.4em;
  padding-bottom: 0.8em;
}

.dots i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--line-strong);
}

.btab {
  width: 11em;
  height: 1.9em;
  border-radius: 0.6em 0.6em 0 0;
  background: var(--surface);
}

.browser-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5em;
  min-height: 0;
}

.bpage {
  display: grid;
  align-content: start;
  gap: 0.85em;
  padding: 1.5em;
}

.bpage i {
  display: block;
  height: 0.7em;
  border-radius: 0.3em;
  background: var(--surface-2);
}

.bpage .h {
  width: 55%;
  height: 1.3em;
  background: var(--line);
}

.bpage .s {
  width: 70%;
}

.bpage .img {
  height: 7em;
  margin-top: 0.4em;
  border-radius: 0.7em;
}

.panel {
  display: grid;
  align-content: start;
  gap: 0.95em;
  padding: 1.1em;
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  font-weight: 700;
}

.wx {
  padding: 0.2em 0.65em;
  border-radius: 2em;
  background: color-mix(in srgb, var(--tb) 18%, transparent);
  font-size: 0.8em;
  font-weight: 650;
  white-space: nowrap;
}

.ptabs {
  display: flex;
  gap: 1.1em;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88em;
  font-weight: 600;
}

.ptabs span {
  padding-bottom: 0.5em;
}

.ptabs .on {
  margin-bottom: -1px;
  border-bottom: 0.18em solid var(--tb);
  color: var(--text);
}

.tasks {
  display: grid;
  gap: 0.55em;
  padding: 0;
  font-size: 0.9em;
  list-style: none;
}

.tasks li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65em;
  padding: 0.55em 0.7em;
  border: 1px solid var(--line);
  border-radius: 0.6em;
}

.tasks li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb {
  width: 1em;
  height: 1em;
  border: 0.14em solid var(--line-strong);
  border-radius: 0.3em;
}

.tasks .done .cb {
  border-color: var(--tb);
  background: var(--tb);
}

.tasks .done span {
  color: var(--muted);
  text-decoration: line-through;
}

.tasks time {
  color: var(--muted);
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
}

.add-task {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 0.7em;
  border: 1px dashed var(--line-strong);
  border-radius: 0.6em;
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 600;
}

.add-task b {
  color: var(--tb);
  font-size: 1.2em;
  line-height: 1;
}

.usage {
  display: grid;
  gap: 0.5em;
  font-size: 0.85em;
}

.usage-row {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  align-items: center;
  gap: 0.6em;
  color: var(--muted);
}

.usage-row i {
  display: block;
  width: var(--w);
  height: 0.62em;
  border-radius: 0.3em;
  background: var(--tb);
}
