/* The tour (notch-tour.js): the pretend Mac the site turns into, its guided
   run and its try-it-yourself mode, and the phone's player. The Mac's own
   surfaces are dark, as the product surface always is on this site
   (docs/site/DESIGN.md); the offer that starts it is a button on the hero's
   pretend screen (homepage.css). */

/* The site steps aside. */
html.nt-on { overflow: hidden; }

/* The pretend Mac. */
.nt-world { position: fixed; inset: 0; z-index: 70; color-scheme: dark; color: #f4f2f8; overflow: hidden;
  font: 400 13px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
.nt-world[hidden] { display: none; }
.nt-world :focus-visible { outline: 2px solid #b9abff; outline-offset: 2px; }
.nt-screen { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .9s cubic-bezier(.3, .1, .2, 1); }
.nt-wall { position: absolute; inset: 0; background:
  radial-gradient(ellipse 60% 55% at 18% 8%, rgb(122 92 240 / .55), transparent 70%),
  radial-gradient(ellipse 50% 45% at 86% 14%, rgb(246 170 140 / .42), transparent 70%),
  linear-gradient(180deg, #160f2e 0%, #2a1d52 48%, #3a2a62 100%); }
.nt-wall::after { content: ''; position: absolute; inset: 30% 0 0; background: url('assets/hero-landscape-v2.webp') center bottom / cover no-repeat;
  filter: brightness(.66) saturate(1.25) hue-rotate(-8deg); -webkit-mask-image: linear-gradient(transparent, #000 38%); mask-image: linear-gradient(transparent, #000 38%); }
.nt-menubar { position: absolute; inset: 0 0 auto; height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; z-index: 2;
  background: rgb(20 15 34 / .5); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); color: #f4f2f8; font-size: 13px; }
.nt-menus { display: flex; gap: 18px; } .nt-menus b { font-weight: 700; } .nt-menus span { opacity: .88; }
.nt-status { display: flex; align-items: center; gap: 14px; }
.nt-status svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.nt-status svg:nth-child(2) { width: 24px; } .nt-status .nt-fill { fill: currentColor; stroke: none; }

/* The agent's app, drawn for the demo. */
.nt-app { position: absolute; inset: 78px 0 96px; margin: auto; z-index: 1; display: flex; width: min(800px, calc(100% - 64px)); height: min(480px, calc(100% - 200px));
  border-radius: 12px; background: #1c1b20; box-shadow: 0 30px 80px rgb(0 0 0 / .45), 0 0 0 1px rgb(255 255 255 / .09); overflow: hidden; }
.nt-side { width: 196px; flex-shrink: 0; padding: 10px; background: #151418; border-right: 1px solid rgb(255 255 255 / .05); }
.nt-lights { display: flex; gap: 8px; height: 22px; align-items: center; padding-left: 4px; }
.nt-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; } .nt-lights i:nth-child(2) { background: #febc2e; } .nt-lights i:nth-child(3) { background: #28c840; }
.nt-new { margin: 12px 0 0; padding: 6px 8px; font-weight: 600; } .nt-new b { margin-right: 4px; }
.nt-day { margin: 12px 8px 4px; font-size: 11px; color: #8d8a99; }
.nt-sessions { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.nt-sessions li { padding: 6px 8px; border-radius: 7px; color: #b9b6c4; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-sessions .nt-current { background: #2b2933; color: #fff; }
.nt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nt-head { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 20px; border-bottom: 1px solid rgb(255 255 255 / .05); color: #8d8a99; }
.nt-title { color: #fff; font-weight: 600; } .nt-sep { opacity: .5; }
.nt-tag { margin-left: auto; padding: 1px 6px; border: 1px solid rgb(255 255 255 / .2); border-radius: 4px; font-size: 9px; letter-spacing: .1em; }
.nt-spin { width: 12px; height: 12px; border: 2px solid rgb(255 255 255 / .2); border-top-color: #d9d6e2; border-radius: 50%; animation: nt-turn .9s linear infinite; }
@keyframes nt-turn { to { transform: rotate(360deg); } }
@keyframes nt-blink { 50% { opacity: 0; } }
.nt-try { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 22px 28px; }
.nt-try-lead { margin: 0; font-size: 16px; line-height: 1.45; color: #e7e4ee; } .nt-try-lead b { color: #fff; }
.nt-try-sub { margin: 0; color: #a3a0b0; }
.nt-try-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.nt-dock { position: absolute; left: 50%; bottom: 10px; z-index: 1; display: flex; gap: 8px; padding: 6px; border-radius: 18px; transform: translateX(-50%);
  background: rgb(255 255 255 / .14); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.nt-dock i { position: relative; width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(160deg, #5b5a66, #33323b); }
.nt-dock i:nth-child(1) { background: linear-gradient(160deg, #6bb6ff, #2f6fe0); } .nt-dock i:nth-child(2) { background: linear-gradient(160deg, #3a3940, #1a1a1f); }
.nt-dock .nt-dock-agent { background: linear-gradient(160deg, #9c8cff, #5a45d6); }
.nt-dock .nt-dock-agent::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff; }
.nt-dock i:nth-child(4) { background: linear-gradient(160deg, #ffd36b, #f08a3c); } .nt-dock i:nth-child(5) { background: linear-gradient(160deg, #7fe0b0, #2e9d6c); }

/* The tour's desk: the visitor's own document, and three agents' windows
   over it. The try-it mode keeps the agent's app above instead. */
.nt-world[data-mode="tour"] .nt-app, .nt-world[data-mode="universe"] .nt-doc, .nt-world[data-mode="universe"] .nt-terms { display: none; }
.nt-doc { position: absolute; inset: 78px 0 96px; margin: auto; z-index: 1; display: flex; flex-direction: column; width: min(760px, calc(100% - 64px)); height: min(480px, calc(100% - 200px));
  border-radius: 12px; overflow: hidden; background: #fbfaf7; color: #2b2933; box-shadow: 0 30px 80px rgb(0 0 0 / .45), 0 0 0 1px rgb(255 255 255 / .12); transition: filter .4s; }
.nt-doc[data-front="false"] { filter: brightness(.86) saturate(.85); }
.nt-doc-bar { position: relative; display: flex; align-items: center; flex-shrink: 0; height: 38px; padding: 0 12px; background: #eceae4; border-bottom: 1px solid #dedbd2; color: #6d6a75; font-size: 12.5px; font-weight: 600; }
.nt-doc-bar span { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.nt-doc[data-front="false"] .nt-lights i { background: #cfccc4; }
.nt-doc-page { flex: 1; min-height: 0; padding: 34px 56px; font-size: 15px; line-height: 1.6; }
.nt-doc-page h3 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: #16151a; }
.nt-doc-meta { margin: 2px 0 18px; color: #8b8892; font-size: 12.5px; }
.nt-doc-page > p:not(.nt-doc-meta) { margin: 0 0 18px; max-width: 56ch; }
.nt-doc-page h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: #16151a; }
.nt-doc-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.nt-doc-caret { display: inline-block; width: 2px; height: 18px; margin-left: 1px; vertical-align: -3px; background: #2b2933; animation: nt-blink 1s steps(1) infinite; }
.nt-doc[data-front="false"] .nt-doc-caret { visibility: hidden; }
.nt-terms { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.nt-term { position: absolute; left: calc(50% - 340px + var(--i) * 56px); top: calc(50% - 215px + var(--i) * 44px); width: min(520px, calc(100% - 180px)); height: 290px;
  display: flex; flex-direction: column; border-radius: 11px; overflow: hidden; background: rgb(22 21 27 / .97); box-shadow: 0 24px 60px rgb(0 0 0 / .5), 0 0 0 1px rgb(255 255 255 / .1); }
.nt-term[hidden] { display: none; }
.nt-term-bar { position: relative; display: flex; align-items: center; flex-shrink: 0; height: 30px; padding: 0 10px; background: #26252c; color: #a3a0b0; font: 600 11.5px ui-monospace, "SF Mono", Menlo, monospace; }
.nt-term-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.nt-term-bar .nt-lights { height: auto; padding: 0; } .nt-term-bar .nt-lights i { width: 10px; height: 10px; }
.nt-term:not(:last-child) .nt-lights i { background: #4a4852; }
.nt-term-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; color: #c9c6d4; }
.nt-term-prompt { margin: 0; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-term-out { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.nt-term-out p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .nt-term-out b { color: #fff; font-weight: 600; }
.nt-term-status { display: flex; align-items: center; gap: 8px; margin: 0; color: #b9abff; }
/* A terminal signed in to another machine: its name on the card's teal plate (MachineBadge). */
.nt-term-host { margin-right: 8px; padding: 1px 6px; border-radius: 4px; background: rgb(79 179 191 / .18); color: #6fd2dd; font-style: normal; font-weight: 600; }

/* The demo's notch, inside the pretend Mac: the run drives it, so it takes
   no pointer while the run plays; its own demo tools stay out of the way. */
.nt-on .nd[data-tour], .nt-on .nd[data-tour] * { pointer-events: none !important; }
.nt-on .nd-demo-tools, .nt-on .nd-bar-kinds { display: none !important; }
.nt-on .nd-nudge-label { visibility: hidden; }
.nt-world:focus { outline: none; }
.nt-on .nd-panel { max-height: calc(100dvh - 210px); }
.nt-on .nd-list { max-height: min(480px, calc(100dvh - 330px)); }

/* The pointer, and the ripple of its press. */
.nt-cursor { position: absolute; left: 0; top: 0; z-index: 95; width: 20px; height: 24px; margin: -2px 0 0 -3px; pointer-events: none; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .45)); }
.nt-cursor svg { width: 100%; height: 100%; fill: #fff; stroke: #111; stroke-width: 1.3; stroke-linejoin: round; }
.nt-cursor[hidden], .nt-tap[hidden] { display: none; }
.nt-tap { position: absolute; z-index: 94; width: 34px; height: 34px; border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; }

/* The run's caption and controls. */
.nt-hud { position: absolute; left: 50%; bottom: 66px; z-index: 96; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(640px, calc(100% - 32px)); transform: translateX(-50%); }
.nt-hud[hidden] { display: none; }
.nt-caption { margin: 0; display: flex; align-items: baseline; gap: 10px; padding: 10px 18px; border-radius: 16px; background: rgb(12 10 22 / .74);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); font-size: 16px; line-height: 1.35; text-align: center; text-wrap: balance; }
.nt-count { flex-shrink: 0; color: #a3a0b0; font-size: 12px; font-variant-numeric: tabular-nums; }
.nt-count:empty { display: none; }
.nt-bar { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 16px; background: rgb(12 10 22 / .6); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.nt-segments { display: flex; gap: 4px; margin-right: 4px; }
.nt-segments i { width: 22px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .22); transition: background-color .3s; }
.nt-segments i[data-state="done"] { background: rgb(255 255 255 / .75); } .nt-segments i[data-state="now"] { background: #b9abff; }
.nt-icon { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 15px; background: none; color: #f4f2f8; cursor: pointer; }
.nt-icon:hover { background: rgb(255 255 255 / .12); }
.nt-icon[hidden] { display: none; }
.nt-icon svg, .nt-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nt-icon[data-nt="pause"] svg path[d^="M5 3.2"], .nt-btn svg path[d^="M5 3.2"] { fill: currentColor; }
.nt-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: rgb(255 255 255 / .12); color: #f4f2f8;
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; cursor: pointer; white-space: nowrap; transition: background-color .15s; }
.nt-btn:hover { background: rgb(255 255 255 / .2); }
.nt-btn[hidden] { display: none; }
.nt-primary { background: #fff; color: #100f12; } .nt-primary:hover { background: #e9e6f2; }
.nt-next { background: #b9abff; color: #17104a; } .nt-next:hover { background: #cbc0ff; }

/* The end. */
.nt-end { position: absolute; left: 50%; top: 50%; z-index: 97; width: min(520px, calc(100% - 40px)); padding: 28px 28px 22px; border-radius: 22px; transform: translate(-50%, -50%);
  background: rgb(16 13 28 / .82); -webkit-backdrop-filter: blur(30px) saturate(1.3); backdrop-filter: blur(30px) saturate(1.3); box-shadow: 0 0 0 100vmax rgb(10 8 20 / .38), 0 30px 80px rgb(0 0 0 / .5), inset 0 0 0 1px rgb(255 255 255 / .12); text-align: center; }
.nt-end[hidden] { display: none; }
.nt-end h2 { margin: 0 0 8px; font: 600 28px/1.15 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; letter-spacing: -.02em; }
.nt-end > p { margin: 0 auto 18px; max-width: 40ch; color: #c9c6d4; font-size: 15px; text-wrap: balance; }
.nt-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nt-end .nt-end-also { margin: -4px 0 8px; color: #a3a0b0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nt-end-extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.nt-end-extras li { padding: 4px 11px; border-radius: 999px; background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); color: #e7e4ee; font-size: 12.5px; }
.nt-end .nt-end-mac { display: none; margin: 14px 0 0; color: #a3a0b0; font-size: 13px; }
.nt-end:has([data-nt="universe"][hidden]) .nt-end-mac { display: block; }

/* Try it yourself: what to try, and the way out. */
.nt-tasks { position: absolute; top: 58px; right: 18px; z-index: 96; width: 250px; padding: 14px 14px 12px; border-radius: 16px; background: rgb(16 13 28 / .78);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 20px 50px rgb(0 0 0 / .35), inset 0 0 0 1px rgb(255 255 255 / .12); }
.nt-tasks[hidden] { display: none; }
.nt-tasks-head { margin: 0 0 8px; font-weight: 700; font-size: 14px; }
.nt-tasks ul { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 7px; }
.nt-tasks li { display: flex; align-items: center; gap: 9px; color: #d9d6e2; }
.nt-tasks li::before { content: ''; width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .4); }
.nt-tasks li[data-done="true"] { color: #fff; }
.nt-tasks li[data-done="true"]::before { background: #6fd69c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.4 6.9 11l4.9-5.6' fill='none' stroke='%2305210f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: none; }

/* The phone's player: the same run, small, watched like a video, in the
   hero (homepage.css draws its slot only on a phone). The frame is the
   pretend Mac's screen in a dark bezel; the words under it are on the hero's
   landscape, in its cream type and frosted pills. */
.nt-player { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.nt-player-frame { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: #160f2e; flex-shrink: 0;
  box-shadow: 0 0 0 6px #0d0c10, 0 0 0 7px #ffffff1f, 0 30px 60px -24px #1b0f3acc; }
.nt-player-frame iframe { position: absolute; left: 0; top: 0; width: 900px; height: 900px; border: 0; transform-origin: 0 0; pointer-events: none; }
.nt-player-caption { margin: 8px 0 0; min-height: 2.8em; max-width: 34ch; color: #fffaf1;
  font: 500 16px/1.4 var(--font-ui, system-ui); letter-spacing: -.01em; text-align: center; text-wrap: balance; text-shadow: 0 1px 8px #47315c4d; }
.nt-player .nt-count { margin-right: 8px; color: #fffaf1bf; font-size: 12px; }
.nt-player .nt-segments i { background: #fffaf14d; }
.nt-player .nt-segments i[data-state="done"] { background: #fffaf1; } .nt-player .nt-segments i[data-state="now"] { background: #100f12; }
.nt-player-actions { display: flex; align-items: center; gap: 8px; }
.nt-player .nt-btn, .nt-player .nt-icon { background: rgb(255 255 255 / .42); -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .55); color: #100f12; }
.nt-player .nt-btn { font-family: var(--font-ui, system-ui); font-weight: 600; }
.nt-player .nt-icon { width: 34px; height: 34px; border-radius: 17px; }
.nt-player .nt-btn:hover, .nt-player .nt-icon:hover { background: rgb(255 255 255 / .66); }
.nt-player .nt-next { background: #100f12; color: #fff; box-shadow: none; } .nt-player .nt-next:hover { background: #2a2733; }
.nt-player :focus-visible { outline: 2px solid #fffaf3; outline-offset: 2px; }
.nt-player-note { margin: 0; max-width: 34ch; color: #302139; font-size: 14px; line-height: 1.5; text-align: center; text-wrap: balance; }
.nt-player-note[hidden] { display: none; }

/* An embedded copy (the phone's player): only the pretend Mac, at once. */
html.nt-embed body { background: #160f2e; }
html.nt-embed body > * { visibility: hidden; }
html.nt-embed .nt-world { visibility: visible; }
html.nt-embed .nt-hud, html.nt-embed .nt-end-actions { display: none; }

@media (max-width: 760px) {
  .nt-app { inset: 70px 0 150px; width: calc(100% - 24px); height: auto; }
  .nt-side, .nt-dock, .nt-menus span { display: none; }
  .nt-hud { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .nt-screen { transition: none; }
  .nt-spin, .nt-doc-caret { animation: none; }
}
