/* Learn AI with Thomas: the desktop look (pass 3 and 4, 23 Nov 2026).
   Windows, folders, files, a bin, a desk you can drag things around on, tabs and the desktop footer.
   Pass 4 (Tom): windows use standard Mac colouring (red, amber, green lights and neutral grey bars), folders are Mac folder blue
   and the bin is a silver mesh can. Tom's green stays on buttons, ticks and highlights.
   Every drawing here is our own, made from flat shapes. No picture files of anyone's icons. No gradients. */

:root {
  --dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%23CDEEDB'/%3E%3C/svg%3E");
  --plate: rgba(22, 33, 28, 0.07);
  --mac-bar: #F1F1F3;      /* title bars, tab bars, status lines */
  --mac-side: #F6F6F8;     /* sidebars */
  --mac-line: #E1E1E6;     /* hairlines inside windows */
  --mac-sel: #E1E1E6;      /* the picked row in a sidebar */
  --mac-blue: #1F6FEB;     /* the name plate under a selected icon, like Finder */
  --folder-back: #3D9BE9;  /* Mac folder blue: back and tab */
  --folder-front: #74BFF7; /* Mac folder blue: front */
}
.dotted { background-color: var(--white); background-image: var(--dot); background-size: 22px 22px; }

/* ---------- Window ---------- */
.win { position: relative; border-radius: 20px; background: var(--white); box-shadow: var(--shadow-lift), 0 0 0 1px rgba(22, 33, 28, 0.05); overflow: hidden; text-align: left; }
.win__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 46px; padding: 0 18px; background: var(--mac-bar); box-shadow: inset 0 -1px 0 var(--mac-line); }
.win__lights { display: flex; gap: 8px; align-items: center; }
.win__lights i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; box-shadow: inset 0 0 0 0.5px rgba(22, 33, 28, 0.14); transition: transform 0.3s var(--pop); }
.win__lights i:nth-child(2) { background: #FEBC2E; }
.win__lights i:nth-child(3) { background: #28C840; }
.win:hover .win__lights i { transform: scale(1.12); }
.win:hover .win__lights i:nth-child(2) { transition-delay: 40ms; }
.win:hover .win__lights i:nth-child(3) { transition-delay: 80ms; }
.win__title.win__title--mark { font-weight: 800; color: var(--ink); letter-spacing: -0.025em; gap: 0.27em; }
.win__title { font-size: 15px; font-weight: 600; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 8px; }
.win__side-r { justify-self: end; font-size: 15px; color: var(--grey); font-variant-numeric: tabular-nums; }
.win__side-r b { color: var(--ink); }
.win__status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 20px; font-size: 14px; color: var(--grey); background: var(--mac-bar); box-shadow: inset 0 1px 0 var(--mac-line); }
.win--tilt { transform: rotate(-1.6deg); }

/* Finder style body: sidebar and files */
.win__body { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 300px; }
.win__sidebar { padding: 20px 12px; background: var(--mac-side); box-shadow: inset -1px 0 0 var(--mac-line); display: grid; gap: 4px; align-content: start; }
.win__sidebar h3 { font-size: 14px; font-weight: 700; color: var(--grey); padding: 0 12px 6px; }
.side-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; color: var(--ink); transition: background 0.2s var(--ease), color 0.2s, transform 0.12s ease-out; }
.side-item:hover { background: var(--mac-bar); }
.side-item:active { transform: scale(0.97); }
.side-item[aria-pressed="true"], .side-item[aria-current="true"] { background: var(--mac-sel); color: var(--ink); }
.side-item span { font-weight: 500; opacity: 0.75; font-variant-numeric: tabular-nums; }
.side-item i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; margin-right: 2px; }
.side-item > b { font-weight: 600; display: inline-flex; align-items: center; gap: 9px; }
.win__main { padding: 28px; min-width: 0; }
.win__tool { display: flex; align-items: center; gap: 12px; padding: 12px 18px; box-shadow: inset 0 -1px 0 var(--mac-line); background: var(--white); }

/* ---------- Folder: three flat pieces. On hover it lifts, the front leans open and the paper rises. ---------- */
.folder { position: relative; display: block; width: 84px; height: 66px; flex: none; --f-back: var(--folder-back); --f-front: var(--folder-front); filter: drop-shadow(0 5px 8px rgba(22, 60, 110, 0.2)); transition: transform 0.45s var(--pop); }
.folder__back { position: absolute; inset: 9px 0 0 0; border-radius: 9px; background: var(--f-back); }
.folder__back::before { content: ""; position: absolute; left: 0; top: -9px; width: 42%; height: 20px; border-radius: 8px 10px 0 0; background: var(--f-back); }
.folder__paper { position: absolute; left: 8px; right: 8px; top: 15px; height: 34px; border-radius: 5px; background: var(--white); box-shadow: 0 1px 2px rgba(22, 33, 28, 0.14); transition: transform 0.45s var(--pop); }
.folder__paper::before, .folder__paper::after { content: ""; position: absolute; left: 8px; top: 7px; height: 3px; width: 46%; border-radius: 2px; background: var(--mac-line); }
.folder__paper::after { top: 14px; width: 68%; }
.folder__front { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; border-radius: 5px 5px 9px 9px; background: var(--f-front); transform-origin: 50% 100%; transition: transform 0.45s var(--pop); box-shadow: 0 -1px 3px rgba(22, 60, 110, 0.16); }
/* every folder is the same Mac blue now. The old --deep, --mint and --pale names stay in the pages and do nothing. */
.folder--empty .folder__paper { display: none; }
.folder--big { transform: scale(1.7); margin: 28px 34px; }
.is-hot > .icon__in .folder, .folder-hover:hover .folder { transform: translateY(-6px); }
.is-hot > .icon__in .folder__front, .folder-hover:hover .folder__front { transform: perspective(260px) rotateX(-26deg); }
.is-hot > .icon__in .folder__paper, .folder-hover:hover .folder__paper { transform: translateY(-11px) rotate(-3deg); }

/* ---------- File and note ---------- */
.file { position: relative; display: grid; align-content: start; gap: 5px; width: 58px; height: 72px; padding: 12px 9px 0; border-radius: 6px; background: var(--white); box-shadow: 0 0 0 1px rgba(22, 33, 28, 0.08), 0 4px 10px rgba(22, 33, 28, 0.12); flex: none; transition: transform 0.45s var(--pop); clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%); }
.file::after { content: ""; position: absolute; right: 0; top: 0; width: 15px; height: 15px; border-radius: 0 0 0 5px; background: var(--mac-bar); box-shadow: -1px 1px 2px rgba(22, 33, 28, 0.14); }
.file i { display: block; height: 4px; border-radius: 2px; background: var(--mac-line); }
.file i.g { background: var(--green); width: 55%; height: 5px; }
.file i.s { width: 62%; } .file i.m { width: 84%; }
.file--draft i.g { background: var(--mint); }
.file--draft { background: var(--mac-side); }
.file-wrap { position: relative; display: block; filter: drop-shadow(0 4px 8px rgba(22, 33, 28, 0.12)); transition: transform 0.45s var(--pop); }
.file-wrap .file { box-shadow: none; }
.is-hot > .icon__in .file-wrap, .folder-hover:hover .file-wrap { transform: translateY(-6px) rotate(-2deg); }
.note-ic { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 8px 8px 8px 20px; background: var(--tint); color: var(--deep); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; text-align: center; box-shadow: 0 4px 10px rgba(22, 33, 28, 0.12); transform: rotate(-4deg); transition: transform 0.45s var(--pop); }
.note-ic small { display: block; font-size: 14px; font-weight: 600; color: var(--grey); letter-spacing: 0; }
.is-hot > .icon__in .note-ic { transform: rotate(2deg) translateY(-6px); }

/* ---------- Bin ---------- */
.bin { display: block; width: 76px; height: 90px; overflow: visible; flex: none; }
.bin { filter: drop-shadow(0 5px 8px rgba(22, 33, 28, 0.14)); }
/* an empty mesh can. Hover it, or drag something over it, and scrunched paper shows in the top */
.bin__paper { opacity: 0; transform: translateY(9px); transform-box: fill-box; transform-origin: center; transition: transform 0.45s var(--pop), opacity 0.2s var(--ease); }
.is-hot > .icon__in .bin__paper, .icon.is-open .bin__paper { opacity: 1; transform: none; }
.is-hot > .icon__in .bin, .icon.is-open .bin { transform: scale(1.06); }
.bin { transition: transform 0.4s var(--pop); }
.icon.is-no > .icon__in { animation: shake-no 0.45s var(--ease); }
@keyframes shake-no { 0%, 100% { transform: none; } 20% { transform: translateX(-7px) rotate(-4deg); } 45% { transform: translateX(6px) rotate(3deg); } 70% { transform: translateX(-4px) rotate(-2deg); } }

/* ---------- Desktop icon: art on a plate, name under it ---------- */
.icon { position: absolute; left: var(--x, 0); top: var(--y, 0); z-index: 2; width: 124px; text-decoration: none; color: var(--ink); -webkit-user-select: none; user-select: none; -webkit-user-drag: none; touch-action: manipulation; outline: none; will-change: transform; }
.icon__in { display: grid; justify-items: center; gap: 6px; transition: transform 0.5s var(--ease); transform: translate(var(--px, 0px), var(--py, 0px)); }
.icon__art { display: grid; place-items: center; width: 104px; height: 96px; border-radius: 14px; transition: background 0.2s var(--ease); }
.icon__name { max-width: 100%; padding: 2px 9px; border-radius: 7px; font-size: 14px; line-height: 1.35; font-weight: 600; text-align: center; transition: background 0.2s var(--ease), color 0.2s; }
.icon.is-on .icon__art { background: var(--plate); }
.icon.is-on .icon__name, .icon:focus-visible .icon__name { background: var(--mac-blue); color: var(--white); }
.icon:focus-visible .icon__art { background: var(--plate); }
.icon.is-lifted { z-index: 6; cursor: grabbing; }
.icon.is-lifted .icon__art { transform: scale(1.06); transition: transform 0.2s var(--pop), background 0.2s; }
@media (hover: hover) and (pointer: fine) { .icon { cursor: grab; } }
.lasso { position: absolute; z-index: 8; border-radius: 3px; background: rgba(22, 33, 28, 0.07); box-shadow: inset 0 0 0 1px rgba(22, 33, 28, 0.28); pointer-events: none; }
.desk { position: relative; touch-action: pan-y; }
.desk__tip { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 6px) scale(0.9); padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.35s var(--pop); z-index: 9; }
.desk__tip.is-on { opacity: 1; transform: translate(-50%, -4px); }

/* ---------- Footer: a little desktop ---------- */
.site-footer.desk-foot { background-color: var(--white); background-image: var(--dot); background-size: 22px 22px; color: var(--ink); padding-block: 84px 36px; box-shadow: inset 0 1px 0 var(--line); }
.desk-foot .wrap { gap: 44px; }
.desk-foot__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; }
.desk-foot__left { display: grid; gap: 40px; max-width: 520px; }
.desk-foot .site-footer__brand p { color: var(--grey); }
.desk-foot .logo__light { background: var(--green); }
.desk-foot .site-footer__cols { gap: 56px; }
.desk-foot h3 { color: var(--grey); font-weight: 600; }
.desk-foot li, .desk-foot p { color: var(--ink); }
.desk-foot li a { font-weight: 600; }
.desk-foot li a:hover { color: var(--green); }
.desk-foot .site-footer__base { box-shadow: 0 -1px 0 var(--line); }
.desk-foot .site-footer__base p { color: var(--grey); }
.desk--foot { width: 420px; height: 316px; flex: none; }
.desk__hint { position: absolute; left: 6px; bottom: 0; font-size: 14px; color: var(--grey); pointer-events: none; }
@media (hover: none), (pointer: coarse) { .desk__hint { display: none; } }

/* ---------- Phones and small screens: the desk becomes a tidy row you tap ---------- */
@media (max-width: 980px) {
  .desk-foot__top { flex-direction: column; gap: 40px; }
  .desk--foot { width: 100%; height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 6px; }
  .desk--foot .icon { position: static; width: auto; transform: none !important; }
  .desk__hint { display: none; }
  .win__body { grid-template-columns: 1fr; }
  .win__sidebar { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; box-shadow: inset 0 -1px 0 var(--mac-line); }
  .win__sidebar h3 { display: none; }
  .side-item { width: auto; background: var(--white); }
  .win__main { padding: 18px; }
  .win--tilt { transform: none; }
}
@media (max-width: 520px) {
  .win__bar { padding: 0 14px; grid-template-columns: auto 1fr auto; }
  .win__title { justify-self: center; }
}

/* ---------- ?sounds=1: the try it panel for sound feels (js/sound.js) ---------- */
.sfx-lab { position: fixed; left: 16px; bottom: 16px; z-index: 80; width: min(340px, calc(100vw - 32px)); padding: 18px; border-radius: 20px; background: var(--white); box-shadow: var(--shadow-lift); display: grid; gap: 12px; }
.sfx-lab strong { font-size: 17px; letter-spacing: -0.01em; }
.sfx-lab p { font-size: 14px; color: var(--grey); }
.sfx-lab__feels, .sfx-lab__cues { display: flex; flex-wrap: wrap; gap: 6px; }
.sfx-lab button { padding: 8px 13px; border-radius: 999px; background: var(--panel); font-size: 14px; font-weight: 600; transition: transform 0.12s ease-out, background 0.2s var(--ease); }
.sfx-lab button:active { transform: scale(0.95); }
.sfx-lab__feels button { text-transform: capitalize; }
.sfx-lab__feels button[aria-pressed="true"] { background: var(--green); color: var(--white); }

/* ---------- Finder style windows on the list pages ---------- */
.finder-win { max-width: 1040px; margin-inline: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-content: start; }
.tile { display: grid; justify-items: center; align-content: start; gap: 10px; padding: 30px 22px 26px; border-radius: 18px; text-align: center; text-decoration: none; color: var(--ink); transition: background 0.25s var(--ease), transform 0.12s ease-out; }
a.tile:hover, a.tile:focus-visible { background: var(--mac-side); }
a.tile:active { transform: scale(0.98); }
.tile .file-wrap { transform: scale(1.25); margin: 12px 0 18px; }
a.tile:hover .file-wrap { transform: scale(1.25) translateY(-5px) rotate(-2deg); }
.tile__name { font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.tile p { font-size: 15px; color: var(--grey); text-wrap: pretty; }
.tile .chip-tag { gap: 8px; margin-top: 4px; }
.search--tool { max-width: 420px; margin-inline: auto; padding: 2px 18px; box-shadow: 0 0 0 1.5px var(--mac-line); background: var(--mac-side); }
.search--tool input { padding: 10px 0; font-size: 16px; }
.finder-win .guides { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.finder-win .guide { padding: 24px; border-radius: 20px; }
.finder-win .guide--live { padding: 28px; gap: 28px; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.finder-win .guide--soon .folder { transform: scale(0.72); transform-origin: left bottom; margin-bottom: -6px; }
.finder-win .guide--soon.folder-hover:hover .folder { transform: scale(0.72) translateY(-6px); }
.finder-win .h2--card { font-size: clamp(24px, 2.4vw, 32px); }
.packs-win .win__main { padding: 22px; }
.book__who .win__lights { margin-right: 6px; }
.lost .folder--big { margin-bottom: 30px; }
@media (max-width: 980px) {
  .finder-win .guides { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } .book__who .win__lights { display: none; } }
.packs-win .win__main { background: var(--mac-side); }
.finder-win .guide--soon .h3 { font-size: 21px; }
.finder-win .guide--soon p { font-size: 16px; }
