/*
  The landing's working desk, drawn as a space looks in the light theme whatever the page is in,
  since it is a picture of the app. It is laid out at 1200 by 750 and scaled to fit (`--dk-scale`,
  set by logic.ts), so every position here is in the desk's own pixels.

  Rules start `atomics-landing-desk [dk]` so they outrank design.css's `[ds] button` reset.
*/

atomics-landing-desk {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f4f4f2;
}

atomics-landing-desk [hidden] {
  display: none !important;
}

atomics-landing-desk [dk] {
  position: absolute;
  left: 0;
  top: 0;
  width: 1200px;
  height: 750px;
  overflow: hidden;
  transform: scale(var(--dk-scale, 1));
  transform-origin: 0 0;
  background: #f4f4f2;
  color: #161616;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}

atomics-landing-desk [dk]::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(30, 30, 40, 0.16) 1px, rgba(0, 0, 0, 0) 1.4px);
  background-size: 24px 24px;
  pointer-events: none;
}

atomics-landing-desk [dk] button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

atomics-landing-desk [dk] :focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 2px;
}

atomics-landing-desk [dk] kbd {
  font: inherit;
  font-size: 11px;
  color: #8a8a8f;
}

/* ---------------------------------------------------------------- the top of the space */

atomics-landing-desk [dk] [dk-top] {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

atomics-landing-desk [dk] [dk-menu],
atomics-landing-desk [dk] [dk-find-open] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  color: #3a3a3f;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

atomics-landing-desk [dk] [dk-menu] {
  width: 34px;
}

atomics-landing-desk [dk] [dk-find-open] {
  padding: 0 10px;
}

atomics-landing-desk [dk] [dk-menu][aria-expanded='true'],
atomics-landing-desk [dk] [dk-find-open][aria-expanded='true'] {
  background: #eef3ff;
  color: #2348c9;
}

atomics-landing-desk [dk] [dk-name] {
  font-size: 14px;
}

atomics-landing-desk [dk] [dk-chip] {
  padding: 2px 8px;
  border-radius: 99px;
  background: #e8efff;
  color: #2348c9;
  font-size: 11.5px;
  font-weight: 600;
}

atomics-landing-desk [dk] [dk-sp] {
  flex: 1;
}

atomics-landing-desk [dk] [dk-people] {
  display: inline-flex;
  margin-right: 4px;
}

atomics-landing-desk [dk] [dk-people] i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

/* ---------------------------------------------------------------- the main menu */

atomics-landing-desk [dk] [dk-drawer] {
  position: absolute;
  left: 14px;
  top: 58px;
  z-index: 5500;
  width: 272px;
  padding: 6px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 60px rgba(20, 20, 50, 0.22);
}

atomics-landing-desk [dk] [dk-who] {
  padding: 8px 10px 10px;
}

atomics-landing-desk [dk] [dk-who] b,
atomics-landing-desk [dk] [dk-who] small {
  display: block;
}

atomics-landing-desk [dk] [dk-who] b {
  font-size: 14px;
}

atomics-landing-desk [dk] [dk-who] small {
  color: #8a8a8f;
  font-size: 12px;
}

atomics-landing-desk [dk] [dk-row-menu] {
  display: flex;
  align-items: center;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13.5px;
}

atomics-landing-desk [dk] [dk-row-menu]:hover,
atomics-landing-desk [dk] [dk-row-menu]:focus-visible {
  background: #f1f1ef;
}

atomics-landing-desk [dk] [dk-row-menu] kbd {
  margin-left: auto;
}

atomics-landing-desk [dk] [dk-drawer] hr {
  margin: 6px 4px;
  border: 0;
  border-top: 1px solid #ececea;
}

/* ---------------------------------------------------------------- the tools down the left */

atomics-landing-desk [dk] [dk-tools] {
  position: absolute;
  left: 14px;
  top: 120px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 6px 18px rgba(30, 30, 60, 0.1);
}

atomics-landing-desk [dk] [dk-tool] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #55555a;
}

atomics-landing-desk [dk] [dk-tool]:hover {
  background: #f1f1ef;
}

atomics-landing-desk [dk] [dk-tool][aria-pressed='true'] {
  background: #2f6bff;
  color: #ffffff;
}

/* ---------------------------------------------------------------- the board's own things */

atomics-landing-desk [dk] [dk-note] {
  position: absolute;
  z-index: 2;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 8px 24px rgba(40, 40, 80, 0.1);
}

atomics-landing-desk [dk] [dk-note] b {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

atomics-landing-desk [dk] [dk-note] p {
  margin: 0 0 2px;
  color: #333333;
  font-size: 13px;
  line-height: 1.6;
}

atomics-landing-desk [dk] [dk-note] ul {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

atomics-landing-desk [dk] [dk-note] li {
  display: list-item;
  list-style: disc;
  color: #333333;
  font-size: 13px;
  line-height: 1.6;
}

atomics-landing-desk [dk] [dk-note][dk-flash] {
  box-shadow: 0 0 0 3px #2f6bff, 0 8px 24px rgba(40, 40, 80, 0.1);
}

atomics-landing-desk [dk] [dk-record] {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #1b1b1e;
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

atomics-landing-desk [dk] [dk-disc] {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f4f4f2 0 7%, #e0578f 8% 26%, rgba(0, 0, 0, 0) 27%),
    repeating-radial-gradient(circle, #1a1a1d 0 2px, #2b2b30 2px 3px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

atomics-landing-desk [dk] [dk-record-text] {
  min-width: 0;
}

atomics-landing-desk [dk] [dk-record-text] b,
atomics-landing-desk [dk] [dk-record-text] small {
  display: block;
  white-space: nowrap;
}

atomics-landing-desk [dk] [dk-record-text] b {
  font-size: 13.5px;
}

atomics-landing-desk [dk] [dk-record-text] small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11.5px;
}

atomics-landing-desk [dk] [dk-record-play] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border-radius: 50%;
  background: #ffffff;
  color: #161616;
}

atomics-landing-desk [dk] [dk-record]:not([dk-playing]) [dk-glyph='pause'],
atomics-landing-desk [dk] [dk-record][dk-playing] [dk-glyph='play'] {
  display: none;
}

atomics-landing-desk [dk] [dk-sticky] {
  position: absolute;
  z-index: 2;
  width: 140px;
  height: 140px;
  padding: 14px;
  background: #fbe7a1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  color: #3a3220;
  font-family: 'Segoe Print', 'Bradley Hand', cursive;
  font-size: 13.5px;
  line-height: 1.4;
  transform: rotate(-2deg);
}

/* ---------------------------------------------------------------- icons */

atomics-landing-desk [dk] [dk-icon] {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 96px;
  padding: 6px 0;
  border-radius: 10px;
}

atomics-landing-desk [dk] [dk-glyph-box] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 50px;
  border-radius: 10px;
}

atomics-landing-desk [dk] [dk-glyph-box] > svg {
  width: 54px;
  height: 46px;
}

atomics-landing-desk [dk] [dk-glyph-box][dk-pdf] > svg {
  width: 40px;
  height: 50px;
}

atomics-landing-desk [dk] [dk-tile] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 26%;
  background: linear-gradient(145deg, #ff8a5c, #e2453a);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

atomics-landing-desk [dk] [dk-label] {
  padding: 1px 6px;
  border-radius: 5px;
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

atomics-landing-desk [dk] [dk-icon] small {
  margin-top: -4px;
  color: #55555a;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

atomics-landing-desk [dk] [dk-icon][dk-sel] [dk-glyph-box] {
  background: rgba(0, 0, 0, 0.1);
}

atomics-landing-desk [dk] [dk-icon][dk-sel] [dk-label] {
  background: #2f6bff;
  color: #ffffff;
}

/* ---------------------------------------------------------------- windows */

atomics-landing-desk [dk] [dk-win] {
  position: absolute;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 24px 60px rgba(30, 30, 60, 0.25);
  outline: none;
}

atomics-landing-desk [dk] [dk-win][dk-blur] {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 12px 30px rgba(30, 30, 60, 0.14);
}

atomics-landing-desk [dk] [dk-bar] {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 6px 0 12px;
  border-bottom: 1px solid #efefec;
  cursor: grab;
  touch-action: none;
}

atomics-landing-desk [dk] [dk-win][dk-dragging] [dk-bar] {
  cursor: grabbing;
}

atomics-landing-desk [dk] [dk-bar] b {
  font-size: 13.5px;
}

atomics-landing-desk [dk] [dk-win][dk-blur] [dk-bar] b {
  color: #8a8a8f;
}

atomics-landing-desk [dk] [dk-bar] small {
  color: #8a8a8f;
  font-size: 12px;
}

atomics-landing-desk [dk] [dk-wic] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

atomics-landing-desk [dk] [dk-wic] > svg {
  width: 20px;
  height: 18px;
}

atomics-landing-desk [dk] [dk-wic] [dk-tile] {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

atomics-landing-desk [dk] [dk-wic] [dk-tile] svg {
  width: 14px;
  height: 14px;
}

atomics-landing-desk [dk] [dk-close] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border-radius: 8px;
  color: #66666b;
}

atomics-landing-desk [dk] [dk-close]:hover {
  background: #efefed;
  color: #161616;
}

atomics-landing-desk [dk] [dk-body] {
  position: absolute;
  left: 0;
  right: 0;
  top: 39px;
  bottom: 0;
  overflow: hidden;
}

/* A folder, in two of its six views. */
atomics-landing-desk [dk] [dk-viewbar] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f1ee;
  color: #77777b;
  font-size: 12px;
}

atomics-landing-desk [dk] [dk-seg] {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
  padding: 2px;
  border-radius: 8px;
  background: #efefec;
}

atomics-landing-desk [dk] [dk-view] {
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  color: #3a3a3f;
  font-size: 11.5px;
  font-weight: 600;
}

atomics-landing-desk [dk] [dk-view][aria-pressed='true'] {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

atomics-landing-desk [dk] [dk-grid] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

atomics-landing-desk [dk] [dk-file] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 10px;
  color: #333333;
  font-size: 11.5px;
  text-align: center;
}

atomics-landing-desk [dk] [dk-file]:hover {
  background: #f3f3f0;
}

atomics-landing-desk [dk] [dk-th] {
  display: block;
  border-radius: 6px;
}

atomics-landing-desk [dk] [dk-file] [dk-th] {
  width: 56px;
  height: 44px;
}

atomics-landing-desk [dk] [dk-th='pdf'] {
  background: linear-gradient(#ffffff 0 68%, #e0493f 68% 100%);
  box-shadow: inset 0 0 0 1px #e1e1de;
}

atomics-landing-desk [dk] [dk-th='table'] {
  background: repeating-linear-gradient(#ffffff 0 7px, #e3e9e3 7px 8px);
  box-shadow: inset 0 3px 0 #3f9d5b, inset 0 0 0 1px #d9e7da;
}

atomics-landing-desk [dk] [dk-th='photo'] {
  background: linear-gradient(160deg, #9cc4e4, #4e7fa8 55%, #5d7b4a 56%, #89a86b);
}

atomics-landing-desk [dk] [dk-th='photo2'] {
  background: linear-gradient(160deg, #f2c79a, #d98a5a 50%, #8c6a52 51%, #b99577);
}

atomics-landing-desk [dk] [dk-th='note'] {
  background: repeating-linear-gradient(#fff6c8 0 7px, #efe3a6 7px 8px);
  box-shadow: inset 0 0 0 1px #eadf9f;
}

atomics-landing-desk [dk] [dk-list] {
  padding: 6px 10px;
}

atomics-landing-desk [dk] [dk-row] {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12.5px;
}

atomics-landing-desk [dk] [dk-row]:nth-child(odd) {
  background: #f7f7f5;
}

atomics-landing-desk [dk] [dk-row] [dk-th] {
  flex: 0 0 26px;
  width: 26px;
  height: 20px;
  border-radius: 4px;
}

atomics-landing-desk [dk] [dk-row] span:last-child {
  margin-left: auto;
  color: #8a8a8f;
  font-size: 11.5px;
}

/* A PDF, its first page. */
atomics-landing-desk [dk] [dk-win='pdf'] [dk-body] {
  background: #f1f1ee;
}

atomics-landing-desk [dk] [dk-page] {
  position: absolute;
  inset: 14px 24px 0;
  padding: 26px 30px;
  background: #ffffff;
  box-shadow: 0 0 0 1px #ececea, 0 6px 18px rgba(0, 0, 0, 0.08);
}

atomics-landing-desk [dk] [dk-page] h4 {
  margin: 0 0 4px;
  font-family: Georgia, serif;
  font-size: 18px;
}

atomics-landing-desk [dk] [dk-page] small {
  display: block;
  margin-bottom: 14px;
  color: #8a8a8f;
  font-size: 11px;
}

atomics-landing-desk [dk] [dk-page] i,
atomics-landing-desk [dk] [dk-page] mark {
  display: block;
  height: 7px;
  margin-bottom: 9px;
  border-radius: 3px;
  background: #e6e6e2;
}

atomics-landing-desk [dk] [dk-page] mark {
  width: 70%;
  background: #fde68a;
}

/* The board's own timer. */
atomics-landing-desk [dk] [dk-timer] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 0 18px;
  text-align: center;
}

atomics-landing-desk [dk] [dk-timer] b {
  font-size: 54px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

atomics-landing-desk [dk] [dk-timer] small {
  color: #8a8a8f;
  font-size: 12px;
}

atomics-landing-desk [dk] [dk-timer-go] {
  height: 36px;
  padding: 0 18px;
  border-radius: 10px;
  background: #161616;
  color: #ffffff;
  font-weight: 700;
}

atomics-landing-desk [dk] [dk-timer-go]:not([dk-running]) [dk-for='pause'],
atomics-landing-desk [dk] [dk-timer-go][dk-running] [dk-for='start'] {
  display: none;
}

/* ---------------------------------------------------------------- ⌘K */

atomics-landing-desk [dk] [dk-find] {
  position: absolute;
  left: 50%;
  top: 104px;
  z-index: 6000 !important;
  width: 560px;
  margin-left: -280px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(250, 250, 252, 0.97);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 30px 70px rgba(20, 20, 50, 0.3);
}

atomics-landing-desk [dk] [dk-find-field] {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #ececef;
  color: #77777b;
}

atomics-landing-desk [dk] [dk-find-input] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #161616;
  font: inherit;
  font-size: 16px;
}

atomics-landing-desk [dk] [dk-options] {
  padding: 6px;
}

atomics-landing-desk [dk] [dk-opt] {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

atomics-landing-desk [dk] [dk-opt] small {
  margin-left: auto;
  color: #8a8a8f;
  font-size: 12px;
}

atomics-landing-desk [dk] [dk-opt][aria-selected='true'] {
  background: #2f6bff;
  color: #ffffff;
}

atomics-landing-desk [dk] [dk-opt][aria-selected='true'] small {
  color: rgba(255, 255, 255, 0.8);
}

atomics-landing-desk [dk] [dk-none],
atomics-landing-desk [dk] [dk-hint] {
  margin: 0;
  padding: 10px 16px;
  color: #8a8a8f;
  font-size: 12px;
}

atomics-landing-desk [dk] [dk-hint] {
  border-top: 1px solid #ececef;
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  atomics-landing-desk [dk] [dk-record][dk-playing] [dk-disc] {
    animation: dk-spin 2.4s linear infinite;
  }

  atomics-landing-desk [dk] [dk-note] {
    transition: box-shadow 0.3s ease;
  }
}

@keyframes dk-spin {
  to {
    transform: rotate(360deg);
  }
}
