/* ============================================================
   illustrator.css — Adobe Illustrator-style shell for the design
   work page. Dark Adobe UI, white artboards, handwritten headings.
   ============================================================ */

@font-face {
  font-family: "Thebestfont";
  src: url("../assets/fonts/ThebestfontRegular.otf") format("opentype");
  font-weight: normal; font-style: normal; font-display: swap;
}

:root {
  --ai-menubar:   #1c1c1c;
  --ai-chrome:    #323232;   /* control bar, tools, panels */
  --ai-panelhead: #2a2a2a;
  --ai-canvas:    #2d2d2d;
  --ai-artboard:  #ffffff;
  --ai-line:      #141414;
  --ai-text:      #d4d4d4;
  --ai-muted:     #8f8f8f;
  --ai-faint:     #6a6a6a;
  --ai-accent:    #1473e6;   /* Adobe selection blue */
  --ai-orange:    #ff9a2e;   /* Ai brand orange */
  --hand: "Thebestfont", "Segoe Script", cursive;
  --ui: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.ai-app {
  margin: 0; background: var(--ai-canvas); color: var(--ai-text);
  font-family: var(--ui); font-size: 12.5px; overflow: hidden;
}

.ai-window { display: grid; grid-template-rows: 32px 34px 31px 1fr 24px; height: 100vh; }

/* ---- Menu bar ---- */
.ai-menubar { background: var(--ai-menubar); display: flex; align-items: center; height: 100%; -webkit-user-select: none; user-select: none; border-bottom: 1px solid #000; }
.ai-logo { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 22px; margin: 0 8px; border-radius: 4px; background: #310e00; border: 1px solid #7a3d00; color: var(--ai-orange); font-weight: 800; font-size: 12px; text-decoration: none; letter-spacing: -0.5px; }

/* Plain-language "back to the room" affordance, sitting next to the Ai
   badge above (which links to the same place but reads as decorative
   app-theming, not navigation). */
.home-link { display: inline-flex; width: 18px; height: 18px; color: var(--ai-muted); flex: 0 0 auto; transition: color 0.15s ease; }
.home-link svg { width: 18px; height: 18px; }
.home-link:hover, .home-link:focus-visible { color: var(--ai-orange); }
.ai-menu { display: flex; gap: 13px; flex: 1; }
.ai-menu span { color: var(--ai-text); font-size: 12px; opacity: 0.9; }
.ai-winctrls { display: flex; height: 100%; }
.ai-wc { width: 44px; height: 100%; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ai-text); }
.ai-wc svg { width: 11px; height: 11px; }
.ai-wc:hover { background: rgba(255,255,255,0.08); }
.ai-wc.close:hover { background: #c42b1c; color: #fff; }

/* Notification bell in the menu bar — re-opens the update popup on demand */
.ai-bell { position: relative; width: 40px; height: 100%; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ai-text); cursor: pointer; flex: 0 0 auto; }
.ai-bell:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ai-bell svg { width: 16px; height: 16px; }
.ai-bell-badge {
  position: absolute; top: 3px; right: 4px;
  min-width: 14px; height: 14px; padding: 0 3px; box-sizing: border-box;
  border-radius: 7px; background: #e5484d; color: #fff;
  font-size: 9px; font-weight: 700; line-height: 14px; text-align: center;
  box-shadow: 0 0 0 1.5px var(--ai-menubar);
}
@media (prefers-reduced-motion: no-preference) {
  .ai-bell-badge { animation: ai-bell-pulse 2.4s ease-in-out infinite; }
}
@keyframes ai-bell-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }

/* ---- Control / breadcrumb bar ---- */
.ai-controlbar { background: var(--ai-chrome); display: flex; align-items: center; gap: 14px; padding: 0 12px; border-bottom: 1px solid var(--ai-line); }
.ai-breadcrumb { color: var(--ai-muted); font-size: 12px; }
.ai-breadcrumb a { color: var(--ai-muted); text-decoration: none; }
.ai-breadcrumb a:hover { color: #fff; text-decoration: underline; }
.ai-breadcrumb .cur { color: var(--ai-text); }
.ai-control-right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--ai-muted); }
.ai-swatch-pair { position: relative; width: 26px; height: 18px; }
.ai-swatch-pair .s { position: absolute; width: 15px; height: 15px; border: 1px solid #000; }
.ai-swatch-pair .fill { left: 0; top: 0; background: #ff9a2e; z-index: 2; }
.ai-swatch-pair .stroke { right: 0; bottom: 0; background: #fff; }

/* ---- Body: tools · canvas · panels ---- */
.ai-body { display: grid; grid-template-columns: 46px 1fr 260px; min-height: 0; }

.ai-tools { background: var(--ai-chrome); border-right: 1px solid var(--ai-line); display: flex; flex-direction: column; align-items: center; padding: 6px 0; gap: 2px; overflow-y: auto; }
.ai-tool { width: 34px; height: 32px; display: flex; align-items: center; justify-content: center; color: #c8c8c8; background: none; border: 0; border-radius: 4px; cursor: pointer; }
.ai-tool:hover { background: #444; color: #fff; }
.ai-tool.active { background: #4c4c4c; color: #fff; box-shadow: inset 2px 0 0 var(--ai-accent); }
.ai-tool svg { width: 18px; height: 18px; }
.ai-tools .sep { width: 24px; height: 1px; background: #454545; margin: 4px 0; }

/* Canvas + artboards */
.ai-canvas { background: var(--ai-canvas); overflow: auto; padding: 30px 40px 60px; }
.ai-doc-title { font-family: var(--hand); font-size: 42px; color: #f2f2f2; margin: 0 0 4px; text-align: center; }
.ai-doc-sub { font-family: var(--hand); font-size: 20px; color: var(--ai-muted); text-align: center; margin: 0 0 30px; }
.ai-artboards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 30px; max-width: 760px; margin: 0 auto; }
.artboard-wrap { display: flex; flex-direction: column; }
.ab-name { color: var(--ai-muted); font-size: 12px; margin: 0 0 6px 2px; }
.artboard { display: block; aspect-ratio: 4 / 3; background: var(--ai-artboard); border-radius: 1px; box-shadow: 0 2px 10px rgba(0,0,0,0.45); position: relative; text-decoration: none; overflow: hidden; transition: box-shadow 0.15s, outline-color 0.15s; outline: 2px solid transparent; }
.artboard:hover, .artboard:focus { outline-color: var(--ai-accent); box-shadow: 0 6px 20px rgba(0,0,0,0.55); }
.artboard .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #b9b9b9; font-size: 12px; font-family: var(--ui); }
.artboard .ph .hand { display: block; font-family: var(--hand); font-size: 20px; color: #6f6f6f; }
/* Cover images filling each artboard tile */
.artboard .ab-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section header ("Assets", "Layouts", "Posters", "Logos") — one per
   category, spans the full grid width, toggled by the same show/hide JS as
   the artboards it introduces (it shares .artboard-wrap + data-cat so no
   extra JS was needed — .cs-section-head just overrides the layout).
   Centered, matching .ai-doc-title/.ai-doc-sub's spacing at the top of the
   page (small gap between title and sub, bigger gap before the content
   that follows) rather than the old left-aligned divider-line style. */
.cs-section-head {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 0;
  margin: 40px 0 6px;
}
.cs-section-head:first-child { margin-top: 0; }
.cs-section-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--hand);
  font-size: 26px;
  color: #f2f2f2;
  margin: 0 0 4px;
}
.cs-section-desc {
  font-family: var(--ui);
  font-size: 12px;
  color: var(--ai-muted);
  max-width: 460px;
  margin: 0 0 22px;
}

/* "Case Study" tag — shown on artboards Del has flagged as case studies.
   Now a real link to casestudies.html (not just a label) — one of a few
   nudges toward the case-studies tab, alongside the yellow hover border and
   each card's own "Case Study" choice button below. */
.cs-badge {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(255, 154, 46, 0.16);
  color: var(--ai-orange);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cs-badge:hover, .cs-badge:focus-visible {
  background: var(--ai-orange);
  color: #1a1a1a;
}

/* Case-study artboards get an attention-grabbing yellow outline on
   hover/focus (instead of the usual blue selection outline), inviting the
   visitor over to casestudies.ai rather than just the raw file. */
.cs-item .artboard:hover,
.cs-item .artboard:focus-within {
  outline-color: #ffd23f;
  box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.35), 0 6px 20px rgba(0, 0, 0, 0.55);
}

/* Static / Interactive choice (Type Anatomy) — the artboard itself isn't a
   link here; instead two small buttons sit over the cover image so the
   visitor picks which version to open. Both open in a new tab. */
.artboard-choice { cursor: default; }
.ab-choice {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 1px;
  z-index: 1;
}
.ab-choice-btn {
  flex: 1 1 50%;
  padding: 7px 6px;
  text-align: center;
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 600;
  color: #f2f2f2;
  text-decoration: none;
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(2px);
  transition: background 0.15s;
}
.ab-choice-btn:hover, .ab-choice-btn:focus { background: rgba(20, 20, 20, 0.92); }
.ab-choice-btn.interactive { color: var(--ai-orange); }
.ab-choice-btn:focus-visible { outline: 2px solid var(--ai-accent); outline-offset: -2px; }

/* ---- casestudies.html: thumbnail-as-button + write-up modal ----
   .cs-open reuses .artboard's box styling (aspect ratio, shadow, hover
   outline) but is a real <button>, so it needs its own reset for the
   native button chrome. A gradient hint fades in on hover/focus so it
   reads as "click for more", not just a static image. */
.cs-open {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.cs-open-hint {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  color: #fff;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.cs-open:hover .cs-open-hint,
.cs-open:focus-visible .cs-open-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ---- casestudies.html: in-page detail view (replaces the old popup) ----
   Swaps #csGridView for #csDetailView in place (js/casestudies.js) — the
   visitor never leaves casestudies.html. Two boxes side by side: a small
   clickable preview image on the left (labeled with the piece's name) and
   the Brief/What I Did write-up on the right (labeled "Learn about it") —
   both styled like the site's white .artboard cards with a blue
   hand-font label above, matching Del's layout sketch. */
.cs-detail { max-width: 760px; margin: 0 auto; }
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 24px;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ai-accent);
  text-decoration: none;
}
.cs-back svg { width: 14px; height: 14px; }
.cs-back:hover, .cs-back:focus-visible { text-decoration: underline; }

.cs-detail-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: start;
}
.cs-detail-col { display: flex; flex-direction: column; }
.cs-detail-label {
  font-family: var(--hand);
  font-size: 18px;
  color: var(--ai-accent);
  margin: 0 0 8px;
}

/* Shared card look for both boxes — same white/shadow/hover language as
   the grid's .artboard tiles. */
.cs-detail-frame {
  position: relative;
  background: var(--ai-artboard);
  border-radius: 1px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  outline: 2px solid transparent;
  transition: box-shadow 0.15s, outline-color 0.15s;
}

/* Left: clickable preview image, portrait frame — click for the full-size
   version (lightbox, or a new tab for a PDF full asset). object-fit:contain
   (not cover) so the WHOLE image is visible, just scaled down to fit —
   no cropping — matching space around it just shows the frame's own white
   background, same as the grid's artboard cards. */
button.cs-detail-frame {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
button.cs-detail-frame:hover,
button.cs-detail-frame:focus-visible {
  outline-color: var(--ai-accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}
#csDetailImage { width: 100%; height: 100%; object-fit: contain; display: block; }
.cs-detail-frame-hint {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  color: #fff;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
button.cs-detail-frame:hover .cs-detail-frame-hint,
button.cs-detail-frame:focus-visible .cs-detail-frame-hint {
  opacity: 1;
  transform: translateY(0);
}
.cs-detail-extra-link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--ai-orange);
  text-decoration: none;
}
.cs-detail-extra-link:hover, .cs-detail-extra-link:focus-visible { text-decoration: underline; }
.cs-detail-extra-link[hidden] { display: none; }

/* Right: the write-up box. */
.cs-detail-info {
  padding: 20px 22px 22px;
  min-height: 260px;
  color: var(--ai-text);
}
.cs-detail-label-small {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ai-orange);
  margin: 16px 0 6px;
}
.cs-detail-label-small:first-child { margin-top: 0; }
.cs-detail-info p:not(.cs-detail-label-small) {
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin: 0 0 4px;
}

@media (max-width: 640px) {
  .cs-detail-grid { grid-template-columns: 1fr; }
  button.cs-detail-frame { aspect-ratio: 4 / 3; max-width: 320px; }
}

/* Full-size image lightbox — opened from the preview image in the detail
   view above (PDFs open in a new tab instead; see js/casestudies.js). */
.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(10, 10, 12, 0.88);
}
.cs-lightbox[hidden] { display: none; }
.cs-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.cs-lightbox-close {
  position: fixed;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.cs-lightbox-close:hover, .cs-lightbox-close:focus-visible { background: rgba(255, 255, 255, 0.22); }
.cs-lightbox-close svg { width: 18px; height: 18px; }

/* Right panels */
.ai-panels { background: var(--ai-chrome); border-left: 1px solid var(--ai-line); display: flex; flex-direction: column; overflow-y: auto; }
.ai-panel { border-bottom: 1px solid var(--ai-line); }
.ai-panel-title { background: var(--ai-panelhead); color: var(--ai-text); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; padding: 7px 12px; }
.ai-panel-body { padding: 8px 10px; }

.layer-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 3px; color: var(--ai-text); }
.layer-row:hover { background: #3d3d3d; }
.layer-row.sel { background: #2f5c9e; }
.layer-row[data-cs] { cursor: pointer; }
.layer-row[data-cs]:focus-visible { outline: 2px solid var(--ai-accent); outline-offset: -2px; }
.layer-eye { width: 14px; height: 14px; color: var(--ai-muted); flex: 0 0 14px; }
.layer-chip { width: 14px; height: 14px; border-radius: 2px; flex: 0 0 14px; border: 1px solid rgba(0,0,0,0.4); }
.layer-name { font-family: var(--hand); font-size: 15px; }

.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches i { width: 22px; height: 22px; border-radius: 2px; border: 1px solid rgba(0,0,0,0.35); display: inline-block; }

/* Status bar */
.ai-status { background: var(--ai-chrome); border-top: 1px solid var(--ai-line); display: flex; align-items: center; gap: 14px; padding: 0 12px; color: var(--ai-muted); font-size: 11.5px; }
.ai-status .right { margin-left: auto; display: flex; gap: 14px; }

/* Responsive */
@media (max-width: 820px) {
  body.ai-app { overflow: auto; }
  .ai-window { grid-template-rows: 32px 34px 31px auto 24px; height: auto; min-height: 100vh; }
  .ai-body { display: block; }
  .ai-tools { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--ai-line); overflow-x: auto; }
  .ai-tool.active { box-shadow: inset 0 -2px 0 var(--ai-accent); }
  .ai-panels { border-left: 0; border-top: 1px solid var(--ai-line); }
  .ai-artboards { grid-template-columns: 1fr 1fr; }
  .ai-menu span:nth-child(n+6) { display: none; }
}

/* ============================================================
   "VS Code has updated" system toast
   ------------------------------------------------------------
   A mock Windows notification that surfaces ~10s after landing
   on this design (Illustrator) page. Clicking the update carries
   the visitor into the VS Code-themed web section (web.html).
   Deliberately styled as a real OS notification, NOT as the
   Illustrator UI — that break in theme is the whole effect.
   Hidden until activated by js at the bottom of design.html.
   ============================================================ */
.sys-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: #2b2b2b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  font-family: var(--ui);
  z-index: 9999;
  overflow: hidden;
  opacity: 0;
  transform: translateX(24px) translateY(8px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.sys-toast.show { opacity: 1; transform: translateX(0) translateY(0); pointer-events: auto; }
.sys-toast.hide { opacity: 0; transform: translateX(24px) translateY(8px); pointer-events: none; }

.sys-toast-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px 14px; }
.sys-toast-app { font-size: 11.5px; color: #cfcfcf; }
.sys-toast-dismiss {
  margin-left: auto; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 4px; color: #b8b8b8; cursor: pointer;
}
.sys-toast-dismiss:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sys-toast-dismiss svg { width: 10px; height: 10px; }

.sys-toast-body {
  display: flex; gap: 12px; padding: 2px 14px 12px;
  text-decoration: none; color: inherit; cursor: pointer;
}
.sys-toast-icon { flex: 0 0 44px; width: 44px; height: 44px; }
.sys-toast-icon svg { width: 100%; height: 100%; display: block; }
.sys-toast-text { min-width: 0; }
.sys-toast-title { display: block; font-size: 14px; font-weight: 600; margin: 0 0 3px; color: #fff; }
.sys-toast-msg { display: block; font-size: 12.5px; line-height: 1.45; color: #c8c8c8; margin: 0; }
.sys-toast-time { display: block; font-size: 11px; color: #8f8f8f; margin-top: 6px; }

.sys-toast-actions { display: flex; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sys-toast-btn {
  flex: 1; padding: 10px 12px; background: none; border: 0;
  color: #7cc0ff; font-family: var(--ui); font-size: 13px;
  text-align: center; text-decoration: none; cursor: pointer;
}
.sys-toast-btn.primary { font-weight: 600; }
.sys-toast-btn:hover { background: rgba(255, 255, 255, 0.06); }
.sys-toast-btn + .sys-toast-btn { border-left: 1px solid rgba(255, 255, 255, 0.08); }

@media (prefers-reduced-motion: reduce) {
  .sys-toast, .sys-toast.show, .sys-toast.hide { transition: opacity 0.2s linear; transform: none; }
}
@media (max-width: 480px) {
  .sys-toast { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* ============================================================
   Document tabs (Illustrator open-document tabs)
   ============================================================ */
.ai-tabs { background: #1a1a1a; display: flex; align-items: stretch; border-bottom: 1px solid var(--ai-line); overflow-x: auto; }
.ai-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; height: 100%;
  background: #262626; color: var(--ai-muted); font-size: 12px; text-decoration: none;
  border-right: 1px solid var(--ai-line); white-space: nowrap; position: relative;
}
.ai-tab:hover { color: #fff; }
.ai-tab.active { background: var(--ai-canvas); color: var(--ai-text); }
.ai-tab.active::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ai-orange); }
.ai-tab .doc-ico { width: 13px; height: 13px; border-radius: 3px; background: #310e00; border: 1px solid #7a3d00; color: var(--ai-orange); font-size: 8px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; letter-spacing: -0.5px; }
.ai-tab .doc-x { width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; color: var(--ai-muted); }
.ai-tab .doc-x:hover { background: rgba(255,255,255,0.14); color: #fff; }
.ai-tab .doc-x svg { width: 8px; height: 8px; }

/* Attention pulse — gently invites a click to the case-studies tab */
@keyframes ai-tab-attn {
  0%, 100% { background: #262626; box-shadow: inset 0 -2px 0 rgba(255, 154, 46, 0); color: var(--ai-muted); }
  50%      { background: #34301f; box-shadow: inset 0 -2px 0 var(--ai-orange); color: #fff; }
}
.ai-tab.attn { animation: ai-tab-attn 1.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .ai-tab.attn { animation: none; background: #34301f; box-shadow: inset 0 -2px 0 var(--ai-orange); color: #fff; }
}

/* ============================================================
   Layers panel — "All Projects" folder + visibility toggles
   ============================================================ */
.layer-folder .layer-row.folder { font-weight: 600; }
.fold-chevron { width: 13px; height: 13px; flex: 0 0 13px; color: var(--ai-muted); transition: transform .12s ease; transform: rotate(90deg); cursor: pointer; }
.layer-folder.collapsed .fold-chevron { transform: rotate(0deg); }
.layer-folder.collapsed .layer-children { display: none; }
.folder-ico { width: 14px; height: 14px; flex: 0 0 14px; color: #c9a86a; }
.layer-children .layer-row { padding-left: 26px; }
.eye-toggle { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: var(--ai-muted); display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; align-items: center; justify-content: center; }
.eye-toggle:hover { color: #fff; }
.eye-toggle .eye { width: 15px; height: 15px; }
.eye-closed { display: none; }
.layer-row.off .eye-open { display: none; }
.layer-row.off .eye-closed { display: inline; }
.layer-row.off { opacity: 0.5; }
.layer-row .layer-name { cursor: pointer; }

/* ============================================================
   Case-studies canvas — filterable piece artboards
   ============================================================ */
.ai-artboards.featured { grid-template-columns: repeat(3, 1fr); max-width: 1000px; gap: 30px 26px; }
.ai-artboards.cs { grid-template-columns: repeat(3, 1fr); max-width: 1060px; gap: 30px 26px; }
.artboard-wrap.hidden { display: none; }
.ab-name { display: flex; align-items: center; gap: 7px; }
.ab-name .cat-dot { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 9px; }
.artboard.hl { outline-color: var(--ai-orange); box-shadow: 0 0 0 3px rgba(255,154,46,0.5), 0 6px 20px rgba(0,0,0,0.55); }
.cs-empty { grid-column: 1 / -1; text-align: center; color: var(--ai-muted); font-family: var(--hand); font-size: 28px; line-height: 1.4; padding: 70px 20px; max-width: 640px; margin: 0 auto; }

@media (max-width: 820px) {
  .ai-artboards.cs { grid-template-columns: 1fr 1fr; }
}
