:root {
  --ink: #2b2933;
  --muted: #69656f;
  --line: #e6e3df;
  --paper: #fcfbf8;
  --purple: #2563a6;
  --coral: #2563a6;
  --lavender: #eee9f4;
  --sidebar: 244px;
  /* Every color has a light value here and a dark value below. Add new colors the same way. */
  --c-00000022: #0002;
  --c-1e3a6040: #1e3a6040;
  --c-1e4f85: #1e4f85;
  --c-214e7c: #214e7c;
  --c-234b7305: #234b7305;
  --c-234b7308: #234b7308;
  --c-25202c66: #25202c66;
  --c-25202c80: #25202c80;
  --c-2563a6: #2563a6;
  --c-30233830: #30233830;
  --c-30233833: #30233833;
  --c-30233840: #30233840;
  --c-332b3f: #332b3f;
  --c-376e9a30: #376e9a30;
  --c-3c80bb: #3c80bb;
  --c-47434e: #47434e;
  --c-4d8bc8: #4d8bc8;
  --c-54495f: #54495f;
  --c-625c67: #625c67;
  --c-65586b: #65586b;
  --c-657387: #657387;
  --c-65809c: #65809c;
  --c-665a70: #665a70;
  --c-68616e: #68616e;
  --c-69656f: #69656f;
  --c-6ba8dc: #6ba8dc;
  --c-6f7f96: #6f7f96;
  --c-73687f: #73687f;
  --c-73a9df70: #73a9df70;
  --c-776d80: #776d80;
  --c-7990a6: #7990a6;
  --c-7b8694: #7b8694;
  --c-817b84: #817b84;
  --c-8a6a1f: #8a6a1f;
  --c-8a7e93: #8a7e93;
  --c-8a8590: #8a8590;
  --c-a43d36: #a43d36;
  --c-a9c6e2: #a9c6e2;
  --c-abc5df: #abc5df;
  --c-b9cbe3: #b9cbe3;
  --c-b9ccdf: #b9ccdf;
  --c-c4d7e9: #c4d7e9;
  --c-c9bfd3: #c9bfd3;
  --c-d9d0e0: #d9d0e0;
  --c-dbe5ee: #dbe5ee;
  --c-dcd4e1: #dcd4e1;
  --c-dce4ec: #dce4ec;
  --c-ddd5e2: #ddd5e2;
  --c-dedbd6: #dedbd6;
  --c-e0d8e6: #e0d8e6;
  --c-e0d9e6: #e0d9e6;
  --c-e1dbd1: #e1dbd1;
  --c-e4dfe9: #e4dfe9;
  --c-e5dfe8: #e5dfe8;
  --c-e5e1e6: #e5e1e6;
  --c-e5eef8: #e5eef8;
  --c-e6ddcc: #e6ddcc;
  --c-e8f0fb: #e8f0fb;
  --c-ede9e5: #ede9e5;
  --c-edf2f7: #edf2f7;
  --c-edf4fb: #edf4fb;
  --c-eeebe7: #eeebe7;
  --c-eef3fa: #eef3fa;
  --c-f0eaf4: #f0eaf4;
  --c-f1eeeb: #f1eeeb;
  --c-f3eef7: #f3eef7;
  --c-f3eef8: #f3eef8;
  --c-f4f7fa: #f4f7fa;
  --c-f5f3ef: #f5f3ef;
  --c-f6f9fd: #f6f9fd;
  --c-f7e9e2: #f7e9e2;
  --c-f7f4fa: #f7f4fa;
  --c-f7fafe: #f7fafe;
  --c-fbfdff: #fbfdff;
  --c-fcfaf6: #fcfaf6;
  --c-fdf5ec70: #fdf5ec70;
  --c-ffffff: #fff;
  --c-ffffff66: #fff6;
  --c-ffffff80: #ffffff80;
  --c-ffffff88: #fff8;
  color-scheme: light;
}
/* Dark look: chosen with the sun/moon button (data-theme on <html>), or the device setting when
   nothing is chosen yet. */
:root[data-theme='dark'] {
  --ink: #d4d3d8;
  --muted: #b0afb2;
  --line: #3c3935;
  --paper: #26241e;
  --purple: #71a1d5;
  --coral: #71a1d5;
  --lavender: #2d2832;
  --c-00000022: #00000022;
  --c-1e3a6040: #00000040;
  --c-1e4f85: #528ccb;
  --c-214e7c: #538bc5;
  --c-234b7305: #00000005;
  --c-234b7308: #00000008;
  --c-25202c66: #00000066;
  --c-25202c80: #00000080;
  --c-2563a6: #71a1d5;
  --c-30233830: #00000030;
  --c-30233833: #00000033;
  --c-30233840: #00000040;
  --c-332b3f: #d1cdd6;
  --c-376e9a30: #00000030;
  --c-3c80bb: #9abbd7;
  --c-47434e: #c5c3c7;
  --c-4d8bc8: #9fbdda;
  --c-54495f: #bebac2;
  --c-625c67: #b6b4b8;
  --c-65586b: #b7b2b9;
  --c-657387: #a3a8af;
  --c-65809c: #8b95a0;
  --c-665a70: #b4b0b8;
  --c-68616e: #b2b0b4;
  --c-69656f: #b0afb2;
  --c-6ba8dc: #667582;
  --c-6f7f96: #8c929b;
  --c-73687f: #aaa6af;
  --c-73a9df70: #626f7c70;
  --c-776d80: #a9a5ac;
  --c-7990a6: #7c8792;
  --c-7b8694: #8a8e94;
  --c-817b84: #979598;
  --c-8a6a1f: #cda957;
  --c-8a7e93: #8f8992;
  --c-8a8590: #8c8a8e;
  --c-a43d36: #cf8a86;
  --c-a9c6e2: #4a545e;
  --c-abc5df: #4a545f;
  --c-b9cbe3: #434b55;
  --c-b9ccdf: #444e57;
  --c-c4d7e9: #3c444c;
  --c-c9bfd3: #514a57;
  --c-d9d0e0: #433c49;
  --c-dbe5ee: #30373d;
  --c-dcd4e1: #413b45;
  --c-dce4ec: #30373e;
  --c-ddd5e2: #403a44;
  --c-dedbd6: #44413d;
  --c-e0d8e6: #3d3642;
  --c-e0d9e6: #3c3641;
  --c-e1dbd1: #48433b;
  --c-e4dfe9: #37323c;
  --c-e5dfe8: #39333c;
  --c-e5e1e6: #39353a;
  --c-e5eef8: #282d32;
  --c-e6ddcc: #49443a;
  --c-e8f0fb: #25292f;
  --c-ede9e5: #36322e;
  --c-edf2f7: #252a2f;
  --c-edf4fb: #23282d;
  --c-eeebe7: #35312d;
  --c-eef3fa: #23272d;
  --c-f0eaf4: #2e2732;
  --c-f1eeeb: #312d2a;
  --c-f3eef7: #2a242e;
  --c-f3eef8: #29242e;
  --c-f4f7fa: #202529;
  --c-f5f3ef: #2e2b25;
  --c-f6f9fd: #1e2227;
  --c-f7e9e2: #352d29;
  --c-f7f4fa: #252029;
  --c-f7fafe: #1e2126;
  --c-fbfdff: #1b1f23;
  --c-fcfaf6: #27241f;
  --c-fdf5ec70: #2c282370;
  --c-ffffff: #1d1d1d;
  --c-ffffff66: #1d1d1d66;
  --c-ffffff80: #1d1d1d80;
  --c-ffffff88: #1d1d1d88;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #d4d3d8;
    --muted: #b0afb2;
    --line: #3c3935;
    --paper: #26241e;
    --purple: #71a1d5;
    --coral: #71a1d5;
    --lavender: #2d2832;
    --c-00000022: #00000022;
    --c-1e3a6040: #00000040;
    --c-1e4f85: #528ccb;
    --c-214e7c: #538bc5;
    --c-234b7305: #00000005;
    --c-234b7308: #00000008;
    --c-25202c66: #00000066;
    --c-25202c80: #00000080;
    --c-2563a6: #71a1d5;
    --c-30233830: #00000030;
    --c-30233833: #00000033;
    --c-30233840: #00000040;
    --c-332b3f: #d1cdd6;
    --c-376e9a30: #00000030;
    --c-3c80bb: #9abbd7;
    --c-47434e: #c5c3c7;
    --c-4d8bc8: #9fbdda;
    --c-54495f: #bebac2;
    --c-625c67: #b6b4b8;
    --c-65586b: #b7b2b9;
    --c-657387: #a3a8af;
    --c-65809c: #8b95a0;
    --c-665a70: #b4b0b8;
    --c-68616e: #b2b0b4;
    --c-69656f: #b0afb2;
    --c-6ba8dc: #667582;
    --c-6f7f96: #8c929b;
    --c-73687f: #aaa6af;
    --c-73a9df70: #626f7c70;
    --c-776d80: #a9a5ac;
    --c-7990a6: #7c8792;
    --c-7b8694: #8a8e94;
    --c-817b84: #979598;
    --c-8a6a1f: #cda957;
    --c-8a7e93: #8f8992;
    --c-8a8590: #8c8a8e;
    --c-a43d36: #cf8a86;
    --c-a9c6e2: #4a545e;
    --c-abc5df: #4a545f;
    --c-b9cbe3: #434b55;
    --c-b9ccdf: #444e57;
    --c-c4d7e9: #3c444c;
    --c-c9bfd3: #514a57;
    --c-d9d0e0: #433c49;
    --c-dbe5ee: #30373d;
    --c-dcd4e1: #413b45;
    --c-dce4ec: #30373e;
    --c-ddd5e2: #403a44;
    --c-dedbd6: #44413d;
    --c-e0d8e6: #3d3642;
    --c-e0d9e6: #3c3641;
    --c-e1dbd1: #48433b;
    --c-e4dfe9: #37323c;
    --c-e5dfe8: #39333c;
    --c-e5e1e6: #39353a;
    --c-e5eef8: #282d32;
    --c-e6ddcc: #49443a;
    --c-e8f0fb: #25292f;
    --c-ede9e5: #36322e;
    --c-edf2f7: #252a2f;
    --c-edf4fb: #23282d;
    --c-eeebe7: #35312d;
    --c-eef3fa: #23272d;
    --c-f0eaf4: #2e2732;
    --c-f1eeeb: #312d2a;
    --c-f3eef7: #2a242e;
    --c-f3eef8: #29242e;
    --c-f4f7fa: #202529;
    --c-f5f3ef: #2e2b25;
    --c-f6f9fd: #1e2227;
    --c-f7e9e2: #352d29;
    --c-f7f4fa: #252029;
    --c-f7fafe: #1e2126;
    --c-fbfdff: #1b1f23;
    --c-fcfaf6: #27241f;
    --c-fdf5ec70: #2c282370;
    --c-ffffff: #1d1d1d;
    --c-ffffff66: #1d1d1d66;
    --c-ffffff80: #1d1d1d80;
    --c-ffffff88: #1d1d1d88;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  line-height: 1.5;
  color: var(--ink);
  font-size: 16px;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  outline-offset: 4px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--c-4d8bc8);
}
button {
  color: inherit;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 32px 20px 24px;
  border-right: 1px solid var(--line);
  background: var(--c-f5f3ef);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 10px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}
.brand-mark img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
}
.brand strong {
  font-size: 18px;
  letter-spacing: -0.5px;
}
.brand span:last-child {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.nav-heading {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--c-817b84);
  margin: 0 12px 12px;
  text-transform: uppercase;
  font-weight: 650;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 43px;
  background: none;
  border: 0;
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--c-625c67);
  font-size: 14px;
}
.nav button:hover {
  background: var(--c-eeebe7);
}
.nav button.active {
  background: var(--c-e5eef8);
  color: var(--c-214e7c);
  font-weight: 650;
}
.nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.count-pill {
  margin-left: auto;
  background: var(--c-ffffff80);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 12px;
  font-weight: 500;
}
.side-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--c-e1dbd1);
  border-radius: 12px;
  background: var(--c-fcfaf6);
}
.side-note strong {
  display: block;
  font-size: 14px;
  margin-bottom: 7px;
}
.side-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}
.initials {
  height: 32px;
  width: 32px;
  background: var(--c-e6ddcc);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.profile strong {
  display: block;
  font-size: 14px;
}
.profile small {
  font-size: 12px;
  color: var(--muted);
}
main {
  margin-left: var(--sidebar);
  padding: 0 48px 30px;
  max-width: 1700px;
}
.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
  color: var(--muted);
}
.topbar strong {
  color: var(--c-47434e);
  font-weight: 500;
}
.app-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--c-dedbd6);
  border-radius: 20px;
  background: var(--c-ffffff);
  font-size: 13px;
}
.app-link:hover {
  border-color: var(--purple);
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 279px;
  padding: 35px 40px;
  border: 1px solid var(--c-e5dfe8);
  border-radius: 22px;
  background: linear-gradient(110deg, var(--c-f3eef8) 0%, var(--c-f0eaf4) 55%, var(--c-f7e9e2) 100%);
  display: flex;
  align-items: center;
}
.hero-text {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 100%;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  margin-bottom: 17px;
}
.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 43px;
  line-height: 1.1;
  letter-spacing: -1.8px;
  margin: 0 0 16px;
}
.hero h1 em {
  color: var(--c-2563a6);
  font-weight: 400;
}
.hero p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--c-68616e);
  max-width: 400px;
  margin: 0 0 22px;
}
.hero-label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  background: var(--c-ffffff80);
  border: 1px solid var(--c-ffffff);
  border-radius: 20px;
  padding: 7px 11px;
  color: var(--c-65586b);
}
.dot {
  width: 5px;
  height: 5px;
  background: var(--c-3c80bb);
  border-radius: 50%;
}
.avatar-zone {
  position: absolute;
  right: 9px;
  top: 0;
  bottom: 0;
  width: 34%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-zone:before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--c-fdf5ec70);
  border: 1px solid var(--c-ffffff66);
}
.avatar {
  position: relative;
  width: 265px;
  height: 265px;
  object-fit: contain;
  filter: drop-shadow(0 16px 15px var(--c-376e9a30));
  animation: float 6s ease-in-out infinite;
}
.mascot-caption {
  position: absolute;
  bottom: 13px;
  right: 50px;
  color: var(--c-69656f);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
@keyframes float {
  50% {
    transform: translateY(-7px) rotate(2deg);
  }
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 20px;
}
.search-wrap {
  position: relative;
  max-width: 480px;
  flex: 1;
}
.search-wrap svg {
  position: absolute;
  left: 15px;
  top: 15px;
  width: 16px;
  height: 16px;
  color: var(--c-69656f);
}
.search {
  width: 100%;
  height: 46px;
  border: 1px solid var(--c-dedbd6);
  background: var(--c-ffffff);
  border-radius: 10px;
  padding: 0 46px 0 42px;
  color: var(--ink);
  font-size: 14px;
}
.search::placeholder {
  color: var(--c-69656f);
}
.search-wrap kbd {
  position: absolute;
  right: 12px;
  top: 13px;
  font-size: 12px;
  color: var(--c-69656f);
  border: 1px solid var(--c-e5e1e6);
  padding: 2px 5px;
  border-radius: 4px;
}
.view-note {
  margin-left: auto;
  color: var(--c-69656f);
  font-size: 12px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 16px;
}
.section-head h2 {
  font-size: 19px;
  letter-spacing: -0.5px;
  font-weight: 600;
  margin: 0;
}
.section-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card {
  position: relative;
  background: var(--c-ffffff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 224px;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--c-abc5df);
  box-shadow: 0 7px 20px var(--c-234b7308);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.icon-tile {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--tile);
  color: var(--tile-ink);
  border-radius: 9px;
}
.icon-tile svg {
  width: 18px;
  height: 18px;
}
.star {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--c-8a8590);
  border-radius: 6px;
}
.star:hover {
  background: var(--c-edf4fb);
  color: var(--c-2563a6);
}
.star svg {
  height: 15px;
  width: 15px;
}
.star[aria-pressed='true'] {
  color: var(--c-2563a6);
}
.star[aria-pressed='true'] svg {
  fill: var(--c-73a9df70);
}
.skill-name {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.45;
  margin: 0 0 8px;
  letter-spacing: -0.15px;
}
.skill-name a:hover {
  color: var(--purple);
}
.description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 18px;
  max-width: 280px;
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--c-f1eeeb);
}
.category-label {
  font-size: 12px;
  color: var(--c-69656f);
}
.edit-btn {
  border: 0;
  background: none;
  color: var(--c-2563a6);
  font-size: 12px;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 5px 0;
}
.edit-btn:hover {
  text-decoration: underline;
}
.edit-btn svg {
  width: 12px;
  height: 12px;
}
.empty {
  text-align: center;
  padding: 65px 15px;
  grid-column: 1/-1;
  background: var(--c-ffffff);
  border: 1px dashed var(--c-c4d7e9);
  border-radius: 15px;
  color: var(--muted);
  line-height: 1.8;
}
.empty strong {
  display: block;
  color: var(--ink);
  font-size: 19px;
  margin-bottom: 8px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 2px 5px;
  color: var(--c-69656f);
  font-size: 12px;
  line-height: 1.6;
}
footer button {
  background: none;
  border: 0;
  text-decoration: underline;
  font-size: 12px;
  color: inherit;
  padding: 0;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 90px);
  transform: translateX(-50%);
  background: var(--c-332b3f);
  color: var(--c-ffffff);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 18px var(--c-00000022);
  z-index: 5;
  font-size: 14px;
  max-width: 90vw;
}
.toast[hidden] {
  display: none;
}
dialog {
  border: 1px solid var(--c-e0d8e6);
  border-radius: 18px;
  padding: 0;
  width: 650px;
  max-width: calc(100vw - 32px);
  max-height: 85vh;
  box-shadow: 0 25px 80px var(--c-30233830);
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: var(--c-25202c66);
  backdrop-filter: blur(4px);
}
.dialog-head {
  padding: 24px 27px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.dialog-head h2 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: -0.6px;
}
.dialog-head p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.close {
  border: 0;
  background: var(--c-ede9e5);
  border-radius: 50%;
  height: 28px;
  width: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.dialog-body {
  padding: 22px 27px;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-665a70);
}
.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--c-dcd4e1);
  border-radius: 8px;
  min-height: 59px;
  resize: vertical;
  font-size: 14px;
  background: var(--c-ffffff);
  line-height: 1.6;
  color: var(--ink);
}
details summary {
  font-size: 13px;
  color: var(--purple);
  cursor: pointer;
  margin: 20px 0 12px;
}
.prompt {
  display: block;
  white-space: pre-wrap;
  width: 100%;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--c-ddd5e2);
  border-radius: 9px;
  background: var(--c-ffffff);
  color: var(--c-54495f);
  font:
    11px/1.8 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  resize: vertical;
}
.source {
  font-size: 12px;
  color: var(--c-69656f);
  margin: 15px 0 0;
  overflow-wrap: anywhere;
}
.dialog-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 17px 27px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--c-c9bfd3);
  border-radius: 10px;
  background: var(--c-ffffff);
  color: var(--purple);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.primary {
  background: var(--purple);
  color: var(--c-ffffff);
  border-color: var(--purple);
}
.primary:hover {
  background: var(--c-1e4f85);
}
.help {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.help p {
  margin: 0 0 16px;
}
.help strong {
  color: var(--ink);
}
.mobile-brand {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1500px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero {
    min-height: 290px;
  }
}
@media (max-width: 1130px) {
  main {
    padding: 0 28px 25px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero {
    padding: 30px;
  }
  .avatar {
    width: 220px;
    height: 220px;
  }
  .hero p {
    max-width: 320px;
  }
  .mascot-caption {
    right: 23px;
  }
}
@media (max-width: 800px) {
  :root {
    --sidebar: 200px;
  }
  .sidebar {
    padding: 24px 12px;
  }
  .brand {
    padding: 0 8px;
  }
  .brand strong {
    font-size: 16px;
  }
  .nav button {
    font-size: 13px;
    gap: 8px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero {
    padding: 26px 24px;
    min-height: 254px;
  }
  .hero-text {
    width: 70%;
  }
  .avatar-zone {
    right: -26px;
    width: 36%;
  }
  .avatar {
    width: 180px;
    height: 180px;
  }
  .hero p {
    font-size: 14px;
    max-width: 260px;
  }
  .hero-label {
    font-size: 12px;
  }
  .mascot-caption {
    display: none;
  }
  .view-note {
    display: none;
  }
  .card {
    padding: 17px;
  }
  .topbar {
    height: 73px;
  }
}
@media (max-width: 620px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 15px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .brand {
    padding: 0;
  }
  .brand span:last-child {
    display: none;
  }
  .sidebar .nav-heading,
  .sidebar .side-note,
  .sidebar .profile,
  .sidebar .nav svg,
  .count-pill {
    display: none;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 4px;
  }
  .nav button {
    min-height: 33px;
    white-space: nowrap;
    font-size: 13px;
    border: 1px solid var(--c-e0d9e6);
    padding: 8px 10px;
  }
  .nav button.active {
    border-color: var(--c-abc5df);
  }
  .sidebar nav + nav {
    margin-top: -14px;
  }
  .sidebar nav + nav .nav {
    flex-wrap: nowrap;
  }
  main {
    margin-left: 0;
    padding: 0 18px 20px;
  }
  .topbar {
    height: 61px;
  }
  .hero {
    padding: 25px 22px;
    min-height: 270px;
  }
  .hero h1 {
    font-size: 32px;
    max-width: 230px;
  }
  .hero p {
    max-width: 200px;
    font-size: 13px;
  }
  .hero-text {
    width: 71%;
  }
  .avatar-zone {
    right: -14px;
    top: 36px;
    width: 40%;
  }
  .avatar {
    width: 165px;
    height: 195px;
  }
  .avatar-zone:before {
    width: 150px;
    height: 150px;
  }
  .hero-label {
    font-size: 12px;
    padding: 6px 8px;
  }
  .toolbar {
    margin-top: 23px;
  }
  .grid {
    gap: 11px;
  }
  .card {
    padding: 16px;
    min-height: 230px;
  }
  .skill-name {
    font-size: 15px;
  }
  .description {
    font-size: 12px;
  }
  .category-label {
    display: none;
  }
  .card-bottom {
    justify-content: flex-end;
  }
  .section-head h2 {
    font-size: 18px;
  }
  .section-head p {
    font-size: 12px;
  }
  footer {
    flex-direction: column;
    gap: 6px;
  }
  .toast {
    left: 50%;
  }
  .dialog-head,
  .dialog-body {
    padding: 20px;
  }
  .dialog-actions {
    padding: 14px 20px;
  }
}
@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .avatar-zone {
    opacity: 0.45;
    right: -25px;
  }
  .hero-text {
    width: 90%;
  }
  .hero p {
    max-width: 215px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.review-list {
  max-height: 340px;
  overflow: auto;
}
#pack-review {
  max-height: none;
  margin-bottom: 14px;
}
.review-heading {
  font-size: 15px;
  margin: 14px 0 2px;
}
.review-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.review-item input {
  accent-color: var(--purple);
  margin-top: 3px;
}
.review-item small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
}
.wizard-error {
  color: var(--c-a43d36);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
section[hidden] {
  display: none !important;
}

.usage-panel {
  margin: 0 0 20px;
  padding: 20px 24px;
  border: 1px solid var(--c-e4dfe9);
  border-radius: 16px;
  background: var(--c-ffffff);
}
.usage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.usage-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.4px;
}
.usage-head p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.usage-head .btn {
  font-size: 12px;
  padding: 8px 11px;
}
.usage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.usage-card {
  padding: 13px 15px;
  border-radius: 11px;
  background: var(--c-f7f4fa);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.usage-card > span {
  font-size: 12px;
  color: var(--c-73687f);
}
.usage-card strong {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.usage-card small {
  font-size: 12px;
  color: var(--c-776d80);
  line-height: 1.6;
}
.usage-card progress {
  width: 100%;
  height: 6px;
  accent-color: var(--purple);
}
.usage-note {
  font-size: 12px;
  color: var(--c-8a7e93);
  line-height: 1.6;
  margin: 13px 0 0;
}
.profile .edit-btn {
  font-size: 12px;
}
.hero + .usage-panel {
  margin-top: 20px;
}
footer {
  flex-wrap: wrap;
}
@media (max-width: 620px) {
  .usage-panel {
    padding: 16px;
  }
  .usage-cards {
    grid-template-columns: 1fr 1fr;
  }
  .usage-card:first-child {
    grid-column: 1/-1;
  }
  .usage-head p {
    max-width: 170px;
  }
}

/* Extend the existing skill link across the card; keep its controls independent. */
.card .skill-name a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  cursor: pointer;
}
.card .star,
.card .edit-btn {
  position: relative;
  z-index: 1;
}
.card .skill-name a:focus-visible {
  outline: none;
}
.card .skill-name a:focus-visible::after {
  outline: 3px solid var(--c-4d8bc8);
  outline-offset: 4px;
}

.skill-stats {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.skill-stats-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 17px;
}
.skill-stats-head h3 {
  font-size: 16px;
  margin: 0 0 5px;
  font-weight: 600;
}
.skill-stats-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.skill-stats-total {
  font-size: 12px;
  color: var(--c-2563a6);
  background: var(--c-edf4fb);
  padding: 7px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.skill-stats-bars {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 13px;
}
.skill-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.skill-stat-rank {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--c-edf4fb);
  color: var(--c-2563a6);
  font-size: 12px;
  font-weight: 600;
}
.skill-stat-body {
  flex: 1;
  min-width: 0;
}
.skill-stat-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 6px;
}
.skill-stat-label span {
  overflow-wrap: anywhere;
}
.skill-stat-label strong {
  color: var(--c-2563a6);
  font-size: 12px;
  white-space: nowrap;
  font-weight: 600;
}
.skill-stat-track {
  height: 7px;
  border-radius: 5px;
  background: var(--c-edf2f7);
  overflow: hidden;
}
.skill-stat-track span {
  height: 100%;
  display: block;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--c-2563a6), var(--c-6ba8dc));
}
.skill-stats-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 15px 0 0;
}
.skill-stats-empty {
  padding: 20px;
  border: 1px dashed var(--c-c4d7e9);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  background: var(--c-f7fafe);
}
@media (max-width: 620px) {
  .skill-stats-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .skill-stat-label {
    font-size: 12px;
  }
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-actions .btn {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 20px;
}
.btn:disabled,
.export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.card-bottom {
  flex-wrap: wrap;
}
.card-bottom .category-label {
  flex: 1;
}
.export-btn {
  margin-left: auto;
}
@media (max-width: 620px) {
  .topbar {
    height: auto;
    min-height: 61px;
    flex-wrap: wrap;
    padding: 14px 0;
  }
  .top-actions {
    gap: 7px;
  }
  .card-bottom .export-btn {
    margin-left: 0;
  }
}

#export-picker {
  width: 540px;
}
.export-options {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.export-options .search {
  padding-left: 14px;
}
.export-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.export-selection label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.export-list {
  max-height: 340px;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.export-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 8px;
  border-bottom: 1px solid var(--c-f1eeeb);
  cursor: pointer;
  border-radius: 5px;
}
.export-item:hover {
  background: var(--c-edf4fb);
}
.export-item input,
.export-selection input {
  accent-color: var(--c-2563a6);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.export-item span {
  font-size: 14px;
  line-height: 1.5;
}
.export-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.export-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}
#export-error:empty {
  display: none;
}

#skills-view[hidden],
#workflow-view[hidden] {
  display: none !important;
}
.wf-page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 12px 0 24px;
}
.wf-page-head h1 {
  font:
    400 36px Georgia,
    serif;
  margin: 0 0 9px;
  letter-spacing: -1px;
}
.wf-page-head p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.wf-page-head .eyebrow {
  margin-bottom: 10px;
}
.wf-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wf-config {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
.wf-config label {
  flex: 1;
}
.wf-label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.wf-label input,
.wf-label select {
  font: inherit;
  font-size: 14px;
  background: var(--c-ffffff);
  border: 1px solid var(--c-dedbd6);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
.wf-config .help {
  font-size: 12px;
  white-space: nowrap;
}
.wf-context-label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 600;
}
.wf-context,
.wf-task {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--c-dedbd6);
  background: var(--c-ffffff);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  border-radius: 9px;
  resize: vertical;
}
.wf-context {
  margin-bottom: 22px;
}
.wf-builder {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.wf-palette {
  background: var(--c-ffffff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  position: sticky;
  top: 14px;
}
.wf-palette h2 {
  font-size: 16px;
  margin: 0 0 8px;
}
.wf-palette p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.wf-palette .search {
  font-size: 13px;
  padding: 0 10px;
  height: 36px;
}
.wf-condition-add {
  width: 100%;
  font-size: 13px;
  padding: 9px;
  margin: 10px 0;
  border-style: dashed;
  cursor: grab;
}
#workflow-palette {
  max-height: 540px;
  overflow: auto;
}
.wf-palette-skill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 3px;
  border-bottom: 1px solid var(--c-f1eeeb);
  cursor: grab;
}
.wf-palette-skill span {
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}
.wf-add {
  border: 1px solid var(--c-c4d7e9);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  color: var(--c-2563a6);
  background: var(--c-edf4fb);
  font-size: 16px;
  flex-shrink: 0;
}
.wf-canvas-wrap {
  padding: 20px;
  background: var(--c-f4f7fa);
  border: 1px solid var(--c-dbe5ee);
  border-radius: 14px;
  overflow-x: auto;
  min-height: 300px;
}
.wf-canvas-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.wf-start {
  background: var(--c-2563a6);
  color: var(--c-ffffff);
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 7px 13px;
}
.wf-sequence {
  min-width: 190px;
}
.wf-drop {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed transparent;
  border-radius: 8px;
  color: var(--c-7990a6);
  font-size: 12px;
  margin: 7px 0;
  text-align: center;
  padding: 8px;
  transition: background 0.15s;
}
.wf-drop:only-child {
  min-height: 135px;
  border-color: var(--c-b9ccdf);
  background: var(--c-ffffff88);
  font-size: 13px;
}
.wf-drop:hover,
.wf-drop.drag-over {
  border-color: var(--c-4d8bc8);
  background: var(--c-e5eef8);
  color: var(--c-2563a6);
}
.wf-node {
  background: var(--c-ffffff);
  border: 1px solid var(--c-dce4ec);
  border-radius: 11px;
  padding: 15px;
  box-shadow: 0 2px 6px var(--c-234b7305);
}
.wf-node-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}
/* Keep step names readable in narrow if/else columns: buttons wrap below instead. */
.wf-node-head strong {
  font-size: 14px;
  flex: 1 1 8em;
  min-width: 8em;
  overflow-wrap: break-word;
}
.wf-grip {
  color: var(--c-6f7f96);
  cursor: grab;
  font-size: 20px;
}
.wf-node-controls {
  display: flex;
  gap: 2px;
}
.wf-node-controls button {
  border: 0;
  background: none;
  color: var(--c-65809c);
  border-radius: 4px;
  width: 24px;
  height: 24px;
}
.wf-node-controls button:hover {
  background: var(--c-edf4fb);
}
.wf-node-controls button:disabled {
  opacity: 0.3;
  cursor: default;
}
.wf-node .wf-label {
  margin-bottom: 10px;
}
.wf-node .wf-label select {
  font-size: 12px;
}
.wf-task {
  font-size: 13px;
  line-height: 1.6;
  padding: 9px;
}
.wf-condition {
  border-color: var(--c-a9c6e2);
  background: var(--c-fbfdff);
}
.wf-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
  min-width: 400px;
}
.wf-branch {
  border: 1px solid var(--c-dbe5ee);
  border-radius: 9px;
  padding: 10px;
  background: var(--c-f4f7fa);
}
.wf-branch h4 {
  margin: 2px 0 8px;
  color: var(--c-2563a6);
  font-size: 12px;
  letter-spacing: 1px;
}
.wf-branch:last-child h4 {
  color: var(--c-657387);
}
.wf-stop {
  font-size: 12px;
  color: var(--c-7b8694);
  text-align: center;
}
.wf-run {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 0;
}
.wf-run > div {
  flex: 1;
  min-width: 210px;
}
.wf-run .help {
  margin: 5px 0 0;
  font-size: 12px;
}
#workflow-validation {
  color: var(--c-a43d36);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
#workflow-validation:empty {
  display: none;
}
.wf-preview summary {
  margin-top: 0;
}
.wf-preview .prompt {
  min-height: 280px;
}
@media (max-width: 900px) {
  .wf-builder {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .wf-page-head,
  .wf-config {
    flex-wrap: wrap;
  }
  .wf-config .help {
    width: 100%;
  }
}
@media (max-width: 620px) {
  .wf-builder {
    grid-template-columns: 1fr;
  }
  .wf-palette {
    position: static;
  }
  #workflow-palette {
    max-height: 180px;
  }
  .wf-canvas-wrap {
    padding: 12px;
  }
  .wf-config {
    flex-direction: column;
    align-items: stretch;
  }
  .wf-page-head h1 {
    font-size: 30px;
  }
  .wf-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

[hidden] {
  display: none !important;
}

.wf-move {
  width: 59px;
  border: 0;
  border-radius: 4px;
  background: var(--c-edf4fb);
  color: var(--c-2563a6);
  font-size: 12px;
  padding: 3px;
}
.wf-node-head[draggable='true'] {
  cursor: grab;
}

/* Runtime choice in setup */
.runtime-choice {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.runtime-choice legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-665a70);
  margin-bottom: 8px;
}
.runtime-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--c-ffffff);
  cursor: pointer;
  font-size: 14px;
}
.runtime-option:has(input:checked) {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}
.runtime-option input {
  accent-color: var(--purple);
  margin-top: 2px;
}
.runtime-option small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
  margin-top: 3px;
}
select.search {
  appearance: auto;
}
textarea.search {
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .runtime-choice {
    grid-template-columns: 1fr;
  }
}
.usage-raw {
  display: block;
  white-space: pre-line;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 6px;
}

/* Top menu: Setup, Refresh skills, Help */
.top-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 6px;
}
.menu-btn {
  background: none;
  border: 0;
  border-radius: 20px;
  min-height: 40px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-47434e);
  cursor: pointer;
}
.menu-btn:hover,
.menu-btn:focus-visible {
  background: rgba(0, 0, 0, 0.05);
}
.menu-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .topbar { height: auto; padding: 14px 0; flex-wrap: wrap; }
  .top-actions { flex-wrap: wrap; }
}

/* Web vs local: the web app sets <html data-mode="web">. */
html[data-mode='web'] [data-local-only] {
  display: none !important;
}
html:not([data-mode='web']) [data-web-only] {
  display: none !important;
}
.lock-tag {
  color: var(--c-8a6a1f);
  font-weight: 700;
}

/* First-visit tour (tour.js) */
.tour-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.tour-spot {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px var(--c-25202c80);
  outline: 2px solid var(--c-ffffff);
  pointer-events: none;
  transition: all 0.2s ease;
}
.tour-bubble {
  position: fixed;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--paper);
  border: 1px solid var(--c-e0d8e6);
  border-radius: 18px;
  box-shadow: 0 25px 80px var(--c-30233840);
  padding: 18px 20px 16px;
  color: var(--ink);
}
.tour-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.tour-sprite {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}
.tour-count {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--purple);
}
.tour-bubble h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.3px;
}
#tour-text {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-47434e);
}
.tour-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tour-spacer {
  flex: 1;
}
.tour-skip {
  border-color: transparent;
  background: none;
  color: var(--muted);
  padding-left: 0;
}
@media (prefers-reduced-motion: reduce) {
  .tour-spot {
    transition: none;
  }
}

/* Intro video (web app, first visit) */
dialog.intro-dialog {
  width: 880px;
}
.intro-video {
  position: relative;
  background: var(--c-f3eef7);
  aspect-ratio: 16 / 9;
}
.intro-video video {
  display: block;
  width: 100%;
  height: 100%;
}
.intro-play {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 40px;
  padding: 14px 24px;
  background: var(--purple);
  color: var(--c-ffffff);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 12px 30px var(--c-1e3a6040);
  cursor: pointer;
}
.intro-play:hover {
  background: var(--c-1e4f85);
}

/* Fill-in form (web) */
.form-intro {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--c-eef3fa);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.form-intro img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.form-intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.form-privacy {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}
.form-privacy::before {
  content: '🔒 ';
}

/* Feedback (web) */
.fb-kinds {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fb-kinds legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-665a70);
  margin-bottom: 8px;
}
.fb-kinds label {
  cursor: pointer;
}
.fb-kinds input {
  position: absolute;
  opacity: 0;
}
.fb-kinds span {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--c-d9d0e0);
  border-radius: 20px;
  font-size: 14px;
  background: var(--c-ffffff);
}
.fb-kinds input:checked + span {
  border-color: var(--purple);
  background: var(--c-eef3fa);
  color: var(--purple);
  font-weight: 600;
}
.fb-kinds input:focus-visible + span {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
#fb-text {
  width: 100%;
  border: 1px solid var(--c-d9d0e0);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
  background: var(--c-ffffff);
}

/* "Did that work?" card (web) */
.rate-card {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--paper);
  border: 1px solid var(--c-e0d8e6);
  border-radius: 18px;
  box-shadow: 0 20px 60px var(--c-30233833);
  padding: 16px 18px;
  animation: rate-in 0.35s ease;
}
@keyframes rate-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.rate-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.rate-head img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}
.rate-head p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  flex: 1;
}
.rate-close {
  border: 0;
  background: none;
  font-size: 19px;
  color: var(--muted);
  cursor: pointer;
  align-self: flex-start;
}
.rate-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.rate-actions .btn {
  flex: 1;
  font-size: 15px;
}
.rate-more textarea {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--c-d9d0e0);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 15px;
  resize: vertical;
}
@media (max-width: 620px) {
  .rate-card {
    right: 16px;
    left: 16px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rate-card {
    animation: none;
  }
}

/* Returning visits: a smaller welcome banner */
.hero.compact {
  min-height: 0;
  padding: 22px 32px;
}
.hero.compact h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.hero.compact .eyebrow,
.hero.compact .hero-label,
.hero.compact .mascot-caption,
.hero.compact .avatar-zone:before {
  display: none;
}
.hero.compact .avatar {
  width: 110px;
  height: 110px;
}

/* Version line in Help */
#help .dialog-actions {
  flex-wrap: wrap;
}
#help .dialog-actions .btn {
  white-space: nowrap;
}
.app-version {
  flex: 1 1 260px;
  margin: 0;
  font-size: 13px;
  color: var(--c-69656f);
}

/* Compact cards: icon, name, and star on one row; two-line description; less empty space. */
.card {
  min-height: 0;
  padding: 16px 18px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr auto;
  column-gap: 12px;
  align-items: center;
}
.card .card-top {
  display: contents;
}
.card .icon-tile {
  grid-column: 1;
  grid-row: 1;
  width: 32px;
  height: 32px;
}
.card .skill-name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  line-height: 1.3;
}
.card .star {
  grid-column: 3;
  grid-row: 1;
}
.card .description {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  max-width: none;
  margin: 10px 0 12px;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .card-bottom {
  grid-column: 1 / -1;
  grid-row: 4;
  padding-top: 8px;
}
.card .edit-btn {
  font-size: 14px;
  font-weight: 600;
  min-height: 32px;
}
.grid {
  gap: 12px;
}
@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* One-page web setup: two questions as tappable cards */
.setup-question,
.runtime-choice legend.setup-question {
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
  margin: 6px 0 6px;
}
html[data-mode='web'] #pack-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}
html[data-mode='web'] #pack-review .review-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--c-ffffff);
  cursor: pointer;
}
html[data-mode='web'] #pack-review .review-item:has(input:checked) {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}
html[data-mode='web'] .runtime-choice {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 620px) {
  html[data-mode='web'] #pack-review,
  html[data-mode='web'] .runtime-choice {
    grid-template-columns: 1fr;
  }
}

/* Web setup: AI choice (2 cards) + desktop/browser toggle */
html[data-mode='web'] .runtime-choice.web-ai {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}
html[data-mode='web'] .web-ai .runtime-option {
  align-items: center;
  font-size: 16px;
}
.open-choice {
  border: 0;
  padding: 0;
  margin: 0 0 8px;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--c-ffffff);
  padding: 3px;
  gap: 3px;
}
.segmented label {
  cursor: pointer;
}
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented span {
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.segmented input:checked + span {
  background: var(--purple);
  color: var(--c-ffffff);
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
.open-choice .help {
  margin-top: 10px;
}

/* Banner tip: one random message per visit */
.hero .hero-tip {
  max-width: 480px;
}
.hero-tip strong {
  display: block;
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hero.compact .hero-tip {
  margin: 8px 0 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.5;
}
.hero.compact .hero-tip strong {
  display: inline;
  margin-right: 6px;
}

/* "Your prompt is copied" guide (web) */
.paste-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
}
.paste-steps kbd {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--c-c9bfd3);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--c-ffffff);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
}
.paste-skip {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

/* Personal packs in setup: "Made for you" */
.made-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--c-e8f0fb);
  color: var(--purple);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  vertical-align: 1px;
}
html[data-mode='web'] #pack-review .review-item.made-for-you {
  border-color: var(--purple);
  cursor: default;
}

/* Web: ask for a custom pack ("Book a session") */
.custom-pack-ask {
  margin: 12px 0 22px;
  font-size: 15px;
  color: var(--muted);
}
.custom-pack-ask a {
  color: var(--purple);
  font-weight: 650;
}
.custom-pack-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px dashed var(--c-b9cbe3);
  border-radius: 14px;
  background: var(--c-f6f9fd);
}
.custom-pack-cta img {
  flex: none;
  object-fit: contain;
}
.custom-pack-cta div {
  flex: 1;
}
.custom-pack-cta strong {
  font-size: 17px;
}
.custom-pack-cta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.custom-pack-cta .btn {
  flex: none;
  white-space: nowrap;
}
@media (max-width: 620px) {
  .custom-pack-cta {
    flex-wrap: wrap;
  }
  .custom-pack-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* No mascot in the banner any more: the text uses the full width on every screen size. */
.hero .hero-text {
  width: 100%;
}
.hero .hero-tip,
.hero p {
  max-width: 560px;
}

/* Booking card in the sidebar (web). The box under the tasks is for phones only, where the
   sidebar card is hidden. */
.side-book .btn {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}
html[data-mode='web'] .custom-pack-cta {
  display: none;
}
@media (max-width: 800px) {
  html[data-mode='web'] .custom-pack-cta {
    display: flex;
  }
}
/* Sun/moon button */
.theme-btn {
  display: inline-grid;
  place-items: center;
  padding-inline: 10px;
}
.theme-btn svg {
  width: 20px;
  height: 20px;
}
/* Dark look: details the color swap can't handle on its own. */
:root[data-theme='dark'] .card .icon,
:root[data-theme='dark'] [style*='--tile'] {
  --tile: #2a2f38 !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) [style*='--tile'] {
    --tile: #2a2f38 !important;
  }
}

/* Web: "Add my own task" */
.section-head .add-mine {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
  margin-left: 12px;
}
.section-head .add-mine[hidden] {
  display: none;
}
.section-head #result-count {
  margin-left: auto;
}
.mine-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--c-e8f0fb);
}
.mine-bar[hidden] {
  display: none;
}
.mine-bar p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  flex: 1 1 260px;
}
.mine-bar div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mine-bar .btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
}
.mine-actions {
  display: flex;
  gap: 10px;
  margin-right: auto;
}
.mine-actions[hidden] {
  display: none;
}
.btn.danger {
  color: var(--c-a43d36);
}
#mine-name {
  padding: 10px 12px;
  border: 1px solid var(--c-dcd4e1);
  border-radius: 8px;
  font-size: 15px;
  background: var(--c-ffffff);
  color: var(--ink);
}
.field textarea.mine-message {
  min-height: 220px;
}
.mine-tip {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 8px;
}
.mine-tip code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--c-e8f0fb);
  color: var(--purple);
}
.mine-boxes {
  font-size: 14px;
  font-weight: 600;
  color: var(--purple);
  margin: 0 0 8px;
}
.mine-boxes:empty {
  display: none;
}
@media (max-width: 620px) {
  .section-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .section-head .add-mine {
    margin-left: 0;
    width: 100%;
    order: 3;
  }
  .dialog-actions:has(.mine-actions:not([hidden])) {
    flex-wrap: wrap;
  }
}

/* Web: Learn panel on the right (how-to guides and examples) */
.learn-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 100vw;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px var(--c-30233830);
}
.learn-panel[hidden] {
  display: none;
}
.learn-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.learn-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.4px;
  flex: 1;
}
.learn-back {
  border: 0;
  background: none;
  color: var(--purple);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 6px 4px 0;
  cursor: pointer;
}
.learn-back[hidden] {
  display: none;
}
.learn-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px 28px;
}
.learn-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 14px;
}
.learn-note {
  font-size: 13px;
  color: var(--muted);
  margin: -4px 0 12px;
}
.learn-section {
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 10px;
}
.learn-list {
  display: grid;
  gap: 8px;
}
.learn-item {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--c-ffffff);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.learn-item:hover {
  border-color: var(--purple);
}
.learn-item strong {
  font-size: 15px;
}
.learn-item span {
  font-size: 13px;
  color: var(--muted);
}
.learn-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  font-size: 15px;
  line-height: 1.55;
}
.learn-example {
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple);
  border-radius: 8px;
  background: var(--c-ffffff);
  padding: 10px 14px;
  margin: 0 0 12px;
}
.learn-example strong {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.learn-example p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}
.learn-tip {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--c-e8f0fb);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px;
}
.learn-tip strong {
  color: var(--ink);
}
.learn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.learn-actions .btn {
  text-decoration: none;
}
@media (min-width: 1500px) {
  html.learn-open main {
    margin-right: 400px;
  }
  html.learn-open .grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}
@media (max-width: 800px) {
  .learn-panel {
    width: 100vw;
    border-left: 0;
  }
}

/* Phones: the top menu (Settings, Learn, Help, Feedback, Sign out, light/dark) wraps instead of
   pushing the page wider than the screen, and small buttons get finger-sized targets. */
@media (max-width: 620px) {
  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .top-menu {
    flex-wrap: wrap;
    margin-right: 0;
    row-gap: 0;
  }
  .menu-btn {
    padding: 8px 10px;
    white-space: nowrap;
  }
  .card .star {
    width: 40px;
    height: 40px;
  }
  .close {
    width: 36px;
    height: 36px;
  }
  .wf-add {
    min-width: 34px;
    min-height: 34px;
  }
}
/* Phones (web): less above the tasks. The search box and pack buttons are enough to find a task,
   so the topic row, the "Your space / Home" line and the extra "Open Claude" link are hidden. */
@media (max-width: 620px) {
  html[data-mode='web'] .sidebar nav:has(#category-nav),
  html[data-mode='web'] .topbar > span:first-child,
  html[data-mode='web'] .top-actions .app-link {
    display: none;
  }
  html[data-mode='web'] .topbar {
    padding: 6px 0;
  }
}

/* Web sign-in page (apps/web/src/web-bridge.js). Full screen, one card in the middle. */
dialog.sign-in-page {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--paper);
  overflow: auto;
}
dialog.sign-in-page::backdrop {
  background: var(--paper);
}
.sign-in-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 25px 80px var(--c-30233830);
  text-align: left;
}
.sign-in-logo {
  width: 44px;
  height: 44px;
  display: block;
  margin-bottom: 14px;
}
.sign-in-card h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}
.sign-in-text {
  margin: 0 0 20px;
  color: var(--muted);
}
.sign-in-card .field {
  margin-bottom: 12px;
}
.sign-in-card .search {
  width: 100%;
  box-sizing: border-box;
  padding-left: 14px;
  background-image: none;
}
.sign-in-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.sign-in-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.sign-in-or::before,
.sign-in-or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}
.sign-in-main {
  width: 100%;
  margin-top: 4px;
}
.sign-in-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--purple);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.sign-in-forgot {
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.sign-in-note {
  color: var(--ink);
  margin: 0 0 8px;
}
.sign-in-note:empty,
.sign-in-card .wizard-error:empty {
  display: none;
}
.sign-in-switch {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.9;
  text-align: center;
}
