/* usespaces.app: black and white, with the greys between them. The window and the dashboards beside it are drawn at
   a fixed design size (the stage, 1600 by 900, or the window alone, 1100, on a phone) and scaled to the screen by
   --s; everything else is fluid. The first page's parts come first, then what the other pages add. */
:root {
  /* --muted and --faint are the two greys of text: both read at 4.5 to 1 or better on every ground they stand on. */
  --hi: #111113; --hi-soft: #a6a6ad;
  --paper: #fff; --ink: #111113; --muted: #4f4f56; --faint: #6b6b73; --line: #00000012; --panel: #f6f6f5;
  --card: #f4f4f3; --card-line: #0000000f; --ok: #1f9d55; --bad: #d93b3b; --accent: var(--hi);
  --c1: #111113; --c2: #6b6b73; --c3: #a6a6ad; --c4: #cfcfd4; --c5: #e4e4e8;
  --lift: 0 0 0 .5px #0000001a, 0 1px 2px #0000000d, 0 12px 32px -16px #0000002e;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.ic { flex: none; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; white-space: nowrap; transition: transform .2s, background .2s, box-shadow .2s; }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 1px 2px #00000026, 0 8px 20px -10px #00000066; }
.btn.primary:hover, .btn.light:hover { transform: translateY(-1px); }
.btn.light { background: #fff; color: var(--ink); }
.btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px #ffffff73; }
.btn.ghost:hover { background: #ffffff14; }

/* ---------------------------------------------------------------- hero */
/* The hero is the icon at the size of the page: the pavement and the painted circle, in a dark tile. The tile has no
   lit edge as the icon has: on a white page a bright rim is a grey line round it. */
.hero { position: relative; overflow: hidden; margin: 10px; padding-top: clamp(84px, 10vh, 108px); border-radius: clamp(22px, 2.6vw, 36px);
  background: #0f0f11; color: #fff; isolation: isolate; }
.ground { position: absolute; display: block; pointer-events: none; }
.stage-in > .ground { left: -1600px; top: -1765px; }
.hero h1 { font-size: clamp(48px, min(6.4vw, 9vh), 84px); line-height: .95; font-weight: 700; letter-spacing: -.05em; }
.hero p { max-width: 720px; margin: 16px auto 0; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; color: #ffffffbf; }
.hero p.fine { margin-top: 12px; font-size: 13px; color: #ffffff80; }
.hero p.fine a { color: #ffffffcc; text-decoration: underline; text-underline-offset: 2px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* --s is the room there is over the width the stage is drawn at: (100vw - 40px) / 1600px, which a script in the head
   works out as --fit (build.py). The steps below are for a page without it: never trig in CSS, which some iPhones'
   WebKit gets wrong (it drew the stage upside down). */
.stage { --s: var(--fit, 1); position: relative; height: calc(1000px * var(--s)); margin-top: calc(20px * var(--s)); }
.stage-in { position: absolute; z-index: 2; top: 0; left: 50%; width: 1600px; height: 900px; margin-left: -800px;
  transform: scale(var(--s)); transform-origin: 50% 0; }
.win-wrap { position: absolute; left: 250px; top: 84px; width: 1100px; height: 760px; }

/* ---------------------------------------------------------------- the window, as the app draws it */
.window { position: relative; display: flex; height: 100%; border-radius: 16px; background: #f1f1ef; color: var(--ink);
  box-shadow: 0 0 0 .5px #00000026, 0 50px 100px -40px #0000008c, 0 12px 30px -14px #00000040; overflow: hidden; font-size: 14px; line-height: 1.45; }
.window .side { width: 236px; flex: none; padding: 0 8px 10px; display: flex; flex-direction: column; overflow: hidden; }
.window .lights { display: flex; align-items: center; gap: 8px; height: 44px; padding-left: 8px; }
.window .lights i { width: 12px; height: 12px; border-radius: 50%; display: block; background: #ff5f57; }
.window .lights i:nth-child(2) { background: #febc2e; } .window .lights i:nth-child(3) { background: #28c840; }
.window .plt { margin-left: 12px; color: var(--muted); }
.window .row { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; white-space: nowrap; }
.window .row .ic { color: var(--muted); }
.window .row .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.window .row.sel { background: #ffffffd9; box-shadow: 0 0 0 .5px #0000001a, 0 1px 2px #00000014; }
.window .row.sel .ic { color: var(--ink); }
.window .newchat { background: #ffffffb3; box-shadow: 0 0 0 .5px #0000001a; }
.window .kbd { color: var(--faint); font-size: 12px; }
.window .label { padding: 18px 12px 6px; font-size: 12px; color: var(--faint); }
.window .tree { display: flex; flex-direction: column; gap: 2px; }
.window .tr { position: relative; }
.window .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.window .dot.ask { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.window .vline, .window .elbow, .window .down { position: absolute; pointer-events: none; }
.window .vline { top: -2px; bottom: -2px; border-left: 1.5px solid #c9c9cc; }
.window .elbow { top: -2px; height: 18px; width: 12px; border-left: 1.5px solid #c9c9cc; border-bottom: 1.5px solid #c9c9cc; border-bottom-left-radius: 5px; }
.window .down { top: 24px; bottom: -2px; border-left: 1.5px solid #c9c9cc; }
.window .grow { flex: 1; }
.window .sheet { position: relative; flex: 1; min-width: 0; margin: 8px 8px 8px 0; border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 .5px #0000001a, 0 2px 10px #0000000f; padding: 46px 40px 0; overflow: hidden; }
.what { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.what b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.what i { font-style: normal; color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn { display: flex; justify-content: space-between; margin-bottom: 5px; }
.big { display: flex; align-items: baseline; gap: 6px; font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 10px; }
.big small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.cbar { fill: #1111131a; } .cbar.hot { fill: var(--hi); }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 600;
  background: var(--ink); color: #fff; }
.logo { flex: none; }

/* ---------------------------------------------------------------- sections */
.band { padding: 104px 0 40px; }
.band.black { background: var(--ink); color: #fff; padding-bottom: 112px; }
.band.black .sub { color: #ffffff99; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.title { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; font-weight: 700; letter-spacing: -.04em; text-wrap: balance; }
.center { text-align: center; }
.sub { color: var(--muted); font-size: 16px; max-width: 520px; }
.sub.center { margin: 18px auto 0; }
@keyframes sc-fill { to { transform: scaleX(1); } }
.sc-art.on :is(.bline, .cfield):nth-child(2) { animation-delay: .12s; }
.sc-art.on :is(.bline, .hrow):nth-child(3) { animation-delay: .24s; }
.sc-art.on :is(.bline, .hrow):nth-child(4) { animation-delay: .36s; }
@keyframes sc-in { to { opacity: 1; transform: none; } }

.split-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 44px; }
.split-head .title { flex: 1 1 auto; max-width: 720px; }
.split-head .sub { max-width: 400px; flex: none; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cline { fill: none; stroke: var(--hi); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.cline-area { fill: #1111130f; } .cline-dot { fill: var(--hi); }
.ring { stroke: var(--hi); } .ring-track { stroke: #00000012; }
.todo { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.todo.done { color: var(--faint); text-decoration: line-through; text-decoration-color: #00000033; }
.box { width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #00000026; display: grid; place-items: center; flex: none; }
.box .ic { stroke-width: 3; }
.tr-tiles { display: block; width: 100%; height: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* questions */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 40px; align-items: start; }
.qa details { border-top: 1px solid #00000014; }
.qa details:last-child { border-bottom: 1px solid #00000014; }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer;
  list-style: none; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ic { color: var(--faint); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.qa details[open] summary .ic { transform: rotate(45deg); }
.qa summary:focus-visible, .btn:focus-visible, .more:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.qa p a, .answers p a, .text a { text-decoration: underline; text-decoration-color: #00000040; text-underline-offset: 3px; color: var(--ink); }
.qa p { max-width: 620px; padding: 0 0 22px; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* ---------------------------------------------------------------- the other pages */
/* A page opens with the same dark tile, shorter: its heading on the pavement and the circle's far side under it. */
.hero.page { padding: 150px 24px 0; }
/* The ground keeps its own height at the foot of the tile, so the circle's edge is as far under the words on a phone
   as on a wide screen: three tenths of that height up, and the words stop a little above it. */
.hero.page > .ground { z-index: -1; left: 0; bottom: 0; width: 100%; height: clamp(420px, 44vw, 700px); }
.page-head { position: relative; max-width: 820px; margin: 0 auto; text-align: center;
  padding-bottom: max(clamp(150px, 13.2vw + 24px, 234px), 7.6vw); }
.hero.page h1 { font-size: clamp(42px, 6.2vw, 80px); line-height: 1; text-wrap: balance; }
.hero.page p { text-wrap: balance; }
.hero.page p { max-width: 640px; }

.band.tight { padding-top: 40px; }
.title.small { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.06; letter-spacing: -.035em; }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--ink);
  padding-bottom: 2px; box-shadow: inset 0 -1.5px 0 #00000026; transition: box-shadow .2s, gap .2s; }
.more:hover { box-shadow: inset 0 -1.5px 0 var(--ink); gap: 9px; }
.after { margin-top: 32px; text-align: center; } .after.left { text-align: left; margin-top: 24px; }
.text p { max-width: 540px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.text p + p { margin-top: 12px; }
.facts code, .text code, .leaves code { font: 12.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.facts code, .text code, .leaves code { padding: 2px 6px; border-radius: 6px; background: #0000000a; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.cline.before { stroke: #1111134d; stroke-width: 1.5; stroke-dasharray: 4 4; }
.ln { width: 16px; border-top: 2.5px solid var(--ink); } .ln.before { border-top: 1.5px dashed #11111380; }

/* your data, questions, download: a heading on the left and what it heads on the right, row after row */
.rows > .two { padding: 56px 0; border-top: 1px solid var(--line); }
.rows > .two:first-child { border-top: 0; }
.facts { list-style: none; padding: 0; }
.facts li, .facts a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.facts li { padding: 16px 0; border-top: 1px solid #00000014; font-size: 16px; line-height: 1.5; }
.facts li:last-child { border-bottom: 1px solid #00000014; }
.facts b { font-weight: 600; } .facts span { color: var(--muted); }
.links-list { max-width: 820px; margin: 0 auto; } .facts.links-list li { display: block; } .links-list a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.leaves { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.leaves th { text-align: left; font-weight: 400; font-size: 13px; color: var(--faint); padding: 0 16px 10px 0; }
.leaves td { vertical-align: top; padding: 16px 16px 16px 0; border-top: 1px solid #00000014; color: var(--muted); }
.leaves td:first-child { width: 42%; color: var(--ink); } .leaves td:last-child { padding-right: 0; }
.answers article { padding: 22px 0; border-top: 1px solid #00000014; scroll-margin-top: 24px; }
.answers article:first-child { padding-top: 0; border-top: 0; }
.answers h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.answers p { max-width: 620px; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* ---------------------------------------------------------------- motion */
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.stage:not(.turned) .stage-in > .persona.on { opacity: 0; animation: enter 1.2s cubic-bezier(.2, .7, .2, 1) .2s forwards; }
.stage-in > .persona { --from: 0px 90px; }
@keyframes enter { from { opacity: 0; translate: var(--from); } to { opacity: 1; translate: 0 0; } }
/* The circle is painted when the page opens: its mask is a line along the ring, drawn from the left over the far side. */
#hero-ground .paint { animation: paint 1.9s .1s cubic-bezier(.35, .1, .2, 1) both; }
@keyframes paint { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .stage-in > .persona { animation: none; opacity: 1; transform: none; }
  #hero-ground .paint { animation: none; }
}

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 980px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .split-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .rows > .two { padding: 40px 0; }
}
/* Without the head's script: the scale at the narrow end of each band, so the stage always fits. */
@media (max-width: 1640px) { .stage { --s: var(--fit, .875); } }
@media (max-width: 1440px) { .stage { --s: var(--fit, .75); } }
@media (max-width: 1240px) { .stage { --s: var(--fit, .625); } }
@media (max-width: 1040px) { .stage { --s: var(--fit, .5); } }
@media (max-width: 840px) { .stage { --s: var(--fit, .45); } }
@media (max-width: 760px) {
  .stage { --s: var(--fit, .53); }
  .stage-in { width: 1100px; margin-left: -550px; }
  .stage-in > .ground { left: -1850px; }
@media (max-width: 600px) { .stage { --s: var(--fit, .42); } }
@media (max-width: 480px) { .stage { --s: var(--fit, .34); } }
@media (max-width: 400px) { .stage { --s: var(--fit, .3); } }
}
@media (max-width: 620px) {
  br.wide { display: none; }
  .band { padding-top: 64px; }
  .qa summary { font-size: 16px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 96px; margin: 6px; }
  .hero.page { padding: 112px 20px 0; }
  .facts li, .facts a { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  /* The table of what leaves the Mac becomes one block a row, each cell under the name of its column. */
  .leaves thead { display: none; }
  .leaves tr { display: block; padding: 16px 0; border-top: 1px solid #00000014; }
  .leaves td { display: block; width: auto !important; padding: 0 0 10px; border: 0; }
  .leaves td::before { content: attr(data-th); display: block; font-size: 12px; color: var(--faint); }
  .stage { margin-top: 44px; }
}

