/* Tremendous fraud prevention: interactive prototype
   Rebuilt from the "Tremendous Prototype" page in Paper. Everything in the
   app uses Inter; the bar along the top is in the portfolio's own style. */

@font-face {
  font-family: "Inter";
  src: url("/work/tremendous/prototype/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Uncut Sans";
  src: url("/fonts/UncutSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Uncut Sans";
  src: url("/fonts/UncutSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Necto Mono";
  src: url("/fonts/NectoMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Tremendous */
  --ink: #111b27;
  --ink-2: #27272a;
  --muted: #6b7480;
  --muted-2: #76767f;
  --line: #cfcfd3;
  --line-2: #ced4db;
  --line-3: #e1e1e5;
  --blue: #006bed;
  --blue-hover: #0058c4;
  --sidebar: #111b27;
  --sidebar-active: #4b5663;
  --sidebar-text: #ced4db;
  --canvas: #f7f6f3;
  --green-bg: #e9ffe5;
  --green: #1d7a2a;
  --amber-bg: #fff3e0;
  --red-bg: #ffe7ea;
  --red: #d40023;
  --orange: #ab5300;
  --risk-high: #fb5437;
  --risk-med: #f5b400;
  --head-bg: #f1f3f6;

  /* the portfolio's bar */
  --paper: #faf9f6;
  --plum: #43162a;
  --plum-muted: #7a5a67;
  --plum-hairline: rgba(67, 22, 42, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

svg {
  display: block;
  flex: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- The portfolio bar: chapter tabs, restart, back ------------------- */

.bar {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  height: 56px;
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--plum-hairline);
  color: var(--plum);
  font-family: "Uncut Sans", system-ui, sans-serif;
  font-size: 15px;
}

.bar a {
  color: inherit;
}

.bar__back {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.bar__back:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.bar__title {
  font-weight: 500;
}

.chapters {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--plum-hairline);
  border-radius: 999px;
  font-family: "Necto Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.chapters button {
  padding: 4px 14px;
  border-radius: 999px;
  color: var(--plum-muted);
}

.chapters button:hover {
  color: var(--plum);
}

.chapters button[aria-selected="true"] {
  background: var(--plum);
  color: var(--paper);
}

.bar__back {
  justify-self: start;
}

.bar__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--plum-muted);
}

.bar__icon:hover {
  background: var(--plum-hairline);
  color: var(--plum);
}

/* ---- The app ------------------------------------------------------------ */

.app {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  background: #fff;
  overflow: clip;
}

/* Sidebar */
.sidebar {
  flex: none;
  width: 285px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: var(--sidebar-text);
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--blue);
}

.side-label {
  padding: 0 24px 8px;
  color: #9ca5af;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.team {
  margin: 0 24px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--sidebar-active);
  border-radius: 8px;
  color: #f1f3f6;
}

.team span {
  flex: 1;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px;
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 21px;
  text-align: left;
}

.menu__item > span:not(.count) {
  flex: 1;
}

.menu__item--sub {
  padding-left: 48px;
}

.menu__item--parent {
  color: #fff;
}

button.menu__item:hover {
  background: #1d2937;
}

.menu__item[aria-current="page"] {
  background: var(--sidebar-active);
  color: #fff;
}

.count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.beta {
  padding: 2px 8px;
  border-radius: 16px;
  background: var(--green-bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

/* Main column */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topnav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 40px;
  border-bottom: 1px solid var(--line-3);
  box-shadow: 0 0 0.5px rgba(39, 39, 42, 0.32), 0 0 3px rgba(89, 89, 99, 0.25);
  position: relative;
  z-index: 1;
}

.search {
  flex: 0 1 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
}

.search input::placeholder {
  color: var(--muted);
}

.topnav__actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topnav__icons {
  display: flex;
  gap: 16px;
}

.page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 40px;
}

.page__title {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--ink-2);
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.btn:hover {
  background: #f3f3f5;
}

.btn--wide {
  width: 150px;
}

.btn--lg {
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
}

.btn--primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  border-color: var(--blue-hover);
  background: var(--blue-hover);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  border-color: var(--line);
  background: none;
  color: #a7abb2;
  cursor: not-allowed;
}

.btn--primary:disabled {
  border-color: #6b7480;
  background: #6b7480;
  color: #fff;
}

.link {
  color: var(--blue);
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 16px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 20px;
  white-space: nowrap;
}

.badge--flagged {
  background: var(--amber-bg);
}

.badge--blocked {
  background: var(--red-bg);
}

.badge--released,
.badge--on {
  background: var(--green-bg);
}

.badge--on {
  color: var(--green);
}

/* ---- Settings ------------------------------------------------------------ */

.settings {
  max-width: 756px;
}

.settings h2 {
  margin: 48px 0 24px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
}

.settings h2:first-of-type {
  margin-top: 40px;
}

.card {
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
}

.rule--plain {
  align-items: center;
}

.rule + .rule {
  border-top: 1px solid var(--line);
}

.rule__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rule__name {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.rule__desc {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
}

.rule__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

/* The settings of a rule that's on, under its name */
.rule__details {
  margin: 12px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--line);
  color: #3f3f46;
  font-size: 14px;
  line-height: 22px;
}

.rule__details.is-new {
  animation: reveal 0.35s ease-out;
}

.rule__details p {
  margin: 0;
}

.rule__details p + p {
  margin-top: 8px;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---- A rule's setup page ------------------------------------------------- */

.rulepage {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
}

.rulepage__head {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 23px 40px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.rulepage__head .btn {
  justify-self: start;
  gap: 4px;
  padding: 0 8px 0 6px;
}

.rulepage__head h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.rulepage__head .topnav__icons {
  justify-self: end;
}

.rulepage__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 40px 40px;
}

.form {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 27, 39, 0.04), 0 1px 3px rgba(17, 27, 39, 0.05);
}

.form h2 {
  margin: 0 0 24px;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.hint {
  margin: -6px 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  outline: 0;
}

.input:focus,
.select:focus,
.textarea:focus,
.combo:focus-within {
  border-color: var(--blue);
}

.textarea {
  height: auto;
  min-height: 118px;
  padding: 12px 14px;
  line-height: 29px;
  resize: vertical;
  font-variant-numeric: tabular-nums;
}

.select {
  appearance: none;
  padding-right: 40px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111B27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center;
}

.row {
  display: flex;
  gap: 16px;
}

.row > .narrow {
  flex: 0 0 118px;
}

.row > .grow {
  flex: 1;
}

.money {
  position: relative;
}

.money span {
  position: absolute;
  left: 12px;
  top: 8px;
  font-size: 16px;
}

.money .input {
  padding-left: 26px;
}

.sentence {
  margin: 24px 0 40px;
  font-size: 16px;
  line-height: 24px;
}

.term {
  position: relative;
  text-decoration: underline dashed 1px;
  text-underline-offset: 4px;
  cursor: help;
}

.term__tip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 2;
  width: max-content;
  max-width: 480px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

.term:hover .term__tip,
.term:focus-visible .term__tip {
  opacity: 1;
  transform: none;
}

.radios {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  cursor: pointer;
}

.radio input,
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.error {
  margin: 8px 0 0;
  color: var(--red);
  font-size: 14px;
}

.helper-link {
  margin-top: 8px;
  font-size: 14px;
}

/* Country picker */
.combo {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 5px 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.combo input {
  flex: 1;
  min-width: 200px;
  height: 26px;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.combo input::placeholder {
  color: var(--muted);
  font-size: 14px;
}

.combo__globe {
  display: grid;
  place-items: center;
  width: 26px;
  height: 20px;
  border-radius: 3px;
  background: #e4e6ea;
  color: #8a919b;
}

.flag {
  width: 24px;
  height: 18px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  object-fit: cover;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 4px 0 6px;
  border-radius: 6px;
  background: #eef1f5;
  font-size: 14px;
}

.chip .flag {
  width: 20px;
  height: 15px;
}

.chip button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.chip button:hover {
  background: #dde2e8;
}

.options {
  position: absolute;
  left: -2px;
  right: -2px;
  top: calc(100% + 8px);
  z-index: 3;
  max-height: 260px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(17, 27, 39, 0.12), 0 0 0 1px rgba(17, 27, 39, 0.06);
}

.options li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.options li[aria-selected="true"],
.options li:hover {
  background: #f1f3f6;
}

.options .none {
  color: var(--muted);
  cursor: default;
}

/* ---- Review queue -------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  border-bottom: 1px solid var(--line-3);
}

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 10px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 14px;
}

.tab:hover {
  color: var(--blue);
}

.tab[aria-selected="true"] {
  border-color: var(--blue);
}

.tab .count {
  font-size: 11px;
  line-height: 18px;
}

.table-card {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line-3);
}

.toolbar .search {
  flex: 1 1 380px;
  border-width: 1px;
  border-color: #9ca5af;
}

.date {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #9ca5af;
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.toolbar__links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  white-space: nowrap;
}

.toolbar__links .sep {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.selected {
  padding: 8px 16px;
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th,
td {
  height: 44px;
  padding: 0 12px;
  border-top: 1px solid var(--line-3);
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--head-bg);
  font-weight: 500;
}

td:first-child,
th:first-child {
  width: 44px;
  padding-left: 16px;
}

tbody tr {
  cursor: pointer;
  transition: background-color 0.15s;
}

tbody tr:hover {
  background: #fafbfc;
}

tbody tr.is-open {
  background: #fdf8ef;
}

tbody tr.leaving {
  opacity: 0;
  transition: opacity 0.3s;
}

.id {
  color: var(--blue);
}

.check {
  display: flex;
}

.reason {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty {
  padding: 72px 24px;
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 500;
}

.empty span {
  color: var(--muted);
}

/* Side sheet */
.sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  width: 522px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 8px 24px rgba(39, 39, 42, 0.16);
  transform: translateX(105%);
  visibility: hidden;
  transition:
    transform 0.3s cubic-bezier(0.2, 0, 0, 1),
    visibility 0s 0.3s;
}

.sheet.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.sheet__head {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 40px 24px;
  border-bottom: 1px solid var(--line-2);
}

.sheet__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.sheet__id {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
}

.sheet__amount {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.sheet__amount .dot {
  color: var(--muted);
  font-weight: 400;
}

.sheet__meta {
  margin: 8px 0 0;
  color: var(--muted);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  border-radius: 8px;
}

.icon-btn:hover {
  background: #f1f3f6;
}

.sheet__actions {
  display: flex;
  gap: 8px;
}

.sheet__actions .btn {
  flex: 1;
}

.sheet__body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 0 40px 40px;
}

.sheet__section {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--line-2);
}

.sheet__section h3 {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.risk {
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
}

.risk__level {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 700;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 3.2px;
  height: 16px;
}

.bars i {
  width: 3.2px;
  border-radius: 0.8px;
  background: #e1e1e5;
}

.bars i:nth-child(1) {
  height: 8px;
}

.bars i:nth-child(2) {
  height: 12px;
}

.bars i:nth-child(3) {
  height: 16px;
}

.risk--high .bars i {
  background: var(--risk-high);
}

.risk--medium .bars i:nth-child(-n + 2) {
  background: var(--risk-med);
}

.risk ul {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: disc;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 21px;
}

.risk li + li {
  margin-top: 4px;
}

.risk .big {
  font-weight: 600;
}

.facts {
  margin: 16px 0 0;
}

.fact {
  display: flex;
  gap: 8px;
  padding: 8px 0;
}

.fact dt {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: 140px;
  flex: none;
  font-weight: 700;
}

.fact dd {
  margin: 0;
  color: var(--ink-2);
}

.fact small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.fact dd > span {
  display: block;
}

.fact .warn {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--orange);
}

.fact .blocked {
  color: var(--red);
}

.disclosure {
  border-bottom: 1px solid var(--line-2);
}

.disclosure:last-child {
  border-bottom: 0;
}

.disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 16px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary svg {
  transition: rotate 0.2s;
}

.disclosure[open] summary svg {
  rotate: 180deg;
}

.disclosure__body {
  padding-bottom: 24px;
  color: var(--ink-2);
}

.disclosure__body p {
  margin: 0;
}

.disclosure__body p + p {
  margin-top: 8px;
}

.disclosure__body time {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: #fff;
}

.spinner {
  width: 72px;
  height: 72px;
  border: 5px solid transparent;
  border-top-color: var(--blue);
  border-left-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

/* ---- Modals ------------------------------------------------------------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 27, 39, 0.55);
  animation: fade 0.2s ease-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  position: relative;
  width: 500px;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(17, 27, 39, 0.25);
  animation: rise 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.modal--wide {
  width: 600px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.modal__hero {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.modal__close {
  position: absolute;
  top: 28px;
  right: 24px;
}

.modal__close--round {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 27, 39, 0.15);
  margin: 0;
}

.modal__body {
  padding: 40px;
}

.modal__hero + .modal__body {
  padding-top: 40px;
}

.modal h2 {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
}

.modal p {
  margin: 0 0 16px;
}

.modal__text {
  font-size: 16px;
  line-height: 24px;
}

.modal__foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.modal__foot--split {
  flex-direction: row;
  justify-content: space-between;
  margin-top: 32px;
}

.modal__foot .link {
  align-self: center;
  padding: 6px;
  font-size: 16px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.steps span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f3f6;
}

.check {
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.sub {
  margin: 0 0 4px;
  font-weight: 500;
}

.drop {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  padding: 28px 16px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  color: var(--blue);
  text-align: center;
}

.drop:hover,
.drop.is-over {
  border-color: var(--blue);
  background: #f5f9ff;
}

.drop small {
  color: var(--muted);
  font-size: 11px;
}

.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.file div {
  flex: 1;
}

.file small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* ---- Toasts -------------------------------------------------------------- */

.toasts {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #27272a;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(17, 27, 39, 0.18);
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.toast.leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast svg path {
  stroke: currentColor;
}

.toast button {
  display: grid;
  place-items: center;
  margin-left: 16px;
  width: 20px;
  height: 20px;
  color: #fff;
}

.toast .toast__undo {
  width: auto;
  height: auto;
  margin-left: 16px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #8fc1ff;
  font-weight: 600;
}

.toast .toast__undo:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toast .toast__undo + button {
  margin-left: 4px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ---- Small screens -------------------------------------------------------- */

.small-screen {
  display: none;
}

@media (max-width: 1100px) {
  .sidebar {
    width: 240px;
  }
  .menu__item {
    gap: 12px;
    padding-inline: 12px;
    white-space: nowrap;
  }
  .menu__item--sub {
    padding-left: 40px;
  }
  .team span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .page,
  .topnav {
    padding-inline: 28px;
  }
}

@media (max-width: 899px) {
  .bar,
  .app {
    display: none;
  }
  .small-screen {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 32px 24px;
    color: var(--plum);
    font-family: "Uncut Sans", system-ui, sans-serif;
  }
  .small-screen h1 {
    margin: 0;
    font-size: 28px;
    line-height: 34px;
    font-weight: 500;
  }
  .small-screen p {
    margin: 0;
    font-size: 18px;
    line-height: 26px;
  }
  .small-screen a {
    color: var(--plum);
  }
}

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

/* A modal that was already open when the page redrew stays put */
.overlay[data-static],
.overlay[data-static] .modal {
  animation: none;
}

/* Parts of the app that aren't part of the demo: they look as they would,
   but do nothing, aren't announced to screen readers, and say so on hover */
[data-off] {
  position: relative;
  cursor: default;
}

[data-off] > * {
  pointer-events: none;
}

.demo-tip {
  position: fixed;
  z-index: 50;
  padding: 4px 8px;
  border-radius: 6px;
  background: #27272a;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.demo-tip.is-on {
  opacity: 1;
}

.rule__off {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  text-align: right;
  max-width: 132px;
}

.menu__item--disabled {
  opacity: 0.45;
}
