@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --teal-700: #198892;
  --teal-600: #21abb5;
  --teal-500: #21abb5;
  --teal-100: #def5f7;
  --teal-050: #f2ffff;
  --ink-900: #020817;
  --ink-800: #1f2937;
  --ink-700: #0f082b;
  --ink-500: #606060;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --white: #ffffff;
  --shadow: 0 24px 64px rgb(2 8 23 / 22%);
  --radius-lg: 8px;
  --radius-md: 8px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink-900);
  font-family: var(--font);
  background: #f7fafc;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
  background: #f9fbfc;
}

.app-sidebar {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 24px 14px 18px;
  border-right: 1px solid #dfe7ec;
  background: var(--white);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--white);
  font-size: 15px;
  background: var(--teal-600);
  box-shadow: 0 8px 20px rgb(33 171 181 / 28%);
}

.sidebar-search {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-500);
  background: #f7f9fb;
}

.project-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.project-row {
  display: grid;
  gap: 5px;
  padding: 14px 12px;
  border-radius: 8px;
  color: var(--ink-700);
  background: #f3f6f8;
}

.project-row span {
  font-size: 12px;
  color: var(--ink-500);
}

.project-row--active {
  background: #eef2f4;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  margin-top: auto;
  font-size: 14px;
  color: var(--ink-700);
}

.sidebar-nav span {
  padding: 10px 12px;
  border-radius: 7px;
}

.sidebar-nav__active {
  color: var(--teal-700);
  background: var(--teal-100);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  background: #238895;
}

.workspace {
  min-width: 0;
  padding: 30px 34px;
}

.workspace-header h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.workspace-tabs {
  display: flex;
  gap: 28px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-500);
}

.workspace-tab--active {
  color: var(--teal-700);
  font-weight: 700;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 24px;
  margin-top: 34px;
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.listing-card__media {
  position: relative;
  min-height: 210px;
  background-color: #35554a;
  background-image:
    linear-gradient(180deg, transparent 54%, rgb(0 0 0 / 48%)),
    radial-gradient(circle at 50% 55%, #d5a56a 0 7%, transparent 8%),
    linear-gradient(150deg, #72967c 0 42%, #3c574b 43% 52%, #bd9872 53% 64%, #526c54 65%);
}

.listing-card__media--two {
  filter: saturate(0.9) hue-rotate(8deg);
}

.listing-card__media--three {
  filter: saturate(1.15) hue-rotate(-12deg);
}

.play-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 11px;
  background: rgb(0 0 0 / 52%);
}

.listing-card footer {
  display: flex;
  justify-content: space-between;
  padding: 13px 14px;
  color: var(--ink-500);
  font-size: 12px;
}

.backdrop {
  position: fixed;
  z-index: 10;
  inset: 0;
  background: rgb(255 255 255 / 80%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cancel-modal {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(1180px, calc(100vw - 40px));
  height: auto;
  max-height: calc(100vh - 32px);
  grid-template-columns: minmax(340px, 360px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgb(229 231 235 / 88%);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.loss-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 32px 30px;
  overflow-y: auto;
  background: var(--teal-050);
  border-right: 1px solid var(--teal-100);
}

.loss-rail h2 {
  margin: 0;
  color: var(--teal-700);
  font-weight: 600;
}

.loss-rail h2 {
  font-size: 16px;
}

.library-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding: 18px 16px;
  border: 1px solid rgb(33 171 181 / 28%);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 8px 30px rgb(16 24 40 / 8%);
}

.metric-row {
  display: grid;
  grid-template-columns: 26px auto;
  align-items: baseline;
  gap: 2px 7px;
  color: var(--ink-700);
}

.metric-row > span:last-child {
  grid-column: 2;
}

.metric-row strong {
  color: var(--ink-900);
  font-size: 22px;
  line-height: 1;
}

.metric-row span:last-child {
  font-size: 14px;
}

.metric-icon {
  align-self: center;
  width: 26px;
  height: 26px;
  color: var(--teal-600);
}

.metric-icon svg,
.benefit-icon svg,
.close-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loss-copy {
  display: grid;
  gap: 4px;
  margin: 15px 0 0;
  color: var(--ink-500);
  font-size: 14px;
  line-height: 1.5;
}

.loss-copy__line {
  display: block;
}

.offer-pane {
  position: relative;
  display: flex;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  overflow-y: auto;
}

.button,
.close-button {
  cursor: pointer;
}

.button {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
}

.button:hover {
  transform: scale(1.02);
}

.button:focus-visible,
.close-button:focus-visible {
  outline: 3px solid rgb(33 171 181 / 28%);
  outline-offset: 3px;
}

.close-button {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 5px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink-500);
  background: var(--teal-050);
}

.offer-content {
  width: min(660px, calc(100% - 72px));
  margin: 32px auto;
}

.offer-content h1 {
  margin: 0;
  color: var(--ink-800);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.offer-content h1:focus {
  outline: 0;
}

.offer-description {
  max-width: 580px;
  margin: 8px 0 0;
  color: var(--ink-500);
  font-size: 14px;
  line-height: 1.5;
}

.offer-card {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid rgb(33 171 181 / 18%);
  border-radius: var(--radius-md);
  background: var(--teal-100);
}

.offer-card__label {
  margin: 0;
  color: var(--ink-800);
  font-size: 14px;
  font-weight: 600;
}

.discount-amount {
  margin-top: 10px;
  color: var(--ink-900);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.reason-form {
  margin-top: 28px;
}

.reason-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reason-option {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-800);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.reason-option:hover {
  border-color: rgb(33 171 181 / 55%);
  background: var(--teal-050);
}

.reason-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.reason-option__control {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
}

.reason-option__control::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-600);
  content: "";
  transform: scale(0);
  transition: transform 160ms ease;
}

.reason-option:has(input:checked) {
  border-color: var(--teal-600);
  background: var(--teal-050);
  box-shadow: 0 0 0 1px var(--teal-600);
}

.reason-option:has(input:checked) .reason-option__control {
  border-color: var(--teal-600);
}

.reason-option:has(input:checked) .reason-option__control::after {
  transform: scale(1);
}

.reason-option:has(input:focus-visible) {
  outline: 3px solid rgb(33 171 181 / 28%);
  outline-offset: 3px;
}

.reason-detail {
  margin-top: 22px;
}

.reason-detail label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-800);
  font-size: 14px;
  font-weight: 600;
}

.reason-detail textarea {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-900);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.reason-detail textarea::placeholder {
  color: #9ca3af;
}

.reason-detail textarea:focus {
  border-color: var(--teal-600);
  outline: 3px solid rgb(33 171 181 / 18%);
}

.reason-count {
  display: block;
  margin-top: 6px;
  color: var(--ink-500);
  text-align: right;
  font-size: 12px;
}

.decision-row {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}

.content-actions {
  margin-top: 32px;
}

.content-actions--inline {
  margin-top: 18px;
}

.button--accept {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  color: var(--white);
  font-size: 14px;
  background: var(--teal-600);
  box-shadow: 0 14px 28px rgb(33 171 181 / 32%);
}

.button--accept:hover {
  background: rgb(33 171 181 / 90%);
  box-shadow: 0 16px 34px rgb(33 171 181 / 38%);
}

.button--keep {
  color: var(--white);
  border-color: var(--teal-600);
  background: var(--teal-600);
  box-shadow: 0 8px 18px rgb(33 171 181 / 22%);
}

.button--keep:hover {
  border-color: var(--teal-700);
  background: var(--teal-700);
  box-shadow: 0 10px 22px rgb(33 171 181 / 28%);
}

.button--continue {
  color: var(--ink-500);
  border-color: var(--line-strong);
  background: var(--white);
  box-shadow: none;
}

.button--continue:hover {
  color: var(--ink-900);
  border-color: #9ca3af;
  background: #f9fafb;
}

.button--continue:disabled,
.button--continue:disabled:hover {
  color: #9ca3af;
  border-color: var(--line);
  background: #f3f4f6;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.button--decline {
  color: var(--ink-500);
  border-color: var(--line-strong);
  background: var(--white);
}

.button--decline:hover {
  color: var(--ink-900);
  border-color: #9ca3af;
  background: #f9fafb;
}

.button--back {
  color: var(--ink-500);
  border-color: var(--line-strong);
  background: var(--white);
}

.button--back:hover {
  color: var(--ink-900);
  border-color: #9ca3af;
  background: #f9fafb;
}

.button--next {
  color: var(--white);
  background: var(--teal-600);
}

.button--next:disabled {
  color: #9ca3af;
  border-color: var(--line);
  background: #f3f4f6;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.status-message {
  width: 100%;
  margin: 0 0 12px;
  color: var(--teal-700);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.status-message:empty {
  display: none;
}

.inline-cancel-link {
  display: block;
  min-height: 44px;
  margin: 0 auto;
  padding: 8px 10px;
  border: 0;
  color: var(--ink-500);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.inline-cancel-link:hover {
  color: var(--ink-900);
}

.inline-cancel-link:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgb(33 171 181 / 28%);
  outline-offset: 2px;
}

html[data-track-state="empty"] .cancel-modal {
  width: min(640px, calc(100vw - 64px));
  grid-template-columns: 1fr;
}

html[data-track-state="empty"] .offer-pane {
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell {
    width: 100%;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
  }

  .workspace {
    padding: 24px 20px;
  }

  .cancel-modal {
    position: absolute;
    top: 24px;
    left: 50%;
    width: min(720px, calc(100vw - 28px));
    height: auto;
    min-height: 0;
    max-height: none;
    grid-template-columns: 1fr;
    transform: translateX(-50%);
  }

  .loss-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    padding: 28px 30px;
    border-right: 0;
    border-bottom: 1px solid #d8edf0;
  }

  .library-summary {
    margin: 0;
  }

  .loss-copy {
    margin: 0;
  }

  .offer-pane {
    overflow: visible;
  }

  .offer-content {
    width: calc(100% - 56px);
    margin: 32px auto;
  }

}

@media (max-width: 620px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: none;
  }

  .cancel-modal {
    top: 10px;
    width: calc(100% - 20px);
    border-radius: var(--radius-lg);
  }

  .loss-rail {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px;
  }

  .library-summary {
    display: flex;
    gap: 28px;
  }

  .close-button {
    top: 14px;
    right: 14px;
  }

  .offer-content {
    width: calc(100% - 40px);
    margin: 32px auto;
  }

  .offer-content h1 {
    font-size: 24px;
  }

  .offer-description {
    font-size: 14px;
  }

  .offer-card {
    margin-top: 24px;
    padding: 24px;
  }

  .reason-grid {
    grid-template-columns: 1fr;
  }

  .reason-option {
    min-height: 50px;
  }

  .reason-detail textarea {
    min-height: 110px;
  }

  .decision-row {
    gap: 10px;
  }

  .content-actions {
    margin-top: 28px;
  }
}
