/* The notifications the AI sums up in one: the notification centre of a work app on a black page. The panel is dark
   with two slow colour fields under its glass, a fine grain and an edge that catches the pointer's light; the
   notifications are glass rows. Summarize runs a violet and aqua light around the panel (a conic gradient masked to
   the 1px border), then the rows pile into the first and the summary card opens from it. */
:root {
  --page: #000000;          /* the page */
  --panel: #0c0c11;         /* the body of the panel */
  --edge: rgba(255, 255, 255, 0.08); /* the edges at rest */
  --glass: rgba(255, 255, 255, 0.045); /* the glass of a notification */
  --ink: #f1f1f4;           /* the words */
  --muted: #8d8d9a;         /* the small words */
  --violet: #9d8cff;        /* the first colour of the AI light */
  --aqua: #6fe3d4;          /* the second colour of the AI light */
  --button: #f3f3f5;        /* the light button */
  --button-ink: #0b0b0f;    /* the words on it */
}
* {
  box-sizing: border-box;
}
html {
  touch-action: manipulation;
}
html,
body {
  margin: 0;
  overflow-x: clip;
}
body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- the panel */
.inbox {
  --mx: 18%;
  --my: -10%;
  --gap: clamp(5px, 1.4vh, 8px);
  position: relative;
  width: min(90vw, 348px);
  padding: clamp(10px, 2.6vh, 14px);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 40%),
    var(--panel);
  box-shadow:
    inset 0 0 0 1px var(--edge),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 1px 1px rgba(0, 0, 0, 0.6),
    0 18px 40px -18px rgba(0, 0, 0, 0.9),
    0 40px 90px -40px color-mix(in srgb, var(--violet) 35%, transparent);
  isolation: isolate;
  opacity: 0;
}
/* two slow colour fields under the glass: without them the glass would have nothing to blur */
.inbox__aura {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.inbox__blob {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.32;
}
.inbox__blob--a {
  left: -22%;
  top: 8%;
  background: radial-gradient(closest-side, var(--violet), transparent);
}
.inbox__blob--b {
  right: -26%;
  bottom: -18%;
  background: radial-gradient(closest-side, var(--aqua), transparent);
  opacity: 0.2;
}
.inbox__grain {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* the border that catches light: the pointer's (glint) and the AI's (beam), both masked to the 1px edge */
.inbox__glint,
.inbox__beam {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.inbox__glint {
  background: radial-gradient(160px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.42), transparent 70%);
}
.inbox__beam {
  --a: 0deg;
  padding: 1.2px;
  opacity: 0;
  background: conic-gradient(from var(--a), transparent 0deg, transparent 200deg, color-mix(in srgb, var(--violet) 60%, transparent) 260deg, var(--violet) 300deg, #ffffff 326deg, var(--aqua) 340deg, transparent 360deg);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--violet) 70%, transparent));
}

/* ---------------------------------------------------------------- the bar */
.inbox__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: clamp(30px, 8vh, 34px);
  margin: 0 2px clamp(8px, 2vh, 12px) 4px;
}
.inbox__title {
  margin: 0;
  font-size: 14px;
  font-weight: 620;
  font-variation-settings: 'wdth' 104;
  letter-spacing: 0.005em;
}
.inbox__count {
  display: inline-block;
  height: 18px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 6px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-variant-numeric: tabular-nums;
}
.inbox__count-roll {
  display: flex;
  flex-direction: column;
}
.inbox__clear {
  margin-left: auto;
  padding: 6px 4px;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s;
}
.inbox__clear:focus-visible,
.sum:focus-visible,
.digest__reply:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* the Summarize button: a dark glass pill with the spark; its width follows the word it shows */
.sum {
  position: relative;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
}
.sum__face {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 12px 0 9px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 16px -8px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.sum__spark {
  flex: none;
  width: 15px;
  height: 15px;
}
.sum__words {
  position: relative;
  display: block;
  height: 16px;
  font-size: 12.5px;
  font-weight: 560;
  line-height: 16px;
  white-space: nowrap;
}
.sum__word {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}
.sum__word.is-on {
  opacity: 1;
}
/* while it reads, the word shimmers */
.sum__word--shine {
  background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 35%, #ffffff 50%, var(--muted) 65%, var(--muted) 100%) 0 0 / 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 1.3s linear infinite;
}
@keyframes shine {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

/* ---------------------------------------------------------------- the notifications */
.inbox__list {
  position: relative;
}
.slot {
  margin-bottom: var(--gap);
}
.slot:last-of-type {
  margin-bottom: 0;
}
.note {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: clamp(52px, 13vh, 64px);
  padding: 0 12px 0 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), var(--glass));
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 10px 24px -14px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  transform-origin: 50% 0;
}
/* the light that reads a notification: a soft band that crosses it once */
.note__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--violet) 22%, transparent) 42%, rgba(255, 255, 255, 0.16) 50%, color-mix(in srgb, var(--aqua) 18%, transparent) 58%, transparent 80%);
  transform: translateX(-110%);
  opacity: 0;
}
.app {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(30px, 7.6vh, 34px);
  aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(160deg, #24242e, #131319);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 10px -4px rgba(0, 0, 0, 0.8);
}
.app svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app--violet svg {
  stroke: var(--violet);
}
.app--aqua svg {
  stroke: var(--aqua);
}
.note__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.note__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
}
.note__app {
  font-weight: 560;
  letter-spacing: 0.01em;
}
.note__time {
  font-variant-numeric: tabular-nums;
}
.note__title,
.note__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note__title {
  font-size: 13px;
  font-weight: 600;
  font-variation-settings: 'wdth' 102;
}
.note__text {
  font-size: 12px;
  color: #b4b4c0;
}

/* ---------------------------------------------------------------- the summary */
.digest {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: clamp(11px, 2.8vh, 15px) 14px clamp(11px, 2.6vh, 14px);
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--aqua) 10%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 22px 40px -22px rgba(0, 0, 0, 0.95),
    0 18px 50px -26px color-mix(in srgb, var(--violet) 55%, transparent);
  visibility: hidden;
  opacity: 0;
}
/* a hairline of the two colours along the top edge */
.digest__edge {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet) 30%, #ffffff 50%, var(--aqua) 70%, transparent);
  opacity: 0.8;
}
.digest__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.digest__spark {
  width: 15px;
  height: 15px;
  flex: none;
}
.digest__name {
  font-weight: 620;
  font-variation-settings: 'wdth' 104;
}
.digest__meta {
  color: var(--muted);
}
.digest__apps {
  display: flex;
  gap: 3px;
  margin-left: auto;
}
.mini {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  background: linear-gradient(160deg, #2a2a35, #15151b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
}
.mini {
  display: grid;
  place-items: center;
}
.mini svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--violet);
}
.mini--aqua svg {
  stroke: var(--aqua);
}
.digest__text {
  margin: clamp(7px, 1.8vh, 10px) 0 0;
  font-size: clamp(12.5px, 3.4vh, 13.5px);
  line-height: 1.5;
  color: #d9d9e0;
  text-wrap: pretty;
}
.digest__text em {
  font-style: normal;
  font-weight: 600;
  color: #ffffff;
}
.digest__text em .w {
  background: linear-gradient(90deg, var(--violet), var(--aqua));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.w {
  display: inline-block;
  will-change: transform, filter, opacity;
}
.digest__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(8px, 2vh, 12px);
  padding-top: clamp(8px, 2vh, 11px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.digest__from {
  min-width: 0;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.digest__reply {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px 0 11px;
  border: 0;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--button-ink);
  background: var(--button);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 6px 14px -8px rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.digest__reply svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .inbox__clear:hover {
    color: var(--ink);
  }
  .sum:hover .sum__face {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sum__word--shine {
    animation: none;
    color: var(--ink);
    background: none;
  }
}
