/* CLAUDE 10-04: the notification center (notifications.js). Dark surfaces from DESIGN-SYSTEM.md. The panel has no
   primary action, so its buttons are quiet; green marks only the unread dot and the keyboard focus ring. */
.top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* CLAUDE 10-06: the one-time "We updated our Terms and Privacy Policy" notice (app-account.js policyNotice) */
.policy-notice {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(640px, calc(100vw - 32px));
  padding: 12px 14px 12px 16px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-overlay);
  box-shadow: var(--e-2);
  transform: translateX(-50%);
  font-size: var(--t-body);
  line-height: 1.45;
  color: var(--c-fg-2);
}
.policy-notice p {
  margin: 0;
  flex: 1;
}
.policy-notice a {
  color: var(--c-fg);
  text-decoration: underline;
}
.policy-notice button {
  flex: none;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-primary);
  color: var(--c-primary-ink);
  font-size: var(--t-body);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
/* CLAUDE 10-05: Upgrade + the plans dropdown (pricing.js), for signed-in accounts */
.upgrade {
  position: relative;
  display: none;
  letter-spacing: 0; /* .workspace-top spaces its letters */
}
/* narrow top bar: the arrow alone; pricing.js stretches the menu across the screen */
@media (max-width: 820px) {
  .upgrade-btn {
    padding: 0 9px;
  }
  .upgrade-btn span {
    display: none;
  }
}
body.signed-in .upgrade {
  display: block;
}
.upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--c-fg);
  font-size: var(--t-body);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition:
    var(--m-hover),
    scale var(--d-release) var(--ease-spring);
}
/* CLAUDE 10-12 Graphite: a quiet ghost in the top bar; the plans dropdown carries the pitch */
.upgrade-btn:hover,
.upgrade-btn[aria-expanded='true'] {
  background: var(--c-raised);
}
.upgrade-btn:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
.upgrade-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* CLAUDE 10-16 (owner, iPhone: "this whole upgrade screen is meh"): the plan sheet (pricing.js). A bottom sheet on a
   phone, a popover under the button on a computer. Pick a plan (Pro is the recommended one), then one button whose
   words say what happens. Graphite: no box unless it means something, so the only rings are the chosen plan's. */
.upg-scrim {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.upg-scrim.is-open {
  opacity: 1;
}
.upg-scrim[hidden] {
  display: none;
}
@media (min-width: 768px) {
  .upg-scrim {
    display: none; /* the popover needs no dimming */
  }
}
.upgrade-menu {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  width: min(360px, 100vw - 16px);
  max-height: min(640px, 100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--c-overlay);
  box-shadow: var(--e-float);
  outline: 0;
  /* CLAUDE 10-18 (design polish B2, P6): a popover scales in from its trigger (the button's top right corner), 180 ms
     ease-out, and leaves in 110 ms; the shift and the scale are 0 / 1 under reduced motion, so it only fades */
  opacity: 0;
  translate: 0 calc(var(--shift-sm) * -1);
  scale: var(--pop);
  transform-origin: top right;
  transition:
    opacity var(--d-ui) var(--ease-out),
    translate var(--d-ui) var(--ease-out),
    scale var(--d-ui) var(--ease-out);
}
.upgrade-menu.is-open {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}
.upgrade-menu.is-leaving {
  transition-duration: 110ms;
}
.upgrade-menu[hidden] {
  display: none;
}
.upg-grab {
  touch-action: none;
}
.upg-handle {
  display: none;
}
.upg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.upg-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.upg-x {
  display: grid;
  place-items: center;
  width: var(--h-touch);
  height: var(--h-touch);
  margin: calc(var(--s-3) * -1) calc(var(--s-3) * -1) calc(var(--s-3) * -1) 0;
  padding: 0;
  border-radius: 50%;
  color: var(--c-fg-2);
}
.upg-x svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.upg-now {
  margin: calc(var(--s-3) * -1) 0 0;
  color: var(--c-fg-3);
  font-size: var(--t-label);
}
.upg-cards {
  display: grid;
  gap: var(--s-2);
}
.upg-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: var(--s-3);
  min-height: 64px;
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--c-line-strong);
  cursor: pointer;
  transition:
    box-shadow var(--d-ui) var(--ease-out),
    background-color var(--d-ui) var(--ease-out),
    opacity var(--d-ui) var(--ease-out),
    scale var(--d-release) var(--ease-spring);
}
/* CLAUDE 10-20 (the plan picker, planpick.css): the plans not picked step back a little */
.upg-card:not(.is-pick) {
  opacity: 0.78;
}
.upg-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.upg-card:has(input:focus-visible) {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
.upg-card.is-pick {
  background: var(--c-raised);
  box-shadow: inset 0 0 0 1.5px var(--c-fg);
}
.upg-radio {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--c-fg-3);
  transition: box-shadow var(--d-ui) var(--ease-out);
}
/* CLAUDE 10-20: picked = a filled circle with a tick (the check of planpick.css), not a dot */
.upg-card.is-pick .upg-radio {
  box-shadow: inset 0 0 0 20px var(--c-fg);
}
.upg-radio::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3.5px;
  width: 4.5px;
  height: 9px;
  border: solid var(--c-primary-ink);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  opacity: 0;
  scale: 0.6;
  transition:
    opacity var(--d-ui) ease,
    scale var(--d-ui) var(--ease-spring);
}
.upg-card.is-pick .upg-radio::after {
  opacity: 1;
  scale: 1;
}
.upg-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.upg-name {
  color: var(--c-fg);
  font-size: 15px;
  font-weight: 600;
}
.upg-name em {
  margin-left: var(--s-1);
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--c-fg);
  color: var(--c-primary-ink);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.01em;
  vertical-align: 1px;
}
.upg-card:not(.is-rec) .upg-name em {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--c-line-strong);
  color: var(--c-fg-2);
}
.upg-meta {
  color: var(--c-fg-3);
  font-size: var(--t-label);
}
.upg-price {
  color: var(--c-fg);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.upg-price small {
  color: var(--c-fg-3);
  font-size: var(--t-label);
  font-weight: 400;
}
.upg-dyn {
  display: grid;
  gap: var(--s-3);
}
.upg-feat {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  padding: 0 var(--s-1);
  list-style: none;
  color: var(--c-fg-2);
  font-size: var(--t-body);
}
.upg-feat li {
  position: relative;
  padding-left: 24px;
}
.upg-feat li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.35em;
  width: 5px;
  height: 9px;
  border: solid var(--c-fg);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.upg-cta {
  min-height: 48px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
}
.upg-cta:disabled {
  opacity: 0.45;
  cursor: default;
}
.upg-fine {
  min-height: 1.4em;
  margin: calc(var(--s-1) * -1) 0 0;
  color: var(--c-fg-3);
  font-size: var(--t-label);
  line-height: 1.4;
  text-align: center;
}
.upg-fine:empty {
  display: none;
}
.upgrade-menu .upg-link {
  display: block;
  min-height: var(--h-touch);
  margin: calc(var(--s-2) * -1) 0 0;
  padding: 0;
  color: var(--c-fg-2);
  font-size: var(--t-body);
  text-decoration: underline;
  text-decoration-color: var(--c-line-strong);
  text-underline-offset: 4px;
}
.upgrade-menu .upg-link:hover {
  color: var(--c-fg);
}
@media (hover: hover) {
  .upg-card:not(.is-pick):hover {
    background: var(--c-raised);
    opacity: 1;
  }
}
.upg-card:active {
  scale: var(--press-lg);
  transition-duration: var(--d-ui), var(--d-ui), 100ms; /* down quickly, back on the spring */
}
/* a phone: a bottom sheet with a handle; it slides up, and a drag on the handle or the title takes it back down */
@media (max-width: 767.98px) {
  body.upg-open #home {
    overflow: hidden; /* iOS scrolls the page behind a modal otherwise */
  }
  .upgrade-menu {
    top: auto !important;
    right: 0 !important;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: 90dvh;
    padding: var(--s-2) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    background: var(--c-surface);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    opacity: 1;
    translate: none; /* the popover's own shift and scale above are for a computer; a sheet moves by transform */
    scale: none;
    transform: translateY(100%);
    transform-origin: bottom;
    transition: transform 320ms var(--ease-sheet);
  }
  .upgrade-menu.is-open {
    transform: none;
  }
  .upgrade-menu.is-leaving {
    transition-duration: 220ms;
  }
  .upg-handle {
    display: block;
    width: 40px;
    height: 5px;
    margin: var(--s-1) auto var(--s-2);
    border-radius: 3px;
    background: var(--c-fg-3);
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .upgrade-menu,
  .upg-scrim {
    transition: opacity 120ms linear;
  }
  .upgrade-menu,
  .upgrade-menu.is-open {
    transform: none;
  }
}
.notes-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-fg-2);
  transition:
    var(--m-hover),
    scale var(--d-release) var(--ease-spring);
}
.notes-bell[hidden] {
  display: none;
}
.notes-bell:hover,
.notes-bell[aria-expanded='true'] {
  color: var(--c-fg);
  background: var(--c-raised);
}
.notes-bell svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notes-bell:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
.notes-badge {
  position: absolute;
  top: 2px;
  left: 19px; /* on the bell's shoulder, clear of its dome */
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  border: 2px solid var(--c-canvas);
  background: var(--c-danger);
  color: var(--c-primary-ink);
  font-size: var(--t-meta);
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.notes-badge[hidden] {
  display: none;
}
/* the count changing pops the badge once (notifications.js adds .pop and takes it off when it has played) */
.notes-badge.pop {
  animation: notes-badge-pop var(--d-release) var(--ease-spring);
}
@keyframes notes-badge-pop {
  from {
    scale: 0.6;
    opacity: 0;
  }
}
/* the editor header's chip is 12 px text; the bell keeps its own size there */
.account-chip .notes-bell {
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0; /* CLAUDE 10-11: editor-chrome.css `header .header-actions button` padding pushed the bell 5.5 px right */
}

.notes-panel {
  position: fixed;
  z-index: 60; /* above the toast (50) */
  width: 384px;
  max-height: min(560px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  background: var(--c-overlay);
  color: var(--c-fg);
  border: 0;
  border-radius: var(--r-md);
  box-shadow: var(--e-2);
  overflow: hidden;
  letter-spacing: 0;
  /* CLAUDE 10-18 (design polish B2, P6): a popover from the bell, not from the middle: it scales in from its top
     right corner in 180 ms and leaves in 110 ms (display flips at the end of the exit: allow-discrete) */
  transform-origin: top right;
  opacity: 1;
  scale: 1;
  transition:
    opacity var(--d-ui) var(--ease-out),
    scale var(--d-ui) var(--ease-out),
    display var(--d-ui) allow-discrete;
}
.notes-panel[hidden] {
  display: none;
  opacity: 0;
  scale: var(--pop);
  transition-duration: 110ms;
}
@starting-style {
  .notes-panel:not([hidden]) {
    opacity: 0;
    scale: var(--pop);
  }
}
@media (prefers-reduced-motion: reduce) {
  .notes-panel {
    transition:
      opacity var(--d-ui) ease,
      display var(--d-ui) allow-discrete;
  }
  .notes-badge.pop {
    animation: m-fade var(--d-ui) ease;
  }
}
.notes-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 10px 12px 16px;
  border-bottom: 1px solid var(--c-line);
}
.notes-head h2 {
  margin: 0 auto 0 0;
  font-size: var(--t-title);
  font-weight: 600;
  outline: none;
}
.notes-head button {
  min-height: var(--h-md);
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-fg-2);
  font-size: var(--t-label);
  font-weight: 500;
}
.notes-head button:hover:not(:disabled) {
  background: var(--c-raised);
  color: var(--c-fg);
}
.notes-head button:disabled {
  color: var(--c-fg-3);
  opacity: 0.6;
  cursor: default;
}
.notes-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--c-line-strong) transparent;
}
.notes-list section + section {
  border-top: 1px solid var(--c-line);
}
/* Today / Earlier: plain words, no tracked capitals (plan 4.2) */
.notes-list h3 {
  margin: 0;
  padding: 12px 16px 4px;
  font-size: var(--t-label);
  font-weight: 500;
  color: var(--c-fg-3);
}
.notes-list ul {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}
.note {
  position: relative;
  display: flex;
  align-items: stretch;
}
.note-open {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 8px;
  gap: 12px;
  align-items: start;
  padding: 10px 44px 10px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background-color var(--d-hover) ease;
}
.note-open:hover,
.note-open:focus-visible {
  background: var(--c-raised);
}
.note-open:focus-visible,
.note-x:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: -3px;
}
.note-ic {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--c-raised);
  color: var(--c-fg-2);
}
.note-ic svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.note[data-kind='failed'] .note-ic {
  color: var(--c-danger);
  background: rgba(255, 107, 107, 0.1);
}
.note[data-kind='account'] .note-ic {
  color: var(--c-warn);
  background: rgba(245, 196, 81, 0.1);
}
.note-txt {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.note-txt b {
  font-size: var(--t-body);
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-fg-2);
  overflow-wrap: anywhere;
}
.note.unread .note-txt b {
  color: var(--c-fg);
}
.note-txt span {
  font-size: var(--t-label);
  line-height: 1.45;
  color: var(--c-fg-2);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-txt time {
  margin-top: 2px;
  font-size: var(--t-meta);
  color: var(--c-fg-3);
  font-variant-numeric: tabular-nums;
}
.note-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--c-fg);
}
.note-x {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-fg-3);
}
.note-x:hover {
  background: var(--c-raised);
  color: var(--c-fg);
}
.note-x svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.notes-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 40px 32px 44px;
  text-align: center;
}
.notes-empty svg {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  fill: none;
  stroke: var(--c-fg-3);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notes-empty p {
  margin: 0;
  font-size: var(--t-title);
  font-weight: 600;
}
.notes-empty small {
  max-width: 30ch;
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--c-fg-3);
}
.notes-panel .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* phones: full width under the header, 16 px gutters */
@media (max-width: 600px) {
  .notes-panel {
    left: 16px;
    right: 16px !important;
    width: auto;
  }
}
/* the top bar fits the switcher and the bell at 375 px: the breadcrumb (the page name, also marked in the menu) goes */
@media (max-width: 480px) {
  .workspace-top #crumb {
    display: none;
  }
}
