/* Widdash — one page. Light linen above, a workbench below. */

@font-face {
  font-family: "Lombard";
  src: url("fonts/Lombard-regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: "Lombard", var(--ui);
  --ui: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --prose: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: Menlo, Monaco, "SF Mono", Consolas, "Liberation Mono", monospace;

  --ink: #2b2b2e;
  --ink-soft: #5d5f66;
  --paper: #f3efe7;
  /* Behind sample widgets: a little darker than the card, with faint diagonal
     waves. The tile is 40px square and repeats without a visible seam. */
  --band: #ece8de url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cdefs%3E%3Cpattern id='p' width='28.2843' height='28.2843' patternUnits='userSpaceOnUse' patternTransform='rotate(45)'%3E%3Cpath d='M0 14.14C3.5 6 10.6 6 14.14 14.14S24.7 22.3 28.28 14.14' fill='none' stroke='rgb(110,90,60)' stroke-opacity='0.06' stroke-width='1.6'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='40' height='40' fill='url(%23p)'/%3E%3C/svg%3E");
  --card: #fffdfa;
  --line: rgba(60, 50, 35, 0.14);

  --blue: #2f6fc4;
  --blue-dark: #1d4f97;
  --amber: #e08a2e;

  --noise: url("images/noise.png");

  --balloon: rgba(253, 252, 249, 0.84);

  /* The desktop picture of the screen on the home page. */
  --wallpaper:
    radial-gradient(1100px 520px at 12% -8%, rgba(150, 205, 255, 0.55), transparent 62%),
    radial-gradient(900px 600px at 88% 8%, rgba(255, 186, 110, 0.32), transparent 60%),
    radial-gradient(800px 700px at 60% 110%, rgba(46, 216, 196, 0.32), transparent 62%),
    linear-gradient(170deg, #2b6096 0%, #1b3f6b 45%, #142740 100%);


  --shadow-card: 0 1px 2px rgba(40, 30, 15, 0.10), 0 10px 26px rgba(40, 30, 15, 0.10);
  --shadow-widget: 0 2px 4px rgba(0, 0, 0, 0.18), 0 14px 30px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

/* A hidden balloon can reach past the side of a narrow window, and would make
   the page scroll sideways, so the page is clipped at the sides. Not on the
   screen: Safari redraws a sticky element on every scroll step when something
   inside it clips, and not on .intro, which makes the whole page shake. */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--noise);
  background-size: 160px 160px;
  /* Hyphenate running text. This uses the page's lang attribute. */
  -webkit-hyphens: auto;
          hyphens: auto;
}

/* No hyphenation in headings, code or keys. */
h1, h2, h3, h4, h5, h6, code, pre, kbd, samp {
  -webkit-hyphens: manual;
          hyphens: manual;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; margin: 0 0 0.4em; }
h1 { font-size: 64px; letter-spacing: -0.03em; }
h2 { font-size: 34px; }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.88em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* Text for screen readers only. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  font: 600 16px/1 var(--ui);
  padding: 13px 22px;
  margin: 0 10px 10px 0;
  border-radius: 10px;
  text-decoration: none;
  color: #33363d;
  background-image: linear-gradient(#ffffff, #e8e9ec);
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.button:hover { background-image: linear-gradient(#ffffff, #dedfe4); }
.button:active, .button.pressed { background-image: linear-gradient(#dcdde1, #eceef1); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18); }

/* The same form as the plain button, in blue: a thin highlight along the top
   edge, a small shadow under it, and pressed in while held. */
.button.primary {
  color: #fff;
  background-image: linear-gradient(#6aa6ee, var(--blue));
  border-color: rgba(20, 55, 110, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.button.primary:hover { background-image: linear-gradient(#5b9bea, #2761b3); }
.button.primary:active, .button.primary.pressed {
  background-image: linear-gradient(#2761b3, #4a8ddf);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* ---------- the Mac screen: menu bar, desktop, and the dashboard over both ---
   The application lays a black backdrop at 40% over the whole screen frame
   while the dashboard is up, and the widgets stand on that. ---------- */

/* The screen holds still for a stretch of scrolling while its widgets come
   in, then scrolls away. It goes over the tab bar, which screen.js pushes up
   ahead of it. */
.screen-track {
  position: relative;
  z-index: 30;
  height: 220vh;
  /* The meter follows how far the track has scrolled: see .scroll-meter-fill. */
  view-timeline: --screen-run block;
}

.screen {
  position: sticky;
  top: 0;
  /* dvh follows the window as Safari's toolbars slide away, so the screen
     grows into the room they leave. */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Not clipped: a balloon may hang over the edge of the screen. The widgets
     themselves are held inside it by decor.js. */
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  /* Its own layer: see .hero-stage .w > img. */
  will-change: transform;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, var(--dim, 0));
  -webkit-backdrop-filter: blur(var(--blur, 0px)) saturate(1.2);
  backdrop-filter: blur(var(--blur, 0px)) saturate(1.2);
  pointer-events: none;
}

/* A thin bar down the right edge of the screen. It fills while the page scrolls
   and the screen holds still, and is full when the screen starts to move away. */
.scroll-meter {
  position: absolute;
  z-index: 3;   /* above the frost */
  top: 44px;
  bottom: 18px;
  right: 15px;
  width: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.scroll-meter-fill {
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform: scaleY(0);
  will-change: transform;
  transform-origin: top;
}

/* The fill follows the scroll in CSS, without a script. The range called
   "contain" is from when the track's top reaches the top of the window to when
   its bottom reaches the bottom of the window: the stretch where the screen
   holds still. Without support for this, screen.js sets the fill. */
@keyframes meter-fill { to { transform: scaleY(1); } }

@supports (animation-timeline: view()) {
  .scroll-meter-fill {
    animation: meter-fill linear both;
    animation-timeline: --screen-run;
    animation-range: contain 0% contain 100%;
  }
}

/* With scripts off, nothing fades or darkens the hero behind the screen, so
   the screen gets the same picture and darkening of its own. */
@media (scripting: none) {
  .screen { background: url("images/stage.png") center / cover no-repeat; }
  .screen::after { background: rgba(0, 0, 0, 0.4); }
}

.menubar {
  position: relative;
  z-index: 2;   /* above the frost */
  background-image: linear-gradient(#fbfbfb, #e6e6e6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 3px rgba(0, 0, 0, 0.12);
  font-size: 13.5px;
  color: #23242a;
}

.menubar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 26px;
  padding: 0 14px;
}

.mb-app { font-weight: 700; }
.mb-menu { color: #2c2d33; }

.mb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #33343a;
}
.mb-right svg { display: block; }
.mb-clock { font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */

/* The intro stays where it is, one window tall, while the screen slides up over
   it. The intro ends with the screen, so it leaves along with it. The tab bar
   copy (.tabs-under) comes after the intro, so it comes up under the screen as
   that scrolls away, then sticks to the top. */
/* The z-index gives the hero and the screen a stacking context of their own.
   Safari checks the whole stacking context of a stuck sticky element after
   every scroll step, and without this that is the whole page. */
.intro { position: relative; z-index: 30; }

.hero {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 100vh;
  /* dvh, like .screen: when Safari's toolbars slide away the window grows,
     and the hero must grow with it or the screen's blur shows a bare strip. */
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  text-align: center;
  background: url("images/stage.png") center / cover no-repeat;
  color: #e8ebf0;
}
/* On the home page the tab bar lies on the stage picture, without a bar of its own. */
.hero .tabs {
  position: static;
  background: none;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  border-bottom: 0;
  box-shadow: none;
}
.hero .tabs ul {
  border-color: rgba(15, 55, 140, 0.8);
  /* The gradient stops at the border. By default it runs under it, and at the
     rounded corners its light edge shows through the antialiased border. */
  background-clip: padding-box;
}
.hero-content {
  display: grid;
  justify-items: center;
}
/* The line boxes leave more room under the title's letters than under the
   lede's, so the margin is larger than under the title to look the same. */
.hero .lede { margin-bottom: 38px; color: #fffaf0; text-shadow: 0 1px 2px rgba(20, 35, 80, 0.6), 0 0 14px rgba(255, 236, 200, 0.35); }

/* The screen the widgets lie on: a menu bar across the page, and the page's
   own background under it. No dock. */

.desktop {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Padding, not a margin on the stage: a margin collapses through here and
     leaves a strip of page background under the menu bar. */
  padding: 22px 0 26px;
  /* The wallpaper is mixed brighter than it looks here: the backdrop above
     takes 40% of it back. */
  background: transparent;
}



.desktop-inner {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 28px;
}

/* The widgets take all the room the copy leaves, as large as fits. */
.stage-box {
  flex: 1;
  min-height: 0;
  container-type: size;
  display: grid;
  place-items: center;
}

/* The title, the lede and the button, centred in the stage. */
.hero-words {
  align-self: center;
  /* The bottom padding lifts the text off the chest in the picture. */
  padding: 0 20px 12vh;
  opacity: var(--hero-fade, 1);
}

.appicon {
  width: 96px; height: 96px;
  display: block;
  margin-bottom: 14px;
}

.funk {
  font-family: var(--brand);
}

.hero h1 {
  margin-bottom: 16px;
  font-family: var(--brand);
  font-weight: normal;
  font-size: clamp(64px, 14vw, 104px);
  letter-spacing: 0;
  /* Embossed gradient: text clipped to the gradient, edges from drop-shadows.
     Near-white with a faint warm and cool tint, and a soft glow. */
  background: linear-gradient(100deg, #fff4e3 0%, #ffffff 45%, #e4ecff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.08em;
  filter:
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.6))
    drop-shadow(0 2px 3px rgba(20, 35, 80, 0.55))
    drop-shadow(0 0 18px rgba(255, 236, 200, 0.55));
}

.lede {
  font-family: var(--ui);
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 14px;
  color: #23242a;
}

/* The copy lies on the desktop under the widgets, above the backdrop. */
.desktop-copy {
  position: relative;
  z-index: 2;
  max-width: 36em;
  margin: 16px auto 8px;
  font-size: 19px;
  line-height: 1.55;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.actions { margin: 32px 0 8px; }
.hero .actions { margin: 0; position: absolute; left: 0; right: 0; bottom: 4vh; }
.fineprint { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* the widgets lying on the desktop */

.stage, .hero-stage { position: relative; }

.hero-stage {
  position: relative;
  z-index: 2;            /* the widgets stand above the backdrop */
  /* All the room there is: decor.js lays the widgets out in an ellipse
     with the same proportions. */
  width: 100%;
  height: 100%;
}

.w {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: auto;
}

.w > img {
  display: block;
  width: 100%;
}

img.w,
.w > img {
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.22)) drop-shadow(0 16px 28px rgba(0, 0, 0, 0.3));
}

/* Moving and resizing, added by decor.js. */

/* Left out by decor.js on a phone held on its side. */
.hero-stage .w.left-out { display: none; }

.hero-stage .w {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.hero-stage .w > img { -webkit-user-drag: none; }

/* Each widget image on its own layer, as is the screen. Without these,
   Safari on the Mac shakes the sticky screen while scrolling. */
.hero-stage .w > img { will-change: transform, opacity; }

/* A phone gets the short version of the copy, and fewer widgets: decor.js
   leaves the hidden ones out of the arrangement. */
.copy-short { display: none; }
@media (max-width: 680px) {
  .copy-long { display: none; }
  .copy-short { display: inline; }
  .hero-stage .w.skip-on-phone { display: none; }
}
/* A phone on its side has the short copy as well, to leave room for widgets. */
@media (orientation: landscape) and (max-height: 500px) {
  .copy-long { display: none; }
  .copy-short { display: inline; }
}

/* --gx and --gy say where the widget's own drawing ends inside its image;
   decor.js measures them, and the mark straddles that corner. */
.grip {
  position: absolute;
  left: calc(var(--gx, 100%) - 9px);
  top: calc(var(--gy, 100%) - 9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.w.hot .grip,
.w.acting .grip { opacity: 1; }

/* What each widget is for, above it while the pointer is on it and while it
   is being moved. decor.js sets --note-shift so a note near the edge of
   the screen slides back into view, and adds .below when there is no room
   above the widget. */

.note {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(calc(-50% + var(--note-shift, 0px)));
  width: max-content;
  max-width: 250px;
  margin: 0;
  padding: 10px 16px;
  border-radius: 18px;
  background: var(--balloon);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  color: #23242a;
  font: 400 13.5px/1.35 var(--ui);
  text-align: center;
  text-wrap: balance;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 22px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  /* Not displayed while hidden: a hidden balloon still takes up room, and one
     that reaches past the side of a narrow window widens the page, so a phone
     can pan sideways. Clipping it instead makes Safari shake the sticky screen.
     Where display cannot be animated the balloon appears without the fade. */
  display: none;
  transition: opacity 0.15s ease, display 0.15s allow-discrete;
}

.note::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% - var(--note-shift, 0px));
  margin-left: -8px;
  border: 8px solid transparent;
  border-top-color: var(--balloon);
}

.w.below .note { bottom: auto; top: calc(100% + 14px); }
.w.below .note::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--balloon);
}

.w.hot .note,
.w.acting .note { display: block; opacity: 1; }

@starting-style {
  .w.hot .note,
  .w.acting .note { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .grip, .note { transition: none; }
}

/* ---------- the three panels ---------- */

.panels { max-width: 1180px; margin: 0 auto; padding: 60px 28px 10px; }

.section-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 34px;
}

.panels-intro { margin: 0 auto 48px; text-align: center; }
.panels-intro h2 { font-size: 40px; }
.panels-intro p { font-size: 20px; color: var(--ink-soft); margin: 0; }

.panel-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.panel {
  border-radius: 14px;
  padding: 18px 22px 24px;
  box-shadow: var(--shadow-card);
  background-color: var(--card);
  background-size: 160px 160px, auto;
}

.panel h3 { margin-top: 18px; }
.panel p {
  font-family: var(--prose);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0;
}

/* Each panel carries the background its widgets are shown on. */

.panel-day {
  color: #fff;
  background-image: var(--noise),
    radial-gradient(120% 90% at 20% 0%, #4a6f9c 0%, #2b4467 55%, #1c2e49 100%);
}
.panel-day p { color: #c3cfe0; }

.panel-board {
  color: #fff;
  background-image: var(--noise),
    radial-gradient(120% 100% at 30% 10%, #b07b42 0%, #9a6836 60%, #82542a 100%);
}
.panel-board p { color: #f0e2d2; }

.panel-classic {
  color: #23242a;
  background-image: var(--noise), linear-gradient(#e2ddd3, #cfc9bd);
}
.panel-classic p { color: #3c3d42; }

.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  isolation: isolate;        /* each panel stacks its own widgets */
  touch-action: pan-y;       /* they stay put, so the page still scrolls */
  -webkit-user-select: none;
  user-select: none;
}
.stage .w { isolation: isolate; }   /* keeps each pin with its own widget */
.stage .w > img { -webkit-user-drag: none; }

.stage .w > img {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.24));
  /* Its own layer, as in the hero: Safari then draws the filter once, not in
     tiles that can disagree with each other while scrolling. */
  will-change: transform;
  /* Swings from the pin, as the gallery widgets do (wiggle.js). */
  transform-origin: 50% calc(var(--pin-y, 6px) + var(--pin-offset, 0px));
}
.stage .pin { top: calc(var(--pin-y, 6px) + var(--pin-offset, 0px)); }

/* ---------- how it behaves ---------- */

.how { max-width: 1180px; margin: 0 auto; padding: 64px 28px 10px; }

.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.how-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.how-list h3 { font-size: 18px; margin: 14px 0 6px; }
.how-list p {
  font-family: var(--prose);
  font-size: 16px;
  color: #3c3d42;
  margin: 0;
}

.ico { width: 44px; height: 44px; display: block; }
.s-fill { fill: #cfe0f5; }
.s-fill2 { fill: #f6e0c2; }
.s-line { fill: none; stroke: #45536b; stroke-width: 2.2; }
.s-key { fill: #fff; stroke: #45536b; stroke-width: 2; }
.s-stroke { fill: none; stroke: #45536b; stroke-width: 3; stroke-linecap: round; }
.s-thin { stroke-width: 2.2; stroke-linejoin: round; }
.s-top { fill: #eaf2fc; }
.s-label { font: 700 12px/1 var(--sans, -apple-system, system-ui, sans-serif); fill: #45536b; }
.s-ghost { fill: none; stroke: #45536b; stroke-width: 2; stroke-dasharray: 3 3.5; stroke-linecap: round; opacity: .55; }
.s-cursor { fill: #fff; stroke: #45536b; stroke-width: 2; stroke-linejoin: round; }
.s-dot { fill: #45536b; }
.s-gloss { fill: #eaf2fc; }
.s-badge { fill: #f6e0c2; stroke: #45536b; stroke-width: 2.2; }
.s-badge-i { stroke: #45536b; }

/* ---------- get ---------- */

.get { max-width: 1180px; margin: 0 auto; padding: 56px 28px 80px; }

.get-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 32px;
  box-shadow: var(--shadow-card);
}
.get-card h2 { font-size: 27px; }
.get-card p {
  font-family: var(--prose);
  max-width: 44em;
  color: #3c3d42;
}
.downloads {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 8px;
}
.download { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
/* The line sits in the middle of the 64px gap: 32px, the card's side padding, on each side. */
.download + .download::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -32px;
  border-left: 1px solid var(--line);
}
/* On wide screens the intro is a band across the top of the card with a faint
   stripe pattern and a line under it. On mobile it is part of the card's own
   column. */
.get-intro { display: contents; }
@media (min-width: 681px) {
  .get-card { grid-template-columns: 1fr; gap: 0; }
  .get-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 26px;
    align-items: start;
    margin: -30px -32px 0;
    padding: 30px 32px;
    border-radius: 13px 13px 0 0;
    border-bottom: 1px solid var(--line);
    background-image: repeating-linear-gradient(135deg, rgba(60, 50, 35, 0.025) 0 4px, transparent 4px 8px);
  }
  .get-intro p:last-child { margin-bottom: 0; }
  .downloads { margin: 0; padding-top: 30px; }
}
.download .button.small { margin-top: auto; }
.download h3 { font-size: 20px; margin: 0 0 4px; }
.get-card .download p.version { margin: 0 0 12px; font-size: 15px; }
.button.small { font-size: 14px; padding: 9px 16px; margin: 0; }
.appicon.small { width: 84px; height: 84px; margin: 4px 0 0; flex: none; }

/* ---------- the widgets themselves ---------- */

/* A band of its own, a shade darker than the page it sits in. */
.widgets {
  padding: 58px 28px 66px;
  background-color: #e7e1d5;
  background-image: var(--noise);
  background-size: 160px 160px;
  border-top: 1px solid rgba(90, 75, 50, 0.16);
  border-bottom: 1px solid rgba(90, 75, 50, 0.16);
}

/* Cut into the band: the fill is clipped to the glyphs and the light falls
   behind them. */
.widgets .section-title {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 20px;
  background-color: #565656;
  color: transparent;
  text-shadow: 2px 2px 3px rgba(255, 255, 255, 0.5);
  -webkit-background-clip: text;
     -moz-background-clip: text;
          background-clip: text;
}

/* The share sheet, under the list. The screenshot carries its own space
   around it and is transparent, so it needs no card. */

.sharing {
  max-width: 1124px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 30px;
  align-items: center;
}

.sharing img {
  display: block;
  width: 100%;
  max-width: 580px;
  height: auto;
  justify-self: center;
}

.sharing h3 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 25px;
  margin: 0 0 10px;
  color: #2b2b2e;
}

.sharing p {
  font-family: var(--prose);
  font-size: 16.5px;
  line-height: 1.55;
  color: #4b4d55;
  margin: 0 0 0.8em;
  max-width: 32em;
}
.sharing p:last-child { margin-bottom: 0; }

/* ---------- everything for the people who make the widgets ---------- */

.maker {
  color: #dde3ec;
  background-color: #1b2129;
  background-image:
    var(--noise),
    linear-gradient(transparent 31px, rgba(140, 170, 210, 0.07) 32px),
    linear-gradient(90deg, transparent 31px, rgba(140, 170, 210, 0.07) 32px);
  background-size: 160px 160px, 32px 32px, 32px 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 14px 30px rgba(0, 0, 0, 0.45);
}

.maker-inner { max-width: 1180px; margin: 0 auto; padding: 72px 28px 80px; }

.maker-head { max-width: 780px; margin-bottom: 44px; }
.maker-head h2 { font-size: 40px; color: #fff; }
.maker-lede {
  font-family: var(--prose);
  font-size: 21px;
  line-height: 1.5;
  color: #c6d0dd;
}
.maker-lede code { background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 5px; }

.maker-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: start;
  margin-bottom: 56px;
}
.maker-grid.second { grid-template-columns: 1fr 1.05fr; margin-top: 0; margin-bottom: 100px; }
.maker-api .api { margin: 0; }

.maker-grid.boxed {
  border: 1px solid #fff;
  border-radius: 16px;
  padding: 26px 28px;
  align-items: center;
  margin-top: 70px;
  margin-bottom: 110px;
}
.maker-copy p:last-child { margin-bottom: 0; }
/* Like the pictures above, the terminal sticks out of the box. */
.maker-grid.second .terminal {
  margin: -40px 0;
  width: 90%;
  justify-self: end;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}
.maker-grid.second .terminal pre { flex: 1; }

.maker-copy h3 { color: #fff; font-size: 20px; margin-top: 26px; }
.maker-copy h3:first-child { margin-top: 0; }
.maker-copy p {
  font-family: var(--prose);
  font-size: 17px;
  line-height: 1.62;
  color: #bcc6d4;
}
.maker-copy code { color: #ffd39a; }
.maker-copy a,
.maker-copy a:visited {
  color: #8cc2ff;
  text-decoration: underline;
  text-decoration-color: rgba(140, 194, 255, 0.45);
  text-underline-offset: 2px;
}
.maker-copy a:hover { color: #fff; text-decoration-color: currentColor; }

.maker-shot {
  /* Two windows that overlap: the simulator at the top right, behind the
     Widget Construction Kit window at the bottom left. Both pictures have a
     transparent margin and a shadow of their own. Sizes are percentages of the
     column width. The negative margins above and below make the figure stick
     out of the bordered box around the text. */
  position: relative;
  aspect-ratio: 1 / 0.98;
  margin: -12% 0;
}
.maker-shot img {
  position: absolute;
  height: auto;
}
.maker-shot .shot-back { top: 0; right: 0; width: 66%; }
.maker-shot .shot-front { bottom: -4%; left: 0; width: 60%; }

.terminal {
  margin: 0;
  /* As a grid item it would otherwise grow to its longest line; this way the
     lines scroll inside it. */
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #11161c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 22px 44px rgba(0, 0, 0, 0.45);
}
.terminal figcaption {
  font: 600 13px/1 var(--ui);
  color: #aab4c2;
  padding: 11px 14px;
  background: linear-gradient(#3a424d, #2b323b);
  border-bottom: 1px solid #000;
}
.dot {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.dot.r { background: #ec6a5e; }
.dot.y { background: #f4bf4f; }
.dot.g { background: #61c554; margin-right: 12px; }

.terminal pre {
  margin: 0;
  padding: 18px 16px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: #d5dde8;
}
.terminal .c { color: #61c554; }
.terminal .e { color: #ec6a5e; }

.api {
  list-style: none;
  margin: 0 0 1.1em;
  padding: 0;
}
.api li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.api li:last-child { border-bottom: 0; }
.api code { color: #ffd39a; font-size: 13.5px; }
.api span {
  font-family: var(--prose);
  font-size: 15px;
  color: #93a0b2;
}

footer {
  background: #141920;
  color: #7d8896;
  padding: 26px 28px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
footer p {
  max-width: 1180px;
  margin: 0 auto;
  font-size: 14px;
  text-align: center;
}
footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
footer a:hover {
  color: #b3bdc9;
}

/* ---------- narrower ---------- */

@media (max-width: 1000px) {
  h1 { font-size: 52px; }
  .lede { font-size: 26px; }
  .panel-row { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .how-list { grid-template-columns: repeat(2, 1fr); }
  .maker-grid, .maker-grid.second { grid-template-columns: 1fr; gap: 30px; }
  .maker-shot { margin: 0; max-width: 560px; }
  .sharing { grid-template-columns: 1fr; gap: 18px; }
  .sharing p { max-width: none; }
  .maker-grid.second .terminal { order: 2; margin: 0; width: auto; justify-self: stretch; align-self: auto; }
}

/* Around iPad portrait: each panel has its widgets on the left and the text on
   the right, and the panels are as wide as the boxes below them. */
@media (min-width: 681px) and (max-width: 1000px) {
  .panel-row { max-width: none; margin: 0; gap: 22px; }
  .panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 28px;
    align-items: start;
  }
  .panel .stage { grid-column: 1; grid-row: 1 / -1; }
  .panel h3 { grid-column: 2; grid-row: 2; margin: 0 0 8px; align-self: end; }
  .panel p { grid-column: 2; grid-row: 3; }
}

/* A phone held upright: the title goes from margin to margin. Lombard sets
   "Décor" 3.02 em wide, so the size is the room between the 20px margins
   divided by that, then scaled to 94.5%. */
@media (max-width: 680px) and (orientation: portrait) {
  .hero h1 {
    font-size: calc((100vw - 40px) / 3.02 * 0.945);
    padding: 0;
  }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .lede { font-size: 22px; }
  /* The tagline breaks after the comma. */
  .hero .lede span { display: block; }
  .desktop-copy { font-size: 17px; }
  .panels { padding: 30px 20px 10px; }
  .panels-intro { margin-bottom: 32px; }
  .panels-intro h2 { font-size: 30px; }
  .panels-intro p { font-size: 18px; }
  .menubar-inner { gap: 13px; font-size: 12.5px; }
  .mb-menu { display: none; }
  .how, .get, .widgets, .maker-inner { padding-left: 20px; padding-right: 20px; }
  .how-list { grid-template-columns: 1fr; }
  .get-card { display: flex; flex-direction: column; gap: 14px; }
  /* Lines above each block, 30px (the card's top and bottom padding) from the
     content on either side. The card gap adds 14px above the first block. */
  .downloads { grid-template-columns: 1fr; gap: 60px; margin-top: 46px; }
  .get-intro p:last-child { margin-bottom: 0; }
  .get-card .appicon.small { margin-bottom: 16px; }
  .download { position: relative; }
  .download::before,
  .download + .download::before {
    content: "";
    position: absolute;
    top: -30px;
    bottom: auto;
    left: 0;
    right: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .maker-head h2 { font-size: 31px; }
  .maker-lede { font-size: 18.5px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- tabs across the top of every page ---------- */

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background-image: linear-gradient(rgba(250, 247, 241, 0.94), rgba(236, 231, 221, 0.94));
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(60, 50, 35, 0.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 1px 4px rgba(40, 30, 15, 0.06);
}

.tabs-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  justify-content: safe center;
  /* On a narrow screen the tabs scroll sideways instead of being cut off. */
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }

/* One segmented control, the way a Mac window toolbar draws it. */
.tabs ul {
  flex: none;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  background-image: linear-gradient(#ffffff, #eceef1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.tabs li + li { border-left: 1px solid rgba(0, 0, 0, 0.16); }
/* All tabs have the same width. The home tab is longer and sizes itself. */
.tabs li { width: 92px; }
.tabs li:first-child { width: auto; }
.tabs li:first-child a { padding-left: 20px; padding-right: 20px; }

.tabs a {
  display: block;
  padding: 7px 0;
  text-align: center;
  font: 600 14px/1.2 var(--ui);
  color: #3a3c43;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a[href="index.html"] { font-family: var(--brand); font-weight: normal; }
.tabs a:hover { background: rgba(0, 0, 0, 0.04); }

/* The tabs sit in a box that clips what is drawn outside them, so the focus
   ring is drawn inside each tab. The current tab is blue (and, on the home
   page, orange to purple), so it gets a ring that stands out from those: a
   dark ring with a white one around it. */
.tabs a:focus-visible {
  outline: 2px solid #14284a;
  outline-offset: -4px;
}
.tabs a[aria-current="page"]:focus-visible {
  outline: 2px solid #fff;
  box-shadow: inset 0 0 0 4px #14284a;
  outline-offset: -4px;
}

.tabs a:active, .tabs a.pressed { background: linear-gradient(#dcdde1, #eceef1); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.14); }

.tabs a[aria-current="page"] {
  color: #fff;
  background-image: linear-gradient(#6aa6ee, var(--blue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.tabs a[aria-current="page"]:active,
.tabs a[aria-current="page"].pressed {
  background-image: linear-gradient(#2761b3, #4a8ddf);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}
/* On the home page the Widdash tab takes the colours of the heading. */
.tabs a[href="index.html"][aria-current="page"] {
  background-image: linear-gradient(100deg, #e7a86a 0%, #d97a8f 45%, #8f7fd0 100%);
  text-shadow: 0 1px 1px rgba(80, 30, 40, 0.3);
}
.tabs a[href="index.html"][aria-current="page"]:active,
.tabs a[href="index.html"][aria-current="page"].pressed {
  background-image: linear-gradient(100deg, #c98c52 0%, #bb6177 45%, #7566b6 100%);
}

/* ---------- the head of a page other than the first ---------- */

.page-head {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 28px 34px;
  text-align: left;
}
.page-head h1 { font-size: 46px; margin-bottom: 12px; }
.page-head p {
  max-width: 40em;
  margin: 0;
  font-family: var(--prose);
  font-size: 18px;
  color: #4b4d55;
}

/* On the first page the widget list is replaced by a pointer to it. */

/* ---------- the manual ---------- */

.manual {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 80px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  /* The box clips what is drawn outside it, so it has room around the links
     for their focus ring. The negative margin keeps the links in place. */
  padding: 4px;
  margin: 0 -4px;
  font-size: 14.5px;
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }

/* A chapter's own headings, under its name. manual.js shows only those of the
   chapter being read; without it they are all shown. */
.toc ol ol { margin: 1px 0 6px 12px; font-size: 13.5px; }
.toc ol ol a { padding: 2px 10px; color: #5b5d65; }
.toc.collapsing ol ol { display: none; }
.toc.collapsing li.open > ol { display: block; }
.toc li.open > a:not(:only-child) { font-weight: 600; }
.toc li.toc-group {
  margin: 14px 0 4px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  /*letter-spacing: 0.06em;*/
  /*text-transform: uppercase;*/
  color: #000;
}
.toc li.toc-group:first-child { margin-top: 0; }
.toc a {
  display: block;
  padding: 4px 10px;
  border-radius: 6px;
  color: #3f4148;
  text-decoration: none;
}
.toc a:hover { background: rgba(60, 50, 35, 0.07); }

/* The chapter being read, set by manual.js. */
.toc a[aria-current="true"] {
  color: #fff;
  background-image: linear-gradient(#6aa6ee, var(--blue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Each chapter is a card of its own. */
.doc section {
  --pad-x: 52px;
  --pad-b: 30px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 34px var(--pad-x) var(--pad-b);
  scroll-margin-top: 70px;
}
.doc section + section { margin-top: 26px; }
.doc section > :last-child { margin-bottom: 0; }
.doc h2 { font-size: 28px; margin-bottom: 14px; }
.doc h3 { font-size: 18px; margin: 26px 0 6px; }

.doc p, .doc li, .doc td {
  font-family: var(--prose);
  font-size: 17px;
  line-height: 1.6;
  color: #34363c;
}
.doc p, .doc ul, .doc ol { max-width: 38em; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.35em; }
.doc strong { font-weight: 600; color: #2b2b2e; }
.doc a { color: var(--blue-dark); }

.doc .tip {
  max-width: 38em;
  background: #f4efe3;
  border: 1px solid rgba(120, 95, 50, 0.18);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 16px;
}

.doc figure { margin: 18px 0 22px; }
.doc figure img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.doc figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.menubar-shot img {
  width: 430px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.menubar-shot .gauge-arrow {
  padding-left: 24px;
  position: relative;
  top: -0.15em;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  font: 600 0.8em/1.5 var(--ui);
  text-align: center;
  color: #33363d;
  background-image: linear-gradient(#ffffff, #eceef1);
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}
.doc code {
  background: #f1ede5;
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-word;
}

.doc dt code { background: none; padding: 0; font-weight: 600; }
.doc dd { margin-bottom: 1.1em; }
.doc dd:last-child { margin-bottom: 0; }

.doc pre {
  max-width: 100%;
  margin: 10px 0 18px;
  padding: 12px 16px;
  overflow-x: auto;
  background: #f4f1ea;
  border: 1px solid rgba(120, 95, 50, 0.14);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #2f3136;
}
.doc pre code { background: none; padding: 0; font-size: 1em; word-break: normal; }
.doc li pre { margin: 10px 0 6px; }
/* Code between paragraphs is a band across the card, like the samples. */
.doc section > pre {
  max-width: none;
  margin: 18px calc(-1 * var(--pad-x));
  padding: 14px var(--pad-x);
  background: #f3f1ec;
  border: 0;
  border-radius: 0;
}
.doc section > pre:last-child {
  margin-bottom: calc(-1 * var(--pad-b));
  border-radius: 0 0 14px 14px;
}
.doc li > p:has(+ pre) { margin-bottom: 0; }

.doc table {
  border-collapse: collapse;
  margin: 8px 0 18px;
  width: 100%;
  max-width: 38em;
}
.doc td {
  padding: 7px 12px 7px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-size: 16px;
}
.doc td:first-child { white-space: nowrap; width: 1%; padding-right: 22px; }
/* A table whose first column holds more than a word or two. */
.doc table.wrap td:first-child { white-space: normal; width: 36%; }
/* The functions a part of the Widget API provides, and the key each needs. */
.doc table.calls { max-width: none; }
.doc table.calls th {
  padding: 0 12px 6px 0;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: var(--ink-soft);
}
.doc table.calls td:last-child { white-space: nowrap; }
.doc h4 { font-size: 16px; margin: 20px 0 4px; }

@media (max-width: 1000px) {
  .manual { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; max-height: none; overflow: visible; }
  .toc ol { columns: 2; }
  .toc ol ol, .toc.collapsing li.open > ol { display: none; }
  .toc li.open > a:not(:only-child) { font-weight: inherit; }
  .toc a[aria-current="true"] { color: #3f4148; background-image: none; box-shadow: none; }
}

@media (max-width: 680px) {
  .tabs-inner { padding: 8px 12px; }
  .tabs a { padding: 6px 0; font-size: 13px; }
  .tabs li, .tabs li:first-child { width: 72px; }
  .tabs li:first-child a { padding-left: 0; padding-right: 0; }
  /* The home tab is just the name on a phone. */
  .nav-long { display: none; }
  .page-head { padding: 36px 16px 24px; }
  .gallery { padding-left: 16px; padding-right: 16px; }
  .page-head h1 { font-size: 36px; }
  .manual { padding: 0 16px 60px; }
  .doc section { --pad-x: 20px; --pad-b: 22px; padding: 24px var(--pad-x) var(--pad-b); }
  .toc ol { columns: 1; }
  .doc td:first-child { white-space: normal; padding-right: 12px; }
  /* The function, what it does and its key, each on a line of its own. */
  .doc table.calls thead { display: none; }
  .doc table.calls tr { display: block; padding: 7px 0; border-top: 1px solid var(--line); }
  .doc table.calls td { display: block; width: auto; padding: 0; border: 0; white-space: normal; }
  .doc table.calls td:first-child { overflow-wrap: anywhere; }
  .doc table.calls td:last-child { padding-top: 2px; font-size: 14px; }
}

/* A sample widget with a link to download it: a band across the card, in the
   style of the notices about classic widgets. */
.doc .sample {
  clear: both;
  display: flex; align-items: center; gap: 24px;
  margin: 22px calc(-1 * var(--pad-x));
  /* The content is as wide as a paragraph (38em of 17px text) and starts at its left edge. */
  font-size: 17px;
  padding: 16px max(var(--pad-x), calc(100% + var(--pad-x) - 38em)) 16px var(--pad-x);
  background: var(--band);
}
/* At the end of a card the band runs down to the card's edge, so the card's
   bottom padding does not leave a gap under it. */
.doc section > .sample:last-child {
  margin-bottom: calc(-1 * var(--pad-b));
  border-radius: 0 0 14px 14px;
}
.doc .sample img { width: 190px; flex: none; border-radius: 0; }
.doc .sample figcaption p { font-size: 15px; line-height: 1.45; color: #45474e; margin: 0; }
.doc .sample figcaption a { white-space: nowrap; }

/* In "Many kinds of widgets" the pictures stay beside the text, at 60% of the
   default size and without a box. */
#kinds .sample {
  float: right; display: block; width: 210px; margin: 4px 0 16px 28px; padding: 0;
  background: none; text-align: center;
}
#kinds .sample img { width: 140px; margin: 0 auto; }
#kinds .sample figcaption p { font-size: 14px; margin: 0 0 10px; }
.doc h3 { clear: both; }
@media (max-width: 680px) {
  .doc .sample { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
  .doc .sample img { margin: 0 auto; }
  /* On a phone these pictures get the same band as the other samples. */
  #kinds .sample {
    float: none; width: auto; text-align: center;
    margin: 22px calc(-1 * var(--pad-x)); padding: 16px var(--pad-x);
    background: var(--band);
  }
  #kinds .sample figcaption p { margin: 0; }
}

/* The Simulator window, at half its pixel size. */
.sim-shot img { width: 440px; border-radius: 0; }

/* The share sheet beside a widget, on a white ground of its own. */
.share-shot { text-align: center; }
.share-shot img { width: 392px; margin: 0 auto; border-radius: 0; }

/* The screenshot carries its own shadow and transparent margin. */
.prompt-shot img { width: 546px; max-width: 100%; margin: 0 auto; border-radius: 0; }

/* Anchors land under the sticky tabs rather than behind them. */
main > section[id] { scroll-margin-top: 60px; }
.doc h3[id], .doc h4[id], .doc p[id] { scroll-margin-top: 70px; }

/* A note on where Widdash differs from Dashboard, or on an old feature a new
   widget should not use. */
.doc .upgrade {
  clear: both;
  margin: 22px calc(-1 * var(--pad-x)) 22px;
  padding: 16px var(--pad-x) 8px;
  background: #eef3fa;
}
/* At the end of a chapter the box runs to the card's bottom edge. */
.doc section > .upgrade:last-child {
  margin-bottom: calc(-1 * var(--pad-b));
  padding-bottom: 14px;
  border-radius: 0 0 14px 14px;
}
.doc .upgrade p, .doc .upgrade li, .doc .upgrade td { font-size: 17px; }
.doc .upgrade p { margin: 0 0 0.7em; }
.doc .upgrade ul { margin-bottom: 0.8em; }
.doc .upgrade table { margin: 4px 0 12px; }
.doc .upgrade td { border-top-color: rgba(47, 111, 196, 0.18); }
.doc .upgrade code { background: rgba(47, 111, 196, 0.1); }
.doc .upgrade dt code { background: none; padding: 0; font-weight: 600; }
.doc .upgrade .upgrade-label {
  margin: 0 0 10px;
  font: 600 15px/1.4 var(--ui);
  color: var(--blue-dark);
}

/* A notice box holding more than one paragraph. */
.doc .notice { margin: 22px 0 0; padding: 14px 18px 4px; }
.doc .notice p { font-size: 16px; margin: 0 0 0.7em; }
.doc .notice { scroll-margin-top: 70px; }

/* ---------- the widget gallery ---------- */

.gallery { max-width: 1180px; margin: 0 auto; padding: 0 28px 56px; }

.gallery-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 48px;
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.card-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* Level with the top of the name beside it, below its line spacing. */
  padding-top: 4px;
}

.card-stage img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(40, 30, 15, 0.25));
  transform-origin: 50% calc(10px + var(--pin-offset, 0px));
  -webkit-user-drag: none;
  /* Sideways swipes are flicks for wiggle.js; vertical ones still scroll. */
  touch-action: pan-y;
  -webkit-touch-callout: none;
  /* Above the text beside it while it swings: the list items are positioned
     for their bullets, and would otherwise be drawn over it. */
  position: relative;
  z-index: 1;
}

/* The widget and the pin it hangs from. The pin stays put while the widget
   swings about it, so it is not part of the picture. It sits 10px from the
   top, matching PIVOT in wiggle.js and the transform origin above. A widget
   whose picture has empty space along its top sets --pin-offset on its
   .hang to move the pin down that far. */
.hang {
  position: relative;
  display: block;
  width: 100%;
  max-width: 250px;
}

.pin {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(10px + var(--pin-offset, 0px));
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a8a 0, #e0402c 38%, #9e1f12 100%);
  box-shadow:
    inset 0 -1px 1px rgba(0, 0, 0, 0.25),
    2px 3px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.card-words { padding: 0; }
.card-words h2 { font-size: 24px; margin: 0 0 8px; }
.card-words p {
  font-family: var(--prose);
  font-size: 16px;
  line-height: 1.5;
  color: #3f4148;
  margin: 0 0 10px;
}
.card-words ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.card-words li {
  position: relative;
  padding: 0 0 0 22px;
  font-size: 14.5px;
  line-height: 1.4;
  color: #3a3c43;
}
.card-words li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-image: linear-gradient(#6aa6ee, var(--blue));
}

@media (max-width: 1000px) {
  .gallery-list { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .gallery { padding: 0 16px 40px; }
  .card { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hang { max-width: 220px; }
}

.page-head + .gallery { padding-top: 22px; }
